/* CyberBrain — landing. Polices auto-hébergées (sous-ensemble latin de Google Fonts, licence OFL) :
   pas de connexion tierce avant d'afficher le titre. Les caractères hors latin (→) retombent sur la police système. */
@font-face { font-family: "Space Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap; src: url("/fonts/space-grotesk-latin.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/inter-latin.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2"); }

:root {
  --bg: #0A1222;
  --panel: #121C33;
  --line: #263553;
  --text: #EEF2F8;
  --muted: #9AA8C2;
  --gold: #E4C170;
  --gold-rgb: 228, 193, 112;
  --red: #FF8A80;
  --warn: #F5B04C;
  --ok: #6FDBA6;

  /* Alias utilisés par le rendu dynamique du scan gratuit (script de index.html). */
  --accent: var(--gold);
  --accent-rgb: var(--gold-rgb);
  --text-muted: var(--muted);
  --text-faint: var(--muted);
  --border: var(--line);
  --risk-low: var(--ok);
  --risk-medium: var(--warn);
  --risk-high: var(--red);
  --risk-critical: var(--red);
  --radius-md: 10px;
  --radius-lg: 16px;

  --font-heading: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --nav-h: 64px;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(38, 53, 83, 0.38) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38, 53, 83, 0.38) 1px, transparent 1px);
  background-size: 54px 54px;
  background-position: center top;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-heading); font-weight: 600; letter-spacing: -0.02em; margin: 0; line-height: 1.12; }
h2 { font-size: clamp(28px, 3.6vw, 44px); max-width: 24ch; }
h3 { font-size: 18px; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--gold); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.wrap { width: min(var(--wrap), 100% - 32px); margin: 0 auto; }
.wrap-narrow { max-width: 820px; }

.eyebrow {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 16px; display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 18px; height: 1px; background: var(--gold); box-shadow: 0 0 8px rgba(var(--gold-rgb), 0.8); }

.todo { color: var(--warn); font-weight: 600; font-size: 13px; }

/* ── Boutons, champs, panneaux ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 10px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px; line-height: 1.25; text-align: center;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-primary { background: var(--gold); color: #10182B; box-shadow: 0 0 0 0 rgba(var(--gold-rgb), 0); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 28px -8px rgba(var(--gold-rgb), 0.6); }
.btn-secondary { background: transparent; color: var(--text); border-color: #3A4C72; }
.btn-secondary:hover { border-color: var(--gold); transform: translateY(-1px); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 14px; }

.input {
  min-height: 48px; padding: 12px 16px; border-radius: 10px;
  background: #0D1629; border: 1px solid #3A4C72; color: var(--text);
  font: inherit; font-size: 15px;
}
.input::placeholder { color: #7D8BA6; }
.input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(var(--gold-rgb), 0.18); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); }

/* ── Navigation ── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--nav-h);
  display: flex; align-items: center; gap: 20px; padding: 0 max(16px, calc((100% - var(--wrap)) / 2));
  border-bottom: 1px solid transparent; transition: background-color 0.25s ease, border-color 0.25s ease;
}
.nav.is-scrolled { background: rgba(10, 18, 34, 0.92); border-bottom-color: var(--line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.nav-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-heading); font-weight: 700; font-size: 18px; color: var(--text); margin-right: auto; }
.nav-brand svg { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links > a:not(.btn) { font-size: 14.5px; color: var(--muted); transition: color 0.2s ease; }
.nav-links > a:not(.btn):hover { color: var(--text); }
.lang-toggle { display: inline-flex; border: 1px solid #3A4C72; border-radius: 999px; padding: 3px; }
.lang-toggle button {
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 500; color: var(--muted);
  background: none; border: 0; border-radius: 999px; padding: 6px 11px; cursor: pointer; min-width: 40px; min-height: 32px;
}
.lang-toggle button.is-active { background: var(--gold); color: #10182B; }
.nav-toggle { display: none; width: 44px; height: 44px; background: none; border: 1px solid #3A4C72; border-radius: 10px; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; }

/* ── Récit au défilement ── */
/* État par défaut (sans JS / mouvement réduit) : tout est visible, empilé, dans l'état final. */
.story { position: relative; }
.story-pin { position: relative; padding: calc(var(--nav-h) + 56px) 0 72px; }
.story.is-playing { height: 460vh; }
.story.is-playing .story-pin {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: flex; align-items: center; padding: var(--nav-h) 0 0;
}

