/* Conduite du Beffroi : feuille de style.
   Couleurs : blanc #FFFFFF, bleu nuit #1F2B3D (texte, en-tête, pied), jaune
   signalisation #F5D000 (bouton d'inscription seulement, texte bleu nuit),
   gris clair #F1F2F4 (tableaux, fonds de bloc), filets bleu nuit à 15 %.
   Police : Public Sans, graisses 400 et 700, fichiers locaux, repli Arial.
   Angles quasi droits (4 px au plus). Fil visuel et mouvement : le marquage au
   sol (route jaune, lignes discontinues, jauge), l'essuie-glace sur la photo
   d'accueil. Tout le mouvement est sous html.js-motion et disparaît avec
   prefers-reduced-motion (voir la fin du fichier et motion.js). */

@font-face {
  font-family: "Public Sans";
  src: url("fonts/public-sans-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Public Sans";
  src: url("fonts/public-sans-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --blanc: #FFFFFF;
  --bleu: #1F2B3D;
  --jaune: #F5D000;
  --gris: #F1F2F4;
  --filet: rgba(31, 43, 61, 0.15);
  --colonne: 1120px;
  --gouttiere: clamp(1rem, 4vw, 2.5rem);
  /* Bornes en px : corps 17 à 18, H1 32 à 44, H2 26 à 32. */
  --section: clamp(72px, 8.5vw, 132px);
  --corps: clamp(17px, 16px + 0.25vw, 18px);
  --h1: clamp(42px, 24px + 4.4vw, 92px);
  --h1-page: clamp(36px, 22px + 3vw, 68px);
  --h2: clamp(32px, 20px + 2.4vw, 60px);
  --h3: 1.25rem;
  --nuit: #172131;
  --bleu-clair: #DDE3EC;
  --jaune-pale: #FFF4BF;
  --filet-fort: rgba(31, 43, 61, 0.28);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --rayon: 4px;
}

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

html {
  background: var(--blanc);
  color: var(--bleu);
  font-family: "Public Sans", Arial, sans-serif;
  font-size: var(--corps);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto;
}

body {
  margin: 0;
  background: var(--blanc);
  color: var(--bleu);
}

/* Les avis entrent depuis les côtés : leur état de départ ne doit pas faire défiler la page. */
main {
  overflow-x: clip;
}

h1,
h2,
h3 {
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1rem;
  overflow-wrap: anywhere;
}

h1 {
  font-size: var(--h1);
}

h2 {
  font-size: var(--h2);
  margin-bottom: 1.5rem;
}

h3 {
  font-size: var(--h3);
  margin-bottom: 0.5rem;
}

p,
ul,
ol,
dl,
blockquote,
table,
address {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.35rem;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

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

strong {
  font-weight: 700;
}

address {
  font-style: normal;
}

figure {
  margin: 0;
}

img,
picture {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0;
}

/* Fondu de 200 ms à l'arrivée des images (script.js pose est-chargee). */
img {
  opacity: 0;
  transition: opacity 200ms;
}

img.est-chargee,
.no-js img {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  img {
    transition: none;
    opacity: 1;
  }
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

[hidden] {
  display: none !important;
}

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

.lien-evitement {
  position: absolute;
  left: -9999px;
  top: auto;
  padding: 0.75rem 1rem;
  background: var(--bleu);
  color: var(--blanc);
  z-index: 100;
}

.lien-evitement:focus {
  left: 1rem;
  top: calc(var(--brnsg-barre, 0px) + 0.5rem);
}

[data-brnsg-horaires] {
  font-size: 0.9375rem;
}

/* Toute cible d'ancre reste sous la barre BRNSG sticky de 36 px. */
[id] {
  scroll-margin-top: calc(var(--brnsg-barre, 0px) + 1rem);
}

/* ----------------------------- Mise en page ------------------------------ */
.colonne {
  width: 100%;
  max-width: calc(var(--colonne) + 2 * var(--gouttiere));
  margin-inline: auto;
  padding-inline: var(--gouttiere);
}

.colonne-etroite {
  max-width: calc(780px + 2 * var(--gouttiere));
}

.section {
  padding-block: var(--section);
  border-top: 1px solid var(--filet);
}

.section-premiere {
  border-top: 0;
  padding-top: clamp(2rem, 4vw, 3rem);
}

.section > .colonne > :last-child,
.section > .colonne > * > :last-child {
  margin-bottom: 0;
}

/* Rappel de fin de page : un bloc gris posé dans la colonne, pas une bande. */
.section-rappel {
  padding-block: clamp(2rem, 4vw, 2.75rem);
}

.rappel {
  background: var(--gris);
  padding: clamp(1.25rem, 3vw, 1.5rem);
}

.rappel > :last-child {
  margin-bottom: 0;
}

.bouton {
  display: inline-block;
  min-height: 44px;
  padding: 12px 20px;
  background: var(--bleu);
  color: var(--blanc);
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  text-align: center;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

.bouton:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* Attente d'envoi : la couleur reste pleine, seul le curseur change (le jaune
   atténué tombait sous le seuil AA). */
.bouton:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.bouton[aria-busy="true"] {
  opacity: 1;
  cursor: wait;
}

/* Le jaune est réservé au bouton d'inscription. */
.bouton-inscription {
  background: var(--jaune);
  color: var(--bleu);
}

/* -------------------------------- En-tête -------------------------------- */
.entete {
  background: var(--bleu);
  color: var(--blanc);
}

.entete a {
  color: var(--blanc);
}

.entete :focus-visible {
  outline-color: var(--blanc);
}

/* Deux rangées : marque et contact en haut, navigation dessous sous un filet. */
.entete-grille {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0 1.5rem;
  padding-block: 0.9rem 0.35rem;
}

.entete-marque {
  grid-column: 1;
  grid-row: 1;
  /* Sans cela le lien occupe toute la colonne de la grille : un clic dans le
     vide de l'en-tête ramènerait à l'accueil. */
  justify-self: start;
  font-weight: 700;
  font-size: 1.25rem;
  text-decoration: none;
  white-space: nowrap;
  padding-block: 0.4rem;
}

.entete-marque:hover {
  text-decoration: underline;
}

.entete-menu {
  display: none;
  min-height: 44px;
  padding: 0.5rem 1rem;
  background: var(--bleu);
  color: var(--blanc);
  border: 1px solid var(--blanc);
  border-radius: 0;
  font-weight: 700;
  cursor: pointer;
}

.entete-nav {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.75rem;
  min-width: 0;
  margin-top: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
}

.entete-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  white-space: nowrap;
}

.entete-nav a:hover,
.entete-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}

.entete-contact {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.entete-tel {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.entete-tel:hover {
  text-decoration: underline;
}

.entete-inscription {
  color: var(--bleu);
}

.entete .entete-inscription {
  color: var(--bleu);
}

@media (max-width: 720px) {
  .entete-grille {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .entete-marque {
    font-size: 1.125rem;
    white-space: normal;
  }

  .js .entete-menu {
    display: inline-block;
    grid-column: 2;
    grid-row: 1;
  }

  .entete-contact {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 0.25rem;
  }

  .entete-nav {
    grid-row: 3;
    flex-direction: column;
    gap: 0;
    margin-top: 0.35rem;
  }

  .entete-nav a {
    width: 100%;
    padding-inline: 0.25rem;
  }

  .js .entete-nav:not(.est-ouverte) {
    display: none;
  }
}

/* --------------------------------- Bandeau ------------------------------- */
.bandeau {
  padding-block: clamp(1rem, 2.5vw, 2rem) var(--section);
}

.bandeau-photo {
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--filet);
}

.bandeau-photo img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}

@media (max-width: 640px) {
  .bandeau-photo img {
    aspect-ratio: 4 / 3;
  }
}

.bandeau h1 {
  margin-bottom: 0.5rem;
}

.bandeau-horaires {
  margin-bottom: 1rem;
}

.acces-rapides {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.75rem;
}

.acces-rapides li {
  margin: 0;
}

.acces-rapides a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* -------------------------------- Résultats ------------------------------ */
.resultats-phrase {
  font-size: 1.125rem;
  font-weight: 700;
  max-width: 40em;
}

/* ------------------------------- Tableaux -------------------------------- */
/* position: relative rend la zone défilante bloc conteneur de ses descendants
   en position absolue (.visuellement-cache des boutons de formule, <caption>) :
   sans cela ils se placent par rapport à la page et la font défiler de 253 px
   à 360 px, alors que le tableau, lui, reste bien dans sa zone. */
.tableau-defilement {
  position: relative;
  overflow-x: auto;
  margin-bottom: 1rem;
  border: 1px solid var(--filet);
  background: var(--blanc);
}

.tableau-defilement:focus-visible {
  outline-offset: 0;
}

.tableau {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

/* Le titre visible est un <p> posé avant la zone défilante : dans le tableau,
   il défilait avec lui et s'affichait coupé sur un écran de 360 px. Le
   <caption> reste en place, masqué visuellement, pour nommer le tableau. */
.tableau-titre {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.tableau th,
.tableau td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--filet);
}

.tableau tr:last-child > th,
.tableau tr:last-child > td {
  border-bottom: 0;
}

.tableau th {
  background: var(--gris);
  font-weight: 700;
}

.tableau thead th {
  border-bottom: 2px solid var(--bleu);
}

.tableau tbody th[scope="row"] {
  position: sticky;
  left: 0;
  z-index: 1;
  border-right: 1px solid var(--filet);
}

.tableau-note {
  font-size: 0.9375rem;
}

/* Formules : trois colonnes égales, aucune mise en avant. */
.formules-table {
  table-layout: fixed;
  min-width: 640px;
}

.formules-table .formules-coin {
  width: 28%;
  background: var(--blanc);
  border-bottom: 2px solid var(--bleu);
}

.formules-table tfoot .formules-coin {
  border-bottom: 0;
}

.formules-table tfoot td {
  padding-top: 1rem;
  padding-bottom: 1rem;
  border-bottom: 0;
}

.formules-table .formules-prix {
  font-weight: 700;
  font-size: 1.125rem;
  white-space: nowrap;
}

.formules-table tfoot .bouton {
  width: 100%;
  padding-inline: 0.5rem;
}

.tableau-divers {
  table-layout: fixed;
}

.tableau-divers th[scope="row"] {
  width: 58%;
}

/* -------------------------------- Planning ------------------------------- */
.planning-periode {
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.planning-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
}

.planning-bouton {
  display: inline-block;
  min-height: 44px;
  padding: 10px 16px;
  background: var(--bleu);
  color: var(--blanc);
  font-weight: 700;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

.planning-bouton:hover {
  text-decoration: underline;
}

.planning-bouton:disabled {
  opacity: 0.45;
  cursor: default;
  text-decoration: none;
}

.planning-table {
  table-layout: fixed;
  min-width: 620px;
}

.planning-table th,
.planning-table td {
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.planning-table thead th:first-child,
.planning-table tbody th {
  text-align: left;
  width: 6.5rem;
}

.planning-table thead th {
  white-space: normal;
  vertical-align: top;
}

.planning-date {
  display: block;
  font-size: 0.9375rem;
  font-weight: 400;
}

.planning-libre {
  font-weight: 700;
}

.planning-complet,
.planning-passe,
.planning-ferme {
  background: var(--gris);
}

.planning-passe,
.planning-ferme {
  font-size: 0.9375rem;
}

.planning-table th.planning-aujourdhui {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.planning-legende {
  font-size: 0.9375rem;
  margin-bottom: 0.5rem;
}

/* ------------------------------ Financement ------------------------------ */
.financement-lignes {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  border-top: 1px solid var(--filet);
}

.financement-lignes li {
  margin: 0;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--filet);
}

/* ------------------------------- Moniteurs ------------------------------- */
.moniteurs-grille {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.moniteur img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid var(--filet);
  margin-bottom: 0.75rem;
}

.moniteur p {
  margin-bottom: 0;
}

/* -------------------------------- Avis ----------------------------------- */
.avis-note {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 1.5rem;
}

.avis-chiffre {
  font-size: var(--h2);
  line-height: 1.1;
}

.avis-extrait {
  margin: 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--filet);
}

.avis-liste .avis-extrait + .avis-extrait {
  margin-top: 1.25rem;
}

.avis-extrait p {
  margin-bottom: 0.75rem;
}

.avis-extrait footer {
  font-size: 0.9375rem;
  margin-bottom: 0.75rem;
}

.avis-extrait cite {
  font-style: normal;
  font-weight: 700;
}

.avis-reponse {
  padding: 0.75rem 1rem;
  background: var(--gris);
  font-size: 0.9375rem;
}

/* -------------------------------- Accès ---------------------------------- */
.acces-grille {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.acces-carte {
  width: 100%;
  border: 1px solid var(--filet);
  background: var(--blanc);
}

/* --------------------------------- FAQ ----------------------------------- */
.faq-item {
  border-top: 1px solid var(--filet);
}

.faq-item:last-of-type {
  border-bottom: 1px solid var(--filet);
}

.faq-item summary {
  padding: 0.85rem 0;
  min-height: 44px;
  font-weight: 700;
  cursor: pointer;
}

.faq-item summary:focus-visible {
  outline-offset: 0;
}

.faq-item p {
  margin: 0;
  padding: 0 0 1rem;
}

/* ------------------------------ Formulaire ------------------------------- */
.formulaire {
  margin-bottom: 1.5rem;
}

.champ {
  margin-bottom: 1.25rem;
  min-width: 0;
}

.champ label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.champ-optionnel {
  font-weight: 400;
}

.champ input,
.champ select,
.champ textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.6rem 0.8rem;
  background: var(--blanc);
  border: 1px solid var(--bleu);
  border-radius: 0;
}

.champ select {
  appearance: auto;
}

.champ input:focus-visible,
.champ select:focus-visible {
  outline: 2px solid var(--bleu);
  outline-offset: 2px;
}

.champ-aide {
  font-size: 0.9375rem;
  margin: 0.35rem 0 0;
}

.champ-erreur {
  font-weight: 700;
  font-size: 0.9375rem;
  margin: 0.35rem 0 0;
}

.formulaire-erreur {
  margin-top: 0.75rem;
}

.champ-piege {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.champ-rangee {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

.champ-groupe {
  border: 1px solid var(--filet);
  padding: 1rem 1rem 0;
  margin: 0 0 1.25rem;
  min-width: 0;
}

.champ-groupe legend {
  font-weight: 700;
  padding: 0 0.5rem;
}

/* Parent : affiché par script.js quand l'âge saisi est inférieur à 18 ans ;
   sans JavaScript, le bloc reste visible et facultatif. */
.js .champ-parent:not(.est-visible) {
  display: none;
}

.consentement {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.consentement input {
  accent-color: var(--bleu);
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.2rem 0 0;
  flex: none;
}

.formulaire-succes {
  padding: 1.25rem;
  border: 1px solid var(--bleu);
  background: var(--blanc);
  margin-bottom: 1.5rem;
}

.formulaire-succes p {
  font-weight: 700;
}

.formulaire-note {
  font-size: 0.9375rem;
}

/* ---------------------------- Pages intérieures -------------------------- */
.page-grille {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 3rem;
  align-items: start;
}

.page-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--filet);
}

.page-prix {
  font-weight: 700;
  font-size: 1.125rem;
}

/* --------------------------- Pages légales et 404 ------------------------ */
.page-legale,
.page-404 {
  max-width: calc(780px + 2 * var(--gouttiere));
  margin-inline: auto;
  padding: clamp(2rem, 4vw, 3rem) var(--gouttiere) var(--section);
}

.page-legale h2 {
  font-size: var(--h3);
  margin: 2rem 0 0.5rem;
}

.page-404 .bouton {
  margin-top: 0.5rem;
}

/* ------------------------------ Pied de page ----------------------------- */
/* Ossature propre à la démo : l'agrément préfectoral ouvre le pied, puis deux
   colonnes (coordonnées, horaires en tableau), la rangée des pages et la
   ligne légale. */
.pied {
  background: var(--bleu);
  color: var(--blanc);
  padding-block: 2.25rem 1.75rem;
}

.pied a {
  color: var(--blanc);
}

.pied :focus-visible {
  outline-color: var(--blanc);
}

.pied-agrement {
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.4);
}

.pied-grille {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 1.75rem 3.5rem;
  font-size: 0.9375rem;
}

.pied-titre {
  font-weight: 700;
  font-size: 1.0625rem;
  margin-bottom: 0.6rem;
}

.pied-colonne p,
.pied-colonne address {
  margin-bottom: 0.5rem;
}

.pied-tel {
  font-size: 1.125rem;
  font-weight: 700;
}

.pied-horaires {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 0.6rem;
}

.pied-horaires th,
.pied-horaires td {
  text-align: left;
  vertical-align: top;
  padding: 0.35rem 1rem 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.pied-horaires tr:last-child th,
.pied-horaires tr:last-child td {
  border-bottom: 0;
}

.pied-horaires th {
  font-weight: 700;
  white-space: nowrap;
}

.pied-pages ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.75rem;
  padding: 0;
  margin: 1.25rem 0 0;
  font-size: 0.9375rem;
}

.pied-pages li {
  margin: 0;
}

.pied-pages a,
.pied-legal a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.pied-legal {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.875rem;
}

.pied-legal p {
  margin: 0;
}

/* ------------------------------- Responsive ------------------------------ */
@media (max-width: 960px) {
  .moniteurs-grille {
    gap: 1.5rem;
  }

  .pied-grille {
    gap: 1.5rem 2rem;
  }

  .page-grille,
  .acces-grille {
    gap: 2rem;
  }
}

@media (max-width: 720px) {
  .moniteurs-grille,
  .pied-grille,
  .page-grille,
  .acces-grille,
  .champ-rangee {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-photo {
    order: -1;
  }

  .moniteur {
    max-width: 420px;
  }

  .planning-nav .planning-bouton {
    flex: 1 1 auto;
  }
}

/* ========================================================================== */
/* Direction artistique 2026 : marquage au sol, nuit de Béthune, jaune balise  */
/* ========================================================================== */

::selection {
  background: var(--jaune);
  color: var(--bleu);
}

html {
  scrollbar-color: var(--bleu) var(--gris);
}

h1,
h2 {
  letter-spacing: -0.025em;
  line-height: 1.04;
  text-wrap: balance;
}

h2 {
  margin-bottom: clamp(1.5rem, 3vw, 2.75rem);
  max-width: 18ch;
}

h3 {
  letter-spacing: -0.01em;
}

p {
  text-wrap: pretty;
}

/* Liens du contenu : soulignement qui se trace. */
main a:not(.bouton):not(.acces-lien) {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size 0.45s var(--ease);
  padding-bottom: 1px;
}

main a:not(.bouton):not(.acces-lien):hover {
  background-size: 0% 1px;
  background-position: 100% 100%;
}

/* ------------------------------- Boutons --------------------------------- */
.bouton {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--rayon);
  padding: 14px 24px;
  transition: color 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.bouton::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--jaune);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.5s var(--ease);
}

.bouton:hover {
  text-decoration: none;
  color: var(--bleu);
}

.bouton:hover::before {
  transform: scaleX(1);
  transform-origin: left center;
}

.bouton-inscription::before {
  background: var(--blanc);
}

.bouton-inscription:hover {
  box-shadow: 0 10px 30px -12px rgba(245, 208, 0, 0.7);
}

.bouton:disabled::before,
.bouton[aria-busy="true"]::before {
  display: none;
}

.entete .entete-inscription:hover {
  color: var(--bleu);
}

.planning-bouton {
  border-radius: var(--rayon);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.planning-bouton:not(:disabled):hover {
  background: var(--jaune);
  color: var(--bleu);
  text-decoration: none;
}

/* -------------------------------- En-tête -------------------------------- */
.entete {
  view-transition-name: entete;
}

.entete-nav a {
  position: relative;
}

.entete-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 3px;
  background: var(--jaune);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform 0.45s var(--ease);
}

.entete-nav a:hover,
.entete-nav a[aria-current="page"] {
  text-decoration: none;
}

.entete-nav a:hover::after,
.entete-nav a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left center;
}

.entete-tel {
  transition: color 0.3s var(--ease);
}

.entete-tel:hover {
  color: var(--jaune);
  text-decoration: none;
}

/* Barre de lecture : un trait jaune sous la barre BRNSG. */
.progression {
  position: fixed;
  top: var(--brnsg-barre, 0px);
  left: 0;
  right: 0;
  height: 3px;
  z-index: 60;
  background: var(--jaune);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

/* --------------------------------- Bandeau ------------------------------- */
.bandeau {
  position: relative;
  background: var(--bleu);
  color: var(--blanc);
  padding-block: clamp(0.5rem, 1.5vw, 1.25rem) 0;
  overflow: hidden;
}

.bandeau :focus-visible,
.section-tete :focus-visible {
  outline-color: var(--jaune);
}

.bandeau-photo {
  position: relative;
  margin: 0;
  border: 0;
  border-radius: var(--rayon);
  overflow: hidden;
  background: var(--nuit);
}

.bandeau-photo img {
  aspect-ratio: 27 / 10;
  transform-origin: 50% 60%;
}

.bandeau-texte {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1.25rem 3rem;
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
}

.bandeau h1 {
  grid-column: 1 / -1;
  color: var(--blanc);
  font-size: clamp(42px, 22px + 4.4vw, 84px);
  line-height: 1;
  margin: 0;
  max-width: none;
}

.bandeau-texte .bandeau-horaires {
  justify-self: start;
  margin: 0;
}

.bandeau-texte .acces-rapides {
  justify-self: end;
}

.bandeau-horaires {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: clamp(1.25rem, 2.4vw, 2rem);
  padding: 0.5rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--rayon);
  color: var(--bleu-clair);
}

.feu {
  position: relative;
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #8A96A8;
}

.feu.est-ouvert {
  background: #3CCB7F;
}

.feu.est-ferme {
  background: #FF7A66;
}

.feu.est-ouvert::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #3CCB7F;
  opacity: 0;
}

.acces-rapides {
  align-items: center;
  gap: 0.75rem 2rem;
}

.acces-rapides .bouton {
  padding-inline: 28px;
  font-size: 1.0625rem;
}

.acces-lien {
  position: relative;
  color: var(--blanc);
  text-decoration: none;
  font-weight: 700;
}

.acces-lien::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 2px;
  background: var(--jaune);
  transform-origin: left center;
  transition: transform 0.45s var(--ease);
}

