/* =========================================================================
   Pulsafric — feuille de style du site public (login/)

   Refonte du 2026-10-25. Charte claire, encre violine et jaune balise ;
   le tracé continu du logo sert de fil conducteur aux animations (site.js).
   Polices Barlow hébergées dans assets/polices (licence OFL, voir OFL.txt) :
   aucune ressource externe, la CSP `default-src 'self'` reste stricte.

   Reprise aussi par l'administration (administration/admin.css) et par le
   choix des espaces (assets/css/espaces.css) : en-tête, boutons, tableaux.
   ========================================================================= */

/* ------------------------------------------------------------- POLICES --- */

@font-face { font-family: "Barlow"; src: url("polices/barlow-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("polices/barlow-400-italique.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("polices/barlow-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("polices/barlow-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("polices/barlow-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("polices/barlow-semi-condensed-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Semi Condensed"; src: url("polices/barlow-semi-condensed-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("polices/barlow-condensed-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("polices/barlow-condensed-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("polices/barlow-condensed-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ------------------------------------------------------------ RÉGLAGES --- */

:root {
  /* Encre et fonds */
  --encre: #1D1724;
  --encre-2: #4B4455;
  --encre-3: #6B6475;
  --fond: #FFFFFF;
  --fond-2: #F5F4F7;
  --fond-3: #ECEAF0;
  --trait: #E4E1E9;
  --trait-fort: #CFCAD6;

  /* Marque (logo Pulsafric) */
  --violet: #773C97;
  --violet-fonce: #5E2D7A;
  --violet-pale: #F3ECF7;
  --violet-clair: #CDB0E2;
  --signal: #F2B33D;              /* jaune balise : véhicule, tracé parcouru */

  /* Nuit : panneaux sombres */
  --nuit: #1C1226;
  --nuit-2: #26193A;
  --nuit-3: #33244A;
  --nuit-texte: #F1ECF5;
  --nuit-muet: #B9AEC6;
  --nuit-trait: rgba(241, 236, 245, 0.12);

  /* États (contrastes AA vérifiés sur blanc) */
  --ok: #23845E;
  --ok-pale: #E5F4EC;
  --alerte: #B4372F;
  --alerte-pale: #FBEAE8;
  --attention: #8A5A00;
  --attention-pale: #FFF4DC;

  /* Typographie */
  --texte: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --titre: "Barlow Condensed", "Barlow", "Arial Narrow", system-ui, sans-serif;
  --donnee: "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "Liberation Mono", monospace;

  --largeur: 1180px;
  --gouttiere: 28px;
  --rayon: 10px;
  --rayon-petit: 6px;

  /* Mouvement */
  --sortie: cubic-bezier(0.16, 1, 0.3, 1);
  --glisse: cubic-bezier(0.65, 0, 0.35, 1);
  --vif: 160ms;
  --moyen: 320ms;
  --lent: 720ms;
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--fond);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 1.0625rem;
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul[class], ol[class],
.etape ul, .module ul, .footer-col ul { list-style: none; padding: 0; }
img { max-width: 100%; height: auto; }
strong, b { font-weight: 600; }
small { font-size: 0.875em; }
code { font-family: var(--mono); font-size: 0.9em; }

a { color: var(--violet); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--violet-fonce); }

:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--violet); color: #FFFFFF; }

.contenu-principal { flex: 1 0 auto; }

.saut-contenu {
  position: absolute; left: 12px; top: -64px; z-index: 300;
  padding: 10px 16px; border-radius: var(--rayon-petit);
  background: var(--encre); color: #FFFFFF; text-decoration: none;
  transition: top var(--vif) var(--sortie);
}
.saut-contenu:focus { top: 12px; color: #FFFFFF; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ------------------------------------------------- TRANSITIONS DE PAGE --- */
/* D'une page à l'autre (site, espaces, administration), le navigateur fond
   l'ancienne page dans la nouvelle ; le logo, lui, se déplace d'un
   emplacement à l'autre (de l'écran de connexion à l'en-tête, de l'en-tête
   à la colonne d'administration). Navigateurs récents seulement ; rien
   ne change ailleurs. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  /* Enchaînement franc : l'ancienne page s'efface avant que la nouvelle
     n'apparaisse (pas de double exposition de deux mises en page). */
  ::view-transition-old(root) { animation: vt-sortie 130ms cubic-bezier(0.4, 0, 1, 1) both; }
  ::view-transition-new(root) { animation: vt-entree 320ms var(--sortie) 110ms both; }
  ::view-transition-group(marque),
  ::view-transition-group(avatar) { animation-duration: 640ms; animation-timing-function: var(--sortie); }
  ::view-transition-group(repere-onglet) { animation-duration: 460ms; animation-timing-function: var(--sortie); }
  ::view-transition-old(marque), ::view-transition-new(marque) { animation-duration: 640ms; }
}
@keyframes vt-sortie { to { opacity: 0; } }
@keyframes vt-entree { from { opacity: 0; transform: translateY(6px); } }
.entete .logo-mark, .scene-trace { view-transition-name: marque; }

/* Pictogrammes au trait (24 × 24) */
.picto, .btn svg, .card-icon svg, .alerte svg {
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* ------------------------------------------------------------- LOGO --- */
/* Le logo est un seul trait continu (pf_logo_svg, inc/config.php) : il se
   redessine au survol, comme un itinéraire. */

.logo { display: inline-flex; align-items: center; gap: 11px; color: var(--encre); text-decoration: none; }
.logo:hover { color: var(--encre); }
.logo-mark { display: inline-flex; flex-shrink: 0; width: 36px; height: 36px; color: var(--violet); }
.logo-mark svg { width: 100%; height: 100%; overflow: visible; }
.logo-texte { display: flex; flex-direction: column; line-height: 1.02; }
.logo-name { font-family: var(--titre); font-size: 1.4rem; font-weight: 600; letter-spacing: 0.01em; }
.logo-produit { font-family: var(--donnee); font-size: 0.8125rem; font-weight: 500; color: var(--encre-3); letter-spacing: 0.02em; }

.marque-chemin { stroke-dasharray: 1 0; }
@media (prefers-reduced-motion: no-preference) {
  .logo:hover .marque-chemin, .logo:focus-visible .marque-chemin { animation: retrace 0.9s var(--glisse); }
  /* Première page vue de la visite : le logo de l'en-tête se trace une fois. */
  .entete.premiere .marque-chemin { animation: retrace 1.5s var(--glisse) 0.15s both; }
}
@keyframes retrace {
  from { stroke-dasharray: 0 1; }
  to   { stroke-dasharray: 1 0; }
}

/* ------------------------------------------------------------- EN-TÊTE --- */

[hidden] { display: none !important; }

.entete {
  position: sticky; top: 0; z-index: 100;
  background: var(--fond);
  border-bottom: 1px solid transparent;
  transition: border-color var(--moyen), box-shadow var(--moyen);
}
.entete.defile { border-bottom-color: var(--trait); box-shadow: 0 10px 30px -24px rgba(29, 23, 36, 0.45); }

.header-inner {
  max-width: var(--largeur); margin: 0 auto; padding: 0 var(--gouttiere);
  min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.header-nav { display: flex; align-items: center; gap: 4px; }
.header-nav .lien-texte {
  position: relative; padding: 8px 12px;
  color: var(--encre-2); font-weight: 500; font-size: 0.98rem; text-decoration: none;
  transition: color var(--vif);
}
.header-nav .lien-texte::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px;
  background: var(--violet); transform: scaleX(0); transform-origin: left center;
  transition: transform var(--moyen) var(--sortie);
}
.header-nav .lien-texte:hover, .header-nav .lien-texte.actif { color: var(--encre); }
.header-nav .lien-texte:hover::after, .header-nav .lien-texte.actif::after { transform: scaleX(1); }
.header-nav .btn { margin-left: 12px; min-height: 42px; padding: 0 18px; font-size: 0.95rem; }

/* -------------------------------------------------------------- BOUTONS --- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 1.5px solid transparent; border-radius: var(--rayon-petit);
  font-family: var(--texte); font-size: 1rem; font-weight: 600; line-height: 1.1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color var(--vif), border-color var(--vif), color var(--vif), transform var(--vif) var(--sortie);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; stroke-width: 2; }
.btn .fleche { transition: transform var(--moyen) var(--sortie); }
.btn:hover .fleche { transform: translateX(4px); }

.btn-plein, a.btn-plein { background: var(--violet); color: #FFFFFF; }
.btn-plein:hover { background: var(--violet-fonce); color: #FFFFFF; }
.btn-contour, a.btn-contour { border-color: var(--trait-fort); background: transparent; color: var(--encre); }
.btn-contour:hover { border-color: var(--encre); color: var(--encre); }
.btn-clair, a.btn-clair { background: #FFFFFF; color: var(--encre); }
.btn-clair:hover { background: var(--signal); color: var(--encre); }
.btn-fantome, a.btn-fantome { border-color: rgba(255, 255, 255, 0.4); color: #FFFFFF; }
.btn-fantome:hover { border-color: #FFFFFF; color: #FFFFFF; }
.btn-bloc { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Envoi en cours : un point fait la navette sur un trait. */
.btn.envoi { pointer-events: none; }
.btn.envoi::after {
  content: ""; width: 28px; height: 8px; flex-shrink: 0;
  background:
    radial-gradient(circle, currentColor 2.6px, transparent 3.2px) 0 50% / 8px 8px no-repeat,
    linear-gradient(currentColor, currentColor) 0 50% / 100% 1px no-repeat;
  opacity: 0.9;
  animation: navette 0.8s var(--glisse) infinite alternate;
}
@keyframes navette { to { background-position: 100% 50%, 0 50%; } }

.btn-retour {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; color: var(--violet); text-decoration: none;
}
.btn-retour svg { width: 18px; height: 18px; transition: transform var(--moyen) var(--sortie); }
.btn-retour:hover svg { transform: translateX(-4px); }

/* ------------------------------------------------------ APPARITIONS --- */
/* Masqué d'emblée quand les scripts tournent (pas de saut à l'affichage) ;
   site.js ajoute .visible à l'entrée dans l'écran. Sans script, rien n'est
   masqué ; si le script ne se charge pas, tout réapparaît après 2,5 s. */

@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  [data-apparait]:not(.visible), [data-cascade]:not(.visible) > * { opacity: 0; }
  [data-apparait].visible { animation: apparait var(--lent) var(--sortie) backwards; animation-delay: calc(var(--i, 0) * 80ms); }
  [data-cascade].visible > * { animation: apparait var(--lent) var(--sortie) backwards; animation-delay: calc(var(--i, 0) * 75ms + 60ms); }
  html:not(.anime) [data-apparait], html:not(.anime) [data-cascade] > * { animation: secours 0s 2.5s forwards; }
}
@keyframes apparait { from { opacity: 0; transform: translateY(18px); } }
@keyframes secours { to { opacity: 1; } }

/* Compteur kilométrique : chaque chiffre roule jusqu'à sa valeur (site.js).
   Le chiffre fixe, invisible, garde la largeur et la ligne de base ; le
   texte réel reste lisible par les lecteurs d'écran. */
.odometre { line-height: 1; white-space: nowrap; }
.roue { position: relative; display: inline-block; clip-path: inset(0); }
.roue .fixe { visibility: hidden; }
.bande-chiffres {
  position: absolute; left: 0; right: 0; top: 0; display: flex; flex-direction: column; text-align: center;
  transition: transform var(--duree, 1.4s) cubic-bezier(0.2, 0.75, 0.15, 1);
}
.bande-chiffres span { display: block; height: 1em; }

/* Titre révélé ligne à ligne (masque) */
.lignes .ligne { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.lignes .ligne > span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .lignes .ligne > span { animation: monte-ligne 1s var(--sortie) 0.12s both; }
  .lignes .ligne:nth-child(2) > span { animation-delay: 0.23s; }
  .lignes .ligne:nth-child(3) > span { animation-delay: 0.34s; }
}
@keyframes monte-ligne { from { transform: translateY(108%); } to { transform: none; } }

/* ------------------------------------------------------- ACCUEIL (produit) */

.accueil {
  max-width: var(--largeur); margin: 0 auto;
  padding: 48px var(--gouttiere) 88px;
  display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 56px; align-items: center;
}
.accueil-texte h1 {
  font-family: var(--titre); font-weight: 600;
  font-size: clamp(3.1rem, 1.6rem + 5vw, 6rem);
  line-height: 0.94; letter-spacing: -0.012em;
}
.accueil-texte h1 em { font-style: normal; color: var(--violet); }
.accueil-chapo { margin-top: 26px; max-width: 33em; font-size: 1.1875rem; color: var(--encre-2); }
.accueil-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; }

.preuves {
  margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--trait);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px;
}
.preuves dt { order: 2; margin-top: 6px; font-size: 0.9rem; line-height: 1.4; color: var(--encre-3); }
.preuves dd {
  order: 1; margin: 0;
  font-family: var(--titre); font-size: 2.05rem; font-weight: 600; line-height: 1;
  color: var(--encre); font-variant-numeric: tabular-nums;
}
.preuves > div { display: flex; flex-direction: column; }
.preuves dd small { font-size: 0.62em; font-weight: 500; color: var(--encre-3); margin-left: 2px; }

/* Démonstration animée : un camion-citerne traverse Abidjan (site.js). */
.demo {
  position: relative; isolation: isolate; overflow: hidden;
  aspect-ratio: 560 / 470; border-radius: 16px;
  background: var(--nuit-2); color: var(--nuit-texte);
  box-shadow: 0 40px 70px -40px rgba(28, 18, 38, 0.6), 0 2px 0 rgba(28, 18, 38, 0.04);
}
.demo-carte { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
@media (prefers-reduced-motion: no-preference) {
  .demo { animation: demo-entree 1s var(--sortie) 0.25s backwards; }
  .demo-fiche { animation: demo-entree 0.9s var(--sortie) 0.55s backwards; }
  @supports (animation-timeline: view()) {
    /* En quittant l'écran, la démonstration recule légèrement. */
    .demo {
      animation: demo-entree 1s var(--sortie) 0.25s backwards, demo-recul linear both;
      animation-timeline: auto, view();
      animation-range: normal, exit 0% exit 100%;
    }
  }
}
@keyframes demo-entree { from { opacity: 0; transform: translateY(26px) scale(0.985); } }
@keyframes demo-recul { to { transform: scale(0.94); opacity: 0.55; } }
.demo .terre { fill: var(--nuit-2); }
.demo .rive { fill: #1B1530; stroke: rgba(205, 176, 226, 0.24); stroke-width: 2.4; }
.demo .eau { fill: #1B1530; }
.demo .riviere-rive { fill: none; stroke: rgba(205, 176, 226, 0.24); stroke-width: 5.4; stroke-linecap: round; }
.demo .riviere { fill: none; stroke: #1B1530; stroke-width: 3; stroke-linecap: round; }
.demo .ilot { fill: var(--nuit-2); stroke: rgba(205, 176, 226, 0.2); stroke-width: 1; }
.demo .voie { fill: none; stroke: rgba(241, 236, 245, 0.08); stroke-width: 3; stroke-linecap: round; }
.demo .voie-majeure { stroke: rgba(241, 236, 245, 0.13); stroke-width: 5; }
.demo .pont { fill: none; stroke: rgba(241, 236, 245, 0.22); stroke-width: 4; stroke-linecap: butt; }
.demo .quartier {
  font-family: var(--donnee); font-size: 9.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  fill: rgba(241, 236, 245, 0.42); paint-order: stroke; stroke: var(--nuit-2); stroke-width: 3px;
}
.demo .plan-eau { font-family: var(--texte); font-size: 11px; font-style: italic; fill: rgba(205, 176, 226, 0.42); }
.demo .zone { fill: rgba(205, 176, 226, 0.07); stroke: var(--violet-clair); stroke-width: 1.2; stroke-dasharray: 3 4; }
.demo .zone-onde { fill: none; stroke: var(--violet-clair); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.demo .zone-onde.declenche { animation: onde 1.4s var(--sortie); }
.demo .trajet-prevu { fill: none; stroke: rgba(205, 176, 226, 0.35); stroke-width: 2; stroke-dasharray: 1 7; stroke-linecap: round; }
.demo .trajet-fait { fill: none; stroke: var(--signal); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.demo .vehicule-corps { fill: var(--signal); stroke: var(--nuit); stroke-width: 2.5; }
.demo .vehicule-halo { fill: var(--signal); opacity: 0.18; }
.demo .vehicule.alerte .vehicule-halo { fill: #FF6B5E; animation: halo-alerte 1.2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.demo .autre { fill: var(--nuit-muet); stroke: var(--nuit-2); stroke-width: 2; }
.demo .autre-onde { fill: none; stroke: var(--nuit-muet); stroke-width: 1; transform-box: fill-box; transform-origin: center; animation: onde 3.2s ease-out infinite; }
.demo .autre-onde.decale { animation-delay: 1.6s; }
@keyframes onde { 0% { opacity: 0.9; transform: scale(0.6); } 100% { opacity: 0; transform: scale(2.4); } }
@keyframes halo-alerte { 0% { opacity: 0.55; transform: scale(0.8); } 100% { opacity: 0; transform: scale(2.6); } }

.demo-fiche {
  position: absolute; right: 14px; bottom: 14px; width: 47%; min-width: 236px;
  padding: 14px 16px 12px; border-radius: 12px;
  background: var(--nuit); border: 1px solid var(--nuit-trait);
  font-size: 0.8125rem; line-height: 1.35;
}
.demo-fiche-tete { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.demo-fiche-tete strong { display: block; font-family: var(--donnee); font-size: 1rem; font-weight: 600; color: #FFFFFF; line-height: 1.2; }
.demo-fiche-tete div span { display: block; font-size: 0.75rem; color: var(--nuit-muet); }
.demo-etat {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 2px 9px; border-radius: 999px; font-family: var(--donnee); font-size: 0.75rem; font-weight: 600;
  background: rgba(35, 132, 94, 0.22); color: #8FE0BC;
}
.demo-etat::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.demo-etat.arret { background: rgba(242, 179, 61, 0.18); color: var(--signal); }
.demo-mesures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 12px 0 10px; }
.demo-mesures div { padding: 7px 9px; border-radius: 8px; background: var(--nuit-2); }
.demo-mesures dt { font-size: 0.6875rem; color: var(--nuit-muet); }
.demo-mesures dd { margin: 1px 0 0; font-family: var(--donnee); font-size: 1.125rem; font-weight: 600; color: #FFFFFF; font-variant-numeric: tabular-nums; white-space: nowrap; }
.demo-mesures dd small { font-size: 0.7rem; font-weight: 500; color: var(--nuit-muet); }
.demo-mesures dd.chute { color: #FF8C80; }
.demo-journal { display: grid; gap: 4px; min-height: 4.2em; }
.demo-journal li { display: flex; gap: 8px; color: var(--nuit-muet); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-journal li:first-child { color: var(--nuit-texte); }
.demo-journal time { flex-shrink: 0; font-family: var(--donnee); font-weight: 600; color: var(--violet-clair); font-variant-numeric: tabular-nums; }
.demo-journal li.nouveau { animation: entre-journal 0.45s var(--sortie); }
@keyframes entre-journal { from { opacity: 0; transform: translateY(-6px); } }

.demo-alerte {
  position: absolute; top: 14px; right: 14px; width: 47%; min-width: 236px;
  display: flex; gap: 11px; align-items: flex-start;
  padding: 11px 14px; border-radius: 12px;
  background: #FFFFFF; color: var(--encre); font-size: 0.8125rem; line-height: 1.35;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
  transition: opacity var(--moyen) var(--sortie), transform var(--lent) var(--sortie);
}
.demo-alerte.cachee { opacity: 0; transform: translateY(-14px) scale(0.98); }
.demo-alerte-icone {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px;
  display: grid; place-items: center; background: var(--alerte-pale); color: var(--alerte);
}
.demo-alerte-icone svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.demo-alerte strong { display: block; font-size: 0.875rem; }
.demo-alerte span { color: var(--encre-2); }

/* -------------------------------------------------------- SECTIONS --- */

.bloc { max-width: var(--largeur); margin: 0 auto; padding: 104px var(--gouttiere); }
.bande { background: var(--fond-2); }
.bloc-tete { max-width: 46rem; margin-bottom: 52px; }
.titre-section {
  font-family: var(--titre); font-weight: 600;
  font-size: clamp(2.2rem, 1.5rem + 2.4vw, 3.6rem);
  line-height: 0.98; letter-spacing: -0.008em;
}
.titre-section em { font-style: normal; color: var(--violet); }
.bloc-tete p, .bloc-chapo { margin-top: 18px; font-size: 1.125rem; color: var(--encre-2); max-width: 40em; }

/* Itinéraire de la page (grands écrans) : les sections sont des arrêts,
   un repère jaune avance avec la lecture. */
.rail {
  position: fixed; z-index: 40; top: 50%; left: max(18px, calc((100vw - var(--largeur)) / 2 - 136px));
  display: none; flex-direction: column; gap: 4px; padding: 6px 0 6px 22px;
  transform: translateY(-50%); opacity: 0; pointer-events: none;
  transition: opacity var(--moyen) var(--sortie);
}
.rail.visible, .rail:focus-within { opacity: 1; pointer-events: auto; }
.rail::before, .rail .sidebar-fil { content: ""; position: absolute; left: 4px; top: 16px; width: 2px; border-radius: 1px; }
.rail::before { bottom: 16px; background: var(--trait); }
.rail a {
  position: relative; display: block; padding: 5px 0; font-size: 0.82rem; line-height: 1.3;
  color: var(--encre-3); text-decoration: none; white-space: nowrap;
}
.rail a::before {
  content: ""; position: absolute; left: -22px; top: 50%; width: 10px; height: 10px; margin-top: -5px;
  border-radius: 50%; background: var(--fond); border: 2px solid var(--trait-fort);
  transition: border-color var(--moyen), background-color var(--moyen), transform var(--moyen) cubic-bezier(0.34, 1.56, 0.64, 1);
}
.rail a span {
  display: inline-block; opacity: 0; transform: translateX(-6px);
  transition: opacity var(--moyen) var(--sortie), transform var(--moyen) var(--sortie), color var(--vif);
}
.rail:hover a span, .rail a:focus-visible span, .rail a.actif span { opacity: 1; transform: none; }
.rail a:hover span { color: var(--encre); }
.rail a.passe::before { border-color: var(--violet); }
.rail a.actif { color: var(--encre); font-weight: 600; }
.rail a.actif::before { border-color: var(--violet); background: var(--violet); transform: scale(1.2); }
@media (min-width: 1400px) and (min-height: 640px) {
  .rail { display: flex; }
}

/* Le constat */
.constat { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: start; }
.constat-tete { position: sticky; top: 120px; }
.constat-liste li {
  display: grid; grid-template-columns: 52px minmax(0, 1fr); column-gap: 18px;
  padding: 26px 0; border-top: 1px solid var(--trait);
}
.constat-liste li:last-child { border-bottom: 1px solid var(--trait); }
.constat-num {
  grid-row: span 2; font-family: var(--titre); font-size: 2.1rem; font-weight: 500; line-height: 0.9;
  color: var(--violet); font-variant-numeric: tabular-nums;
}
.constat-liste h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
.constat-liste p { margin-top: 4px; color: var(--encre-2); }

/* Voir, contrôler, agir : trois arrêts sur un même trait */
.parcours { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; padding-top: 64px; --progres: 0; }
.parcours-voie, .parcours-fait { position: absolute; top: 16px; left: 16px; right: 0; height: 3px; border-radius: 2px; }
.parcours-voie { background: repeating-linear-gradient(90deg, var(--trait-fort) 0 10px, transparent 10px 18px); }
.parcours-fait { background: var(--violet); transform-origin: left center; transform: scaleX(var(--progres)); }
.etape { position: relative; }
.etape-borne {
  position: absolute; top: -64px; left: 0; width: 35px; height: 35px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--fond); border: 3px solid var(--trait-fort);
  transition: border-color var(--moyen), background-color var(--moyen);
}
.etape-borne::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--trait-fort); transition: background-color var(--moyen), transform var(--moyen) var(--sortie); }
.etape-borne::before {
  content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--violet); opacity: 0;
}
.etape.atteinte .etape-borne { border-color: var(--violet); }
.etape.atteinte .etape-borne::after { background: var(--violet); transform: scale(1.25); }
@media (prefers-reduced-motion: no-preference) {
  .etape.atteinte .etape-borne::before { animation: ping 1.1s var(--sortie); }
}
@keyframes ping { 0% { opacity: 0.8; transform: scale(1); } 100% { opacity: 0; transform: scale(2.1); } }
.etape h3 { font-family: var(--titre); font-size: 2.25rem; font-weight: 600; line-height: 1; }
/* Les trois verbes du titre s'allument avec leur arrêt. */
[data-verbe] { transition: color var(--lent) var(--sortie); }
[data-verbe].allume { color: var(--violet); }
.etape-sous { margin-top: 8px; color: var(--encre-3); font-size: 0.98rem; }
.etape ul { margin-top: 18px; display: grid; gap: 10px; }
.etape li { position: relative; padding-left: 22px; color: var(--encre-2); }
.etape li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 12px; height: 2px; background: var(--violet); }

/* Modules */
.modules { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px; }
.module {
  grid-column: span 2; position: relative; display: flex; flex-direction: column;
  padding: 30px 28px 26px; background: var(--fond); border: 1px solid var(--trait); border-radius: 12px;
  transition: border-color var(--moyen), transform var(--moyen) var(--sortie), box-shadow var(--moyen), opacity var(--lent) var(--sortie);
}
.module:nth-child(-n+2) { grid-column: span 3; }
.module:hover { border-color: rgba(119, 60, 151, 0.45); transform: translateY(-4px); box-shadow: 0 24px 44px -32px rgba(29, 23, 36, 0.55); }
.module-icone { display: block; width: 46px; height: 46px; color: var(--violet); }
.module-icone svg { width: 100%; height: 100%; stroke-width: 1.5; }
.module-icone path, .module-icone circle, .module-icone rect { stroke-dasharray: 1 0; }
@media (prefers-reduced-motion: no-preference) {
  .module:hover .module-icone path, .module:hover .module-icone circle, .module:hover .module-icone rect { animation: retrace 0.8s var(--glisse); }
}
.module h3 { margin-top: 22px; font-family: var(--titre); font-size: 1.75rem; font-weight: 600; line-height: 1.02; }
.module-phrase { margin-top: 10px; color: var(--encre-2); }
.module ul { margin-top: 20px; display: grid; gap: 9px; }
.module li { position: relative; padding-left: 22px; font-size: 0.975rem; color: var(--encre-2); line-height: 1.45; }
.module li::before { content: ""; position: absolute; left: 1px; top: 0.66em; width: 11px; height: 2px; background: var(--violet); }
.module-prix {
  margin-top: auto; padding-top: 22px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px;
  font-size: 0.92rem; color: var(--encre-3);
}
.module ul + .module-prix { margin-top: 24px; border-top: 1px dashed var(--trait-fort); }
.module-prix strong { font-family: var(--titre); font-size: 1.85rem; font-weight: 600; color: var(--encre); line-height: 1; font-variant-numeric: tabular-nums; }

.module-complet {
  grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; gap: 18px 44px; align-items: center;
  padding: 40px 44px; background: var(--nuit); color: var(--nuit-texte); border-color: transparent;
}
.module-complet:hover { border-color: transparent; }
.module-complet .module-icone { color: var(--signal); }
.module-complet h3 { margin-top: 16px; color: #FFFFFF; font-size: 2.2rem; }
.module-complet .module-phrase { color: var(--nuit-muet); }
.module-complet ul { margin-top: 0; }
.module-complet li { color: var(--nuit-texte); }
.module-complet li::before { background: var(--signal); }
.module-complet .module-prix { margin: 0; padding: 0; border: 0; flex-direction: column; align-items: flex-start; color: var(--nuit-muet); }
.module-complet .module-prix strong { color: var(--signal); font-size: 3rem; }
.etiquette {
  display: inline-block; padding: 3px 10px; border-radius: 4px;
  font-family: var(--donnee); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.01em;
  background: var(--signal); color: var(--encre);
}

/* Impact : calcul de l'économie */
.impact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 64px; align-items: center; }
.leviers { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 8px; }
.leviers li { padding: 6px 14px; border-radius: 999px; background: var(--fond); border: 1px solid var(--trait); font-size: 0.92rem; color: var(--encre-2); }
.calcul { padding: 34px 34px 30px; border-radius: 16px; background: var(--fond); border: 1px solid var(--trait); box-shadow: 0 30px 60px -48px rgba(29, 23, 36, 0.6); }
.calcul-ligne { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--trait); }
.calcul-ligne span:first-child { color: var(--encre-2); }
.calcul-ligne span:last-child, .calcul-ligne output { font-family: var(--donnee); font-weight: 600; font-size: 1.1rem; color: var(--encre); white-space: nowrap; font-variant-numeric: tabular-nums; }
.calcul-reglage { padding: 4px 0 18px; border-bottom: 1px solid var(--trait); }
.calcul-reglage label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: var(--encre-2); }
.calcul-reglage output { font-family: var(--donnee); font-size: 1.15rem; font-weight: 600; color: var(--encre); white-space: nowrap; font-variant-numeric: tabular-nums; }
.calcul-gain { margin-top: 24px; }
.calcul-gain-chiffre {
  display: block; font-family: var(--titre); font-weight: 600; line-height: 0.95;
  font-size: clamp(2.4rem, 1.8rem + 2.2vw, 3.6rem); color: var(--ok); font-variant-numeric: tabular-nums;
}
.calcul-gain-libelle { display: block; margin-top: 8px; color: var(--encre-2); }
.calcul-note { margin-top: 16px; font-size: 0.875rem; color: var(--encre-3); }

.curseur { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 30px; margin-top: 10px; background: transparent; cursor: pointer; --rempli: 18%; }
.curseur:focus-visible { outline: none; }
.curseur::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--violet) 0 var(--rempli), var(--fond-3) var(--rempli) 100%); }
.curseur::-webkit-slider-thumb {
  -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%;
  background: #FFFFFF; border: 3px solid var(--violet); box-shadow: 0 3px 10px rgba(29, 23, 36, 0.22);
  transition: transform var(--vif) var(--sortie), box-shadow var(--vif);
}
.curseur:active::-webkit-slider-thumb { transform: scale(1.12); }
.curseur:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(119, 60, 151, 0.22); }
.curseur::-moz-range-track { height: 6px; border-radius: 3px; background: var(--fond-3); }
.curseur::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--violet); }
.curseur::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #FFFFFF; border: 3px solid var(--violet); }

