/* ==========================================================================
   Étude de Maître Mamadou Ndiaye — Notaire à Kaolack
   Feuille de styles unique, mobile d'abord.

   Règles de composition :
   - une seule grille de 12 colonnes (.grille), pour toutes les sections ;
   - espacements pris uniquement dans l'échelle 8, 16, 24, 48, 96, 160 px ;
   - deux familles humanistes, toujours droites : EB Garamond (titres, bouton)
     et Source Sans 3 (texte) ;
   - aucun italique, aucun texte sous 16 px (sauf la ligne de droits, 14 px).
   ========================================================================== */

/* ---------- Polices (sous-ensemble latin, hébergées sur le site) ---------- */
/* Un seul fichier pour les titres : la graisse 500 répond aussi aux demandes en 600,
   sans graisse simulée par le navigateur. */
@font-face {
  font-family: "EB Garamond";
  src: url("/assets/fonts/eb-garamond-latin-500-normal.woff2") format("woff2");
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Jetons ---------- */
:root {
  /* Couleurs du projet */
  --ivoire: #f4ede1;
  --sable: #eae0ce;
  --sel: #fbf8f2;
  --baobab: #14201a;
  --baobab-2: #1f2e25;
  --cuivre: #a8692f;        /* mots en valeur dans les grands titres */
  --cuivre-fonce: #8a5424;  /* liens et bouton sur fond clair */
  --cuivre-clair: #d49a5a;  /* accent et bouton sur fond sombre */
  --terre: #2b1d14;
  --terre-2: #5e4a3a;
  --attenue: #8a7f74;       /* mots pas encore lus de l'affirmation : contraste 3,4:1, lisible en grand corps */
  --ligne: rgba(43, 29, 20, 0.16);
  --ligne-forte: rgba(43, 29, 20, 0.34);
  --ivoire-2: rgba(244, 237, 225, 0.78);
  --ligne-claire: rgba(244, 237, 225, 0.2);
  --erreur: #9b2c1c;

  --titre: "EB Garamond", Garamond, Georgia, serif;
  --texte: "Source Sans 3", "Segoe UI", Arial, sans-serif;

  /* Échelle d'espacement : aucune autre valeur n'est utilisée. */
  --e1: 8px;
  --e2: 16px;
  --e3: 24px;
  --e4: 48px;
  --e5: 96px;
  --e6: 160px;

  --marge: var(--e3);          /* marges latérales */
  --gouttiere: var(--e2);      /* espace entre colonnes */
  --section: var(--e4);        /* respiration verticale des sections */
  --entete: 72px;
  --largeur-max: 1632px;       /* au-delà, la grille reste centrée */

  /* Tailles de texte */
  --t-texte: 18px;
  --t-h1: clamp(48px, 7vw, 104px);
  --t-h2: clamp(40px, 3.5vw + 18px, 68px);
  --t-affirmation: clamp(48px, 4.7vw, 72px);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}
@media (min-width: 768px) {
  :root { --marge: var(--e4); --gouttiere: var(--e3); }
}
@media (min-width: 1024px) {
  :root { --section: var(--e5); --entete: 96px; --t-texte: 19px; }
}
@media (min-width: 1280px) {
  :root { --marge: var(--e5); }
}

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

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--entete) + var(--e3));
}

body {
  margin: 0;
  background: var(--ivoire);
  color: var(--terre);
  font-family: var(--texte);
  font-size: var(--t-texte);
  line-height: 1.65;
  font-weight: 400;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--titre);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.005em;
  text-wrap: balance;
  font-variant-numeric: lining-nums;
}

p { margin: 0 0 var(--e2); max-width: 62ch; }
p:last-child { margin-bottom: 0; }

a { color: inherit; }

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

:focus-visible {
  outline: 2px solid var(--cuivre-fonce);
  outline-offset: 4px;
}
.sombre :focus-visible, .entete :focus-visible, .hero :focus-visible, .menu :focus-visible {
  outline-color: var(--cuivre-clair);
}

::selection { background: var(--cuivre-clair); color: var(--baobab); }

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

.lien-evitement {
  position: fixed;
  top: var(--e1); left: var(--e1);
  z-index: 200;
  padding: var(--e2) var(--e3);
  background: var(--baobab);
  color: var(--ivoire);
  font-size: 16px;
  transform: translateY(-200%);
}
.lien-evitement:focus { transform: none; }

