/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f7fa;
  color: #1e1e1e;
  line-height: 1.5;
}

a {
  color: #004f9e;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* Layout */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #dde3ec;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo {
  height: 40px;
  width: auto;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: #004f9e;
}

.brand-tagline {
  font-size: 0.8rem;
  color: #4f5a6b;
}

/* Nav */
.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.main-nav a {
  padding: 0.3rem 0.5rem;
  border-radius: 999px;
  color: #4f5a6b;
}

.main-nav a.active {
  background: #004f9e;
  color: #ffffff;
}

/* Language switch */
.lang-switch {
  display: flex;
  gap: 0.25rem;
}

.lang-btn {
  border: 1px solid #004f9e;
  background: #ffffff;
  color: #004f9e;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.8rem;
  cursor: pointer;
}

.lang-btn.active {
  background: #004f9e;
  color: #ffffff;
}

/* Hero and cards */
main.container {
  padding: 1.5rem 1rem 2.5rem;
}

.hero {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
  margin-bottom: 1.5rem;
}

.hero h1 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.hero-actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  margin-bottom: 1.5rem;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.btn.primary {
  background: #004f9e;
  color: #ffffff;
}

.btn.primary:hover {
  background: #003b75;
}

.btn.secondary {
  background: #ffffff;
  color: #004f9e;
  border: 1px solid #004f9e;
}

.btn.secondary:hover {
  background: #f0f4fb;
}

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form label {
  display: block;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #c5cfdd;
  font-size: 0.95rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #004f9e;
  box-shadow: 0 0 0 1px rgba(0, 79, 158, 0.2);
}

.form-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: #6b7280;
}

/* Footer */
.site-footer {
  border-top: 1px solid #dde3ec;
  background: #ffffff;
  padding: 1rem 0;
  font-size: 0.85rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: center;
}

.footer-link {
  margin: 0 0.15rem;
}

/* Meta / small text */
.meta {
  font-size: 0.85rem;
  color: #6b7280;
}

/* Language visibility */
body .i18n {
  display: none;
}

body.lang-en .i18n-en {
  display: block;
}

body.lang-fr .i18n-fr {
  display: block;
}

/* For inline elements if you ever need them */
body.lang-en .i18n-en.inline,
body.lang-fr .i18n-fr.inline {
  display: inline;
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .brand {
    flex: 1 1 100%;
  }

  .main-nav {
    flex: 1 1 100%;
    justify-content: flex-start;
    margin-top: 0.5rem;
  }

  .hero {
    padding: 1.25rem 1rem;
  }

  .card {
    padding: 1.25rem 1rem;
  }
}

.form-status {
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.form-status.ok {
  color: #047857; /* green */
}

.form-status.error {
  color: #b91c1c; /* red */
}

.client-logo {
	height: 60px;
	max-height: 60px;
	width: auto;
	margin-bottom: 1.5rem;
}

.tutorial-meta { 
	font-size: 0.95rem; 
	color: 
	rgba(0,0,0,0.65); 
	margin-top:0.25rem; 
}

.toc a {
	text-decoration:none; 
}

.toc a:hover { 
	text-decoration:underline; 
}

.code-block { 
	background:#0b1020; 
	color:#e7ecff; 
    padding: 1.5rem 3.25rem 1rem 1rem;
    padding-top: 3.25rem; /* space for copy button */
	border-radius:12px; 
    display: block;
    max-height: 40em;              /* ≈ 100 lines (0.6em–0.65em per line typical) */
    overflow-y: auto;              /* vertical scroll */
    overflow-x: auto;              /* horizontal scroll */
	font-size:0.92rem; 
	line-height:1.45; 
    white-space: pre;
    tab-size: 4;
    -moz-tab-size: 4;
    font-family: "Fira Code", Consolas, monospace;
}

.code-block code {
	tab-size: 4;
	-moz-tab-size: 4; 
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; 
	padding-top: 3rem; /* ensures space above code for the button */
}

.callout { 
	border:1px solid rgba(0,79,158,0.18); 
	background:#f7faff; 
	border-radius:12px; 
	padding:1rem 1.2rem; 
}

.kbd { 
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	background:#f0f4fb; 
	border:1px solid rgba(0,79,158,0.25); 
	padding:0.08rem 0.45rem; 
	border-radius:8px; 
}

.code-wrapper {
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 0.9rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e5e7eb;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background 0.2s ease, transform 0.1s ease;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.copy-btn:active {
  transform: translateY(1px);
}

.copy-btn:focus-visible {
  outline: 2px solid rgba(231, 236, 255, 0.55);
  outline-offset: 2px;
}


/* Clickable list items */
.toggle-list .has-detail {
	cursor: pointer;
	list-style-position: outside;
}

.toggle-list .item-label {
	display: inline-block;
}

/* Extra text (hidden by default) */
.toggle-list .item-detail {
  display: none;
  margin-top: 0.5rem;
  margin-left: 1.5rem;        /* indentation */
  padding: 0.6rem 0.9rem;     /* give it some breathing room */
  font-size: 0.9rem;          /* slightly smaller than main text */
  color: #374151;             /* softer gray, still high contrast */
  background: #f0f5ff;        /* light blue-ish, matches #004f9e brand */
  border-left: 3px solid #004f9e;  /* same blue as your buttons/lang-toggle */
  border-radius: 8px;
}

/* When open, show details */
.toggle-list .has-detail.open .item-detail {
	display: block;
}

/* Optional: subtle visual feedback on hover */
.toggle-list .has-detail:hover .item-label {
	text-decoration: underline;
}

/* Custom marker for expandable list items */
.toggle-list .has-detail::marker {
  content: "\25B8 ";        /* ▸ right-pointing triangle */
  color: #004f9e;
  font-size: 0.95em;
}

/* When open, swap the marker */
.toggle-list .has-detail.open::marker {
  content: "\25BE ";        /* ▾ down-pointing triangle */
}


.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