/* Secteurs */
.secteurs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--trait); border-left: 1px solid var(--trait); }
.secteur {
  display: flex; gap: 18px; align-items: flex-start; padding: 30px 28px;
  border-right: 1px solid var(--trait); border-bottom: 1px solid var(--trait);
  transition: background-color var(--moyen);
}
.secteur:hover { background: var(--violet-pale); }
.secteur svg { width: 30px; height: 30px; flex-shrink: 0; color: var(--violet); stroke-width: 1.6; transition: transform var(--moyen) var(--sortie); }
.secteur:hover svg { transform: translateY(-2px) rotate(-4deg); }
.secteur h3 { font-family: var(--titre); font-size: 1.6rem; font-weight: 600; line-height: 1; }
.secteur p { margin-top: 6px; color: var(--encre-2); font-size: 0.98rem; }

/* Tarifs */
.tarifs-table { width: 100%; border-collapse: collapse; }
.tarifs-table th {
  padding: 0 18px 12px; text-align: left; border-bottom: 2px solid var(--encre);
  font-family: var(--donnee); font-size: 0.92rem; font-weight: 600; color: var(--encre-3);
}
.tarifs-table th:last-child, .tarifs-table td.prix-cell { text-align: right; }
.tarifs-table td { padding: 20px 18px; border-bottom: 1px solid var(--trait); color: var(--encre-2); vertical-align: middle; }
.tarifs-table td:first-child { color: var(--encre); font-weight: 600; font-size: 1.08rem; }
.tarifs-table td.prix-cell { white-space: nowrap; color: var(--encre-3); font-size: 0.92rem; }
.tarifs-table td.prix-cell strong { font-family: var(--titre); font-size: 1.75rem; font-weight: 600; color: var(--encre); margin-right: 4px; font-variant-numeric: tabular-nums; }
.tarifs-table tbody tr { transition: background-color var(--vif); }
.tarifs-table tbody tr:hover { background: var(--fond-2); }
.tarifs-table tr.star td { background: var(--violet-pale); }
.tarifs-table tr.star td:first-child { box-shadow: inset 4px 0 0 var(--violet); }
.tarifs-table .etiquette { margin-left: 10px; vertical-align: 2px; }
.tarifs-note { margin-top: 18px; font-size: 0.92rem; color: var(--encre-3); }

