/* ==========================================================================
   Belvolt — feuille de style
   Monde visuel : papiers du véhicule belge (Car-Pass, certificat
   d'immatriculation, plaque rouge sur blanc).
   ========================================================================== */

:root {
  --waves: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='14' viewBox='0 0 120 14'%3E%3Cpath d='M0 7 C 15 1, 15 1, 30 7 S 45 13, 60 7 S 75 1, 90 7 S 105 13, 120 7' fill='none' stroke='%23D3DDEA' stroke-width='0.7'/%3E%3C/svg%3E");
  /* Couleurs */
  --paper:     #FFFFFF;   /* fond de page blanc */
  --paper-hi:  #F3F6FA;   /* zones de champ */
  --sheet:     #FBFCFE;   /* feuille d'attestation */
  --ink:       #0F172A;   /* encre bleu-noir */
  --ink-2:     #475569;   /* encre secondaire */
  --rule:      #B6C1CF;   /* filets */
  --guil:      #CDD6E2;   /* traits guillochés */
  --red:       #2563EB;   /* couleur principale : bleu électrique (foncé pour le texte) */
  --red-deep:  #1D4ED8;
  --eu:        #1E3A8A;   /* bande européenne de la plaque, uniquement */
  --red-fill:  #2563EB;   /* aplat sous du texte blanc */
  --field:     #FFFFFF;   /* fond des champs de formulaire */
  --band:      #0F172A;   /* bandeau d'appel final */
  --band-2:    #1E293B;
  --band-txt:  #CBD5E1;
  --deco:      #C9D6E6; /* ondes et rosaces des bandeaux de titre */
  --switch:    #E2E8F0;     /* rail de l'interrupteur jour/nuit */
  --blue:      #3B82F6;   /* bleu électrique */
  --cyan:      #06B6D4;   /* cyan, en touche dans le dégradé */
  --green:     #10B981;   /* vert émeraude : autonomie, écologie */
  --eco:       #047857;   /* vert foncé, lisible en texte */
  --grad:      linear-gradient(90deg, #3B82F6 0%, #06B6D4 50%, #10B981 100%);
  --switch-on: #FFFFFF;
  color-scheme: light;

  /* Typographie */
  --f-display: "Archivo", "Arial Narrow", sans-serif;
  --f-body:    "Public Sans", "Helvetica Neue", Arial, sans-serif;
  --f-data:    "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --t-xs:   0.75rem;
  --t-sm:   0.875rem;
  --t-base: 1.0625rem;
  --t-md:   1.25rem;
  --t-lg:   clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --t-xl:   clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  --t-xxl:  clamp(2.5rem, 1.5rem + 4.4vw, 5rem);

  /* Espacements */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4.5rem;
  --s-9: 7rem;

  --gutter: 16px;
  --max: 1240px;
  --radius: 2px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Mode nuit : suit le réglage de l'appareil, sauf choix explicite du visiteur (bouton soleil/lune) */
:root[data-theme="dark"] {
  --waves: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='14' viewBox='0 0 120 14'%3E%3Cpath d='M0 7 C 15 1, 15 1, 30 7 S 45 13, 60 7 S 75 1, 90 7 S 105 13, 120 7' fill='none' stroke='%23293548' stroke-width='0.7'/%3E%3C/svg%3E");
  --paper:     #0B1120;
  --paper-hi:  #131B2E;
  --sheet:     #0F172A;
  --ink:       #E2E8F0;
  --ink-2:     #94A3B8;
  --rule:      #334155;
  --guil:      #1E293B;
  --red:       #60A5FA;   /* bleu éclairci : lisible sur fond nuit */
  --red-deep:  #1D4ED8;
  --red-fill:  #2563EB;
  --field:     #131B2E;
  --band:      #050914;
  --band-2:    #172033;
  --band-txt:  #B6C2D3;
  --deco:      #2B3A52;
  --switch:    #1E293B;
  --eco:       #34D399;
  --switch-on: #334155;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --waves: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='14' viewBox='0 0 120 14'%3E%3Cpath d='M0 7 C 15 1, 15 1, 30 7 S 45 13, 60 7 S 75 1, 90 7 S 105 13, 120 7' fill='none' stroke='%23293548' stroke-width='0.7'/%3E%3C/svg%3E");
    --paper:     #0B1120;
    --paper-hi:  #131B2E;
    --sheet:     #0F172A;
    --ink:       #E2E8F0;
    --ink-2:     #94A3B8;
    --rule:      #334155;
    --guil:      #1E293B;
    --red:       #60A5FA;   /* bleu éclairci : lisible sur fond nuit */
    --red-deep:  #1D4ED8;
    --red-fill:  #2563EB;
    --field:     #131B2E;
    --band:      #050914;
    --band-2:    #172033;
    --band-txt:  #B6C2D3;
    --deco:      #2B3A52;
    --switch:    #1E293B;
    --eco:       #34D399;
    --switch-on: #334155;
    color-scheme: dark;
}
}

@media (min-width: 768px) { :root { --gutter: 32px; } }
@media (min-width: 1280px) { :root { --gutter: 48px; } }
@media (min-width: 1800px) { :root { --max: 1440px; --gutter: 64px; } html { font-size: 106.25%; } }

/* --- Base ---------------------------------------------------------------- */

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

/* Les fines ondes du papier sécurisé ne couvrent que le bandeau de titre ; le reste est uni */
.hero, .page-head { background-image: var(--waves); }

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--rule) var(--paper);
}

body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--t-base);
  line-height: 1.6;
  font-feature-settings: "tnum" 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--red-fill); color: #fff; }

img, svg { max-width: 100%; display: block; }

[hidden] { display: none !important; }

figure { margin: 0; }

a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--red); }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute; left: var(--s-4); top: -100px;
  background: var(--ink); color: var(--paper); padding: var(--s-2) var(--s-4);
  z-index: 100;
}
.skip:focus { top: var(--s-4); }
.skip:hover { color: var(--paper); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Données mesurées : chiffres alignés */
.num, .data { font-family: var(--f-data); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* --- Plaque (logo + objets) --------------------------------------------- */

.plate {
  display: inline-flex;
  align-items: stretch;
  background: #fff;
  border: 2px solid var(--red);
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(21, 32, 46, 0.18), 0 2px 6px rgba(21, 32, 46, 0.08);
  text-decoration: none;
  color: var(--red);
  overflow: hidden;
}
.plate__eu {
  background: var(--eu);
  color: #fff;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 0.7em;
  display: grid;
  place-items: end center;
  padding: 0.25em 0.35em 0.2em;
  min-width: 1.5em;
}
.plate__txt {
  font-family: var(--f-display);
  font-stretch: 75%;
  font-variation-settings: "wdth" 75;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15em 0.55em 0.1em;
  line-height: 1.25;
  white-space: nowrap;
}

/* --- En-tête ------------------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
  transition: transform 420ms var(--ease-out), box-shadow 300ms ease;
}
.site-header.is-scrolled { box-shadow: 0 10px 28px -20px rgba(21, 32, 46, 0.45); }
.site-header.is-hidden { transform: translateY(-101%); }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  min-height: 68px;
}
/* Logo : mot-symbole Belvolt, un éclair rouge derrière le t final */
.logo {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--ink); text-decoration: none;
  font-size: 1.75rem;
}
.logo__word {
  font-family: var(--f-display); font-weight: 800;
  font-stretch: 92%; font-variation-settings: "wdth" 92;
  letter-spacing: -0.035em; line-height: 1;
  padding-right: 0.3em;
  /* liseré couleur papier : les lettres restent lisibles sur l'éclair */
  -webkit-text-stroke: 0.07em var(--paper); paint-order: stroke fill;
}
.logo__t { position: relative; display: inline-block; isolation: isolate; }
.logo__t::before {
  content: ""; position: absolute; z-index: -1;
  width: 1.01em; height: 1.4em; left: 50%; top: 50%;
  transform: translate(-44%, -46%) rotate(12deg);
  background: var(--red);
  clip-path: polygon(64% 0, 8% 58%, 44% 58%, 27% 100%, 94% 39%, 57% 39%, 77% 0);
  transition: transform 260ms var(--ease-out);
}
.logo:hover .logo__t::before { transform: translate(-44%, -46%) rotate(0deg) scale(1.06); }
@media (prefers-reduced-motion: reduce) { .logo__t::before { transition: none; } }


.nav-toggle {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: 44px; min-width: 44px; padding: 0 var(--s-3);
  background: transparent; border: 1px solid var(--ink); border-radius: var(--radius);
  font: 600 var(--t-sm) / 1 var(--f-body); color: var(--ink); cursor: pointer;
}
.nav-toggle svg { width: 18px; height: 18px; }

.site-nav {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  display: none;
}
.site-nav.is-open { display: block; }
.site-nav ul { list-style: none; margin: 0; padding: var(--s-2) var(--gutter) var(--s-4); }
.site-nav a {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 52px; border-bottom: 1px solid var(--guil);
  font-family: var(--f-display); font-weight: 600; font-size: var(--t-md);
  text-decoration: none;
}
.site-nav a[aria-current="page"] { color: var(--red); }

@media (min-width: 860px) {
  .nav-toggle { display: none; }
  .site-nav { margin-left: auto; }
  .site-nav { position: static; display: block; border: 0; background: none; }
  .site-nav ul { display: flex; gap: var(--s-6); padding: 0; }
  .site-nav a {
    min-height: 44px; border: 0; font-size: var(--t-base);
    border-bottom: 2px solid transparent;
  }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--red); color: var(--ink); }
  .site-nav a:hover { color: var(--red); }
}

/* --- Boutons ------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-3);
  min-height: 52px; padding: 0 var(--s-5);
  border-radius: var(--radius);
  font-family: var(--f-display); font-weight: 700; font-size: var(--t-base);
  letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer;
  border: 2px solid transparent;
  transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
.btn svg { width: 18px; height: 18px; flex: none; transition: transform 200ms var(--ease-out); }
.btn:hover svg { transform: translateX(3px); }
.btn--primary { background: var(--red-fill); color: #fff; }
.btn--primary:hover { background: var(--red-deep); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.btn[disabled]:hover svg { transform: none; }

/* --- Libellés de champ (documents uniquement) --------------------------- */

