/* =============================================================
   AlgoBacktest — Page de vente
   Feuille de styles unique (tokens + base + sections)
   ============================================================= */

/* ---------- Tokens ---------- */
:root {
  /* Fonds */
  --bg: #fafaf7;
  --bg-card: #ffffff;
  --bg-soft: #f3f4f0;
  --bg-tint-green: #ecfdf5;
  --bg-tint-blue:  #eff6ff;
  --bg-pale-green: #9FE1CB;
  --bg-pale-blue:  #B5D4F4;
  /* Texte */
  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-mute: #64748b;
  --ink-faint: #94a3b8;
  /* Couleurs marque */
  --green: #16a34a;
  --green-bright: #22c55e;
  --teal:  #1D9E75;
  --blue:  #3b82f6;
  --blue-2:#378ADD;
  --warn:  #b45309;
  --danger:#b91c1c;
  /* Lignes */
  --line: #e6e7e0;
  --line-soft: #eef0e9;
  /* Accent */
  --accent: var(--green);
  --accent-tint: var(--bg-tint-green);
  /* Typographie (échelle fluide) */
  --t-display: clamp(34px, 5.6vw, 72px);
  --t-h1:      clamp(28px, 4.4vw, 56px);
  --t-h2:      clamp(26px, 3.4vw, 44px);
  --t-h3:      clamp(20px, 2.2vw, 26px);
  --t-lead:    clamp(17px, 1.6vw, 21px);
  --t-body:    16px;
  --t-small:   14px;
  --t-micro:   12px;
  /* Mise en page */
  --container: 1160px;
  --container-narrow: 760px;
  --pad-x: clamp(20px, 4vw, 56px);
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
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;
}
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; line-height: 1.08; font-weight: 700; text-wrap: balance; }
h1 { font-size: var(--t-display); letter-spacing: -0.035em; line-height: 1.02; 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; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
button { font-family: inherit; }
::selection { background: color-mix(in srgb, var(--accent) 25%, transparent); }

/* ---------- Layout ---------- */
.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 { padding: clamp(64px, 9vw, 130px) 0; position: relative; }
section + section { border-top: 1px solid var(--line-soft); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; 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); }
.lede { font-size: var(--t-lead); color: var(--ink-soft); line-height: 1.5; max-width: 64ch; }

/* ---------- Topstrip ---------- */
.topstrip {
  position: sticky; top: 0; z-index: 30; background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
}
.topstrip-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px var(--pad-x); max-width: var(--container); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; font-size: 15px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 22px; height: 22px; border-radius: 5px;
  background: linear-gradient(135deg, var(--green-bright), var(--teal));
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 12px;
}
.topstrip a.back { font-size: 13px; color: var(--ink-mute); text-decoration: none; }
.topstrip a.back:hover { color: var(--ink); }