/* Application mobile */
.appli { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 64px; align-items: center; }
.stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px 10px 14px;
  border-radius: 10px; border: 1.5px solid var(--trait-fort); background: var(--fond);
  color: var(--encre); text-decoration: none; line-height: 1.25;
  transition: border-color var(--vif), transform var(--moyen) var(--sortie);
}
a.store-badge:hover { border-color: var(--encre); color: var(--encre); transform: translateY(-2px); }
.store-badge svg { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: var(--violet); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.store-badge strong { display: block; font-size: 0.98rem; }
.store-systeme { display: block; font-size: 0.82rem; color: var(--encre-3); }

.telephone {
  position: relative; width: 272px; aspect-ratio: 9 / 18.6; margin: 0 auto;
  padding: 11px; border-radius: 42px; background: var(--nuit);
  box-shadow: 0 50px 80px -46px rgba(28, 18, 38, 0.7), inset 0 0 0 2px #3A2A52;
}
.telephone::before { content: ""; position: absolute; top: 19px; left: 50%; width: 76px; height: 20px; margin-left: -38px; border-radius: 12px; background: var(--nuit); z-index: 3; }
.telephone-ecran { position: relative; height: 100%; overflow: hidden; border-radius: 32px; background: #F7F6F9; }
.tel-barre { display: flex; justify-content: space-between; padding: 14px 22px 0; font-family: var(--donnee); font-size: 0.72rem; font-weight: 600; color: var(--encre); }
.tel-entete { padding: 22px 18px 10px; }
.tel-entete strong { display: block; font-family: var(--titre); font-size: 1.55rem; font-weight: 600; line-height: 1; }
.tel-entete span { font-size: 0.78rem; color: var(--encre-3); }
.tel-liste { padding: 4px 10px; display: grid; gap: 6px; }
.tel-liste li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; background: #FFFFFF; box-shadow: 0 1px 0 rgba(29, 23, 36, 0.05); }
.tel-liste strong { display: block; font-size: 0.8rem; line-height: 1.2; }
.tel-liste small { display: block; font-size: 0.7rem; color: var(--encre-3); line-height: 1.3; }
.tel-pastille { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background: var(--trait-fort); }
.tel-pastille.route { background: var(--ok); box-shadow: 0 0 0 3px rgba(35, 132, 94, 0.16); }
.tel-pastille.arret { background: var(--signal); box-shadow: 0 0 0 3px rgba(242, 179, 61, 0.2); }
.tel-pastille.froid { background: #3A7BD5; box-shadow: 0 0 0 3px rgba(58, 123, 213, 0.16); }
.tel-onglets {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 8px 4px 16px; background: #FFFFFF; border-top: 1px solid var(--trait);
}
.tel-onglets span { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 0.62rem; color: var(--encre-3); }
.tel-onglets svg { width: 19px; height: 19px; }
.tel-onglets .actif { color: var(--violet); font-weight: 600; }
.tel-onglets .pastille-alerte::after {
  content: ""; position: absolute; top: -1px; left: 50%; margin-left: 4px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--alerte); box-shadow: 0 0 0 2px #FFFFFF;
}
.tel-notif {
  position: absolute; top: 44px; left: 9px; right: 9px; z-index: 2;
  padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 30px -10px rgba(28, 18, 38, 0.45);
  font-size: 0.72rem; line-height: 1.35; color: var(--encre-2);
  transform: translateY(-140%); opacity: 0;
}
.tel-notif-app { display: block; font-size: 0.66rem; color: var(--encre-3); margin-bottom: 2px; }
.tel-notif strong { display: block; color: var(--encre); font-size: 0.8rem; }
.appli-visuel.visible .tel-notif { animation: notification 9s var(--sortie) 0.8s infinite; }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    /* Le téléphone flotte un peu plus lentement que la page. */
    .telephone { animation: flotte linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
    .appel-filigrane svg { animation: derive linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
  }
}
@keyframes flotte { from { transform: translateY(46px) rotate(-1.5deg); } to { transform: translateY(-46px) rotate(1deg); } }
@keyframes derive { from { transform: rotate(-9deg) scale(0.94); } to { transform: rotate(5deg) scale(1.04); } }
@keyframes notification {
  0%   { transform: translateY(-140%); opacity: 0; }
  7%   { transform: none; opacity: 1; }
  52%  { transform: none; opacity: 1; }
  60%  { transform: translateY(-140%); opacity: 0; }
  100% { transform: translateY(-140%); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .tel-notif { transform: none; opacity: 1; }
}

/* Appel final */
.appel { position: relative; overflow: hidden; isolation: isolate; background: var(--violet); color: #FFFFFF; }
.appel-inner { max-width: var(--largeur); margin: 0 auto; padding: 96px var(--gouttiere); position: relative; }
.appel h2 { font-family: var(--titre); font-weight: 600; font-size: clamp(2.4rem, 1.6rem + 2.8vw, 4rem); line-height: 0.96; max-width: 14em; }
.appel p { margin-top: 18px; max-width: 36em; font-size: 1.125rem; color: rgba(255, 255, 255, 0.86); }
.appel .accueil-actions { margin-top: 32px; }
.appel-contacts { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 10px 28px; }
.appel-contacts a, .appel-contacts span {
  display: inline-flex; align-items: center; gap: 9px;
  color: #FFFFFF; text-decoration: none; font-weight: 500; font-variant-numeric: tabular-nums;
}
.appel-contacts a:hover { text-decoration: underline; color: #FFFFFF; }
.appel-contacts svg { width: 18px; height: 18px; opacity: 0.8; }
.appel-filigrane {
  position: absolute; right: -90px; top: 50%; width: 560px; height: 560px; margin-top: -280px; z-index: -1;
  color: rgba(255, 255, 255, 0.09); pointer-events: none;
}
.appel-filigrane .marque-chemin { stroke-dasharray: 1 0; }
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .appel-filigrane:not(.visible) .marque-chemin { stroke-dasharray: 0 1; }
  .appel-filigrane.visible .marque-chemin { animation: retrace 2.4s var(--glisse) both; }
}

/* ----------------------------------------------- PAGES DOCUMENTAIRES --- */

.doc-tete { background: var(--fond-2); border-bottom: 1px solid var(--trait); }
.doc-tete-inner { max-width: var(--largeur); margin: 0 auto; padding: 60px var(--gouttiere) 52px; }
.doc-tete h1 {
  max-width: 17em; font-family: var(--titre); font-weight: 600;
  font-size: clamp(2.6rem, 1.8rem + 2.8vw, 4.3rem); line-height: 0.98; letter-spacing: -0.008em;
}
.doc-tete h1 em { font-style: normal; color: var(--violet); }
.doc-tete .lead { margin-top: 18px; max-width: 42em; font-size: 1.15rem; color: var(--encre-2); }
.hero-meta { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-meta > span {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 13px;
  border-radius: 999px; background: var(--fond); border: 1px solid var(--trait);
  font-size: 0.92rem; color: var(--encre-2);
}
.hero-meta svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--violet); }
.hero-meta a { color: var(--encre); font-weight: 600; text-decoration: none; }
.hero-meta a:hover { color: var(--violet); }

.layout {
  max-width: var(--largeur); margin: 0 auto; padding: 64px var(--gouttiere) 112px;
  display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 72px; align-items: start;
}

/* Sommaire : un itinéraire dont la section lue est l'arrêt courant. */
.sidebar { position: sticky; top: 108px; }
.sidebar-label { margin-bottom: 14px; font-family: var(--donnee); font-size: 0.95rem; font-weight: 600; color: var(--encre-3); }
.sidebar nav { position: relative; display: flex; flex-direction: column; padding-left: 26px; --progres: 0; }
.sidebar nav::before, .sidebar-fil { content: ""; position: absolute; left: 6px; top: 16px; width: 2px; border-radius: 1px; }
.sidebar nav::before { bottom: 16px; background: var(--trait); }
.sidebar-fil { height: 0; background: var(--violet); transition: height 120ms linear; }
/* Le repère « vous êtes ici » au bout du trait */
.sidebar-fil::after {
  content: ""; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; margin-left: -6px;
  border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 3px var(--fond), 0 2px 6px rgba(29, 23, 36, 0.25);
}
.sidebar nav a {
  position: relative; padding: 7px 0; line-height: 1.35;
  color: var(--encre-2); font-size: 0.95rem; text-decoration: none;
  transition: color var(--vif);
}
.sidebar nav a::before {
  content: ""; position: absolute; left: -25px; top: 50%; width: 12px; height: 12px; margin-top: -6px;
  border-radius: 50%; background: var(--fond); border: 2px solid var(--trait-fort);
  transition: border-color var(--moyen), background-color var(--moyen), transform var(--moyen) var(--sortie);
}
.sidebar nav a:hover { color: var(--encre); }
.sidebar nav a:hover::before { border-color: var(--violet); }
.sidebar nav a.passe::before { border-color: var(--violet); }
.sidebar nav a.actif { color: var(--encre); font-weight: 600; }
.sidebar nav a.actif::before { border-color: var(--violet); background: var(--violet); transform: scale(1.15); }

.content { min-width: 0; max-width: 48rem; }
.content section { scroll-margin-top: 104px; }
.content section + section { margin-top: 76px; }
.content > .highlight:first-child { margin-top: 0; margin-bottom: 64px; }

.section-header { display: flex; align-items: center; gap: 18px; margin-bottom: 24px; }
.content h2 { font-family: var(--titre); font-size: 2.15rem; font-weight: 600; line-height: 1.02; }
.content h3 { font-size: 1.125rem; font-weight: 600; }
.content p { color: var(--encre-2); }
.content p + p, .content p + .stores { margin-top: 14px; }
.content p strong, .content li strong { color: var(--encre); }
.content ul:not([class]), .content ol:not([class]) { margin: 14px 0; padding-left: 1.3em; color: var(--encre-2); }

/* Numéro de section : une borne kilométrique */
.section-num {
  flex-shrink: 0; position: relative; display: grid; place-items: end center;
  width: 38px; height: 46px; padding-bottom: 5px;
  border: 2px solid var(--encre); border-radius: 17px 17px 4px 4px;
  background: linear-gradient(var(--violet) 0 40%, var(--fond) 40%);
  font-family: var(--donnee); font-size: 0.95rem; font-weight: 600; line-height: 1; color: var(--encre);
  font-variant-numeric: tabular-nums;
}

.card {
  margin-top: 16px; padding: 22px 24px;
  background: var(--fond); border: 1px solid var(--trait); border-radius: var(--rayon);
  transition: border-color var(--moyen), box-shadow var(--moyen);
}
.card:hover { border-color: var(--trait-fort); box-shadow: 0 18px 36px -30px rgba(29, 23, 36, 0.5); }
.card-title { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; font-weight: 600; font-size: 1.06rem; color: var(--encre); line-height: 1.35; }
.card-icon { flex-shrink: 0; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--violet-pale); color: var(--violet); }
.card-icon svg { width: 19px; height: 19px; }
.card p { font-size: 1rem; }
.card-base { display: block; margin-top: 10px; font-size: 0.92rem; color: var(--encre-3); }
.card-base strong { color: var(--encre-2); }

ol.steps { counter-reset: etape; margin: 22px 0; }
ol.steps li { position: relative; counter-increment: etape; padding: 0 0 22px 54px; color: var(--encre-2); min-height: 36px; }
ol.steps li::before {
  content: counter(etape); position: absolute; left: 0; top: -3px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--fond); border: 2px solid var(--violet);
  font-family: var(--donnee); font-size: 1rem; font-weight: 600; color: var(--violet);
}
ol.steps li::after {
  content: ""; position: absolute; left: 17px; top: 37px; bottom: 3px; width: 2px;
  background: repeating-linear-gradient(var(--trait-fort) 0 5px, transparent 5px 10px);
}
ol.steps li:last-child { padding-bottom: 0; }
ol.steps li:last-child::after { display: none; }

.highlight { margin: 24px 0; padding: 18px 22px; border-radius: var(--rayon); background: var(--violet-pale); border-left: 4px solid var(--violet); }
.highlight p { color: var(--encre); }
.highlight.attention { background: var(--attention-pale); border-left-color: #D99A0B; }
.highlight.attention strong:first-child { color: var(--attention); }

.data-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.98rem; }
.data-table th {
  padding: 10px 14px; text-align: left; border-bottom: 2px solid var(--encre);
  font-family: var(--donnee); font-size: 0.9rem; font-weight: 600; color: var(--encre-3);
}
.data-table td { padding: 13px 14px; border-bottom: 1px solid var(--trait); vertical-align: top; color: var(--encre-2); }
.data-table td:first-child { color: var(--encre); font-weight: 600; }
.data-table tbody tr:last-child td { border-bottom: 0; }

.rights-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 22px 0; }
.right-item { display: flex; gap: 12px; padding: 16px 18px; border-radius: var(--rayon); border: 1px solid var(--trait); }
.right-bullet { flex-shrink: 0; width: 10px; height: 10px; margin-top: 7px; border-radius: 50%; border: 2.5px solid var(--violet); }
.right-item-text strong { display: block; color: var(--encre); }
.right-item-text span { display: block; margin-top: 2px; font-size: 0.95rem; color: var(--encre-2); }