.sombre { background: var(--baobab); color: var(--ivoire); }

/* Mot mis en valeur dans un titre : couleur seulement. */
.accent { color: var(--cuivre); }
.sombre .accent, .entete .accent, .hero .accent, .menu .accent { color: var(--cuivre-clair); }

/* Marqueur visible des informations à fournir */
.a-completer {
  padding: 0 0.3em;
  border: 1px dashed currentColor;
  font-family: var(--texte);
  font-weight: 400;
  font-size: 1em;
  color: var(--cuivre-fonce);
}
.sombre .a-completer { color: var(--cuivre-clair); }

/* ---------- Grille unique de 12 colonnes ---------- */
.grille {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gouttiere);
  width: 100%;
  max-width: var(--largeur-max);
  margin-inline: auto;
  padding-inline: var(--marge);
}
.grille > * { grid-column: 1 / -1; }

/* ---------- Typographie commune ---------- */
.titre { font-size: var(--t-h2); }

.chapeau { font-size: 18px; color: var(--terre-2); }
@media (min-width: 1024px) { .chapeau { font-size: 20px; } }

/* Repère de section : Source Sans 3 demi-gras, casse normale. */
.repere {
  font-weight: 600;
  font-size: 18px;
  color: var(--cuivre-fonce);
}

/* ---------- Bouton : modèle unique pour l'action principale ---------- */
.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: var(--e2) var(--e3);
  border: 1px solid transparent;
  background: var(--cuivre-fonce);
  color: var(--sel);
  font-family: var(--titre);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 300ms var(--ease), color 300ms var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.bouton:hover { background: var(--terre); }
.sombre .bouton, .entete .bouton, .hero .bouton { background: var(--cuivre-clair); color: var(--baobab); }
.sombre .bouton:hover, .entete .bouton:hover, .hero .bouton:hover { background: var(--ivoire); }
.bouton.is-envoi { pointer-events: none; opacity: 0.6; }

/* ---------- Lien textuel (actions secondaires) ---------- */
.lien {
  padding: 0;
  border: 0;
  background: none;
  color: var(--cuivre-fonce);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  cursor: pointer;
  transition: color 300ms var(--ease);
}
.lien:hover { color: var(--terre); text-decoration-thickness: 2px; }
/* Ordinateur : liens sans soulignement, qui n'apparaît qu'au survol ou au focus clavier
   (la couleur suffit à les distinguer du texte). */
@media (min-width: 1024px) {
  .lien { text-decoration: none; }
  .lien:hover, .lien:focus-visible { text-decoration: underline; text-decoration-thickness: 1px; }
}
.sombre .lien, .menu .lien { color: var(--ivoire); }
.sombre .lien:hover { color: var(--cuivre-clair); }
button.lien { display: inline-flex; align-items: center; min-height: 48px; font-weight: 600; }

/* ---------- Logo ---------- */
.logo {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 48px;
  text-decoration: none;
  line-height: 1.2;
}
.logo__nom {
  font-family: var(--titre);
  font-weight: 600;
  font-size: 23px;
  white-space: nowrap;
}
.logo__sous { font-size: 16px; color: var(--ivoire-2); }
@media (min-width: 1024px) { .logo__nom { font-size: 28px; } }

/* ---------- En-tête ---------- */
.entete {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  color: var(--ivoire);
  transition: background-color 400ms var(--ease);
}
.entete.is-plein { background: var(--baobab); }

/* Mobile : barre sans fond, seulement un léger flou. Le menu et « Office Notarial »
   passent en vert foncé au-dessus des sections claires pour rester lisibles (voir main.js). */
@media (max-width: 1023px) {
  .entete, .entete.is-plein {
    background: transparent;
    border-bottom: 0;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    transition: color 400ms var(--ease);
  }
  .entete.sur-clair { color: var(--baobab); }
  .entete.sur-clair :focus-visible { outline-color: var(--cuivre-fonce); }
}

