:root {
  /* Les huit seules variables que l'administration et le sélecteur de thème
     réécrivent (voir theme_css_vars() dans helpers.php). Tout le reste de la
     feuille doit s'en déduire, sans quoi le site mélange deux palettes. */
  --color-primary: #123a63;
  --color-primary-dark: #0b2544;
  --color-primary-light: #1f5a94;
  --color-brand-blue: #0383cd;
  --color-brand-blue-dark: #026aa8;
  --color-accent: #f2a71b;
  --color-accent-dark: #d6900e;

  /* Fond de page et surfaces. Le fond n'est plus le blanc pur : un blanc à
     peine teinté de la couleur du thème, sur lequel les cadres, eux restés
     blancs, se détachent comme des objets posés. C'est ce rapport entre le
     support et la surface qui donne le relief, plus sûrement qu'une ombre.
     Ces trois teintes suivent le thème : sous un thème terre ou bordeaux, les
     bandes et les filets se réchauffent avec lui au lieu de rester au gris
     bleuté d'origine. */
  --color-bg: color-mix(in srgb, var(--color-primary) 2%, #ffffff);
  /* 9 % et non 6 % : a 6 %, l ecart avec le fond des sections claires ne
     faisait que 5,9 points de luminance, et l alternance ne se voyait
     pratiquement pas. A 9 % l ecart passe a 10,1 points. Reste derive du
     theme, donc les 25 palettes suivent. */
  --color-bg-alt: color-mix(in srgb, var(--color-primary) 9%, #ffffff);
  --color-surface: #ffffff;
  --color-border: color-mix(in srgb, var(--color-primary) 12%, #ffffff);
  --color-text: #2b3644;
  --color-text-muted: #64707c;
  --color-heading: #17395e;
  --slider-tint-amount: 100%;

  /* Teintes claires des pastilles, pilules et fonds doux. Le mode sombre avait
     déjà les siennes, toutes dérivées du thème ; le mode clair, lui, gardait
     des pastels écrits en dur, calés sur l'orange et le bleu d'origine. Sous un
     thème dont l'accent n'est plus orange, une étiquette crème se retrouvait
     avec un texte bleu, une pilule bleue avec un texte rouge. Les pourcentages
     ci-dessous reproduisent au plus près les anciennes valeurs sous le thème
     « Bleu marine & Orange », de sorte que rien ne bouge pour qui l'utilise. */
  --tint-accent-soft: color-mix(in srgb, var(--color-accent) 9%, #ffffff);
  --tint-accent-medium: color-mix(in srgb, var(--color-accent) 15%, #ffffff);
  --tint-accent-strong: color-mix(in srgb, var(--color-accent) 26%, #ffffff);
  --tint-accent-border: color-mix(in srgb, var(--color-accent) 36%, #ffffff);
  --tint-brand-faint: color-mix(in srgb, var(--color-brand-blue) 3%, #ffffff);
  --tint-brand-soft: color-mix(in srgb, var(--color-brand-blue) 10%, #ffffff);
  --tint-brand-medium: color-mix(in srgb, var(--color-brand-blue) 14%, #ffffff);
  --tint-brand-strong: color-mix(in srgb, var(--color-brand-blue) 20%, #ffffff);
  --tint-brand-border: color-mix(in srgb, var(--color-brand-blue) 27%, #ffffff);
  --tint-primary-soft: color-mix(in srgb, var(--color-primary-light) 9%, #ffffff);

  /* Encre des pastilles et des pilules. La couleur du thème posée telle quelle
     sur sa propre teinte claire ne tient pas le contraste : le fond et le texte
     partagent la teinte, ils se rapprochent au lieu de s'opposer. « Actualités »
     tombait ainsi à 3,4:1 une fois son fond accordé au thème. On garde la
     teinte et on descend la clarté, ce qui règle les 25 thèmes d'un coup au
     lieu d'en corriger un seul. */
  --ink-accent: color-mix(in srgb, var(--color-accent-dark) 58%, #101418);
  /* Encre des boutons d'action. Recalculée thème par thème côté PHP
     (readable_ink), ces deux valeurs étant celles du thème de la feuille. */
  --color-on-accent: #101418;
  --color-on-accent-dark: #101418;
  --ink-brand: color-mix(in srgb, var(--color-brand-blue-dark) 58%, #101418);

  /* Texte posé sur le bleu marine du thème : le pied de page, qui figure sur
     toutes les pages. Il était bleu pâle en dur, ce qui donnait du texte bleuté
     sur un pied de page brun ou vert selon le thème. */
  --color-on-primary: color-mix(in srgb, var(--color-primary-light) 16%, #ffffff);
  --color-on-primary-strong: color-mix(in srgb, var(--color-brand-blue) 30%, #ffffff);

  /* Largeur de lecture. L'œil qui finit une ligne doit retrouver le début de la
     suivante sans la chercher : passé environ 85 caractères il se trompe de
     ligne. Le site tournait à 110 caractères dans les pages de contenu et 152
     dans les avis, faute de plafond ailleurs que sur les sous-titres.
     Exprimé en « ch » et non en pixels pour que la colonne s'élargisse avec le
     texte quand un visiteur l'agrandit depuis le panneau d'accessibilité.
     Attention : 1 ch vaut la largeur du zéro, 8,63 px ici, alors qu'un
     caractère de texte français en fait 7,08 en moyenne. 66 ch donnent donc
     environ 80 caractères, et non 66. Mesuré, pas estimé. */
  --measure: 66ch;
  --measure-large: 78ch;

  /* Quatre arrondis, là où la feuille en comptait onze valeurs différentes
     (2, 3, 4, 6, 7, 8, 10, 12, 14, 16, 18, 20 et 26 px) réparties sans règle :
     des cartes voisines s'arrondissaient à 10, 12 et 14 px, écart invisible pris
     isolément mais qui empêche l'ensemble de paraître dessiné plutôt
     qu'assemblé. Chaque palier reprend la valeur la plus employée de son groupe,
     pour que le moins d'éléments possible bougent.
     Restent volontairement en dur : les 2, 3 et 4 px de quelques repères
     minuscules (points du diaporama, trait sous les titres, mini-étiquettes),
     où un palier de l'échelle serait démesuré, et les rayons composés du type
     « arrondi en haut seulement ». */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  /* Trois hauteurs d'ombre, toutes teintées de la couleur du thème plutôt que
     grises. L'étalement négatif resserre l'ombre sous l'objet au lieu de la
     laisser baver autour : elle se voit moins et pose mieux. */
  --shadow-sm: 0 4px 12px -6px color-mix(in srgb, var(--color-primary) 30%, transparent);
  --shadow: 0 14px 30px -18px color-mix(in srgb, var(--color-primary) 32%, transparent);
  --shadow-lg: 0 24px 46px -22px color-mix(in srgb, var(--color-primary) 38%, transparent);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: "Poppins", var(--font);
}

/* picture_tag() enveloppe certaines <img> dans un <picture> (repli WebP) : sans ce display,
   le <picture> devient l'enfant réel des mises en page flex/grid à la place de l'<img>, ce qui
   casse les règles de dimensionnement (flex-shrink, width, object-fit...) posées sur l'image. */
picture { display: contents; }
/* Corollaire du display ci-dessus, et il n'est pas facultatif : « contents » promeut AUSSI le
   <source> au rang d'enfant réel. Ce <source> ne dessine rien, mais il compte comme élément de
   flex, et un conteneur avec « gap » lui réserve donc une colonne vide juste avant l'image.
   Constaté le 24/08/2026 : 20 px de vide devant la photo de « Une auto-école à taille humaine »,
   qui semblait de ce fait flotter au lieu d'épouser le cadre, et 10 px devant le logo de
   l'en-tête. Un <source> n'a jamais rien à afficher : on le sort de la mise en page. */
picture > source { display: none; }

/* Barre de progression de chargement (façon YouTube/GitHub) : ne charge pas plus vite, mais
   rassure visuellement le visiteur pendant le court instant entre un clic et l'arrivée de la
   page suivante — cohérent avec les transitions déjà en place ailleurs sur le site. */
#page-progress {
  position: fixed; top: 0; left: 0; z-index: 9999;
  height: 4px; width: 0%;
  background: linear-gradient(90deg, var(--color-brand-blue), var(--color-accent));
  box-shadow: 0 0 8px 1px color-mix(in srgb, var(--color-accent) 70%, transparent);
  opacity: 0;
  transition: width 0.4s cubic-bezier(.4,0,.2,1), opacity 0.3s cubic-bezier(.4,0,.2,1);
}
#page-progress.is-loading { opacity: 1; }

/* Fond d'ambiance très discret : deux halos de couleur, doux et flous, qui donnent une
   impression de profondeur (comme deux sources de lumière lointaines) plutôt que des motifs
   décoratifs. Fixés derrière tout le contenu. `.section` n'a volontairement pas de fond propre
   (voir plus bas) : le blanc qu'on y voit est celui du <body>, donc ces halos n'apparaissent que
   dans ces zones-là — jamais derrière les cartes, le header/footer ou les sections
   `.section--alt`, qui ont toutes leur propre fond opaque par-dessus. Un très léger effet de
   parallaxe au scroll (voir main.js) renforce l'impression de profondeur : le fond bouge un peu
   moins vite que le contenu, comme s'il était plus loin.
   Désactivé si le visiteur a demandé de réduire les animations (interrupteur du site ou
   préférence système) ou activé le contraste élevé, où la sobriété prime sur la décoration. */
.bg-depth {
  position: fixed; inset: -10%; z-index: 0; overflow: hidden; pointer-events: none;
  will-change: transform;
}
.bg-depth::before,
.bg-depth::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  animation: depth-float ease-in-out infinite;
}
.bg-depth::before {
  top: -8%; left: -10%; width: 46vw; height: 46vw;
  background: radial-gradient(circle, color-mix(in srgb, var(--color-brand-blue) 35%, transparent) 0%, transparent 70%);
  animation-duration: 55s;
}
.bg-depth::after {
  bottom: -15%; right: -10%; width: 52vw; height: 52vw;
  background: radial-gradient(circle, color-mix(in srgb, var(--color-accent) 45%, transparent) 0%, transparent 70%);
  animation-duration: 65s;
  animation-delay: -20s;
}
:root[data-theme="dark"] .bg-depth::before {
  background: radial-gradient(circle, color-mix(in srgb, var(--color-accent) 30%, transparent) 0%, transparent 70%);
}
:root[data-theme="dark"] .bg-depth::after {
  background: radial-gradient(circle, color-mix(in srgb, var(--color-brand-blue) 30%, transparent) 0%, transparent 70%);
}
@keyframes depth-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(3%, -2%, 0) scale(1.06); }
}
:root[data-motion="reduced"] .bg-depth,
:root[data-contrast="high"] .bg-depth {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  .bg-depth { display: none; }
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/poppins-600.woff2") format("woff2");
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/poppins-700.woff2") format("woff2");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html { scrollbar-color: color-mix(in srgb, var(--color-brand-blue) 55%, transparent) var(--color-bg-alt); scrollbar-width: thin; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--color-bg-alt); }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--color-brand-blue) 45%, transparent); border-radius: var(--radius-pill); border: 2px solid var(--color-bg-alt); }
::-webkit-scrollbar-thumb:hover { background: color-mix(in srgb, var(--color-brand-blue) 70%, transparent); }
::selection { background: color-mix(in srgb, var(--color-brand-blue) 30%, transparent); color: var(--color-heading); }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Évite qu'un paragraphe finisse sur un mot seul : le navigateur remonte
     quelques mots depuis l'avant-dernière ligne. Hérité par tout le document,
     sauf les titres, qui demandent « balance » juste en dessous. Les
     navigateurs qui l'ignorent coupent comme avant. */
  text-wrap: pretty;
}
/* Les titres héritaient de l'interlignage du corps de texte, 1,6, qui est fait
   pour des lignes qu'on lit l'une après l'autre. Un titre se lit d'un bloc :
   au-delà de deux lignes, à 1,6, il se défait en énumération. Mesuré avant la
   correction : « Une auto-école à taille humaine » occupait 60 px de haut pour
   deux lignes de 18,7 px, et la question du Défi du jour 120 px pour quatre.
   Les rares titres qui posent déjà leur propre valeur (diapositive à 1,15,
   en-tête de page à 1,2, barre de carte à 1,3) gardent la leur.
   « balance » répartit les mots entre les lignes au lieu d'en laisser un seul,
   orphelin, sur la dernière. Sans effet sur un titre d'une seule ligne, et
   ignoré sans dommage par les navigateurs qui ne le connaissent pas. */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading); font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
}
strong, b { font-weight: 600; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary-light); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Anneau de mise au point. La navigation au clavier n'avait jusqu'ici que
   l'anneau brut du navigateur, un trait noir ou bleu système posé sur des
   boutons colorés et des pilules arrondies. Celui-ci suit le thème et se
   décolle de l'élément, ce qui le rend lisible sur un fond clair comme sur une
   photo. Il épouse le rayon des coins, les navigateurs le font seuls.
   « :focus-visible » et non « :focus » : le navigateur ne l'affiche qu'à la
   navigation au clavier, jamais après un clic à la souris, là où un anneau
   permanent serait pris pour un défaut d'affichage.
   « :where() » ne pèse rien en spécificité : les quelques règles de focus déjà
   posées ailleurs (champs de formulaire, étoiles de notation, interrupteurs)
   gardent donc la main sur leurs propres éléments. */
:where(a, button, input, select, textarea, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 3px solid var(--color-brand-blue);
  outline-offset: 2px;
}
/* Sur les six surfaces colorées ou sombres du site, le même anneau en blanc :
   la couleur du thème s'y confondrait avec le fond, puisque c'est elle qui le
   compose. */
.site-header__topbar :focus-visible,
.promo-banner :focus-visible,
.hero-slider :focus-visible,
.page-header :focus-visible,
.page-hero :focus-visible,
.site-footer :focus-visible {
  outline-color: #fff;
}
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}
.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;
}

/* Boutons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.2s cubic-bezier(.4,0,.2,1), box-shadow 0.2s cubic-bezier(.4,0,.2,1), transform 0.2s cubic-bezier(.4,0,.2,1);
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:disabled { opacity: 0.45; cursor: default; transform: none; box-shadow: none; }
.btn--primary { background: var(--color-primary); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--color-primary) 35%, transparent); }
.btn--primary:hover { background: var(--color-primary-dark); box-shadow: 0 8px 18px color-mix(in srgb, var(--color-primary) 40%, transparent); }
.btn--accent { background: var(--color-accent); color: var(--color-on-accent); box-shadow: 0 4px 12px color-mix(in srgb, var(--color-accent-dark) 35%, transparent); }
.btn--accent:hover { background: var(--color-accent-dark); color: var(--color-on-accent-dark); box-shadow: 0 8px 18px color-mix(in srgb, var(--color-accent-dark) 40%, transparent); }
.btn--outline { background: transparent; border-color: #fff; color: #fff; }
.btn--outline:hover { background: rgba(255,255,255,0.15); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}
/* 10 % de bleu tres fonce melanges au rouge de marque : le blanc du menu passe
   de 4,25 a 4,81 de contraste, au-dessus des 4,5 exiges, sur les 26 palettes.
   Sur le theme en place, la couleur passe de #e13d3d a #cd3e42 : un rouge a
   peine plus profond, que personne ne remarquera. Reste derive du theme. */
.site-header__topbar {
  background: color-mix(in srgb, var(--color-brand-blue) 90%, var(--color-primary-dark));
  box-shadow: 0 3px 6px color-mix(in srgb, var(--color-primary-dark) 15%, transparent);
}
.site-header__topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar-search { position: relative; display: flex; align-items: center; flex-shrink: 0; }
.topbar-search__suggestions {
  position: absolute; top: 100%; left: 0; right: 0; margin: 4px 0 0; padding: 6px;
  list-style: none; z-index: 200;
  background: #fff; border-radius: var(--radius); box-shadow: 0 10px 26px rgba(0,0,0,0.2);
  max-height: 280px; overflow-y: auto;
}
.topbar-search__suggestions li { margin: 0; }
.topbar-search__suggestions a {
  display: block; padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--color-text); font-size: 0.85rem; font-weight: 500; text-decoration: none;
}
.topbar-search__suggestions a:hover,
.topbar-search__suggestions a.is-active { background: var(--color-bg-alt); color: var(--color-primary); text-decoration: none; }
.topbar-search input {
  border: none; border-radius: 999px 0 0 999px;
  padding: 7px 14px; font-size: 0.8rem; width: 160px;
  background: rgba(255,255,255,0.92); color: var(--color-text);
}
.topbar-search input::placeholder { color: var(--color-text-muted); }
/* Ce champ remplaçait l'anneau par un simple changement de fond. Suffisant à la
   souris, mais il privait aussi le clavier de tout repère : le fond passe de
   0,92 à 1 d'opacité, autant dire rien de visible sur la barre colorée. Le fond
   reste, l'anneau revient pour le seul cas où il sert. */
.topbar-search input:focus { outline: none; background: #fff; }
.topbar-search input:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.topbar-search button {
  border: none; border-radius: 0 999px 999px 0;
  padding: 7px 12px; background: var(--color-primary-dark); color: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.topbar-search button:hover { background: var(--color-accent-dark); }
@media (max-width: 900px) {
  .topbar-search input { width: 120px; }
}
@media (max-width: 700px) {
  .topbar-search { display: none; }
}
.topbar-nav ul {
  list-style: none; display: flex; flex-wrap: wrap; gap: 2px;
  margin: 0; padding: 0;
}
.topbar-nav a {
  display: block; padding: 9px 12px;
  /* Blanc opaque et non 92 % : le contraste passe de 3,81 à 4,25 sur le thème
     en place. Ce n'est pas encore les 4,5 exigés, et ça ne peut pas l'être sans
     assombrir la barre elle-même, ce qui se verrait. */
  color: #fff; font-size: 0.82rem; font-weight: 600;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  transition: background-color 0.2s cubic-bezier(.4,0,.2,1), color 0.2s cubic-bezier(.4,0,.2,1);
}
.topbar-nav a:hover, .topbar-nav a.is-active {
  background: rgba(255,255,255,0.16); color: #fff; text-decoration: none;
}

.site-header__top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  gap: 20px;
  max-width: 1160px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--color-heading); flex-shrink: 0; margin-right: auto; }
.brand__link { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand__link:hover { text-decoration: none; }
.brand__text {
  font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; white-space: nowrap;
  background: linear-gradient(100deg,
    var(--color-heading) 0%, var(--color-heading) 42%,
    color-mix(in srgb, var(--color-heading) 55%, white) 50%,
    var(--color-heading) 58%, var(--color-heading) 100%);
  background-size: 250% 100%;
  background-clip: text; -webkit-background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: brand-shine 6s linear infinite;
}
.brand__text strong {
  background: linear-gradient(100deg,
    var(--color-accent-dark) 0%, var(--color-accent-dark) 42%,
    color-mix(in srgb, var(--color-accent-dark) 55%, white) 50%,
    var(--color-accent-dark) 58%, var(--color-accent-dark) 100%);
  background-size: 250% 100%;
  background-clip: text; -webkit-background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  animation: brand-shine 6s linear infinite;
}
/* Même durée/rythme sur les deux segments (texte + "Mac2") pour que le reflet traverse le
   logo comme un seul passage continu, de droite à gauche, plutôt que deux brillances décalées. */
@keyframes brand-shine {
  from { background-position: 200% 0; }
  to { background-position: -50% 0; }
}
:root[data-motion="reduced"] .brand__text,
:root[data-motion="reduced"] .brand__text strong,
:root[data-contrast="high"] .brand__text,
:root[data-contrast="high"] .brand__text strong {
  animation: none;
  background: none;
  color: var(--color-heading);
  -webkit-text-fill-color: currentColor;
}
:root[data-contrast="high"] .brand__text strong,
:root[data-motion="reduced"] .brand__text strong {
  color: var(--color-accent-dark);
}
@media (prefers-reduced-motion: reduce) {
  .brand__text, .brand__text strong { animation: none; background: none; color: var(--color-heading); -webkit-text-fill-color: currentColor; }
  .brand__text strong { color: var(--color-accent-dark); }
}
.brand__since {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  /* Blanc auparavant, soit 1,68 de contraste au pire des 25 thèmes et 2,35 sur
     celui en place, très loin des 4,5 exigés. L'encre calculée par thème
     (readable_ink) remonte le pire cas à 4,77, les deux extrémités du dégradé
     étant vérifiées. */
  color: var(--color-on-accent);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--color-accent-dark) 35%, transparent);
}
@media (max-width: 560px) {
  .brand__since { display: none; }
}

.site-header__navbar {
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  box-shadow: 0 3px 8px color-mix(in srgb, var(--color-primary-dark) 10%, transparent);
}

.mobile-extra-nav { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: none; border: none; cursor: pointer;
  border-radius: var(--radius-sm);
}
.nav-toggle:hover { background: var(--color-bg-alt); }
.nav-toggle span {
  width: 22px; height: 2px; background: var(--color-primary-dark); display: block;
  margin: 0 auto;
  transition: transform 0.25s cubic-bezier(.4,0,.2,1), opacity 0.25s cubic-bezier(.4,0,.2,1);
}
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.main-nav { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; padding: 4px 0; }
.main-nav ul { list-style: none; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 2px; margin: 0; padding: 0; width: 100%; }
.main-nav li { position: relative; }
/* Décale "Défi Code du jour" à droite du reste du menu, plutôt que dans la suite naturelle des
   liens — approximativement sous le numéro de téléphone du bandeau au-dessus. */
@media (min-width: 761px) {
  .main-nav__highlight { margin-left: auto; }
}
.main-nav > ul > li > a {
  position: relative;
  display: flex; align-items: center; gap: 5px;
  color: var(--color-text); font-weight: 600; font-size: 0.92rem;
  padding: 10px 12px;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  transition: color 0.2s cubic-bezier(.4,0,.2,1), background-color 0.2s cubic-bezier(.4,0,.2,1);
}
.main-nav > ul > li > a::after {
  content: '';
  position: absolute; left: 12px; right: 12px; bottom: 5px;
  height: 2px; border-radius: 2px;
  background: var(--color-primary);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.25s cubic-bezier(.4,0,.2,1);
}
.main-nav > ul > li > a:hover::after,
.main-nav > ul > li > a.is-active::after {
  transform: scaleX(1);
}
.main-nav > ul > li > a:hover {
  color: var(--color-primary);
  background: var(--color-bg-alt);
  text-decoration: none;
}
.main-nav > ul > li > a.is-active {
  color: var(--color-primary);
  background: var(--tint-primary-soft);
  text-decoration: none;
}
.chevron {
  width: 7px; height: 7px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.2s cubic-bezier(.4,0,.2,1);
  opacity: 0.65;
}
.has-children:hover .chevron, .has-children:focus-within .chevron { transform: rotate(225deg) translateY(1px); }

.submenu {
  display: block;
  position: absolute; top: calc(100% + 6px); left: 8px;
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
  box-shadow: 0 16px 32px color-mix(in srgb, var(--color-primary) 14%, transparent);
  min-width: 220px; padding: 8px; z-index: 10;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.2s cubic-bezier(.4,0,.2,1), transform 0.2s cubic-bezier(.4,0,.2,1), visibility 0.2s;
}
.has-children:hover .submenu, .has-children:focus-within .submenu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.submenu li a {
  display: block; padding: 9px 14px; border-radius: var(--radius-sm);
  color: var(--color-text); font-size: 0.9rem; font-weight: 500;
  transition: background-color 0.2s cubic-bezier(.4,0,.2,1), color 0.2s cubic-bezier(.4,0,.2,1);
}
.submenu li a:hover { background: var(--color-bg-alt); color: var(--color-primary); text-decoration: none; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  border-radius: var(--radius-pill);
  padding: 8px 20px 8px 8px;
}
.nav-cta__icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.14);
}
.nav-cta__icon::before {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.28);
  animation: nav-cta-pulse 2.4s ease-out infinite;
}
.nav-cta__number { font-variant-numeric: tabular-nums; }
@keyframes nav-cta-pulse {
  0% { transform: scale(0.82); opacity: 0.75; }
  70% { transform: scale(1.4); opacity: 0; }
  100% { opacity: 0; }
}
:root[data-motion="reduced"] .nav-cta__icon::before,
:root[data-contrast="high"] .nav-cta__icon::before {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  .nav-cta__icon::before { display: none; }
}
.nav-cta-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.nav-cta-wrap--mobile { display: none; }
.nav-cta__note { margin: 0; font-size: 0.72rem; color: var(--color-text-muted); white-space: nowrap; }

/* Hero slider */
.hero-slider {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  background: var(--color-primary-dark);
  color: #fff;
}
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  display: flex; align-items: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.9s cubic-bezier(.4,0,.2,1), visibility 0.9s cubic-bezier(.4,0,.2,1);
}
.hero-slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.hero-slide__overlay {
  position: absolute; inset: 0;
  --slider-overlay-color: color-mix(in srgb, var(--color-primary-dark) var(--slider-tint-amount), black);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,90 Q600,40 1200,90' fill='none' stroke='white' stroke-opacity='0.22' stroke-width='5' stroke-linecap='round' stroke-dasharray='34 26'/%3E%3C/svg%3E"),
    linear-gradient(100deg, color-mix(in srgb, var(--slider-overlay-color) 92%, transparent) 0%, color-mix(in srgb, var(--slider-overlay-color) 72%, transparent) 45%, color-mix(in srgb, var(--slider-overlay-color) 35%, transparent) 100%);
  background-repeat: no-repeat, no-repeat;
  background-position: bottom, center;
  /* 34 % et non 45 % : la bande reste proportionnelle à l'image (le slider change de hauteur
     selon l'écran), mais le sommet du tracé passe de 116 à 87 px du bord inférieur. Il courait
     trop haut dans l'image et venait concurrencer le texte du slide. */
  background-size: 100% 34%, cover;
}
.hero-slide__content { position: relative; z-index: 1; max-width: 640px; padding: 64px 20px; }
.hero-slide__title { font-size: clamp(1.7rem, 1.33rem + 1.58vw, 2.75rem); line-height: 1.15; margin: 0 0 16px; }
.hero-slide__content p.lead { font-size: 1.15rem; opacity: 0.92; margin-bottom: 28px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-slider__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  z-index: 2;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.4);
  color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background-color 0.2s cubic-bezier(.4,0,.2,1);
}
.hero-slider__arrow:hover { background: rgba(255,255,255,0.3); }
.hero-slider__arrow--prev { left: 20px; }
.hero-slider__arrow--next { right: 20px; }

.hero-slider__dots {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  z-index: 2;
  display: flex; gap: 10px;
}
.hero-slider__dots button {
  position: relative;
  width: 30px; height: 5px; border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.35); border: none; cursor: pointer;
  padding: 0;
  transition: background-color 0.2s cubic-bezier(.4,0,.2,1);
}
/* Zone de touche etendue en hauteur, sans rien changer a l apparence : le trait
   fait 30 par 5 px, ce qui se vise mal au doigt, et les fleches laterales sont
   masquees sous 760 px. Ces points sont alors la seule commande du diaporama.
   La cible passe a 30 par 29 px, au-dessus des 24 recommandes.
   overflow: hidden a ete retire juste au-dessus, sans quoi cette zone serait
   rognee avec le reste : le remplissage de progression herite deja de l arrondi,
   il n avait pas besoin d etre decoupe. */
.hero-slider__dots button::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: -12px; bottom: -12px;
}
.hero-slider__dots button:hover { background: rgba(255,255,255,0.5); }
/* La diapositive active se remplit progressivement jusqu'au changement automatique suivant
   (largeur pilotée en JS, voir heroSlider() dans main.js) — donne une indication visuelle de
   progression avant le changement d'image, plutôt qu'un simple point qui grossit. */
