/* ════════════════════════════════════════════════════════════════════════
   Mnesis — charte du site public.

   SOURCE DE VÉRITÉ : frontend/src/theme/index.ts. Les jetons ci-dessous en
   sont la transposition web, valeur pour valeur, pour que le site et
   l'application aient la même peau : même bleu, mêmes fonds ardoise, mêmes
   rayons, même typographie système.

   Mise en page (octobre 2026) : une page éditoriale, sombre et typographique
   — grands titres, filets, rangées numérotées, accordéons, apparitions
   douces au défilement — habillée avec les composants de l'app plutôt
   qu'avec une maquette de téléphone : pastilles, puces de choix, cartes de
   section à filet coloré, groupes des Réglages, onglets teintés du dossier.

   Écarts assumés avec l'app, signalés là où ils apparaissent :
     · le texte tertiaire est légèrement éclairci (sombre) ou assombri
       (clair) pour tenir l'AA — un site se lit de plus loin qu'un téléphone ;
     · les boutons utilisent le bleu « actif » plutôt que le bleu « défaut »,
       sans quoi le blanc dessus tombe à 3,7:1 ;
     · en thème clair, le libellé d'un onglet actif prend sa teinte assombrie :
       le vert et l'orange iOS ne tiennent pas 3:1 sur fond gris clair.

   Formes : boutons, puces et pastilles en pilule (le bouton flottant et les
   puces de l'app) ; cartes 16 px (radii.xl) ; tuiles d'icône et cartes de
   section 12 px (radii.lg) ; cases 7 px, comme Checkbox.tsx.

   Cette feuille sert aussi les pages juridiques générées par
   landing/generate-legal-pages.py et la page 404 : une seule charte, un
   seul fichier.
   ════════════════════════════════════════════════════════════════════════ */

/* ── Jetons ─────────────────────────────────────────────────────────────── */
:root {
  /* Thème sombre — celui de l'app par défaut (theme/index.ts : darkColors) */
  --bg:            #020617;
  --surface:       #0F172A;
  --elevated:      #1E293B;
  --hover:         #334155;

  --border:        #1E293B;
  --border-strong: #334155;

  --primary:       #3B82F6;
  --primary-hover: #60A5FA;
  --primary-active:#2563EB;
  --primary-wash:  rgba(59, 130, 246, 0.08);
  --primary-edge:  rgba(59, 130, 246, 0.25);
  /* Bleu des liens et des libellés : assez clair pour tenir l'AA sur ardoise */
  --link:          #60A5FA;
  /* Fond des boutons pleins : blanc dessus = 5,2:1 */
  --btn-bg:        #2563EB;
  --btn-bg-hover:  #3B82F6;
  /* Le halo du bouton flottant de l'app (index.tsx : fab, shadowOpacity 0.45) */
  --btn-glow:      rgba(37, 99, 235, 0.5);

  --text:          #F8FAFC;
  --text-2:        #94A3B8;
  /* L'app dit #64748B (4,2:1 sur le fond) : éclairci pour l'AA. */
  --text-3:        #808C9E;

  --alert:         #EF4444;
  --alert-bg:      #450A0A;
  --alert-border:  #DC2626;
  --alert-text:    #FECACA;

  --warning:       #F59E0B;
  --warning-bg:    #422006;
  --warning-border:#D97706;
  --warning-text:  #FDE68A;

  --success:       #10B981;
  --success-bg:    #022C22;
  --success-border:#059669;
  --success-text:  #A7F3D0;

  --info:          #3B82F6;
  --info-bg:       #172554;
  --info-border:   #2563EB;
  --info-text:     #BFDBFE;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 40px 80px -32px rgba(0, 0, 0, 0.75);
  --glow: radial-gradient(55% 60% at 50% 0%, rgba(59, 130, 246, 0.13), transparent 70%);
  --grain: 0.028;

  /* Libellé d'un onglet actif : la teinte même, qui tient l'AA sur ardoise. */
  --tone-text-mix: 100%;

  /* Rayons — theme/index.ts : radii */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 24px;
  --r-pill: 999px;

  /* Espacement — theme/index.ts : spacing, prolongé pour le rythme d'une page */
  --s-xs: 4px;  --s-sm: 8px;  --s-md: 12px; --s-lg: 16px;
  --s-xl: 24px; --s-2xl: 32px; --s-3xl: 48px; --s-4xl: 72px; --s-5xl: 104px;

  /* Typographie — pile système, comme l'app. Aucune police distante :
     un site qui promet zéro réseau ne va pas chercher Google Fonts. Les
     titres demandent la coupe « Display » de San Francisco, dessinée pour
     les grandes tailles ; ailleurs, le système choisit. */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
          "Helvetica Neue", "Noto Sans", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
          Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", monospace;

  --wrap: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --header-h: 64px;
  --section-y: clamp(64px, 8vw, 112px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Les quatre teintes d'onglet du dossier — app/patient/[id].tsx : tabAccent */
  --tab-1: var(--primary);
  --tab-2: var(--success);
  --tab-3: var(--warning);
  --tab-4: var(--primary-hover);

  /* La pastille rouge « Urgent » : alert.border plutôt que alert.icon, pour
     que le blanc dessus tienne l'AA (4,8:1 au lieu de 3,8:1). */
  --urgent-fill:   #DC2626;

  color-scheme: dark;
}

/* Thème clair — theme/index.ts : lightColors (iOS) */
:root[data-theme="light"] {
  --bg:            #F2F2F7;
  --surface:       #FFFFFF;
  --elevated:      #F9F9F9;
  --hover:         #EFEFEF;

  --border:        #E5E5EA;
  --border-strong: #C7C7CC;

  --primary:       #007AFF;
  --primary-hover: #409CFF;
  --primary-active:#0060DF;
  --primary-wash:  rgba(0, 122, 255, 0.07);
  --primary-edge:  rgba(0, 122, 255, 0.22);
  --link:          #0060DF;
  --btn-bg:        #0060DF;
  --btn-bg-hover:  #007AFF;
  --btn-glow:      rgba(0, 96, 223, 0.32);

  --text:          #1C1C1E;
  /* L'app dit #6C6C70 et #8E8E93 ; assombris tous deux pour tenir l'AA sur
     le fond gris clair, tout en gardant une marche visible entre les deux. */
  --text-2:        #5B5B60;
  --text-3:        #6E6E73;

  --alert:         #FF3B30;
  --alert-bg:      #FFF5F5;
  --alert-border:  #FFCDD2;
  --alert-text:    #B71C1C;

  --warning:       #FF9500;
  --warning-bg:    #FFF8E1;
  --warning-border:#FFE082;
  /* L'app dit #E65100 (3,6:1 sur son fond ambre) : assombri pour l'AA. */
  --warning-text:  #B84200;

  --success:       #34C759;
  --success-bg:    #E8F5E9;
  --success-border:#A5D6A7;
  --success-text:  #1B5E20;

  --info:          #007AFF;
  --info-bg:       #E3F2FD;
  --info-border:   #90CAF9;
  --info-text:     #0D47A1;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.07);
  --shadow-md: 0 10px 30px -12px rgba(15, 23, 42, 0.18);
  --shadow-lg: 0 40px 80px -36px rgba(15, 23, 42, 0.28);
  --glow: radial-gradient(55% 60% at 50% 0%, rgba(0, 122, 255, 0.09), transparent 70%);
  --grain: 0.012;
  --tone-text-mix: 62%;

  color-scheme: light;
}

/* Sans choix explicite, on suit le système — l'app fait pareil. */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #F2F2F7; --surface: #FFFFFF; --elevated: #F9F9F9; --hover: #EFEFEF;
    --border: #E5E5EA; --border-strong: #C7C7CC;
    --primary: #007AFF; --primary-hover: #409CFF; --primary-active: #0060DF;
    --primary-wash: rgba(0,122,255,0.07); --primary-edge: rgba(0,122,255,0.22);
    --link: #0060DF; --btn-bg: #0060DF; --btn-bg-hover: #007AFF;
    --btn-glow: rgba(0,96,223,0.32);
    --text: #1C1C1E; --text-2: #5B5B60; --text-3: #6E6E73;
    --alert: #FF3B30; --alert-bg: #FFF5F5; --alert-border: #FFCDD2; --alert-text: #B71C1C;
    --warning: #FF9500; --warning-bg: #FFF8E1; --warning-border: #FFE082; --warning-text: #B84200;
    --success: #34C759; --success-bg: #E8F5E9; --success-border: #A5D6A7; --success-text: #1B5E20;
    --info: #007AFF; --info-bg: #E3F2FD; --info-border: #90CAF9; --info-text: #0D47A1;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.07);
    --shadow-md: 0 10px 30px -12px rgba(15,23,42,0.18);
    --shadow-lg: 0 40px 80px -36px rgba(15,23,42,0.28);
    --glow: radial-gradient(55% 60% at 50% 0%, rgba(0,122,255,0.09), transparent 70%);
    --grain: 0.012;
    --tone-text-mix: 62%;
    color-scheme: light;
  }
}

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