/* Mobile : trois colonnes égales sur les côtés, le rendez-vous reste au centre exact. */
.entete__in {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: var(--e2);
  height: var(--entete);
  max-width: var(--largeur-max);
  margin-inline: auto;
  padding-inline: var(--marge);
}
.entete__in > .logo, .nav { display: none; }
/* Sur mobile, le rendez-vous passe par le bouton de l'ouverture et par le menu. */
.entete__bouton { display: none; }

/* Mobile : « Office / Notarial » à droite, même hauteur et même couleur que le bouton du menu. */
.entete__marque {
  grid-column: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-height: 48px;
  font-family: var(--titre);
  font-weight: 500;
  font-size: 18px;
  line-height: 1.05;
  text-align: right;
  text-decoration: none;
}

/* Bouton du menu : trois traits */
.bouton-menu {
  position: relative;
  width: 48px;
  height: 48px;
  margin-left: calc(-1 * var(--e1));
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}
.bouton-menu__trait, .bouton-menu__trait::before, .bouton-menu__trait::after {
  position: absolute;
  left: 12px;
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}
.bouton-menu__trait { top: 23px; }
.bouton-menu__trait::before, .bouton-menu__trait::after { content: ""; left: 0; }
.bouton-menu__trait::before { top: -8px; }
.bouton-menu__trait::after { top: 8px; width: 16px; }

@media (min-width: 1024px) {
  .entete__in { display: flex; justify-content: space-between; gap: var(--e4); }
  .bouton-menu, .menu, .voile-menu, .entete__marque { display: none !important; }
  .entete__in > .logo { display: inline-flex; margin-right: auto; }
  .entete__bouton { display: inline-flex; padding-block: var(--e2); }
  .nav { display: flex; align-items: center; }
  .nav ul { display: flex; gap: var(--e3); margin: 0; padding: 0; list-style: none; }
  .nav ul a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    background: linear-gradient(currentColor, currentColor) no-repeat left calc(50% + 14px) / 0 1px;
    transition: background-size 300ms var(--ease);
  }
  .nav ul a:hover, .nav ul a:focus-visible { background-size: 100% 1px; }
}

/* Menu mobile : tiroir qui glisse de la gauche vers la droite, sur un voile qui assombrit la page. */
.voile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(20, 32, 26, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 500ms var(--ease), visibility 0s linear 500ms;
}
.menu {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 61;
  display: flex;
  flex-direction: column;
  width: min(86vw, 360px);
  padding: 0 var(--e3) calc(var(--e4) + env(safe-area-inset-bottom));
  background: var(--baobab);
  color: var(--ivoire);
  overflow-y: auto;
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform 500ms var(--ease), visibility 0s linear 500ms;
}
.menu-ouvert .voile-menu { opacity: 1; visibility: visible; transition: opacity 500ms var(--ease); }
.menu-ouvert .menu { transform: none; visibility: visible; transition: transform 500ms var(--ease); }
.menu-ouvert, .menu-ouvert body { overflow: hidden; }

