/* ============================================================
   SnoopDocs — design system « Document médical tamponné »
   Le cachet bordeaux (cachet du médecin / APTE) est l'objet de marque.
   Mobile-first · zéro framework · OKLCH · cf. DESIGN.md
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700;12..96,800&family=Hanken+Grotesk:wght@400;500;600;700&family=Spline+Sans+Mono:wght@500;600&display=swap');

:root {
  /* ─ Couleur (OKLCH) ─ */
  --night:    oklch(0.27 0.055 258);
  --night-2:  oklch(0.18 0.05 262);
  --ink:      oklch(0.24 0.035 258);
  --bg:       oklch(0.985 0.004 250);
  --surface:  #ffffff;
  --surface-2: oklch(0.975 0.006 250);
  --brand:    oklch(0.48 0.14 256);
  --brand-strong: oklch(0.40 0.13 258);
  --seal:     oklch(0.50 0.15 24);
  --seal-strong: oklch(0.44 0.15 25);
  --muted:    oklch(0.50 0.02 256);
  --line:     oklch(0.91 0.008 250);
  --line-strong: oklch(0.85 0.01 250);
  --success:  oklch(0.62 0.13 155);
  --warning:  oklch(0.70 0.13 70);
  --error:    oklch(0.58 0.18 22);

  /* aliases hérités (funnel / pages existantes) */
  --text: var(--ink);
  --text-soft: oklch(0.42 0.025 258);
  --text-mute: var(--muted);
  --bg-soft: var(--surface-2);
  --bg-card: var(--surface);
  --border: var(--line);
  --brand-dark: var(--brand-strong);
  --brand-light: oklch(0.58 0.13 252);

  /* ─ Espacement 4pt ─ */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --space-9: 96px;

  /* ─ Forme ─ */
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px oklch(0.24 0.035 258 / 0.05), 0 2px 6px oklch(0.24 0.035 258 / 0.06);
  --shadow-md: 0 6px 16px oklch(0.24 0.035 258 / 0.08), 0 14px 38px oklch(0.24 0.035 258 / 0.10);
  --shadow-night: 0 18px 50px oklch(0.18 0.05 262 / 0.40);

  /* ─ Type ─ */
  --font: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Bricolage Grotesque', var(--font);
  --font-mono: 'Spline Sans Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --max-w: 1120px;

  /* ─ Motion ─ */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --z-sticky: 50; --z-modal: 100; --z-toast: 150;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
::selection { background: var(--seal); color: #fff; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
p { text-wrap: pretty; }

/* ─── Layout ─── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section--soft { background: var(--surface-2); }
.section__head { max-width: 640px; margin-bottom: clamp(28px, 4vw, 44px); }
.section h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); line-height: 1.1; margin: 0 0 12px; }
.section__head p { font-size: 1.05rem; color: var(--text-soft); margin: 0; max-width: 60ch; }

/* ─── Nav ─── */
.nav {
  background: oklch(0.985 0.004 250 / 0.82);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: var(--z-sticky);
}
.nav__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 66px; gap: 16px;
}
.nav__brand {
  font-family: var(--font-display);
  font-weight: 800; font-size: 21px; color: var(--ink);
  letter-spacing: -0.03em; display: inline-flex; align-items: center; gap: 8px;
}
.nav__brand:hover { text-decoration: none; }
.nav__brand b { color: var(--seal); font-weight: 800; }
.nav__brand .nav__mark { color: var(--seal); }
.nav__links { display: flex; gap: 22px; align-items: center; }
.nav__links a { color: var(--text-soft); font-size: 14.5px; font-weight: 500; }
.nav__links a:hover { color: var(--ink); text-decoration: none; }
.nav__lang {
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 5px 12px; font-size: 13px; color: var(--text-soft); font-weight: 600;
}
.nav__lang:hover { border-color: var(--brand); color: var(--brand); }

/* ─── Hero (drench bleu nuit) ─── */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(120% 120% at 80% 0%, var(--night) 0%, var(--night-2) 70%);
  color: #fff;
  padding: clamp(56px, 9vw, 104px) 0 clamp(64px, 9vw, 112px);
}
.hero::before { /* grain de lignes de vol en filigrane */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background:
    radial-gradient(2px 2px at 18% 30%, oklch(1 0 0 / 0.5), transparent 60%),
    radial-gradient(1.5px 1.5px at 70% 22%, oklch(1 0 0 / 0.35), transparent 60%),
    radial-gradient(1.5px 1.5px at 88% 60%, oklch(1 0 0 / 0.3), transparent 60%),
    radial-gradient(1.5px 1.5px at 40% 75%, oklch(1 0 0 / 0.25), transparent 60%);
}
.hero .container { position: relative; }
.hero__grid {
  display: grid; gap: clamp(32px, 5vw, 56px);
  grid-template-columns: 1fr;
  align-items: center;
}
@media (min-width: 900px) { .hero__grid { grid-template-columns: 1.05fr 0.95fr; } }

