/* =============================================================
   AlgoBacktest Home — page styles
   Imports tokens.css. Mobile-first. BEM-ish naming.
   Burger breakpoint: 900px. Tablet: 769-1024px. Desktop: 1025px+.
   All colors and sizes come from tokens.css unless explicitly noted.
   ============================================================= */

@import url('tokens.css');


/* =============================================================
   1. Reset and base
   ============================================================= */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* Prevent horizontal scroll caused by off-screen positioned elements
   (notably .mobile-drawer at transform: translateX(100%) and any
   box-shadow that bleeds outside the viewport). overflow-x: clip
   contains the rendered box without creating a scroll container,
   so position: sticky on the topstrip keeps working. */
html, body { overflow-x: clip; }

html {
  scroll-behavior: smooth;
  /* Reserve room above smooth-scroll targets so the sticky header
     does not cover the heading we just jumped to. Header runs
     about 64px on mobile, 72px on desktop; we add 16px of breath. */
  scroll-padding-top: 88px;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: var(--t-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Lock body scroll while the mobile drawer is open. */
body.drawer-open { overflow: hidden; }

img, picture, source { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }


/* =============================================================
   2. Typography scale
   ============================================================= */

h1, h2, h3, h4 {
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.12;
  font-weight: 700;
  text-wrap: balance;
}
h1 { font-size: var(--t-display); letter-spacing: -0.035em; line-height: 1.04; font-weight: 800; }
h2 { font-size: var(--t-h2);     letter-spacing: -0.025em; }
h3 { font-size: var(--t-h3);     letter-spacing: -0.012em; line-height: 1.2; }
h4 { font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-mute); font-weight: 700; }

p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: var(--t-lead);
  color: var(--ink-soft);
  line-height: 1.5;
  max-width: 64ch;
}

/* Closing-line blocks under each section: same look in every section. */
.closing-line {
  font-size: clamp(17px, 1.8vw, 21px);
  color: var(--ink);
  margin-top: clamp(24px, 3vw, 40px);
  text-align: center;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}


/* =============================================================
   3. Layout helpers
   ============================================================= */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}
.narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

/* Section vertical rhythm — uniform across all 13 sections.
   Section 2 needs the air ("silence after the saturated hero"),
   Section 9 reads warm at full height, Section 13 reads decisive
   at full height. Keeping uniform is the cleanest call. */
section {
  padding: clamp(64px, 9vw, 130px) 0;
  position: relative;
}

/* Section heads (h2 + lede) sit centered for most sections. */
.section-head {
  text-align: center;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.section-head .lede {
  margin-left: auto;
  margin-right: auto;
  margin-top: 14px;
}

/* Eyebrow accent (matches /decouvrir/ visual language). */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: var(--t-micro); letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-mute); font-weight: 600; margin-bottom: 18px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* Right-arrow used as a typographic separator (not an emoji).
   aria-hidden in HTML so screen readers skip it. */
.arrow {
  color: var(--accent);
  font-weight: 700;
  margin: 0 6px;
}


/* =============================================================
   4. Buttons
   ============================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 120ms ease, box-shadow 150ms ease, background 150ms ease;
  line-height: 1;
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05),
              0 8px 22px -10px color-mix(in srgb, var(--accent) 60%, transparent);
}
.btn-primary:hover { transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  background: var(--bg-soft);
}

/* Disabled state for "Choisir Starter" (Stripe not ready).
   Matches Section 0.5 spec: opacity 0.5, no hover, cursor not-allowed. */
.btn-disabled {
  background: var(--bg-soft);
  color: var(--ink-mute);
  border: 1px solid var(--line);
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-disabled:hover { transform: none; box-shadow: none; }

.btn-lg { padding: 18px 32px; font-size: 16px; }
.btn-xl { padding: 22px 40px; font-size: 18px; border-radius: 999px; }

.btn-arrow {
  display: inline-block;
  transition: transform 150ms ease;
}
.btn:hover .btn-arrow { transform: translateX(3px); }


/* =============================================================
   5. Header (Section 0.5) — sticky, with burger below 900px
   ============================================================= */

.topstrip {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
/* Adds a subtle shadow once the user has scrolled past ~8px.
   The class .scrolled is toggled by main.js. */
.topstrip.scrolled {
  border-bottom-color: var(--line-soft);
  box-shadow: 0 4px 14px -10px rgba(15, 23, 42, 0.18);
}
.topstrip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px var(--pad-x);
  max-width: var(--container);
  margin: 0 auto;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: 16px;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  width: 28px;
  height: 28px;
  display: block;
}
.brand-name { line-height: 1; }

/* Default (mobile-first): hide desktop nav and CTA, show burger. */
.topstrip-nav { display: none; }
.topstrip-cta { display: none; }
.burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: background 150ms ease;
}
.burger:hover { background: var(--bg-soft); }
.burger-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  margin: 0 auto;
  transition: transform 200ms ease, opacity 150ms ease;
}
.burger[aria-expanded="true"] .burger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.burger[aria-expanded="true"] .burger-bar:nth-child(2) {
  opacity: 0;
}
.burger[aria-expanded="true"] .burger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* =============================================================
   6. Mobile drawer (off-canvas)
   ============================================================= */