.menu__haut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--e2);
  min-height: var(--entete);
  margin-bottom: var(--e3);
  border-bottom: 1px solid var(--ligne-claire);
}
.menu__haut .logo { margin: 0; }
.menu__fermer {
  position: relative;
  flex: none;
  width: 48px;
  height: 48px;
  margin-right: calc(-1 * var(--e1));
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
.menu__fermer span::before, .menu__fermer span::after {
  content: "";
  position: absolute;
  top: 23px;
  left: 12px;
  width: 24px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}
.menu__fermer span::before { transform: rotate(45deg); }
.menu__fermer span::after { transform: rotate(-45deg); }
.menu ul { margin: 0; padding: 0; list-style: none; }
.menu li + li { border-top: 1px solid var(--ligne-claire); }
.menu ul a {
  display: flex;
  align-items: center;
  min-height: 56px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: color 300ms var(--ease);
}
.menu ul a:hover { color: var(--cuivre-clair); }
.menu .menu__rdv { color: var(--cuivre-clair); }
.menu__contact { margin-top: auto; padding-top: var(--e4); }

/* ---------- Ouverture ----------
   Mobile et tablette : photo en plein écran, texte posé dessus sur un voile.
   Grand écran : la photo commence sous l'en-tête et se cadre par le haut, pour que l'enseigne
   « Office notarial » soit entièrement visible ; le voile se limite au bas, sous le texte. */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--ivoire);
  background: var(--baobab);
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 32, 26, 0.35) 0%, rgba(20, 32, 26, 0.15) 30%, rgba(20, 32, 26, 0.85) 100%);
}
.hero__contenu {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--entete) + var(--e5));
  padding-bottom: var(--e4);
}
.titre-hero { font-size: var(--t-h1); }
.titre-hero .accent { display: block; }
@media (max-width: 1023px) { .hero__action { text-align: center; max-width: none; } }
.hero__chapeau { margin: var(--e3) 0 var(--e4); font-size: 18px; color: var(--ivoire-2); }
@media (min-width: 1024px) {
  /* Hauteur minimale : l'enseigne (environ 20 % de la largeur sous l'en-tête) plus le texte. */
  .hero { min-height: max(100svh, calc(var(--entete) + 21vw + 480px)); }
  .hero__media { inset: var(--entete) 0 0 0; }
  .hero::after {
    inset: var(--entete) 0 0 0;
    background: linear-gradient(180deg, rgba(20, 32, 26, 0) 38%, rgba(20, 32, 26, 0.72) 58%, rgba(20, 32, 26, 0.92) 100%);
  }
  .hero__contenu { padding-top: 0; }
  .hero__contenu > * { grid-column: 1 / span 8; }
  .hero__chapeau { grid-column: 1 / span 6; font-size: 20px; }
}

/* ---------- Introduction ---------- */
.intro { padding-bottom: var(--section); }

/* Affirmation : révélée mot après mot au défilement (voir main.js). */
.affirmation {
  margin: 0;
  max-width: none;
  padding-block: var(--e4);
  font-family: var(--titre);
  font-weight: 600;
  font-size: var(--t-affirmation);
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.affirmation .mot { color: var(--attenue); transition: color 1200ms var(--ease); }
.affirmation .mot.is-lu { color: var(--terre); }
/* Mobile : phrase posée comme une citation, centrée et à taille de lecture. */
@media (max-width: 767px) {
  .affirmation { font-size: 30px; line-height: 1.3; text-align: center; text-wrap: balance; }
}
@media (min-width: 768px) { .affirmation { grid-column: 2 / span 10; } }
@media (min-width: 1024px) { .affirmation { grid-column: 3 / span 8; } }

/* Photos de l'étude : traitement doux et commun (coins arrondis, ombre diffuse,
   teinte légèrement réchauffée, apparition en fondu). */
.photo {
  overflow: hidden;
  border-radius: var(--e1);
  background: var(--sable);
  box-shadow: 0 16px 32px -16px rgba(43, 29, 20, 0.3);
}
@media (min-width: 768px) {
  .photo { border-radius: var(--e2); box-shadow: 0 32px 64px -32px rgba(43, 29, 20, 0.35); }
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.88) sepia(0.08) brightness(1.03);
}
.js .photo img { opacity: 0; transform: scale(1.06); transition: opacity 1400ms var(--ease), transform 2000ms var(--ease); }
.js .photo.is-in img { opacity: 1; transform: none; }

/* Vitrine : les trois photos de l'étude juste sous la bannière, toujours entières
   (format paysage 4:3 d'origine, sans recadrage). Une grande photo change en fondu
   (voir main.js) ; les trois restent visibles en vignettes.
   Mobile : grande photo en pleine largeur, vignettes alignées dessous. */