html {
  scroll-behavior: smooth;
  /* Les ancres ne passent plus sous l'en-tête collant. */
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
  /* Laisse les accordéons s'ouvrir en douceur (hauteur « auto » animable). */
  interpolate-size: allow-keywords;
}

/* Sur mobile, un navigateur attend ~300 ms après un appui pour savoir s'il
   s'agit d'un double-tap de zoom. Le dire explicitement rend les boutons et
   les liens immédiats, sans désactiver le zoom à deux doigts. Le halo gris
   d'Android est remplacé par nos propres états :hover / :focus-visible. */
:where(a, button, summary, [tabindex], label) {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

body.is-locked { overflow: hidden; }

h1, h2, h3, h4 {
  margin: 0; line-height: 1.15; letter-spacing: -0.022em; font-weight: 700;
  font-family: var(--font-display);
}
p { margin: 0; }
img, svg { display: block; max-width: 100%; }
ul, ol { margin: 0; padding: 0; }
button { font: inherit; color: inherit; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }

/* Un anneau de focus visible partout, épais, contrasté sur les deux thèmes. */
:where(a, button, input, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::selection { background: var(--primary-edge); color: var(--text); }

/* Contenu réservé aux lecteurs d'écran. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Lien d'évitement — premier élément focusable de la page. */
.skip {
  position: absolute; left: 50%; top: 8px; transform: translate(-50%, -150%);
  z-index: 200; background: var(--btn-bg); color: #FFF;
  padding: 12px 20px; border-radius: var(--r-pill); font-weight: 600;
  text-decoration: none; transition: transform 0.18s ease;
}
.skip:focus { transform: translate(-50%, 0); color: #FFF; }

/* La gouttière absorbe les encoches : en paysage sur un téléphone à
   encoche, le texte ne passe plus dessous. */
.wrap {
  width: 100%; max-width: var(--wrap); margin: 0 auto;
  padding-inline: calc(var(--gutter) + env(safe-area-inset-left)) calc(var(--gutter) + env(safe-area-inset-right));
}

/* ── En-tête ────────────────────────────────────────────────────────────── */
.header {
  position: sticky; top: 0; z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background-color 0.25s ease;
}
.header.is-stuck {
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom-color: var(--border);
}
@supports not (backdrop-filter: blur(1px)) { .header.is-stuck { background: var(--bg); } }

.header__inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: var(--s-lg);
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text); font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: -0.02em; font-size: 19px; flex: none;
}
.brand:hover { color: var(--text); }
.brand__mark { width: 28px; height: 28px; flex: none; }
/* La coche porte le bleu de la marque ; le carré suit la couleur du texte.
   `stroke` est réglé ici et non en attribut : var() dans un attribut de
   présentation SVG reste inégalement pris en charge. */
.brand__tick { stroke: var(--primary); }

/* ── Le geste de la marque ──────────────────────────────────────────────────
   La marque est une case qu'on coche : la coche se trace au chargement, une
   seule fois, en 420 ms. Le trajet « M11.5 22.5 18 29 33 9.5 » mesure 33,8
   unités — 34 suffit pour le masquer entièrement au départ.
   Seul le logo de l'en-tête s'anime : celui du pied de page rejouerait le
   geste hors champ, sans que personne le voie. */
@keyframes tracer-coche {
  from { stroke-dashoffset: 34; }
  to   { stroke-dashoffset: 0; }
}
.header .brand__tick {
  stroke-dasharray: 34;
  animation: tracer-coche 420ms cubic-bezier(0.65, 0, 0.35, 1) 120ms both;
}

.brand__beta {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  font-family: var(--font);
  color: var(--link); background: var(--primary-wash);
  border: 1px solid var(--primary-edge); border-radius: var(--r-pill);
  padding: 2px 8px; align-self: center;
}

/* Navigation. Le lien de la section en cours de lecture porte le trait des
   onglets du dossier (screenStyles.ts : tabIndicator, 2,5 px, coins hauts
   arrondis), posé sur le filet bas de l'en-tête comme dans l'app. */
.nav { display: flex; align-items: stretch; align-self: stretch; gap: 2px; margin-left: auto; }
.nav__link {
  position: relative;
  display: inline-flex; align-items: center; padding: 0 13px;
  text-decoration: none;
  color: var(--text-2); font-size: 15px; font-weight: 500;
  transition: color 0.2s ease;
}
.nav__link::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: -1px;
  height: 2.5px; border-radius: 2px 2px 0 0; background: var(--primary);
  transform: scaleX(0); transition: transform 0.35s var(--ease-out);
}
.nav__link:hover { color: var(--text); }
.nav__link[aria-current="true"],
.nav__link[aria-current="page"] { color: var(--text); }
.nav__link[aria-current="true"]::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