/* ---------- 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 .12s ease, box-shadow .15s ease, background .15s ease;
  line-height: 1; letter-spacing: -0.005em;
}
.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); }
.btn-arrow { display: inline-block; transition: transform .15s; }
.btn:hover .btn-arrow { transform: translateX(3px); }
.cta-note { font-size: 13px; color: var(--ink-mute); margin-top: 12px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.cta-band {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  padding: 26px 28px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-card);
  margin-top: 32px;
}
.cta-band .cta-note { margin: 0; }
@media (max-width: 640px) { .cta-band { flex-direction: column; align-items: flex-start; } }

/* ---------- Utilities ---------- */
.accent-green { color: var(--green); }
.accent-blue  { color: var(--blue-2); }
.accent-mute  { color: var(--ink-faint); }
.strike-soft { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--danger) 50%, transparent); text-decoration-thickness: 2px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: -0.005em;
}
.pill-green { background: var(--bg-tint-green); color: #166534; }
.pill-blue  { background: var(--bg-tint-blue); color: #1e40af; }
.pill-warn  { background: #fef3c7; color: #854d0e; }

.cycle-word {
  display: inline-block;
  background: var(--bg-tint-green);
  color: #15803d; /* AA-compliant green on bg-tint-green (ratio 4.76) */
  padding: 1px 10px;
  border-radius: 6px;
  font-weight: 700;
  transition: opacity .35s ease, transform .35s ease;
}
.cycle-word.fading { opacity: 0; transform: translateY(-3px); }

/* Reveal-on-scroll : par défaut visible (anti-FOUC, no-JS friendly).
   La classe `is-in` est ajoutée au scroll-in pour transition douce ;
   les éléments hors-écran restent visibles statiquement. */
.reveal { transition: opacity .65s ease, transform .65s ease; }
.reveal.is-in { opacity: 1; transform: translateY(0); }

.ph {
  position: relative; width: 100%; aspect-ratio: 16/10; background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.ph::before {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-linear-gradient(135deg, transparent 0 18px, rgba(0,0,0,0.03) 18px 19px);
}
.ph .ph-label {
  position: relative; font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px; color: var(--ink-mute); letter-spacing: 0.04em;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 4px;
  padding: 5px 10px; max-width: 80%; text-align: center;
}

/* Term avec définition (tooltip natif) */
.term { border-bottom: 1px dashed var(--ink-faint); cursor: help; }

/* Footer */
footer {
  border-top: 1px solid var(--line-soft);
  padding: 36px 0 60px; color: var(--ink-mute); font-size: 13px;
}
footer .row { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
footer a { color: var(--ink-mute); text-decoration: none; }
footer a:hover { color: var(--ink); }
footer .legal { font-size: 12.5px; line-height: 1.55; color: var(--ink-faint); margin-top: 18px; max-width: 80ch; }

section[id] { scroll-margin-top: 70px; }

/* =============================================================
   Sections — styles spécifiques
   ============================================================= */

/* Hero */
.hero { padding-top: clamp(60px, 8vw, 110px); padding-bottom: clamp(60px, 8vw, 100px); }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 1fr;
  gap: clamp(28px, 5vw, 64px); align-items: center;
}
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; gap: 32px; } }
.hero h1 { margin-bottom: 22px; }
.hero h1 .ab { color: var(--green); }
.hero h1 .gpt { color: var(--ink-faint); }
.hero .h2-line {
  font-size: var(--t-lead); color: var(--ink-soft); font-weight: 500;
  line-height: 1.45; margin-bottom: 14px; max-width: 560px; letter-spacing: -0.005em;
}
.hero .h2-line strong { color: var(--ink); font-weight: 700; }
.hero .lede-sub { color: var(--ink-soft); margin-bottom: 28px; max-width: 560px; }
.hero .visual {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 14px; display: grid; grid-template-rows: 1fr 1fr; gap: 12px; aspect-ratio: 5/4;
  min-height: 420px;
}
@media (max-width: 880px) { .hero .visual { aspect-ratio: 4/5; min-height: 380px; } }
.hero .vtile {
  position: relative; border-radius: var(--r-sm); padding: 14px 16px;
  border: 1px solid var(--line); background: var(--bg);
}
.hero .vtile.gen   { background: #fbfbfa; }
.hero .vtile.ml    { background: var(--bg-tint-green); border-color: #c7e8d6; }
.hero .vtile-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.hero .vtile-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); font-weight: 600; }
.hero .vtile-tag .d { width: 6px; height: 6px; border-radius: 50%; }
.hero .vtile-tag.gen .d { background: var(--ink-faint); }
.hero .vtile-tag.ml  .d { background: var(--green); }
.hero .stream {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 12.5px; line-height: 1.7; color: var(--ink); min-height: 78px;
}
.hero .stream::after { content: "▍"; margin-left: 1px; animation: blink 1s steps(2) infinite; color: var(--ink-faint); }
@keyframes blink { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }
.equity-wrap { position: absolute; inset: 38px 12px 28px 12px; }
.equity-wrap svg { width: 100%; height: 100%; display: block; }
.hero .ml-stats {
  display: flex; gap: 14px; font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px; color: var(--ink-mute); margin-top: 4px;
}
.hero .ml-stats b { color: var(--ink); font-weight: 600; }

/* Section 2 — Constat */
.bubbles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 48px; }
@media (max-width: 880px) { .bubbles { grid-template-columns: 1fr; } }
.bubble {
  position: relative; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 14px; padding: 24px; font-size: 16px; line-height: 1.5;
  color: var(--ink); animation: float 7s ease-in-out infinite;
}
.bubble:nth-child(2) { animation-delay: 1.5s; }
.bubble:nth-child(3) { animation-delay: 3s; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.bubble::before { content: ""; position: absolute; left: 24px; bottom: -10px; width: 18px; height: 18px; background: var(--bg-card); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg); }
.bubble .who { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.bubble .who .av { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, #cbd5e1, #94a3b8); flex-shrink: 0; }
.bubble .who .meta { font-size: 12.5px; color: var(--ink-mute); }
.bubble .who .meta b { color: var(--ink); font-weight: 600; }
.transition-line { font-size: clamp(22px, 3vw, 32px); font-weight: 700; text-align: center; margin-top: 56px; letter-spacing: -0.025em; }
.transition-line .arrow { display: inline-block; margin-left: 10px; color: var(--accent); }

/* Section 3 — Révélation */
.reveal-section { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%); }
.reveal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-top: 48px; position: relative; }
@media (max-width: 880px) { .reveal-grid { grid-template-columns: 1fr; gap: 24px; } }
.reveal-grid::before {
  content: ""; position: absolute; left: 50%; top: 4%; bottom: 4%; width: 1px;
  background: linear-gradient(180deg, transparent, var(--line) 20%, var(--line) 80%, transparent);
}
@media (max-width: 880px) { .reveal-grid::before { display: none; } }
.col-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px; display: flex; flex-direction: column; gap: 16px;
}
.col-card.gen { background: var(--bg-tint-blue); border-color: #cdddf2; }
.col-card.ml  { background: var(--bg-tint-green); border-color: #c7e8d6; }
.col-card .col-head { display: flex; align-items: center; gap: 12px; }
.col-card .col-icon { width: 36px; height: 36px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.col-card.gen .col-icon { background: rgba(59,130,246,0.12); color: var(--blue-2); }
.col-card.ml  .col-icon { background: rgba(22,163,74,0.12); color: var(--green); }
.col-card .col-sub { font-size: 13px; color: var(--ink-soft); font-weight: 500; }
.col-card h3 { letter-spacing: -0.018em; }
.col-card .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; }
.col-card .row-fact:first-of-type { border-top: 1px solid rgba(0,0,0,0.08); padding-top: 14px; margin-top: 4px; }
.col-card .row-fact b { color: var(--ink); font-weight: 600; }
.col-card .row-fact .label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-mute); padding-top: 2px; }
.col-card .verdict {
  margin-top: 6px; padding: 14px 16px; border-radius: 8px; font-weight: 600; line-height: 1.4; font-size: 15px;
}
.col-card.gen .verdict { background: rgba(59,130,246,0.10); color: #1e40af; }
.col-card.ml  .verdict { background: rgba(22,163,74,0.12); color: #166534; }

.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;
}
.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; }