.vitrine { padding-top: var(--section); row-gap: var(--e2); }
.vitrine__scene { position: relative; aspect-ratio: 4 / 3; }
.vitrine__vue {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 1400ms var(--ease), transform 2400ms var(--ease);
}
.vitrine__vue.est-active { opacity: 1; transform: none; }
.vitrine__vignettes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--e2); }
.vitrine__vignette {
  display: block;
  padding: 0;
  border: 0;
  border-radius: var(--e1);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--sable);
  cursor: pointer;
  opacity: 0.55;
  box-shadow: 0 0 0 1px var(--ligne);
  transition: opacity 600ms var(--ease), box-shadow 600ms var(--ease);
}
.vitrine__vignette:hover { opacity: 0.85; }
.vitrine__vignette[aria-pressed="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--ivoire), 0 0 0 4px var(--cuivre); }
.vitrine__vignette { position: relative; }
.vitrine__vignette picture, .vitrine__vignette img { display: block; width: 100%; height: 100%; }
/* Trait de progression sous la vignette affichée : se remplit en 4 secondes,
   le temps que la photo suivante arrive (même durée que dans main.js). */
.vitrine__vignette::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--cuivre-clair);
  transform: scaleX(0);
  transform-origin: left;
}
.vitrine.est-en-cours .vitrine__vignette[aria-pressed="true"]::after { animation: vitrine-progression 4000ms linear forwards; }
@keyframes vitrine-progression { to { transform: scaleX(1); } }
.vitrine__vignette img { object-fit: cover; filter: saturate(0.88) sepia(0.08) brightness(1.03); }
/* Ordinateur : grande photo sur 9 colonnes, vignettes empilées sur les 3 dernières,
   alignées en haut et en bas de la grande photo. */
@media (min-width: 768px) {
  .vitrine { padding-bottom: var(--e4); }
  .vitrine__scene { grid-column: 1 / span 9; }
  .vitrine__vignettes { grid-column: 10 / -1; grid-template-columns: 1fr; align-content: space-between; }
  .vitrine__vignette { border-radius: var(--e2); }
}
@media (prefers-reduced-motion: reduce) {
  .vitrine__vue, .vitrine__vignette { transition: none; }
}

/* Mobile : pas de grande phrase ; après les photos vient directement Maître Ndiaye. */
@media (max-width: 767px) {
  .affirmation { display: none; }
}

/* Maître Ndiaye */
.notaire { margin-top: var(--section); row-gap: var(--e4); align-items: center; }
.notaire__portrait { aspect-ratio: 4 / 5; }
/* Portrait cadré sur le visage. */
.notaire__portrait img { object-position: 50% 15%; }
.notaire__texte .titre { margin-bottom: var(--e1); }
.notaire__texte .repere { margin-bottom: var(--e3); }
.notaire__infos { margin: var(--e3) 0 0; }
.notaire__infos > div { padding-block: var(--e2); border-top: 1px solid var(--ligne); }
.notaire__infos > div:last-child { border-bottom: 1px solid var(--ligne); }
.notaire__infos dt { margin-bottom: var(--e1); font-weight: 600; font-size: 16px; color: var(--cuivre-fonce); }
.notaire__infos dd { margin: 0; }
.notaire__infos ul { margin: 0; padding: 0; list-style: none; }
.notaire__infos li + li { margin-top: var(--e1); }
.notaire__action { margin-top: var(--e4); }
@media (min-width: 768px) {
  .notaire__portrait { grid-column: 1 / span 5; }
  .notaire__texte { grid-column: 7 / span 6; }
}

/* ---------- Domaines ---------- */
.domaines { padding-block: var(--section); background: var(--sel); }
.domaines__liste { margin: var(--e4) 0 0; padding: 0; list-style: none; }
.domaine { padding-block: var(--e3) var(--e4); border-top: 1px solid var(--ligne-forte); }
.domaine__nom { margin-bottom: var(--e2); font-size: clamp(28px, 1vw + 22px, 38px); }
.domaine p { color: var(--terre-2); }
@media (min-width: 768px) {
  .domaines__titre { grid-column: 1 / span 8; }
  /* Quatre cartes douces en 2 × 2, sans filets de séparation. */
  .domaines__liste { display: grid; grid-template-columns: 1fr 1fr; gap: var(--e3); margin-top: var(--e4); }
  .domaine {
    padding: var(--e4);
    border: 0;
    border-radius: var(--e2);
    background: var(--ivoire);
    box-shadow: 0 24px 48px -32px rgba(43, 29, 20, 0.3);
    transition: transform 500ms var(--ease), box-shadow 500ms var(--ease);
  }
  .domaine:hover { transform: translateY(-4px); box-shadow: 0 32px 56px -32px rgba(43, 29, 20, 0.4); }
  .domaine__nom { margin-bottom: var(--e2); font-size: clamp(26px, 1vw + 18px, 34px); }
}