/* Drawer + backdrop are always rendered (so transforms can transition
   smoothly). main.js removes the [hidden] attribute on init and toggles
   .is-open thereafter. Without JS, [hidden] still applies display:none
   so the drawer is correctly invisible. */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}
.drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(86vw, 360px);
  height: 100dvh;
  background: var(--bg-card);
  z-index: 41;
  padding: 80px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateX(100%);
  pointer-events: none;
  transition: transform 280ms cubic-bezier(0.32, 0.72, 0.16, 1);
  box-shadow: -10px 0 40px -20px rgba(15, 23, 42, 0.35);
}
.mobile-drawer.is-open {
  transform: translateX(0);
  pointer-events: auto;
}
.drawer-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}
.drawer-close:hover { background: var(--bg-soft); }
.drawer-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.drawer-list a {
  display: block;
  padding: 14px 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 17px;
  color: var(--ink);
  border-radius: 8px;
}
.drawer-list a:hover { background: var(--bg-soft); }
.drawer-cta {
  width: 100%;
  margin-top: auto;
}


/* =============================================================
   7. Hero (Section 1)
   ============================================================= */

.hero { padding-top: clamp(48px, 7vw, 80px); }

.hero-copy {
  text-align: center;
  margin-bottom: clamp(32px, 4vw, 48px);
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}
.hero-sub {
  font-size: var(--t-lead);
  color: var(--ink-soft);
  margin-top: 18px;
  line-height: 1.5;
}

.workflow-marker {
  margin-top: 22px;
  font-size: 16px;
  color: var(--ink-mute);
  letter-spacing: 0.02em;
}
.workflow-marker strong { color: var(--ink); font-weight: 700; }

/* Hero visuals: always stacked vertically. The 50/50 grid we used
   to have squeezed each image to ~600-700px even on a 28-inch
   monitor, which made V1a (the dense Strategy Finder table)
   illegible. Stacking gives each visual the full ~1100px container
   width, so cell content is readable in 3 seconds. DOM order is
   table first, curve second (matches visual order). */
.hero-visuals {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: clamp(32px, 4vw, 48px);
}
.hero-visual {
  margin: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  box-shadow: 0 12px 32px -20px rgba(15, 23, 42, 0.18);
}
.hero-visual img {
  width: 100%;
  height: auto;
  /* Override the 800px image cap inside the hero. The Strategy
     Finder table (V1a) is dense (5 rows x 8 columns) and was
     unreadable at 800px. Let it fill its grid column up to the
     hero container width (widened below for large screens). */
  max-width: none;
  margin: 0 auto;
}

.hero-cta {
  text-align: center;
}
.hero-cta .btn { margin-bottom: 10px; }
.cta-reassurance {
  font-size: var(--t-small);
  color: var(--ink-mute);
}


/* =============================================================
   8. Email capture form
   ============================================================= */

.email-form-wrap {
  max-width: 480px;
  margin: 28px auto 0;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  overflow: hidden;
  transition: opacity 220ms ease;
}
/* JS toggles between hero-collapsed and hero-expanded.
   Height transition is JS-driven (measured scrollHeight) for
   reliability across content sizes; CSS only handles fade. */
.email-form-wrap.hero-collapsed {
  height: 0;
  opacity: 0;
  margin-top: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-color: transparent;
  pointer-events: none;
}
.email-form-wrap.hero-expanded {
  opacity: 1;
}