.field {
  font-family: var(--f-data);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-2);
  font-weight: 500;
}

/* --- Rosace guillochée -------------------------------------------------- */

.rosette { color: var(--deco); pointer-events: none; }
.rosette g { transform-origin: 500px 500px; transform: translateY(var(--shift, 0px)) rotate(var(--rot, 0deg)); will-change: transform; }
.rosette path { fill: none; stroke: currentColor; stroke-width: 0.6; vector-effect: non-scaling-stroke; }

/* ==========================================================================
   ACCUEIL
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--s-7) var(--s-8);
  border-bottom: 1px solid var(--rule);
}
.hero__rosette {
  position: absolute;
  width: min(900px, 140vw);
  aspect-ratio: 1;
  right: -38%;
  top: -10%;
  z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-7); }

.hero h1 {
  font-size: var(--t-xxl);
  font-weight: 800;
  font-stretch: 85%;
  font-variation-settings: "wdth" 85;
  letter-spacing: -0.03em;
  line-height: 0.98;
  max-width: 13ch;
}
.hero h1 em { font-style: normal; color: var(--red); }
.hero__lede { margin-top: var(--s-5); font-size: var(--t-md); line-height: 1.5; max-width: 34ch; color: var(--ink); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }
.hero__note { margin-top: var(--s-4); font-size: var(--t-sm); color: var(--ink-2); }

@media (min-width: 1024px) {
  .hero { padding-block: var(--s-8) var(--s-9); }
  .hero__grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; gap: var(--s-8); }
  .hero__rosette { right: -12%; top: -18%; width: 860px; }
  /* l'accueil remplit l'écran : la section suivante commence sous le pli */
  .hero { min-height: calc(100vh - var(--header-h, 69px)); min-height: calc(100svh - var(--header-h, 69px)); display: flex; flex-direction: column; justify-content: center; }
  .hero > .wrap { width: 100%; }
}

/* --- Document / attestation ------------------------------------------- */

.doc {
  position: relative;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: 0 1px 1px rgba(21, 32, 46, 0.06), 0 12px 32px -12px rgba(21, 32, 46, 0.22);
  overflow: hidden;
}
.doc::before {
  /* liseré imprimé du document */
  content: "";
  position: absolute; inset: 6px;
  border: 1px solid var(--guil);
  pointer-events: none;
}
.doc__head {
  position: relative;
  display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-4);
  padding: var(--s-5) var(--s-5) var(--s-4);
  border-bottom: 1px solid var(--rule);
}
.doc__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-stretch: 80%;
  font-variation-settings: "wdth" 80;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: var(--t-md);
  line-height: 1.1;
}
.doc__sub { font-size: var(--t-sm); color: var(--ink-2); margin-top: var(--s-1); }
.doc__body { position: relative; padding: var(--s-4) var(--s-5) var(--s-5); }

.doc__fields { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin: 0; border-top: 1px solid var(--guil); }
.doc__fields > div { padding: var(--s-3) 0; border-bottom: 1px solid var(--guil); }
.doc__fields > div:nth-child(odd) { padding-right: var(--s-3); border-right: 1px solid var(--guil); }
.doc__fields > div:nth-child(even) { padding-left: var(--s-4); }
.doc__fields dt { margin-bottom: 2px; }
.doc__fields dd { margin: 0; font-family: var(--f-data); font-size: var(--t-sm); font-weight: 500; }

.doc__result { margin-top: var(--s-4); }
.doc__result ol { list-style: none; margin: var(--s-2) 0 0; padding: 0; }
.doc__result li {
  display: grid; grid-template-columns: 2rem 1fr auto; align-items: baseline;
  gap: var(--s-2); padding: var(--s-2) 0; border-bottom: 1px dashed var(--rule);
}
.doc__result .pos { font-family: var(--f-data); font-size: var(--t-sm); color: var(--red); font-weight: 500; }
.doc__result .name { font-family: var(--f-display); font-weight: 700; font-size: var(--t-md); line-height: 1.2; }
a.name { color: inherit; text-decoration: none; text-underline-offset: 3px; }
a.name:hover { color: var(--red); text-decoration: underline; text-decoration-color: var(--red); }
.doc__result .score { font-family: var(--f-data); font-size: var(--t-sm); }

.stamp {
  position: absolute;
  right: var(--s-4); bottom: var(--s-4);
  width: 116px; height: 116px;
  color: var(--red);
  transform: rotate(-12deg);
  opacity: 0.88;
  mix-blend-mode: multiply;
}
.stamp text { font-family: var(--f-data); font-size: 9.5px; letter-spacing: 0.12em; fill: currentColor; text-transform: uppercase; }
.stamp .stamp__date { font-size: 7px; letter-spacing: 0.02em; }
.stamp .stamp__mid { font-family: var(--f-display); font-size: 17px; font-weight: 800; letter-spacing: 0.02em; }

.hero__doc { max-width: 480px; justify-self: end; width: 100%; }
.hero__doc .doc__body { padding-bottom: 104px; }
.hero__doc .stamp { width: 100px; height: 100px; bottom: 4px; right: 22px; }

/* --- Sections ------------------------------------------------------------ */

.section { padding-block: var(--s-8); }
.section + .section { border-top: 1px solid var(--rule); }
.section__head { display: grid; gap: var(--s-4); margin-bottom: var(--s-6); }
.section__head h2 { font-size: var(--t-xl); font-stretch: 85%; font-variation-settings: "wdth" 85; max-width: 18ch; }
.section__head p { color: var(--ink-2); max-width: 52ch; }

@media (min-width: 1024px) {
  .section { padding-block: var(--s-9); }
  .section__head { grid-template-columns: 5fr 7fr; align-items: end; gap: var(--s-8); margin-bottom: var(--s-7); }
}

/* Photos des modèles : image recadrée en 16:9, ou silhouette au trait tant qu'il n'y a pas de photo */
.photo {
  display: block; position: relative; overflow: hidden;
  aspect-ratio: 16 / 9; background: var(--paper-hi);
}
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo picture { display: contents; }
.photo--sil { display: grid; place-items: center; color: var(--ink-2); }
.photo--sil svg { width: 78%; height: auto; }

.fiche__photo { margin: 0 0 var(--s-6); }
.fiche__photo .photo { border: 1px solid var(--rule); border-radius: var(--radius); }
.fiche__photo .photo--sil svg { width: 56%; }
.fiche__photo--small { max-width: 620px; }
.fiche__photo figcaption { margin-top: var(--s-2); font-size: var(--t-xs); color: var(--ink-2); font-family: var(--f-data); }
.fiche__photo figcaption:empty { display: none; }

.jour__photo { display: block; position: relative; border-bottom: 1px solid var(--rule); }
.jour__photo .photo--sil svg { width: 62%; }
.jour__credit { position: absolute; right: var(--s-3); bottom: var(--s-2); font-family: var(--f-data); font-size: 0.625rem; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); }
.jour__doc { position: relative; }
.jour__doc .jour__photo + .doc__head { position: relative; }

.pick__img { width: 112px; border: 1px solid var(--guil); align-self: center; }
@media (min-width: 600px) { .pick__img { width: 160px; } }

@media (min-width: 1360px) {
  .cat { grid-template-columns: 128px minmax(0, 1.4fr) minmax(0, 2.6fr) 44px; }
  .cat .cat__specs { grid-template-columns: 1.3fr 1fr 1fr 0.5fr; gap: var(--s-3); }
  .cat .cat__specs > span:last-child .k { display: none; }
}

/* Le modèle du jour */
.jour__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); align-items: start; }
.jour__intro { display: grid; gap: var(--s-3); align-content: start; }
.jour__intro h2 { font-size: var(--t-xl); font-stretch: 85%; font-variation-settings: "wdth" 85; max-width: 12ch; }
.jour__intro p { color: var(--ink-2); max-width: 44ch; }
.jour__date { color: var(--red) !important; font-size: var(--t-sm); font-weight: 500; }
.jour__brand { color: var(--ink-2); font-size: 0.9375rem; }
.jour__name {
  font-family: var(--f-display); font-weight: 800; font-stretch: 85%; font-variation-settings: "wdth" 85;
  font-size: var(--t-xl); line-height: 1; letter-spacing: -0.025em; margin-top: var(--s-1);
}
.jour__name a { color: inherit; text-decoration: none; }
.jour__name a:hover { color: var(--red); }
.jour__doc .plate { font-size: 0.8rem; flex: none; }
.jour__fact {
  display: grid; gap: var(--s-1);
  margin: var(--s-2) 0 var(--s-4); padding: var(--s-1) 0 var(--s-1) var(--s-4);
  border-left: 3px solid var(--red);
  font-family: var(--f-display); font-weight: 700; font-size: var(--t-md); line-height: 1.3; max-width: 34ch;
}
.jour__fact .field { color: var(--red); font-family: var(--f-data); font-weight: 500; }
.jour__more { margin-top: var(--s-4); color: var(--ink-2); font-size: var(--t-sm); }
.jour__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
@media (max-width: 479px) { .jour__actions .btn { width: 100%; justify-content: center; } }
/* Pliants ouverts et petites tablettes : déjà en deux colonnes, pour que la photo ne prenne pas tout l'écran */
@media (min-width: 640px) and (max-width: 1023px) {
  .jour__grid { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--s-6); }
  .jour__intro { position: sticky; top: 100px; }
  .jour__intro h2 { font-size: var(--t-lg); }
  .jour__intro p { font-size: var(--t-sm); }
}
@media (min-width: 1024px) {
  .jour__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-8); }
  .jour__intro { position: sticky; top: 110px; }
}

/* Registre des rubriques */
.register { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.register li { border-bottom: 1px solid var(--rule); }
.register a, .register .row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s-2) var(--s-5);
  padding: var(--s-5) 0;
  text-decoration: none;
}
.register h3 { font-size: var(--t-lg); font-stretch: 85%; font-variation-settings: "wdth" 85; }
.register p { grid-column: 1 / -1; color: var(--ink-2); max-width: 60ch; }
.register .state { align-self: start; justify-self: end; white-space: nowrap; padding-top: 0.4em; }
.register .state--live { color: var(--red); }
.register a:hover h3 { color: var(--red); }
.register a .arrow { display: inline-block; transition: transform 200ms var(--ease-out); }
.register a:hover .arrow { transform: translateX(4px); }