.hero-slider__dot-fill {
  position: absolute; inset: 0; width: 0%;
  background: var(--color-accent);
  border-radius: inherit;
}

.section-photo {
  width: 100%; height: 270px; object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--color-primary) 18%, transparent);
  filter: saturate(0.9) brightness(1.03) contrast(0.95);
}
@media (max-width: 900px) { .section-photo { height: 200px; } }

.photo-frame {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow);
  transition: transform 0.2s cubic-bezier(.4,0,.2,1), box-shadow 0.2s cubic-bezier(.4,0,.2,1);
}
.photo-frame:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.photo-frame .section-photo { box-shadow: none; }

/* Sections génériques */
/* Une seule respiration, la meme pour toutes les sections. Trois niveaux ont
   ete essayes, l idee etant qu une marge plus large mette une section en avant.
   Mesure a l usage, ca ne tient pas : la meme marge pesait 16 % de la hauteur
   d une section fournie et 35 % d une section courte, ou elle se lisait comme
   un trou et non comme de l emphase. Une marge ne met en avant que ce qui a de
   quoi la remplir.
   Elle reste fluide : elle retrouve les 64 px d origine sur un ecran de
   1440 px et se resserre d elle-meme sur telephone. */
.section { --section-y: clamp(56px, 4.4vw, 80px); padding: var(--section-y) 0; }
/* La derniere ligne d une section n ajoute pas sa marge a la respiration de la
   section. Les blocs Actualite et Avis se terminent par un <p> qui porte la
   pastille « Toute l actualite » ou « Consulter tous les avis », et ce <p> a
   16 px sous lui. Mesure avant correction : la section Avis affichait 109 px de
   vide sous son contenu la ou 93 etaient declares, et paraissait donc plus
   aeree que ses voisines sans que rien dans la feuille ne le dise. Les autres
   sections finissent par un div a marge nulle, d ou l ecart. */
.section > .container > :last-child { margin-bottom: 0; }
/* Un <script> compte comme dernier enfant pour :last-child alors qu il n affiche
   rien : la derniere ligne VISIBLE gardait donc sa marge. Constate sur la page
   « Donnez votre avis », ou le script du captcha suit le paragraphe qui informe
   sur les donnees personnelles : 70 px de vide au lieu des 56 declares.
   La forme « of » n est pas comprise par les navigateurs les plus anciens, qui
   ignorent alors la regle entiere et retombent sur celle du dessus. */
.section > .container > :nth-last-child(1 of :not(script, template, style, link)) { margin-bottom: 0; }
/* Symetrique : la premiere ligne n ajoute pas non plus sa marge a celle de la
   section. Constate sur les examens blancs (10 px), la recherche et la page
   404 (16 px), ou le contenu commence par un paragraphe. */
.section > .container > :first-child { margin-top: 0; }
/* background-color et non la forme courte : elle effacerait une image de fond
   posée par une règle ultérieure, piège déjà rencontré ici. */
.section--alt { background-color: var(--color-bg-alt); }
/* Taille fluide plutôt qu'une valeur unique. Un titre de 28,8 px au milieu d'un
   conteneur de 1160 px paraît timide, alors que la même valeur convient sur
   téléphone. clamp() suit la largeur de la fenêtre entre les deux, sans point
   de rupture : aucun saut de taille au franchissement d'un seuil, à la
   différence d'une règle @media. Les bornes reprennent l'ancienne valeur en
   bas (28,8 px sous 400 px de large) et montent à 36,8 px au-delà de 1400. */
.section__title {
  font-size: clamp(1.8rem, 1.62rem + 0.75vw, 2.3rem);
  margin: 0 0 14px; color: var(--color-heading);
  position: relative; padding-bottom: 12px;
}
/* 3 px et non 4, et un dégradé qui s'efface plutôt qu'un trait plein : même
   vocabulaire que les liserés des cartes, qui ont adopté ces deux réglages.
   Le trait est un peu plus long pour compenser la perte du bout droit, dont la
   couleur pleine s'arrêtait net. */
.section__title::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 56px; height: 3px; border-radius: 3px;
  background: linear-gradient(90deg, var(--color-accent), color-mix(in srgb, var(--color-accent) 30%, transparent));
}
.section__subtitle { color: var(--color-text-muted); margin: 0 0 36px; max-width: var(--measure); }

/* Étiquette de rubrique colorée, au-dessus des titres de section */
.eyebrow {
  display: inline-block;
  font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 5px 14px; border-radius: var(--radius-pill);
  margin-bottom: 12px;
}
.eyebrow--orange { background: var(--tint-accent-medium); color: var(--ink-accent); }
.eyebrow--blue { background: var(--tint-brand-soft); color: var(--ink-brand); }

/* Cartes formations */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
/* Grille à 4 cartes (formations deux-roues) : avec auto-fit, une largeur intermédiaire (~870-1150px)
   ne laisse tenir que 3 colonnes sur 4, isolant la dernière carte seule sur une nouvelle ligne, bien
   plus bas que les autres. On force ici des paliers nets (4 puis 2 puis 1 colonne) pour ne jamais
   laisser passer cette 3ᵉ colonne intermédiaire. */
.cards-grid--four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1150px) { .cards-grid--four { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .cards-grid--four { grid-template-columns: 1fr; } }
/* Grille à 3 cartes (accueil, formations auto boîte manuelle/auto) : même souci, un nombre impair
   de cartes ne peut de toute façon pas se répartir sur 2 colonnes sans en isoler une seule sur sa
   propre ligne — on saute donc directement de 3 colonnes à 1, jamais de palier à 2. */
.cards-grid--three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .cards-grid--three { grid-template-columns: 1fr; } }
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: transform 0.2s cubic-bezier(.4,0,.2,1), box-shadow 0.2s cubic-bezier(.4,0,.2,1), border-color 0.2s cubic-bezier(.4,0,.2,1);
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--color-accent) 45%, var(--color-border)); }
.card-icon {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%; margin-bottom: 14px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: #fff; flex-shrink: 0;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--color-accent-dark) 35%, transparent);
}
.card h3 { margin-top: 0; color: var(--color-heading); }
.card-header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.card-header .card-icon { margin-bottom: 0; }
.card-header__bar {
  flex: 1;
  background: linear-gradient(120deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  border-radius: var(--radius);
  padding: 10px 16px;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--color-accent-dark) 25%, transparent);
}
.card-header__bar h3 { margin: 0; color: #fff; font-size: 1.05rem; line-height: 1.3; min-height: 2.8rem; display: flex; align-items: center; }
/* Prix des forfaits : mis en valeur pour attirer l'œil (nombre en dégradé, étiquette au-dessus) */
.card .price {
  position: relative;
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-brand-blue-dark); /* repli si le dégradé de texte n'est pas supporté */
  margin: 18px 0 16px;
}
.card .price::before {
  content: 'À partir de';
  position: absolute; top: -16px; left: 0;
  font-family: var(--font);
  font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--color-text-muted);
}
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .card .price {
    background: linear-gradient(135deg, var(--color-brand-blue), var(--color-accent));
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
}
:root[data-contrast="high"] .card .price {
  background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--color-heading);
}
.price-note {
  display: block;
  margin-top: 2px;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--color-text-muted);
  /* Réserve la hauteur de 2 lignes : sur une grille de cartes, une note de prix qui passe sur 2
     lignes pour une seule carte décale tout son contenu (liste/paragraphe suivant) d'une ligne par
     rapport aux cartes voisines dont la note tient sur 1 ligne — même défaut que les titres de carte,
     voir .card-header__bar h3 juste au-dessus. */
  min-height: 2.4em;
}
.card ul { padding-left: 20px; margin: 0 0 16px; }
/* Une carte dont le contenu commence par une liste (margin-top:0 ci-dessus) démarre plus haut
   qu'une carte dont le contenu commence par un paragraphe (marge du haut par défaut du navigateur,
   ~1em) — même prix/note identiques par ailleurs. On aligne les deux cas. */
.card .price + p { margin-top: 0; }
.card ul li { margin-bottom: 6px; }
.card img { border-radius: var(--radius-sm); margin-bottom: 16px; }
/* Pilules de lien : identifient visuellement tout ce qui est cliquable, dégradé assorti à la rubrique */
.link-pill {
  display: inline-block;
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-weight: 600;
  transition: background-color 0.2s cubic-bezier(.4,0,.2,1), box-shadow 0.2s cubic-bezier(.4,0,.2,1), transform 0.2s cubic-bezier(.4,0,.2,1);
}
.link-pill:hover { transform: translateY(-1px); text-decoration: none; }
.link-pill--orange {
  background: linear-gradient(135deg, var(--tint-accent-soft) 0%, var(--tint-accent-medium) 100%);
  border: 1px solid var(--tint-accent-border);
  color: var(--ink-accent);
}
.link-pill--orange:hover {
  background: linear-gradient(135deg, var(--tint-accent-medium) 0%, var(--tint-accent-strong) 100%);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--color-accent-dark) 25%, transparent);
}
.link-pill--blue {
  background: linear-gradient(135deg, var(--tint-brand-soft) 0%, var(--tint-brand-medium) 100%);
  border: 1px solid var(--tint-brand-border);
  color: var(--ink-brand);
}
.link-pill--blue:hover {
  background: linear-gradient(135deg, var(--tint-brand-medium) 0%, var(--tint-brand-strong) 100%);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--color-brand-blue) 25%, transparent);
}
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* Points forts (page d'accueil) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
/* Ces deux cartes sont horizontales par nature : un objet à gauche, le texte à
   droite. Côte à côte sur une tablette, la place manquait des deux côtés à la
   fois. Mesuré à 768 px avant correction : le médaillon de 140 px et les
   retraits ne laissaient que 127 px au texte, soit dix-huit caractères par
   ligne, et les deux cartes montaient à 559 px de haut pour un contenu qui en
   occupe 220 sur ordinateur. La photo, elle, devenait une bande de 145 px de
   large sur 558 de haut.
   Le seuil est calculé, pas choisi à vue : pour que le texte de la carte au
   médaillon garde les 280 px qu'il a sur ordinateur, il faut une carte de
   504 px (140 de médaillon, 20 d'écart, 64 de retraits), donc deux colonnes
   dans 1 032 px de conteneur, donc 1 072 px de fenêtre. Arrondi à 1 080.
   En dessous, une seule colonne : chaque carte garde alors sa disposition
   horizontale, qui fait son caractère, avec toute la largeur pour elle. Le
   passage en colonne du contenu lui-même reste à 600 px, plus bas. */
@media (max-width: 1080px) {
  .feature-grid { grid-template-columns: 1fr; }
}
/* Corollaire de la colonne unique : sur une carte devenue large, le texte
   courrait jusqu'à 115 caractères par ligne. Il garde donc la largeur de
   lecture du reste du site. */
.feature-card--badge > div,
.feature-card--photo .feature-card__body {
  max-width: var(--measure);
}
.feature-card {
  display: flex; align-items: center; gap: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(.4,0,.2,1), box-shadow 0.2s cubic-bezier(.4,0,.2,1);
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature-card h3 { margin: 0 0 10px; color: var(--color-heading); }
.feature-card p { margin: 0 0 10px; }

.feature-card--badge {
  background: var(--color-surface);
  padding: 32px;
  transition: transform 0.2s cubic-bezier(.4,0,.2,1), box-shadow 0.2s cubic-bezier(.4,0,.2,1), border-color 0.2s cubic-bezier(.4,0,.2,1);
}
.feature-card--badge:hover { border-color: color-mix(in srgb, var(--color-brand-blue) 45%, var(--color-border)); }
/* Texte calé en haut, comme dans la carte voisine. Les deux cartes d'une rangée prennent la
   hauteur de la plus haute : sans cette règle, celle qui a le texte le plus court recentre le
   sien et son titre descend. C'est ce qui arrive dès que la cliente rallonge un paragraphe
   depuis l'admin. Le médaillon, lui, reste centré : c'est un rond, il est à sa place au milieu. */
.feature-card--badge > div { align-self: flex-start; }
.feature-card__badge {
  flex-shrink: 0;
  width: 140px; height: 140px; border-radius: 50%;
  background: var(--color-surface); padding: 16px;
  box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--tint-brand-strong), 0 10px 22px color-mix(in srgb, var(--color-brand-blue) 30%, transparent);
  object-fit: contain;
}

.label-badge {
  display: block; margin: 28px auto; width: 220px; height: 220px; border-radius: 50%;
  background: var(--color-surface); padding: 22px;
  box-shadow: 0 0 0 5px #fff, 0 0 0 9px var(--tint-brand-strong), 0 14px 30px color-mix(in srgb, var(--color-brand-blue) 30%, transparent);
  object-fit: contain;
}

/* Reflet discret sur le badge "Label Qualité" (photo, pas du texte) : un calque en overlay
   plutôt qu'un pseudo-élément sur l'<img> lui-même (::after ne s'affiche pas sur les éléments
   remplacés comme <img>/<picture>) — ce span n'existe que pour porter ce reflet. */
.badge-shine { position: relative; display: inline-block; flex-shrink: 0; }
.badge-shine::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, 0.65) 50%, transparent 65%);
  background-size: 250% 100%;
  animation: brand-shine 8s linear infinite;
  pointer-events: none;
}
:root[data-motion="reduced"] .badge-shine::after,
:root[data-contrast="high"] .badge-shine::after {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  .badge-shine::after { display: none; }
}