.email-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.email-form input[type="email"] {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  font-family: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.email-form input[type="email"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.email-form button[type="submit"] { width: 100%; }

/* Honeypot — visually hidden, accessible to bots that parse forms. */
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.newsletter-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  font-size: var(--t-small);
  color: var(--ink-soft);
  cursor: pointer;
}
.newsletter-checkbox input { margin-top: 2px; flex-shrink: 0; }

.form-message {
  margin-top: 12px;
  font-size: var(--t-small);
  text-align: center;
  min-height: 1.4em;
}
.form-message.success { color: var(--green); font-weight: 600; }
.form-message.error   { color: var(--danger); font-weight: 600; }


/* =============================================================
   9. Section 2 — Constat
   ============================================================= */

.constat .narrow {
  text-align: left;
}
.constat h2 {
  margin-bottom: clamp(20px, 2.5vw, 28px);
}
.constat .lede {
  margin-bottom: clamp(20px, 2.5vw, 28px);
  font-size: clamp(17px, 1.7vw, 20px);
}
.constat-pivot {
  font-size: clamp(18px, 2vw, 22px);
  color: var(--ink);
  padding: clamp(20px, 2.5vw, 28px) clamp(20px, 2.5vw, 28px);
  background: var(--bg-tint-green);
  border-left: 4px solid var(--accent);
  border-radius: var(--r-md);
  margin: 0;
}


/* =============================================================
   10. Section 3 — Two families of AI
   ============================================================= */

.reveal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: clamp(32px, 4vw, 48px);
}

.col-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(20px, 2.5vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.col-card.gen { border-top: 4px solid var(--blue); }
.col-card.ml  { border-top: 4px solid var(--accent); }

.col-head { display: flex; flex-direction: column; gap: 4px; }
.col-head h3 { margin: 0; }
.col-sub {
  font-size: var(--t-small);
  color: var(--ink-mute);
  font-weight: 500;
}

/* The .diag-box hosts the JS-driven animations (word-stream chips
   on the LLM side, SVG tree on the ML side). All animation rules
   below are migrated verbatim from website/decouvrir/styles.css
   (lines 297-310) so the result matches what Lucas validated.
   Hardcoded colors are kept on purpose — verbatim migration. */
.diag-box {
  background: rgba(255, 255, 255, 0.55);
  border: 1px dashed rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  padding: 14px;
  min-height: 120px;
  position: relative;
  overflow: hidden;
}

.row-fact {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px dashed rgba(0, 0, 0, 0.07);
  font-size: 14.5px;
  line-height: 1.55;
}
.row-fact:first-of-type {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 14px;
  margin-top: 4px;
}
.row-fact .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  padding-top: 2px;
}

/* Word-stream (LLM column) — chip-by-chip rendering of a sentence,
   ending with a yellow "?" hallucination marker. */
.word-stream {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.word-stream .w {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  background: #fff;
  border: 1px solid #cdddf2;
  color: var(--ink);
  opacity: 0;
  transform: translateY(4px);
  animation: wfade 0.4s ease forwards;
}
@keyframes wfade {
  to { opacity: 1; transform: translateY(0); }
}
.word-stream .qmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fef3c7;
  color: var(--warn);
  font-weight: 800;
  font-size: 13px;
  margin-left: 6px;
}