.traces { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.trace { fill: none; stroke: var(--gold); stroke-width: 1.4; stroke-opacity: 0.55; stroke-dasharray: 1; stroke-dashoffset: 0; filter: drop-shadow(0 0 4px rgba(var(--gold-rgb), 0.7)); }

.story-grid {
  position: relative; width: min(var(--wrap), 100% - 32px); margin: 0 auto;
  display: grid; grid-template-columns: 1.02fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center;
}

.story-copy h1 { font-size: clamp(36px, 5vw, 64px); max-width: 15ch; }

.url-field {
  margin-top: 28px; display: flex; align-items: center; gap: 10px; max-width: 440px;
  background: #0D1629; border: 1px solid #3A4C72; border-radius: 12px; padding: 6px 6px 6px 14px;
  font-family: var(--font-mono); font-size: 15px;
}
.url-lock { color: var(--ok); display: inline-flex; }
.url-text { flex: 1; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.url-go { background: var(--gold); color: #10182B; font-family: var(--font-body); font-weight: 600; font-size: 14px; border-radius: 8px; padding: 9px 16px; }

.captions { margin-top: 26px; position: relative; }
.cap { font-size: 17px; line-height: 1.6; color: var(--muted); max-width: 46ch; }
.cap-stage { display: none; }
.cap-cta { margin-top: 24px; }
.cap-n { font-family: var(--font-mono); font-size: 13px; color: var(--gold); margin-right: 8px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-note { margin-top: 14px; font-size: 13.5px; color: var(--muted); }
.scroll-hint { display: none; }

.story.is-playing .captions { min-height: 170px; }
.story.is-playing .cap {
  position: absolute; inset: 0 0 auto 0; display: block; margin: 0;
  opacity: 0; transform: translateY(8px); visibility: hidden;
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s linear 0.35s;
}
.story.is-playing .cap.is-on { opacity: 1; transform: none; visibility: visible; transition: opacity 0.35s ease, transform 0.35s ease, visibility 0s; }
.story.is-playing .scroll-hint {
  display: flex; gap: 8px; align-items: center; font-family: var(--font-mono); font-size: 12.5px; color: var(--muted);
  letter-spacing: 0.06em; text-transform: uppercase; opacity: 0; transition: opacity 0.3s ease;
}
.story.is-playing .scroll-hint.is-on { opacity: 1; }
.scroll-arrow { display: inline-block; color: var(--gold); }
.story.is-playing .scroll-hint.is-on .scroll-arrow { animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }

/* Carte de rapport, anneaux concentriques, bouclier filaire */
.card-stage { position: relative; perspective: 1200px; display: grid; place-items: center; }
.rings { position: absolute; width: 150%; max-width: 760px; aspect-ratio: 1; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; }
.rings circle { fill: none; stroke: var(--line); stroke-width: 1; }
.rings .ring-gold { stroke: rgba(var(--gold-rgb), 0.35); stroke-dasharray: 2 8; }
.shield-wrap { position: absolute; width: 62%; left: 50%; top: 50%; transform: translate(-50%, -50%); perspective: 900px; pointer-events: none; }
.shield { width: 100%; display: block; animation: shield-turn 28s linear infinite; transform-style: preserve-3d; }
.shield path { fill: none; stroke: rgba(var(--gold-rgb), 0.22); stroke-width: 1; }
@keyframes shield-turn { from { transform: rotateY(0deg); } to { transform: rotateY(360deg); } }

.report {
  position: relative; width: 100%; max-width: 480px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(var(--gold-rgb), 0.05);
  transform-style: preserve-3d; will-change: transform; transform-origin: 50% 0;
}
.report-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: 13px; }
.report-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px rgba(var(--gold-rgb), 0.9); flex-shrink: 0; }
.report-url { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-tag { color: var(--muted); font-size: 11.5px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.report-pill { margin-left: auto; color: var(--red); border: 1px solid rgba(255, 138, 128, 0.5); border-radius: 999px; padding: 2px 9px; font-weight: 500; }
.report-progress { height: 2px; background: transparent; }
.report-progress span { display: block; height: 100%; background: var(--gold); box-shadow: 0 0 10px rgba(var(--gold-rgb), 0.8); transform-origin: left; transform: scaleX(1); }
.report-body { position: relative; padding: 16px 18px 18px; overflow: hidden; border-radius: 0 0 18px 18px; }

.scanline { position: absolute; inset: 0; pointer-events: none; opacity: 0; z-index: 2; }
.scanline span { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--gold); box-shadow: 0 0 14px 2px rgba(var(--gold-rgb), 0.75), 0 0 40px 6px rgba(var(--gold-rgb), 0.18); }

.idle { display: none; }
.story.is-playing .idle { display: grid; gap: 10px; align-content: start; position: absolute; inset: 16px 18px 18px; z-index: 1; }
.idle p { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.idle span { height: 38px; border-radius: 10px; border: 1px dashed var(--line); background: rgba(10, 18, 34, 0.4); }
.idle span:nth-child(odd) { width: 88%; }

.checks { display: grid; gap: 8px; }
.check {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(10, 18, 34, 0.55);
  font-size: 14.5px;
}
.check-name { min-width: 0; }
.chip { font-family: var(--font-mono); font-size: 12px; border-radius: 999px; padding: 3px 10px; white-space: nowrap; border: 1px solid; flex-shrink: 0; }
.chip-ok { color: var(--ok); border-color: rgba(111, 219, 166, 0.45); }
.chip-fix { color: var(--red); border-color: rgba(255, 138, 128, 0.5); }
.chip-watch { color: var(--warn); border-color: rgba(245, 176, 76, 0.5); }
.chip-scan { display: none; }
.check.is-scanning .chip { color: var(--muted); border-color: var(--line); }
.check.is-scanning .chip-scan { display: inline; }
.check.is-scanning .chip-verdict { display: none; }

.score { display: flex; align-items: center; gap: 16px; margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.score-ring { width: 64px; height: 64px; flex-shrink: 0; transform: rotate(-90deg); }
.score-track { fill: none; stroke: var(--line); stroke-width: 7; }
.score-arc { fill: none; stroke: var(--red); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 213.63; stroke-dashoffset: 81.18; }
.score-label { font-size: 15px; }
.score-label strong { font-family: var(--font-heading); font-size: 22px; color: var(--red); margin-left: 4px; }
.score-level { font-family: var(--font-mono); font-size: 11.5px; color: var(--red); border: 1px solid rgba(255, 138, 128, 0.5); border-radius: 999px; padding: 1px 8px; margin-left: 4px; vertical-align: 3px; }
.score-hint { font-size: 13px; color: var(--muted); }

.layer-scan { transform-origin: top center; }
.layer-story { margin-top: 14px; }
.chain { border: 1px solid rgba(255, 138, 128, 0.55); background: #1E1C30; border-radius: 12px; padding: 12px 14px; box-shadow: 0 0 30px -12px rgba(255, 138, 128, 0.6); }
.chain-kicker { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--red); }
.chain-text { margin-top: 4px; font-size: 15px; font-weight: 500; }
.chain-crit { color: var(--red); font-weight: 600; }
.fix-title { margin: 14px 0 8px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold); }
.fixes { display: grid; gap: 8px; }
.fix { display: flex; gap: 12px; align-items: flex-start; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #0F182C; }
.fix-n { font-family: var(--font-mono); font-size: 12px; color: #10182B; background: var(--gold); border-radius: 6px; width: 22px; height: 22px; display: grid; place-items: center; flex-shrink: 0; margin-top: 1px; }
.fix-what { display: block; font-size: 14.5px; font-weight: 500; }
.fix-why { display: block; font-size: 12.5px; color: var(--muted); }

/* Mode lecture : les deux couches de la carte se superposent et le défilement les enchaîne. */
.story.is-playing .layer-story { position: absolute; inset: 16px 18px 18px; margin: 0; visibility: hidden; }
.story.is-playing .chain,
.story.is-playing .fix-title,
.story.is-playing .fix,
.story.is-playing .check,
.story.is-playing .score,
.story.is-playing .report-pill { opacity: 0; }
.story.is-playing .trace { stroke-dashoffset: 1; }

/* ── Sections ── */
.section { padding: clamp(72px, 10vw, 120px) 0; }.section-tight { padding: clamp(40px, 6vw, 72px) 0; }

.scan-panel { padding: clamp(24px, 5vw, 48px); max-width: 860px; margin: 0 auto; }
.scan-panel h2 { font-size: clamp(24px, 3vw, 34px); }
.scan-form { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }
.scan-form .input { flex: 1 1 240px; }
.auth-check { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; font-size: 14px; color: var(--muted); cursor: pointer; }
.auth-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--gold); flex-shrink: 0; }

.steps { margin-top: 44px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: none; }
.step { position: relative; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); }
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 46px; right: -21px; width: 22px; height: 1px; background: var(--gold);
  box-shadow: 0 0 8px rgba(var(--gold-rgb), 0.8);
}
.step-n { font-family: var(--font-mono); font-size: 13px; color: var(--gold); display: inline-block; border: 1px solid rgba(var(--gold-rgb), 0.5); border-radius: 999px; padding: 3px 10px; }
.step h3 { margin-top: 18px; font-size: 20px; }
.step p { margin-top: 10px; color: var(--muted); font-size: 15.5px; }

.cat-grid { margin-top: 44px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.cat { background: var(--bg); padding: 26px 24px; transition: background-color 0.2s ease; }
.cat:hover { background: var(--panel); }
.cat-code { font-family: var(--font-mono); font-size: 11.5px; color: var(--gold); letter-spacing: 0.08em; }
.cat h3 { margin-top: 12px; }
.cat p { margin-top: 8px; color: var(--muted); font-size: 15px; }

.numbers { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.number { padding: 22px 24px; border-left: 1px solid var(--gold); background: linear-gradient(90deg, rgba(var(--gold-rgb), 0.06), transparent 60%); }
.number-v { display: block; font-family: var(--font-heading); font-size: clamp(36px, 4.4vw, 52px); font-weight: 600; color: var(--gold); line-height: 1; }
.number-l { display: block; margin-top: 10px; color: var(--muted); font-size: 15px; max-width: 26ch; }

.engine-grid { margin-top: 44px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; }
.engine-steps { display: grid; gap: 0; counter-reset: es; }
.engine-steps li { counter-increment: es; display: grid; grid-template-columns: 52px 120px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.engine-steps li::before { content: "0" counter(es); font-family: var(--font-mono); font-size: 13px; color: var(--gold); padding-top: 2px; }
.es-k { color: var(--text); font-weight: 600; }
.engine-side { display: grid; gap: 24px; }
.quote { margin: 0; }
.quote blockquote { margin: 0; font-family: var(--font-heading); font-size: clamp(22px, 2.4vw, 28px); line-height: 1.3; font-weight: 500; }
.quote figcaption { margin-top: 14px; font-size: 14px; color: var(--muted); }
.code-note { padding: 24px; }
.code-note p:last-child { margin-top: 14px; font-size: 14.5px; color: var(--muted); }
.terminal { margin: 0; padding: 14px 16px; background: #0D1629; border: 1px solid var(--line); border-radius: 10px; font-family: var(--font-mono); font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); }
.t-faint { color: var(--muted); }
.t-red { color: var(--red); font-weight: 500; }

.plans { margin-top: 44px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--panel); }
.plan .btn { margin-top: auto; }
.plan-featured { border-color: rgba(var(--gold-rgb), 0.7); box-shadow: 0 0 0 1px rgba(var(--gold-rgb), 0.25), 0 30px 60px -30px rgba(var(--gold-rgb), 0.35); }
.plan-badge { position: absolute; top: -12px; left: 30px; background: var(--gold); color: #10182B; font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.04em; border-radius: 999px; padding: 3px 10px; }
.plan-k { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.plan-price { font-family: var(--font-heading); font-size: 38px; font-weight: 600; line-height: 1; }
.plan-per { font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--muted); }
.plan-d { color: var(--muted); font-size: 15px; }
.plan-f { display: grid; gap: 8px; font-size: 14.5px; }
.plan-f li { padding-left: 22px; position: relative; }
.plan-f li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 10px; height: 5px; border-left: 1.6px solid var(--ok); border-bottom: 1.6px solid var(--ok); transform: rotate(-45deg); }
.fine { margin-top: 18px; font-size: 13.5px; color: var(--muted); }

.faq { margin-top: 36px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font-family: var(--font-heading); font-size: 18px; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 16px; font-family: var(--font-mono); font-size: 22px; color: var(--gold); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 20px; color: var(--muted); max-width: 64ch; }

.final { padding: clamp(28px, 6vw, 64px); text-align: left; position: relative; overflow: hidden; }
.final::before {
  content: ""; position: absolute; right: -120px; top: -120px; width: 360px; height: 360px; border-radius: 50%;
  border: 1px solid var(--line); box-shadow: 0 0 0 60px rgba(38, 53, 83, 0.12), 0 0 0 120px rgba(38, 53, 83, 0.08); pointer-events: none;
}
.final h2 { position: relative; margin-bottom: 28px; }
.final-or { position: relative; margin-top: 32px; color: var(--muted); max-width: 56ch; }
.final .scan-form { position: relative; max-width: 560px; }

/* ── Pied de page (mentions légales) ── */
.footer {
  padding: 48px 0 64px; display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between;
  font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--line);
}
.footer a { color: var(--text); opacity: 0.85; }
.footer a:hover { color: var(--gold); opacity: 1; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-company { flex-basis: 100%; margin: 4px 0 0; line-height: 1.8; }

/* ── Responsive ── */
@media (max-width: 1000px) {
  .steps, .plans { grid-template-columns: 1fr; max-width: 560px; }
  .step:not(:last-child)::after { top: auto; bottom: -21px; right: auto; left: 46px; width: 1px; height: 22px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .engine-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .nav { gap: 10px; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 18px;
    background: rgba(10, 18, 34, 0.98); border-bottom: 1px solid var(--line);
  }
  .nav-links.is-open { display: flex; }
  .nav-links > a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 16px; color: var(--text); }
  .nav-links .btn { margin-top: 14px; }

  .story-grid { grid-template-columns: 1fr; gap: 28px; }
  .story-copy h1 { max-width: 18ch; }
  .card-stage { max-width: 480px; width: 100%; margin: 0 auto; }

  /* Récit sur mobile : épinglage plus court, titre + légende au-dessus, carte compacte dessous. */
  .story.is-playing { height: 340vh; }
  .story.is-playing .story-pin { align-items: flex-start; padding-top: calc(var(--nav-h) + 12px); }
  .story.is-playing .story-grid { gap: 14px; }
  .story.is-playing .story-copy h1 { font-size: clamp(26px, 7.4vw, 40px); }
  .story.is-playing .eyebrow { margin-bottom: 10px; font-size: 11.5px; }
  /* La carte affiche déjà l'adresse dans son en-tête : le champ factice est masqué pendant le récit. */
  .story.is-playing .url-field { display: none; }
  .story.is-playing .captions { margin-top: 12px; min-height: 116px; }
  .story.is-playing .cap { font-size: 15px; line-height: 1.5; }
  .story.is-playing .cap-cta .btn { min-height: 44px; padding: 9px 14px; font-size: 14px; flex: 1 1 100%; }
  .story.is-playing .cap-cta .cta-row { gap: 8px; }
  .story.is-playing .cap-cta .todo { display: none; }
  .story.is-playing .cta-note { display: none; }
  .story.is-playing .scroll-hint { display: none; }
  .story.is-playing .idle { inset: 10px 12px 12px; gap: 6px; }
  .story.is-playing .idle span { height: 32px; }
  .story.is-playing .rings, .story.is-playing .shield-wrap { display: none; }
  .trace { filter: none; stroke-opacity: 0.4; }
  .story.is-playing .report-body { padding: 10px 12px 12px; }
  .story.is-playing .layer-story { inset: 10px 12px 12px; }
  .story.is-playing .checks { gap: 6px; }
  .story.is-playing .check { padding: 6px 10px; font-size: 13px; gap: 8px; }
  .story.is-playing .chip { font-size: 11px; padding: 2px 8px; }
  .story.is-playing .score { margin-top: 8px; padding: 8px 10px; }
  .story.is-playing .score-ring { width: 48px; height: 48px; }
  .story.is-playing .score-label { font-size: 13.5px; }
  .story.is-playing .score-label strong { font-size: 17px; }
  .story.is-playing .score-hint { font-size: 12px; }
  .story.is-playing .chain { padding: 9px 12px; }
  .story.is-playing .chain-text { font-size: 14px; }
  .story.is-playing .fix-title { margin: 10px 0 6px; }
  .story.is-playing .fixes { gap: 6px; }
  .story.is-playing .fix { padding: 7px 10px; }
  .story.is-playing .fix-what { font-size: 13.5px; }
  .story.is-playing .fix-why { font-size: 12px; }
  .story.is-playing .report-tag { display: none; }
  .story.is-playing .report-head { padding: 10px 12px; }
}

@media (max-width: 560px) {
  .cat-grid, .numbers { grid-template-columns: 1fr; }
  .engine-steps li { grid-template-columns: 36px 1fr; }
  .engine-steps li > span:last-child { grid-column: 2; }
  .report-tag { display: none; }
  .scan-form .btn, .final .cta-row .btn { width: 100%; }
}

/* Très petits écrans en hauteur : on retire la légende explicative pour laisser la place à la carte. */
@media (max-width: 900px) and (max-height: 700px) {
  .story.is-playing .eyebrow { display: none; }
  .story.is-playing .fix-why { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .shield, .scroll-arrow { animation: none; }
  .btn, .cat, .faq summary::after { transition: none; }
}