.contact-box {
  display: flex; gap: 20px; align-items: flex-start; margin-top: 22px; padding: 28px;
  border-radius: 14px; background: var(--nuit); color: var(--nuit-texte);
}
.contact-icon { flex-shrink: 0; width: 46px; height: 46px; border-radius: 11px; display: grid; place-items: center; background: var(--nuit-3); color: var(--signal); }
.contact-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-box h3 { color: #FFFFFF; font-size: 1.15rem; }
.content .contact-box p { margin-top: 6px; color: var(--nuit-muet); }
.contact-box a, .contact-box .contact-link { color: #FFFFFF; text-decoration-color: rgba(255, 255, 255, 0.4); }
.contact-box a:hover { color: var(--signal); }

/* Lien de texte : au survol, le soulignement s'efface vers la droite puis se
   redessine depuis la gauche. */
.contact-link {
  color: var(--violet); font-weight: 600; text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 1px;
}
.contact-link:hover { color: var(--violet-fonce); }
@media (prefers-reduced-motion: no-preference) {
  .contact-link:hover { animation: souligne 0.6s var(--glisse); }
}
@keyframes souligne {
  0%    { background-size: 100% 1px; background-position: 100% 100%; }
  45%   { background-size: 0 1px; background-position: 100% 100%; }
  45.1% { background-size: 0 1px; background-position: 0 100%; }
  100%  { background-size: 100% 1px; background-position: 0 100%; }
}
.date-maj { margin-top: 12px; font-size: 0.875rem; color: var(--encre-3); }

/* --------------------------------------------- CONTACT ET FORMULAIRES --- */

.contact-grille {
  max-width: var(--largeur); margin: 0 auto; padding: 64px var(--gouttiere) 112px;
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr); gap: 64px; align-items: start;
}
.contact-cote { position: sticky; top: 108px; display: grid; gap: 22px; }
.contact-cote .contact-box { margin-top: 0; }
.contact-cote h2, .formulaire-titre { font-family: var(--titre); font-size: 2rem; font-weight: 600; line-height: 1; }
.raccourcis { display: grid; }
.raccourcis a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 2px; border-bottom: 1px solid var(--trait); color: var(--encre); text-decoration: none; font-weight: 500;
}
.raccourcis a:first-child { border-top: 1px solid var(--trait); }
.raccourcis svg { width: 18px; height: 18px; color: var(--violet); transition: transform var(--moyen) var(--sortie); }
.raccourcis a:hover { color: var(--violet); }
.raccourcis a:hover svg { transform: translateX(4px); }