@media (min-width: 768px) {
  .register a, .register .row { grid-template-columns: 16rem 1fr auto; align-items: baseline; padding: var(--s-6) 0; }
  .register p { grid-column: 2; grid-row: 1; }
  .register .state { grid-column: 3; padding-top: 0; }
}

/* Considérations (liste définie) */
.considerations { margin: 0; display: grid; gap: 0; }
.considerations > div {
  display: grid; gap: var(--s-3);
  padding: var(--s-5) 0;
  border-top: 1px solid var(--rule);
}
.considerations dt { font-family: var(--f-display); font-weight: 700; font-size: var(--t-md); line-height: 1.25; }
.considerations dd { margin: 0; color: var(--ink); max-width: 62ch; }
.considerations dd p + p { margin-top: var(--s-3); }

@media (min-width: 900px) {
  .considerations { grid-template-columns: 1fr 1fr; column-gap: var(--s-8); }
}

/* Bandeau d'appel final */
.closing {
  background: var(--band);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.closing .rosette { color: var(--band-2); position: absolute; width: 700px; aspect-ratio: 1; left: -240px; top: -260px; }
.closing .wrap { position: relative; display: grid; gap: var(--s-6); padding-block: var(--s-8); }
.closing h2 { font-size: var(--t-xl); font-stretch: 85%; font-variation-settings: "wdth" 85; max-width: 20ch; }
.closing p { color: var(--band-txt); max-width: 46ch; margin-top: var(--s-4); }
.closing .btn--ghost { color: #fff; border-color: #fff; }
.closing .btn--ghost:hover { background: #fff; color: #15202E; }
.closing :focus-visible { outline-color: #fff; }
@media (min-width: 900px) {
  .closing .wrap { grid-template-columns: 1fr auto; align-items: end; padding-block: var(--s-9); }
}

/* --- Pied de page -------------------------------------------------------- */

.site-footer { padding-block: var(--s-7) var(--s-6); font-size: var(--t-sm); color: var(--ink-2); }
.site-footer .wrap { display: grid; gap: var(--s-6); }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.site-footer nav a { display: inline-flex; min-height: 44px; align-items: center; }
.site-footer .partner { border-top: 1px solid var(--rule); padding-top: var(--s-5); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-4); }
@media (min-width: 900px) {
  .site-footer .top { display: flex; justify-content: space-between; align-items: center; }
}

/* --- Avis données provisoires ------------------------------------------- */

.notice {
  display: flex; gap: var(--s-3); align-items: flex-start;
  padding: var(--s-3) var(--s-4);
  border: 1px dashed var(--red);
  border-radius: var(--radius);
  background: var(--paper-hi);
  font-size: var(--t-sm);
  color: var(--ink);
}
.notice svg { width: 18px; height: 18px; flex: none; color: var(--red); margin-top: 3px; }

/* ==========================================================================
   CLASSEMENT
   ========================================================================== */

.page-head { padding-block: var(--s-7) var(--s-6); border-bottom: 1px solid var(--rule); position: relative; overflow: hidden; }
.page-head .rosette { position: absolute; width: 620px; aspect-ratio: 1; right: -260px; top: -240px; }
.page-head .wrap { position: relative; display: grid; gap: var(--s-5); }
.page-head h1 { font-size: var(--t-xl); font-weight: 800; font-stretch: 85%; font-variation-settings: "wdth" 85; letter-spacing: -0.025em; max-width: 16ch; }
.page-head p { max-width: 58ch; color: var(--ink); }
@media (min-width: 1024px) {
  .page-head { padding-block: var(--s-8) var(--s-7); }
  .page-head .wrap { grid-template-columns: 7fr 5fr; align-items: end; gap: var(--s-8); }
}

.toolbar {
  display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-6);
  align-items: flex-end; justify-content: space-between;
  padding-block: var(--s-5);
}
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); border: 0; padding: 0; margin: 0; }
.chips legend { margin-bottom: var(--s-2); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-4);
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--paper-hi); font-size: var(--t-sm); font-weight: 600; cursor: pointer;
  transition: border-color 120ms, background-color 120ms;
}
.chip span:hover { border-color: var(--ink); }
.chip input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }

.select { display: grid; gap: var(--s-2); }
.select select {
  min-height: 44px; padding: 0 2.25rem 0 var(--s-3);
  border: 1px solid var(--ink); border-radius: var(--radius);
  background: var(--paper-hi) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2315202E' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 0.8rem center;
  appearance: none; font: 600 var(--t-sm) var(--f-body); color: var(--ink); cursor: pointer;
}

.ledger { border-top: 2px solid var(--ink); margin-block: var(--s-5) var(--s-8); }
.ledger__head { display: none; }
.ledger__row {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: var(--s-1) var(--s-3);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--rule);
}
.ledger__rank {
  grid-row: 1 / span 2;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.9rem;
  font-stretch: 75%;
  font-variation-settings: "wdth" 75;
  line-height: 1;
  color: var(--ink);
}
.ledger__row:nth-child(-n+3) .ledger__rank { color: var(--red); }
.ledger__model { font-family: var(--f-display); font-weight: 700; font-size: var(--t-md); line-height: 1.2; }
.ledger__model small { display: block; font-family: var(--f-body); font-weight: 400; font-size: var(--t-sm); color: var(--ink-2); }
.ledger__specs { grid-column: 2; display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); font-size: var(--t-sm); }
.ledger__specs .k { color: var(--ink-2); font-family: var(--f-body); }
.ledger__specs .pending { color: var(--ink-2); font-style: italic; font-family: var(--f-body); }
.ledger__empty { padding: var(--s-6) 0; color: var(--ink-2); }

@media (min-width: 900px) {
  .ledger__head, .ledger__row {
    display: grid;
    grid-template-columns: 4.5rem minmax(14rem, 2.4fr) 1fr 1fr 0.7fr 1.2fr;
    gap: var(--s-4);
    align-items: baseline;
  }
  .ledger__head { padding: var(--s-3) 0; border-bottom: 1px solid var(--ink); }
  .ledger__head .r { text-align: right; }
  .ledger__row { padding: var(--s-4) 0; }
  .ledger__rank { grid-row: auto; font-size: 2.25rem; }
  .ledger__specs { display: contents; }
  .ledger__specs > span { font-family: var(--f-data); font-size: var(--t-sm); }
  .ledger__specs > span.r { text-align: right; }
  .ledger__specs .k { display: none; }
  .ledger__row:hover { background: var(--paper-hi); }
}

/* ==========================================================================
   QUESTIONNAIRE
   ========================================================================== */

.quiz { padding-block: var(--s-6) var(--s-8); }
.quiz__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
@media (min-width: 1024px) {
  .quiz__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: var(--s-7); align-items: start; }
  .quiz__aside { position: sticky; top: 92px; }
}

.form-sheet { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); }
.form-sheet__bar {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  padding: var(--s-3) var(--s-5);
  border-bottom: 1px solid var(--rule);
}
.progress { display: flex; gap: 3px; flex: 1; max-width: 220px; }
.progress span { height: 6px; flex: 1; background: var(--guil); }
.progress span.is-done { background: var(--ink); }
.progress span.is-current { background: var(--red); }

.step { padding: var(--s-6) var(--s-5) var(--s-5); border: 0; margin: 0; min-width: 0; }
.step[hidden] { display: none; }
.step legend { padding: 0; float: left; width: 100%; }
.step legend + * { clear: both; }
.step__q { font-family: var(--f-display); font-weight: 800; font-stretch: 85%; font-variation-settings: "wdth" 85; font-size: var(--t-lg); line-height: 1.12; letter-spacing: -0.02em; display: block; margin-top: var(--s-2); max-width: 24ch; }
.step__help { color: var(--ink-2); margin-top: var(--s-3); max-width: 56ch; font-size: var(--t-base); }

.options { display: grid; gap: var(--s-2); margin-top: var(--s-5); }
@media (min-width: 600px) { .options--2 { grid-template-columns: 1fr 1fr; } }

.option { position: relative; display: block; }
.option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.option__box {
  display: grid; grid-template-columns: 22px 1fr; gap: var(--s-3); align-items: start;
  padding: var(--s-4);
  min-height: 56px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--paper-hi);
  transition: border-color 120ms, background-color 120ms;
}
.option__tick {
  width: 22px; height: 22px; border: 1.5px solid var(--ink); border-radius: 1px;
  display: grid; place-items: center; background: var(--field); margin-top: 1px;
}
.option__tick svg { width: 14px; height: 14px; color: var(--red); opacity: 0; transform: scale(0.6); transition: opacity 120ms, transform 160ms var(--ease-out); }
.option__label { font-weight: 600; line-height: 1.35; }
.option__label small { display: block; font-weight: 400; color: var(--ink-2); font-size: var(--t-sm); margin-top: 2px; }
.option:hover .option__box { border-color: var(--ink); }
.option input:checked + .option__box { border-color: var(--ink); background: var(--field); box-shadow: inset 0 0 0 1px var(--ink); }
.option input:checked + .option__box .option__tick svg { opacity: 1; transform: scale(1); }
.option input:focus-visible + .option__box { outline: 2px solid var(--red); outline-offset: 2px; }

.step__nav {
  display: flex; justify-content: space-between; gap: var(--s-3);
  padding: var(--s-4) var(--s-5) var(--s-5);
  border-top: 1px solid var(--guil);
}
.step__error { color: var(--red); font-size: var(--t-sm); padding: 0 var(--s-5); min-height: 1.4em; }