.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); }

.reveal-foot {
  margin-top: 32px; font-size: 14.5px; color: var(--ink-soft); line-height: 1.6;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px 24px;
}
.reveal-foot b { color: var(--ink); }

/* Section 4 — Pipeline */
.pipeline {
  position: relative; margin-top: 56px; display: grid;
  grid-template-columns: repeat(5, 1fr); gap: 18px;
}
@media (max-width: 980px) { .pipeline { grid-template-columns: 1fr; gap: 16px; } }
.step {
  position: relative; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 22px 18px; min-height: 240px;
  display: flex; flex-direction: column; gap: 10px;
  opacity: 0.45; transform: translateY(8px); transition: opacity .45s ease, transform .45s ease, border-color .3s ease, box-shadow .3s ease;
}
.step.is-in { opacity: 1; transform: translateY(0); border-color: var(--green); box-shadow: 0 12px 24px -16px rgba(22,163,74,0.45); }
.step .num {
  width: 28px; height: 28px; border-radius: 50%; background: var(--bg-soft); color: var(--ink-mute);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
}
.step.is-in .num { background: var(--green); color: #fff; }
.step h3 { font-size: 16px; line-height: 1.25; margin: 0; font-weight: 700; letter-spacing: -0.012em; }
.step p { font-size: 13px; color: var(--ink-mute); line-height: 1.5; }
.step .mini { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line-soft); font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--ink-mute); }

.pipeline-line { position: absolute; top: 36px; left: 6%; right: 6%; height: 2px; pointer-events: none; }
@media (max-width: 980px) { .pipeline-line { display: none; } }
.pipeline-line svg { width: 100%; height: 100%; overflow: visible; }
.pipeline-line path { stroke: var(--green); stroke-width: 2; fill: none; stroke-dasharray: 6 6; stroke-dashoffset: 200; transition: stroke-dashoffset 1.6s ease; }
.pipeline.is-active .pipeline-line path { stroke-dashoffset: 0; }
.pipeline-foot { margin-top: 28px; color: var(--ink-soft); font-size: 15px; max-width: 70ch; line-height: 1.6; }