.acces-lien:hover::after {
  transform: scaleX(0);
  transform-origin: right center;
}

.acces-lien:hover {
  color: var(--jaune);
}

@media (max-width: 960px) {
  .bandeau-texte {
    grid-template-columns: minmax(0, 1fr);
  }

  .bandeau-texte .acces-rapides {
    justify-self: start;
  }
}

/* Le marquage au sol : bande jaune discontinue, elle défile au scroll (motion.js). */
.route {
  height: 8px;
  margin-top: clamp(2.5rem, 6vw, 5rem);
  background: repeating-linear-gradient(90deg, var(--jaune) 0 56px, transparent 56px 104px);
  background-position: 0 0;
}

@media (max-width: 640px) {
  .bandeau-photo img {
    aspect-ratio: 4 / 3;
  }

  .bandeau-texte {
    grid-template-columns: minmax(0, 1fr);
  }

  .bandeau-texte .acces-rapides {
    justify-self: stretch;
  }

  .acces-rapides {
    gap: 0.25rem 1.5rem;
  }

  .acces-rapides li:first-child {
    flex: 1 1 100%;
  }

  .acces-rapides .bouton {
    width: 100%;
  }
}

/* ------------------------- Séparateurs de section ------------------------ */
.section {
  position: relative;
  border-top: 0;
}