/* ---------- Comment ça se passe (sombre) ---------- */
.etapes { padding-block: var(--section); }
.etapes__liste { display: grid; row-gap: var(--e4); margin: var(--e4) 0 0; padding: 0; list-style: none; }
.etape { padding-top: var(--e3); border-top: 1px solid var(--ligne-claire); }
.etape h3 { margin-bottom: var(--e2); font-size: 30px; }
.etape p { color: var(--ivoire-2); }
@media (min-width: 768px) {
  .etapes__titre { grid-column: 1 / span 8; }
  .etapes__liste { display: grid; grid-template-columns: subgrid; margin-top: var(--e4); }
  .etape { grid-column: span 6; }
}
@media (min-width: 1024px) { .etape { grid-column: span 3; } }

/* ---------- Mobile : domaines et étapes en cercles, sur une ligne brisée ----------
   Des cercles de 148 px, espacés de 32 px, alternent en haut et 48 px plus bas ; un trait fin
   relie leurs centres (longueur et angle calculés pour cet écart : 186 px, 14,93°).
   Chaque cercle porte le titre ; le texte du cercle choisi s'affiche dessous (voir main.js).
   Rien ne défile seul : la personne fait glisser, chaque cercle s'arrête au centre. */
.defileur__suivi, .defileur__detail { display: none; }
@media (max-width: 767px) {
  .domaines__liste.defileur, .etapes__liste.defileur { margin-top: var(--e2); }
}
@media (max-width: 767px) {
  .defileur {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    margin-inline: calc(-1 * var(--marge));
    padding: var(--e2) calc(50vw - 74px) var(--e1);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .defileur::-webkit-scrollbar { display: none; }
  .defileur > li {
    position: relative;
    isolation: isolate;
    flex: 0 0 148px;
    height: 148px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--e2);
    border: 0;
    background: none;
    text-align: center;
    scroll-snap-align: center;
    cursor: pointer;
  }
  .defileur > li:nth-child(even) { margin-top: var(--e4); }
  /* Le cercle */
  .defileur > li::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 50%;
    transform: scale(0.88);
    transition: transform 700ms var(--ease), box-shadow 700ms var(--ease), background-color 700ms var(--ease);
  }
  /* Le trait vers le cercle suivant : il descend depuis un cercle du haut, remonte depuis un cercle du bas. */
  .defileur > li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: -2;
    width: 186px;
    height: 1px;
    transform-origin: 0 50%;
    transform: rotate(14.93deg);
  }
  .defileur > li:nth-child(even):not(:last-child)::after { transform: rotate(-14.93deg); }
  .defileur > li.is-active::before { transform: none; }
  .defileur > li > *:not(h3) { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .defileur h3 { margin: 0; font-size: 18px; line-height: 1.15; transition: color 700ms var(--ease); }

  .domaine::before { background: var(--ivoire); box-shadow: 0 16px 32px -16px rgba(43, 29, 20, 0.3); }
  .domaine::after { background: rgba(138, 84, 36, 0.45); }
  .domaine.is-active::before { box-shadow: 0 0 0 1px var(--cuivre-fonce), 0 24px 48px -20px rgba(43, 29, 20, 0.35); }
  .domaine h3 { color: var(--terre-2); }
  .domaine.is-active h3 { color: var(--terre); }

  .etape::before { background: var(--baobab-2); box-shadow: 0 0 0 1px var(--ligne-claire); }
  .etape::after { background: rgba(212, 154, 90, 0.5); }
  .etape.is-active::before { box-shadow: 0 0 0 1px var(--cuivre-clair); }
  .etape h3 { color: var(--ivoire-2); }
  .etape.is-active h3 { color: var(--ivoire); }
  .etape__num { display: block; margin-bottom: 4px; font-size: 36px; line-height: 1; color: var(--cuivre-clair); }

  /* Texte du cercle choisi : toutes les versions sont superposées, seule l'active est visible. */
  /* Le texte se fait glisser à l'horizontale ; le défilement vertical reste au navigateur. */
  .defileur__detail { display: grid; margin-top: var(--e1); text-align: center; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; }
  .defileur__detail > div {
    grid-area: 1 / 1;
    max-width: 34ch;
    margin-inline: auto;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 600ms var(--ease), transform 600ms var(--ease);
  }
  .defileur__detail > div.is-active { opacity: 1; transform: none; }
  .defileur__detail strong { display: block; margin-bottom: var(--e1); font-family: var(--titre); font-weight: 500; font-size: 24px; line-height: 1.2; }
  .defileur__detail p { margin: 0 auto; color: var(--terre-2); }
  .sombre .defileur__detail p { color: var(--ivoire-2); }

  .defileur__suivi { display: block; margin-top: var(--e3); text-align: center; }
  .defileur__compteur { flex: none; font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; color: var(--terre-2); }
  .sombre .defileur__compteur { color: var(--ivoire-2); }
}