/* Curseur gradué du questionnaire : une règle d'arpenteur, la valeur exacte à côté */
.gauge {
  --thumb: 18px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-3);
  grid-template-areas: "read" "scale" "plus";
  margin-top: var(--s-5);
  padding: var(--s-5) var(--s-4) var(--s-4);
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--paper-hi);
}
.gauge__read { grid-area: read; margin: 0; display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); }
.gauge__val {
  font-family: var(--f-data); font-weight: 500; font-size: var(--t-lg); line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: -0.03em; white-space: nowrap; color: var(--ink);
}
.gauge.is-over .gauge__val { color: var(--red); }
.gauge__scale { grid-area: scale; position: relative; padding-bottom: 1.6rem; container-type: inline-size; }
.gauge__scale input[type="range"] { height: 44px; display: block; position: relative; z-index: 1; }
.gauge__scale input[type="range"]:disabled { cursor: not-allowed; }
.gauge__scale input[type="range"]:disabled::-webkit-slider-thumb { background: var(--ink-2); }
.gauge__scale input[type="range"]:disabled::-moz-range-thumb { background: var(--ink-2); }
/* graduations alignées sur la course du pouce, pas sur la largeur du champ */
.gauge__ticks, .gauge__labels { position: absolute; left: calc(var(--thumb) / 2); right: calc(var(--thumb) / 2); }
.gauge__ticks { top: 30px; height: 12px; }
.gauge__tick {
  position: absolute; top: 0; left: calc(var(--x) * 100%);
  width: 1px; height: 6px; background: var(--rule);
  transition: background-color 120ms, height 160ms var(--ease-out);
}
.gauge__tick.is-major { height: 11px; }
.gauge__tick.is-on { background: var(--ink); }
.gauge__labels { bottom: 0; height: 1rem; }
.gauge__label {
  position: absolute; left: calc(var(--x) * 100%); transform: translateX(-50%);
  font-family: var(--f-data); font-size: 0.6875rem; color: var(--ink-2); white-space: nowrap; line-height: 1;
}
.gauge__label.is-first { transform: translateX(-4px); }
.gauge__label.is-last { transform: translateX(calc(-100% + 4px)); }
.gauge__label.is-minor { display: none; }
.gauge__plus { grid-area: plus; border-top: 1px solid var(--guil); padding-top: var(--s-2); display: grid; gap: var(--s-2); }
.gauge__exact { display: grid; gap: var(--s-1); padding-bottom: var(--s-1); }
.gauge__exact[hidden] { display: none; }
.gauge__exact-in { display: flex; align-items: center; gap: var(--s-2); font-family: var(--f-data); font-size: var(--t-sm); }
.gauge__exact-in .input { width: 11ch; font-family: var(--f-data); }

@media (min-width: 600px) {
  .gauge { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "scale read" "plus plus"; column-gap: var(--s-5); padding: var(--s-5); }
  .gauge__read { flex-direction: column; align-items: flex-end; gap: var(--s-2); min-width: 9.5ch; padding-top: 2px; }
}
@container (min-width: 440px) { .gauge__label.is-minor { display: block; } }

/* Récapitulatif qui se remplit */
.recap .doc__fields { grid-template-columns: minmax(0, 1fr); }
.recap .doc__fields > div:nth-child(odd) { border-right: 0; padding-right: 0; }
.recap .doc__fields > div:nth-child(even) { padding-left: 0; }
.recap .doc__fields > div { display: grid; grid-template-columns: 9.5rem 1fr; gap: var(--s-3); align-items: baseline; }
.recap dd.is-empty { color: var(--rule); }
.recap__note { margin-top: var(--s-4); font-size: var(--t-sm); color: var(--ink-2); }

/* Résultat */
.result { padding-block: var(--s-2) var(--s-8); }
.result[hidden] { display: none; }
.result .doc { max-width: 920px; }
.result .doc__head { padding: var(--s-5); }
.result .doc__title { font-size: var(--t-lg); }
.result .doc__head { min-height: 136px; }
@media (max-width: 479px) { .result .doc__fields { grid-template-columns: minmax(0, 1fr); } .result .doc__fields > div:nth-child(odd) { border-right: 0; padding-right: 0; } .result .doc__fields > div:nth-child(even) { padding-left: 0; } }
.result .stamp { top: 16px; bottom: auto; right: var(--s-5); width: 104px; height: 104px; }
.result .doc__head > div:first-child { padding-right: 110px; }

.picks { list-style: none; margin: 0; padding: 0; }
.pick { padding: var(--s-5) 0; border-bottom: 1px solid var(--guil); display: grid; gap: var(--s-3); }
.pick__top { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s-3) var(--s-4); align-items: center; }
.pick__top .pick__img { grid-column: 2; grid-row: 1; justify-self: start; }
.pick__top .pick__name { grid-column: 1 / -1; grid-row: 2; }
.pick__top .pick__score { grid-column: 3; grid-row: 1; }
@media (min-width: 600px) {
  .pick__top { grid-template-columns: auto auto minmax(0, 1fr) auto; }
  .pick__top .pick__img { grid-column: 2; }
  .pick__top .pick__name { grid-column: 3; grid-row: 1; }
  .pick__top .pick__score { grid-column: 4; }
}
.pick__pos { font-family: var(--f-display); font-weight: 800; font-stretch: 75%; font-variation-settings: "wdth" 75; font-size: 2rem; line-height: 1; color: var(--red); }
.pick__name { font-family: var(--f-display); font-weight: 700; font-size: var(--t-lg); line-height: 1.1; }
.pick__name small { display: block; font-family: var(--f-body); font-weight: 400; font-size: var(--t-sm); color: var(--ink-2); margin-top: 2px; }
.pick__score { text-align: right; }
.pick__score b { display: block; font-family: var(--f-data); font-size: var(--t-md); font-weight: 500; }
.pick__specs { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-5); font-family: var(--f-data); font-size: var(--t-sm); }
.pick__specs span span { font-family: var(--f-body); color: var(--ink-2); }
.pick__why { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--s-1); font-size: var(--t-sm); }
.pick__why li { display: grid; grid-template-columns: 16px 1fr; gap: var(--s-2); }
.pick__why svg { width: 14px; height: 14px; margin-top: 4px; }
.pick__why .ok svg { color: var(--ink); }
.pick__why .warn svg { color: var(--red); }

.others { margin-top: var(--s-5); }
.others ul { list-style: none; padding: 0; margin: var(--s-2) 0 0; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); font-size: var(--t-sm); }
.others li b { font-weight: 600; }

.result__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }

@media (min-width: 768px) {
  .result .doc__head, .result .doc__body { padding-inline: var(--s-6); }
  .result .doc__head { min-height: 156px; }
  .result .stamp { width: 124px; height: 124px; right: var(--s-6); top: 16px; }
  .result .doc__head > div:first-child { padding-right: 140px; }
}

/* ==========================================================================
   ÉLÉMENTS PARTAGÉS : champs, liens, mentions
   ========================================================================== */

.muted { color: var(--ink-2); font-style: italic; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--red); text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.linklike:hover { color: var(--red-deep); }
.credits { font-size: var(--t-xs); }
.credits a { color: inherit; }

.input {
  width: 100%;
  min-height: 46px;
  padding: 0 var(--s-3);
  border: 1px solid var(--rule);
  border-bottom: 1.5px solid var(--ink);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--paper-hi);
  font: 500 var(--t-base) / 1.2 var(--f-body);
  color: var(--ink);
  caret-color: var(--red);
  transition: border-color 150ms, background-color 150ms;
}
.input:hover { border-color: var(--ink); }
.input:focus { outline: none; background: var(--field); border-color: var(--ink); box-shadow: 0 2px 0 0 var(--red); }
.input::placeholder { color: #7A8597; }
select.input {
  appearance: none; padding-right: 2.25rem; cursor: pointer;
  background: var(--paper-hi) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2315202E' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 0.8rem center;
}

.check { display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-sm); min-height: 44px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }

/* Curseur : filet fin, rempli à l'encre jusqu'au pouce */
input[type="range"] {
  --fill: 0%;
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 32px; margin: 0; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  background: linear-gradient(to right, var(--ink) var(--fill), var(--rule) var(--fill));
}
input[type="range"]::-moz-range-track { height: 3px; background: var(--rule); }
input[type="range"]::-moz-range-progress { height: 3px; background: var(--ink); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 18px; height: 22px; margin-top: -9.5px;
  background: var(--red); border: 2px solid #fff; border-radius: 2px;
  box-shadow: 0 1px 3px rgba(21, 32, 46, 0.35);
  transition: transform 150ms var(--ease-out);
}
input[type="range"]::-moz-range-thumb {
  width: 14px; height: 18px; background: var(--red); border: 2px solid #fff; border-radius: 2px;
  box-shadow: 0 1px 3px rgba(21, 32, 46, 0.35);
}
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--red); outline-offset: 3px; }
input[type="range"]:focus-visible::-moz-range-thumb { outline: 2px solid var(--red); outline-offset: 3px; }

/* ==========================================================================
   CATALOGUE
   ========================================================================== */

.catalogue { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); padding-block: var(--s-6) var(--s-8); align-items: start; }

.filters-toggle { justify-self: start; }
.filters-toggle svg { width: 18px; height: 18px; }
.filters-toggle:hover svg { transform: none; }

.filters { display: none; padding: 0 var(--s-5) var(--s-5); }
.filters.is-open { display: block; }
.filters__head { display: flex; justify-content: space-between; align-items: center; padding: var(--s-4) 0; border-bottom: 1px solid var(--rule); margin-bottom: var(--s-2); }
.filters__reset { background: none; border: 0; font: 600 var(--t-sm) var(--f-body); color: var(--red); cursor: pointer; min-height: 44px; padding: 0; text-decoration: underline; text-underline-offset: 0.2em; }
.filters__group { border: 0; margin: 0; padding: var(--s-4) 0; border-bottom: 1px solid var(--guil); min-width: 0; display: grid; gap: var(--s-2); }
.filters__group legend { padding: 0; margin-bottom: var(--s-2); }
.filters .chips { gap: 6px; }
.filters .chip span { min-height: 40px; padding: 0 var(--s-3); }
.range { grid-template-columns: 1fr auto; align-items: baseline; }
.range input[type="range"], .range .check { grid-column: 1 / -1; }
.range__out { font-size: var(--t-sm); font-weight: 500; }
.filters__apply { width: 100%; margin-top: var(--s-5); }

@media (min-width: 1024px) {
  .catalogue { grid-template-columns: 300px minmax(0, 1fr); gap: var(--s-7); }
  .filters-toggle { display: none; }
  .filters { display: block; position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow: auto; scrollbar-width: thin; }
  .filters__apply { display: none; }
  .results { grid-column: 2; grid-row: 1; }
  .filters { grid-column: 1; grid-row: 1; }
}

.results__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: var(--s-4); padding-bottom: var(--s-4); border-bottom: 2px solid var(--ink); }
.results__count { font-size: var(--t-lg); font-stretch: 85%; font-variation-settings: "wdth" 85; }
.results__count .data { font-family: var(--f-display); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; color: var(--red); }