/* Decision-tree (ML column) — SVG tree + cycling signal pill. */
.tree-svg { width: 100%; height: 130px; }
.tree-signal {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 5px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  font-weight: 600;
}
.tree-signal.buy  { background: #dcfce7; color: #166534; }
.tree-signal.sell { background: #fee2e2; color: #991b1b; }
.tree-signal.hold { background: #f1f5f9; color: var(--ink-mute); }


/* =============================================================
   11. Section 4 — How it works
   ============================================================= */

.how-it-works .workflow-marker--lg {
  font-size: clamp(20px, 2.4vw, 26px);
  margin-top: 12px;
}
.how-subsubtitle {
  margin-top: 8px;
  font-size: var(--t-small);
  color: var(--ink-mute);
}

/* Section 4 — Each bloc is a clean vertical stack: image FIRST at
   full bloc width, then "1 - Configure" title, then paragraph.
   No horizontal layout, no width caps on the screenshots. */
.how-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 3vw, 44px);
}
.how-bloc {
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: clamp(20px, 2.5vw, 28px);
}
.how-visual {
  margin: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  width: 100%;
}
.how-visual img {
  width: 100%;
  max-width: none;
  height: auto;
  display: block;
}
.how-num {
  margin-top: 8px;
  font-size: var(--t-h3);
  color: var(--accent);
  letter-spacing: -0.01em;
}
.how-bloc p {
  color: var(--ink-soft);
  margin: 0;
}


/* =============================================================
   12. Section 5 — Analyzers mosaic
   ============================================================= */

/* Section 5 — Six analyzers as stacked rows, each at full container
   width (capped at 1100px so the wider container doesn't make text
   uncomfortable). No multi-column grid: forcing 16:9 with object-fit
   was creating dead space around images that didn't match the box.
   Now each image renders at its native proportion with the caption
   directly below. Heights vary; that is intended. */
.analyzers-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 3vw, 40px);
  max-width: 1100px;
  margin: 0 auto;
}
.analyzer-tile {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.analyzer-tile picture,
.analyzer-tile img {
  display: block;
  width: 100%;
}
/* No aspect-ratio, no object-fit: render at native proportion. */
.analyzer-tile img {
  height: auto;
}
.analyzer-tile figcaption {
  padding: 16px 24px;
  font-size: var(--t-small);
  color: var(--ink-soft);
  border-top: 1px solid var(--line-soft);
}
.analyzer-tile figcaption strong {
  color: var(--ink);
  display: block;
  margin-bottom: 4px;
}


/* =============================================================
   13. Section 6 — Out-of-sample
   ============================================================= */

.out-of-sample .oos-body p { color: var(--ink-soft); margin-bottom: 18px; }
.out-of-sample .oos-body p strong { color: var(--ink); }

.oos-schema {
  margin: clamp(28px, 4vw, 48px) auto;
  max-width: 800px;
  border-radius: var(--r-md);
  overflow: hidden;
}
.oos-schema img {
  width: 100%;
  height: auto;
}

.oos-cta {
  margin-top: clamp(28px, 3.5vw, 44px);
}


/* =============================================================
   14. Section 7 — Simple mode
   ============================================================= */

/* Section 7 layout: V8 is a tall portrait screenshot. The previous
   text-LEFT / image-RIGHT layout made the bloc 5x taller than the
   text. Switched to image-on-top + text-below, with a hard 600px
   max-height on the image so it doesn't dominate. */
.simple-mode-body {
  display: flex;
  flex-direction: column-reverse;  /* DOM: text first, figure second; visual: figure on top */
  gap: clamp(28px, 4vw, 44px);
  align-items: center;
}
.simple-mode-text {
  max-width: 720px;
  text-align: left;
  padding: 0;
}
.simple-mode-text p { color: var(--ink-soft); }
.simple-mode-text .closing-line { text-align: left; margin-left: 0; margin-right: 0; }

.simple-mode-visual {
  margin: 0 auto;
  max-width: 560px;
  max-height: 700px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: var(--bg-card);
}
.simple-mode-visual img {
  max-width: 100%;
  max-height: 700px;
  object-fit: contain;
  width: auto;
  height: auto;
}


/* =============================================================
   15. Section 8 — AI assistant
   ============================================================= */

.ai-assistant > .narrow > p { color: var(--ink-soft); margin-bottom: 24px; }

/* Three example questions — separate paragraphs (not a bulleted list).
   Generous breathing space between them. */
.ai-question {
  margin: 18px 0;
  padding-left: 18px;
  border-left: 3px solid var(--line);
  font-size: clamp(16px, 1.6vw, 18px);
  color: var(--ink-soft);
}
.ai-question:first-of-type { margin-top: 0; }
.ai-question em { font-style: italic; }

.ai-visual {
  margin: clamp(28px, 4vw, 44px) auto;
  max-width: 1100px;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: var(--bg-card);
}
.ai-visual img { width: 100%; height: auto; }

.ai-pricing {
  margin-top: clamp(24px, 3vw, 36px);
  font-size: var(--t-small);
  color: var(--ink-mute);
  text-align: center;
}


/* =============================================================
   16. Section 9 — Founder + Caveat signature
   ============================================================= */

/* Section 9 has no .section-head wrapper (just bare H2 + paragraphs),
   so the global h2 { margin: 0 } would let the title touch the first
   paragraph. Add explicit breathing room here. */
.founder h2 { margin-bottom: clamp(20px, 2.5vw, 32px); }
.founder p { color: var(--ink-soft); margin-bottom: 18px; }
.founder p em { color: var(--ink); }

/* Caveat font, semi-bold, dark gray, right-aligned.
   Spec asked for #4B5563; var(--ink-soft) is #475569 — visually
   identical (RGB diff 4-6 per channel, imperceptible) and keeps
   the no-hardcoded-colors rule clean. */
.signature-fondateur {
  font-family: 'Caveat', cursive;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-align: right;
  margin-top: clamp(20px, 2.5vw, 32px);
  font-style: normal;
  line-height: 1.2;
}


/* =============================================================
   17. Section 10 — Clarifications (table desktop / cards mobile)
   ============================================================= */

.clarifications-table {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Mobile-first: each row is a card. Header row hidden — the
   color contrast on the cells already conveys "not / is". */
.clarifications-head { display: none; }

.clarifications-row {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line-soft);
}
.clarifications-cell {
  padding: 16px 20px;
  font-size: 15px;
  line-height: 1.5;
}
.clarifications-cell--neg {
  background: var(--bg-soft);
  color: var(--ink-mute);
  text-decoration: line-through;
  text-decoration-color: var(--ink-faint);
  text-decoration-thickness: 1px;
}
.clarifications-cell--pos {
  background: var(--bg-tint-green);
  color: var(--ink);
  font-weight: 500;
  border-top: 1px solid var(--line-soft);
}


/* =============================================================
   18. Section 11 — Pricing cards (mobile order Pro -> Free -> Starter)
   ============================================================= */

/* Mobile (default): flex column, with `order` enforcing
   Pro first / Free second / Starter third. */
.pricing-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: stretch;
}
.pricing-card--pro     { order: 1; }
.pricing-card--free    { order: 2; }
.pricing-card--starter { order: 3; }

