/* ==========================================================
   Site vitrine — Nasserdine Bouguerne
   Mobile d'abord, puis adaptations pour tablette et ordinateur.
   ========================================================== */

/* ---------- Polices hébergées avec le site (RGPD : aucun appel à Google) ----------
   Caractères latins (français compris). Licences libres OFL dans assets/fonts/. */
@font-face {
  font-family: 'Anton';
  src: url('../fonts/anton-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('../fonts/instrument-sans-variable.woff2') format('woff2');
  font-weight: 400 700; /* police variable : toutes les graisses dans un seul fichier */
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('../fonts/instrument-serif-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('../fonts/instrument-serif-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --nuit: #0A1020;
  --nuit-2: #111A2E;
  --ligne: #22304A;
  --ligne-2: #1C2840;
  --texte: #EEF2F7;
  --texte-doux: #C3CCDA;
  --texte-doux-2: #CED6E2;
  --citron: #C8F04A;
  --clair: #F4F2EC;
  --clair-ligne: #DAD6CC;
  --encre-douce: #3A4152;
  --linkedin: #0A66C2;

  --f-titre: 'Anton', 'Arial Narrow', sans-serif;
  --f-serif: 'Instrument Serif', Georgia, serif;
  --f-texte: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  --f-code: 'JetBrains Mono', ui-monospace, monospace;

  --conteneur: 1240px;
  --marge: clamp(16px, 5vw, 48px);
  --rayon: 20px;
}

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

/* scroll-padding-top : les sections ne passent pas sous l'en-tête fixe */
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--nuit);
  color: var(--texte);
  font-family: var(--f-texte);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

/* Focus clavier bien visible (RGAA) */
:focus-visible {
  outline: 3px solid var(--citron);
  outline-offset: 3px;
  border-radius: 4px;
}
.clair :focus-visible { outline-color: var(--nuit); }

/* Lien d'évitement (RGAA) */
.evitement {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 30;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--citron);
  color: var(--nuit);
  font-weight: 700;
}
.evitement:focus { top: 16px; }

.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;
}

.conteneur {
  max-width: var(--conteneur);
  margin: 0 auto;
  padding-left: var(--marge);
  padding-right: var(--marge);
}

.surligne {
  font-style: italic;
  color: var(--nuit);
  background: var(--citron);
  padding: 0 0.12em;
  border-radius: 6px;
}
.italique-citron { font-style: italic; color: var(--citron); }

.titre-section {
  margin: 0;
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(44px, 6vw, 72px);
  line-height: 1;
}