.header__actions { display: flex; align-items: center; gap: var(--s-sm); flex: none; }
.nav + .header__actions { margin-left: var(--s-sm); }
/* Page 404 : pas de navigation, les actions vont seules à droite. */
.brand + .header__actions { margin-left: auto; }

/* Bouton icône — la pastille ronde teintée de l'en-tête de l'app (iconBtn :
   fond primary à 8 %, icône en primary). */
.icon-btn {
  width: 44px; height: 44px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-pill); border: 0;
  background: color-mix(in srgb, var(--primary) 11%, transparent);
  color: var(--primary); cursor: pointer;
  transition: background 0.2s ease, transform 0.2s var(--ease-out);
}
.icon-btn:hover { background: color-mix(in srgb, var(--primary) 18%, transparent); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 20px; height: 20px; }

/* Une seule icône visible à la fois dans le bouton de thème. */
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .icon-moon { display: block; }
  :root:not([data-theme="dark"]) .theme-toggle .icon-sun { display: none; }
}

.burger { display: none; }

/* Panneau de navigation mobile : de grands intitulés, une rangée par
   section, qui entrent l'un après l'autre. */
.mobile-nav {
  position: fixed; inset: var(--header-h) 0 0; z-index: 99;
  background: var(--bg);
  padding-block: var(--s-lg) calc(var(--s-xl) + env(safe-area-inset-bottom));
  padding-inline: calc(var(--gutter) + env(safe-area-inset-left)) calc(var(--gutter) + env(safe-area-inset-right));
  overflow-y: auto;
  /* Arrivé en bas du tiroir, le geste ne doit pas se poursuivre sur la page
     restée derrière. */
  overscroll-behavior: contain;
  display: none;
}
.mobile-nav[data-open="true"] { display: flex; flex-direction: column; }
.mobile-nav__link {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-lg);
  min-height: 72px; padding: 0;
  border-bottom: 1px solid var(--border);
  color: var(--text); text-decoration: none;
  font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -0.03em;
}
.mobile-nav__link:hover { color: var(--link); }
.mobile-nav__link svg { width: 22px; height: 22px; color: var(--text-3); flex: none; }
.mobile-nav .btn { margin-top: var(--s-2xl); width: 100%; }

/* ── Boutons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px;
  border-radius: var(--r-pill); border: 1px solid transparent;
  font-family: var(--font); font-size: 16px; font-weight: 600; letter-spacing: -0.01em;
  line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease,
              transform 0.25s var(--ease-out), box-shadow 0.25s ease, color 0.2s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform 0.3s var(--ease-out); }
.btn:active { transform: scale(0.98); }

.btn--primary {
  background: var(--btn-bg); color: #FFF;
  box-shadow: 0 12px 28px -14px var(--btn-glow), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.btn--primary:hover {
  background: var(--btn-bg-hover); color: #FFF; transform: translateY(-1px);
  box-shadow: 0 18px 36px -14px var(--btn-glow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn--primary:hover svg:last-child { transform: translateX(3px); }
.btn--primary:active { transform: scale(0.98); }

.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--surface); color: var(--text); border-color: var(--text-3); }

.btn--lg { min-height: 56px; padding: 0 30px; font-size: 17px; }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn--block { width: 100%; }

/* ── Pastilles — src/components/BadgeChips.tsx ─────────────────────────────
   Un libellé en gras, une teinte, une icône pleine : la teinte renforce, le
   mot porte le sens. */
.pastille {
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
  padding: 5px 13px 5px 8px; border-radius: var(--r-pill); border: 1px solid;
  font-size: 14px; line-height: 1.35; font-weight: 500;
}
.pastille svg { width: 17px; height: 17px; flex: none; }
.pastille b { font-weight: 700; }
.pastille--info    { background: var(--info-bg);    border-color: var(--info-border);    color: var(--info-text); }
.pastille--info svg    { color: var(--info); }
.pastille--alert   { background: var(--alert-bg);   border-color: var(--alert-border);   color: var(--alert-text); }
.pastille--alert svg   { color: var(--alert); }
.pastille--warning { background: var(--warning-bg); border-color: var(--warning-border); color: var(--warning-text); }
.pastille--warning svg { color: var(--warning); }

/* ── Rythme de page ─────────────────────────────────────────────────────── */
/* Chaque section s'ouvre sur un filet net à la largeur du contenu : le
   chapitre d'une revue plutôt qu'une tranche colorée. */
.section { padding-top: var(--section-y); }
.section::before {
  content: ""; display: block; height: 1px; background: var(--border);
  width: calc(min(100%, var(--wrap)) - 2 * var(--gutter));
  margin: 0 auto clamp(44px, 5.5vw, 80px);
}

.eyebrow {
  display: inline-block; margin-bottom: var(--s-lg);
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--link);
}

.section__head { max-width: 940px; margin-bottom: clamp(44px, 6vw, 80px); }

h2, .h2 {
  font-size: clamp(34px, 4.6vw, 64px); line-height: 1.04; letter-spacing: -0.042em;
  text-wrap: balance;
}
.section__head h2 { max-width: 24ch; }
h3, .h3 { font-size: 20px; letter-spacing: -0.02em; font-weight: 600; }

.lede {
  margin-top: var(--s-xl); font-size: clamp(18px, 1.45vw, 20px); line-height: 1.55;
  color: var(--text-2); max-width: 58ch; text-wrap: pretty;
}

/* ── Héros ──────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: clamp(48px, 8vh, 96px) 0 clamp(64px, 10vh, 112px);
}
/* La lueur démarre en haut de la page, derrière l'en-tête encore
   transparent : partie du haut du héros, elle dessinait une arête nette
   juste sous l'en-tête. */
.hero::before {
  content: ""; position: absolute; inset: calc(-1 * var(--header-h)) 0 auto; height: 720px;
  background: var(--glow); pointer-events: none;
}
.hero .wrap { position: relative; }

.hero__status { font-size: 14.5px; }

/* Une affiche : trois lignes courtes, composées à la main, plutôt qu'une
   phrase que le navigateur coupe où il peut. Chaque ligne est un masque
   dont le texte monte au chargement. */
.hero__title {
  margin: clamp(28px, 4.5vh, 44px) 0 0;
  font-size: clamp(42px, 6.4vw, 88px); line-height: 0.98;
  letter-spacing: -0.05em; font-weight: 700;
}
/* Le masque garde de la marge en bas : sans elle, il rognerait les
   jambages (q, p) et la queue de la virgule. */
.hero__line { display: block; overflow: hidden; padding-bottom: 0.2em; margin-bottom: -0.2em; }
.hero__line > span { display: block; }
.hero__line--accent { color: var(--link); }
.hero__end { white-space: nowrap; }

/* La marque, à la taille du titre : la case qu'on vient de cocher. */
.hero__mark {
  display: inline-block; width: 0.84em; height: 0.84em;
  margin-left: 0.1em; vertical-align: -0.1em;
}
.hero__mark rect { opacity: 0.42; stroke: currentColor; }
.hero__tick { stroke: currentColor; }