.section + .section::before,
.bandeau + .section::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gouttiere);
  right: var(--gouttiere);
  max-width: var(--colonne);
  margin-inline: auto;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--filet-fort) 0 28px, transparent 28px 48px);
  transform-origin: left center;
}

.section-resultats::before,
.section-resultats + .section::before,
.section-tete + .section::before,
.section-rappel::before,
.bandeau + .section::before {
  display: none;
}

/* ------------------------------ Résultats ------------------------------ */
.section-resultats {
  background: var(--gris);
}

.chiffres {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 3.5vw, 3.5rem);
  align-items: end;
}

.chiffre {
  padding-top: 1.25rem;
  border-top: 2px solid var(--bleu);
}

.chiffre p {
  margin: 0;
}

.chiffre-valeur {
  font-size: clamp(56px, 30px + 4vw, 104px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chiffre-principal .chiffre-valeur {
  font-size: clamp(96px, 40px + 10vw, 220px);
  letter-spacing: -0.06em;
  line-height: 0.85;
}

.chiffre-libelle {
  margin-top: 0.75rem !important;
  max-width: 24ch;
  font-size: 1.0625rem;
}

.jauge {
  position: relative;
  height: 18px;
  margin-top: 1.5rem;
  background: var(--bleu);
  border-radius: 2px;
  overflow: hidden;
}

.jauge::after {
  /* Ligne médiane discontinue, comme sur la chaussée. */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 8px;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.55) 0 18px, transparent 18px 32px);
}