.catalog { display: grid; align-content: start; }
/* Rappel quand la liste filtrée est plus haut que l'écran */
#res-title { scroll-margin-top: 116px; }
.cat-up { position: sticky; top: 104px; height: 0; z-index: 5; display: flex; justify-content: center; }
.cat-up[hidden] { display: none; }
.cat-up__btn { min-height: 48px; font-size: var(--t-sm); box-shadow: 0 6px 18px rgba(21, 32, 46, 0.22); }
.cat-up__btn:hover svg { transform: translateY(-3px); }
@media (prefers-reduced-motion: no-preference) {
  .cat-up:not([hidden]) .cat-up__btn { animation: cat-up-in 260ms var(--ease-out); }
}
@keyframes cat-up-in { from { opacity: 0; transform: translateY(-8px); } }
.cat {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: var(--s-1) var(--s-4);
  padding: var(--s-4) 0;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  position: relative;
}
.cat__name { font-family: var(--f-display); font-weight: 700; font-size: var(--t-md); line-height: 1.2; }
.cat__brand { font-weight: 500; color: var(--ink-2); }
.cat__rank { display: inline-block; margin-left: var(--s-2); vertical-align: 2px; font-family: var(--f-data); font-size: 0.625rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--red); border: 1px solid currentColor; padding: 1px 5px; border-radius: 2px; }
.cat__img { grid-column: 1; grid-row: 1 / span 3; align-self: center; border: 1px solid var(--guil); border-radius: 2px; }
.cat__name { grid-column: 2; }
.cat__type { grid-column: 2; font-size: var(--t-sm); color: var(--ink-2); }
.cat__specs { grid-column: 2; display: flex; flex-wrap: wrap; gap: 2px var(--s-4); font-family: var(--f-data); font-size: var(--t-sm); margin-top: var(--s-1); }
.cat__specs .k { font-family: var(--f-body); color: var(--ink-2); }
.cat__price { font-weight: 500; }
.cat__price .muted { font-family: var(--f-body); }
.cat__go { grid-column: 3; grid-row: 1 / span 3; align-self: center; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--rule); border-radius: 50%; transition: background-color 200ms, border-color 200ms, color 200ms, transform 250ms var(--ease-out); }
.cat__go svg { width: 18px; height: 18px; }
.cat:hover .cat__go { background: var(--red-fill); border-color: var(--red-fill); color: #fff; transform: translateX(3px); }
.cat:hover .cat__name { color: var(--red); }
.cat:hover { color: var(--ink); }

@media (min-width: 900px) {
  .cat { grid-template-columns: 88px minmax(0, 1.25fr) minmax(0, 2.75fr) 44px; align-items: center; padding: var(--s-3); margin-inline: calc(var(--s-3) * -1); transition: background-color 150ms; }
  .cat:hover { background: var(--paper-hi); }
  .cat__img { grid-row: 1 / span 2; }
  .cat__name { grid-column: 2; align-self: end; }
  .cat__type { grid-column: 2; grid-row: 2; align-self: start; }
  .cat__specs { grid-column: 3; grid-row: 1 / span 2; display: grid; grid-template-columns: 1.3fr 1fr 1fr 0.6fr; gap: var(--s-3); margin: 0; }
  .cat__specs .k { display: none; }
  .cat__go { grid-column: 4; grid-row: 1 / span 2; }
  .cat__specs > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cat .cat__specs { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 2px var(--s-3); }
  .cat .cat__specs > span:last-child .k { display: inline; }
}

.catalog__empty, .catalog__hidden-prices { padding: var(--s-5) 0; color: var(--ink-2); }

.az__grid { columns: 2 180px; column-gap: var(--s-6); }
.az__brand { break-inside: avoid; padding-bottom: var(--s-4); }
.az__brand h3 { font-size: var(--t-base); padding-bottom: var(--s-1); border-bottom: 1px solid var(--rule); margin-bottom: var(--s-2); }
.az__brand ul { list-style: none; margin: 0; padding: 0; font-size: var(--t-sm); }
.az__brand a { display: inline-block; padding: 3px 0; text-decoration: none; }
.az__brand a:hover { text-decoration: underline; }
@media (min-width: 900px) { .az__grid { columns: 5; } }

/* ==========================================================================
   FICHE MODÈLE
   ========================================================================== */

.crumbs { font-size: var(--t-sm); color: var(--ink-2); margin-bottom: var(--s-4); }
.crumbs a { color: inherit; }
.crumbs a:hover { color: var(--red); }
.crumbs [aria-current] { color: var(--ink); }
.fiche__brand { font-weight: 500; }
.fiche__rank { margin-top: var(--s-3); font-size: var(--t-sm); }
.fiche__jump { margin-top: var(--s-4); }
@media (min-width: 1100px) { .fiche__jump { display: none; } }
#dealers-title { scroll-margin-top: 96px; }
.doc__head .plate { flex: none; }

.fiche { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-7); padding-block: var(--s-6) var(--s-8); }
@media (min-width: 1100px) {
  .fiche { grid-template-columns: minmax(0, 1fr) 380px; gap: var(--s-8); align-items: start; }
  .fiche__side { position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow: auto; scrollbar-width: thin; }
}

.certificat .doc__fields { grid-template-columns: minmax(0, 1fr); }
.certificat .doc__fields > div:nth-child(odd) { border-right: 0; padding-right: 0; }
.certificat .doc__fields > div:nth-child(even) { padding-left: 0; }
@media (min-width: 600px) {
  .certificat .doc__fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .certificat .doc__fields > div:nth-child(odd) { border-right: 1px solid var(--guil); padding-right: var(--s-3); }
  .certificat .doc__fields > div:nth-child(even) { padding-left: var(--s-4); }
}
.certificat .doc__fields dd { font-size: var(--t-base); }
.code { color: var(--red); }
.certificat .notice { margin-top: var(--s-4); }

.fiche__section { margin-top: var(--s-8); }
.fiche__section h2 { font-size: var(--t-lg); font-stretch: 85%; font-variation-settings: "wdth" 85; }
.fiche__lede { color: var(--ink-2); margin: var(--s-3) 0 var(--s-5); max-width: 62ch; font-size: var(--t-sm); }
.fiche__src { font-size: var(--t-xs); color: var(--ink-2); margin-top: var(--s-3); }

.specs-scroll { overflow-x: auto; border-top: 2px solid var(--ink); scrollbar-width: thin; }
.specs-scroll:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.specs { width: 100%; border-collapse: collapse; font-size: var(--t-sm); min-width: 520px; }
.specs--1 { min-width: 0; }
.specs th, .specs td { text-align: left; padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--guil); vertical-align: top; }
.specs thead th { font-family: var(--f-display); font-weight: 700; font-size: var(--t-base); line-height: 1.2; padding-block: var(--s-3); border-bottom: 1px solid var(--ink); }
.specs tbody th[scope="row"] { font-weight: 400; color: var(--ink-2); width: 34%; min-width: 150px; position: sticky; left: 0; background: var(--paper); }
.specs td { font-family: var(--f-data); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.specs td small { display: block; font-family: var(--f-body); font-size: var(--t-xs); color: var(--ink-2); letter-spacing: 0; }
.specs .group th { font-family: var(--f-data); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); padding-top: var(--s-5); border-bottom: 1px solid var(--rule); background: transparent; position: static; }
.specs tbody tr:not(.group):hover td, .specs tbody tr:not(.group):hover th { background: var(--paper-hi); }

.similar { list-style: none; margin: var(--s-4) 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); border-top: 2px solid var(--ink); }
.similar a { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.similar .sim__name { font-family: var(--f-display); font-weight: 700; font-size: var(--t-md); }
.similar .data { font-size: var(--t-sm); color: var(--ink-2); }
.similar a:hover .sim__name { color: var(--red); }
@media (min-width: 700px) { .similar { grid-template-columns: 1fr 1fr; column-gap: var(--s-6); } }

/* Concessionnaires */
.dealers { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s-5); }
.dealers h2 { font-size: var(--t-lg); font-stretch: 85%; font-variation-settings: "wdth" 85; }
.dealers__count { font-size: var(--t-sm); color: var(--ink-2); margin-top: var(--s-2); }
.dealers__dist { font-size: var(--t-sm); margin-top: var(--s-3); }
.dealers .notice { margin-top: var(--s-3); }
.dealers__note { font-size: var(--t-xs); color: var(--ink-2); margin-top: var(--s-4); }

.locate { margin-top: var(--s-5); padding-top: var(--s-4); border-top: 1px solid var(--rule); display: grid; gap: var(--s-2); }
.locate__row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-2); }
.locate__row input {
  min-height: 52px; padding: 0 var(--s-3);
  border: 1px solid var(--rule); border-bottom: 1.5px solid var(--ink); border-radius: var(--radius) var(--radius) 0 0;
  background: var(--paper-hi);
  font: 500 1.25rem var(--f-data); letter-spacing: 0.12em; color: var(--ink); caret-color: var(--red); width: 100%;
}
.locate__row input:focus { outline: none; background: var(--field); box-shadow: 0 2px 0 0 var(--red); }
.locate__row .btn { min-height: 52px; padding: 0 var(--s-4); }
.locate__geo { justify-self: start; display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; background: none; border: 0; padding: 0; font: 600 var(--t-sm) var(--f-body); color: var(--ink); cursor: pointer; text-decoration: underline; text-underline-offset: 0.2em; }
.locate__geo svg { width: 18px; height: 18px; color: var(--red); }
.locate__geo:hover { color: var(--red); }
.locate__msg { font-size: var(--t-sm); color: var(--ink-2); min-height: 0; }
.locate__msg:empty { display: none; }

.nearest { margin-top: var(--s-4); }
.nearest__title { margin-bottom: var(--s-2); color: var(--red); }