.feature-card--photo {
  background: var(--color-surface);
}
.feature-card__photo {
  flex-shrink: 0; align-self: stretch;
  width: 42%; min-height: 220px;
  object-fit: cover;
  filter: saturate(0.9) brightness(1.03) contrast(0.95);
}
.feature-card__body { padding: 24px 24px 24px 0; }
/* Texte calé en haut, avec le même retrait que la carte voisine (32 px), pour que les deux
   titres de la rangée partent de la même ligne. Sans « flex-start », le bloc est centré
   verticalement et le titre monte ou descend selon la longueur du texte saisi dans l'admin :
   l'alignement tiendrait un jour et plus le lendemain. Le bas reste à 24 px, ce qui laisse la
   hauteur de la carte inchangée — la photo, elle, occupe toujours toute la hauteur. */
.feature-card--photo .feature-card__body { align-self: flex-start; padding: 32px 24px 24px 0; }

@media (max-width: 600px) {
  .feature-card { flex-direction: column; align-items: stretch; }
  .feature-card--badge { text-align: center; }
  .feature-card__badge { margin: 0 auto; }
  .feature-card__photo { width: 100%; min-height: 180px; }
  .feature-card__body { padding: 20px 24px 24px; }
  /* Même sélecteur, même poids que la règle du dessus, sinon elle l'emporterait ici aussi :
     le texte perdrait son retrait à gauche et « flex-start » le ferait rétrécir à la largeur
     de son contenu, la carte étant en colonne sur petit écran. */
  .feature-card--photo .feature-card__body { align-self: auto; padding: 20px 24px 24px; }
  /* Même raison : en colonne, « flex-start » aligne à gauche au lieu d'en haut, et le bloc se
     rétrécit à la largeur de son texte — le centrage de cette carte s'en trouverait cassé. */
  .feature-card--badge > div { align-self: auto; }
}

/* Coordonnées avec icônes (page contact) */
.contact-info { display: grid; gap: 18px; margin: 20px 0; }
.contact-info__item { display: flex; align-items: flex-start; gap: 14px; }
.contact-info__icon {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--color-brand-blue); color: #fff;
}
.contact-info__item strong { color: var(--color-heading); }

/* Fil d'Ariane */
.breadcrumb { background: var(--color-bg-alt); border-bottom: 1px solid var(--color-border); }
.breadcrumb__inner {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  padding: 10px 20px; font-size: 0.82rem; color: var(--color-text-muted);
}
.breadcrumb__inner a { color: var(--color-text-muted); }
.breadcrumb__inner a:hover { color: var(--color-primary); text-decoration: underline; }
.breadcrumb__sep { opacity: 0.5; }
.breadcrumb__current { color: var(--color-heading); font-weight: 600; }

/* Sélecteur "Quelle formation vous correspond ?" (accueil) */
/* Une zone, pas un objet. La feuille distingue désormais les deux : ce qui se
   ramasse en cartes (formations, actualités, avis, formulaires) reste blanc sur
   le fond teinté de la page, tandis que les grandes plages qui accueillent ces
   cartes ou une action prennent une teinte discrète du thème. Sans cette
   distinction, tout était pastel et rien ne se détachait de rien. */
.formation-picker {
  background: var(--tint-primary-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 36px;
  box-shadow: var(--shadow);
}
.formation-picker__header h3 { margin: 0 0 4px; color: var(--color-heading); font-size: 1.2rem; }
.formation-picker__header p { margin: 0 0 20px; color: var(--color-text-muted); font-size: 0.92rem; }
.formation-picker__question { font-weight: 600; margin: 0 0 14px; color: var(--color-heading); }
.formation-picker__options { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.formation-picker__option {
  display: flex; align-items: center; gap: 12px;
  background: var(--color-surface); border: 2px solid var(--color-border); border-radius: var(--radius);
  padding: 16px 18px; font: inherit; font-weight: 600; font-size: 0.95rem; color: var(--color-text);
  cursor: pointer; text-align: left;
  transition: border-color 0.2s cubic-bezier(.4,0,.2,1), transform 0.2s cubic-bezier(.4,0,.2,1), box-shadow 0.2s cubic-bezier(.4,0,.2,1);
}
.formation-picker__option:hover {
  border-color: var(--color-brand-blue); transform: translateY(-2px);
  box-shadow: 0 8px 20px color-mix(in srgb, var(--color-brand-blue) 18%, transparent);
}
.formation-picker__icon { font-size: 1.6rem; flex-shrink: 0; }
.formation-picker__back {
  display: inline-block; border: none; background: none; cursor: pointer; color: var(--color-text-muted);
  font: inherit; font-size: 0.85rem; margin-bottom: 12px; padding: 0; text-decoration: underline;
}
.formation-picker__back:hover { color: var(--color-primary); }
@media (max-width: 600px) {
  .formation-picker { padding: 22px 20px; }
}

/* Bloc "Voir aussi" (pages formations) */
.related-formations { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 20px; }
.related-formations__item {
  display: flex; align-items: center; gap: 16px;
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 18px 20px; color: var(--color-text); text-decoration: none;
  transition: transform 0.2s cubic-bezier(.4,0,.2,1), box-shadow 0.2s cubic-bezier(.4,0,.2,1), border-color 0.2s cubic-bezier(.4,0,.2,1);
}
.related-formations__item .card-icon { margin-bottom: 0; flex-shrink: 0; }
.related-formations__item:hover {
  transform: translateY(-3px); border-color: var(--color-brand-blue); text-decoration: none;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--color-brand-blue) 15%, transparent);
}
.related-formations__item strong { color: var(--color-heading); }

/* Page interne (contenu texte simple) */
.page-header {
  position: relative; overflow: hidden;
  background-image:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0px, rgba(255, 255, 255, 0.04) 2px, transparent 2px, transparent 16px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,90 Q600,40 1200,90' fill='none' stroke='white' stroke-opacity='0.3' stroke-width='5' stroke-linecap='round' stroke-dasharray='34 26'/%3E%3C/svg%3E"),
    linear-gradient(120deg, var(--color-primary-dark) 0%, var(--color-brand-blue) 60%, var(--color-accent-dark) 130%);
  background-repeat: repeat, no-repeat, no-repeat;
  background-position: 0 0, bottom, center;
  /* Route en hauteur fixe (96 px) et non en pourcentage : en proportion, elle remontait dans
     le bandeau dès que le contenu était court, jusqu'à traverser le sous-titre. Le tracé
     culmine au centre et plonge sur les bords — un texte centré tombe donc pile sur sa crête,
     là où un texte aligné à gauche passait au-dessus du creux. En pixels, elle reste toujours
     à la même distance du bas, quelle que soit la hauteur du bandeau. */
  background-size: auto, 100% 96px, cover;
  /* 72 px en bas : le sommet de la route se situe à ~46 px du bord inférieur, il faut que le
     texte s'arrête franchement au-dessus. */
  padding: 52px 0 72px;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--color-primary-dark) 20%, transparent);
}
.page-header::before, .page-header::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.page-header::before {
  top: -80px; right: -60px; width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 70%);
}
.page-header::after {
  bottom: -110px; left: -60px; width: 240px; height: 240px;
  background: radial-gradient(circle, color-mix(in srgb, var(--color-accent) 35%, transparent), transparent 70%);
}
/* Le bandeau d'en-tête est centré (titre, icône et sous-titre), à l'inverse du contenu des
   pages qui reste aligné à gauche : c'est une bannière, pas un paragraphe. Le centrage vaut
   aussi pour les bandeaux sans icône (404, article introuvable), qui n'ont qu'un <h1>. */
.page-header .container { position: relative; z-index: 1; text-align: center; }
.page-header h1 { margin: 0; color: #fff; font-size: clamp(1.55rem, 1.3rem + 1.05vw, 2.1rem); }
.page-header p { color: rgba(255, 255, 255, 0.9); margin: 10px 0 0; }
/* justify-content et non text-align : le groupe est un conteneur flex, c'est lui qui place
   l'icône et le titre côte à côte — text-align n'aurait aucun effet dessus. */
.page-header__title { display: flex; align-items: center; justify-content: center; gap: 16px; }
.page-header__title .card-icon { width: 52px; height: 52px; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25), 0 6px 16px color-mix(in srgb, var(--color-accent-dark) 35%, transparent); }
.page-header__title .card-icon svg { width: 26px; height: 26px; }
/* Sur petit écran, l'icône passe au-dessus du titre : à côté, elle laissait le texte s'enrouler
   sur trois lignes dans une colonne étroite, l'icône seule et centrée en vis-à-vis. Empilée,
   l'ensemble reste lisible quelle que soit la longueur du titre. */
@media (max-width: 700px) {
  .page-header__title { flex-direction: column; gap: 12px; }
}

/* En-tête illustré (pages de formations) */
.page-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background-image:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0px, rgba(255, 255, 255, 0.04) 2px, transparent 2px, transparent 16px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,90 Q600,40 1200,90' fill='none' stroke='white' stroke-opacity='0.3' stroke-width='5' stroke-linecap='round' stroke-dasharray='34 26'/%3E%3C/svg%3E"),
    linear-gradient(120deg, var(--color-primary-dark) 0%, var(--color-brand-blue) 60%, var(--color-accent-dark) 130%);
  background-repeat: repeat, no-repeat, no-repeat;
  background-position: 0 0, bottom, center;
  background-size: auto, 100% 96px, cover; /* même raison que .page-header ci-dessus */
}
/* Même centrage que .page-header, pour que les pages de formations ne détonnent pas. La boîte
   était déjà centrée par .container (margin auto) ; c'est le texte à l'intérieur qui restait à
   gauche, ce qui la faisait paraître décalée vers la gauche sur les écrans larges. */
/* 920 px et non 720 : « Formations automobile — Boîte automatique » réclame 769 px à lui seul,
   plus 52 px d'icône et 16 px d'écart. À 720 px le titre passait sur deux lignes, ce qui ne se
   remarquait pas tant qu'il était aligné à gauche mais saute aux yeux une fois centré. */
.page-hero__content { position: relative; z-index: 1; padding: 56px 20px 76px; max-width: 920px; text-align: center; }
/* Si le titre doit malgré tout passer sur deux lignes (mobile), balance répartit les mots
   équitablement au lieu de laisser un seul mot orphelin sur la seconde ligne. */
/* Le maximum est retenu à 2,2 rem et pas davantage : « Formations automobile,
   Boîte automatique » réclame 769 px à 2,1 rem, et la boîte n'en offre que 880
   une fois ses marges retirées. À 2,2 rem il lui en faut 805, ce qui laisse de
   quoi voir venir ; au-delà, le titre repasserait sur deux lignes. */
.page-hero__content h1 { margin: 0 0 10px; font-size: clamp(1.6rem, 1.34rem + 1.1vw, 2.2rem); line-height: 1.2; text-wrap: balance; }
.page-hero__content .page-header__title { margin-bottom: 10px; }
.page-hero__content .page-header__title h1 { margin: 0; }
.page-hero__content p { margin: 0; font-size: 1rem; opacity: 0.95; }
.page-hero__content .link-pill { margin-top: 6px; }
@media (max-width: 700px) {
  .page-hero__content { padding: 40px 20px 68px; }
}

.prose { max-width: var(--measure-large); }
/* Le plafond porte sur le texte, pas sur le cadre qui le contient. Un
   paragraphe plus étroit que sa carte est la mise en page normale d'un texte
   suivi ; rétrécir la carte elle-même creuserait un vide au milieu de la page
   et rétrécirait aussi les listes à puces et les tableaux, qui n'en ont pas
   besoin. D'où le sélecteur d'enfant direct : ce qui est imbriqué plus bas
   (colonnes, encadrés) garde sa propre largeur. */
.prose > p, .prose > ul, .prose > ol,
.prose-card > p, .prose-card > ul, .prose-card > ol {
  max-width: var(--measure);
}
.prose h2 { color: var(--color-heading); margin-top: 2em; }
.prose ul { padding-left: 22px; }

/* Cadre léger par section (ex : page Pièces à fournir) */
.prose-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 26px 28px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.prose-card__header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.prose-card__header h2 { margin: 0; }
.prose-card > p:first-of-type { margin-top: 0; }
.prose-card ul:last-child { margin-bottom: 0; }

/* Deux cartes côte à côte, le texte à gauche et un visuel à droite (les deux
   pages Financements). La carte du visuel garde sa propre hauteur, calée en
   haut : étirée à celle du texte, elle devenait une grande boîte blanche où le
   logo flottait (241 px de vide au-dessus et au-dessous, mesuré). Elle porte aussi
   la mention légale, sous le logo, ce qui équilibre les deux colonnes. Sous 860 px,
   elle passe sous le texte.
   La colonne du texte garde la largeur exacte des cartes des autres pages : la
   page s'élargit de la place du visuel au lieu de la prendre au texte. Logé dans
   les 78ch habituels, le texte tombait à 45 caractères par ligne et la carte à
   824 px de haut (mesuré). */
.prose--duo { --duo-visuel: 340px; max-width: calc(var(--measure-large) + var(--duo-visuel) + 24px); }
.duo-cartes {
  display: grid; grid-template-columns: minmax(0, 1fr) var(--duo-visuel, 340px);
  gap: 24px; margin-bottom: 24px; align-items: start;
}
.duo-cartes > .prose-card { margin-bottom: 0; }
.duo-cartes__logo { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
/* Le <picture> reçoit la largeur : laissé à sa taille naturelle dans une boîte flex,
   il prendrait les 640 px de l'image et déborderait de la carte. Plafonné à 300 px
   pour la tablette, où la carte passe sur toute la largeur. */
.duo-cartes__logo picture { display: block; width: 100%; max-width: 300px; }
/* Le logo garde sa transparence : c'est un tampon incliné, et un fond blanc sous ses
   coins vides ferait un rectangle clair en mode sombre. L'ombre suit sa forme
   (drop-shadow, et non box-shadow, qui dessinerait le rectangle de l'image). */
.duo-cartes__logo img {
  display: block; width: 100%; max-width: 300px; height: auto;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.22));
}
.duo-cartes__logo .card-icon { width: 96px; height: 96px; margin: 0; }
.duo-cartes__logo .card-icon svg { width: 48px; height: 48px; }
@media (max-width: 860px) {
  .duo-cartes { grid-template-columns: 1fr; }
}
/* Phrase sous le visuel : la mention légale du crédit (permis à 1 €) ou le renvoi au
   dispositif (CPF). À la taille du texte, jamais en petits caractères, et détachée
   par un filet pour qu'on ne la lise pas comme une phrase du propos. */
.duo-cartes__note {
  align-self: stretch; margin: 0; padding-top: 14px;
  border-top: 1px solid var(--color-border);
  font-weight: 600; color: var(--color-heading);
}

/* Grille de partenaires (page Nos partenaires) */
.partner-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px;
  margin: 0.6rem 0 0;
}
.partner-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow);
  color: var(--color-heading); font-weight: 700; text-decoration: none;
  transition: transform 0.2s cubic-bezier(.4,0,.2,1), box-shadow 0.2s cubic-bezier(.4,0,.2,1), border-color 0.2s cubic-bezier(.4,0,.2,1);
}
.partner-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--color-brand-blue); text-decoration: none; }
.partner-card__icon {
  flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--color-brand-blue), var(--color-brand-blue-dark)); color: #fff;
}

/* Liste à puces avec coche (avantages, points forts) */
.check-list { list-style: none; padding: 0; margin: 14px 0 16px; display: grid; gap: 12px; }
.check-list li { display: flex; align-items: flex-start; gap: 10px; }
.check-list li::before {
  content: "✓"; flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--color-heading); color: #fff; font-size: 0.75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}

/* Galerie photo (page Qui sommes-nous) */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}
.photo-gallery__item {
  position: relative; display: block;
  border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow);
}
.photo-gallery__item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
}
.photo-gallery__item:hover img { transform: scale(1.08); }
.photo-gallery__zoom {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--color-primary-dark) 45%, transparent);
  color: #fff; font-size: 1.8rem;
  opacity: 0; transition: opacity 0.25s cubic-bezier(.4,0,.2,1);
}
.photo-gallery__item:hover .photo-gallery__zoom { opacity: 1; }

/* Liste de documents PDF */
.pdf-list { list-style: none; padding: 0; display: grid; gap: 10px; max-width: 560px; }
.pdf-list li {
  border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  background: var(--color-bg-alt);
}
.pdf-list a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; color: var(--color-text); font-weight: 600; font-size: 0.94rem;
}
.pdf-list a:hover { color: var(--color-primary); text-decoration: none; background: var(--tint-primary-soft); border-radius: var(--radius-sm); }
.pdf-list a::before {
  content: "PDF";
  flex-shrink: 0;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.03em;
  color: #fff; background: var(--color-primary);
  padding: 3px 6px; border-radius: 4px;
}

/* Actualités */
.news-list { display: grid; gap: 24px; }
.news-item {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
  transition: transform 0.2s cubic-bezier(.4,0,.2,1), box-shadow 0.2s cubic-bezier(.4,0,.2,1), border-color 0.2s cubic-bezier(.4,0,.2,1);
}
.news-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--color-brand-blue) 45%, var(--color-border)); }
.news-item time { color: var(--color-text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
.news-item h2, .news-item h3 { margin: 6px 0 10px; color: var(--color-heading); }
/* Vignette plus grande qu'avant (160 par 120), mais franchement en paysage.
   Elle a d'abord été étirée sur toute la hauteur de la fiche : la hauteur
   venant du texte, l'image tombait à 230 par 202, presque carrée, et une
   photo de devanture ne supporte pas ce cadrage. Le rapport est donc fixé
   et c'est la hauteur qui en découle, jamais l'inverse.
   picture ou img selon qu'une version WebP existe (voir picture_tag), d'où
   les deux sélecteurs. */
.news-item__row { display: flex; gap: 22px; align-items: flex-start; }
.news-item__row > picture { display: block; flex: 0 0 260px; }
.news-item__row > .news-item__thumb { flex: 0 0 260px; }
.news-item__thumb {
  width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--color-brand-blue) 25%, transparent);
}
.news-item__body { flex: 1; min-width: 0; }

@media (max-width: 600px) {
  .news-item__row { flex-direction: column; gap: 16px; }
  .news-item__row > picture,
  .news-item__row > .news-item__thumb { flex: 0 0 auto; }
}
.news-preview-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.news-preview-list li { border-bottom: none; }
.news-preview-list__link {
  display: flex; align-items: center; gap: 20px;
  color: inherit;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s cubic-bezier(.4,0,.2,1), box-shadow 0.2s cubic-bezier(.4,0,.2,1), border-color 0.2s cubic-bezier(.4,0,.2,1);
}
.news-preview-list__link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: color-mix(in srgb, var(--color-brand-blue) 45%, var(--color-border));
  text-decoration: none;
}
.news-preview-list__link:hover strong { color: var(--color-primary); }
.news-preview-list__thumb {
  flex-shrink: 0;
  width: 160px; height: 116px; object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--color-brand-blue) 30%, transparent);
}
.news-preview-list__text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.news-preview-list__text strong { color: var(--color-heading); font-size: 1.1rem; transition: color 0.2s cubic-bezier(.4,0,.2,1); }
.date-badge {
  display: inline-block; align-self: flex-start;
  background: var(--tint-brand-soft); color: var(--ink-brand);
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  padding: 4px 10px; border-radius: var(--radius-pill);
}
.date-badge--orange { background: var(--tint-accent-medium); color: var(--ink-accent); }

@media (max-width: 600px) {
  .news-preview-list__link { gap: 14px; padding: 12px; }
  .news-preview-list__thumb { width: 100px; height: 80px; }
  .news-preview-list__text strong { font-size: 0.98rem; }
}

.article-featured-image {
  display: block;
  width: 100%; max-height: 420px; object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--color-brand-blue) 20%, transparent);
  filter: saturate(0.9) brightness(1.03) contrast(0.95);
}