.hero__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: 0.01em;
  color: oklch(0.9 0.03 250); background: oklch(1 0 0 / 0.08);
  border: 1px solid oklch(1 0 0 / 0.14); border-radius: 999px;
  padding: 6px 14px; margin: 0 0 20px;
}
.hero__eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px oklch(0.62 0.13 155 / 0.3); }
.hero h1 {
  font-size: clamp(2.1rem, 6vw, 3.9rem); line-height: 1.04; margin: 0 0 18px;
  letter-spacing: -0.03em; font-weight: 800; color: #fff;
}
.hero h1 em { font-style: normal; color: oklch(0.82 0.09 30); } /* "24 h" en bordeaux clair */
.hero p.lead {
  font-size: clamp(1.02rem, 2.2vw, 1.2rem); color: oklch(0.88 0.02 250);
  margin: 0 0 28px; max-width: 30em; line-height: 1.55;
}
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero__trust {
  margin-top: 22px; display: flex; flex-wrap: wrap; gap: 14px 22px;
  font-size: 13.5px; color: oklch(0.82 0.02 250);
}
.hero__trust span { display: inline-flex; align-items: center; gap: 7px; }
.hero__trust svg { width: 16px; height: 16px; color: var(--success); flex: 0 0 auto; }

/* carte d'embarquement / ticket dans le hero */
.boarding {
  background: var(--surface); color: var(--ink);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-night);
  overflow: hidden; position: relative;
}
.boarding__top { padding: 22px 24px 18px; }
.boarding__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.boarding__label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.boarding__city { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -0.02em; }
.boarding__path { flex: 1; position: relative; height: 24px; min-width: 60px; }
.boarding__path::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 0; border-top: 2px dashed var(--line-strong); }
.boarding__path svg { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 22px; height: 22px; color: var(--brand); background: var(--surface); }
.boarding__meta { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 20px; }
.boarding__meta div { display: flex; flex-direction: column; gap: 3px; }
.boarding__meta .v { font-family: var(--font-mono); font-size: 13.5px; font-weight: 600; color: var(--ink); }
.boarding__tear {
  border-top: 2px dashed var(--line-strong); position: relative;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; background: var(--surface-2);
}
.boarding__tear::before, .boarding__tear::after {
  content: ""; position: absolute; top: -11px; width: 22px; height: 22px;
  border-radius: 50%; background: var(--night-2);
}
.boarding__tear::before { left: -11px; }
.boarding__tear::after { right: -11px; }
.boarding__price { display: flex; align-items: baseline; gap: 8px; }
.boarding__price .amount { font-family: var(--font-display); font-size: 30px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.boarding__price .unit { font-size: 13px; color: var(--muted); }
.boarding__seal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  border: 2px solid var(--seal); color: var(--seal);
  font-size: 10px; font-weight: 700; text-align: center; line-height: 1.05;
  transform: rotate(-9deg); letter-spacing: 0.02em;
}