/* Section 5 — Outputs */
.outputs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; }
@media (max-width: 980px) { .outputs-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .outputs-grid { grid-template-columns: 1fr; } }
.output-tile {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.output-tile:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--green) 40%, var(--line)); box-shadow: 0 14px 28px -22px rgba(0,0,0,0.25); }
.output-tile .ph { aspect-ratio: 16/10; border: none; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
.output-tile .body { padding: 16px 18px 20px; }
.output-tile h3 { font-size: 15.5px; line-height: 1.25; letter-spacing: -0.012em; margin-bottom: 6px; }
.output-tile p { font-size: 13.5px; color: var(--ink-mute); line-height: 1.5; }
.outputs-foot { margin-top: 28px; font-size: 15px; color: var(--ink-soft); }

/* Section 6 — Transparence */
.transparency {
  background: linear-gradient(180deg, #f8faf6 0%, #eff5ee 100%);
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
}
.transparency .narrow { max-width: 1100px; }
.transparency h2 { max-width: 24ch; }
.tx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin-top: 50px; }
@media (max-width: 880px) { .tx-grid { grid-template-columns: 1fr; } }
.tx-card { background: var(--bg-card); border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.tx-card.win  { background: #f1faf3; border-color: #cbe9d4; }
.tx-card.lose { background: #fbf3f2; border-color: #ecd0cd; }
.tx-card .ph { aspect-ratio: 16/10; border: none; border-radius: 0; border-bottom: 1px solid var(--line-soft); background: #fff; }
.tx-card .body { padding: 22px 24px 24px; }
.tx-card .pill { margin-bottom: 12px; }
.tx-card h3 { font-size: 19px; line-height: 1.3; margin-bottom: 10px; }
.tx-card .num-big { font-family: 'JetBrains Mono', monospace; font-size: 36px; font-weight: 700; letter-spacing: -0.025em; line-height: 1; margin: 8px 0 4px; }
.tx-card.win  .num-big { color: #166534; }
.tx-card.lose .num-big { color: #991b1b; }
.tx-card .desc { font-size: 14px; color: var(--ink-soft); line-height: 1.55; }
.tx-callout {
  margin-top: 32px; padding: 22px 26px; border-radius: var(--r-md);
  background: var(--bg-card); border: 1px solid var(--line);
  font-size: 16px; line-height: 1.55; color: var(--ink);
}
.tx-callout b { font-weight: 700; }
.tx-tag { font-size: 14px; color: var(--ink-mute); margin-top: 18px; font-style: italic; }

/* Section 7 — Strategy Finder */
.sf-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin-top: 40px; }
@media (max-width: 980px) { .sf-wrap { grid-template-columns: 1fr; } }
.sf-text p { font-size: 17px; line-height: 1.6; color: var(--ink-soft); margin-bottom: 18px; }
.sf-text p.small { font-size: 15px; color: var(--ink-mute); margin-bottom: 24px; }
.sf-anim {
  position: relative; height: 360px; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--r-md); overflow: hidden; padding: 8px;
}
.sf-card {
  position: absolute; left: 50%; top: 50%; width: 84px; height: 54px; border-radius: 6px;
  background: var(--bg); border: 1px solid var(--line); transform: translate(-50%, -50%);
  box-sizing: border-box;
  font-family: 'JetBrains Mono', monospace; font-size: 9.5px; color: var(--ink-mute);
  padding: 6px 8px; line-height: 1.3;
  transition: all 1.6s cubic-bezier(.2,.7,.2,1);
}
.sf-card.sel { background: var(--bg-tint-green); border-color: var(--green); color: #166534; }
.sf-card.bad { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.sf-legend {
  position: absolute; left: 16px; bottom: 14px; font-size: 11px; color: var(--ink);
  font-family: 'JetBrains Mono', monospace; background: rgba(255,255,255,0.92);
  border: 1px solid var(--line); border-radius: 4px; padding: 4px 8px; z-index: 20;
}
@media (max-width: 520px) {
  .sf-anim { height: 320px; }
  .sf-card { width: 70px; height: 48px; font-size: 8.5px; }
}

/* Section 8 — Assistant */
.ai-wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: 40px; align-items: center; margin-top: 36px; }
@media (max-width: 980px) { .ai-wrap { grid-template-columns: 1fr; } }
.chat-stack { display: flex; flex-direction: column; gap: 12px; }
.chat-bubble {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 18px; font-size: 14.5px; max-width: 90%; line-height: 1.5;
}
.chat-bubble.user { background: var(--bg-tint-blue); border-color: #cdddf2; color: #1e40af; align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-note {
  margin-top: 24px; padding: 16px 20px; background: var(--bg-soft); border-left: 3px solid var(--green);
  border-radius: 4px; font-size: 13px; color: var(--ink-soft); line-height: 1.55;
}
.ai-figcap { font-size: 14px; color: var(--ink-mute); margin-top: 12px; font-style: italic; }

/* Section 9 — Story */
.story { background: var(--bg-soft); }
.story p { font-size: 17px; line-height: 1.65; color: var(--ink); max-width: 60ch; margin-bottom: 16px; }
.story-body { margin-top: 28px; }

/* Section 10 — Soyons clairs */
.clarify-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 40px; }
@media (max-width: 880px) { .clarify-grid { grid-template-columns: 1fr; } }
.clar-card { padding: 28px; border-radius: var(--r-lg); border: 1px solid var(--line); }
.clar-card.no  { background: var(--bg-soft); }
.clar-card.no  ul li { color: var(--ink-mute); text-decoration: line-through; text-decoration-color: rgba(148,163,184,0.5); text-decoration-thickness: 1.5px; }
.clar-card.yes { background: var(--bg-tint-green); border-color: #c7e8d6; }
.clar-card h3 { margin-bottom: 18px; font-size: 19px; }
.clar-card.no  h3 { color: var(--ink-mute); }
.clar-card.yes h3 { color: #166534; }
.clar-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.clar-card li { padding-left: 28px; position: relative; font-size: 15px; line-height: 1.5; }
.clar-card.yes li::before { content: ""; position: absolute; left: 0; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--green); background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>"); background-size: 13px; background-repeat: no-repeat; background-position: center; }
.clar-card.no  li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 12px; height: 2px; background: var(--ink-faint); border-radius: 1px; }

/* Section 11 — Tarifs */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 40px; }
@media (max-width: 980px) { .pricing-grid { grid-template-columns: 1fr; } }
.price-card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px;
  display: flex; flex-direction: column; gap: 16px; position: relative;
}
.price-card.featured { background: linear-gradient(180deg, #f1faf3 0%, #ffffff 60%); border-color: var(--green); box-shadow: 0 24px 50px -28px rgba(22,163,74,0.3); }
.price-card .badge {
  position: absolute; top: -12px; left: 24px; padding: 5px 12px; border-radius: 999px;
  background: var(--green); color: #fff; font-size: 12px; font-weight: 600; letter-spacing: -0.005em;
}
.price-card h3 { font-size: 18px; }
.price-amt { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-amt .num { font-size: 38px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.price-amt .strike { color: var(--ink-faint); text-decoration: line-through; font-size: 18px; }
.price-amt .per { color: var(--ink-mute); font-size: 14px; }
.price-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; font-size: 14px; }
.price-card li { padding-left: 22px; position: relative; color: var(--ink); line-height: 1.45; }
.price-card li::before { content: ""; position: absolute; left: 0; top: 6px; width: 14px; height: 14px; background: var(--green); border-radius: 50%; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>"); background-size: 10px; background-repeat: no-repeat; background-position: center; }
.price-card .soon { font-size: 12px; color: var(--ink-mute); font-style: italic; }
.pricing-foot {
  margin-top: 32px; padding: 22px 26px; border-radius: var(--r-md); background: var(--bg-tint-green);
  border: 1px solid #c7e8d6; text-align: center; font-size: 16px; font-weight: 600; color: #166534;
}

/* Section 12 — FAQ */
.faq { background: var(--bg-soft); }
.faq-list { margin-top: 40px; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 20px 22px; cursor: pointer; font-size: 16.5px; font-weight: 600; letter-spacing: -0.012em;
  background: none; border: none; width: 100%; text-align: left; color: var(--ink); font-family: inherit;
}
.faq-q:hover { background: rgba(0,0,0,0.02); }
.faq-q .chev { width: 20px; height: 20px; transition: transform .25s ease; flex-shrink: 0; color: var(--ink-mute); display: inline-flex; align-items: center; justify-content: center; }
.faq-item.open .faq-q .chev { transform: rotate(180deg); color: var(--green); }
.faq-a {
  padding: 0 22px; max-height: 0; overflow: hidden; transition: max-height .35s ease, padding .35s ease;
  font-size: 15px; color: var(--ink-soft); line-height: 1.6;
}
.faq-item.open .faq-a { padding: 0 22px 22px; max-height: 600px; }

/* Section 13 — Final CTA */
.final-cta { background: linear-gradient(180deg, var(--bg) 0%, #ecfdf5 100%); text-align: center; }
.final-cta h2 { max-width: 22ch; margin: 0 auto 16px; font-size: clamp(28px, 4vw, 48px); }
.final-cta .sub { max-width: 50ch; margin: 0 auto 32px; color: var(--ink-soft); font-size: 17px; }
.final-cta .btn-primary { padding: 20px 36px; font-size: 17px; }
.final-cta .legal-mini { max-width: 60ch; margin: 36px auto 0; color: var(--ink-mute); font-size: 12.5px; line-height: 1.55; }

/* =============================================================
   Email capture form (hero) — porté de la home, retracé sur
   les tokens du design system /decouvrir/
   ============================================================= */
.email-form-wrap {
  max-width: 480px; margin-top: 22px;
  transition: opacity .3s ease .15s, max-height .4s ease;
  max-height: 360px; overflow: hidden;
}
.email-form-wrap.hero-collapsed { opacity: 0; max-height: 0; pointer-events: none; }
.email-form { display: flex; gap: 8px; flex-wrap: wrap; }
.email-form input[type="email"] {
  flex: 1; min-width: 220px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--bg-card); color: var(--ink);
  font-family: inherit; font-size: 15px; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.email-form input[type="email"]::placeholder { color: var(--ink-faint); }
.email-form input[type="email"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.email-form .btn-primary { padding: 14px 22px; font-size: 15px; }
.newsletter-checkbox {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  font-size: 13px; color: var(--ink-mute); cursor: pointer;
}
.newsletter-checkbox input[type="checkbox"] {
  width: 14px; height: 14px; accent-color: var(--accent); cursor: pointer;
}
.form-message { margin-top: 10px; font-size: 13px; min-height: 18px; }
.form-message.success { color: var(--green); font-weight: 600; }
.form-message.error   { color: var(--danger); }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; overflow: hidden; }

/* =============================================================
   Variante .ph--filled : conteneur d'image réelle (sections 5/6/8)
   Neutralise le motif hachuré et la aspect-ratio forcée.
   ============================================================= */
.ph.ph--filled {
  aspect-ratio: auto;
  padding: 0;
  background: var(--bg-card);
  border-color: var(--line-soft);
}
.ph.ph--filled::before { display: none; }
.ph.ph--filled img {
  display: block; width: 100%; height: auto;
  border-radius: inherit;
}

/* =============================================================
   Accessibility : prefers-reduced-motion
   Coupe les animations cycliques et raccourcit les transitions.
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { transition: none !important; opacity: 1 !important; transform: none !important; }
  .step { opacity: 1 !important; transform: none !important; }
  .cycle-word.fading { opacity: 1 !important; transform: none !important; }
  .bubble { animation: none !important; }
  .hero .stream::after { animation: none !important; opacity: 1 !important; }
}

/* =============================================================
   Lightbox — clic sur une image .ph--filled pour l'agrandir.
   Vanille, sans dépendance. Caption = alt text.
   ============================================================= */

/* Indicateur "click to zoom" sur les images cliquables */
.ph--filled { position: relative; }
.ph--filled img { cursor: zoom-in; transition: filter .2s ease; }
.ph--filled:hover img,
.ph--filled:focus-within img { filter: brightness(0.96); }
.ph--filled::after {
  content: ""; position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(15, 23, 42, 0.55) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/><line x1='11' y1='8' x2='11' y2='14'/><line x1='8' y1='11' x2='14' y2='11'/></svg>") center / 16px no-repeat;
  opacity: 0; transition: opacity .2s ease; pointer-events: none;
}
.ph--filled:hover::after,
.ph--filled:focus-within::after { opacity: 1; }

/* Overlay */
.lb-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 23, 42, 0.85);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 20px; opacity: 0;
  transition: opacity .2s ease;
}
.lb-overlay[hidden] { display: none; }
.lb-overlay.lb-active { opacity: 1; }
.lb-overlay img {
  max-width: 95vw; max-height: 90vh;
  object-fit: contain; display: block;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border-radius: var(--r-md);
}
.lb-close {
  position: absolute; top: 16px; right: 16px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.95); border: none; cursor: pointer;
  font-size: 22px; line-height: 1; color: #0f172a; font-family: inherit;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s ease;
}
.lb-close:hover { background: #fff; }
.lb-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.lb-caption {
  color: #fff; opacity: 0.85;
  font-size: 14px; font-family: inherit; text-align: center;
  margin-top: 12px; max-width: 95vw; line-height: 1.4;
}
.lb-caption:empty { display: none; }

body.lb-open { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .lb-overlay { transition: none !important; }
  .ph--filled img,
  .ph--filled::after { transition: none !important; }
}