/* ---------- Prise de rendez-vous ---------- */
.rdv { padding-block: var(--section); }
.rdv .grille { row-gap: var(--e3); }
@media (min-width: 1024px) {
  .rdv__titre, .carte-rdv { grid-column: 3 / span 8; }
}

/* Le formulaire tient dans une carte claire, compacte, aux coins arrondis. */
.carte-rdv {
  min-width: 0;
  padding: var(--e3);
  border-radius: var(--e2);
  background: var(--sel);
  box-shadow: 0 24px 48px -32px rgba(43, 29, 20, 0.35);
}
@media (min-width: 768px) { .carte-rdv { padding: var(--e4); } }
/* Champs deux par deux dès que la place le permet. */
.champs-ligne { display: grid; gap: 0 var(--e2); }
@media (min-width: 600px) { .champs-ligne { grid-template-columns: 1fr 1fr; } }

/* Formulaire */
.champ { display: grid; align-content: start; gap: var(--e1); margin: 0 0 var(--e2); padding: 0; border: 0; min-width: 0; }
.champ label, .champ legend { padding: 0; font-weight: 600; font-size: 16px; }
.facultatif { font-weight: 400; color: var(--terre-2); }
.champ input:not([type="radio"]):not([type="checkbox"]), .champ textarea, .champ select {
  width: 100%;
  min-height: 48px;
  padding: var(--e1) var(--e2);
  border: 1px solid var(--ligne-forte);
  border-radius: var(--e1);
  background: #fff;
  font-size: 17px;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 300ms var(--ease), box-shadow 300ms var(--ease);
}
.champ textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
/* Listes déroulantes : même cadre que les autres champs, petite flèche à droite. */
.champ select {
  height: 48px;
  line-height: 1.2;
  padding-right: var(--e4);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8' fill='none' stroke='%238A5424' stroke-width='1.5'%3E%3Cpath d='M1 1l6 6 6-6'/%3E%3C/svg%3E") no-repeat right var(--e2) center;
  color: var(--terre);
  cursor: pointer;
}
.champ select:disabled { color: var(--terre-2); background-color: var(--ivoire); cursor: not-allowed; }
.champ select option, .champ select optgroup { color: var(--terre); background: var(--sel); }
.champ input:not([type="radio"]):hover, .champ textarea:hover, .champ select:hover:not(:disabled) { border-color: var(--terre-2); }
.champ input:not([type="radio"]):focus, .champ textarea:focus, .champ select:focus { outline: none; border-color: var(--cuivre-fonce); box-shadow: 0 0 0 3px rgba(138, 84, 36, 0.18); }
.champ [aria-invalid="true"] { border-color: var(--erreur); }
.champ ::placeholder { color: var(--terre-2); opacity: 0.7; }
.form-rdv__envoi { display: flex; flex-wrap: wrap; align-items: center; gap: var(--e2) var(--e3); margin-top: var(--e3); }
.champ__aide { margin: 0; font-size: 16px; color: var(--terre-2); }
.erreur { margin: 0; font-size: 16px; color: var(--erreur); }
.erreur:empty { display: none; }
.champ--piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Case à cocher */
.choix {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: var(--e2);
  align-items: start;
  min-height: 48px;
  padding-block: var(--e1);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  cursor: pointer;
}
.choix input {
  width: 24px;
  height: 24px;
  margin: 0;
  border: 1px solid var(--terre-2);
  border-radius: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  display: grid;
  place-content: center;
  cursor: pointer;
}
.choix input[type="checkbox"]::after {
  content: "";
  width: 12px;
  height: 7px;
  border-left: 2px solid var(--sel);
  border-bottom: 2px solid var(--sel);
  transform: translateY(-2px) rotate(-45deg) scale(0);
  transition: transform 200ms var(--ease);
}
.choix input[type="checkbox"]:checked { background: var(--baobab); border-color: var(--baobab); }
.choix input[type="checkbox"]:checked::after { transform: translateY(-2px) rotate(-45deg) scale(1); }
.choix:hover input { border-color: var(--terre); }
.choix input[aria-invalid="true"] { border-color: var(--erreur); }
.consentement { color: var(--terre-2); }