/* ─── Boutons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--font); font-size: 15.5px; font-weight: 600;
  padding: 14px 24px; border-radius: 999px;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform 0.12s var(--ease-out), background 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  text-decoration: none; line-height: 1;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: var(--seal); color: #fff; box-shadow: 0 6px 18px oklch(0.50 0.15 24 / 0.32); }
.btn--primary:hover { background: var(--seal-strong); color: #fff; box-shadow: 0 10px 26px oklch(0.50 0.15 24 / 0.40); }
.btn--secondary { background: var(--brand); color: #fff; }
.btn--secondary:hover { background: var(--brand-strong); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink); }
.hero .btn--ghost { color: #fff; border-color: oklch(1 0 0 / 0.3); }
.hero .btn--ghost:hover { background: oklch(1 0 0 / 0.1); border-color: #fff; }
.btn--lg { font-size: 16.5px; padding: 17px 32px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ─── Cards ─── */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm);
}
.card--soft { background: var(--surface-2); border-color: transparent; box-shadow: none; }
.card h3 { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.card p { margin: 0; color: var(--text-soft); font-size: 14.5px; }

/* ─── « Comment ça marche » : timeline 1→4 ─── */
.flow { display: grid; gap: 4px; margin-top: 8px; }
.flow__step {
  display: grid; grid-template-columns: auto 1fr; gap: 18px;
  padding: 18px 0; position: relative;
}
.flow__rail { display: flex; flex-direction: column; align-items: center; }
.flow__num {
  display: inline-flex; width: 38px; height: 38px; flex: 0 0 38px;
  align-items: center; justify-content: center;
  background: var(--surface); color: var(--brand);
  border: 1.5px solid var(--brand); border-radius: 50%;
  font-family: var(--font-mono); font-weight: 600; font-size: 15px;
}
.flow__step:last-child .flow__line { display: none; }
.flow__line { width: 2px; flex: 1; background: linear-gradient(var(--line-strong), var(--line)); margin: 6px 0 -18px; min-height: 22px; }
.flow__body { padding-top: 6px; }
.flow__body h3 { margin: 0 0 4px; font-size: 18px; }
.flow__body p { margin: 0; color: var(--text-soft); font-size: 14.5px; max-width: 52ch; }
.flow__tag { display: inline-block; font-size: 12px; font-weight: 600; color: var(--seal); background: oklch(0.50 0.15 24 / 0.08); padding: 2px 9px; border-radius: 999px; margin-top: 7px; }

/* ─── Pricing ─── */
.price-grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .price-grid { grid-template-columns: 1fr 1fr; } }
.price-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 26px 26px 28px; position: relative;
  box-shadow: var(--shadow-sm);
}
.price-card--feature { border-color: var(--brand); box-shadow: var(--shadow-md); }
.price-card__badge {
  position: absolute; top: -12px; left: 26px;
  background: var(--brand); color: #fff; font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: 999px;
}
.price-card h3 { margin: 0 0 6px; font-size: 19px; }
.price-card .price { display: flex; align-items: baseline; gap: 7px; margin: 6px 0 14px; }
.price-card .price .amount { font-family: var(--font-display); font-size: 38px; font-weight: 800; letter-spacing: -0.02em; }
.price-card .price .unit { font-size: 13.5px; color: var(--muted); }
.price-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.price-list li { display: grid; grid-template-columns: auto 1fr; gap: 10px; font-size: 14.5px; color: var(--text-soft); align-items: start; }
.price-list svg { width: 18px; height: 18px; color: var(--success); margin-top: 1px; }

/* ─── Note frais d'étude (ex-.warning, sans side-stripe) ─── */
.warning, .notice {
  background: oklch(0.70 0.13 70 / 0.09); border: 1px solid oklch(0.70 0.13 70 / 0.35);
  border-radius: var(--radius); padding: 16px 18px;
  font-size: 14px; color: oklch(0.38 0.07 70); display: grid; grid-template-columns: auto 1fr; gap: 12px;
}
.warning svg, .notice svg { width: 20px; height: 20px; color: var(--warning); margin-top: 1px; }
.warning strong, .notice strong { color: oklch(0.30 0.07 70); }