/* Avis clients */
.avis-item {
  position: relative; overflow: hidden;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px 28px; box-shadow: var(--shadow); margin-bottom: 20px;
  transition: transform 0.2s cubic-bezier(.4,0,.2,1), box-shadow 0.2s cubic-bezier(.4,0,.2,1), border-color 0.2s cubic-bezier(.4,0,.2,1);
}
.avis-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--color-accent) 45%, var(--color-border)); }
.avis-item::before {
  content: "\201C";
  position: absolute; top: -18px; right: 18px;
  font-size: 5.5rem; font-family: Georgia, "Times New Roman", serif; font-weight: 700;
  color: var(--color-bg-alt); line-height: 1; z-index: 0; pointer-events: none;
}
.avis-item > * { position: relative; z-index: 1; }
.avis-item__stars { color: var(--color-accent-dark); letter-spacing: 2px; margin-bottom: 6px; }
.avis-item__meta { display: flex; align-items: center; gap: 10px; color: var(--color-text-muted); font-size: 0.85rem; margin-bottom: 10px; }
.avis-item__avatar {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--color-brand-blue); color: #fff; font-weight: 700; font-size: 0.9rem;
}
.avis-item p { margin: 0; max-width: var(--measure); }
.avis-item__reply {
  margin-top: 14px; padding: 12px 16px; background: var(--color-bg-alt); border-radius: var(--radius-sm);
  font-size: 0.92rem;
}

/* Sélecteur d'étoiles (formulaire d'avis) */
.star-rating { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.star-rating input { position: absolute; opacity: 0; width: 0; height: 0; }
.star-rating label { font-size: 2rem; line-height: 1; color: var(--color-border); cursor: pointer; transition: color 0.2s cubic-bezier(.4,0,.2,1); }
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label { color: var(--color-accent); }
.star-rating input:focus-visible + label { outline: 2px solid var(--color-primary-light); border-radius: 4px; }

/* Cadre léger et doux autour des formulaires (contact, avis) */
.form-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow);
}
@media (max-width: 600px) { .form-card { padding: 22px 20px; } }

/* Carte de connexion de l'administration. Même matière que .form-card, mais centrée et
   resserrée : deux champs perdus au milieu d'une page vide n'inspirent pas confiance. */
.login-card {
  max-width: 400px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 30px 32px 32px;
  box-shadow: var(--shadow);
}
.login-card__head { text-align: center; margin-bottom: 22px; }
/* Le cadenas est agrandi par rapport aux icônes de rubrique : ici il porte la page entière
   à lui seul, il n'accompagne pas un titre. */
.login-card__head .card-icon { width: 58px; height: 58px; margin: 0 auto 12px; }
.login-card__head .card-icon svg { width: 28px; height: 28px; }
.login-card__head p { margin: 0; font-size: 0.9rem; color: var(--color-text-muted); }
/* La grille du formulaire est en deux colonnes par défaut ; dans une carte de 400 px, les
   champs doivent occuper toute la largeur. */
.login-card .form-grid { grid-template-columns: 1fr; max-width: none; }
@media (max-width: 600px) { .login-card { padding: 24px 20px 26px; } }

/* Formulaires */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 680px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.92rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  font: inherit;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: 2px solid var(--color-primary-light); }
.field--honeypot { position: absolute; left: -9999px; top: -9999px; }
/* Mises en page à deux colonnes qui retombent en une seule sur petit écran. Elles étaient
   écrites en style en ligne, qu'aucune règle @media ne peut remplacer : les colonnes restaient
   donc côte à côte sur téléphone. Sur la page contact, le formulaire débordait carrément de
   l'écran ; sur l'accueil, les deux colonnes tombaient à 161 et 134 px de large. */
.split-contact { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; }
.split-intro { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) {
  .split-contact, .split-intro { grid-template-columns: 1fr; gap: 32px; }
}

.form-note { font-size: 0.85rem; color: var(--color-text-muted); margin-top: 10px; }
/* Précision rattachée à un champ précis (via aria-describedby), à ne pas confondre avec
   .form-note qui commente le formulaire entier. Poids normal explicite : placée dans une
   .field, elle hériterait sinon du 600 des libellés. */
.field__hint { display: block; margin-top: 5px; font-size: 0.8rem; font-weight: 400; color: var(--color-text-muted); }

/* Petit éditeur de texte enrichi (admin) */
.rich-editor-toolbar {
  display: flex; align-items: center; gap: 2px; flex-wrap: wrap;
  border: 1px solid var(--color-border); border-bottom: none;
  border-radius: 8px 8px 0 0; background: var(--color-bg-alt); padding: 6px;
}
.rich-editor-toolbar__divider {
  width: 1px; align-self: stretch; margin: 2px 5px;
  background: var(--color-border);
}
.rich-editor-toolbar button {
  display: flex; align-items: center; justify-content: center;
  border: 1px solid transparent; background: transparent; border-radius: var(--radius-sm);
  width: 30px; height: 30px; padding: 0; font: inherit; font-size: 0.9rem; font-weight: 600;
  color: var(--color-heading); cursor: pointer;
}
.rich-editor-toolbar button svg { width: 16px; height: 16px; }
.rich-editor-toolbar button:hover { background: #fff; border-color: var(--color-border); }
.rich-editor-toolbar button.is-active {
  background: var(--color-brand-blue); border-color: var(--color-brand-blue); color: #fff;
}
.rich-editor-content {
  width: 100%; min-height: 140px; padding: 10px 12px;
  border: 1px solid var(--color-border); border-radius: 0 0 8px 8px;
  font: inherit; background: #fff;
}
.rich-editor-content:focus { outline: 2px solid var(--color-primary-light); }
.rich-editor-content p { margin: 0 0 10px; }
.rich-editor-content p:last-child { margin-bottom: 0; }
.rich-editor-content ul, .rich-editor-content ol { padding-left: 22px; margin: 0 0 10px; }
.rich-editor-content li { margin-bottom: 4px; }
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 24px; }
.alert--success { background: #e4f6ea; color: #1c6b3a; border: 1px solid #b7e3c6; }
.alert--error { background: #fdecec; color: #a12626; border: 1px solid #f4c2c2; }

/* Footer */
/* Retraits repris du pied de page des Mille Couleurs : 40 px en haut, 32 en bas.
   Le corps de texte, lui, reste celui du site, 1 rem. Il a été essayé à
   0,85 rem comme chez eux, puis rendu à sa taille : ce qui rendait le pied de
   page étriqué n'était pas la taille du texte mais les colonnes, qui se
   partageaient la largeur en parts égales sans rapport avec ce qu'elles avaient
   à y mettre. Une fois la répartition corrigée (voir .footer-grid), les 16 px
   tiennent sans que rien ne s'enroule. */
.site-footer {
  position: relative; background: var(--color-primary-dark); color: var(--color-on-primary);
  padding: 40px 0 32px; margin-top: 40px;
}
.site-footer::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='14'%3E%3Cpath d='M0,14 L9,1 L18,14 L27,1 L36,14' fill='none' stroke='white' stroke-opacity='0.16' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-size: 36px 14px;
}
/* Trois colonnes et non plus quatre : le bloc de marque a été retiré du
   gabarit, il répétait l'en-tête.
   « 1fr auto 1fr » et non trois parts égales, comme sur les Mille Couleurs :
   les trois blocs n'ont pas du tout la même largeur de contenu, et avec des
   parts égales celui du milieu se retrouvait décalé du centre de la page. Deux
   colonnes latérales en 1fr le ramènent au milieu exact quelles que soient
   leurs largeurs. Écarts de 36 px en hauteur et 48 px en largeur, les leurs. */
.footer-grid {
  display: grid;
  /* Trois parts strictement égales. Un essai en « 1fr auto 1fr », repris des
     Mille Couleurs, donnait des écarts inégaux entre les blocs, mesurés à 48 px
     puis 82 : leur bloc du milieu est étroit, les nôtres ne le sont pas, et la
     colonne « auto » prenait la largeur de son contenu au lieu de sa part.
     Trois fois 1fr posent les trois blocs à intervalles réguliers, quelles que
     soient les longueurs de texte que la cliente saisira depuis l'admin. */
  /* Colonnes à la largeur de leur contenu, et espace libre réparti à parts
     égales entre les deux bords et les deux intervalles.
     Le défaut corrigé, mesuré : avec trois parts égales de 341 px, le bloc des
     coordonnées n'en occupait que 158, les deux autres 329 et 313. Les 183 px
     de vide se retrouvaient donc tous du même côté et l'ensemble paraissait
     poussé vers la droite. Ici les 360 px libres se divisent en quatre : 90 px
     avant le premier bloc, 90 entre chacun, 90 après le dernier. Les marges
     redeviennent symétriques sans qu'aucune largeur soit écrite en dur, donc
     cela tient quelle que soit la longueur des textes saisis dans l'admin. */
  grid-template-columns: auto auto auto;
  justify-content: space-evenly;
  align-items: start;
  gap: 36px 48px;
}
/* Titres de colonne dans le vocabulaire des Mille Couleurs : une étiquette
   discrète en capitales espacées, et non plus un intertitre blanc de 18,7 px.
   Trois gros titres blancs pour trois listes courtes tiraient l'œil vers eux au
   lieu du contenu, et leur marge haute décalait les colonnes les unes des
   autres. L'icône passe de l'accent du thème à un blanc très retenu : ces
   pictogrammes situent la rubrique, ils ne la signalent pas. */
.site-footer h2, .site-footer h3 { color: #fff; }
.footer-grid h3 {
  display: flex; align-items: center; gap: 0.45rem;
  margin: 0 0 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
.footer-grid h3 svg { flex-shrink: 0; width: 1rem; height: 1rem; color: rgba(255, 255, 255, 0.4); }
.footer-info-line svg { vertical-align: -2px; opacity: 0.85; flex-shrink: 0; }
.site-footer a { color: var(--color-on-primary); }
/* Navigation sur deux colonnes, comme sur le site des Mille Couleurs. En une
   seule, ses douze entrées faisaient une colonne bien plus haute que ses deux
   voisines, qui en comptent trois et quatre lignes ; en deux, elle retombe à
   six et se cale sur elles.
   « columns » et non une grille : le partage se refait tout seul le jour où
   une entrée s'ajoute à NAV_MAIN ou NAV_TOP, sans numéro d'ordre à corriger
   dans la feuille. Le filet de séparation vient avec, par column-rule, et il
   sépare les colonnes sans redécouper les lignes. */
.footer-nav {
  list-style: none; padding: 0; margin: 0;
  /* Deux colonnes taillées sur leur contenu, et non deux moitiés égales. Les
     colonnes du multicolonnage sont toujours de largeur identique, et « Formations
     deux-roues » demande 164 px là où la moitié n'en offrait que 150 en tablette
     et 142 sur téléphone : l'entrée se coupait en deux lignes. Une grille donne à
     chaque colonne la largeur de son propre contenu, 164 et 147 px ici, et le bloc
     entier n'en est pas plus large. Elle rend inutile le break-inside qui
     empêchait une entrée de se scinder au passage d'une colonne à l'autre. */
  display: grid;
  grid-auto-flow: column;
  /* Le nombre de rangées vient du gabarit (footer.php), qui le calcule sur le
     nombre de liens : 6 n'est plus que la valeur de secours. */
  grid-template-rows: repeat(var(--footer-rangees, 6), auto);
  justify-content: start;
  /* 1,1 rem de chaque côté du filet, comme le faisait column-rule en se posant
     au milieu d'un écart de 2,2 rem. */
  column-gap: 1.1rem;
}
/* Le filet vertical venait de column-rule, propriété du seul multicolonnage. Il
   est repris par le bord gauche des entrées de la seconde colonne, qui se
   rejoignent en un trait continu puisque les rangées se touchent. */
.footer-nav .footer-nav__col2 {
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  padding-left: 1.1rem;
}
/* Le pas vertical vient du retrait de chaque lien et non d'une marge sur la
   puce : c'est ainsi chez eux, et la zone cliquable y gagne. 0,42 rem de part
   et d'autre donnent le même pas de 36 px que sur leur plan du site. */
.footer-nav a { display: block; padding: 0.42rem 0; text-decoration: none; }
/* Sur les écrans les plus étroits, les deux colonnes ne tiennent plus côte à
   côte : l'écart se resserre d'abord, puis le menu passe sur une seule colonne
   plutôt que de recouper les entrées. Le pied de page y gagne en hauteur, ce
   qui reste préférable à une entrée sur deux lignes. */
@media (max-width: 400px) {
  .footer-nav { column-gap: 0.7rem; }
  .footer-nav .footer-nav__col2 { padding-left: 0.7rem; }
}
@media (max-width: 359px) {
  .footer-nav { grid-auto-flow: row; grid-template-rows: none; }
  .footer-nav .footer-nav__col2 { border-left: 0; padding-left: 0; }
}
/* Tout le bas du pied de page est centré : le bouton de retour en haut, la
   ligne de copyright et la signature du studio. Ces trois éléments sont de
   largeurs très différentes et alignés à gauche ils formaient un escalier, le
   bouton court au-dessus d'une longue ligne de mentions, elle-même au-dessus
   d'une plaque. Centrés, ils se lisent comme une seule colonne de fin de page.
   Le filet n'est plus porté ici mais par .footer-copyright : le bouton de
   retour en haut est passé au-dessus de lui. */
/* La couleur suit le thème comme le reste du pied de page. Elle était figée sur
   un gris-bleu : sous une palette chaude (Terre, Olive, Terracotta), cette
   ligne restait froide alors que les liens qu'elle contient, eux, suivaient le
   thème. Le contraste n'était pas en cause, seulement la teinte qui jurait. */
.footer-bottom {
  margin-top: 40px;
  font-size: 0.85rem; color: var(--color-on-primary);
  text-align: center;
}
/* Le bouton est desserré du filet, et de façon régulière : 24 px au-dessus de
   lui, 24 entre lui et le filet, 24 entre le filet et la ligne de droits. Il
   avait 6,4 px d'un côté et 12 de l'autre, valeurs reprises des Mille Couleurs,
   où le bouton est plus petit et la page moins large ; ici il se retrouvait
   collé au filet et penché vers le haut. Un même écart partout le pose au
   milieu de son espace.
   Les 40 px du dessus ne viennent pas d'ici mais de la marge haute de
   .footer-bottom, avec laquelle celle-ci fusionne : c'est la plus grande des
   deux qui l'emporte. La valeur en face est donc écrite à 40 px elle aussi,
   sans quoi le bouton resterait penché vers le bas. */
.footer-top-row { display: flex; justify-content: center; margin-top: 1.5rem; }
.footer-copyright {
  margin: 2.5rem 0 0;
  padding-top: 1.5rem;
  /* 0,12 et non 0,15 : la valeur exacte du filet des Mille Couleurs. */
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-bottom__link-btn {
  background: none; border: none; padding: 0; margin: 0;
  font: inherit; color: inherit; text-decoration: underline; cursor: pointer;
}
.footer-bottom__link-btn:hover { color: #fff; }
/* ------------------------------------------------------------------
   Signature du studio, sous la mention de droits
   Reprise à l'identique du site Les Mille Couleurs de l'Art, à la
   demande de l'utilisateur. Volontairement plus discrète que la
   mention de droits : c'est le site de l'auto-école, pas celui du
   prestataire. Elle se lit sans effort pour qui la cherche, et ne
   retient pas l'œil des autres.
   Elle s'affiche ou non selon footer_credit_visible, réglage de
   l'onglet Réglages de l'admin, inchangé.
   ------------------------------------------------------------------ */
.footer-signature {
  /* 24 px et non les 0,6 rem des Mille Couleurs, qui ne faisaient que 10 px :
     la plaque s'y trouvait collée sous la ligne de droits alors que celle-ci
     dispose de 24 px sous le filet. Même écart au-dessus et au-dessous du texte
     de droits, le bas du pied de page tient sur un seul rythme. */
  margin: 1.5rem 0 0;
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.6;
}

.footer-signature a {
  /* Le survol du navigateur rallume le trait natif : coupé ici, il ne revient
     qu'avec la couleur au survol. */
  text-decoration: none;
  /* La discrétion se fait par la taille et l'espacement, jamais en effaçant le
     texte : 0,78 d'opacité tient le contraste, 0,55 le faisait tomber sous le
     seuil de 4,5 exigé à cette taille. */
  color: rgba(255, 255, 255, 0.78);
  position: relative;
  display: inline-block;
  padding: 0.9rem 1.8rem;
  /* Le bloc est une petite fenêtre ouverte sur la nuit du studio : son noir
     bleuté, ses trois couleurs, sa chasse fixe. Les valeurs sont posées en dur
     et non prises aux variables de thème, et c'est délibéré : cette plaque
     appartient à Atelyx, elle doit rester la même sous les 25 thèmes du site
     comme dans ses deux modes d'affichage. C'est la seule exception assumée à
     la règle « tout découle du thème » posée ailleurs dans cette feuille. */
  background: radial-gradient(
    ellipse at center,
    rgba(10, 12, 20, 0.88) 0%,
    rgba(5, 6, 10, 0.94) 100%
  );
  /* Coins franchement arrondis et fond translucide : un rectangle noir opaque à
     angles vifs poserait une dureté qui sauterait aux yeux avant le texte. Le
     pied de page transparaît à travers la plaque. */
  border-radius: 18px;
  box-shadow:
    inset 0 0 26px rgba(129, 140, 248, 0.06),
    0 0 0 1px rgba(129, 140, 248, 0.16),
    0 0 22px rgba(0, 0, 0, 0.2);
  transition: color 0.2s ease, box-shadow 0.35s ease;
  /* Le texte passe devant le brouillard. */
  overflow: hidden;
  isolation: isolate;
}

.footer-signature a:hover,
.footer-signature a:focus-visible {
  color: #fff;
  box-shadow:
    inset 0 0 30px rgba(34, 211, 238, 0.1),
    0 0 0 1px rgba(129, 140, 248, 0.34),
    0 0 26px rgba(34, 211, 238, 0.1);
}

/* Les quatre angles de la plaque, dans l'esprit d'un cadre de sélection de
   code : deux traits d'un pixel par coin, treize pixels de long, rien au milieu
   des côtés. Cyan en haut à gauche là où le regard entre, violet en bas à
   droite là où il sort, indigo sur les deux autres.
   Huit couches de fond sur un seul pseudo-élément plutôt que quatre éléments :
   un coin n'est qu'un bras horizontal et un bras vertical, et un dégradé d'une
   seule couleur, dimensionné et posé, fait un trait. Rien n'est ajouté au HTML.
   Retrait de neuf pixels : le coin arrondi de la plaque fait dix-huit pixels de
   rayon, un angle posé à neuf tombe donc franchement à l'intérieur de la
   courbe, sans jamais la toucher.
   z-index 1 : devant la brume, qui est à zéro, et derrière le texte, qui est à
   deux. Le cadre encadre, il ne passe pas dessus. */
.footer-signature a::before {
  content: "";
  position: absolute;
  inset: 9px;
  z-index: 1;
  pointer-events: none;
  background:
    /* haut gauche */
    linear-gradient(#22d3ee, #22d3ee) 0 0 / 13px 1px no-repeat,
    linear-gradient(#22d3ee, #22d3ee) 0 0 / 1px 13px no-repeat,
    /* haut droit */
    linear-gradient(#818cf8, #818cf8) 100% 0 / 13px 1px no-repeat,
    linear-gradient(#818cf8, #818cf8) 100% 0 / 1px 13px no-repeat,
    /* bas droit */
    linear-gradient(#c084fc, #c084fc) 100% 100% / 13px 1px no-repeat,
    linear-gradient(#c084fc, #c084fc) 100% 100% / 1px 13px no-repeat,
    /* bas gauche */
    linear-gradient(#818cf8, #818cf8) 0 100% / 13px 1px no-repeat,
    linear-gradient(#818cf8, #818cf8) 0 100% / 1px 13px no-repeat;
  transition: background-size 0.35s ease;
}

/* Au survol, les bras s'allongent, comme une sélection qu'on étend. Rien
   d'autre ne bouge : la plaque garde sa place, son texte et sa hauteur. */
.footer-signature a:hover::before,
.footer-signature a:focus-visible::before {
  background-size:
    20px 1px, 1px 20px,
    20px 1px, 1px 20px,
    20px 1px, 1px 20px,
    20px 1px, 1px 20px;
}

/* Le brouillard, repris du site du studio : trois nappes cyan, violet et indigo
   à faible opacité, floutées et dérivant sur trente secondes. Le flou est à
   quatorze pixels et non vingt-six comme chez lui, le bloc ne faisant que
   quatre-vingts pixels de haut : au-delà, les nappes couvriraient tout d'un
   aplat. La clairière centrale est posée par-dessus les nappes, à l'endroit
   précis où le texte vit : la brume garde sa densité sur les bords, où elle se
   voit, et s'efface au milieu, où elle ferait tomber le contraste. */
.footer-signature a::after {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(46% 62% at 17% 24%, rgba(34, 211, 238, 0.2), transparent 66%),
    radial-gradient(46% 62% at 83% 32%, rgba(192, 132, 252, 0.2), transparent 66%),
    radial-gradient(72% 58% at 50% 94%, rgba(129, 140, 248, 0.18), transparent 68%);
  filter: blur(14px);
  pointer-events: none;
  z-index: 0;
  animation: signature-brouillard 30s ease-in-out infinite alternate;
}

/* Une dérive, pas un défilement : les nappes s'écartent et reviennent, sans
   jamais boucler visiblement. C'est ce qui distingue une brume d'un motif qui
   tourne. */
@keyframes signature-brouillard {
  0% { transform: translate3d(-4%, -2%, 0) scale(1); }
  50% { transform: translate3d(3%, 2%, 0) scale(1.12); }
  100% { transform: translate3d(-2%, 3%, 0) scale(1.04); }
}

.footer-signature__by,
.footer-signature__services {
  position: relative;
  z-index: 2;
}

/* Le nom en chasse fixe, comme sur le site du studio, qui écrit tout son
   habillage ainsi. */
.footer-signature__by {
  letter-spacing: 0.04em;
  /* Position relative pour le filet ci-dessous, qui se dessine au survol. */
  position: relative;
  /* inline-block et non block : le filet du survol doit s'arrêter à la fin du
     mot. Un display: block traînait au-dessus, sans effet puisque écrasé
     ici même. */
  display: inline-block;
  font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  color: #22d3ee;
  text-shadow: 0 0 6px rgba(34, 211, 238, 0.4);
  transition: text-shadow 0.3s ease;
}

.footer-signature a:hover .footer-signature__by,
.footer-signature a:focus-visible .footer-signature__by {
  text-shadow:
    0 0 10px rgba(34, 211, 238, 0.45),
    0 0 22px rgba(34, 211, 238, 0.2);
}

/* Le filet se dessine du centre vers les bords, sur la seule ligne du nom. Il
   naît d'un point et s'ouvre : c'est le geste d'un trait tiré à la main, pas
   d'une barre qui s'allume. Ses trois couleurs sont celles du studio et non
   celles du site : ce filet souligne un lien qui s'en va ailleurs, il annonce
   donc où il mène. */
.footer-signature__by::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: -0.25rem;
  height: 1px;
  background: linear-gradient(90deg, #22d3ee, #818cf8, #c084fc);
  transition: left 0.35s ease, right 0.35s ease;
}

.footer-signature a:hover .footer-signature__by::after,
.footer-signature a:focus-visible .footer-signature__by::after {
  left: 0;
  right: 0;
}

.footer-signature__services {
  display: block;
  /* Le filet du nom vient se poser à 0,25rem sous lui : sans cette marge, la
     seconde ligne le toucherait presque, et les deux se liraient comme un seul
     bloc compact. */
  margin-top: 0.55rem;
}

/* Un halo cyan traverse lentement la ligne des services, sans fin. Huit
   secondes par passage : assez lent pour qu'on le remarque sans que l'œil y
   revienne, ce qui serait insupportable dans un pied de page.
   Enfermé dans @supports : sans background-clip, le texte resterait
   transparent, donc invisible. Une ligne effacée serait pire que pas d'effet. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .footer-signature__services {
    background-image: linear-gradient(
      100deg,
      rgba(255, 255, 255, 0.78) 0%,
      rgba(255, 255, 255, 0.78) 40%,
      #22d3ee 50%,
      rgba(255, 255, 255, 0.78) 60%,
      rgba(255, 255, 255, 0.78) 100%
    );
    background-size: 300% 100%;
    background-position: 130% 0;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: signature-halo 8s linear infinite;
  }
}

@keyframes signature-halo {
  to { background-position: -130% 0; }
}

/* Le curseur du terminal, après le nom. */
.footer-signature__cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  margin-left: 0.3em;
  vertical-align: -0.15em;
  background: #22d3ee;
  border-radius: 1px;
  opacity: 0.85;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.35);
  animation: signature-curseur 1.15s steps(1) infinite;
}

@keyframes signature-curseur {
  0%, 49.9% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

/* Pendant le décodage des lettres, la lueur monte d'un cran : le texte paraît
   chauffer le temps qu'il se fixe. Voir assets/js/footer-signature.js. */
.footer-signature__by.is-decoding {
  text-shadow:
    0 0 8px rgba(34, 211, 238, 0.85),
    0 0 22px rgba(34, 211, 238, 0.45);
}

/* Réduction d'animations, réglage du site comme préférence du système. Tout
   s'arrête : le curseur cesse de clignoter mais reste visible, le décodage ne
   se déclenche pas (le script lit lui aussi ces deux réglages), et la lueur
   garde son intensité de repos. Le halo s'arrête, et la couleur revient : sans
   cette dernière ligne, le texte resterait transparent, donc effacé. */
@media (prefers-reduced-motion: reduce) {
  .footer-signature a::before,
  .footer-signature__by::after { transition: none; }
  .footer-signature a::after { animation: none; }
  .footer-signature__cursor { animation: none; opacity: 1; }
  .footer-signature__by,
  .footer-signature a:hover .footer-signature__by,
  .footer-signature a:focus-visible .footer-signature__by {
    transition: none;
    text-shadow: 0 0 6px rgba(34, 211, 238, 0.45);
  }
  .footer-signature__services {
    animation: none;
    background-image: none;
    color: rgba(255, 255, 255, 0.78);
  }
}
:root[data-motion="reduced"] .footer-signature a::before,
:root[data-motion="reduced"] .footer-signature__by::after { transition: none; }
:root[data-motion="reduced"] .footer-signature a::after { animation: none; }
:root[data-motion="reduced"] .footer-signature__cursor { animation: none; opacity: 1; }
:root[data-motion="reduced"] .footer-signature__by,
:root[data-motion="reduced"] .footer-signature a:hover .footer-signature__by,
:root[data-motion="reduced"] .footer-signature a:focus-visible .footer-signature__by {
  transition: none;
  text-shadow: 0 0 9px rgba(34, 211, 238, 0.3);
}
:root[data-motion="reduced"] .footer-signature__services {
  animation: none;
  background-image: none;
  color: rgba(255, 255, 255, 0.78);
}

@media (max-width: 900px) {
  .hero-slider { min-height: 460px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--color-border);
    box-shadow: 0 16px 32px color-mix(in srgb, var(--color-primary) 12%, transparent);
    flex-direction: column; align-items: stretch; flex-wrap: nowrap;
    max-height: 0; overflow: hidden; padding: 0 20px;
    transition: max-height 0.28s cubic-bezier(.4,0,.2,1), padding 0.28s cubic-bezier(.4,0,.2,1);
  }
  .main-nav.is-open { max-height: 80vh; overflow-y: auto; padding: 14px 20px 22px; }
  .main-nav ul { flex-direction: column; flex-wrap: nowrap; gap: 2px; align-items: stretch; }
  .main-nav > ul > li > a { padding: 12px 14px; justify-content: space-between; }
  .chevron { transform: rotate(45deg); }
  .has-children:focus-within .chevron { transform: rotate(45deg); }
  .submenu {
    position: static; box-shadow: none; border: none; background: transparent;
    opacity: 1; visibility: visible; transform: none;
    display: block; padding: 2px 0 4px 14px; margin-left: 4px;
    border-left: 2px solid var(--color-border);
    min-width: 0;
  }
  .site-header__topbar { display: none; }
  .nav-cta-wrap--desktop { display: none; }
  .nav-cta-wrap--mobile { display: flex; align-items: center; margin: 12px 0 0; width: 100%; }
  .nav-cta-wrap--mobile .nav-cta { justify-content: center; width: 100%; }
  .mobile-extra-nav {
    display: block; margin-top: 8px; padding-top: 8px;
    border-top: 1px solid var(--color-border);
  }
  .mobile-extra-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
  .mobile-extra-nav a {
    display: block; padding: 10px 14px; border-radius: var(--radius-sm);
    color: var(--color-text-muted); font-weight: 600; font-size: 0.88rem;
  }
  .mobile-extra-nav a:hover, .mobile-extra-nav a.is-active {
    background: var(--color-bg-alt); color: var(--color-primary); text-decoration: none;
  }
  .hero-slider { min-height: 420px; }
  .hero-slide__content { padding: 44px 20px; }
  .hero-slider__arrow { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* Sondage (page d'accueil) */
.sondage-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 900px) {
  .sondage-grid { grid-template-columns: 1fr; }
}

.poll-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow);
}
.poll-card__header, .assistant-card__header { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.poll-card__header h3, .assistant-card__header h3 { margin: 0; color: var(--color-heading); }
.poll-card__icon, .assistant-card__icon {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--color-brand-blue), var(--color-brand-blue-dark));
  color: #fff;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--color-brand-blue) 20%, transparent);
}

/* Carte "Sarah" (assistante IA), à côté du sondage sur l'accueil */
.assistant-card {
  position: relative; overflow: hidden;
  /* Trois couches, dans cet ordre : le liseré de gauche, la trame de points,
     puis l'aplat. Le liseré est écrit ici et non dans le bloc groupé plus bas,
     qui remplacerait ces couches au lieu de s'y ajouter. */
  background-image:
    linear-gradient(180deg, var(--color-brand-blue), transparent 78%),
    radial-gradient(circle, color-mix(in srgb, var(--color-brand-blue) 12%, transparent) 1.4px, transparent 1.4px),
    linear-gradient(var(--tint-primary-soft), var(--tint-primary-soft));
  background-repeat: no-repeat, repeat, no-repeat;
  background-position: top left, top left, top left;
  background-size: 3px 100%, 22px 22px, 100% 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow);
}
.assistant-card p { margin: 0 0 16px; color: var(--color-text); }
.assistant-card__status {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.85rem; font-weight: 600; color: var(--color-text-muted);
}
.assistant-card__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
  animation: assistant-dot-pulse 2s ease-in-out infinite;
}
@keyframes assistant-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25); }
  50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.1); }
}
.poll-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.poll-option {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.2s cubic-bezier(.4,0,.2,1), border-color 0.2s cubic-bezier(.4,0,.2,1);
}
.poll-option:hover { background: var(--tint-brand-soft); border-color: var(--tint-brand-border); }
.poll-option input { width: 16px; height: 16px; accent-color: var(--color-brand-blue); flex-shrink: 0; }
.poll-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px 28px;
  margin-top: 20px;
}
.poll-result__label {
  display: flex; justify-content: space-between;
  font-weight: 600; font-size: 0.92rem; margin-bottom: 6px; color: var(--color-text);
}
.poll-result__bar {
  height: 12px; border-radius: var(--radius-pill); background: var(--color-bg-alt);
  overflow: hidden;
}
.poll-result__fill {
  height: 100%; border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--color-brand-blue), var(--color-accent));
  transition: width 0.6s cubic-bezier(.4,0,.2,1);
}