.jauge-remplie {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--p, 0%);
  background: var(--jaune);
  transform-origin: left center;
  z-index: 1;
}

.resultats-source {
  margin: clamp(1.5rem, 3vw, 2.5rem) 0 0;
  font-size: 0.9375rem;
  color: #4A5568;
  max-width: 60ch;
}

@media (max-width: 860px) {
  .chiffres {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .chiffre-principal {
    grid-column: 1 / -1;
  }
}

@media (max-width: 420px) {
  .chiffres {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------- Formules ------------------------------- */
.tableau-defilement {
  border-radius: var(--rayon);
}

.formules-table thead th {
  background: var(--bleu);
  color: var(--blanc);
  font-size: 1.0625rem;
  padding-block: 1.1rem;
}

.formules-table thead .formules-coin {
  background: var(--blanc);
}

.formules-table tbody tr {
  transition: background-color 0.3s var(--ease);
}

.formules-table tbody tr:hover td {
  background: var(--jaune-pale);
}

.formules-table .formules-prix {
  font-size: clamp(1.5rem, 1rem + 1vw, 2rem);
  letter-spacing: -0.02em;
}

/* ---------------------------- Financement ------------------------------ */
.financement-cartes {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1rem, 2vw, 1.5rem);
}

.carte {
  position: relative;
  margin: 0;
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  background: var(--gris);
  border-radius: var(--rayon);
  overflow: hidden;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.carte::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--bleu);
}

.carte::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--jaune);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.6s var(--ease);
}