/* ─── Bandeau confiance ─── */
.assure { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.assure__item { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.assure__ic { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: oklch(0.48 0.14 256 / 0.10); color: var(--brand); }
.assure__ic svg { width: 22px; height: 22px; }
.assure__item h3 { margin: 2px 0 4px; font-size: 16px; }
.assure__item p { margin: 0; font-size: 14px; color: var(--text-soft); }

/* ─── Footer ─── */
.footer {
  background: radial-gradient(120% 140% at 20% 0%, var(--night) 0%, var(--night-2) 75%);
  color: oklch(0.84 0.02 250);
  padding: clamp(48px, 7vw, 72px) 0 40px; font-size: 14px; margin-top: clamp(64px, 9vw, 104px);
}
.footer a { color: #fff; }
.footer__cols { display: grid; gap: 28px; grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 680px) { .footer__cols { grid-template-columns: 1fr 1fr; } }
.footer__brand { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: #fff; letter-spacing: -0.03em; margin: 0 0 10px; }
.footer__brand b { color: oklch(0.78 0.1 30); }
.footer h4 { color: #fff; margin: 0 0 12px; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.8; }
.footer p { margin: 0 0 7px; line-height: 1.5; }
.footer__legal { margin-top: 28px; padding-top: 20px; border-top: 1px solid oklch(1 0 0 / 0.12); font-size: 12.5px; color: oklch(0.74 0.02 250); display: flex; flex-wrap: wrap; gap: 8px 18px; }

/* ─── Wizard / Form (API funnel préservée) ─── */
.wizard { max-width: 720px; margin: 32px auto; padding: 0 20px; }
.wizard__steps { display: flex; gap: 8px; margin-bottom: 24px; }
.wizard__steps .pill { flex: 1; height: 6px; border-radius: 3px; background: var(--line); transition: background 0.2s ease; }
.wizard__steps .pill.active { background: var(--brand); }
.wizard__steps .pill.done { background: var(--brand-light); }

.step {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm);
}
.step h2 { margin: 0 0 4px; font-size: 22px; font-weight: 700; }
.step .step__hint { margin: 0 0 24px; color: var(--text-soft); font-size: 14px; }
.step[hidden] { display: none; }

/* numéro d'étape hérité (.step__num utilisé hors flow) */
.step__num {
  display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; border-radius: 50%; font-weight: 700; margin-bottom: 12px;
  font-family: var(--font-mono);
}

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--ink); }
.field .help { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.field input[type=text], .field input[type=email], .field input[type=tel],
.field input[type=date], .field input[type=number], .field select, .field textarea {
  width: 100%; font: inherit; font-size: 15px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px oklch(0.48 0.14 256 / 0.16);
}
.field textarea { min-height: 100px; resize: vertical; }
.field input[aria-invalid="true"] { border-color: var(--error); }
.field .err { color: var(--error); font-size: 12px; margin-top: 4px; display: none; }
.field input[aria-invalid="true"] + .err { display: block; }
.field--row { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
@media (max-width: 540px) { .field--row { grid-template-columns: 1fr; } }

.checkbox {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 14px 16px; background: var(--surface-2);
  border-radius: var(--radius-sm); border: 1px solid var(--line);
}
.checkbox input[type=checkbox] { margin-top: 2px; flex: 0 0 18px; width: 18px; height: 18px; accent-color: var(--seal); }
.checkbox label { font-size: 14px; line-height: 1.5; }

.wizard__nav { display: flex; gap: 12px; margin-top: 24px; justify-content: space-between; }
.wizard__nav .btn--ghost { flex: 0 0 auto; }
.wizard__nav .btn--primary { flex: 1; }

/* ─── Summary récap ─── */
.summary { display: grid; gap: 8px; margin-bottom: 18px; }
.summary__row {
  display: grid; grid-template-columns: 180px 1fr; gap: 12px;
  padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px;
}
.summary__row:last-child { border-bottom: 0; }
.summary__row .k { color: var(--muted); }

/* ─── Alert / toast ─── */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; }
.alert--error { background: oklch(0.58 0.18 22 / 0.10); color: oklch(0.40 0.16 22); border: 1px solid oklch(0.58 0.18 22 / 0.30); }
.alert--success { background: oklch(0.62 0.13 155 / 0.12); color: oklch(0.38 0.11 155); border: 1px solid oklch(0.62 0.13 155 / 0.30); }
.alert--info { background: oklch(0.48 0.14 256 / 0.10); color: var(--brand-strong); border: 1px solid oklch(0.48 0.14 256 / 0.28); }

/* ─── Merci ─── */
.thanks { max-width: 560px; margin: clamp(48px,8vw,80px) auto; padding: 0 20px; text-align: center; }
.thanks__check {
  display: inline-flex; width: 68px; height: 68px; background: var(--success); color: #fff;
  border-radius: 50%; align-items: center; justify-content: center; font-size: 32px; margin-bottom: 20px;
}
.thanks h1 { font-size: clamp(1.6rem, 4vw, 2rem); margin: 0 0 12px; }
.thanks p { color: var(--text-soft); }
.thanks .token-box {
  margin: 24px 0; padding: 16px; background: var(--surface-2);
  border-radius: var(--radius); font-family: var(--font-mono);
  font-size: 12px; word-break: break-all; user-select: all; border: 1px solid var(--line);
}

/* ─── Reveal d'entrée (progressive enhancement) ─── */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(16px); animation: reveal 0.7s var(--ease-out) forwards; }
  .reveal-1 { animation-delay: 0.05s; }
  .reveal-2 { animation-delay: 0.14s; }
  .reveal-3 { animation-delay: 0.23s; }
  .reveal-4 { animation-delay: 0.32s; }
  @keyframes reveal { to { opacity: 1; transform: none; } }
}

/* ─── Legacy aliases conservés ─── */
.how-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 24px; }
.hero__price { display: inline-flex; align-items: baseline; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; box-shadow: var(--shadow-sm); }
.hero__price .amount { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--ink); }
.hero__price .meta { font-size: 13px; color: var(--muted); }

@media (min-width: 640px) { .section { } }