.hero__foot {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end;
  gap: var(--s-2xl) var(--s-3xl); margin-top: clamp(36px, 6vh, 64px);
}
.hero__lede {
  font-size: clamp(18px, 1.6vw, 21px); line-height: 1.5;
  color: var(--text-2); max-width: 36ch; text-wrap: pretty;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--s-md); }

/* ── Garanties et chiffres ──────────────────────────────────────────────── */
.facts { padding-bottom: clamp(8px, 2vw, 24px); }

.trust {
  display: flex; flex-wrap: wrap; gap: 12px clamp(24px, 3vw, 44px);
  padding: 20px 0; list-style: none;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.trust li { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 500; color: var(--text-2); }
.trust svg { width: 18px; height: 18px; color: var(--success); flex: none; }

.stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(44px, 6vw, 80px);
}
.stats__item { padding: 4px clamp(16px, 2.4vw, 32px) 0; border-left: 1px solid var(--border); }
.stats__item:first-child { padding-left: 0; border-left: 0; }
.stats__n {
  font-family: var(--font-display);
  font-size: clamp(48px, 6.6vw, 100px); font-weight: 700; line-height: 1;
  letter-spacing: -0.055em; color: var(--text); white-space: nowrap;
  /* Les nombres sont comptés par le script : sans chasse fixe, la
     largeur du bandeau tremble pendant les 900 ms du décompte. */
  font-variant-numeric: tabular-nums;
}
.stats__l { margin-top: 14px; font-size: 15px; line-height: 1.45; color: var(--text-2); max-width: 22ch; }

/* ── Avant / avec Mnesis ────────────────────────────────────────────────── */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-lg); align-items: stretch; }
.compare__col { border-radius: var(--r-xl); padding: clamp(24px, 3vw, 40px); }
/* Le papier : un brouillon en pointillés, sans fond. */
.compare__col--before { border: 1.5px dashed var(--border-strong); }
/* Mnesis : une carte de section (SectionCard.tsx), filet d'accent à gauche,
   trait teinté sous le titre. */
.compare__col--after {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
}
.compare__tag {
  font-size: 21px; font-weight: 700; letter-spacing: -0.025em;
  padding-bottom: var(--s-lg); margin-bottom: var(--s-sm);
  border-bottom: 1px solid var(--border);
}
.compare__col--before .compare__tag { border-bottom: 1.5px dashed var(--border-strong); }
.compare__col--after .compare__tag { border-bottom-color: color-mix(in srgb, var(--primary) 21%, transparent); }
.compare ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.compare li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; font-size: 17px; line-height: 1.5; }
.compare li svg { width: 22px; height: 22px; flex: none; margin-top: 0; }
.compare__col--before li { color: var(--text-2); }
.compare__col--before li svg { color: var(--text-3); }
.compare__col--after li { color: var(--text); }
.compare__col--after li svg { color: var(--success); }

/* ── Trois gestes ───────────────────────────────────────────────────────── */
/* Une liste de projets de portfolio : numéro, titre, texte, et un filet
   entre chaque rangée. */
.steps { list-style: none; counter-reset: geste; border-bottom: 1px solid var(--border); }
.step {
  counter-increment: geste;
  display: grid; grid-template-columns: 88px minmax(0, 4.4fr) minmax(0, 5fr);
  gap: var(--s-lg) clamp(24px, 4vw, 56px); align-items: baseline;
  padding: clamp(28px, 3.6vw, 48px) 0; border-top: 1px solid var(--border);
}
.step::before {
  content: counter(geste, decimal-leading-zero);
  content: counter(geste, decimal-leading-zero) / "";
  font-family: var(--mono); font-size: 14px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--link);
}
.step h3 {
  font-size: clamp(26px, 3vw, 42px); line-height: 1.08; letter-spacing: -0.04em; font-weight: 700;
}
.step p { color: var(--text-2); font-size: 17px; max-width: 54ch; }

/* ── Fonctionnalités : la grille ────────────────────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-lg); }
.tile {
  grid-column: span 2; position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: clamp(24px, 2.4vw, 32px);
  transition: border-color 0.25s ease;
}
.tile:hover { border-color: var(--border-strong); }
.tile--3 { grid-column: span 3; }
.tile--4 { grid-column: span 4; }
.tile--split {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-2xl); align-items: center;
}
.tile--tint {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--success) 10%, transparent), transparent 62%),
    var(--surface);
}
.tile h3 { margin: 20px 0 8px; }
.tile p { font-size: 15.5px; color: var(--text-2); }
.tile__art { margin-top: var(--s-xl); }
.tile--split .tile__art { margin-top: 0; }

/* Tuile d'icône — index.tsx : toolIcon (fond teinté à 12 %, icône teintée) */
.tile__icon {
  width: 44px; height: 44px; border-radius: var(--r-lg); flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--primary) 13%, transparent); color: var(--primary);
}
.tile__icon svg { width: 22px; height: 22px; }
.tile__icon--alert   { background: color-mix(in srgb, var(--alert) 13%, transparent);   color: var(--alert); }
.tile__icon--warning { background: color-mix(in srgb, var(--warning) 13%, transparent); color: var(--warning); }
.tile__icon--success { background: color-mix(in srgb, var(--success) 13%, transparent); color: var(--success); }

/* Puces de choix — screenStyles : chip / chipOn. La dernière rangée
   s'efface vers la droite : il y en a d'autres. */
.chips {
  display: flex; flex-wrap: wrap; gap: 8px; align-content: center;
  -webkit-mask-image: linear-gradient(90deg, #000 74%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 74%, transparent 100%);
}
.chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 15px;
  border-radius: var(--r-pill); border: 1px solid var(--border-strong); background: var(--bg);
  font-size: 14px; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.chip--on { background: var(--primary-active); border-color: var(--primary-active); color: #FFF; }

/* Résultat d'un module — screenStyles : module / moduleResult */
.module {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  gap: 2px var(--s-md); padding: 14px 16px;
  border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg);
}
.module__name { font-weight: 600; font-size: 15px; color: var(--text); }
.module__value {
  grid-row: span 2; grid-column: 2;
  font-family: var(--font-display); font-size: 40px; font-weight: 700; line-height: 1;
  letter-spacing: -0.04em; color: var(--primary); font-variant-numeric: tabular-nums;
}
.module__detail { font-size: 13px; color: var(--text-2); }

/* Boutons du haut d'un dossier — patient/[id].tsx : Urgent, Avis sénior, statut */
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 15px;
  border-radius: var(--r-pill); border: 1px solid var(--border-strong);
  font-size: 14.5px; font-weight: 600; color: var(--text-2); white-space: nowrap;
}
.pill svg { width: 16px; height: 16px; flex: none; }
.pill--urgent { background: var(--urgent-fill); border-color: var(--urgent-fill); color: #FFF; }
.pill__star { color: var(--primary); }

/* Les points du code PIN — unlock.tsx */
.pin { display: flex; gap: clamp(14px, 2vw, 22px); justify-content: center; padding: var(--s-xl) 0; }
.pin__dot {
  width: 18px; height: 18px; border-radius: var(--r-pill);
  border: 2px solid var(--border-strong);
}
.pin__dot--on { background: var(--success); border-color: var(--success); }

/* ── Les squelettes ─────────────────────────────────────────────────────── */
/* Deux colonnes : les définitions à gauche, le même objet à droite. Les
   numéros relient les deux — une annotation placée en absolu serait
   ingérable dès que la largeur change. */
.anatomy {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 6vw, 96px); align-items: start;
}