/* Carte "Défi Code du jour" (accueil) et question d'examen blanc — même présentation
   que .poll-card, volontairement : cartes-widgets de même niveau. */
.quiz-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow);
}
.quiz-card__header { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.quiz-card__icon {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--color-brand-blue), var(--color-brand-blue-dark));
  color: #fff;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--color-brand-blue) 20%, transparent);
  animation: quiz-icon-breathe 3.6s ease-in-out infinite;
}
/* Halo qui respire doucement pendant que l'élève lit/réfléchit à la question — remplace
   l'absence de photo par une touche vivante mais volontairement lente et discrète, pour ne
   pas détourner l'attention du texte de la question. */
.quiz-card__icon::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--color-brand-blue) 35%, transparent);
  animation: quiz-icon-pulse 3.6s ease-in-out infinite;
}
@keyframes quiz-icon-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}
@keyframes quiz-icon-pulse {
  0% { transform: scale(0.9); opacity: 0.5; }
  70% { transform: scale(1.3); opacity: 0; }
  100% { opacity: 0; }
}
:root[data-motion="reduced"] .quiz-card__icon,
:root[data-contrast="high"] .quiz-card__icon,
:root[data-motion="reduced"] .quiz-card__icon::before,
:root[data-contrast="high"] .quiz-card__icon::before {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .quiz-card__icon, .quiz-card__icon::before { animation: none; }
}
.quiz-card__header h3 { margin: 0; color: var(--color-heading); }
.quiz-card__form { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.quiz-option {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.2s cubic-bezier(.4,0,.2,1), border-color 0.2s cubic-bezier(.4,0,.2,1), transform 0.2s cubic-bezier(.4,0,.2,1);
}
.quiz-option:hover { background: var(--tint-brand-soft); border-color: var(--tint-brand-border); }
.quiz-option:has(input:checked) {
  background: color-mix(in srgb, var(--color-brand-blue) 10%, var(--color-bg-alt));
  border-color: var(--color-brand-blue);
  transform: scale(1.015);
}
.quiz-option input { width: 16px; height: 16px; accent-color: var(--color-brand-blue); flex-shrink: 0; }
.quiz-card__submit { margin-top: 8px; align-self: flex-start; }
.quiz-result {
  margin-top: 16px;
  border-radius: var(--radius); padding: 18px 20px;
  background: color-mix(in srgb, var(--color-brand-blue) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-brand-blue) 25%, transparent);
}
.quiz-result--ko { background: color-mix(in srgb, #ef4444 8%, transparent); border-color: color-mix(in srgb, #ef4444 25%, transparent); }
.quiz-result__score { font-weight: 700; font-size: 1.1rem; color: var(--color-heading); margin: 0 0 8px; }
.quiz-result__explanation { color: var(--color-text); margin: 0 0 10px; }
.quiz-result__tomorrow { font-size: 0.9rem; color: var(--color-text-muted); margin: 0; font-style: italic; }
.quiz-card__stats { font-size: 0.85rem; color: var(--color-text-muted); margin: 18px 0 0; }
.quiz-card__exam-link { margin: 12px 0 0; }

/* Cartes de sélection de série (page Examens blancs) */
.exam-series-grid { display: grid; gap: 16px; margin-bottom: 32px; }
.exam-series-card {
  display: flex; align-items: center; gap: 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.2s cubic-bezier(.4,0,.2,1), box-shadow 0.2s cubic-bezier(.4,0,.2,1);
}
/* La carte entière est un <a> : la règle globale a:hover souligne tout son contenu (spécificité
   plus forte que le text-decoration:none de base ci-dessus). On reprend la main ici pour ne
   souligner que le titre de la série au survol, pas le badge ni la ligne "40 questions...". */
.exam-series-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.exam-series-card:not(.exam-series-card--locked):hover .exam-series-card__title { text-decoration: underline; }
.exam-series-card__badge {
  position: relative;
  flex-shrink: 0; width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 800; font-size: 1.3rem;
  background: linear-gradient(135deg, var(--color-brand-blue), var(--color-brand-blue-dark));
  color: #fff;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--color-brand-blue) 30%, transparent);
}
.exam-series-card__badge::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--color-brand-blue) 40%, transparent);
  animation: nav-cta-pulse 2.6s ease-out infinite;
}
:root[data-motion="reduced"] .exam-series-card__badge::before,
:root[data-contrast="high"] .exam-series-card__badge::before {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  .exam-series-card__badge::before { display: none; }
}
.exam-series-card__body { flex: 1; }
.exam-series-card__title { display: block; color: var(--color-heading); font-size: 1.15rem; font-weight: 700; margin-bottom: 2px; }
.exam-series-card__meta { color: var(--color-text-muted); font-size: 0.9rem; }
.exam-series-card__cta {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  font-weight: 600; color: var(--color-brand-blue-dark); font-size: 0.92rem;
}
.exam-series-card--locked { opacity: 0.6; cursor: default; }
.exam-series-card--locked:hover { transform: none; box-shadow: var(--shadow); }
.exam-series-card--locked .exam-series-card__badge { background: var(--color-bg-alt); color: var(--color-text-muted); box-shadow: none; }
.exam-series-card--locked .exam-series-card__badge::before { display: none; }
.exam-series-card--locked .exam-series-card__cta { color: var(--color-text-muted); }

/* Écran de démarrage d'un essai */
.exam-facts { display: grid; gap: 12px; margin: 22px auto; max-width: 380px; text-align: left; }
.exam-fact { display: flex; align-items: center; gap: 12px; font-size: 0.95rem; color: var(--color-text); }
.exam-fact svg { flex-shrink: 0; color: var(--color-brand-blue); }