.carte:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 40px -28px rgba(31, 43, 61, 0.45);
}

.carte:hover::after {
  transform: scaleX(1);
}

.carte h3 {
  font-size: clamp(1.3rem, 1rem + 0.8vw, 1.65rem);
  line-height: 1.15;
  margin-bottom: 0.85rem;
}

.carte p {
  margin: 0;
}

.carte:first-child {
  background: var(--bleu);
  color: var(--blanc);
}

.carte:first-child::before {
  background: var(--jaune);
}

.carte:first-child h3 {
  color: var(--jaune);
}

@media (max-width: 860px) {
  .financement-cartes {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ------------------------------- Moniteurs ------------------------------- */
.moniteurs-grille {
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
}

.moniteur-photo {
  position: relative;
  margin-bottom: 1rem;
  overflow: hidden;
  border-radius: var(--rayon);
  background: var(--gris);
}

.moniteur img {
  border: 0;
  margin: 0;
  transition: transform 0.9s var(--ease);
}

.moniteur:hover img {
  transform: scale(1.05);
}

.moniteur h3 {
  font-size: clamp(1.4rem, 1rem + 1vw, 1.9rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

@media (min-width: 721px) {
  .moniteur:nth-child(2) {
    margin-top: clamp(2rem, 6vw, 5rem);
  }

  .moniteur:nth-child(3) {
    margin-top: clamp(1rem, 3vw, 2.5rem);
  }
}

/* -------------------------------- Planning ------------------------------- */
.planning-table td.planning-libre {
  background: var(--jaune-pale);
}

.planning-table thead th {
  background: var(--bleu);
  color: var(--blanc);
}

.planning-table th.planning-aujourdhui {
  text-decoration: none;
  box-shadow: inset 0 -4px 0 var(--jaune);
}

/* --------------------------------- Avis ---------------------------------- */
.avis-grille {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.avis-note {
  position: sticky;
  top: calc(var(--brnsg-barre, 0px) + 2rem);
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
}

.avis-chiffre {
  font-size: clamp(56px, 30px + 4.5vw, 112px);
  letter-spacing: -0.05em;
  line-height: 0.9;
  font-variant-numeric: tabular-nums;
}

.avis-extrait {
  padding: clamp(1.25rem, 2.5vw, 2rem);
  border-top: 0;
  background: var(--gris);
  border-radius: var(--rayon);
  border-left: 4px solid var(--bleu);
}

.avis-extrait p:first-child {
  font-size: 1.0625rem;
}

.avis-reponse {
  background: var(--blanc);
}

@media (max-width: 860px) {
  .avis-grille {
    grid-template-columns: minmax(0, 1fr);
  }

  .avis-note {
    position: static;
  }
}

/* ---------------------------------- FAQ ---------------------------------- */
.faq-item summary {
  list-style: none;
  position: relative;
  padding-right: 2.5rem;
  transition: color 0.3s var(--ease);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "";
  position: absolute;
  right: 0.25rem;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  background:
    linear-gradient(var(--bleu), var(--bleu)) center / 14px 2px no-repeat,
    linear-gradient(var(--bleu), var(--bleu)) center / 2px 14px no-repeat;
  transition: transform 0.45s var(--ease);
}

.faq-item[open] summary::after {
  transform: rotate(135deg);
}

/* ------------------------------ Formulaire ------------------------------ */
.champ input,
.champ select,
.champ textarea {
  border-radius: var(--rayon);
  border-color: var(--filet-fort);
  background: var(--blanc);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.champ input:hover,
.champ select:hover {
  border-color: var(--bleu);
}

.champ input:focus-visible,
.champ select:focus-visible {
  outline: 0;
  border-color: var(--bleu);
  box-shadow: 0 0 0 4px var(--jaune);
}

.champ-groupe {
  border-radius: var(--rayon);
}

/* ----------------------------- Rappel final ----------------------------- */
.rappel {
  background: var(--bleu);
  color: var(--blanc);
  border-radius: var(--rayon);
  padding: clamp(1.75rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
}

.rappel::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: repeating-linear-gradient(90deg, var(--jaune) 0 40px, transparent 40px 76px);
}

.rappel a:not(.bouton) {
  color: var(--blanc);
}

.rappel :focus-visible {
  outline-color: var(--jaune);
}

/* Puces de liste : un tiret de marquage au sol. */
main .section ul:not([class]) {
  list-style: none;
  padding-left: 0;
}

main .section ul:not([class]) > li {
  position: relative;
  padding-left: 1.75rem;
}

main .section ul:not([class]) > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 14px;
  height: 4px;
  border-radius: 1px;
  background: var(--jaune);
  box-shadow: 0 0 0 1px rgba(31, 43, 61, 0.35);
}

/* --------------------------- Pages intérieures --------------------------- */
.section-tete {
  background: var(--bleu);
  color: var(--blanc);
  padding-block: clamp(2.5rem, 6vw, 5.5rem) clamp(3.5rem, 7vw, 6.5rem);
}

.section-tete {
  position: relative;
}

.section-tete::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--jaune) 0 56px, transparent 56px 104px);
}

.section-tete h1 {
  font-size: var(--h1-page);
  line-height: 1.02;
  color: var(--blanc);
  margin-bottom: clamp(1rem, 2vw, 1.75rem);
}

.section-tete p,
.section-tete li {
  color: var(--bleu-clair);
}

.section-tete a:not(.bouton) {
  color: var(--blanc);
}

.section-tete .page-prix {
  color: var(--jaune);
  font-size: clamp(1.15rem, 1rem + 0.5vw, 1.4rem);
}

.section-tete .financement-lignes,
.section-tete .financement-lignes li {
  border-color: rgba(255, 255, 255, 0.2);
}

.section-tete strong {
  color: var(--blanc);
}

.page-photo {
  position: relative;
  border-radius: var(--rayon);
  overflow: hidden;
  background: var(--nuit);
}

.page-photo img {
  border: 0;
}

.page-grille {
  align-items: center;
}

/* ------------------------------- Pied ------------------------------------ */
.pied {
  padding-top: clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}

.pied-marque {
  margin: clamp(2rem, 5vw, 3.5rem) 0 0.5rem;
  font-size: clamp(36px, 7.4vw, 104px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.045em;
  color: #34445E;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .pied-marque {
    white-space: normal;
  }
}

.pied a:not(.pied-tel) {
  transition: color 0.3s var(--ease);
}

.pied a:hover {
  color: var(--jaune);
}

/* ================================ Mouvement ================================ */
/* Transitions de page (navigateurs compatibles) : fondu court, en-tête fixe. */
@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-old(root) {
    animation: 0.28s var(--ease) both vt-sortie;
  }

  ::view-transition-new(root) {
    animation: 0.5s var(--ease) both vt-entree;
  }
}

@keyframes vt-sortie {
  to { opacity: 0; transform: translateY(-12px); }
}

@keyframes vt-entree {
  from { opacity: 0; transform: translateY(24px); }
}

/* Mots du H1 : chaque mot monte dans son masque. Sans js-motion, rien ne bouge. */
.mot {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding: 0.12em 0.02em 0.1em;
  margin: -0.12em -0.02em -0.1em;
}

.mot-i {
  display: inline-block;
}

@property --essuie {
  syntax: "<angle>";
  inherits: false;
  initial-value: 180deg;
}

.js-motion .mot-i {
  animation: mot-monte 1.05s var(--ease) both;
  animation-delay: calc(0.45s + var(--i, 0) * 0.07s);
}

@keyframes mot-monte {
  from { transform: translateY(150%) rotate(2deg); }
  to { transform: none; }
}

/* L'essuie-glace : la photo se dévoile d'un balayage depuis le bas, un balai le suit. */
.js-motion .essuie picture {
  display: block;
  -webkit-mask-image: conic-gradient(from -90deg at 50% 100%, #000 var(--essuie), transparent calc(var(--essuie) + 0.5deg));
  mask-image: conic-gradient(from -90deg at 50% 100%, #000 var(--essuie), transparent calc(var(--essuie) + 0.5deg));
  animation: essuie 1.35s cubic-bezier(0.65, 0, 0.35, 1) 0.1s both;
}

.js-motion .essuie::after {
  content: "";
  position: absolute;
  left: calc(50% - 3px);
  bottom: 0;
  width: 6px;
  height: 170%;
  z-index: 2;
  border-radius: 3px;
  background: linear-gradient(to top, #0D131D 0 12%, #1B2433 12% 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 6px 0 18px rgba(0, 0, 0, 0.35);
  transform-origin: 50% 100%;
  pointer-events: none;
  animation: balai 1.35s cubic-bezier(0.65, 0, 0.35, 1) 0.1s both;
}

@keyframes essuie {
  from { --essuie: 0deg; }
  to { --essuie: 180deg; }
}

@keyframes balai {
  0% { transform: rotate(-90deg); opacity: 1; }
  88% { opacity: 1; }
  100% { transform: rotate(90deg); opacity: 0; }
}

.js-motion .bandeau-horaires,
.js-motion .acces-rapides > li,
.js-motion .section-tete .page-texte > :not(h1) {
  animation: monte-fondu 0.9s var(--ease) both;
}

.js-motion .bandeau-horaires { animation-delay: 0.95s; }
.js-motion .acces-rapides > li:nth-child(1) { animation-delay: 1.05s; }
.js-motion .acces-rapides > li:nth-child(2) { animation-delay: 1.13s; }
.js-motion .acces-rapides > li:nth-child(3) { animation-delay: 1.21s; }
.js-motion .section-tete .page-texte > :nth-child(2) { animation-delay: 0.75s; }
.js-motion .section-tete .page-texte > :nth-child(3) { animation-delay: 0.85s; }
.js-motion .section-tete .page-texte > :nth-child(4) { animation-delay: 0.95s; }
.js-motion .section-tete .page-texte > :nth-child(n + 5) { animation-delay: 1.05s; }

.js-motion .route {
  animation: route-entree 1.2s var(--ease) 1.1s both;
}

@keyframes route-entree {
  from { transform: translateX(-30%); opacity: 0; }
}

@keyframes monte-fondu {
  from { opacity: 0; transform: translateY(24px); }
}

.js-motion .feu.est-ouvert::after {
  animation: feu-pulse 2.2s ease-out infinite;
}

@keyframes feu-pulse {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.9); opacity: 0; }
}

/* Séparateurs et barre de lecture liés au défilement (CSS seul, si pris en charge). */
@supports (animation-timeline: view()) {
  .js-motion .section + .section::before {
    animation: trace linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 80%;
  }

  .js-motion .progression {
    animation: trace linear both;
    animation-timeline: scroll(root);
  }
}

@keyframes trace {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* FAQ : ouverture en douceur (navigateurs compatibles). */
@supports selector(::details-content) {
  .js-motion {
    interpolate-size: allow-keywords;
  }

  .js-motion .faq-item::details-content {
    block-size: 0;
    overflow: hidden;
    transition: block-size 0.45s var(--ease), content-visibility 0.45s allow-discrete;
  }

  .js-motion .faq-item[open]::details-content {
    block-size: auto;
  }
}

/* Réduction des animations : aucun mouvement, aucune transition, tout est visible. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .progression {
    display: none;
  }

  @view-transition {
    navigation: none;
  }
}