/* ---------- En-tête ---------- */
/* Barre fixée en haut de l'écran : le menu reste accessible partout */
.entete-barre {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--nuit);
  border-bottom: 1px solid var(--ligne-2);
}
.entete {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.marque {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.marque__monogramme {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--citron);
  color: var(--nuit);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-code);
  font-weight: 700;
  font-size: 16px;
}
.marque__nom {
  font-family: var(--f-titre);
  font-size: clamp(15px, 4vw, 20px);
  white-space: nowrap;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.nav { display: flex; flex-wrap: wrap; gap: 0 24px; font-size: 15px; }
.nav a { padding: 10px 0; text-decoration: none; }
.nav a:hover { color: var(--citron); }
/* Section en cours de lecture (mise à jour par menu.js) */
.nav--principale a[aria-current] { color: var(--citron); }

/* Sur ordinateur, le panneau n'existe pas visuellement : les liens sont dans la barre */
.menu-panneau { display: contents; }
.menu-contact { display: none; }

/* Icône : 3 traits qui deviennent une croix à l'ouverture */
.menu-bouton__icone,
.menu-bouton__icone::before,
.menu-bouton__icone::after {
  display: block;
  width: 18px; height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.menu-bouton__icone { position: relative; transition: background-color 0.2s ease; }
.menu-bouton__icone::before,
.menu-bouton__icone::after {
  content: "";
  position: absolute;
  left: 0;
  transition: transform 0.25s ease;
}
.menu-bouton__icone::before { transform: translateY(-6px); }
.menu-bouton__icone::after { transform: translateY(6px); }
.menu-bouton[aria-expanded="true"] .menu-bouton__icone { background-color: transparent; }
.menu-bouton[aria-expanded="true"] .menu-bouton__icone::before { transform: rotate(45deg); }
.menu-bouton[aria-expanded="true"] .menu-bouton__icone::after { transform: rotate(-45deg); }

/* Menu mobile : bouton « Menu » sous 900 px de large */
.menu-bouton { display: none; }
@media (max-width: 899px) {
  .js .entete { position: relative; flex-wrap: nowrap; }
  .boutons { justify-content: center; }
  .accroche__texte { text-align: center; flex-basis: 100%; }
  .js .marque { min-width: 0; }
  .js .marque__nom { overflow: hidden; text-overflow: ellipsis; }
  .js .menu-bouton {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    min-width: 118px; /* même largeur pour « Menu » et « Fermer » : rien ne bouge */
    padding: 0 16px;
    border-radius: 999px;
    border: 1.5px solid var(--texte);
    background: transparent;
    color: var(--texte);
    font: 600 15px var(--f-texte);
    cursor: pointer;
  }
  .js .menu-bouton { position: relative; overflow: hidden; isolation: isolate; }
  .js .menu-bouton:hover,
  .js .menu-bouton[aria-expanded="true"] { border-color: var(--citron); color: var(--citron); }
  /* Ouvert : la vague remplit le bouton ; texte et croix changent de couleur
     pile là où la vague les recouvre (même principe que le bouton flèche) */
  .js .menu-bouton[aria-expanded="true"]::before { transform: translateY(0); }
  .menu-bouton__texte, .menu-bouton__icone { mix-blend-mode: difference; }

  /* Panneau plein écran, sous la barre du haut (69px) */
  .js .menu-panneau {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    position: fixed;
    top: 69px; left: 0; right: 0; bottom: 0;
    overflow-y: auto;
    padding: clamp(16px, 4vh, 40px) var(--marge) max(24px, env(safe-area-inset-bottom));
    background: var(--nuit);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }
  .js .menu-panneau.ouvert { opacity: 1; visibility: visible; }
  .js .nav--principale { flex-direction: column; flex-wrap: nowrap; gap: 0; }
  .js .nav--principale a {
    padding: 12px 0;
    font-family: var(--f-titre);
    font-size: clamp(34px, 10vw, 56px);
    line-height: 1.1;
    text-transform: uppercase;
    border-bottom: 1px solid var(--ligne);
  }
  .js .nav--principale a:last-child { border-bottom: 0; }
  .js .menu-contact { display: flex; gap: 12px; }
  .menu-contact__lien {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 64px;
    border-radius: var(--rayon);
    font-weight: 700;
    text-decoration: none;
  }
  .menu-contact__lien--mail { background: var(--citron); color: var(--nuit); }
  .menu-contact__lien--linkedin { background: var(--linkedin); color: #FFFFFF; }
  /* La page derrière ne défile pas tant que le menu est ouvert */
  /* (sur body et pas sur html, sinon l'en-tête collé se décroche) */
  html.menu-ouvert body { overflow: hidden; }
  html.menu-ouvert .haut-de-page { opacity: 0; visibility: hidden; }
}
@media (max-width: 899px) and (prefers-reduced-motion: reduce) {
  .js .menu-panneau, .menu-bouton__icone, .menu-bouton__icone::before, .menu-bouton__icone::after { transition: none; }
  .menu-bouton::before { transition: none; animation: none; }
}

/* ---------- Accroche ---------- */
.accroche {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px 64px;
  padding-top: clamp(24px, 5vw, 64px);
  padding-bottom: clamp(64px, 9vw, 120px);
}
.accroche__texte { flex: 1.25 1 400px; }
.accroche h1 {
  margin: 0;
  font-family: var(--f-titre);
  font-weight: 400;
  text-transform: uppercase;
  font-size: clamp(42px, 8.2vw, 100px);
  line-height: 1.1;
  letter-spacing: 0.005em;
}
.accroche h1 span { display: block; }
.accroche h1 .citron { color: var(--citron); }
.accroche h1 .lieu {
  margin-top: 0.1em;
  font-family: var(--f-serif);
  font-style: italic;
  text-transform: none;
  font-size: 0.55em;
  line-height: 1.1;
}
.accroche__intro {
  margin: 28px 0 0;
  max-width: 34em;
  font-size: clamp(18px, 2vw, 21px);
  color: var(--texte-doux-2);
}
.boutons { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.bouton {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 28px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease;
}
.bouton:hover { transform: translateY(-2px); }
.bouton--plein { background: var(--citron); color: var(--nuit); }
.bouton--contour { border: 1.5px solid var(--texte); font-weight: 600; }
@media (prefers-reduced-motion: reduce) {
  .bouton, .tuile { transition: none; }
  .bouton:hover, .tuile:hover { transform: none; }
}

.portrait {
  flex: 1 1 300px;
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  padding: 0 14px 16px 0;
}
.portrait__contour {
  position: absolute;
  inset: 24px -14px -2px 14px;
  border-radius: 32px;
  border: 2px solid var(--citron);
}
.portrait__cadre {
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  background: var(--nuit-2);
  border: 1px solid var(--ligne);
  padding-top: 48px;
}
.portrait__cadre img { width: 100%; }

/* Accroche : la photo entière doit être visible dès l'arrivée sur le site,
   quelle que soit la taille de l'écran. 69px = hauteur de l'en-tête fixe. */
@media (min-width: 900px) {
  .portrait {
    max-width: min(480px, max(300px, calc(100vh - 220px)));
    max-width: min(480px, max(300px, calc(100svh - 220px)));
  }
}
@media (max-width: 899px) {
  .accroche {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 24px;
    min-height: calc(100vh - 69px);
    min-height: calc(100svh - 69px);
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .accroche__texte { flex: 0 0 auto; }
  .accroche__intro { margin: 16px auto 0; }
  .boutons { margin-top: 20px; gap: 8px; }
  .accroche .bouton { min-height: 48px; padding: 0 18px; }
  /* La photo prend toute la place restante sous le texte */
  .portrait {
    flex: 1 1 0;
    min-height: 200px;
    max-height: 520px;
    width: auto;
    max-width: 100%;
    aspect-ratio: 9 / 10;
    align-self: center;
    margin: 0;
    padding: 0 10px 12px 0;
  }
  .portrait__contour { inset: 18px -10px -2px 10px; border-radius: 26px; }
  .portrait__cadre { height: 100%; padding-top: 24px; border-radius: 26px; }
  .portrait__cadre img {
    height: 100%;
    object-fit: contain;
    object-position: center bottom;
  }
}
/* Petits téléphones : titre et texte un peu plus compacts pour laisser de la place à la photo */
@media (max-width: 419px) {
  .accroche .bouton { padding: 0 14px; font-size: 16px; }
}
@media (max-width: 899px) and (max-height: 720px) {
  .accroche { padding-top: 14px; gap: 18px; }
  .accroche h1 { font-size: 36px; }
  .accroche__intro { font-size: 16px; line-height: 1.5; margin: 12px auto 0; }
  .boutons { margin-top: 16px; }
  .portrait { min-height: 170px; }
}
@media (max-width: 899px) and (max-height: 600px) {
  .portrait { min-height: 130px; }
}

/* ---------- Chiffres + formats ---------- */
.preuves {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px 72px;
  padding-top: clamp(32px, 6vw, 80px);
  padding-bottom: clamp(64px, 9vw, 120px);
}
/* 460px : en dessous, les chiffres passent au-dessus de « Formats » au lieu d'être écrasés à côté */
.chiffres {
  flex: 1.2 1 460px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chiffre {
  min-height: 190px;
  padding: 22px;
  border-radius: var(--rayon);
  background: var(--nuit-2);
  border: 1px solid var(--ligne);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  /* La taille des grands chiffres suit la largeur de la case (unité cqi) */
  container-type: inline-size;
}
.chiffre--citron { background: var(--citron); border-color: var(--citron); color: var(--nuit); }
.chiffre--clair { background: var(--texte); border-color: var(--texte); color: var(--nuit); }
.chiffre__grand {
  font-family: var(--f-titre);
  font-size: clamp(30px, 4vw, 48px);
  font-size: clamp(26px, 22cqi, 48px);
  line-height: 1.05;
  text-transform: uppercase;
  overflow-wrap: normal;
}
.chiffre--citron .chiffre__grand {
  font-size: clamp(44px, 6vw, 72px);
  font-size: clamp(40px, 36cqi, 72px);
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
}
.chiffre__petit { color: var(--texte-doux); font-size: 15px; line-height: 1.45; }
.chiffre--citron .chiffre__petit { color: var(--nuit); font-size: 17px; font-weight: 600; }
.chiffre__etiquette { color: var(--texte-doux); font-weight: 600; }
.texte-citron { color: var(--citron); }
.insecable { white-space: nowrap; }
.chiffre--clair p { margin: 0; font-weight: 700; }
.logos { display: flex; flex-direction: column; gap: 8px; }
.logo {
  height: 56px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 14px;
  border-radius: 12px;
}
.logo img { max-height: 30px; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.logo--sombre { background: var(--nuit); }

.formats { flex: 1 1 340px; }
.formats .titre-section { margin-bottom: 20px; }
.formats p { margin: 0; font-size: clamp(19px, 2.1vw, 22px); line-height: 1.55; color: var(--texte-doux-2); }

/* ---------- Sections claires ---------- */
.clair { background: var(--clair); color: var(--nuit); }

/* ---------- Mon approche ---------- */
.approche { padding-top: clamp(64px, 9vw, 120px); padding-bottom: clamp(64px, 9vw, 120px); }
.approche .titre-section { text-align: center; margin-bottom: 48px; }
/* 1 colonne sur téléphone, 3 côte à côte ensuite (jamais 2 + 1 carte seule) */
.cartes-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 0; padding: 0; list-style: none;
}
@media (min-width: 700px) {
  .cartes-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.photo-formation {
  margin: 0 0 16px;
  border-radius: var(--rayon);
  overflow: hidden;
}
.photo-formation img {
  width: 100%;
  aspect-ratio: 4 / 1;
  object-fit: cover;
  object-position: 42% center;
}
@media (max-width: 699px) {
  .photo-formation img { aspect-ratio: 4 / 3; }
}
.carte-claire {
  padding: clamp(20px, 2.4vw, 28px);
  border: 1px solid var(--clair-ligne);
  border-radius: var(--rayon);
  background: #FFFFFF;
}
.numero {
  margin: 0 0 20px;
  font-family: var(--f-code);
  font-weight: 700;
  font-size: 15px;
}
.carte-claire h3 {
  margin: 0 0 8px;
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(26px, 2.8vw, 32px);
  line-height: 1.1;
}
.carte-claire p:last-child { margin: 0; color: var(--encre-douce); }
.encart {
  margin-top: 16px;
  padding: clamp(24px, 4vw, 36px);
  border-radius: var(--rayon);
  background: var(--nuit);
  color: var(--texte);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 32px;
}
.encart__titre {
  flex: 0 0 auto;
  margin: 0;
  font-family: var(--f-titre);
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.1;
  text-transform: uppercase;
  color: var(--citron);
}
.encart p:last-child { flex: 1 1 320px; margin: 0; font-size: 18px; font-weight: 500; }

/* ---------- Formations ---------- */
.formations { padding-top: clamp(72px, 10vw, 136px); padding-bottom: clamp(72px, 10vw, 136px); }
.formations .titre-section { text-align: center; font-size: clamp(48px, 7vw, 88px); margin-bottom: 56px; }
.cartes-formations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 16px;
  margin: 0; padding: 0; list-style: none;
}
.carte-formation {
  padding: clamp(24px, 3vw, 36px);
  border-radius: var(--rayon);
  background: var(--nuit-2);
  border: 1px solid var(--ligne);
  border-top: 3px solid var(--citron);
}
.carte-formation .numero { margin-bottom: 16px; color: var(--citron); }
.carte-formation h3 {
  margin: 0 0 12px;
  font-family: var(--f-titre);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.05;
  text-transform: uppercase;
}
.carte-formation p:last-child { margin: 0; color: var(--texte-doux); }

/* ---------- À propos ---------- */
.apropos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px 72px;
  padding-top: clamp(64px, 9vw, 120px);
  padding-bottom: clamp(64px, 9vw, 120px);
}
.apropos__visuel { flex: 1 1 320px; max-width: 460px; margin: 0 auto; }
.apropos__chiffre {
  margin: 0 0 20px;
  text-align: center;
  white-space: nowrap;
  font-family: var(--f-titre);
  font-size: clamp(80px, 12vw, 150px);
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 2px var(--nuit);
}
.apropos__cadre {
  border-radius: 32px;
  overflow: hidden;
  background: var(--nuit-2);
  border: 1px solid var(--ligne);
  padding-top: 32px;
}
.apropos__cadre img { width: 100%; }
.apropos__texte { flex: 1.2 1 380px; }
.apropos__texte .titre-section { margin-bottom: 16px; }
.apropos__intro { margin: 0 0 32px; font-size: 20px; }
.frise {
  list-style: none;
  margin: 0 0 36px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.frise li { display: flex; gap: 16px; align-items: flex-start; color: var(--encre-douce); }
.annee {
  flex: 0 0 auto;
  padding: 3px 12px;
  border-radius: 999px;
  border: 1.5px solid var(--nuit);
  color: var(--nuit);
  font-family: var(--f-code);
  font-weight: 700;
  font-size: 14px;
}
.annee--citron { background: var(--citron); border-color: var(--citron); }
.conviction {
  margin: 0;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.2;
}

/* ---------- Contact ---------- */
.contact { position: relative; overflow: hidden; border-top: 1px solid var(--ligne-2); }
.contact__fond {
  position: absolute;
  left: 0; right: 0;
  top: clamp(24px, 4vw, 56px);
  text-align: center;
  font-family: var(--f-titre);
  font-size: clamp(48px, 15vw, 260px);
  line-height: 0.85;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1.5px #2A3A5C;
  white-space: nowrap;
  pointer-events: none;
}
.contact__contenu {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  text-align: center;
  padding-top: calc(clamp(24px, 4vw, 56px) + 0.85 * clamp(48px, 15vw, 260px) + clamp(32px, 4vw, 56px));
  padding-bottom: clamp(64px, 9vw, 120px);
}
.contact .titre-section { max-width: 16ch; font-size: clamp(44px, 6.5vw, 84px); line-height: 1.02; }
/* « Parlons-en. » ne doit jamais être coupé au tiret */
.contact .titre-section em { white-space: nowrap; }
.tuiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.tuile {
  width: 148px; height: 148px;
  border-radius: 32px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease;
}
.tuile:hover { transform: translateY(-3px); }
.tuile--mail { background: var(--citron); color: var(--nuit); }
.tuile--linkedin { background: var(--linkedin); color: #FFFFFF; }

/* ---------- Pied de page ---------- */
.pied { border-top: 1px solid var(--ligne-2); }
.pied__contenu { padding-top: clamp(48px, 7vw, 88px); padding-bottom: 28px; }
.pied__nom {
  margin: 0 0 32px;
  text-align: center;
  font-family: var(--f-titre);
  font-size: clamp(40px, 8.4vw, 108px);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.pied .nav { justify-content: center; gap: 0 28px; }
.pied__bas {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--ligne-2);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
  font-size: 15px;
  color: #AEB8C8;
}
.pied__bas p { margin: 0; }
/* Laisse la place au bouton « Revenir en haut » pour qu'il ne cache pas « Mentions légales » */
.haut-de-page ~ .pied .pied__bas { padding-right: 76px; }
.pied__bas a { color: var(--texte); padding: 10px 0; text-decoration: none; }
.pied__bas a:hover { color: var(--citron); }

/* ---------- Bouton « Revenir en haut » ---------- */
/* Fond bleu nuit + bord citron : bien visible sur les sections sombres et claires */
.haut-de-page {
  position: fixed;
  z-index: 15;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--nuit);
  color: var(--citron);
  border: 2px solid var(--citron);
  overflow: hidden;
  isolation: isolate;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
/* La vague : remplissage citron au bord ondulé (motif SVG, couleur = --citron),
   cachée sous le bouton puis qui monte au survol ou au clic.
   Partagée avec le bouton Menu (qui se remplit à l'ouverture)
   et la croix « Fermer » des mentions légales (au survol). */
.haut-de-page::before,
.menu-bouton::before,
.fermer-page::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0; right: 0; bottom: 0;
  height: calc(100% + 8px);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 8'%3E%3Cpath d='M0 8V4Q6.5 0 13 4T26 4V8Z' fill='%23C8F04A'/%3E%3C/svg%3E") repeat-x 0 0 / 26px 8px,
    linear-gradient(var(--citron), var(--citron)) no-repeat 0 8px / 100% 100%;
  transform: translateY(100%);
  transition: transform 0.55s cubic-bezier(0.45, 0, 0.2, 1);
  animation: vague-ondule 1.1s linear infinite;
}
/* Mode « différence » : la flèche reste citron sur le fond bleu nuit et devient
   sombre pile là où la vague la recouvre (elle change de couleur avec la vague) */
.haut-de-page svg { mix-blend-mode: difference; }
.haut-de-page:hover::before,
.haut-de-page.vague::before { transform: translateY(0); }
/* Au clic, la flèche s'envole vers le haut puis revient par le bas */
.haut-de-page.vague svg { animation: fleche-envol 0.9s ease-in-out; }
@keyframes vague-ondule {
  to { background-position: 26px 0, 0 8px; }
}
@keyframes fleche-envol {
  0% { transform: translateY(0); opacity: 1; }
  45% { transform: translateY(-34px); opacity: 0; }
  46% { transform: translateY(34px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}
/* Caché tant qu'on est en haut de la page (seulement si le JavaScript fonctionne) */
.js .haut-de-page:not(.visible) { opacity: 0; visibility: hidden; }
@media (prefers-reduced-motion: reduce) {
  .haut-de-page, .haut-de-page::before, .haut-de-page svg { transition: none; animation: none; }
  .haut-de-page.vague svg { animation: none; }
}
/* Le focus est rendu au haut de la page après la remontée : pas de contour sur toute la page */
body:focus, body:focus-visible { outline: none; }

/* ---------- Page 404 (adresse introuvable) ---------- */
.erreur {
  min-height: calc(100vh - 69px - 120px);
  min-height: calc(100svh - 69px - 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 48px;
  padding-bottom: 64px;
}
.erreur__code {
  margin: 0;
  font-family: var(--f-titre);
  font-size: clamp(120px, 30vw, 260px);
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 2px var(--citron);
}
.erreur h1 {
  margin: 20px 0 12px;
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
}
.erreur__texte { margin: 0; max-width: 32em; color: var(--texte-doux-2); font-size: 18px; }
.erreur .boutons { justify-content: center; }

/* ---------- Page mentions légales ---------- */
.entete--page { flex-wrap: nowrap; }
.entete--page .marque { min-width: 0; }
/* Croix « Fermer » : même forme que le bouton Menu ouvert, la vague monte au survol */
.fermer-page {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid var(--citron);
  color: var(--citron);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
}
.fermer-page:hover::before,
.fermer-page:focus-visible::before { transform: translateY(0); }
/* Texte et croix passent en sombre pile là où la vague les recouvre */
.fermer-page__texte, .fermer-page__croix { mix-blend-mode: difference; }
.fermer-page__croix { position: relative; width: 18px; height: 18px; }
.fermer-page__croix::before,
.fermer-page__croix::after {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 18px; height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: rotate(45deg);
}
.fermer-page__croix::after { transform: rotate(-45deg); }
@media (max-width: 419px) {
  .fermer-page { width: 44px; padding: 0; }
  .fermer-page__texte {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fermer-page::before { transition: none; animation: none; }
}
.page-texte { padding-top: clamp(32px, 6vw, 72px); padding-bottom: clamp(64px, 9vw, 120px); max-width: 820px; }
.page-texte h1 { font-family: var(--f-serif); font-weight: 400; font-size: clamp(40px, 6vw, 64px); line-height: 1.05; margin: 0 0 32px; }
.page-texte h2 { font-family: var(--f-titre); font-weight: 400; text-transform: uppercase; font-size: 26px; margin: 40px 0 12px; color: var(--citron); }
.page-texte p, .page-texte li { color: var(--texte-doux-2); }
.a-completer { background: #3A2F0B; color: #FFE8A3; padding: 0 6px; border-radius: 4px; }

/* Très petits écrans : chiffres sur une seule colonne */
@media (max-width: 419px) {
  .js .menu-bouton { width: 44px; min-width: 0; padding: 0; justify-content: center; }
  .menu-bouton__texte {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
  }
  .chiffres { grid-template-columns: 1fr; }
  .chiffre { min-height: 0; }
  .chiffre__grand { margin-bottom: 4px; }
}