.levels { display: grid; gap: var(--s-2xl); counter-reset: niveau; list-style: none; }
.level { position: relative; padding-left: 56px; counter-increment: niveau; }
.level::before {
  content: counter(niveau);
  position: absolute; left: 0; top: 0;
  width: 32px; height: 32px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-active); color: #FFF;
  font-size: 14px; font-weight: 700;
}
/* Un filet relie les trois niveaux, sauf après le dernier. */
.level:not(:last-child)::after {
  content: ""; position: absolute; left: 15.5px; top: 42px; bottom: calc(-1 * var(--s-2xl) + 8px);
  width: 1px; background: var(--border-strong);
}
.level b { display: block; font-family: var(--font-display); font-size: 22px; letter-spacing: -0.025em; margin-bottom: 6px; }
.level p { font-size: 16px; color: var(--text-2); }

/* La démonstration : l'écran du dossier, en vrais composants. Elle suit le
   thème du site, comme l'app suit le sien. Une gouttière à gauche porte les
   repères 1, 2, 3 : posés sur les composants, ils en masquaient le début. */
.demo {
  --demo-gutter: 40px;
  --demo-pad: clamp(16px, 2.2vw, 24px);
  position: relative; padding-left: var(--demo-gutter);
}
.demo__frame {
  position: relative;
  background: var(--bg); border: 1px solid var(--border-strong);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-lg);
}

[data-tone="1"] { --tone: var(--tab-1); }
[data-tone="2"] { --tone: var(--tab-2); }
[data-tone="3"] { --tone: var(--tab-3); }
[data-tone="4"] { --tone: var(--tab-4); }

/* Barre d'onglets — screenStyles : tabRow, tab, tabIndicator */
.demo__tabs { position: relative; display: flex; border-bottom: 1px solid var(--border); padding: 0 6px; }
.demo__tab {
  position: relative; flex: 1 1 auto; min-width: 0; min-height: 54px; padding: 0 8px;
  border: 0; background: none; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color 0.2s ease;
}
.demo__tab:hover { color: var(--text); }
.demo__tab[aria-selected="true"] {
  font-weight: 600;
  color: color-mix(in srgb, var(--tone) var(--tone-text-mix), #000);
}
.demo__tab::after {
  content: ""; position: absolute; left: 6px; right: 6px; bottom: -1px;
  height: 2.5px; border-radius: 2px 2px 0 0; background: var(--tone);
  transform: scaleX(0); transition: transform 0.35s var(--ease-out);
}
.demo__tab[aria-selected="true"]::after { transform: scaleX(1); }
.demo__tab:focus-visible { outline-offset: -3px; }

.demo__panel { padding: var(--demo-pad); min-height: 330px; }
.demo__panel[hidden] { display: none; }

.demo__badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
/* La pastille suit sa case, comme field.badge dans l'app. Sans :has(), elle
   reste affichée : c'est l'état de départ, case cochée. */
.demo__panel:has([data-badge]:not(:checked)) .demo__badges { display: none; }

/* Carte de section — SectionCard.tsx : filet d'accent de la teinte de
   l'onglet, trait teinté (35 en hexadécimal, soit 21 %) sous le titre. */
.demo__section {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--tone); border-radius: var(--r-lg);
  padding: 16px 16px 10px 15px;
  counter-reset: total fait;
}
.demo__title {
  font-size: 18px; font-weight: 600; letter-spacing: -0.015em;
  padding: 2px 56px 12px 2px; margin-bottom: 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--tone) 21%, transparent);
}
.demo__cases { list-style: none; display: grid; gap: 6px; }
.demo__cases li { position: relative; }
/* Le compteur « 2/3 » de la section, tenu par le CSS seul : chaque case
   incrémente « total », chaque case cochée aussi « fait ». Il vient après
   les cases dans le document, puisqu'un compteur se lit dans l'ordre. */
.demo__count {
  position: absolute; top: 19px; right: 16px;
  font-size: 13px; font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums;
}
.demo__count::after { content: counter(fait) "/" counter(total); }

/* Case à cocher — src/components/Checkbox.tsx, au pixel près */
.case {
  position: relative; display: flex; align-items: flex-start; gap: var(--s-md);
  min-height: 48px; padding: 11px 12px;
  border-radius: var(--r-md); border: 1px solid transparent; cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.case:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.case input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.case__box {
  counter-increment: total;
  flex: none; width: 24px; height: 24px; margin-top: 0;
  border-radius: 7px; border: 1.5px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.case__box svg {
  width: 15px; height: 15px; color: #FFF; opacity: 0; transform: scale(0.5);
  transition: opacity 0.15s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.case input:checked + .case__box {
  counter-increment: total fait;
  background: var(--primary); border-color: var(--primary);
}
.case input:checked + .case__box svg { opacity: 1; transform: none; }
.case:has(input:checked) { background: var(--primary-wash); border-color: var(--primary-edge); }
.case--alert:has(input:checked) { background: rgba(220, 38, 38, 0.12); border-color: var(--alert-border); }
.case--alert input:checked + .case__box { background: var(--alert-border); border-color: var(--alert-border); }
:root[data-theme="light"] .case--alert input:checked + .case__box { background: var(--alert); border-color: var(--alert); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .case--alert input:checked + .case__box { background: var(--alert); border-color: var(--alert); }
}
.case input:focus-visible + .case__box { outline: 3px solid var(--primary); outline-offset: 2px; }
/* L'appui écrase la case, comme le ressort de Checkbox.tsx (0,88). */
.case:active .case__box { transform: scale(0.88); }
.case__label { font-size: 15.5px; line-height: 1.45; color: var(--text); padding-top: 1px; }
.case__hint { display: block; font-size: 13px; color: var(--text-2); margin-top: 2px; }

/* Les numéros 1, 2, 3 des niveaux, dans la gouttière, à la hauteur de ce
   qu'ils désignent : la barre d'onglets, le titre de la section, la première
   case. Leur décalage se calcule depuis la gouttière : bord du cadre (1 px),
   marge du panneau, filet d'accent de la carte (3 px), marge de la carte. */
.demo__n {
  position: absolute; z-index: 2;
  width: 24px; height: 24px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary-active); color: #FFF;
  font-size: 12px; font-weight: 700; line-height: 1;
  --n-x: calc((var(--demo-gutter) - 24px) / 2);
}
.demo__n--tabs { left: var(--n-x); top: 16px; }
.demo__n--section { left: calc(var(--n-x) - var(--demo-gutter) - 1px - var(--demo-pad) - 3px); top: 16px; }
.demo__n--case { left: calc(var(--n-x) - var(--demo-gutter) - 1px - var(--demo-pad) - 3px - 15px); top: 12px; }

.demo__note { margin-top: var(--s-md); font-size: 14px; color: var(--text-3); text-align: center; }

/* Les trois manières d'adapter un squelette : trois paragraphes sous un
   filet, sans carte. */
.trio {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s-2xl) clamp(24px, 3.5vw, 48px); margin-top: clamp(56px, 7vw, 96px);
}
.trio__item { padding-top: var(--s-xl); border-top: 1px solid var(--border-strong); }
.trio__item h3 { margin: var(--s-lg) 0 6px; }
.trio__item p { color: var(--text-2); font-size: 15.5px; }

/* Le décompte des 44, en une ligne plutôt qu'en grille de quarante-quatre cases. */
.skel-note {
  display: flex; gap: var(--s-md); align-items: flex-start;
  margin-top: clamp(40px, 5vw, 64px); padding-top: var(--s-xl);
  border-top: 1px solid var(--border);
  font-size: 15px; color: var(--text-2);
}
.skel-note span { max-width: 84ch; }
.skel-note svg { width: 20px; height: 20px; flex: none; color: var(--success); margin-top: 2px; }
.skel-note b { color: var(--text); }

/* ── Confidentialité ────────────────────────────────────────────────────── */
.privacy {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 4vw, 56px); align-items: start;
}
/* Un groupe des Réglages — SettingsList.tsx : une carte, des rangées, un
   filet en retrait qui démarre après la tuile d'icône. */