.dealers__list { list-style: none; margin: 0; padding: 0; }
.dealer { padding: var(--s-3) 0; border-bottom: 1px solid var(--guil); display: grid; gap: 2px; position: relative; }
.nearest .dealer { padding-right: 4.5rem; }
.dealer__name { font-weight: 600; line-height: 1.3; }
.dealer__addr { font-size: var(--t-sm); }
.dealer__approx { color: var(--ink-2); font-style: italic; }
.dealer__meta { font-size: var(--t-xs); color: var(--ink-2); }
.dealer__links { display: flex; flex-wrap: wrap; gap: 0 var(--s-4); font-size: var(--t-sm); }
.dealer__links a { display: inline-flex; align-items: center; min-height: 36px; color: var(--red); font-weight: 600; }
.dealer__dist { position: absolute; right: 0; top: var(--s-3); font-size: var(--t-sm); font-weight: 500; color: var(--ink); }

.provinces { margin-top: var(--s-5); }
.provinces > .field { margin-bottom: var(--s-2); }
.prov { border-top: 1px solid var(--rule); }
.prov:last-child { border-bottom: 1px solid var(--rule); }
.prov summary {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 48px; cursor: pointer; list-style: none;
  font-family: var(--f-display); font-weight: 600;
}
.prov summary::-webkit-details-marker { display: none; }
.prov summary::after { content: ""; width: 9px; height: 9px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg) translateY(-3px); transition: transform 200ms var(--ease-out); margin-left: var(--s-3); }
.prov[open] summary::after { transform: rotate(225deg) translateY(-1px); }
.prov summary .data { margin-left: auto; font-size: var(--t-sm); color: var(--ink-2); font-weight: 400; }
.prov summary:hover { color: var(--red); }
.prov .dealers__list { padding-bottom: var(--s-3); }


.pick__name a { text-decoration: none; }
.pick__name a:hover { color: var(--red); text-decoration: underline; }
.pick__more a { font-weight: 600; font-size: var(--t-sm); color: var(--red); }
.others a { text-decoration: none; }
.others a:hover b { color: var(--red); }
.toolbar__note { font-size: var(--t-sm); max-width: 48ch; }
.ledger__model a { text-decoration: none; }
.ledger__model a:hover { color: var(--red); text-decoration: underline; }
.ledger-notes { display: grid; gap: var(--s-3); max-width: 70ch; margin: calc(var(--s-8) * -1 + var(--s-5)) 0 var(--s-8); font-size: var(--t-sm); }

/* --- Motion -------------------------------------------------------------- */
/* Fil conducteur : le document s'imprime. Les filets se tracent, l'encre se
   pose, les titres montent dans leur ligne, puis le tampon frappe la feuille.
   Tout est visible par défaut : les états cachés n'existent que si le script
   a démarré (classe .js) et si l'utilisateur accepte le mouvement. */

.stamp-shadow {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(21, 32, 46, 0.55), rgba(21, 32, 46, 0));
  pointer-events: none;
  opacity: 0;
}

.btn:active { transform: translateY(1px) scale(0.985); }
.btn { transition-property: background-color, color, border-color, transform; }

.progress span { position: relative; overflow: hidden; transition: background-color 300ms ease; }

@keyframes ink-in {
  from { opacity: 0.15; filter: blur(2.5px); background-color: rgba(37, 99, 235, 0.08); }
  to   { opacity: 1; filter: blur(0); background-color: transparent; }
}
.recap dd.is-inked { animation: ink-in 600ms var(--ease-out); }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }

  /* Tampon de l'accueil : posé par le script */
  .js .hero__doc .stamp:not(.is-stamped),
  .js .result .stamp:not(.is-stamped) { opacity: 0; }

  /* Montée simple, avec mise au point */
  .js [data-reveal="rise"],
  .js [data-load="rise"] {
    opacity: 0;
    transform: translateY(32px);
    filter: blur(6px);
    transition: opacity 900ms var(--ease-out), transform 1100ms var(--ease-out), filter 900ms var(--ease-out);
    transition-delay: var(--d, 0ms);
  }
  .js [data-reveal="rise"].is-in,
  .js [data-load="rise"].is-in { opacity: 1; transform: none; filter: none; }

  /* La feuille d'exemple se pose, légèrement de biais */
  .js [data-load="doc"] {
    opacity: 0;
    transform: translateY(60px) rotate(2.5deg);
    transition: opacity 900ms var(--ease-out), transform 1300ms var(--ease-out);
    transition-delay: var(--d, 0ms);
  }
  .js [data-load="doc"].is-in { opacity: 1; transform: none; }

  /* Titres : chaque mot monte dans sa ligne */
  .js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.1em; margin-bottom: -0.1em; }
  .js [data-split] .w > span {
    display: inline-block;
    transform: translateY(110%);
    transition: transform 1000ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 55ms + var(--d, 0ms));
  }
  .js [data-split].is-in .w > span { transform: none; }

  /* Listes : cascade, et chaque filet s'imprime de gauche à droite */
  .js [data-reveal="stagger"] > * {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 800ms var(--ease-out), transform 1000ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 90ms + var(--d, 0ms));
  }
  .js [data-reveal="stagger"].is-in > * { opacity: 1; transform: none; }

  .js [data-reveal="stagger"][data-variant="ink"] > * { transform: none; filter: blur(4px); transition-property: opacity, filter; transition-delay: calc(var(--i, 0) * 70ms + var(--d, 0ms)); }
  .js [data-reveal="stagger"][data-variant="ink"].is-in > * { filter: none; }

  .js .register li,
  .js .considerations > div {
    border-color: transparent;
    background-image: linear-gradient(var(--rule), var(--rule));
    background-repeat: no-repeat;
    background-size: 0% 1px;
    transition: opacity 800ms var(--ease-out), transform 1000ms var(--ease-out), background-size 1200ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 90ms);
  }
  .js .register li { background-position: 0 100%; }
  .js .considerations > div { background-position: 0 0; }
  .js .is-in.register li,
  .js .is-in.considerations > div { background-size: 100% 1px; }

  /* Filet épais du registre et du classement */
  .js .register,
  .js .ledger { border-top-color: transparent; position: relative; }
  .js .register::before,
  .js .ledger::before {
    content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 2px;
    background: var(--ink);
    transform: scaleX(0); transform-origin: left;
    transition: transform 1200ms var(--ease-out);
  }
  .js .register.is-in::before,
  .js .ledger.is-in::before { transform: scaleX(1); }

  /* Rosaces : le guillochage se trace au chargement */
  .js svg.rosette[data-draw] path {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 2600ms cubic-bezier(0.65, 0, 0.35, 1);
    transition-delay: calc(var(--i, 0) * 45ms);
  }
  .js svg.rosette[data-draw].is-in path { stroke-dashoffset: 0; }

  /* Lignes du classement */
  .js .ledger__row[data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 600ms var(--ease-out), transform 800ms var(--ease-out), background-color 150ms;
    transition-delay: var(--d, 0ms);
  }
  .js .ledger__row.is-in { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .rosette g { transform: none; }
}

/* --- Impression de l'attestation ---------------------------------------- */
@media print {
  body { background: #fff; }
  .site-header, .site-footer, .page-head, .result__actions, .closing, .skip { display: none !important; }
  .doc { box-shadow: none; }
  .stamp { mix-blend-mode: normal; }
}

/* le conteneur du résultat reçoit le focus par script : pas de cadre */
.result:focus { outline: none; }

/* Crédits photos */
.credits-page { padding-block: var(--s-6) var(--s-8); }
.credits-table { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.credits-table th, .credits-table td { text-align: left; padding: var(--s-3) var(--s-4) var(--s-3) 0; border-bottom: 1px solid var(--guil); vertical-align: top; }
.credits-table thead th { font-family: var(--f-data); font-weight: 500; font-size: var(--t-xs); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); border-bottom: 2px solid var(--ink); }
.credits-table tbody th { font-weight: 600; }
.credits-table td:nth-child(2) { font-family: var(--f-data); }
.fiche__photo-note { color: var(--ink); }

/* Pages de texte : mentions légales, page introuvable */
.legal { padding-block: var(--s-6) var(--s-8); display: grid; gap: var(--s-6); max-width: calc(68ch + 2 * var(--gutter)); margin-inline: 0; }
.legal h2 { font-size: var(--t-md); margin-bottom: var(--s-2); }
.legal p, .legal li { color: var(--ink-2); max-width: 68ch; }
.legal ul { margin: var(--s-3) 0 0; padding-left: 1.2em; display: grid; gap: var(--s-2); }
.legal strong { color: var(--ink); }
.legal__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* ==========================================================================
   GUIDE (recharger chez soi) : sommaire + texte long, au format des papiers
   ========================================================================== */

.guide { padding-block: var(--s-6) var(--s-9); display: grid; gap: var(--s-6); align-items: start; }
.guide__body { min-width: 0; --prose: 44rem; }

/* --- Sommaire ------------------------------------------------------------ */
.toc { position: sticky; top: var(--hh, 69px); transition: top 350ms var(--ease-out); z-index: 10; margin-inline: calc(-1 * var(--gutter)); background: var(--paper); border-bottom: 1px solid var(--rule); }
.toc.is-up { top: 0; }
.toc__bar {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s-3);
  width: 100%; min-height: 52px; padding: 0 var(--gutter);
  background: none; border: 0; color: var(--ink); text-align: left; cursor: pointer; font: inherit;
}
.toc__bar .field { color: var(--red); }
.toc__now .toc__n { color: var(--red); margin-right: 0.4em; }
.toc__now { font-weight: 600; font-size: var(--t-sm); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.toc__count { color: var(--ink-2); }
.toc__count b { color: var(--ink); font-weight: 500; }
.toc__bar svg { width: 18px; height: 18px; transition: transform 300ms var(--ease-out); }
.toc__bar[aria-expanded="true"] svg { transform: rotate(180deg); }
.toc__bar:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.toc__progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: transparent; }
.toc__progress span { display: block; height: 100%; background: var(--red); transform: scaleX(var(--p, 0)); transform-origin: left; }