.pricing-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Pro emphasis — natural sizing, no transform. */
.pricing-card--pro {
  border-width: 3px;
  border-color: var(--accent);
  padding: 32px 28px;
  box-shadow: 0 18px 38px -18px color-mix(in srgb, var(--accent) 40%, transparent);
}
.pricing-card--pro h3 {
  font-size: clamp(22px, 2.4vw, 28px);
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: var(--t-micro);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.pricing-card-head { display: flex; flex-direction: column; gap: 8px; }
.pricing-card-head h3 { margin: 0; }
.pricing-price {
  font-size: clamp(20px, 2.4vw, 26px);
  color: var(--ink);
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}
.pricing-price strong { font-weight: 800; }
.pricing-price-old {
  color: var(--ink-faint);
  font-weight: 500;
  font-size: 0.78em;
}
.pricing-period { color: var(--ink-mute); font-size: 0.78em; font-weight: 500; }
.pricing-launch { color: var(--ink-mute); font-size: 0.7em; font-weight: 500; }
.pricing-tagline { font-size: var(--t-small); color: var(--ink-soft); margin: 4px 0 0; }

.pricing-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
}
.pricing-features li {
  position: relative;
  padding-left: 22px;
  font-size: 15px;
  color: var(--ink);
}
.pricing-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.pricing-cta { width: 100%; margin-top: auto; }

.pricing-soon {
  font-size: var(--t-small);
  color: var(--ink-mute);
  text-align: center;
  margin-top: 8px;
  margin-bottom: 0;
}

.pricing-foot {
  margin-top: clamp(28px, 3.5vw, 44px);
  text-align: center;
  font-size: var(--t-small);
  color: var(--ink-soft);
  line-height: 1.6;
}
.pricing-foot strong { color: var(--ink); }


/* =============================================================
   19. Section 12 — FAQ accordion (Q1 open by default)
   ============================================================= */

.faq-item {
  border-bottom: 1px solid var(--line-soft);
  padding: 18px 0;
}
.faq-item:first-of-type { border-top: 1px solid var(--line-soft); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  position: relative;
  padding-right: 40px;
  font-size: clamp(17px, 1.6vw, 19px);
  font-weight: 600;
  color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 26px;
  font-weight: 300;
  color: var(--ink-mute);
  transition: transform 250ms ease, color 200ms ease;
  line-height: 1;
}
.faq-item[open] summary::after {
  content: '\2212'; /* MINUS SIGN U+2212 */
  color: var(--accent);
}
.faq-item summary:hover { color: var(--accent); }
.faq-item p {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
}
/* Inline links inside FAQ answers (e.g. Skool community link in Q3).
   Body links inherit color globally; FAQ answers need a clear link
   affordance so users notice them. */