/* Écran de résultat final */
.exam-result-hero { text-align: center; }
.exam-score-ring {
  width: 132px; height: 132px; border-radius: 50%; margin: 4px auto 20px;
  display: flex; align-items: center; justify-content: center;
  background: conic-gradient(var(--ring-color) calc(var(--pct) * 1%), var(--color-bg-alt) 0);
}
.exam-score-ring__inner {
  width: 104px; height: 104px; border-radius: 50%; background: var(--color-bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px var(--color-border);
}
.exam-score-ring__value { font-family: var(--font-heading); font-weight: 800; font-size: 1.6rem; color: var(--color-heading); line-height: 1; }
.exam-score-ring__label { font-size: 0.68rem; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 3px; }
.exam-result-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-heading); font-weight: 700; font-size: 1.5rem; margin: 0 0 6px;
}
.exam-result-status--pass { color: #1c6b3a; }
.exam-result-status--fail { color: #a12626; }
.exam-result-status svg { flex-shrink: 0; }

/* Corrigé détaillé */
.exam-corrige-grid { display: grid; gap: 16px; }
.exam-corrige-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 5px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  box-shadow: var(--shadow);
}
.exam-corrige-card--ok { border-left-color: #22c55e; }
.exam-corrige-card--ko { border-left-color: #ef4444; }
.exam-corrige-card__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.exam-corrige-card__status {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; color: #fff;
}
.exam-corrige-card--ok .exam-corrige-card__status { background: #22c55e; }
.exam-corrige-card--ko .exam-corrige-card__status { background: #ef4444; }
.exam-corrige-card__number { font-weight: 700; color: var(--color-heading); }
.exam-corrige-card__question { margin: 0 0 8px; }
.exam-corrige-card__answer { margin: 0 0 8px; color: var(--color-text-muted); }
.exam-corrige-card__explanation { margin: 0; color: var(--color-text); }

/* Bandeau accessibilité, discret, entre le contenu et le pied de page sur tout le site */
.a11y-banner {
  background: color-mix(in srgb, var(--color-brand-blue) 6%, var(--color-bg));
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.a11y-banner__inner {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px;
}
.a11y-banner__icon { flex-shrink: 0; display: flex; color: var(--color-brand-blue); }
.a11y-banner p { margin: 0; font-size: 0.88rem; color: var(--color-text); flex: 1; }
.a11y-banner a { font-weight: 600; white-space: nowrap; }
@media (max-width: 600px) {
  .a11y-banner__inner { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* Bannière promotionnelle (sous le slider ou sous l'en-tête de page) */
/* Chaque bout est assombri de ce qu il lui faut, et pas d un dosage unique. Le
   premier essai appliquait 55 % aux deux : le bleu de marque, deja sombre, y
   devenait tres fonce alors que l accent clair restait moyen, et la bande
   penchait visiblement a gauche. Le bleu de marque n a besoin que de 10 % pour
   franchir le seuil, l accent sombre de 44 %. Les deux bouts se retrouvent ainsi
   a la meme luminosite, ce qui etait le cas avant correction. */
.promo-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--color-brand-blue) 90%, var(--color-primary-dark)),
    color-mix(in srgb, var(--color-accent-dark) 56%, var(--color-primary-dark)));
  box-shadow: 0 -4px 10px color-mix(in srgb, var(--color-primary-dark) 12%, transparent);
}
/* Reflet discret qui balaie la bande de droite à gauche, en plus du dégradé bleu→orange déjà
   en place — un calque séparé plutôt qu'une modification du dégradé, pour ne pas changer les
   teintes d'origine. Même sens et même principe que le reflet du logo dans le header. */
.promo-banner::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.22) 50%, transparent 70%);
  background-size: 250% 100%;
  animation: brand-shine 7s linear infinite;
  pointer-events: none;
}
:root[data-motion="reduced"] .promo-banner::after,
:root[data-contrast="high"] .promo-banner::after {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  .promo-banner::after { display: none; }
}
.promo-banner__inner {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px;
}
.promo-banner__icon { font-size: 1.3rem; flex-shrink: 0; }
.promo-banner__icon--special { color: #fff; display: flex; }
/* Seul texte du site à ne pas recevoir de largeur de lecture, et c'est
   délibéré. Un plafond a été posé ici puis retiré, mesures à l'appui : sur une
   fenêtre de 1440 px, il faisait passer « Merci de préparer... » d'une ligne à
   deux et « Chers visiteurs... » de deux à trois, épaississant les bandes de 63
   à 72 px et de 72 à 94 px. Une bande promotionnelle se parcourt d'un coup
   d'œil, elle ne se lit pas comme un paragraphe : sa minceur compte davantage
   que sa longueur de ligne. Le texte reprend donc toute la largeur, et le
   « flex: 1 » pousse le bouton contre le bord droit comme avant. */
/* Le dégradé va du bleu de marque à l'accent sombre : un bout appelle du blanc,
   l'autre une encre sombre, et aucune couleur de texte ne peut convenir aux
   deux (mesuré : 2,33 au pire, quelle que soit l'encre choisie). Rendre ce
   bandeau conforme demanderait d'assombrir ses couleurs, donc de le changer de
   visage. En attendant cette décision, une ombre portée détache le texte du
   fond clair sans rien changer à la bande. */
.promo-banner p { margin: 0; color: #fff; font-weight: 600; font-size: 0.92rem; line-height: 1.5; flex: 1; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
/* Cette bande part de l accent PLEIN, donc de deux couleurs claires : les deux
   bouts ont besoin d un assombrissement fort, 44 % et 56 %, et elle change
   forcement d allure. C est le prix a payer ici, il n y a pas de reglage plus
   doux qui atteigne le seuil. */
.promo-banner--special {
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--color-accent) 44%, var(--color-primary-dark)),
    color-mix(in srgb, var(--color-accent-dark) 56%, var(--color-primary-dark)));
  position: relative; z-index: 1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}
.promo-banner__button {
  flex-shrink: 0; white-space: nowrap;
  background: rgba(255,255,255,0.2); color: #fff; border: 1px solid rgba(255,255,255,0.5);
  padding: 6px 14px; border-radius: var(--radius-pill); font-size: 0.85rem; font-weight: 700;
  transition: background 0.2s cubic-bezier(.4,0,.2,1);
}
.promo-banner__button:hover { background: rgba(255,255,255,0.35); text-decoration: none; }
@media (max-width: 700px) {
  .promo-banner__inner { flex-direction: column; text-align: center; gap: 6px; padding: 14px 20px; }
}

/* Bandeau "nous contacter" en pied de chaque page */
/* Teinte prise sur --color-primary et non sur le bleu de marque : ce bandeau
   est la dernière plage avant le pied de page, qui est lui-même en
   --color-primary-dark. Les deux se suivent ainsi au lieu de se répondre en
   deux couleurs différentes, sous n'importe lequel des thèmes. */
/* Le meme fond que les sections alternees, et non une teinte a part. Les deux
   ne differaient que de 0,6 point de luminance tant que l alternance etait a
   6 % ; passee a 9 %, l ecart montait a 1,5 point et s inversait, le bandeau
   se retrouvant plus clair que la section qui le precede. */
.contact-cta {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
}
.contact-cta__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  flex-wrap: wrap;
  padding: 40px 20px;
}
.contact-cta__text { max-width: var(--measure); }
.contact-cta h3 { margin: 0 0 8px; color: var(--color-heading); }
.contact-cta p { margin: 0 0 6px; color: var(--color-text); font-size: 0.95rem; }
.contact-cta__phones { font-weight: 700; color: var(--color-heading); }
.contact-cta__phones svg { vertical-align: -2px; color: var(--color-brand-blue); }
.contact-cta__button { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 700px) {
  .contact-cta__inner { flex-direction: column; text-align: center; padding: 32px 20px; }
  .contact-cta__phones { display: block; }
}

/* Mise en page admin : menu à gauche, contenu à droite */
.admin-layout {
  display: flex; align-items: flex-start; gap: 28px;
}
.admin-sidebar {
  flex: 0 0 240px; width: 240px;
  position: sticky; top: 20px;
}
.admin-content { flex: 1; min-width: 0; }

/* Cartes admin (articles, avis, diapositives, partenaires…) : fond/bordure/rayon posés ici
   (plus en ligne sur chaque élément) pour que la surcharge mode sombre ci-dessous puisse
   effectivement s'appliquer — un style en ligne aurait toujours été prioritaire sur elle. */
.admin-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--color-primary) 7%, transparent);
  transition: box-shadow 0.2s cubic-bezier(.4,0,.2,1), transform 0.2s cubic-bezier(.4,0,.2,1);
}
.admin-card:hover {
  box-shadow: 0 12px 28px color-mix(in srgb, var(--color-primary) 12%, transparent);
  transform: translateY(-1px);
}
.admin-card::before {
  content: ""; position: absolute; top: 0; left: 14px; right: 14px; height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--color-brand-blue), var(--color-accent));
  opacity: 0.9;
}
:root[data-theme="dark"] .admin-card { background: #2a2b30; }

/* Titres de sous-section admin (H3/H4 stylés en ligne pour la taille) : on complète avec
   couleur de marque et un léger accent, sans toucher au font-size déjà fixé en ligne. */
.admin-content h3 { color: var(--color-primary-dark); }
:root[data-theme="dark"] .admin-content h3 { color: var(--color-heading); }
.admin-content h4 { color: var(--color-heading); letter-spacing: 0.01em; }

/* Bouton natif "Choisir un fichier" : on l'habille pour qu'il suive la charte des boutons
   du site plutôt que le rendu par défaut du navigateur. */
.admin-content input[type="file"] {
  font: inherit; font-size: 0.85rem; color: var(--color-text-muted);
  max-width: 100%;
}
.admin-content input[type="file"]::file-selector-button {
  font: inherit; font-weight: 700; font-size: 0.85rem;
  padding: 8px 16px; margin-right: 10px;
  border: none; border-radius: var(--radius-pill); cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--color-brand-blue), var(--color-brand-blue-dark));
  box-shadow: 0 4px 10px color-mix(in srgb, var(--color-brand-blue) 30%, transparent);
  transition: transform 0.2s cubic-bezier(.4,0,.2,1), box-shadow 0.2s cubic-bezier(.4,0,.2,1);
}
.admin-content input[type="file"]::file-selector-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px color-mix(in srgb, var(--color-brand-blue) 40%, transparent);
}

/* Boîte "Choisir une page" et autres select d'admin : même profondeur douce que les cartes. */
.admin-content select {
  box-shadow: 0 2px 8px color-mix(in srgb, var(--color-primary) 5%, transparent);
}

/* Signale le bouton d'envoi juste après le choix d'un fichier, pour qu'on comprenne qu'il
   reste un clic à faire avant que l'image soit vraiment prise en compte. */
.admin-btn-pulse {
  animation: mac2-admin-pulse 1s ease-in-out 3;
}
@keyframes mac2-admin-pulse {
  0%, 100% { box-shadow: 0 4px 12px color-mix(in srgb, var(--color-primary) 35%, transparent); }
  50% { box-shadow: 0 4px 22px color-mix(in srgb, var(--color-accent) 75%, transparent); transform: scale(1.04); }
}
@media (prefers-reduced-motion: reduce) {
  .admin-btn-pulse { animation: none; }
}

/* Onglets d'administration */
.admin-tabs {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 8px;
}
.admin-tab {
  display: flex; flex-direction: row; align-items: center; gap: 10px;
  background: transparent; border: none; cursor: pointer;
  width: 100%;
  padding: 9px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 700; color: var(--color-text-muted);
  text-align: left;
  transition: color 0.2s cubic-bezier(.4,0,.2,1), background-color 0.2s cubic-bezier(.4,0,.2,1), box-shadow 0.2s cubic-bezier(.4,0,.2,1);
}
/* L'icône reste discrète au repos et s'affirme au survol/à l'activation : elle situe la rubrique
   d'un coup d'œil sans venir concurrencer le libellé, qui reste ce qu'on lit. */
.admin-tab__icon {
  flex: 0 0 auto; display: inline-flex;
  opacity: 0.55;
  transition: opacity 0.2s cubic-bezier(.4,0,.2,1);
}
.admin-tab:hover .admin-tab__icon,
.admin-tab.is-active .admin-tab__icon { opacity: 1; }
.admin-tab__label {
  display: flex; flex-direction: column; align-items: flex-start;
  min-width: 0;
}
.admin-tab__hint {
  font-size: 0.72rem; font-weight: 500; opacity: 0.75;
  margin-top: 1px;
}
.admin-tab:hover { color: var(--color-primary); background: rgba(255,255,255,0.7); }
.admin-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--color-brand-blue), var(--color-brand-blue-dark));
  box-shadow: 0 4px 12px color-mix(in srgb, var(--color-brand-blue) 35%, transparent);
}
.admin-tab.is-active .admin-tab__hint { opacity: 0.85; }
/* C est un <button> depuis que la deconnexion passe en POST, et non plus un
   lien : les quatre declarations ajoutees ici lui rendent l apparence exacte
   du lien qu il remplace, un bouton n heritant ni de la police ni de la
   largeur de son parent. */
.admin-sidebar__logout {
  display: block; text-align: center;
  width: 100%; background: none; cursor: pointer; font-family: inherit;
  margin-top: 14px; padding: 10px 14px;
  border: 1px solid var(--color-border); border-radius: var(--radius);
  font-size: 0.88rem; font-weight: 700; color: var(--color-text-muted);
  transition: color 0.2s cubic-bezier(.4,0,.2,1), border-color 0.2s cubic-bezier(.4,0,.2,1);
}
.admin-sidebar__logout:hover { color: var(--color-primary); border-color: var(--color-primary); }
.admin-panel { display: none; }
.admin-panel.is-active { display: block; }

@media (max-width: 860px) {
  .admin-layout { flex-direction: column; }
  .admin-sidebar { position: static; width: 100%; flex-basis: auto; }
  .admin-tabs { flex-direction: row; flex-wrap: wrap; }
  .admin-tab { width: auto; }
}