.formulaire { margin-top: 26px; }
.champs-deux { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }

.champ { margin-bottom: 20px; }
.champ label, .champ legend { display: block; margin-bottom: 8px; padding: 0; font-weight: 600; font-size: 0.97rem; color: var(--encre); }
.champ label span[aria-hidden="true"] { color: var(--violet); }
.saisie { position: relative; }
.champ input[type="text"], .champ input[type="password"], .champ input[type="email"],
.champ input[type="tel"], .champ select, .champ textarea {
  display: block; width: 100%; min-height: 52px; padding: 13px 15px;
  font-family: var(--texte); font-size: 1.0625rem; line-height: 1.4; color: var(--encre);
  background: var(--fond); border: 1.5px solid var(--trait-fort); border-radius: var(--rayon-petit);
  -webkit-appearance: none; appearance: none;
  transition: border-color var(--vif), box-shadow var(--moyen) var(--sortie);
}
.champ select {
  padding-right: 44px; cursor: pointer;
  background: var(--fond) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234B4455' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px 18px;
}
.champ textarea { min-height: 156px; resize: vertical; line-height: 1.55; }
.champ input:hover, .champ select:hover, .champ textarea:hover { border-color: #A79FB2; }
.champ input:focus, .champ select:focus, .champ textarea:focus {
  outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(119, 60, 151, 0.16);
}
.champ input[aria-invalid="true"], .champ textarea[aria-invalid="true"] { border-color: var(--alerte); }
.champ input[aria-invalid="true"]:focus, .champ textarea[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(180, 55, 47, 0.14); }
.champ-case input[aria-invalid="true"] { border-color: var(--alerte); }
.erreur-champ {
  display: flex; gap: 6px; align-items: baseline; margin-top: 7px;
  font-size: 0.92rem; font-weight: 500; color: var(--alerte);
}
.erreur-champ::before { content: ""; flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; background: currentColor; transform: translateY(-1px); }
.liste-erreurs a { color: inherit; }
.avis-noscript {
  margin: 0 0 18px; padding: 12px 14px; border-radius: var(--rayon-petit);
  background: var(--attention-pale); border-left: 4px solid #D99A0B; color: var(--encre); font-size: 0.95rem;
}
.aide { display: block; margin-top: 7px; font-size: 0.9rem; color: var(--encre-3); }

.champ-mdp input { padding-right: 116px; }
.bascule-mdp {
  position: absolute; top: 50%; right: 7px; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 10px;
  border: 0; border-radius: 5px; background: transparent; cursor: pointer;
  font-family: var(--texte); font-size: 0.9rem; font-weight: 600; color: var(--encre-2);
  transition: background-color var(--vif), color var(--vif);
}
.bascule-mdp:hover { background: var(--violet-pale); color: var(--violet); }
.bascule-mdp svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bascule-mdp .barre { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset var(--moyen) var(--sortie); }
.bascule-mdp[data-visible="true"] .barre { stroke-dashoffset: 0; }
.majuscules {
  display: flex; align-items: center; gap: 8px; margin-top: 8px;
  font-size: 0.9rem; font-weight: 500; color: var(--attention);
}
.majuscules[hidden] { display: none; }
.majuscules svg { width: 16px; height: 16px; }
@media (prefers-reduced-motion: no-preference) {
  .majuscules:not([hidden]) { animation: glisse-bas 0.3s var(--sortie); }
}
@keyframes glisse-bas { from { opacity: 0; transform: translateY(-4px); } }

.champ label.champ-case, .champ-case { display: flex; gap: 12px; align-items: flex-start; margin: 0; cursor: pointer; font-size: 0.97rem; font-weight: 400; color: var(--encre-2); }
.champ-case input[type="checkbox"] {
  flex-shrink: 0; width: 21px; height: 21px; margin: 2px 0 0; border-radius: 4px;
  -webkit-appearance: none; appearance: none; cursor: pointer;
  border: 1.5px solid var(--trait-fort); background: var(--fond) no-repeat center / 14px 14px;
  transition: background-color var(--vif), border-color var(--vif);
}
.champ-case input[type="checkbox"]:checked {
  border-color: var(--violet); background-color: var(--violet);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.champ-case input[type="checkbox"]:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

/* Objet de la demande : des pastilles plutôt qu'une liste déroulante */
fieldset.champ { border: 0; margin: 0 0 24px; padding: 0; min-width: 0; }
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce { position: relative; }
.puce input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.puce span {
  display: inline-flex; align-items: center; padding: 9px 16px; border-radius: 999px;
  border: 1.5px solid var(--trait-fort); background: var(--fond);
  font-size: 0.97rem; font-weight: 500; color: var(--encre-2); cursor: pointer; user-select: none;
  transition: background-color var(--vif), border-color var(--vif), color var(--vif);
}
.puce span:hover { border-color: var(--encre); color: var(--encre); }
.puce input:checked + span { background: var(--encre); border-color: var(--encre); color: #FFFFFF; }
.puce input:focus-visible + span { outline: 2px solid var(--violet); outline-offset: 2px; }

.pot-miel { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alerte {
  display: flex; gap: 12px; align-items: flex-start; margin-bottom: 22px; padding: 14px 16px;
  border: 1px solid transparent; border-radius: var(--rayon-petit); font-size: 0.98rem; line-height: 1.5;
}
.alerte svg { flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; stroke-width: 2; }
.alerte-erreur { background: var(--alerte-pale); border-color: #F0C6C1; color: #8C2A22; }
.alerte-succes { background: var(--ok-pale); border-color: #BDE2CD; color: #1A6647; }
.alerte-info   { background: var(--violet-pale); border-color: #E2D2EC; color: #4E2766; }
.alerte a { color: inherit; font-weight: 600; }
@media (prefers-reduced-motion: no-preference) {
  .alerte-erreur { animation: secousse 0.5s var(--sortie) 0.25s both; }
}
@keyframes secousse {
  0%, 100% { transform: none; }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(2px); }
}
.liste-erreurs { margin: 6px 0 0; padding-left: 1.1em; }

/* ------------------------------------------------------- CONNEXION --- */
/* Écran plein : à gauche le logo se trace comme un itinéraire ; à droite
   le formulaire. */

body.page-auth { background: var(--fond); }
.connexion { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }

.scene {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; padding: 34px 52px 40px;
  background: var(--nuit); color: var(--nuit-texte);
}
.scene-fond { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
.scene-fond path { fill: none; stroke: rgba(241, 236, 245, 0.055); stroke-width: 1.2; }
.scene-fond .majeure { stroke: rgba(241, 236, 245, 0.085); stroke-width: 2.4; }
.scene .logo-name { color: #FFFFFF; }
.scene .logo-produit { color: var(--nuit-muet); }
.scene .logo-mark { color: var(--violet-clair); }

.scene-centre { margin: auto 0; padding: 40px 0 32px; }
.scene-trace { position: relative; width: clamp(150px, 30vh, 300px); aspect-ratio: 1; }
.scene-trace svg { width: 100%; height: 100%; overflow: visible; }
.trace-fantome { stroke: var(--nuit-3); }
.trace-chemin { stroke: var(--violet-clair); }
.trace-influx { stroke: #FFFFFF; stroke-dasharray: 0.07 0.93; stroke-dashoffset: 0; opacity: 0; }
.scene-trace.arrive .trace-influx { animation: influx 6s linear 0.6s infinite; }
@keyframes influx {
  from { stroke-dashoffset: 0; opacity: 0.5; }
  to   { stroke-dashoffset: -1; opacity: 0.5; }
}
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  html:not(.anime) .trace-chemin { stroke-dasharray: 0 1; }
  html:not(.anime) .trace-mobile { opacity: 0; }
}
.trace-point { fill: var(--signal); stroke: var(--nuit); stroke-width: 8; }
.trace-onde { fill: none; stroke: var(--signal); stroke-width: 5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.scene-trace.arrive .trace-onde { animation: pouls 2.4s ease-out 0.2s infinite; }
.scene-trace.arrive .trace-onde.seconde { animation-delay: 0.5s; }
/* Le pouls : deux battements rapprochés, puis un repos. */
@keyframes pouls {
  0% { opacity: 0.9; transform: scale(0.7); }
  30% { opacity: 0; transform: scale(2.6); }
  100% { opacity: 0; transform: scale(2.6); }
}

.scene-titre {
  margin-top: 40px; max-width: 11ch;
  font-family: var(--titre); font-size: clamp(2.6rem, 1.4rem + 3.4vw, 4.6rem); font-weight: 600; line-height: 0.94; letter-spacing: -0.01em;
  color: #FFFFFF;
}
.scene-titre em { font-style: normal; color: var(--signal); }
@media (prefers-reduced-motion: no-preference) {
  .scene-titre.lignes .ligne > span { animation-delay: 0.45s; }
  .scene-titre.lignes .ligne:nth-child(2) > span { animation-delay: 0.57s; }
}

/* Profondeur : le réseau de routes et le logo glissent un peu sous la souris
   (variables posées par site.js, pointeur précis seulement). */
.scene-fond { transform: translate3d(calc(var(--dx, 0) * -14px), calc(var(--dy, 0) * -10px), 0) scale(1.05); }
.scene-trace { transform: translate3d(calc(var(--dx, 0) * 6px), calc(var(--dy, 0) * 5px), 0); }
/* Circulation : quelques véhicules parcourent les routes du fond. */
.scene-fond .circulation { fill: var(--violet-clair); opacity: 0.75; }
.scene-fond .circulation.balise { fill: var(--signal); opacity: 0.9; }

/* Pendant la vérification des identifiants, le pouls s'accélère. */
.scene.en-cours .scene-trace.arrive .trace-onde { animation-duration: 0.9s; }
.scene.en-cours .scene-trace.arrive .trace-influx { animation-duration: 1.4s; }
/* Identifiants refusés : à l'arrivée du tracé, le point passe au rouge. */
@media (prefers-reduced-motion: no-preference) {
  .connexion:has(.alerte-erreur) .trace-point { animation: point-alerte 2.6s ease-out 3.1s; }
  .connexion:has(.alerte-erreur) .trace-onde { stroke: #FF6B5E; }
}
@keyframes point-alerte { 0%, 55% { fill: #FF6B5E; } 100% { fill: var(--signal); } }
.scene-texte { margin-top: 16px; max-width: 30em; color: var(--nuit-muet); }

.scene-atouts { margin-top: 30px; display: grid; gap: 12px; max-width: 32em; }
.scene-atouts li { display: flex; gap: 14px; align-items: baseline; color: var(--nuit-texte); }
.scene-atouts li::before {
  content: ""; flex-shrink: 0; position: relative; top: 1px; width: 10px; height: 10px; border-radius: 50%;
  border: 2.5px solid var(--violet-clair); transition: background-color var(--moyen), border-color var(--moyen);
}
.scene-atouts li.atteint::before { background: var(--signal); border-color: var(--signal); }
@media (scripting: enabled) and (prefers-reduced-motion: no-preference) {
  .scene-atouts li { opacity: 0.35; transition: opacity var(--lent) var(--sortie); }
  .scene-atouts li.atteint { opacity: 1; }
  html:not(.anime) .scene-atouts li { animation: secours 0s 2.5s forwards; }
}

.scene-app { margin-top: auto; padding-top: 22px; border-top: 1px solid var(--nuit-trait); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; font-size: 0.9rem; color: var(--nuit-muet); }
.liens-app { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.liens-app a { display: inline-flex; align-items: center; gap: 7px; color: #FFFFFF; text-decoration: none; font-weight: 500; }
.liens-app a:hover { color: var(--signal); }
.liens-app svg { width: 16px; height: 16px; fill: none; stroke: var(--violet-clair); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.panneau { display: flex; flex-direction: column; padding: 28px 56px 30px; background: var(--fond); }
.panneau-nav { display: flex; justify-content: flex-end; gap: 4px; }
.panneau-nav a { position: relative; padding: 6px 10px; color: var(--encre-2); font-weight: 500; font-size: 0.95rem; text-decoration: none; }
.panneau-nav a::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 1px; height: 2px; background: var(--violet); transform: scaleX(0); transform-origin: left; transition: transform var(--moyen) var(--sortie); }
.panneau-nav a:hover { color: var(--encre); }
.panneau-nav a:hover::after { transform: scaleX(1); }
.panneau-corps { width: 100%; max-width: 420px; margin: auto; padding: 48px 0; }
.panneau-corps h1 { font-family: var(--titre); font-size: 3rem; font-weight: 600; line-height: 1; letter-spacing: -0.008em; }
.sous-titre { margin: 10px 0 32px; color: var(--encre-2); }
.panneau-corps .btn-bloc { margin-top: 8px; min-height: 52px; font-size: 1.05rem; }
.auth-liens { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--trait); font-size: 0.97rem; color: var(--encre-2); }
.auth-liens a { font-weight: 600; }
.panneau-pied { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 18px; font-size: 0.875rem; color: var(--encre-3); }
.panneau-pied a { color: var(--encre-3); text-decoration: none; }
.panneau-pied a:hover { color: var(--violet); }
.panneau-pied p { display: flex; flex-wrap: wrap; gap: 4px 16px; }

/* Écrans peu hauts (portables 1280 × 720, 1366 × 768) : tout tient sans défiler. */
@media (min-width: 961px) and (max-height: 860px) {
  .scene { padding-top: 28px; padding-bottom: 26px; }
  .scene-centre { padding: 22px 0 18px; }
  .scene-trace { width: clamp(120px, 24vh, 220px); }
  .scene-titre { margin-top: 22px; font-size: clamp(2.4rem, 1.2rem + 2.6vw, 3.6rem); }
  .scene-texte { margin-top: 12px; }
  .scene-atouts { margin-top: 18px; gap: 8px; }
  .scene-app { padding-top: 16px; }
  .panneau-corps { padding: 28px 0; }
}

@media (prefers-reduced-motion: no-preference) {
  .panneau-corps > * { animation: monte 0.8s var(--sortie) both; }
  .panneau-corps > :nth-child(2) { animation-delay: 70ms; }
  .panneau-corps > :nth-child(3) { animation-delay: 140ms; }
  .panneau-corps > :nth-child(4) { animation-delay: 210ms; }
  .panneau-corps > :nth-child(5) { animation-delay: 280ms; }
  .panneau-corps:has(.alerte) > * { animation: none; }
}
@keyframes monte { from { opacity: 0; transform: translateY(16px); } }

/* ---------------------------------------------------------- PIED DE PAGE - */

.pied { margin-top: auto; background: var(--nuit); color: var(--nuit-muet); }
.footer-inner {
  max-width: var(--largeur); margin: 0 auto; padding: 72px var(--gouttiere) 48px;
  display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 40px;
}
.footer-marque p { margin-top: 18px; max-width: 26em; font-size: 0.95rem; }
.footer-marque .footer-lieu { margin-top: 10px; color: var(--nuit-texte); }
.pied .logo { color: #FFFFFF; }
.pied .logo-name { color: #FFFFFF; }
.pied .logo-produit { color: var(--nuit-muet); }
.pied .logo-mark { color: var(--violet-clair); }
.footer-col h2 { margin-bottom: 14px; font-family: var(--donnee); font-size: 1rem; font-weight: 600; color: #FFFFFF; }
.footer-col ul { display: grid; gap: 8px; }
.footer-col a { color: var(--nuit-muet); text-decoration: none; font-size: 0.95rem; transition: color var(--vif); }
.footer-col a:hover { color: #FFFFFF; }
.footer-os { color: rgba(185, 174, 198, 0.7); }
.footer-bas {
  max-width: var(--largeur); margin: 0 auto; padding: 22px var(--gouttiere) 30px;
  border-top: 1px solid var(--nuit-trait);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
  font-size: 0.875rem;
}
.footer-bas p { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-bas a { color: var(--nuit-muet); text-decoration: none; }
.footer-bas a:hover { color: #FFFFFF; }

/* --------------------------------------------------------------- 404 ------ */
/* Page d'erreur : l'itinéraire s'arrête devant une route barrée. */

.erreur-404 {
  max-width: var(--largeur); margin: 0 auto; padding: 64px var(--gouttiere) 40px;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center;
}
.erreur-visuel { border-radius: 16px; overflow: hidden; background: var(--nuit-2); }
.erreur-visuel svg { display: block; width: 100%; height: auto; }
.erreur-visuel .voie { fill: none; stroke: rgba(241, 236, 245, 0.08); stroke-width: 3; stroke-linecap: round; }
.erreur-visuel .trajet-prevu { fill: none; stroke: rgba(205, 176, 226, 0.4); stroke-width: 2.5; stroke-dasharray: 1 8; stroke-linecap: round; }
.erreur-visuel .trajet-fait { fill: none; stroke: var(--signal); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 1 0; }
.erreur-visuel .deviation { fill: none; stroke: var(--violet-clair); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 6 8; }
.erreur-visuel .vehicule-corps { fill: var(--signal); stroke: var(--nuit); stroke-width: 3; }
.erreur-visuel .barriere-bande { fill: #FFFFFF; }
.erreur-visuel .barriere-rouge { fill: #D9473C; }
.erreur-visuel .barriere-pied { stroke: #FFFFFF; stroke-width: 3; }
.erreur-visuel .etiquette-svg { font-family: var(--donnee); font-size: 12px; font-weight: 600; fill: var(--nuit-muet); letter-spacing: 0.06em; }
.erreur-visuel .etiquette-svg.forte { fill: #FFFFFF; }
.erreur-visuel .depart { fill: var(--nuit-muet); }
.erreur-visuel .deviation-fleche { fill: none; stroke: var(--violet-clair); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.erreur-404 h1 em { font-style: normal; color: var(--violet); }
.erreur-visuel .deviation-groupe { transition: opacity var(--lent) var(--sortie); }
.erreur-visuel .en-route .deviation-groupe { opacity: 0; }
.erreur-visuel .barriere { transform-box: fill-box; transform-origin: center bottom; }
.erreur-visuel .barriere.secoue { animation: secousse 0.5s var(--sortie); }
@media (prefers-reduced-motion: no-preference) {
  .erreur-visuel .deviation { animation: defile-deviation 1.4s linear infinite; }
}
@keyframes defile-deviation { to { stroke-dashoffset: -14; } }

.erreur-code { font-family: var(--donnee); font-size: 1rem; font-weight: 600; color: var(--violet); }
.erreur-404 h1 { margin-top: 10px; font-family: var(--titre); font-size: clamp(2.8rem, 2rem + 3vw, 4.6rem); font-weight: 600; line-height: 0.96; }
.erreur-lead { margin: 20px 0 30px; max-width: 32em; font-size: 1.1rem; color: var(--encre-2); }
.erreur-lead code {
  padding: 1px 7px; border-radius: 5px; background: var(--fond-2); border: 1px solid var(--trait);
  color: var(--encre); overflow-wrap: anywhere;
}
.erreur-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.erreur-pistes { max-width: var(--largeur); margin: 0 auto; padding: 32px var(--gouttiere) 104px; }
.erreur-pistes h2 { margin-bottom: 18px; font-family: var(--titre); font-size: 1.9rem; font-weight: 600; }
.erreur-pistes ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.erreur-pistes li > a {
  display: flex; gap: 14px; align-items: flex-start; height: 100%; padding: 18px;
  border: 1px solid var(--trait); border-radius: 12px; background: var(--fond);
  color: var(--encre); text-decoration: none;
  transition: border-color var(--moyen), transform var(--moyen) var(--sortie), box-shadow var(--moyen);
}
.erreur-pistes li > a:hover { border-color: rgba(119, 60, 151, 0.45); transform: translateY(-3px); box-shadow: 0 20px 40px -30px rgba(29, 23, 36, 0.55); }
.erreur-pistes li > a strong { display: block; font-size: 1.05rem; }
.erreur-pistes li > a strong + span { display: block; margin-top: 2px; font-size: 0.95rem; color: var(--encre-2); line-height: 1.45; }
.erreur-piste-icone { flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--violet-pale); color: var(--violet); }
.erreur-piste-icone svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.erreur-aide { margin-top: 26px; color: var(--encre-2); }

/* ------------------------------------------------------- ADAPTATIONS --- */

@media (max-width: 1100px) {
  .accueil { gap: 40px; }
  .modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module, .module:nth-child(-n+2) { grid-column: span 1; }
  .module-complet { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .module-complet .module-prix { grid-column: 1 / -1; flex-direction: row; align-items: baseline; }
  .layout { grid-template-columns: 210px minmax(0, 1fr); gap: 48px; }
}

@media (max-width: 960px) {
  .accueil { grid-template-columns: minmax(0, 1fr); padding-top: 32px; }
  .demo { max-width: 640px; width: 100%; }
  .constat, .impact, .appli { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .constat-tete { position: static; }
  .secteurs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-marque { grid-column: 1 / -1; }
  .erreur-404 { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-top: 40px; }
  .erreur-visuel { max-width: 560px; }
  .contact-grille { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .contact-cote { position: static; }

  .connexion { grid-template-columns: minmax(0, 1fr); }
  .scene { padding: 22px 24px 26px; }
  .scene-centre { margin: 0; padding: 22px 0 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "titre trace" "texte trace"; gap: 0 20px; align-items: center; }
  .scene-trace { grid-area: trace; width: 104px; }
  .scene-titre { grid-area: titre; margin-top: 0; font-size: clamp(2rem, 1.4rem + 3vw, 2.8rem); }
  .scene-texte { grid-area: texte; margin-top: 8px; font-size: 0.95rem; }
  .scene-atouts, .scene-app { display: none; }
  .panneau { padding: 18px 24px 24px; }
  .panneau-nav { order: 3; justify-content: flex-start; margin: 10px -10px 0; }
  .panneau-corps { padding: 28px 0 32px; }
}

@media (max-width: 760px) {
  :root { --gouttiere: 20px; }
  body { font-size: 1rem; }
  .entete { position: relative; }
  .header-inner { flex-wrap: wrap; min-height: 0; padding-top: 12px; padding-bottom: 12px; row-gap: 10px; }
  .header-nav { width: 100%; justify-content: space-between; gap: 0; }
  .header-nav .lien-texte { padding: 8px 6px; font-size: 0.95rem; }
  .header-nav .lien-texte::after { left: 6px; right: 6px; }
  .header-nav .lien-texte:first-child { padding-left: 0; }
  .header-nav .lien-texte:first-child::after { left: 0; }
  .header-nav .btn { margin-left: 4px; min-height: 38px; padding: 0 12px; font-size: 0.9rem; }
  .bloc { padding-top: 72px; padding-bottom: 72px; }
  .preuves { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .preuves > div { display: grid; grid-template-columns: 8.4rem minmax(0, 1fr); align-items: baseline; gap: 12px; }
  .preuves dd { font-size: 1.7rem; }
  .preuves dt { margin-top: 0; }
  .demo { aspect-ratio: auto; display: flex; flex-direction: column; }
  .demo-carte { position: relative; inset: auto; aspect-ratio: 560 / 470; height: auto; }
  .demo-fiche { position: relative; right: auto; bottom: auto; width: auto; min-width: 0; margin: 0 10px 10px; }
  .demo-alerte { width: auto; left: 10px; right: 10px; top: 10px; min-width: 0; }
  .parcours { grid-template-columns: minmax(0, 1fr); gap: 36px; padding: 0 0 0 58px; }
  .parcours-voie, .parcours-fait { top: 0; bottom: 0; left: 16px; right: auto; width: 3px; height: auto; }
  .parcours-voie { background: repeating-linear-gradient(180deg, var(--trait-fort) 0 10px, transparent 10px 18px); }
  .parcours-fait { transform-origin: center top; transform: scaleY(var(--progres)); }
  .etape-borne { top: -2px; left: -58px; }
  .modules { grid-template-columns: minmax(0, 1fr); }
  .module-complet { grid-template-columns: minmax(0, 1fr); padding: 30px 24px; }
  .secteurs { grid-template-columns: minmax(0, 1fr); }
  .tarifs-table th:nth-child(2), .tarifs-table td:nth-child(2) { display: none; }
  .tarifs-table td, .tarifs-table th { padding-left: 10px; padding-right: 10px; }
  .tarifs-table .etiquette { display: table; margin: 6px 0 0; }
  .layout { grid-template-columns: minmax(0, 1fr); padding-top: 36px; }
  .sidebar { display: none; }
  .rights-grid, .champs-deux { grid-template-columns: minmax(0, 1fr); }
  .contact-box { flex-direction: column; padding: 22px; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 52px; }
  .appel-filigrane { width: 380px; height: 380px; right: -150px; margin-top: -190px; }
  .panneau-corps h1 { font-size: 2.5rem; }
  .logo-produit { display: none; }
}

@media (max-width: 380px) {
  .header-nav .lien-texte { padding-left: 4px; padding-right: 4px; font-size: 0.92rem; }
  .header-nav .lien-texte::after { left: 4px; right: 4px; }
  .header-nav .btn { padding: 0 10px; }
}

/* ------------------------------------------------------------ IMPRESSION -- */

@media print {
  body { font-size: 11pt; color: #000000; }
  .entete, .pied, .sidebar, .btn, .saut-contenu, .demo, .appel-filigrane, .scene { display: none !important; }
  .layout, .contact-grille { display: block; padding: 0; }
  .doc-tete { background: none; border: 0; }
  .card, .highlight, .contact-box { break-inside: avoid; box-shadow: none; }
  .contact-box { background: none; color: #000000; border: 1px solid #999999; }
  [data-apparait], [data-cascade] > * { opacity: 1 !important; transform: none !important; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555555; }
}

/* Mouvement réduit : les états finaux s'affichent sans transition. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
}