.group {
  list-style: none; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
}
.group__row { position: relative; display: flex; gap: var(--s-lg); align-items: flex-start; padding: 20px 22px; }
.group__row + .group__row::before {
  content: ""; position: absolute; top: 0; right: 0; left: 78px;
  height: 1px; background: var(--border);
}
.group__icon {
  flex: none; width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--success) 13%, transparent); color: var(--success);
}
.group__icon svg { width: 21px; height: 21px; }
.group b { display: block; font-size: 16.5px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.group span { font-size: 15px; line-height: 1.55; color: var(--text-2); }

.privacy__aside { display: grid; gap: var(--s-xl); }
.privacy__more { font-size: 16px; color: var(--text-2); }

/* Bandeau d'avertissement — AlertBanner.tsx, ton « warning » */
.banner {
  display: flex; gap: var(--s-md); align-items: flex-start;
  padding: var(--s-xl); border-radius: var(--r-lg);
  border: 1px solid var(--warning-border); border-left-width: 4px;
  background: var(--warning-bg); color: var(--warning-text);
}
.banner svg { width: 22px; height: 22px; flex: none; color: var(--warning); margin-top: 1px; }
.banner b { display: block; margin-bottom: 4px; color: var(--warning-text); font-size: 17px; }
.banner p { font-size: 15px; }

/* ── Questions fréquentes ───────────────────────────────────────────────── */
.faq-layout {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--s-2xl) clamp(32px, 5vw, 80px); align-items: start;
}
.faq-layout__head { position: sticky; top: calc(var(--header-h) + 32px); }
.faq-layout__head h2 { max-width: 12ch; }

.faq { border-bottom: 1px solid var(--border); }
.faq details { border-top: 1px solid var(--border); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-xl);
  min-height: 76px; padding: 18px 0;
  cursor: pointer; list-style: none;
  font-size: clamp(17px, 1.5vw, 20px); font-weight: 600; letter-spacing: -0.015em; line-height: 1.35;
  transition: color 0.2s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--link); }
.faq summary:focus-visible { outline-offset: 4px; }
.faq__icon {
  flex: none; width: 38px; height: 38px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--primary) 11%, transparent); color: var(--primary);
  transition: transform 0.4s var(--ease-out), background 0.2s ease, color 0.2s ease;
}
.faq__icon svg { width: 18px; height: 18px; }
.faq details[open] .faq__icon { transform: rotate(45deg); background: var(--primary-active); color: #FFF; }
.faq__body { padding: 0 clamp(0px, 5vw, 64px) 28px 0; color: var(--text-2); font-size: 17px; max-width: 66ch; }
.faq__body p + p { margin-top: var(--s-md); }
.faq__body strong { color: var(--text); }

/* Ouverture en douceur là où le navigateur sait animer le contenu d'un
   <details> ; ailleurs, l'accordéon s'ouvre d'un coup, comme avant. */
@supports selector(::details-content) {
  @media (prefers-reduced-motion: no-preference) {
    .faq details::details-content {
      block-size: 0; overflow-y: clip;
      transition: block-size 0.4s var(--ease-out), content-visibility 0.4s allow-discrete;
    }
    .faq details[open]::details-content { block-size: auto; }
  }
}

/* ── Appel à l'action final ─────────────────────────────────────────────── */
.section--cta { padding-bottom: var(--section-y); }
.section--cta::before { display: none; }
.cta {
  position: relative; overflow: hidden;
  border: 1px solid var(--border); border-radius: 28px;
  background:
    radial-gradient(90% 120% at 0% 100%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 60%),
    var(--surface);
  padding: clamp(32px, 6vw, 88px);
}
.cta h2 { font-size: clamp(40px, 6.4vw, 96px); line-height: 1; letter-spacing: -0.05em; max-width: 18ch; }
.cta__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-2xl) clamp(32px, 5vw, 80px); align-items: end; margin-top: var(--s-xl);
}
.cta .lede { margin-top: 0; }
.criteria { list-style: none; display: grid; gap: var(--s-md); margin-top: var(--s-xl); }
.criteria li { display: flex; gap: 12px; align-items: center; font-size: 17px; }
.criteria svg { width: 22px; height: 22px; flex: none; color: var(--success); }
.cta__actions { display: flex; flex-direction: column; align-items: stretch; gap: var(--s-md); }
.cta__note { margin-top: var(--s-lg); font-size: 14px; color: var(--text-3); }