/* Thèmes prêts à l'emploi (onglet Thèmes) */
.theme-preset-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 12px; cursor: pointer; text-align: left;
  box-shadow: 0 3px 8px color-mix(in srgb, var(--color-primary) 8%, transparent);
  transition: transform 0.2s cubic-bezier(.4,0,.2,1), box-shadow 0.2s cubic-bezier(.4,0,.2,1), border-color 0.2s cubic-bezier(.4,0,.2,1);
}
.theme-preset-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px color-mix(in srgb, var(--color-primary) 18%, transparent);
  border-color: var(--color-brand-blue);
}
.theme-preset-card__swatch { display: flex; width: 100%; height: 28px; border-radius: var(--radius-sm); overflow: hidden; }
.theme-preset-card__swatch span { flex: 1; }
.theme-preset-card__label { font-weight: 700; font-size: 0.85rem; color: var(--color-heading); }
.theme-preset-card__note { font-size: 0.75rem; color: var(--color-text-muted); }
:root[data-theme="dark"] .theme-preset-card { background: #2a2b30; }

/* Bandeau de consentement aux cookies */
.cookie-consent-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 999;
  background: #fff; color: #333; box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
  padding: 16px 20px;
  display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap;
}
.cookie-consent-bar__text { flex: 1; min-width: 240px; max-width: 760px; font-size: 0.88rem; line-height: 1.5; margin: 0; }
.cookie-consent-bar__actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-consent-btn {
  border: none; border-radius: var(--radius-sm); padding: 10px 18px; font-size: 0.85rem; font-weight: 700;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.cookie-consent-btn--settings { background: #dedfe0; color: #333; }
.cookie-consent-btn--settings:hover { background: #cfd0d1; }
.cookie-consent-btn--accept { background: #61a229; color: #fff; }
.cookie-consent-btn--accept:hover { background: #548e23; }

.cookie-consent-modal {
  position: fixed; inset: 0; z-index: 1000;
  background: color-mix(in srgb, var(--color-primary-dark) 55%, transparent);
  align-items: center; justify-content: center; padding: 20px;
}
.cookie-consent-modal__box {
  background: #fff; border-radius: var(--radius); padding: 28px; max-width: 480px; width: 100%;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}
.cookie-consent-modal__box h3 { margin-top: 0; color: var(--color-heading); }
.cookie-consent-modal__option {
  display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; cursor: pointer;
}
.cookie-consent-modal__option input { margin-top: 4px; flex-shrink: 0; }
.cookie-consent-modal__option span { font-size: 0.88rem; color: var(--color-text); line-height: 1.5; }
.cookie-consent-modal__actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

@media (max-width: 600px) {
  .cookie-consent-bar { flex-direction: column; align-items: stretch; text-align: center; }
  .cookie-consent-bar__actions { justify-content: center; }
}

/* Barre flottante Facebook / Imprimer */
.social-sidebar {
  position: fixed; left: 0; bottom: 24px;
  display: flex; flex-direction: column; z-index: 500;
  box-shadow: 2px 0 10px rgba(0,0,0,0.15);
}
.social-sidebar__btn {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: none; cursor: pointer;
  color: #fff; text-decoration: none; font: inherit;
  transition: opacity 0.2s cubic-bezier(.4,0,.2,1);
}
.social-sidebar__btn:hover { opacity: 0.85; text-decoration: none; }
.social-sidebar__btn--facebook { background: #1877f2; }
.social-sidebar__btn--print { background: var(--color-primary-dark); }
.social-sidebar__btn--theme {
  /* Dégradé fixe (indépendant du thème en cours) pour rester visible quel que soit
     le thème choisi par l'admin, y compris les thèmes très doux/pâles. */
  background: linear-gradient(135deg, #ef476f, #ffd166 50%, #06d6a0 100%);
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
  position: relative;
  /* Espace visuel entre le bouton de personnalisation et le groupe partage/impression. */
  margin-bottom: 16px;
}
.social-sidebar__btn--theme::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(239,71,111,0.55);
  animation: theme-btn-pulse 2.6s ease-out infinite;
  pointer-events: none;
}
/* Un visiteur qui a déjà personnalisé le site connaît le bouton : plus besoin d'attirer
   l'œil, on arrête tout mouvement (pulse permanent compris). */
.social-sidebar__btn--theme.has-customized::after { animation: none; }
@keyframes theme-btn-pulse {
  0% { box-shadow: 0 0 0 0 rgba(239,71,111,0.45); }
  70% { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* Petit "coucou" plus marqué à l'arrivée sur la page (quelques secondes), en plus du
   pulse discret permanent ci-dessus : beaucoup de visiteurs ne remarquent jamais un
   simple pulse continu, ce mouvement plus ample attire davantage l'œil. */
.social-sidebar__btn--theme.is-arriving {
  animation: theme-btn-welcome 0.7s ease-in-out 3;
}
.social-sidebar__btn--theme.is-arriving::after {
  animation: theme-btn-pulse-strong 0.7s ease-out 3;
}
@keyframes theme-btn-welcome {
  0% { transform: scale(1) rotate(0deg); }
  20% { transform: scale(1.18) rotate(-8deg); }
  40% { transform: scale(0.94) rotate(6deg); }
  60% { transform: scale(1.1) rotate(-4deg); }
  80% { transform: scale(0.98) rotate(2deg); }
  100% { transform: scale(1) rotate(0deg); }
}
@keyframes theme-btn-pulse-strong {
  0% { box-shadow: 0 0 0 0 rgba(239,71,111,0.7); }
  70% { box-shadow: 0 0 0 14px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .social-sidebar__btn--theme.is-arriving,
  .social-sidebar__btn--theme.is-arriving::after {
    animation: none;
  }
}
.theme-picker-brush {
  position: absolute; top: -15px; right: -5px;
  font-size: 1.05rem; line-height: 1;
  transform: rotate(-30deg);
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}

.theme-picker-hint {
  position: fixed; left: 52px; z-index: 501;
  max-width: 220px;
  background: #222; color: #fff;
  border-radius: var(--radius); padding: 10px 12px;
  font-size: 0.8rem; line-height: 1.35;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.28);
  opacity: 0;
  transition: opacity 0.25s cubic-bezier(.4,0,.2,1);
}
.theme-picker-hint.is-visible { opacity: 1; }
.theme-picker-hint::before {
  content: '';
  position: absolute; left: -6px; top: 50%; transform: translateY(-50%);
  border-width: 6px 6px 6px 0; border-style: solid;
  border-color: transparent #222 transparent transparent;
}
.theme-picker-hint__close {
  border: none; background: none; color: #bbb; cursor: pointer;
  font-size: 0.85rem; line-height: 1; padding: 2px; flex-shrink: 0;
}
.theme-picker-hint__close:hover { color: #fff; }

@media (max-width: 700px) {
  .theme-picker-hint { display: none; }
}

/* Le rail de partage disparaît sur téléphone, faute de place, mais pas le
   bouton de personnalisation : il est le seul accès aux réglages de lecture
   (taille du texte, contraste, animations, mode sombre), et la page
   Accessibilité promet qu'il est là « en bas de votre écran ». Il n'y était
   pas, précisément là où se trouve la majorité des visiteurs. */
@media (max-width: 700px) {
  .social-sidebar { box-shadow: none; }
  .social-sidebar__btn:not(.social-sidebar__btn--theme) { display: none; }
  .social-sidebar__btn--theme { margin-bottom: 0; }
}

/* Bouton "remonter en haut", intégré au pied de page juste au-dessus du copyright */
.back-to-top {
  display: inline-flex; align-items: center; gap: 6px;
  /* L'espacement est porté par .footer-top-row et .footer-copyright, qui suivent
     les valeurs du site des Mille Couleurs. */
  border: 1px solid rgba(255,255,255,0.25); border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.08); color: var(--color-on-primary);
  font: inherit; font-size: 0.82rem; font-weight: 600;
  padding: 7px 16px; cursor: pointer;
  transition: background-color 0.2s cubic-bezier(.4,0,.2,1), transform 0.2s cubic-bezier(.4,0,.2,1), border-color 0.2s cubic-bezier(.4,0,.2,1);
}
.back-to-top svg { animation: back-to-top-bounce 1.8s ease-in-out infinite; }
.back-to-top:hover {
  background: linear-gradient(135deg, var(--color-brand-blue), var(--color-accent));
  border-color: transparent; color: #fff; transform: translateY(-2px);
}
@keyframes back-to-top-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Panneau "Choisis ton ambiance" */
.theme-picker-panel {
  position: fixed; left: 52px; bottom: 24px; z-index: 501;
  width: 260px; max-width: calc(100vw - 72px);
  background: #fff; color: var(--color-text, #1a1a1a);
  border-radius: var(--radius);
  box-shadow: 0 10px 34px rgba(0,0,0,0.22);
  padding: 14px;
  opacity: 0; transform: translateX(-8px) scale(0.97);
  transition: opacity 0.2s cubic-bezier(.4,0,.2,1), transform 0.2s cubic-bezier(.4,0,.2,1);
}
.theme-picker-panel:not([hidden]) { opacity: 1; transform: translateX(0) scale(1); }
.theme-picker-panel__header {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; font-size: 0.95rem; margin-bottom: 4px;
}
.theme-picker-panel__close {
  border: none; background: none; cursor: pointer;
  font-size: 1rem; line-height: 1; color: #888; padding: 4px;
}
.theme-picker-panel__close:hover { color: #333; }
.theme-picker-tabs {
  display: flex; gap: 4px; margin-bottom: 10px;
  background: #f4f4f4; border-radius: var(--radius-sm); padding: 3px;
}
.theme-picker-tab {
  flex: 1; border: none; background: none; cursor: pointer;
  padding: 7px 6px; border-radius: var(--radius-sm); font-size: 0.76rem; font-weight: 600; color: #666;
  transition: background-color 0.2s cubic-bezier(.4,0,.2,1), color 0.2s cubic-bezier(.4,0,.2,1);
}
.theme-picker-tab.is-active { background: #fff; color: var(--color-heading); box-shadow: 0 1px 3px rgba(0,0,0,0.15); }
.theme-picker-tabpanel[hidden] { display: none; }
.theme-picker-panel__hint {
  font-size: 0.75rem; color: #777; margin: 0 0 10px; line-height: 1.35;
}
.a11y-control {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 2px; margin-bottom: 4px;
}
.a11y-control__label { font-size: 0.85rem; font-weight: 600; }
.a11y-stepper { display: flex; align-items: center; gap: 8px; }
.a11y-stepper button {
  width: 26px; height: 26px; border-radius: var(--radius-sm); border: 1px solid #ddd; background: #fafafa;
  cursor: pointer; font-size: 0.72rem; font-weight: 700; color: var(--color-heading);
  display: flex; align-items: center; justify-content: center;
}
.a11y-stepper button:hover:not(:disabled) { background: #efefef; }
.a11y-stepper button:disabled { opacity: 0.4; cursor: default; }
.a11y-stepper span { font-size: 0.78rem; font-weight: 600; min-width: 64px; text-align: center; color: var(--color-text-muted); }
.theme-picker-panel__grid {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 300px; overflow-y: auto; margin-bottom: 10px;
}
.theme-picker-swatch {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid transparent; background: none; cursor: pointer;
  border-radius: var(--radius-sm); padding: 6px 8px; text-align: left; font: inherit;
  transition: background-color 0.2s cubic-bezier(.4,0,.2,1), border-color 0.2s cubic-bezier(.4,0,.2,1);
}
.theme-picker-swatch:hover { background: #f4f4f4; }
.theme-picker-swatch.is-selected { border-color: var(--color-brand-blue); background: color-mix(in srgb, var(--color-brand-blue) 8%, transparent); }
.theme-picker-swatch__colors {
  display: flex; flex-shrink: 0; border-radius: 50%; overflow: hidden;
  width: 22px; height: 22px; box-shadow: 0 0 0 1px rgba(0,0,0,0.08) inset;
}
.theme-picker-swatch__colors span { flex: 1; height: 100%; }
.theme-picker-swatch__label { font-size: 0.82rem; }
.theme-picker-panel__reset {
  width: 100%; border: 1px solid #ddd; background: #fafafa; cursor: pointer;
  border-radius: var(--radius-sm); padding: 8px; font-size: 0.8rem; font-weight: 600; color: #555;
  transition: background-color 0.2s cubic-bezier(.4,0,.2,1);
}
.theme-picker-panel__reset:hover { background: #efefef; }
.theme-picker-tint { padding: 6px 2px 4px; margin-bottom: 4px; border-top: 1px solid #eee; }
.theme-picker-range { width: 100%; margin: 8px 0 2px; accent-color: var(--color-brand-blue); }

.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 2px; margin-bottom: 10px;
  border-top: 1px solid #eee; border-bottom: 1px solid #eee;
  cursor: pointer;
}
.toggle-row__label { font-size: 0.85rem; font-weight: 600; }
.toggle-row__switch { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.toggle-row__switch input {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: pointer;
}
.toggle-row__slider {
  position: absolute; inset: 0; background: #ccc; border-radius: var(--radius-pill);
  transition: background-color 0.2s cubic-bezier(.4,0,.2,1); pointer-events: none;
}
.toggle-row__slider::before {
  content: ''; position: absolute; left: 3px; top: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: transform 0.2s cubic-bezier(.4,0,.2,1);
}
.toggle-row__switch input:checked + .toggle-row__slider { background: linear-gradient(135deg, #4b6cb7, #182848); }
.toggle-row__switch input:checked + .toggle-row__slider::before { transform: translateX(18px); }
.toggle-row__switch input:focus-visible + .toggle-row__slider { outline: 2px solid var(--color-brand-blue); outline-offset: 2px; }

/* Le panneau reste disponible sur téléphone : il est déjà dimensionné pour
   (260 px, plafonné à la largeur de l'écran moins 72). On lui ajoute seulement
   une hauteur maximale, faute de quoi ses 25 thèmes débordent d'un petit
   écran. */
@media (max-width: 700px) {
  .theme-picker-panel { max-height: calc(100vh - 96px); overflow-y: auto; }
}

/* ============================================================
   Liserés d'identité
   Une barre pleine d'un bord à l'autre cerne la carte ; un dégradé
   qui s'efface la situe. Même couleur, même information, moitié
   moins de poids visuel, et l'épaisseur passe de 4 ou 5 px à 3.
   Posés en fond plutôt qu'en bordure, pour trois raisons : le fond
   est découpé par le rayon des coins, donc le liseré ne dépasse pas ;
   il n'ajoute rien à la hauteur de la boîte ; et il survit au mode
   sombre, qui n'a plus à réécrire ces surfaces depuis qu'elles
   passent toutes par --color-surface.
   Ce bloc vient après les règles concernées, à dessein : chacune pose
   son fond avec la propriété raccourcie « background », qui remet
   background-image à zéro. L'ordre fait ici la loi, pas le poids.
   ============================================================ */
.card,
.news-item,
.prose-card,
.login-card {
  background-image: linear-gradient(90deg, var(--lisere), transparent 78%);
  background-repeat: no-repeat;
  background-size: 100% 3px;
  background-position: top left;
}
.news-preview-list__link,
.poll-card,
.quiz-card,
.avis-item,
.feature-card--badge {
  background-image: linear-gradient(180deg, var(--lisere), transparent 78%);
  background-repeat: no-repeat;
  background-size: 3px 100%;
  background-position: top left;
}
/* Une couleur par famille, posée une seule fois. Les cartes de formation et
   les avis portent l'accent, tout ce qui relève de l'information et des
   services porte le bleu de marque. */
.card, .avis-item { --lisere: var(--color-accent); }
.news-item, .prose-card, .login-card, .news-preview-list__link,
.poll-card, .quiz-card, .feature-card--badge { --lisere: var(--color-brand-blue); }

/* ------------------------------------------------------------------
   Fond des fiches d'actualité
   Les fiches d'avis portent déjà leur guillemet ; les actualités
   n'avaient rien et restaient des rectangles blancs. Elles reçoivent un
   voile très doux qui monte du coin inférieur droit, dessiné en dégradé
   et non en image : une image ne saurait pas lire une variable CSS, et
   le fond doit suivre les 25 thèmes comme tout le reste.
   Un pointillé de route courait ici au bas de la fiche, retiré le
   04/09/2026 : le motif ne plaisait pas, et le fond demandé tient
   entièrement dans le voile. Deux couches suffisent donc, le liseré
   par-dessus le voile.
   ------------------------------------------------------------------ */
.news-item,
.news-preview-list__link {
  background-image:
    var(--lisere-couche),
    radial-gradient(85% 135% at 100% 50%,
      color-mix(in srgb, var(--color-brand-blue) 11%, transparent) 0%,
      color-mix(in srgb, var(--color-brand-blue) 4%, transparent) 45%,
      transparent 78%);
  background-repeat: no-repeat, no-repeat;
  background-size: var(--lisere-taille), 100% 100%;
  background-position: top left, center right;
}
/* La fiche de la page « toute l'actu » porte son liseré en haut, celle de
   l'aperçu d'accueil sur son flanc gauche : seules ces deux valeurs changent
   entre elles, le reste du fond est commun. */
.news-item {
  --lisere-couche: linear-gradient(90deg, var(--lisere), transparent 78%);
  --lisere-taille: 100% 3px;
}
.news-preview-list__link {
  --lisere-couche: linear-gradient(180deg, var(--lisere), transparent 78%);
  --lisere-taille: 3px 100%;
}

/* ============================================================
   Mode sombre — préférence personnelle du visiteur (indépendante
   du thème de couleurs choisi par l'admin ou par le visiteur).
   ============================================================ */
:root[data-theme="dark"] {
  --color-bg: #1e1f22;
  --color-bg-alt: #26272b;
  --color-surface: #2a2b30;
  --color-text: #d7d8da;
  --color-text-muted: #9a9da3;
  --color-heading: #f3f2ef;
  --color-border: #3a3b40;
  /* Ombres franchement noires : teintées de la couleur du thème comme en clair,
     elles se confondraient avec le fond sombre au lieu de le creuser. */
  --shadow-sm: 0 4px 14px -6px rgba(0,0,0,0.5);
  --shadow: 0 14px 32px -18px rgba(0,0,0,0.62);
  --shadow-lg: 0 24px 48px -22px rgba(0,0,0,0.7);
  /* Les teintes claires des pastilles n'ont pas cours ici : le bloc « Badges,
     pilules » plus bas redéfinit chaque élément avec un fond sombre teinté. Les
     quelques endroits qui utilisent une teinte sans être redéfinis (fonds de
     survol discrets) sont ramenés au gris de surface. */
  --tint-accent-soft: #2a2b30;
  --tint-accent-medium: #2f3036;
  --tint-accent-strong: #34353c;
  --tint-accent-border: #3a3b40;
  --tint-brand-faint: #26272b;
  --tint-brand-soft: #2a2b30;
  --tint-brand-medium: #2f3036;
  --tint-brand-strong: #34353c;
  --tint-brand-border: #3a3b40;
  --tint-primary-soft: #26272b;
  color-scheme: dark;
}

/* Liens "nus" dans le contenu admin (listes de PDF, aperçus de texte...) : --color-primary-light
   est pensé pour un fond clair (contraste ~2:1 sur fond sombre admin, illisible). Scopé à
   .admin-content plutôt qu'à tous les <a> : la nav, les boutons, link-pill... ont déjà leur
   propre couleur ailleurs, un override global les aurait incorrectement emporté sur eux. */
:root[data-theme="dark"] .admin-content a { color: #5b9bd5; }

/* Surfaces (header, menus, cartes) : en clair ces éléments utilisent des dégradés
   pastel pensés pour un fond blanc ; en sombre on les remplace par des surfaces
   plates, plus lisibles et plus proches d'un mode sombre bien construit. */
:root[data-theme="dark"] .site-header,
:root[data-theme="dark"] .submenu,
:root[data-theme="dark"] .main-nav,
:root[data-theme="dark"] .partner-card,
:root[data-theme="dark"] .feature-card__badge,
:root[data-theme="dark"] .label-badge,
:root[data-theme="dark"] .theme-picker-panel,
:root[data-theme="dark"] .cookie-consent-bar,
:root[data-theme="dark"] .cookie-consent-modal__box,
:root[data-theme="dark"] .maintenance-countdown__box,
:root[data-theme="dark"] .topbar-search__suggestions {
  background: #26272b;
}
:root[data-theme="dark"] .cookie-consent-bar { color: var(--color-text); }
/* Les quinze surfaces qui figuraient ici (cartes, cadres, formulaires, bandeau
   de contact, sélecteur de formation) n'ont plus besoin d'être réécrites : elles
   passent toutes par --color-surface ou par une teinte, et ces variables sont
   déjà redéfinies plus haut pour le mode sombre. La règle supprimée forçait en
   plus « background-image: none », ce qui effacerait aujourd'hui les liserés. */
:root[data-theme="dark"] .formation-picker__option { background: #1e1f22; border-color: var(--color-border); color: var(--color-text); }
:root[data-theme="dark"] .formation-picker__option:hover { border-color: var(--color-brand-blue); }
:root[data-theme="dark"] .related-formations__item { background: #2a2b30; border-color: var(--color-border); color: var(--color-text); }
:root[data-theme="dark"] .related-formations__item:hover { border-color: var(--color-brand-blue); }
/* Même chose pour la carte de Sarah : son aplat vient de --tint-primary-soft, et
   ses deux autres couches (liseré, trame de points) doivent rester visibles. */

/* Formulaires */
:root[data-theme="dark"] .field input,
:root[data-theme="dark"] .field textarea,
:root[data-theme="dark"] .field select {
  background: #1a1b1e; color: var(--color-text); border-color: var(--color-border);
}
/* Éditeur de texte enrichi (admin) : fond blanc fixe en clair (voir .rich-editor-content),
   jamais surchargé en sombre jusqu'ici — texte clair sur fond blanc, illisible. */
:root[data-theme="dark"] .rich-editor-content { background: #1a1b1e; color: var(--color-text); }
:root[data-theme="dark"] .rich-editor-toolbar button:hover { background: var(--color-bg); }
/* .btn--accent : fond orange fixe (ne change pas avec le thème), mais son texte suit
   --color-heading qui, lui, devient quasi blanc en sombre — texte clair sur fond clair,
   illisible. --color-primary-dark reste une teinte sombre fixe dans les deux thèmes. */
:root[data-theme="dark"] .btn--accent { color: var(--color-primary-dark); }
:root[data-theme="dark"] .topbar-search input { background: rgba(255,255,255,0.12); color: #fff; }
:root[data-theme="dark"] .topbar-search input::placeholder { color: rgba(255,255,255,0.6); }
:root[data-theme="dark"] .topbar-search input:focus { background: rgba(255,255,255,0.2); }

/* Navigation */
:root[data-theme="dark"] .nav-toggle span { background: var(--color-text); }
/* :hover/.is-active passent tous deux par --color-primary (bleu marine fixe, pensé pour un fond
   clair) : en sombre le fond change bien (ci-dessous) mais le texte restait aussi sombre que lui,
   quasi invisible — d'où le "lien de menu illisible une fois cliqué". */
:root[data-theme="dark"] .main-nav > ul > li > a:hover,
:root[data-theme="dark"] .main-nav > ul > li > a.is-active {
  color: var(--color-heading);
}
:root[data-theme="dark"] .main-nav > ul > li > a.is-active { background: color-mix(in srgb, var(--color-brand-blue) 25%, transparent); }
:root[data-theme="dark"] .pdf-list a:hover { background: color-mix(in srgb, var(--color-brand-blue) 18%, transparent); }
/* Même défaut que le menu principal ci-dessus (--color-primary fixe, texte quasi invisible sur
   un fond qui lui s'adapte déjà) : sous-menu "Formations auto", suggestions de recherche,
   fil d'Ariane, bouton retour du sélecteur de formation, liens des actus, nav mobile. */
:root[data-theme="dark"] .submenu li a:hover,
:root[data-theme="dark"] .topbar-search__suggestions a.is-active,
:root[data-theme="dark"] .breadcrumb__inner a:hover,
:root[data-theme="dark"] .formation-picker__back:hover,
:root[data-theme="dark"] .news-preview-list__link:hover strong,
:root[data-theme="dark"] .mobile-extra-nav a:hover,
:root[data-theme="dark"] .mobile-extra-nav a.is-active {
  color: var(--color-heading);
}
/* .exam-series-card__cta : même chose avec --color-brand-blue-dark (fixe) sur la carte de série
   qui, elle, passe bien en fond sombre — texte bleu foncé sur fond sombre, peu lisible. */
:root[data-theme="dark"] .exam-series-card__cta { color: #5b9bd5; }
/* Liens "nus" (sans classe) dans le texte de contenu : --color-primary-light est pensé pour un
   fond clair. Scopé à ces conteneurs plutôt qu'à tous les <a> : la nav, les boutons,
   link-pill... ont déjà leur propre couleur ailleurs, un override global les aurait incorrectement
   emporté sur eux (déjà vu une fois avec .topbar-nav a). */
:root[data-theme="dark"] .prose a,
:root[data-theme="dark"] .prose-card a,
:root[data-theme="dark"] .contact-cta a,
:root[data-theme="dark"] .news-item a,
:root[data-theme="dark"] .avis-item a {
  color: #5b9bd5;
}
:root[data-theme="dark"] .poll-option:hover { background: color-mix(in srgb, var(--color-brand-blue) 15%, transparent); border-color: var(--color-brand-blue); }

/* Badges, pilules, alertes : fonds sombres teintés plutôt que pastel clair */
:root[data-theme="dark"] .eyebrow--orange, :root[data-theme="dark"] .date-badge--orange, :root[data-theme="dark"] .link-pill--orange {
  background: color-mix(in srgb, var(--color-accent) 22%, #1e1f22); color: var(--color-accent); border-color: color-mix(in srgb, var(--color-accent) 40%, transparent);
}
:root[data-theme="dark"] .link-pill--orange:hover { background: color-mix(in srgb, var(--color-accent) 32%, #1e1f22); }
:root[data-theme="dark"] .eyebrow--blue, :root[data-theme="dark"] .date-badge, :root[data-theme="dark"] .link-pill--blue {
  background: color-mix(in srgb, var(--color-brand-blue) 22%, #1e1f22); color: color-mix(in srgb, var(--color-brand-blue) 55%, white); border-color: color-mix(in srgb, var(--color-brand-blue) 40%, transparent);
}
:root[data-theme="dark"] .link-pill--blue:hover { background: color-mix(in srgb, var(--color-brand-blue) 32%, #1e1f22); }
:root[data-theme="dark"] .alert--success { background: color-mix(in srgb, #22c55e 20%, #1e1f22); color: #86efac; border-color: color-mix(in srgb, #22c55e 45%, transparent); }
:root[data-theme="dark"] .alert--error { background: color-mix(in srgb, #ef4444 20%, #1e1f22); color: #fca5a5; border-color: color-mix(in srgb, #ef4444 45%, transparent); }
/* Le verdict de l'examen blanc n'avait aucune surcharge sombre, contrairement
   aux alertes ci-dessus : mesuré à 2,16 pour « Réussi » et 1,90 pour « Échec »
   sur fond sombre, quand le seuil est de 3 à cette taille. L'élève terminait
   son examen et la seule ligne qui lui disait s'il avait réussi était la moins
   lisible de l'écran. Mêmes teintes que les alertes, pour rester cohérent. */
:root[data-theme="dark"] .exam-result-status--pass { color: #86efac; }
:root[data-theme="dark"] .exam-result-status--fail { color: #fca5a5; }

/* Photos : légèrement adoucies pour ne pas agresser sur fond sombre */
:root[data-theme="dark"] .section-photo,
:root[data-theme="dark"] .article-featured-image,
:root[data-theme="dark"] .feature-card__photo {
  filter: saturate(0.85) brightness(0.92) contrast(0.97);
}

/* Panneau "Choisis ton ambiance" en mode sombre */
:root[data-theme="dark"] .theme-picker-swatch:hover { background: rgba(255,255,255,0.08); }
:root[data-theme="dark"] .theme-picker-panel__close { color: #999; }
:root[data-theme="dark"] .theme-picker-panel__close:hover { color: #fff; }
:root[data-theme="dark"] .theme-picker-panel__hint { color: #9a9da3; }
:root[data-theme="dark"] .toggle-row { border-color: #3a3b40; }
:root[data-theme="dark"] .theme-picker-tint { border-color: #3a3b40; }
:root[data-theme="dark"] .theme-picker-panel__reset { background: #1a1b1e; border-color: #3a3b40; color: #ccc; }
:root[data-theme="dark"] .theme-picker-panel__reset:hover { background: #26272b; }
:root[data-theme="dark"] .theme-picker-tabs { background: #1a1b1e; }
:root[data-theme="dark"] .theme-picker-tab { color: #9a9da3; }
:root[data-theme="dark"] .theme-picker-tab.is-active { background: #2a2b30; color: #fff; }
:root[data-theme="dark"] .a11y-stepper button { background: #1a1b1e; border-color: #3a3b40; color: #eee; }
:root[data-theme="dark"] .a11y-stepper button:hover:not(:disabled) { background: #26272b; }

/* ============================================================
   Confort de lecture — préférences d'accessibilité personnelles,
   indépendantes du thème de couleurs et du mode sombre.
   ============================================================ */

/* Taille du texte : le site utilise des unités rem, donc changer la taille de
   base du document redimensionne proportionnellement (à peu près) tout le texte. */
:root[data-text-size="large"] { font-size: 112.5%; }
:root[data-text-size="xlarge"] { font-size: 125%; }

/* Police plus lisible : à défaut d'embarquer une police spécialisée (type
   OpenDyslexic), on privilégie une police sans-serif très distincte associée
   à un espacement généreux, deux leviers reconnus pour le confort de lecture. */
:root[data-font="dyslexic"] { --font: Verdana, Tahoma, Geneva, sans-serif; --font-heading: Verdana, Tahoma, Geneva, sans-serif; }
:root[data-font="dyslexic"] body { letter-spacing: 0.02em; word-spacing: 0.08em; line-height: 1.75; }

/* Contraste élevé — priorité absolue en !important : --color-heading est aussi défini en ligne
   par le sélecteur de thème de couleur (JS), qui gagnerait sinon systématiquement le conflit
   (un style inline l'emporte toujours sur une règle de feuille de style sans !important). Le
   contraste élevé est un réglage d'accessibilité : il doit rester prioritaire quelle que soit
   la combinaison avec un thème de couleur ou le mode sombre. */
:root[data-contrast="high"] {
  --color-text: #000000 !important;
  --color-heading: #000000 !important;
  --color-text-muted: #1a1a1a !important;
  --color-border: #000000 !important;
}
:root[data-contrast="high"] a { text-decoration: underline; }
:root[data-theme="dark"][data-contrast="high"] {
  --color-text: #ffffff !important;
  --color-heading: #ffffff !important;
  --color-text-muted: #f0f0f0 !important;
  --color-border: #ffffff !important;
  --color-bg: #000000 !important;
  --color-bg-alt: #0d0d0d !important;
}

/* Réduction des animations : neutralise transitions/animations sur tout le site
   (même principe que la media query prefers-reduced-motion, en version pilotable). */
:root[data-motion="reduced"] *,
:root[data-motion="reduced"] *::before,
:root[data-motion="reduced"] *::after {
  animation-duration: 0.001ms !important;
  animation-delay: 0ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

/* ============================================================
   Assistant IA : bulle de chat flottante « Sarah ».
   ============================================================ */
.ai-chat { position: fixed; right: 20px; bottom: 20px; z-index: 610; }

.ai-chat__teaser {
  position: absolute; right: 0; bottom: 72px; width: 250px;
  background: #fff; border-radius: var(--radius); box-shadow: 0 12px 34px rgba(0,0,0,0.25);
  padding: 12px 34px 12px 12px;
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity 0.25s cubic-bezier(.4,0,.2,1), transform 0.25s cubic-bezier(.4,0,.2,1);
}
.ai-chat__teaser.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.ai-chat__teaser-close {
  position: absolute; top: 6px; right: 8px; border: none; background: none; cursor: pointer;
  color: #999; font-size: 0.85rem; padding: 4px;
}
.ai-chat__teaser-close:hover { color: #333; }
.ai-chat__teaser-open {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: none; background: none; cursor: pointer; text-align: left; padding: 0;
}
.ai-chat__teaser-open .ai-chat__header-avatar { background: var(--color-brand-blue); }
.ai-chat__teaser-text { display: flex; flex-direction: column; gap: 2px; }
.ai-chat__teaser-text strong { font-size: 0.85rem; color: var(--color-heading); }
.ai-chat__teaser-text span { font-size: 0.78rem; color: var(--color-text-muted); line-height: 1.35; }
:root[data-theme="dark"] .ai-chat__teaser { background: #26272b; box-shadow: 0 12px 34px rgba(0,0,0,0.5); }
:root[data-theme="dark"] .ai-chat__teaser-close { color: #999; }
:root[data-theme="dark"] .ai-chat__teaser-close:hover { color: #fff; }
@media (max-width: 700px) {
  .ai-chat__teaser { right: -8px; width: 220px; }
}
.ai-chat__launcher {
  position: relative; width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--color-brand-blue), var(--color-brand-blue-dark));
  color: #fff; box-shadow: 0 10px 26px rgba(0,0,0,0.28);
  transition: transform 0.2s cubic-bezier(.4,0,.2,1);
}
.ai-chat__launcher:hover { transform: scale(1.06); }
.ai-chat__launcher-icon-close { display: none; }
.ai-chat.is-open .ai-chat__launcher-icon-open { display: none; }
.ai-chat.is-open .ai-chat__launcher-icon-close { display: block; }

.ai-chat__panel {
  position: absolute; right: 0; bottom: 72px; width: 340px; max-width: calc(100vw - 40px);
  height: 460px; max-height: calc(100vh - 140px);
  display: flex; flex-direction: column;
  background: #fff; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,0.28);
  opacity: 0; transform: translateY(12px) scale(0.98); pointer-events: none;
  transition: opacity 0.2s cubic-bezier(.4,0,.2,1), transform 0.2s cubic-bezier(.4,0,.2,1);
}
.ai-chat__panel:not([hidden]) { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.ai-chat__header {
  flex-shrink: 0; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; background: linear-gradient(135deg, var(--color-brand-blue), var(--color-brand-blue-dark)); color: #fff;
}
.ai-chat__header-identity { display: flex; align-items: center; gap: 8px; }
.ai-chat__header-avatar {
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,0.18);
}
.ai-chat__header-text { display: flex; flex-direction: column; gap: 1px; }
.ai-chat__header-title { font-weight: 700; font-size: 0.95rem; line-height: 1.2; }
.ai-chat__header-subtitle { font-size: 0.68rem; opacity: 0.85; line-height: 1.2; }
.ai-chat__close { border: none; background: none; color: #fff; opacity: 0.85; cursor: pointer; font-size: 0.9rem; padding: 4px; }
.ai-chat__close:hover { opacity: 1; }

.ai-chat__messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ai-chat__msg { display: flex; }
.ai-chat__msg--user { justify-content: flex-end; }
.ai-chat__msg--assistant { justify-content: flex-start; }
.ai-chat__bubble {
  max-width: 82%; padding: 9px 13px; border-radius: var(--radius); font-size: 0.84rem; line-height: 1.45;
  white-space: pre-wrap; word-break: break-word;
}
.ai-chat__msg--assistant .ai-chat__bubble { background: #f1f3f6; color: var(--color-text); border-bottom-left-radius: 4px; }
.ai-chat__msg--user .ai-chat__bubble { background: var(--color-brand-blue); color: #fff; border-bottom-right-radius: 4px; }

.ai-chat__typing { display: flex; align-items: center; gap: 4px; padding: 11px 13px; }
.ai-chat__typing span {
  width: 6px; height: 6px; border-radius: 50%; background: #a7adb5;
  animation: ai-chat-typing-bounce 1.2s ease-in-out infinite;
}
.ai-chat__typing span:nth-child(2) { animation-delay: 0.15s; }
.ai-chat__typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes ai-chat-typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.ai-chat__form { flex-shrink: 0; display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--color-border); }
.ai-chat__input {
  flex: 1; resize: none; max-height: 110px; padding: 9px 12px; border-radius: var(--radius);
  border: 1px solid var(--color-border); font-family: inherit; font-size: 0.85rem; line-height: 1.4;
}
.ai-chat__send {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--color-brand-blue); color: #fff;
  transition: background-color 0.2s cubic-bezier(.4,0,.2,1);
}
.ai-chat__send:hover { background: var(--color-brand-blue-dark); }
.ai-chat__send:disabled { opacity: 0.6; cursor: default; }
.ai-chat__disclaimer { flex-shrink: 0; margin: 0; padding: 0 14px 12px; font-size: 0.68rem; color: var(--color-text-muted); line-height: 1.35; }

.ai-chat__consent {
  display: none; flex: 1; flex-direction: column; justify-content: center; gap: 14px;
  padding: 18px 16px; text-align: center;
}
.ai-chat__consent p { margin: 0; font-size: 0.82rem; line-height: 1.5; color: var(--color-text-muted); }
.ai-chat__consent a { color: var(--color-brand-blue); }
.ai-chat__consent-accept {
  align-self: center; border: none; cursor: pointer; padding: 10px 20px; border-radius: var(--radius-pill);
  background: var(--color-brand-blue); color: #fff; font-size: 0.83rem; font-weight: 600;
  transition: background-color 0.2s cubic-bezier(.4,0,.2,1);
}
.ai-chat__consent-accept:hover { background: var(--color-brand-blue-dark); }
.ai-chat__panel--pending-consent .ai-chat__consent { display: flex; }
.ai-chat__panel--pending-consent .ai-chat__messages,
.ai-chat__panel--pending-consent .ai-chat__form,
.ai-chat__panel--pending-consent .ai-chat__disclaimer { display: none; }

@media (max-width: 700px) {
  .ai-chat { right: 12px; bottom: 12px; }
  .ai-chat__panel { right: -4px; width: calc(100vw - 24px); height: min(460px, calc(100vh - 120px)); }
}

:root[data-motion="reduced"] .ai-chat__launcher,
:root[data-motion="reduced"] .ai-chat__panel { transition: none; }
:root[data-motion="reduced"] .ai-chat__typing span { animation: none; opacity: 0.8; }
@media (prefers-reduced-motion: reduce) {
  .ai-chat__launcher, .ai-chat__panel { transition: none; }
  .ai-chat__typing span { animation: none; opacity: 0.8; }
}

:root[data-theme="dark"] .ai-chat__panel { background: #26272b; box-shadow: 0 16px 40px rgba(0,0,0,0.55); }
:root[data-theme="dark"] .ai-chat__form { border-top-color: rgba(255,255,255,0.1); }
:root[data-theme="dark"] .ai-chat__input { background: #1c1d20; border-color: rgba(255,255,255,0.14); color: var(--color-text); }
:root[data-theme="dark"] .ai-chat__msg--assistant .ai-chat__bubble { background: #33353a; color: var(--color-text); }
:root[data-theme="dark"] .ai-chat__close { color: #fff; }

/* Page de maintenance */
/* Page de maintenance : scène de route de nuit — clin d'œil à l'auto-école, pensée comme un
   moment à part (toujours sombre, indépendant du thème clair/sombre choisi par le visiteur). */
.maintenance-page {
  position: relative; overflow: hidden;
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(120% 90% at 50% -10%, #16345c 0%, #0b2544 45%, #050b16 100%);
  padding: 24px;
}
.maintenance-page__stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 22%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 28% 8%, #fff, transparent),
    radial-gradient(1.6px 1.6px at 47% 28%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 63% 12%, #fff, transparent),
    radial-gradient(1.8px 1.8px at 81% 24%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 91% 10%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 6% 40%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 70% 38%, #fff, transparent);
  background-repeat: repeat;
  background-size: 340px 260px;
  opacity: 0.8;
  animation: mac2-twinkle 4.5s ease-in-out infinite alternate;
}
@keyframes mac2-twinkle { from { opacity: 0.45; } to { opacity: 0.9; } }
.maintenance-page__glow {
  position: absolute; bottom: 8%; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--color-accent) 55%, transparent), transparent 72%);
  filter: blur(4px); opacity: 0.4; animation: mac2-glow-pulse 3.8s ease-in-out infinite;
}
.maintenance-page__glow--left { left: 4%; }
.maintenance-page__glow--right { right: 4%; animation-delay: 1.9s; }
@keyframes mac2-glow-pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.9); }
  50% { opacity: 0.55; transform: scale(1.08); }
}
.maintenance-page__road {
  position: absolute; left: 0; right: 0; bottom: 0; height: 42vh; min-height: 230px; max-height: 360px;
  overflow: hidden;
}
.maintenance-page__road-surface {
  position: absolute; left: 50%; bottom: -2px; width: 160%; height: 100%; transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(9, 14, 26, 0) 0%, rgba(7, 11, 21, 0.85) 45%, #04060b 100%);
  clip-path: polygon(44% 0%, 56% 0%, 94% 100%, 6% 100%);
}
.maintenance-page__road-line {
  position: absolute; left: 50%; bottom: 0; width: 46px; height: 100%; transform: translateX(-50%);
  clip-path: polygon(46% 0%, 54% 0%, 66% 100%, 34% 100%);
  background-image: repeating-linear-gradient(180deg, var(--color-accent) 0 30px, transparent 30px 70px);
  background-size: 100% 200px;
  animation: mac2-road-line 1s linear infinite;
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--color-accent) 65%, transparent));
}
@keyframes mac2-road-line { to { background-position-y: 200px; } }

.maintenance-page__card {
  position: relative; z-index: 2;
  background: linear-gradient(165deg, rgba(23, 37, 60, 0.72), rgba(7, 12, 23, 0.78));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  padding: 48px 40px;
  max-width: 540px;
  width: 100%;
  text-align: center;
  color: #eef2f8;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}
.maintenance-page__card::before {
  content: ""; position: absolute; top: 0; left: 14%; right: 14%; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), var(--color-brand-blue), transparent);
  background-size: 200% 100%;
  animation: mac2-shimmer 5s linear infinite;
}
@keyframes mac2-shimmer { to { background-position: -200% 0; } }
.maintenance-page__logo { width: 72px; height: auto; margin-bottom: 16px; }
.maintenance-page__icon { margin-bottom: 14px; }
.maintenance-page__icon .card-icon { width: 64px; height: 64px; margin: 0 auto; }
.maintenance-page__icon .card-icon svg { width: 32px; height: 32px; }
.maintenance-page__eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--radius-pill); margin-bottom: 16px;
  background: color-mix(in srgb, var(--color-accent) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-accent) 45%, transparent);
  color: var(--color-accent);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
}
.maintenance-page__card h1 { color: #fff; margin: 0 0 16px; font-size: 1.6rem; }
.maintenance-page__card p { margin: 0 0 14px; color: rgba(238, 242, 248, 0.78); line-height: 1.6; }
.maintenance-page__intro { font-weight: 700; color: #fff; }
.maintenance-page__contact {
  list-style: none; padding: 0; margin: 8px 0 20px; display: grid; gap: 10px; text-align: left;
  color: rgba(238, 242, 248, 0.88);
}
.maintenance-page__contact li { font-size: 0.95rem; }
.maintenance-page__contact--centered { text-align: center; justify-items: center; }
.maintenance-page__contact a, .maintenance-page__sms a { color: var(--color-on-primary-strong); }
.maintenance-page__sms { font-size: 0.9rem; color: rgba(238, 242, 248, 0.6); margin: 0; }

.maintenance-countdown {
  display: flex; justify-content: center; gap: 10px;
  margin: 4px 0 22px;
}
.maintenance-countdown__box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  padding: 10px 8px;
  min-width: 62px;
}
.maintenance-countdown__box span {
  display: block; font-family: var(--font-heading); font-weight: 700; font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
  color: var(--color-accent);
  text-shadow: 0 0 12px color-mix(in srgb, var(--color-accent) 55%, transparent);
  line-height: 1.1;
}
.maintenance-countdown__box small { font-size: 0.7rem; color: rgba(238, 242, 248, 0.55); }
@media (max-width: 480px) {
  .maintenance-countdown { gap: 6px; }
  .maintenance-countdown__box { min-width: 52px; padding: 8px 4px; }
  .maintenance-countdown__box span { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .maintenance-page__stars,
  .maintenance-page__glow,
  .maintenance-page__road-line,
  .maintenance-page__card::before {
    animation: none;
  }
}

.admin-maintenance-notice {
  background: var(--color-accent-dark);
  color: #fff;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 16px;
}
.admin-maintenance-notice a { color: #fff; text-decoration: underline; }

/* ============================================================
   Transition douce d'une page à l'autre (View Transitions API).
   Fonctionnalité récente des navigateurs (Chrome/Edge) : là où elle
   n'est pas supportée (Firefox, Safari à ce jour), la navigation se
   comporte normalement, sans aucune régression — c'est une couche
   additionnelle, jamais une dépendance.
   ============================================================ */
@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.28s;
  animation-timing-function: cubic-bezier(.4,0,.2,1);
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}
:root[data-motion="reduced"] ::view-transition-old(root),
:root[data-motion="reduced"] ::view-transition-new(root) {
  animation: none;
}

/* ============================================================
   Page "Défi Code du jour" : ciel nocturne + panneau de signalisation
   affichant le numéro du jour, pour une entrée en matière qui sort du
   gabarit habituel des pages "page-hero".
   ============================================================ */
.quiz-hero {
  position: relative; overflow: hidden;
  background-image:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0px, rgba(255, 255, 255, 0.04) 2px, transparent 2px, transparent 16px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,90 Q600,40 1200,90' fill='none' stroke='white' stroke-opacity='0.3' stroke-width='5' stroke-linecap='round' stroke-dasharray='34 26'/%3E%3C/svg%3E"),
    radial-gradient(120% 100% at 15% 0%, #3a2a12 0%, #1c1508 35%, #050505 100%);
  background-repeat: repeat, no-repeat, no-repeat;
  /* Décalage de 10 px et non 30 : ce bandeau-ci enfonçait la route bien plus bas que sur le
     reste du site, elle en paraissait coupée par le bord. Son sommet se situe désormais à
     ~34 px du bas, contre ~44 px sur les autres pages — un peu plus bas, mais le panneau rond
     descend plus qu'un simple titre, il faut lui laisser la place. */
  background-position: 0 0, center calc(100% + 10px), center;
  background-size: auto, 100% 96px, cover; /* hauteur fixe, même raison que .page-header */
  padding: 64px 0;
}
.quiz-hero__stars {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1.6px 1.6px at 12% 22%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 28% 55%, #fff, transparent),
    radial-gradient(1.6px 1.6px at 47% 15%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 63% 62%, #fff, transparent),
    radial-gradient(1.8px 1.8px at 81% 30%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 91% 55%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 6% 70%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 70% 12%, #fff, transparent);
  background-repeat: repeat;
  background-size: 340px 260px;
  opacity: 0.7;
  animation: mac2-twinkle 4.5s ease-in-out infinite alternate;
}
.quiz-hero__glow {
  position: absolute; top: 50%; width: 260px; height: 260px; border-radius: 50%; transform: translateY(-50%);
  background: radial-gradient(circle, color-mix(in srgb, var(--color-accent) 55%, transparent), transparent 72%);
  filter: blur(4px); opacity: 0.4; animation: mac2-glow-pulse 3.8s ease-in-out infinite;
}
.quiz-hero__glow--left { left: -6%; }
.quiz-hero__glow--right { right: -6%; animation-delay: 1.9s; }
/* Centré comme les bandeaux des autres pages. flex: 0 1 auto et non flex: 1 sur le texte :
   étiré sur toute la largeur restante, son contenu se serait centré dans cet espace-là et
   le couple panneau + texte serait resté décalé vers la gauche. */
.quiz-hero__inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 40px; flex-wrap: wrap;
  text-align: center;
}
.quiz-hero__text { flex: 0 1 auto; min-width: 260px; }
.quiz-hero__text h1 { color: #fff; margin: 8px 0 12px; font-size: 2.2rem; }
.quiz-hero__text p { color: rgba(255,255,255,0.82); margin: 0 auto; max-width: 46ch; }
.quiz-sign {
  flex-shrink: 0;
  width: 160px; height: 160px; border-radius: 50%;
  background: #fdfdfb;
  border: 12px solid #d81e2c;
  box-shadow: 0 20px 45px rgba(0,0,0,0.45), inset 0 0 0 3px rgba(0,0,0,0.04);
  display: flex; align-items: center; justify-content: center;
}
.quiz-sign span {
  font-family: var(--font-heading); font-weight: 800; font-size: 3.4rem; line-height: 1;
  color: #14161a;
}
@media (max-width: 640px) {
  .quiz-hero__inner { justify-content: center; text-align: center; }
  .quiz-sign { width: 120px; height: 120px; border-width: 9px; }
  .quiz-sign span { font-size: 2.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  .quiz-hero__stars, .quiz-hero__glow { animation: none; }
}

/* Barre de progression de l'examen blanc (question N / total) */
.quiz-progress__bar {
  height: 10px; border-radius: var(--radius-pill); background: var(--color-bg-alt);
  overflow: hidden;
}
.quiz-progress__fill {
  height: 100%; border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--color-brand-blue), var(--color-accent));
  transition: width 0.3s cubic-bezier(.4,0,.2,1);
}

/* Timer par question de l'examen blanc : passage automatique si le temps s'écoule
   sans réponse (compté comme une erreur), comme dans les conditions du vrai examen. */
.exam-timer { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.exam-timer__track {
  flex: 1; height: 6px; border-radius: var(--radius-pill); background: var(--color-bg-alt); overflow: hidden;
}
.exam-timer__fill {
  height: 100%; width: 100%; border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--color-brand-blue), var(--color-accent));
  transition: width 1s linear, background-color 0.3s cubic-bezier(.4,0,.2,1);
}
.exam-timer__label {
  font-size: 0.85rem; font-weight: 600; color: var(--color-text-muted);
  font-variant-numeric: tabular-nums; min-width: 2.4em; text-align: right;
}
.exam-timer--urgent .exam-timer__fill { background: linear-gradient(90deg, #ef4444, #f97316); }
.exam-timer--urgent .exam-timer__label { color: #ef4444; }