/* Confirmation */
.confirmation__titre { margin-bottom: var(--e2); font-size: 38px; }
.confirmation__titre:focus { outline: none; }
.confirmation__recap {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--e1) var(--e3);
  margin: var(--e3) 0;
  padding: var(--e2) 0;
  border-block: 1px solid var(--ligne);
}
.confirmation__recap dt { font-weight: 600; color: var(--terre-2); }
.confirmation__recap dd { margin: 0; }

/* ---------- Pied de page : coordonnées en bloc compact ---------- */
.pied { padding-block: var(--e4) calc(var(--e3) + env(safe-area-inset-bottom)); }
.pied .grille { row-gap: var(--e3); }
.pied .logo__nom { font-size: 26px; }
/* Mobile : deux colonnes bien remplies ; seul l'e-mail prend toute la largeur. */
.pied__infos { display: grid; grid-template-columns: 1fr 1fr; gap: var(--e3) var(--e2); margin: 0; }
.pied__info--large { grid-column: 1 / -1; }
.pied__info dt { margin-bottom: var(--e1); font-weight: 600; font-size: 16px; color: var(--cuivre-clair); }
.pied__info dd { margin: 0; font-size: 16px; line-height: 1.55; color: var(--ivoire-2); }
.pied__info .lien { color: var(--ivoire); }
.pied__bas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--e1) var(--e3);
  padding-top: var(--e2);
  border-top: 1px solid var(--ligne-claire);
}
.pied__droits { margin: 0; font-size: 14px; color: var(--ivoire-2); max-width: none; }
.pied__bas .lien { font-size: 16px; }
/* Les colonnes prennent la largeur de leur contenu : les numéros ne se coupent pas. */
@media (min-width: 768px) {
  .pied { padding-top: var(--e5); }
  .pied .grille { row-gap: var(--e4); }
  .pied__infos { grid-template-columns: repeat(3, max-content); justify-content: space-between; gap: var(--e3) var(--e4); }
  .pied__info--large { grid-column: auto; }
}
@media (min-width: 1024px) {
  .pied__infos { grid-template-columns: repeat(5, max-content); }
}
@media (min-width: 1440px) {
  .pied__marque { grid-column: 1 / span 3; }
  .pied__infos { grid-column: 4 / -1; gap: var(--e3); }
}
/* ---------- Pages de texte (mentions légales, page introuvable) ---------- */
.page-texte { padding-top: calc(var(--entete) + var(--e5)); padding-bottom: var(--section); }
.page-texte__corps { grid-column: 1 / -1; }
.page-texte .titre { margin-bottom: var(--e4); }
.page-texte h2 { margin: var(--e5) 0 var(--e2); padding-top: var(--e3); border-top: 1px solid var(--ligne); font-size: clamp(26px, 1.5vw + 18px, 34px); }
.page-texte h3 { margin: var(--e4) 0 var(--e1); font-size: 26px; }
.page-texte ul { padding-left: 1.2em; max-width: 62ch; }
.page-texte li { margin-bottom: var(--e1); }
.page-texte__retour { margin-top: var(--e4); }
.entete__rdv { display: inline-flex; align-items: center; min-height: 48px; font-weight: 600; font-size: 16px; }
.entete .entete__rdv { color: var(--cuivre-clair); }
@media (min-width: 1024px) { .page-texte__corps { grid-column: 3 / span 8; } }

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .affirmation .mot { color: inherit; }
  .js .photo img { opacity: 1; transform: none; }
  [data-parallaxe] { transform: none !important; }
  .defileur > li::before, .defileur__detail > div { transform: none !important; }
}

/* En-tête des pages secondaires : logo et lien de rendez-vous, sans menu. */
.entete__in--simple { display: flex; justify-content: space-between; }
.entete__in--simple > .logo { display: inline-flex; }