/* ── Pied de page ───────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: var(--s-4xl) 0 var(--s-2xl); background: var(--bg); overflow: hidden; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--s-2xl); }
.footer__about p { margin-top: var(--s-md); font-size: 15px; color: var(--text-2); max-width: 34ch; }
.footer h2 { font-family: var(--font); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); margin-bottom: var(--s-md); }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.footer li a {
  display: inline-flex; align-items: center; min-height: 40px;
  color: var(--text-2); text-decoration: none; font-size: 15px;
}
.footer li a:hover { color: var(--link); text-decoration: underline; }
.footer__legal {
  margin-top: var(--s-3xl); padding-top: var(--s-xl); border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: var(--s-md) var(--s-xl); justify-content: space-between;
  font-size: 13px; color: var(--text-3);
}
.footer__legal p { max-width: 78ch; }
.footer__disclaimer { margin-top: var(--s-lg); font-size: 13px; color: var(--text-3); line-height: 1.65; }
.footer__disclaimer b { color: var(--text-2); }

/* Le nom, à l'échelle de la page, qui ferme la marche. Décoratif : masqué
   aux lecteurs d'écran, qui ont déjà lu le nom dans l'en-tête. */
.footer__wordmark {
  margin: var(--s-3xl) 0 calc(-0.2 * clamp(96px, 23vw, 340px));
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(96px, 23vw, 340px); line-height: 1; letter-spacing: -0.065em;
  text-align: center; white-space: nowrap; user-select: none; pointer-events: none;
  color: transparent;
  background: linear-gradient(180deg, var(--elevated) 10%, transparent 82%);
  -webkit-background-clip: text; background-clip: text;
}

/* ── Pages juridiques (générées) ────────────────────────────────────────── */
.doc { max-width: 760px; margin: 0 auto; padding: var(--s-4xl) 0 var(--s-5xl); }
.doc h1 { font-size: clamp(34px, 4.4vw, 52px); letter-spacing: -0.04em; line-height: 1.05; }
.doc__meta { margin-top: var(--s-md); font-size: 14px; color: var(--text-3); }
.doc__body { margin-top: var(--s-3xl); }
.doc__body h2 {
  font-size: 22px; margin: var(--s-3xl) 0 var(--s-md); letter-spacing: -0.02em;
  padding-top: var(--s-lg); border-top: 1px solid var(--border);
}
.doc__body h3 { font-size: 17.5px; margin: var(--s-xl) 0 var(--s-sm); }
.doc__body h4 { font-size: 16px; margin: var(--s-lg) 0 var(--s-xs); color: var(--text-2); }
.doc__body p { margin: 0 0 var(--s-lg); color: var(--text-2); }
.doc__body ul, .doc__body ol { margin: 0 0 var(--s-lg); padding-left: 24px; color: var(--text-2); }
.doc__body li { margin-bottom: var(--s-sm); }
.doc__body strong { color: var(--text); font-weight: 600; }
.doc__body code {
  font-family: var(--mono); font-size: 0.87em;
  background: var(--elevated); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: var(--r-sm); color: var(--text);
}
.doc__body hr { border: 0; border-top: 1px solid var(--border); margin: var(--s-2xl) 0; }
.doc__toc {
  margin-top: var(--s-2xl); padding: var(--s-lg) var(--s-xl);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
}
.doc__toc h2 { font-family: var(--font); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); margin: 0 0 var(--s-sm); border: 0; padding: 0; }
.doc__toc ol { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: var(--s-xl); }
.doc__toc li { margin: 0; }
.doc__toc a { display: block; padding: 5px 0; font-size: 14.5px; text-decoration: none; }
.doc__toc a:hover { text-decoration: underline; }

/* ── Page 404 ───────────────────────────────────────────────────────────── */
.notfound { min-height: 68vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: var(--s-lg); padding: var(--s-5xl) 0; }
.notfound h1 { font-size: clamp(40px, 6vw, 72px); letter-spacing: -0.045em; line-height: 1.02; }
.notfound__code { font-family: var(--mono); font-size: 13px; letter-spacing: 0.2em; color: var(--link); }

/* ── Entrée du héros ────────────────────────────────────────────────────────
   Les lignes du titre montent de leur masque l'une après l'autre, puis la
   case se coche. Une seule fois, au chargement : c'est le geste de l'app
   qui ouvre la page. Sans préférence de mouvement réduit uniquement. */
@keyframes monter { from { transform: translateY(108%); } to { transform: none; } }
@keyframes fondu-haut { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .hero__line > span { animation: monter 1000ms var(--ease-out) both; }
  .hero__line:nth-child(2) > span { animation-delay: 90ms; }
  .hero__line:nth-child(3) > span { animation-delay: 180ms; }
  .hero__status { animation: fondu-haut 700ms var(--ease-out) 40ms both; }
  .hero__foot { animation: fondu-haut 800ms var(--ease-out) 420ms both; }
  .hero__tick {
    stroke-dasharray: 34;
    animation: tracer-coche 560ms cubic-bezier(0.65, 0, 0.35, 1) 950ms both;
  }

  /* Le menu mobile : les rangées entrent l'une après l'autre. */
  .mobile-nav[data-open="true"] > * { animation: fondu-haut 520ms var(--ease-out) both; }
  .mobile-nav[data-open="true"] > :nth-child(2) { animation-delay: 40ms; }
  .mobile-nav[data-open="true"] > :nth-child(3) { animation-delay: 80ms; }
  .mobile-nav[data-open="true"] > :nth-child(4) { animation-delay: 120ms; }
  .mobile-nav[data-open="true"] > :nth-child(5) { animation-delay: 160ms; }
  .mobile-nav[data-open="true"] > :nth-child(6) { animation-delay: 200ms; }

  /* Démonstration : le panneau qui devient visible glisse en place, et ses
     cases déjà cochées se remplissent l'une après l'autre. Repasser d'un
     onglet à l'autre relance l'animation, puisque le passage de « hidden »
     à visible réinitialise les animations CSS. */
  .demo__panel:not([hidden]) { animation: fondu-haut 380ms var(--ease-out) both; }
  .demo__panel:not([hidden]) .case input:checked + .case__box { animation: remplir-case 300ms cubic-bezier(0.34, 1.4, 0.64, 1) both; }
  .demo__panel:not([hidden]) li:nth-child(1) .case input:checked + .case__box { animation-delay: 160ms; }
  .demo__panel:not([hidden]) li:nth-child(2) .case input:checked + .case__box { animation-delay: 280ms; }
  .demo__panel:not([hidden]) li:nth-child(3) .case input:checked + .case__box { animation-delay: 400ms; }
  .demo__panel:not([hidden]) li:nth-child(n+4) .case input:checked + .case__box { animation-delay: 520ms; }
}
@keyframes remplir-case {
  from { transform: scale(0.4); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

/* ── Apparition au défilement ─────────────────────────────────────────────
   L'état caché n'existe QUE si le script a pu installer l'observateur qui le
   lèvera : c'est lui qui pose `js-reveal` sur <html>. Sans JavaScript, avec un
   script cassé, ou sans IntersectionObserver, la page reste simplement
   lisible — un effet décoratif ne doit jamais pouvoir escamoter le contenu. */
.js-reveal .reveal { opacity: 0; transform: translateY(28px); }
.js-reveal .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity 0.7s ease, transform 0.9s var(--ease-out);
}

/* ── Apparition pilotée par le défilement, en CSS natif ─────────────────────
   Là où le navigateur sait lier une animation à la position d'un élément dans
   la fenêtre, on lui confie le travail : l'apparition suit le doigt au lieu de
   se déclencher par paliers, et plus rien ne passe par le fil d'exécution du
   script. Le JavaScript le détecte et s'abstient alors d'observer quoi que ce
   soit — voir « Apparition au défilement » dans mnesis.js.

   Ailleurs, l'observateur d'intersection continue de faire le travail : les
   deux mécanismes ne coexistent jamais.

   « animation-range » s'arrête à « cover 24 % » pour que l'élément soit
   entièrement arrivé bien avant le milieu de l'écran : une apparition qui se
   termine sous le regard se remarque, et se remarquer n'est pas le but. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    /* « :root:not(.no-js) » : la classe « no-js » est retirée par
       assets/theme-init.js dès le premier rendu. Sans JavaScript, elle reste,
       et rien de tout ceci ne s'applique — le contenu est simplement visible.
       Un effet décoratif ne doit jamais pouvoir escamoter le texte, même quand
       c'est le CSS seul qui l'anime. */
    :root:not(.no-js) .reveal {
      animation: apparition-au-defilement linear both;
      animation-timeline: view();
      animation-range: entry 6% cover 24%;
    }
    /* Le mécanisme JavaScript est neutralisé : sans cela, ses états initiaux
       masqueraient les éléments que le CSS vient d'animer. */
    .js-reveal .reveal,
    .js-reveal .reveal.is-in { opacity: initial; transform: none; transition: none; }
  }
}
@keyframes apparition-au-defilement {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}

