/* Kleared : fond noir, encre blanche, vert lime pour les actions et un seul grand aplat. Type seul, pas d'image. */
@font-face { font-family: 'Libre Franklin'; font-weight: 700; font-display: swap; src: url('polices/libre-franklin-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Libre Franklin'; font-weight: 500; font-display: swap; src: url('polices/libre-franklin-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-weight: 400; font-display: swap; src: url('polices/source-serif-4-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-weight: 600; font-display: swap; src: url('polices/source-serif-4-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Source Serif 4'; font-weight: 400; font-style: italic; font-display: swap; src: url('polices/source-serif-4-latin-400-italic.woff2') format('woff2'); }

:root {
  --bg: #0b0b0b;
  --surface: #1a1a1a;
  --surface-2: #141414;
  --ink: #f5f5f0;
  --muted: #b0b0a8;
  --accent: #c6ff3d;
  --accent-ink: #0b0b0b;
  --papier: #f2f2ec;
  --papier-ink: #0b0b0b;
  --papier-doux: #4c4c46;
  --marge: clamp(20px, 3.4vw, 48px);
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --step-display: clamp(3.25rem, 1rem + 7.2vw, 6.5rem);
  --titre: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;
  --texte: 'Source Serif 4', Georgia, serif;
  --rayon: 999px;
  --courbe: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--step-body)/1.55 var(--texte); font-kerning: normal; }
.page { position: relative; z-index: 1; background: var(--bg); }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--titre); font-weight: 700; margin: 0; text-wrap: balance; }
h2 { font-size: var(--step-head); line-height: 1; letter-spacing: -0.03em; }
p { margin: 0; text-wrap: pretty; }
small { font-size: var(--step-small); color: var(--muted); }
.evitement { position: absolute; left: -9999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 12px 16px; z-index: 10; }
.evitement:focus { left: 16px; top: 16px; }

/* Bouton : pilule pleine, 48px de haut au moins. */
.bouton { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border: 0; border-radius: var(--rayon);
  background: var(--accent); color: var(--accent-ink); font: 500 1rem/1 var(--titre); text-decoration: none; cursor: pointer;
  transition: transform 160ms var(--courbe), background-color 160ms var(--courbe); }
.bouton:hover { background: #d6ff70; text-decoration: none; }
.bouton:active { transform: scale(0.97); }
.bouton-clair { background: var(--ink); color: var(--papier-ink); }
.bouton-clair:hover { background: var(--papier); }
.bouton-sombre { background: var(--accent-ink); color: var(--accent); }
.bouton-sombre:hover { background: #2a2a2a; }

/* Barre du haut : marque à gauche, liens sur l'axe à 42 %, action à droite. */
.barre { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: grid; grid-template-columns: 42% 1fr auto; align-items: center;
  padding: 36px var(--marge) 0; font: 500 1rem/1 var(--titre); }
.marque { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.02em; text-decoration: none; }
.liens { display: flex; gap: 28px; }
.liens a, .vers-audit { text-decoration: none; color: var(--muted); }
.liens a:hover, .vers-audit:hover { color: var(--ink); }
.vers-audit { color: var(--ink); }
.liens { align-items: center; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; color: var(--muted); padding: 8px 12px; margin: -8px -12px; border-radius: 10px; transition: background-color 160ms var(--courbe), color 160ms var(--courbe); }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 8px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-3px) rotate(45deg); transition: transform 200ms var(--courbe); }
.menu[open] summary, .menu summary:hover { color: var(--ink); background: var(--surface); }
.menu[open] summary::after { transform: translateY(0) rotate(-135deg); }
.menu-panneau { position: absolute; top: calc(100% + 18px); left: -24px; width: min(640px, 80vw); display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 14px;
  background: #121212; border-radius: 20px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 0 0 1px #262626; z-index: 5;
  animation: menu-ouvre 200ms var(--courbe); }