.faq-item p a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.faq-item p a:hover { text-decoration-thickness: 2px; }


/* =============================================================
   20. Section 13 — CTA final
   ============================================================= */

.cta-final { text-align: center; }
.cta-final h2 { font-size: clamp(28px, 3.6vw, 44px); }
.cta-final-sub {
  margin: 18px auto 32px;
  font-size: var(--t-lead);
  color: var(--ink-soft);
}
.cta-final-cta { margin: 0 auto; }
.legal-mention {
  margin-top: clamp(28px, 3.5vw, 44px);
  font-size: var(--t-micro);
  color: var(--ink-mute);
  line-height: 1.6;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}


/* =============================================================
   21. Footer
   ============================================================= */

.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--line-soft);
  padding: clamp(40px, 6vw, 64px) 0 clamp(20px, 3vw, 32px);
  margin-top: clamp(40px, 5vw, 60px);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(28px, 3.5vw, 44px);
}
.footer-brand .brand { font-size: 17px; }

.footer-col h4 {
  margin: 0 0 14px;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 15px;
  transition: color 150ms ease;
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  margin-top: clamp(32px, 4vw, 48px);
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  font-size: var(--t-micro);
  color: var(--ink-mute);
  text-align: center;
}
.footer-bottom p { margin: 0; }


/* =============================================================
   22. Responsive — 769px+ (tablet and up)
   Re-layouts grids that need 2+ columns. Burger still active here.
   ============================================================= */

@media (min-width: 769px) {

  /* Section 3 — two columns side-by-side */
  .reveal-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Section 7 keeps the column-reverse stack at all viewports.
     V8 is portrait; side-by-side made it dominate the layout. */

  /* Section 10 — 2-col table layout, header row visible */
  .clarifications-head {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 4px;
  }
  .clarifications-head .clarifications-cell {
    padding: 14px 20px;
    font-size: var(--t-small);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: transparent;
    text-decoration: none;
    border: none;
  }
  .clarifications-head .clarifications-cell--neg { color: var(--ink-mute); }
  .clarifications-head .clarifications-cell--pos { color: var(--accent); }

  .clarifications-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid var(--line-soft);
    border-radius: var(--r-md);
  }
  .clarifications-cell {
    padding: 18px 24px;
  }
  .clarifications-cell--pos {
    border-top: none;
    border-left: 1px solid var(--line-soft);
  }

  /* Section 11 — 3-column pricing grid; Pro stays in DOM-center.
     Reset mobile order: cards now appear Free / Pro / Starter
     left-to-right (DOM order). */
  .pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    align-items: stretch;
  }
  .pricing-card--free,
  .pricing-card--pro,
  .pricing-card--starter { order: 0; }

  /* Footer — 4-column grid: brand + 3 nav columns */
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    align-items: start;
  }

  /* Drawer is a tad wider on tablets. */
  .mobile-drawer { width: 380px; }
}


/* =============================================================
   23. Responsive — 901px+ (desktop nav appears, burger hidden)
   ============================================================= */

@media (min-width: 901px) {
  .topstrip-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto 0 32px;
  }
  .topstrip-nav a {
    text-decoration: none;
    color: var(--ink-soft);
    font-size: 15px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 8px;
    transition: color 150ms ease, background 150ms ease;
  }
  .topstrip-nav a:hover {
    color: var(--ink);
    background: var(--bg-soft);
  }

  .topstrip-cta { display: inline-flex; padding: 10px 18px; font-size: 14px; }
  .topstrip-inner { min-height: 72px; }

  .burger { display: none; }

  /* Drawer + backdrop should never appear on desktop, even if a
     transient state desync happens. */
  .mobile-drawer,
  .drawer-backdrop { display: none !important; }
}


/* =============================================================
   24. Responsive — 1025px+ (large desktop)
   ============================================================= */

@media (min-width: 1025px) {
  /* Hero gets a touch more breathing room */
  .hero { padding-top: clamp(56px, 6vw, 80px); }
}


/* =============================================================
   25. prefers-reduced-motion — neutralize animations and
   transitions for users who request reduced motion. Applied last
   so it overrides everything above.
   ============================================================= */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  /* The /decouvrir/ animations early-return on prefers-reduced-motion
     in JS, so no class-level overrides are needed here. */
  .word-stream .w { opacity: 1; transform: none; animation: none; }
}