.toc__panel { padding: 0 var(--gutter) var(--s-4); }
.js .toc__panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--paper); border-bottom: 1px solid var(--rule);
  box-shadow: 0 18px 30px -18px rgba(21, 32, 46, 0.35);
  max-height: calc(100vh - var(--hh, 69px) - 64px); overflow-y: auto;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 220ms var(--ease-out), transform 300ms var(--ease-out), visibility 0s linear 300ms;
}
.js .toc.is-open .toc__panel { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.toc__head { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: none; }
.toc li a {
  display: grid; grid-template-columns: 2.6em 1fr; align-items: baseline; gap: var(--s-2);
  padding: var(--s-3) 0; border-top: 1px solid var(--guil);
  color: var(--ink-2); text-decoration: none; font-size: var(--t-sm); line-height: 1.35;
  transition: color 200ms var(--ease-out);
}
.toc li:first-child a { border-top: 0; }
.toc__n { font-family: var(--f-data); font-size: var(--t-xs); color: var(--ink-2); transition: color 200ms var(--ease-out); }
.toc li a:hover { color: var(--ink); }
.toc li a:hover .toc__n { color: var(--red); }
.toc li a.is-done { color: var(--ink-2); }
.toc li a[aria-current="true"] { color: var(--ink); font-weight: 600; }
.toc li a[aria-current="true"] .toc__n { color: var(--red); }
.toc li a:focus-visible, .toc__top:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.toc__top { display: inline-block; margin-top: var(--s-3); font-size: var(--t-xs); font-family: var(--f-data); color: var(--ink-2); }
.toc__top:hover { color: var(--red); }

@media (min-width: 1024px) {
  .guide { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: var(--s-8); padding-top: var(--s-7); }
  .toc {
    top: calc(var(--hh, 69px) + var(--s-5)); margin: 0;
  }
  .toc.is-up { top: var(--s-5); }
  .toc { border: 0; background: none;
    padding-left: var(--s-4); border-left: 1px solid var(--rule);
  }
  .toc__bar { display: none; }
  .js .toc__panel, .toc__panel {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
    border: 0; background: none; padding: 0; max-height: none; overflow: visible;
  }
  .toc__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-start; gap: var(--s-1) var(--s-3); color: var(--ink-2); padding-bottom: var(--s-3); border-bottom: 2px solid var(--ink); }
  .toc__head span:first-child { color: var(--red); }
  /* la progression devient le filet vertical de gauche */
  .toc__progress { left: -1px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
  .toc__progress span { width: 100%; height: 100%; transform: scaleY(var(--p, 0)); transform-origin: top; }
  .toc li a { padding: var(--s-2) 0; border-top: 0; }
  .toc li a[aria-current="true"] { position: relative; }
}

/* --- Texte ---------------------------------------------------------------- */
.guide__intro { font-size: var(--t-md); line-height: 1.55; color: var(--ink); max-width: 40ch; }
@media (min-width: 640px) { .guide__intro { font-size: 1.375rem; } }
.guide__sec { margin-top: var(--s-8); scroll-margin-top: calc(var(--hh, 69px) + 72px); }
@media (min-width: 1024px) { .guide__sec { margin-top: var(--s-9); scroll-margin-top: calc(var(--hh, 69px) + var(--s-5)); } }
.guide__h { position: relative; display: grid; gap: var(--s-3); padding-top: var(--s-4); border-top: 2px solid var(--ink); margin-bottom: var(--s-5); }
.guide__code { color: var(--red); }
.guide__h h2 { font-size: var(--t-xl); font-stretch: 85%; font-variation-settings: "wdth" 85; letter-spacing: -0.02em; max-width: 18ch; line-height: 1.02; }
.guide__sec h3 { font-size: var(--t-lg); font-stretch: 85%; font-variation-settings: "wdth" 85; margin-top: var(--s-7); }
.guide__sec > p, .guide__body > p:not(.guide__intro), .guide__pair-main > p { color: var(--ink-2); margin-top: var(--s-4); max-width: var(--prose); }
.guide__sec > h3, .guide__sec > ul, .guide__steps, .guide__specs:not([data-ring]), .guide__lead { max-width: var(--prose); }
.guide strong { color: var(--ink); }
.guide__body a:not(.btn) { color: var(--ink); text-decoration-color: var(--red); text-underline-offset: 3px; }
.guide__body a:not(.btn):hover { color: var(--red); }

/* fiche technique : comme les champs d'un certificat */
.guide__specs { margin: var(--s-5) 0 0; border-top: 1px solid var(--rule); }
.guide__specs > div { display: grid; gap: var(--s-1); padding: var(--s-3) 0; border-bottom: 1px solid var(--guil); }
.guide__specs dt { font-family: var(--f-data); font-size: var(--t-xs); color: var(--ink); font-weight: 500; }
.guide__specs dd { margin: 0; color: var(--ink-2); }
@media (min-width: 640px) {
  .guide__specs > div { grid-template-columns: 12rem 1fr; gap: var(--s-5); padding: var(--s-4) 0; }
  .guide__specs dt { padding-top: 0.25em; }
}

/* encadrés : un tampon rouge sur la marge */
.guide__note { position: relative; margin-top: var(--s-5); padding: var(--s-4) var(--s-5); background: var(--paper-hi); border-radius: var(--radius); }
.guide__note::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--red); transform-origin: top; }
.guide__note-t { font-family: var(--f-data); font-size: var(--t-xs); color: var(--red); font-weight: 500; margin-bottom: var(--s-2); }
.guide__note p:last-child { color: var(--ink); }

.guide__lead { font-family: var(--f-display); font-weight: 700; font-size: var(--t-md); color: var(--ink) !important; margin-top: var(--s-6) !important; }
.guide__steps { list-style: none; margin: var(--s-4) 0 0; padding: 0; counter-reset: g; border-top: 1px solid var(--rule); }
.guide__steps > li { counter-increment: g; display: grid; grid-template-columns: 2.6em 1fr; padding: var(--s-3) 0; border-bottom: 1px solid var(--guil); color: var(--ink); }
.guide__steps > li::before { content: counter(g, decimal-leading-zero); font-family: var(--f-data); font-size: var(--t-xs); color: var(--red); padding-top: 0.3em; }
.guide__sec ul:not([class]) { margin: var(--s-4) 0 0; padding-left: 1.2em; display: grid; gap: var(--s-2); color: var(--ink-2); }
.guide__small { font-size: var(--t-sm); color: var(--ink-2); margin-top: var(--s-3) !important; }
.guide__date { margin-top: var(--s-8) !important; padding-top: var(--s-4); border-top: 1px solid var(--rule); }

/* tableaux : une feuille posée sur la page */
.guide__table { margin-top: var(--s-5); }
.guide__scroll { position: relative; overflow-x: auto; padding: var(--s-3); }
.guide__scroll:focus-visible { outline: 2px solid var(--red); outline-offset: -4px; }
.guide__table table { border-collapse: collapse; width: 100%; min-width: 540px; font-size: var(--t-sm); }
.guide__table th, .guide__table td { padding: var(--s-3); text-align: left; vertical-align: top; border-bottom: 1px solid var(--guil); }
.guide__table thead th { font-family: var(--f-data); font-size: var(--t-xs); font-weight: 500; color: var(--ink-2); border-bottom: 2px solid var(--ink); }
.guide__table tbody th { font-weight: 600; color: var(--ink); }
.guide__table td { color: var(--ink-2); }
.guide__table td.n { font-family: var(--f-data); font-size: 0.8125rem; color: var(--ink); }
.guide__table tbody tr:last-child > * { border-bottom: 0; }
.guide__table tbody tr { transition: background-color 200ms var(--ease-out); }
.guide__table tbody tr:hover { background: var(--paper-hi); }

/* checklist : une feuille à cocher */
.guide__sheet { margin-top: var(--s-5); padding: var(--s-5); }
.guide__sheet-h { position: relative; display: flex; justify-content: space-between; color: var(--red); padding-bottom: var(--s-3); border-bottom: 2px solid var(--ink); }
.guide__tally { color: var(--ink-2); }
.guide__tally b { color: var(--ink); font-weight: 500; }
.guide__check { position: relative; list-style: none; margin: 0; padding: 0; }
.guide__check li { border-bottom: 1px solid var(--guil); }
.guide__check li:last-child { border-bottom: 0; }
.guide__check label { display: grid; grid-template-columns: 22px 1fr; gap: var(--s-3); align-items: start; padding: var(--s-3) 0; cursor: pointer; color: var(--ink); }
.guide__check input {
  appearance: none; -webkit-appearance: none; margin: 2px 0 0; width: 20px; height: 20px;
  border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--field); display: grid; place-items: center; cursor: pointer;
}
.guide__check input::after {
  content: ""; width: 10px; height: 5px; border: solid #fff; border-width: 0 0 2px 2px;
  transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform 220ms var(--ease-out);
}
.guide__check input:checked { background: var(--red-fill); border-color: var(--red-fill); }
.guide__check input:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
.guide__check input:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.guide__check input:checked + span { color: var(--ink-2); }

/* sources */
.guide__links { list-style: none; margin: var(--s-4) 0 0; padding: 0; border-top: 1px solid var(--rule); }
.guide__links li { border-bottom: 1px solid var(--guil); padding: var(--s-3) 0; font-size: var(--t-sm); }