@keyframes menu-ouvre { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }
.menu-cas { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; padding: 12px; border-radius: 14px; text-decoration: none; transition: background-color 160ms var(--courbe); }
.menu-cas:hover { background: var(--surface); }
.menu-icone { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: #1d1d1d; color: var(--accent); }
.menu-icone svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.menu-cas b { display: block; font: 600 0.9375rem/1.3 var(--titre); color: var(--ink); }
.menu-cas small { display: block; margin-top: 3px; font: 400 0.875rem/1.4 var(--titre); color: var(--muted); }

/* Premier écran : vide composé en haut, déclaration accrochée à l'axe en bas. */
.hero { position: relative; isolation: isolate; min-height: 100svh; display: grid; grid-template-columns: 42% 1fr; grid-template-rows: 1fr auto auto; padding: 0 var(--marge) 72px; column-gap: 0; }
.titre { grid-column: 2; grid-row: 2; font-size: var(--step-display); line-height: 0.95; letter-spacing: -0.04em; font-weight: 700; }
.titre .ligne { display: block; overflow: hidden; padding-bottom: 0.06em; white-space: nowrap; }
.titre .ligne > span { display: inline-block; }
.hero-phrase { grid-column: 1; grid-row: 2 / 4; align-self: end; max-width: 32ch; padding-right: 32px; font-size: 1.125rem; color: var(--muted); }
.hero-action { grid-column: 2; grid-row: 3; justify-self: start; margin-top: 36px; }

.champ { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; --allume: #c6ff3d; --eteint: #4a4a44; }
section { padding: clamp(88px, 12vw, 168px) var(--marge); }

/* Parcours : titre à gauche, ticket à droite sur un fond plus sombre. */
.parcours { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; background: var(--surface-2); }
.parcours-texte { grid-column: 1 / 6; }
.parcours-texte p { margin-top: 24px; max-width: 30ch; font-size: var(--step-lead); line-height: 1.4; color: var(--muted); }
.ticket { grid-column: 7 / 12; justify-self: start; width: min(100%, 480px); background: var(--papier); color: var(--papier-ink); padding: 32px 28px 0; border-radius: 20px; overflow: hidden;
  font-size: 1rem; font-variant-numeric: tabular-nums; }
.ticket ol, .ticket ul { list-style: none; margin: 0; padding: 0; }
.etape + .etape { margin-top: 28px; }
.etape h3 { font: 700 1rem/1.2 var(--titre); margin-bottom: 10px; }
.etape li { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; }
.etape li span { flex: 0 1 auto; }
.etape li i { flex: 1 1 24px; min-width: 24px; height: 4px; align-self: center; margin-top: 6px;
  background: radial-gradient(circle, var(--papier-doux) 1.5px, transparent 2px) 0 50% / 9px 4px repeat-x; }
.etape li b { flex: none; font-weight: 600; white-space: nowrap; }
.ticket-fin { display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 44px; margin: 28px -28px 0; padding: 14px 28px;
  background: var(--papier-ink); color: var(--papier); font: 700 1rem/1.2 var(--titre); }
.ticket-fin b { color: var(--accent); }

/* Contrôles : une colonne étroite de lignes à deux bouts. */
.controles { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 48px; }
.controles .colonne { grid-column: 2 / 8; }
.familles { list-style: none; margin: 0; padding: 0; }
.familles li { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 18px 0; }
.familles li + li { margin-top: 4px; }
.familles b { display: block; font: 700 var(--step-lead)/1.2 var(--titre); letter-spacing: -0.01em; color: var(--ink); }
.familles .intitule { color: var(--muted); }
.familles .qui { font: 500 1rem/1 var(--titre); color: var(--accent); white-space: nowrap; }
.exemple { grid-column: 9 / 13; align-self: start; position: sticky; top: 32px; background: var(--papier); color: var(--papier-ink); border-radius: 20px; padding: 24px; font-size: 0.9375rem; }
.exemple-titre { font: 700 1.25rem/1.2 var(--titre); }
.exemple-boutique { color: var(--papier-doux); margin-top: 4px; }
.exemple ul { list-style: none; margin: 20px 0; padding: 0; }
.exemple li { display: grid; grid-template-columns: 16px 1fr; column-gap: 10px; padding: 10px 0; }
.exemple li + li { border-top: 1px solid #dcdcd3; }
.exemple b { display: block; font: 600 1rem/1.3 var(--texte); }
.exemple small { display: block; color: var(--papier-doux); margin-top: 2px; }
.exemple .point-h { box-shadow: inset 0 0 0 2px var(--papier-doux); }
.exemple .point-r { background: var(--bg); }
.exemple-verdict { background: var(--bg); color: var(--ink); margin: 0 -24px -24px; padding: 16px 24px; border-radius: 0 0 20px 20px; font: 500 1rem/1.35 var(--titre); }
.controles h2 { margin-bottom: 20px; }
.legende { color: var(--muted); max-width: 46ch; margin-bottom: 32px; }
.legende .point:last-of-type { margin-left: 16px; }
.groupes, .groupes ul { list-style: none; margin: 0; padding: 0; }
.groupe + .groupe { margin-top: 40px; }
.groupe h3 { font: 500 1rem/1.2 var(--titre); color: var(--muted); margin-bottom: 8px; }
.groupe li { display: grid; grid-template-columns: 16px 1fr auto; column-gap: 10px; align-items: baseline; padding: 7px 0; }
.point { display: inline-block; width: 12px; height: 12px; border-radius: 50%; transform: translateY(1px); }
.point-r { background: var(--accent); }
.point-h { background: transparent; box-shadow: inset 0 0 0 2px var(--muted); }
.intitule { font-size: 1rem; }
.qui { font-size: var(--step-small); color: var(--muted); text-align: right; }

/* Premier tri : questions à gauche, résultat qui suit à droite. */
.tri { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; row-gap: 40px; background: var(--accent); color: var(--papier-ink); }
.tri-tete { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; align-items: end; }
.tri-tete h2 { grid-column: 1 / 7; }
.tri-tete p { grid-column: 7 / 12; color: var(--papier-doux); }
.tri-questions { grid-column: 1 / 8; display: grid; gap: 4px; }
.q { border: 0; margin: 0; padding: 14px 0; }
.q legend { padding: 0; font-size: 1rem; margin-bottom: 8px; }
.q label { display: inline-flex; align-items: center; gap: 8px; margin-right: 8px; margin-top: 4px; padding: 8px 14px; min-height: 40px; border-radius: var(--rayon);
  background: rgba(11, 11, 11, 0.08); font: 500 0.9375rem/1 var(--titre); cursor: pointer; transition: background-color 160ms var(--courbe), color 160ms var(--courbe); }
.q label:hover { background: rgba(11, 11, 11, 0.15); }
.q input { accent-color: var(--papier-ink); margin: 0; }
.q label:has(input:checked) { background: var(--papier-ink); color: var(--papier); }
.q label:has(input:focus-visible) { outline: 3px solid var(--bg); outline-offset: 2px; }
.tri-resultat { grid-column: 9 / 13; align-self: start; position: sticky; top: 32px; }
.tri-compte { font: 700 var(--step-lead)/1.25 var(--titre); letter-spacing: -0.01em; }
.tri-liste { margin: 20px 0 0; padding-left: 1.1em; color: var(--papier-ink); }
.tri-liste li + li { margin-top: 8px; }
.tri-liste:empty { display: none; }
.tri-resultat .bouton { margin-top: 24px; background: var(--bg); color: var(--ink); }

/* Tarifs : un grand tableau, la colonne recommandée sur l'accent. */
.tarifs { padding-left: var(--marge); padding-right: var(--marge); }
.grille { width: 100%; border-collapse: collapse; font-size: 1.25rem; }
.grille th, .grille td { text-align: left; vertical-align: top; padding: 20px 20px; }
.grille thead th { padding-top: 0; vertical-align: bottom; }
.grille thead th:first-child { width: 30%; }
.grille thead h2 { font-size: clamp(1.75rem, 1rem + 1.6vw, 2.5rem); }
.grille .plan { display: block; font: 700 clamp(1.5rem, 1rem + 1.6vw, 2.75rem)/1.05 var(--titre); letter-spacing: -0.02em; }
.grille .montant { display: block; font: 500 clamp(1.5rem, 1rem + 1.6vw, 2.75rem)/1.1 var(--titre); letter-spacing: -0.02em; }
.grille .unite, .plans .unite { display: block; margin-top: 6px; font-size: 1rem; font-weight: 400; color: inherit; opacity: 0.85; }
.grille thead th.choisi { padding-top: 28px; }
.grille tbody tr:nth-child(odd) { background: var(--surface); }
.grille tbody th { font-weight: 400; color: var(--muted); }
.grille .choisi { background: var(--accent); color: var(--accent-ink); }
.grille tbody tr:nth-child(odd) .choisi { background: #b9f22c; }
.grille tfoot td { padding-top: 28px; padding-bottom: 28px; }
.plans { display: none; }

/* Questions : texte courant sur deux colonnes, question en attaque. */
.questions { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; background: var(--surface-2); }
.questions h2 { grid-column: 1 / 4; font-size: clamp(1.75rem, 1.2rem + 1vw, 2rem); }
.reponses { grid-column: 5 / 13; columns: 2; column-gap: 56px; font-size: 1.0625rem; }
.reponses p { break-inside: avoid; margin-bottom: 20px; }
.reponses strong { font-weight: 600; font-family: var(--titre); font-size: 1rem; }

/* Audit : le formulaire, champs pleins, arrondis. */
.audit { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; }
.audit-tete { grid-column: 1 / 5; }
.audit-tete h2 { font-size: var(--step-display); line-height: 0.95; letter-spacing: -0.04em; }
.audit-tete p { margin-top: 24px; color: var(--muted); max-width: 28ch; }
.audit-form { grid-column: 6 / 13; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 24px; align-content: start; }
.audit-form label { display: grid; gap: 8px; font: 500 0.9375rem/1.3 var(--titre); }
.audit-form .large, .audit-form .accord, .audit-form button, .audit-merci { grid-column: 1 / -1; }
.audit-form input:not([type=checkbox]), .audit-form select, .audit-form textarea { width: 100%; min-height: 52px; padding: 14px 18px; border: 2px solid transparent; border-radius: 16px;
  background: var(--surface-2); color: var(--ink); font: 400 1rem/1.4 var(--texte); transition: border-color 160ms var(--courbe); }
.audit-form select { appearance: none; background-image: none; }
.audit-form textarea { resize: vertical; }
.audit-form input:focus, .audit-form select:focus, .audit-form textarea:focus { outline: none; border-color: var(--accent); }
.audit-form ::placeholder { color: #7a7a72; }
.audit-form input[aria-invalid="true"] { border-color: #ff8a80; }
.audit-form .erreur { font: 600 0.875rem/1.3 var(--texte); color: #ff8a80; }
.audit-form .accord { display: flex; gap: 12px; align-items: flex-start; font: 400 1rem/1.45 var(--texte); color: var(--muted); }
.audit-form .accord input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.audit-form button { justify-self: start; }
.audit-form.envoye button { display: none; }
.audit-merci { font: 700 var(--step-lead)/1.3 var(--titre); }
.piege { position: absolute; left: -9999px; }

/* Pied : plein écran inversé, la marque sur toute la largeur, découvert par la dernière section. */
.pied { position: sticky; bottom: 0; z-index: 0; min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto auto; padding: 40px var(--marge) 24px;
  background: var(--surface-2); color: var(--ink); }
.pied-colonnes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.pied-colonnes ul { list-style: none; margin: 0; padding: 0; font-size: 1rem; color: var(--muted); }
.pied-colonnes li:first-child { color: var(--ink); font-weight: 600; }
.pied-colonnes li + li { margin-top: 6px; }
.pied-marque { grid-row: 3; width: 100%; height: auto; display: block; margin-bottom: 20px; }
.pied-marque text { font: 700 200px var(--titre); letter-spacing: -0.04em; fill: var(--accent); }
.pied-legal { grid-row: 4; font-size: var(--step-small); color: var(--muted); max-width: 90ch; }

/* Pages légales */
.legal .page { min-height: 100svh; }
.texte-legal { max-width: 68ch; margin: 0 auto; padding: 160px var(--marge) 120px; }
.texte-legal h1 { font-size: var(--step-head); line-height: 1; letter-spacing: -0.03em; margin-bottom: 40px; }
.texte-legal h2 { font-size: 1.375rem; letter-spacing: -0.01em; margin: 40px 0 12px; }
.texte-legal p { color: var(--ink); }
.texte-legal p + p { margin-top: 12px; }

/* Mouvement : le titre monte derrière sa ligne de base, le reste apparaît doucement. */
.js .titre .ligne > span { transform: translateY(105%); }
.js .apparait, .js .entre { opacity: 0; transform: translateY(14px); }
.js.pret .titre .ligne > span { transform: none; transition: transform 900ms var(--courbe); }
.js.pret .titre .ligne:nth-child(2) > span { transition-delay: 110ms; }
.js.pret .apparait { opacity: 1; transform: none; transition: opacity 600ms var(--courbe) 520ms, transform 600ms var(--courbe) 520ms; }
.js .entre.vu { opacity: 1; transform: none; transition: opacity 640ms var(--courbe), transform 640ms var(--courbe); }
.tri-compte.change { animation: pouls 360ms var(--courbe); }
@keyframes pouls { from { opacity: 0.4; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .menu-panneau { animation: none; }
  html { scroll-behavior: auto; }
  .js .titre .ligne > span, .js .apparait, .js .entre { transform: none !important; opacity: 1 !important; transition: none !important; }
  .tri-compte.change { animation: none; }
  .bouton { transition: none; }
}

/* Tablette et téléphone */
@media (max-width: 900px) {
  .barre { grid-template-columns: 1fr auto; padding-top: 24px; }
  .liens { display: none; }
  .hero { grid-template-columns: 1fr; grid-template-rows: 1fr auto auto auto; padding-bottom: 28px; }
  .titre { grid-column: 1; grid-row: 2; font-size: 11.5vw; }
  .exemple { grid-column: 1 / -1; position: static; }
  .controles .colonne { grid-column: 1 / -1; }
  .controles { grid-template-columns: 1fr; }
  .hero-phrase { grid-column: 1; grid-row: 3; margin-top: 24px; font-size: 1.0625rem; padding: 0; }
  .hero-action { grid-column: 1; grid-row: 4; margin-top: 24px; }
  .parcours, .tri, .questions, .audit { grid-template-columns: 1fr; row-gap: 40px; }
  .parcours-texte, .ticket, .tri-tete, .tri-questions, .tri-resultat, .questions h2, .reponses, .audit-tete, .audit-form { grid-column: 1; }
  .ticket { width: 100%; padding: 28px 20px 0; }
  .etape li i { display: none; }
  .etape li { justify-content: space-between; gap: 16px; }
  .etape li b { text-align: right; white-space: normal; }
  .ticket-fin { margin: 28px -20px 0; padding: 0 20px; }
  .tri-tete { display: block; }
  .tri-tete p { margin-top: 16px; }
  .tri-resultat { position: static; }
  .reponses { columns: 1; }
  .grille { display: none; }
  .plans { display: grid; gap: 24px; }
  .plan-bloc { padding: 28px 20px; background: var(--surface); }
  .plan-bloc.choisi { background: var(--accent); color: var(--accent-ink); }
  .plan-nom { font: 700 9vw/1.05 var(--titre); letter-spacing: -0.03em; }
  .plan-bloc dl { margin: 20px 0 24px; }
  .plan-bloc dt { font-size: 1rem; opacity: 0.8; margin-top: 14px; }
  .plan-bloc dd { margin: 2px 0 0; font-size: 1.0625rem; }
  .plan-bloc .bouton { width: 100%; }
  .audit-form { grid-template-columns: 1fr; }
  .audit-form button { width: 100%; }
  .pied-colonnes { grid-template-columns: 1fr 1fr; row-gap: 32px; }
}