/* ── Grain ──────────────────────────────────────────────────────────────────
   Un aplat d'ardoise sur neuf cents pixels de haut se lit comme une surface
   morte. Un bruit très faible lui rend de la matière : c'est le détail qui
   sépare une page composée d'une page générée.

   La tuile est un filtre SVG en URI de données — une centaine d'octets, aucune
   requête, et « img-src 'self' data: » de la CSP l'autorise. Elle est fixe,
   donc elle ne défile pas avec le contenu : le grain appartient à l'écran, pas
   à la page. « pointer-events: none » la rend transparente aux clics.

   L'opacité est un jeton : un fond clair supporte beaucoup moins de bruit
   qu'un fond sombre avant de paraître sale. */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='160'%20height='160'%3E%3Cfilter%20id='g'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.82'%20numOctaves='3'%20stitchTiles='stitch'/%3E%3C/filter%3E%3Crect%20width='160'%20height='160'%20filter='url%28%23g%29'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}
@media print { body::after { display: none; } }


/* ── Bascule de thème ───────────────────────────────────────────────────────
   Le fondu est piloté par l'API View Transitions ; les navigateurs qui ne la
   connaissent pas ignorent simplement ces règles et gardent la bascule sèche.
   260 ms : assez pour que l'œil suive, assez court pour ne pas attendre. */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 260ms;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) { animation: none; }
}


/* ── Adaptatif ──────────────────────────────────────────────────────────── */
/* L'en-tête bascule sur le menu compact dès que la barre complète ne tient
   plus : cinq liens, le thème et le bouton réclament ~1060 px. Ce point lui
   est propre et ne suit pas le reste de la grille, qui bascule plus bas. */
@media (max-width: 1120px) {
  .nav { display: none; }
  .burger { display: inline-flex; }
  .nav + .header__actions { margin-left: auto; }
}

@media (max-width: 960px) {
  .anatomy, .privacy, .faq-layout, .cta__grid { grid-template-columns: minmax(0, 1fr); }
  .faq-layout__head { position: static; }
  .faq-layout__head h2 { max-width: 16ch; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile, .tile--3 { grid-column: span 1; }
  .tile--4 { grid-column: span 2; }
  .step { grid-template-columns: minmax(48px, auto) minmax(0, 1fr); }
  .step p { grid-column: 2; }
  .trio { grid-template-columns: minmax(0, 1fr); gap: var(--s-xl); }
  .cta__actions { flex-direction: row; flex-wrap: wrap; }
}

@media (max-width: 860px) {
  .header__actions .btn { display: none; }
  .hero__foot { grid-template-columns: minmax(0, 1fr); }
  .compare { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s-2xl); }
  .stats__item:nth-child(3) { padding-left: 0; border-left: 0; }
  .doc__toc ol { columns: 1; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__about { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero__title { font-size: clamp(34px, 10.4vw, 60px); line-height: 1.02; }
  .hero__cta .btn, .cta__actions .btn { width: 100%; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .tile, .tile--3, .tile--4 { grid-column: auto; }
  .tile--split { grid-template-columns: minmax(0, 1fr); gap: var(--s-xl); }
  .step { grid-template-columns: minmax(0, 1fr); gap: var(--s-sm); }
  .step p { grid-column: auto; }
  .demo { --demo-gutter: 30px; }
  .demo__n { width: 22px; height: 22px; font-size: 11px; --n-x: calc((var(--demo-gutter) - 22px) / 2); }
  .demo__tab { font-size: 12px; padding: 0 4px; }
  .demo__tabs { padding: 0 4px; }
  .demo__tab::after { left: 4px; right: 4px; }
  .hero__status { font-size: 13.5px; }
  .cta { padding: 28px 22px; border-radius: var(--r-2xl); }
  .cta h2 { font-size: clamp(34px, 9.4vw, 44px); }
  .cta__actions .btn { white-space: normal; text-align: center; padding: 14px 20px; }
  .footer__grid { grid-template-columns: 1fr; }
  .group__row { padding: 18px 16px; }
  .group__row + .group__row::before { left: 72px; }
}

/* ── Mouvement réduit ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important; scroll-behavior: auto !important;
  }
  .js-reveal .reveal { opacity: 1; transform: none; }
  /* « animation-duration: 0.001ms » plus haut fige l'état de départ des
     animations en « both » : on rétablit explicitement l'état d'arrivée. */
  .header .brand__tick { stroke-dasharray: none; }
}

/* ── Contraste renforcé ─────────────────────────────────────────────────── */
@media (prefers-contrast: more) {
  :root { --text-2: #CBD5E1; --text-3: #94A3B8; --border: #334155; }
  :root[data-theme="light"] { --text-2: #3A3A3C; --text-3: #48484A; --border: #C7C7CC; }
  .tile, .group, .faq details, .compare__col--after { border-width: 2px; }
}

/* ── Impression ─────────────────────────────────────────────────────────── */
@media print {
  /* Un bloc pas encore « apparu » s'imprimerait blanc : on lève le masquage. */
  .js-reveal .reveal { opacity: 1 !important; transform: none !important; }
  .header, .mobile-nav, .demo, .cta, .skip, .icon-btn, .footer__wordmark { display: none !important; }
  body { background: #FFF; color: #000; font-size: 12pt; }
  .section { padding: 12pt 0; }
  .section::before { display: none; }
  a { color: #000; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