.closing__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* --- Animations ---------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  /* filet de titre de section : s'imprime de gauche à droite */
  .js .guide__h { border-top-color: transparent; }
  .js .guide__h::before {
    content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 2px; background: var(--ink);
    transform: scaleX(0); transform-origin: left; transition: transform 1200ms var(--ease-out);
  }
  .js .guide__h.is-in::before { transform: scaleX(1); }
  .js .guide__code { opacity: 0; transform: translateX(-12px); transition: opacity 700ms var(--ease-out) 200ms, transform 900ms var(--ease-out) 200ms; }
  .js .guide__h.is-in .guide__code { opacity: 1; transform: none; }

  /* les tableaux et la checklist se posent comme une feuille */
  .js [data-reveal="doc"] {
    opacity: 0; transform: translateY(48px) rotate(1.2deg);
    transition: opacity 900ms var(--ease-out), transform 1200ms var(--ease-out);
  }
  .js [data-reveal="doc"].is-in { opacity: 1; transform: none; }

  /* encadré : la marge rouge se trace */
  .js .guide__note::before { transform: scaleY(0); transition: transform 900ms var(--ease-out) 250ms; }
  .js .guide__note.is-in::before { transform: scaleY(1); }

  /* champs de fiche : filets qui s'impriment */
  .js .guide__specs > div, .js .guide__steps > li, .js .guide__links > li {
    border-bottom-color: transparent;
    background-image: linear-gradient(var(--guil), var(--guil)); background-repeat: no-repeat;
    background-position: 0 100%; background-size: 0% 1px;
    transition: opacity 800ms var(--ease-out), transform 1000ms var(--ease-out), background-size 1200ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 90ms);
  }
  .js .is-in.guide__specs > div, .js .is-in.guide__steps > li, .js .is-in.guide__links > li { background-size: 100% 1px; }

  .toc li a .toc__l { transition: transform 300ms var(--ease-out), color 200ms; display: inline-block; }
  .toc li a:hover .toc__l { transform: translateX(3px); }
}
/* --- Les 4 mots : cercle interactif ------------------------------------- */
dl.is-ringed { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ring { display: grid; gap: var(--s-5); margin-top: var(--s-5); align-items: center; }
.ring__fig { position: relative; width: min(100%, 380px); margin-inline: auto; aspect-ratio: 1; }
.ring__fig svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ring__area { fill: transparent; transition: fill 260ms var(--ease-out); }
.ring__seg { cursor: pointer; outline: none; }
.ring__seg:hover .ring__area { fill: var(--paper-hi); }
.ring__seg.is-on .ring__area { fill: var(--red-fill); }
.ring__label { font-family: var(--f-display); font-weight: 600; font-size: 21px; fill: var(--ink); letter-spacing: 0.01em; transition: fill 260ms var(--ease-out); pointer-events: none; }
.ring__seg.is-on .ring__label { fill: #fff; }
.ring__seg:focus-visible .ring__area { stroke: var(--red); stroke-width: 3; stroke-dasharray: 5 4; }
.ring__seg.is-on:focus-visible .ring__area { stroke: var(--ink); }
.ring__line { fill: none; stroke: var(--ink); stroke-width: 1.5; pointer-events: none; }
.ring__center {
  position: absolute; inset: 0; margin: auto; width: 52%; height: max-content;
  text-align: center; pointer-events: none;
  font-family: var(--f-display); font-weight: 700; font-size: clamp(1rem, 0.8rem + 1.2vw, 1.3rem); line-height: 1.2;
  font-stretch: 85%; font-variation-settings: "wdth" 85; color: var(--ink);
}
.ring__panel { padding: var(--s-5); min-height: 15rem; }
.ring__code { position: relative; display: flex; white-space: nowrap; justify-content: space-between; gap: var(--s-3); color: var(--red); padding-bottom: var(--s-3); border-bottom: 2px solid var(--ink); }
.ring__term { position: relative; font-family: var(--f-display); font-weight: 800; font-size: var(--t-lg); font-stretch: 85%; font-variation-settings: "wdth" 85; line-height: 1.1; margin-top: var(--s-4); }
.ring__def { position: relative; color: var(--ink-2); margin-top: var(--s-3); }
@media (min-width: 720px) {
  .ring { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s-5); }
}
@media (prefers-reduced-motion: no-preference) {
  .js .ring .ring__draw { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1400ms var(--ease-out); }
  .js .ring .ring__draw + .ring__draw { transition-delay: 150ms; }
  .js .ring.is-in .ring__draw { stroke-dashoffset: 0; }
  .js .ring .ring__tick, .js .ring .ring__label, .js .ring .ring__center { opacity: 0; transition: opacity 700ms var(--ease-out) 700ms, fill 260ms var(--ease-out); }
  .js .ring.is-in .ring__tick, .js .ring.is-in .ring__label, .js .ring.is-in .ring__center { opacity: 1; }
  .js .ring .ring__panel { opacity: 0; transform: translateY(32px) rotate(1deg); transition: opacity 900ms var(--ease-out) 300ms, transform 1100ms var(--ease-out) 300ms; }
  .js .ring.is-in .ring__panel { opacity: 1; transform: none; }
  .ring__panel.is-swap .ring__term, .ring__panel.is-swap .ring__def { animation: ring-swap 420ms var(--ease-out) both; }
  .ring__panel.is-swap .ring__def { animation-delay: 60ms; }
}
@keyframes ring-swap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
/* encadrés : côte à côte sous un bloc large, en marge à côté du texte sur grand écran */
.guide__notes { display: grid; gap: var(--s-4); margin-top: var(--s-5); }
.guide__notes .guide__note { margin-top: 0; }
@media (min-width: 760px) {
  .guide__notes { grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
}
.guide__pair-main > :first-child { margin-top: var(--s-5); }
@media (min-width: 1200px) {
  .guide__pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 23.5rem); gap: var(--s-6); align-items: start; }
  .guide__pair .guide__notes { grid-template-columns: 1fr; position: sticky; top: calc(var(--hh, 69px) + var(--s-5)); }
  .guide__pair-main > * { max-width: none; }
}
@media (min-width: 1024px) {
  .ring__fig { width: min(100%, 440px); }
  .guide__sheet .guide__check { columns: 2; column-gap: var(--s-6); }
  .guide__sheet .guide__check li { break-inside: avoid; }
}
@media print { .toc { display: none; } .guide { display: block; } }

/* Guide fiscalité : date de vérification et statut des mesures */
.page-head .page-head__meta { margin-top: var(--s-3); font-size: var(--t-xs); color: var(--ink-2); }
.guide__status { display: inline-block; padding: 2px 8px; border: 1px solid var(--ink); border-radius: 2px; font-family: var(--f-data); font-size: 0.6875rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); white-space: nowrap; }
.guide__status.is-announced { color: var(--red); border-color: var(--red); border-style: dashed; }

/* --- Questions fréquentes (page et aperçu sur l'accueil) ----------------- */
.faq__side { display: grid; gap: var(--s-5); align-content: start; }
.faq__side .faq-search, .faq__themes, .faq__count { display: none; }
.js .faq__side .faq-search, .js .faq__themes { display: grid; }
.js .faq__count { display: block; }
.faq-search { gap: var(--s-2); }
.faq-search .input { background: var(--paper-hi); font-size: var(--t-base); }
.faq__themes { border: 0; margin: 0; padding: 0; min-width: 0; gap: var(--s-2); }
.faq__themes legend { padding: 0; margin-bottom: var(--s-2); }
.faq__themes .chips { gap: 6px; }
.faq__themes .chip span { min-height: 40px; padding: 0 var(--s-3); }
.faq__count { color: var(--ink-2); }
.faq__count b { color: var(--red); font-weight: 500; }
@media (min-width: 1024px) {
  .faq__side { position: sticky; top: calc(var(--hh, 69px) + var(--s-5)); border-left: 2px solid var(--ink); padding-left: var(--s-4); }
}

.faq__body .guide__sec { scroll-margin-top: calc(var(--hh, 69px) + var(--s-4)); }
.faq__list { border-top: 2px solid var(--ink); margin-top: var(--s-5); max-width: 52rem; }
.faq__item { border-bottom: 1px solid var(--guil); scroll-margin-top: calc(var(--hh, 69px) + var(--s-4)); }
.faq__item > summary {
  display: grid; grid-template-columns: minmax(0, 1fr) 28px; gap: var(--s-4); align-items: start;
  padding: var(--s-4) 0; min-height: 44px; cursor: pointer; list-style: none;
  font-family: var(--f-display); font-weight: 700; font-size: var(--t-md); line-height: 1.3; color: var(--ink);
}
.faq__item > summary::-webkit-details-marker { display: none; }
.faq__item > summary:hover .faq__q { color: var(--red); }
.faq__q { transition: color 160ms var(--ease-out); }
.faq__plus { position: relative; width: 28px; height: 28px; }
.faq__plus::before { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; margin: -6px 0 0 -4px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform 700ms var(--ease-out), margin 700ms var(--ease-out), border-color 160ms; }
.faq__item > summary:hover .faq__plus::before { border-color: var(--red); }
.faq__item[open] .faq__plus::before { transform: rotate(-135deg); margin-top: -2px; }
.faq__a { padding: 0 calc(28px + var(--s-4)) var(--s-5) 0; color: var(--ink-2); }
.faq__a > * + * { margin-top: var(--s-3); }
.faq__a strong { color: var(--ink); }
.faq__a ul, .faq__a ol { padding-left: 1.15em; display: grid; gap: var(--s-2); }
.faq__a li::marker { color: var(--red); }
.faq__a a { color: var(--ink); text-decoration-color: var(--red); text-underline-offset: 3px; }
.faq__a a:hover { color: var(--red); }
.faq__a .guide__table { margin-top: var(--s-4); }
.faq__src { padding-top: var(--s-3); border-top: 1px solid var(--guil); font-size: var(--t-xs); line-height: 1.6; }
.faq__src .field { color: var(--red); margin-right: var(--s-2); }
.faq__empty { padding: var(--s-5); display: grid; gap: var(--s-3); justify-items: start; max-width: 52rem; }
.faq__empty-t { font-family: var(--f-display); font-weight: 700; font-size: var(--t-md); color: var(--ink); }
.faq__empty p:not(.faq__empty-t) { color: var(--ink-2); }
.faq__empty a { color: var(--ink); text-decoration-color: var(--red); }
.faq__theme[hidden], .faq__item[hidden] { display: none; }

.faq-home .faq__list { margin-top: 0; max-width: none; }
.faq-search--home { display: grid; margin-top: var(--s-5); max-width: 32rem; }
.faq-search__row { display: flex; gap: var(--s-2); }
.faq-search__row .input { flex: 1; min-height: 52px; }
.faq-home__all { margin-top: var(--s-6); }

@media (prefers-reduced-motion: no-preference) {
  .faq__item[open] > .faq__a { animation: faq-open 760ms var(--ease-out); }
}
@keyframes faq-open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ==========================================================================
   PALETTE : touches de dégradé et de vert
   ========================================================================== */

/* --- Dégradé bleu → cyan → vert, en touches ----------------------------- */
/* filet sous l'en-tête */
.site-header { border-bottom: 0; }
.site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--grad);
}
/* bandeau d'appel final : bande dégradée en haut */
.closing { border-top: 0; }
.closing::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--grad); z-index: 1;
}
/* barre de progression du questionnaire, comme une batterie qui se charge */
.progress span.is-done { background: var(--grad); background-size: 220px 100%; }
.progress span.is-current { background: var(--cyan); }

/* --- Vert émeraude : ce qui touche à l'autonomie et à l'écologie --------- */
.jour__fact { border-color: var(--green); }
.jour__fact .field { color: var(--eco); }
