/* ==========================================================================
   Edouard - Photographie — feuille de styles du site
   --------------------------------------------------------------------------
   Sommaire :
     1. Réglages généraux (couleurs, polices)
     2. Textes
     3. La grille : blocs et éléments
     4. En-tête et menu
     5. Pied de page
     6. Boutons, traits, formes, images
     7. Diaporama, carrousel, mosaïques, visionneuse
     8. Formulaire de contact
     9. Tablette (768 à 991 px)
    10. Téléphone (767 px et moins)
   ========================================================================== */

/* 1. RÉGLAGES GÉNÉRAUX ===================================================== */

:root {
  /* Couleurs. Une « variable CSS » (--nom) se définit ici une seule fois
     et se réutilise partout avec var(--nom) : on change la couleur à un seul endroit. */
  --fond: #000000;
  --titres: #D4DADC;
  --textes: #A6ABAE;
  --details: #7E8284;
  --fond-accent: #3E4041;
  --titres-accent: #EFEFEF;
  --bouton: #D4DADC;
  --bouton-survol: #A6ABAE;

  --police-titre: 'Archivo', sans-serif;
  --police-texte: 'Roboto Mono', monospace;

  /* Unité qui fait grandir les textes avec l'écran : 1 % de la largeur (vw)… */
  --u: 1vw;
}
/* …ou 1 % de la hauteur (vh) quand l'écran est tenu en hauteur (téléphone),
   sinon les titres seraient minuscules sur un écran étroit. */
@media (orientation: portrait) {
  :root { --u: 1vh; }
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

/* Entre 768 et 1439 px de large, tout rétrécit légèrement avec l'écran : la taille de base
   (1rem) passe de 16 à 14 px. Comme les textes sont exprimés en rem, ils suivent tous. */
@media (min-width: 768px) and (max-width: 1439px) {
  html { font-size: clamp(14px, calc(11.71429px + 0.29762vw), 16px); }
}

body {
  margin: 0;
  background: var(--fond);
  color: var(--textes);
  font-family: var(--police-texte);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  /* Sur une page courte, le pied de page reste collé en bas de l'écran. */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

/* Ligne vide affichée seulement sur téléphone, pour aérer un titre. */
.vide-m { display: none; }

/* Lien d'évitement : visible seulement au clavier, pour sauter le menu. */
.evitement {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: #fff; color: #000; padding: 12px 16px;
}
.evitement:focus { left: 8px; top: 8px; }

:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* 2. TEXTES ================================================================ */
/* Les tailles utilisent min(a, b) : le texte grandit avec la largeur de l'écran
   (unité vw = 1 % de la largeur) mais ne dépasse jamais la taille « a ». */

h1, h2, h3, h4, h5, h6, p { margin: 0; }

h1, h2, h3, h4, .t-banniere, .t-citation {
  font-family: var(--police-titre);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--titres);
}
h1 { font-size: min(3.75rem, 1rem + 3.06 * var(--u)); line-height: 1.1; }
h2 { font-size: min(2.5rem, 1rem + 1.67 * var(--u)); line-height: 1.2; }
h3 { font-size: min(2rem, 1rem + 1.11 * var(--u)); line-height: 1.3; }
h4 { font-size: min(1.75rem, 1rem + 0.83 * var(--u)); line-height: 1.4; }

h5, h6 {
  font-family: var(--police-texte);
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--titres);
}
h5 { font-weight: 300; font-size: 1rem; }
h6 { font-weight: 400; font-size: min(0.75rem, 1rem - 0.28 * var(--u)); }

/* Paragraphe ordinaire : petit. Ajouter class="t-grand" pour le texte de présentation, plus grand. */
p {
  font-weight: 400;
  font-size: min(0.75rem, 1rem - 0.28 * var(--u));
  line-height: 1.8;
  letter-spacing: -0.02em;
}
.t-grand { font-weight: 300; font-size: min(0.875rem, 1rem - 0.14 * var(--u)); letter-spacing: 0; }

/* Variantes de texte */
.t-banniere { font-size: min(4.25rem, 1rem + 3.61 * var(--u)); line-height: 1.1; }
.t-surtitre {
  font-family: var(--police-texte); font-weight: 400;
  font-size: min(0.875rem, 1rem - 0.14 * var(--u)); line-height: 1.8;
  letter-spacing: 0.7em; text-transform: uppercase; color: var(--titres);
}
.t-citation { font-size: min(2rem, 1rem + 1.11 * var(--u)); line-height: 1.3; }

.centre { text-align: center; }
.droite { text-align: right; }
.justifie { text-align: justify; }

/* Couleurs particulières : .blanc sur une photo, .accent sur un fond gris. */
.blanc, .blanc h1, .blanc h2, .blanc h3, .blanc h4, .blanc h5, .blanc h6, .blanc p { color: #fff; }
.accent h1, .accent h2, .accent h3, .accent .t-surtitre { color: var(--titres-accent); }

.texte a { transition: opacity .2s; }
.texte a:hover { opacity: .7; }

/* 3. LA GRILLE : BLOCS ET ÉLÉMENTS ========================================= */
/* Chaque page est une pile de « blocs » (<section class="bloc">).
   Dans un bloc, une grille invisible de 24 colonnes sert à placer les éléments,
   comme sur du papier quadrillé. La grille se redimensionne avec l'écran.

   Dans le HTML, un bloc règle sa grille avec ces variables :
     --lignes / --lignes-t / --lignes-m : nombre de lignes (ordinateur / tablette / téléphone)
     --haut / --bas (+ -t, -m)           : marge en haut et en bas (1 = marge normale)
   Et chaque élément (.el) donne sa place :
     --d : ordinateur   --t : tablette   --m : téléphone
     valeur = ligne de départ / colonne de départ / span hauteur / span largeur
     (« span 8 » veut dire « s'étend sur 8 cases »)                              */

.bloc {
  position: relative;
  background: var(--fond);
  overflow: hidden;

  --zone: min(94vw, 1450px);                 /* largeur utile de la page */
  --cols: 24;                                 /* nombre de colonnes */
  --g: calc(var(--zone) / 96);               /* espace entre deux cases */
  --c: calc((var(--zone) - 23 * var(--g)) / 24); /* largeur d'une colonne */
  --r: calc(var(--c) * 2 / 3);               /* hauteur d'une ligne */
  --rt: var(--r);                             /* hauteur mini d'une ligne de texte */
  --R: minmax(var(--r), auto);
  --T: minmax(var(--rt), auto);
  --marge: 5vmax;                             /* vmax = 1 % du plus grand côté de l'écran */
  --ph: var(--haut, 1);
  --pb: var(--bas, 1);

  padding: calc(var(--marge) * var(--ph)) 0 calc(var(--marge) * var(--pb));
}
.bloc.sans-espace { --g: 0px; --c: calc(var(--zone) / 24); }

.grille {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  grid-template-columns: minmax(0, 1fr) repeat(var(--cols), var(--c)) minmax(0, 1fr);
  grid-template-rows: var(--rangees, repeat(var(--lignes), var(--R)));
  gap: var(--g);
}

.el {
  grid-area: var(--d);
  z-index: var(--z, 0);
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
/* Alignement du contenu dans sa case */
.v-centre { justify-content: center; }
.v-bas { justify-content: flex-end; }
.h-centre { align-items: center; }
.h-droite { align-items: flex-end; }
.h-gauche { align-items: flex-start; }

/* Un texte posé sur une photo cliquable ne doit pas bloquer le clic. */
.el.texte:not(:has(a)) { pointer-events: none; }

/* Bloc qui occupe toute la hauteur de l'écran (dvh = hauteur réelle de l'écran,
   barre d'adresse du téléphone comprise). */
.bloc.plein-ecran {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.bloc.plein-ecran::before, .bloc.plein-ecran::after { content: ""; display: block; flex: 1 0 0; }
.bloc.plein-ecran::before { min-height: calc(var(--marge) * var(--ph)); }
.bloc.plein-ecran::after { min-height: calc(var(--marge) * var(--pb)); }
.bloc.plein-ecran.cale-bas::after { flex-grow: 0; }   /* contenu collé en bas */
.bloc.plein-ecran > .grille { flex: none; }

/* Photo de fond d'un bloc + voile sombre par-dessus pour la lisibilité. */
.bloc-fond {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; max-width: none;
}
.bloc-voile { position: absolute; inset: 0; background: #000; opacity: var(--voile, 0); }

/* 4. EN-TÊTE ET MENU ======================================================= */

.entete {
  position: sticky; top: 0; z-index: 50;
  background: var(--fond);
  color: var(--titres);
  --zone: min(94vw, 1450px);
  --g: calc(var(--zone) / 96);
  --c: calc((var(--zone) - 23 * var(--g)) / 24);
  --bord: calc((100% - var(--zone)) / 2);
  --bord-px: calc((100vw - var(--zone)) / 2);
  padding: calc(5vmax * .305) var(--bord);
  transition: background-color .3s ease-in-out, padding .3s ease-in-out;
}
/* Sur l'accueil, l'en-tête flotte par-dessus la photo. */
.entete.sur-image { position: fixed; left: 0; right: 0; background: transparent; color: #fff; }
/* Dès qu'on fait défiler la page, il se resserre et prend un fond noir. */
.entete.colle { padding-top: 0; padding-bottom: 0; background: var(--fond); }

.entete-int {
  display: flex; align-items: center; justify-content: space-between;
  min-height: calc(var(--c) * 4 / 3 + var(--g));
}

.logo {
  font-family: var(--police-titre); font-weight: 600;
  font-size: min(1.875rem, 1rem + 0.97 * var(--u)); line-height: 1;
  text-transform: uppercase;
  flex: none;
}
.logo span { display: block; white-space: nowrap; }   /* toujours sur deux lignes */

/* L'écart entre les liens se resserre sur les écrans moyens pour que le menu tienne sur une ligne. */
.menu > ul {
  list-style: none; margin: 0; padding: 0; display: flex; align-items: center;
  gap: 20px min(3.3125rem, max(1.25rem, calc(12vw - 102px)));
}
.menu > ul > li > a { white-space: nowrap; }
.menu li { position: relative; display: flex; align-items: center; }
.menu a, .menu .plus {
  font-family: var(--police-texte); font-weight: 400;
  font-size: min(0.875rem, 1rem - 0.14 * var(--u)); line-height: 1.2;
  letter-spacing: 0.2em; text-transform: uppercase;
  transition: opacity .2s;
}
.menu a:hover { opacity: .7; }
.menu a[aria-current="page"] { opacity: .7; }

/* Le petit « + » à côté de Galerie */
.plus { position: relative; width: 10px; height: 10px; margin-left: 6px; }
.plus::before, .plus::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 8px; height: 1px; background: currentColor; transform: translate(-50%, -50%);
  transition: transform .2s;
}
.plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.a-sous-menu.ouvert .plus::after { transform: translate(-50%, -50%) rotate(0deg); }

/* Sous-menu déroulant (ordinateur) */
.sous-menu {
  position: absolute; top: 100%;
  /* Centré sous « Galerie », mais sans jamais dépasser le bord droit de la page. */
  right: max(calc(50% - 120px), calc(8px - var(--bord-px)));
  width: 240px; padding-top: 20px;
  visibility: hidden; opacity: 0; transition: opacity .2s ease-out;
  z-index: 1;
}
.sous-menu ul {
  list-style: none; margin: 0; padding: 25px 0;
  background: var(--fond-accent);
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.sous-menu a { font-weight: 500; font-size: min(0.75rem, 1rem - 0.28 * var(--u)); color: var(--titres-accent); }
.a-sous-menu:hover .sous-menu, .a-sous-menu.ouvert .sous-menu, .a-sous-menu:focus-within .sous-menu {
  visibility: visible; opacity: 1;
}

/* Bouton « burger » (les trois traits) : caché sur ordinateur. */
.burger { display: none; position: relative; width: 30px; height: 20px; z-index: 61; }
.burger span, .burger span::before, .burger span::after {
  content: ""; position: absolute; right: 0; height: 2px; background: currentColor;
  transition: transform .3s, width .3s, opacity .2s, top .3s;
}
.burger span { bottom: 0; width: 24px; }
.burger span::before { top: -9px; width: 30px; }
.burger span::after { top: -18px; width: 15px; }

/* 5. PIED DE PAGE ========================================================== */

.pied {
  background: var(--fond);
  --zone: min(94vw, 1450px);
  --marge: 5vmax;
  padding: calc(var(--marge) * .25) calc((100% - var(--zone)) / 2);
  min-height: calc(var(--marge) * .5 + var(--zone) / 48);
  display: flex; align-items: center; justify-content: space-between; gap: 16px 24px;
}
.reseaux { display: flex; align-items: center; gap: 24px; list-style: none; margin: 0; padding: 0; }
.reseaux a { display: block; color: var(--titres); transition: opacity .2s; }
.reseaux a:hover { opacity: .6; }
.reseaux svg { display: block; width: 16px; height: 16px; fill: currentColor; }
.pied p { color: var(--textes); text-align: right; }
.pied p a { text-decoration: underline; text-underline-offset: 3px; }
.pied p a:hover { color: var(--titres); }

/* 6. BOUTONS, TRAITS, FORMES, IMAGES ======================================= */

/* Bouton = texte souligné d'un trait fin, qui se raccourcit au survol. */
.bouton {
  display: inline-flex; justify-content: center; align-items: center;
  max-width: 100%; position: relative; text-align: center;
  font-family: var(--police-texte); font-weight: 400;
  font-size: min(0.75rem, 1rem - 0.28 * var(--u)); line-height: 1.2;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--bouton);
  transition: color .2s ease-out;
}
.bouton span { display: inline-block; position: relative; padding: .75rem 0; word-break: break-word; }
.bouton span::after {
  content: ""; position: absolute; bottom: 0; left: calc(50% - 0.1em);
  width: 100%; height: 1px; background: currentColor;
  transform: translateX(-50%); transition: width .5s;
}
.bouton.blanc { color: #fff; }
@media (min-width: 992px) {
  .bouton:hover { color: var(--bouton-survol); }
  .bouton.blanc:hover { color: #fff; }
  .bouton:hover span::after { width: 60%; }
}

/* Trait horizontal fin */
.trait::after { content: ""; display: block; width: 100%; height: 1px; background: var(--couleur, #fff); }

/* Forme : simple rectangle de couleur, avec bordure éventuelle */
.forme { background: var(--couleur, currentColor); border: 1px solid var(--bordure, transparent); }

/* Image placée dans la grille. .remplir = recadrée pour remplir sa case ;
   .contenir = entière, sans recadrage. */
.image { overflow: hidden; display: block; }
.image img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.image.remplir img { object-fit: cover; }
.image.contenir img { object-fit: contain; }
.image::after {   /* voile sombre optionnel : style="--voile:.2" */
  content: ""; position: absolute; inset: 0; background: #000;
  opacity: var(--voile, 0); pointer-events: none;
}
a.image img { transition: transform .6s ease; }
@media (hover: hover) { a.image:hover img { transform: scale(1.03); } }

/* 7. DIAPORAMA, CARROUSEL, MOSAÏQUES, VISIONNEUSE ========================== */

/* --- Diaporama : une photo à la fois ------------------------------------- */
.el > .diaporama, .el > .carrousel { flex: 1 1 0; min-height: 0; }
.diaporama { position: relative; width: 100%; display: flex; flex-direction: column; color: #fff; }
.diapo-scene { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; touch-action: pan-y; }
.diapo {
  position: absolute; inset: 0; margin: 0;
  visibility: hidden; transform: translateX(100%);
}
.diapo.active { visibility: visible; transform: translateX(0); }
.diapo img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }

/* Flèches rondes */
.fleche {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 30px; height: 30px; border-radius: 50%;
  background: currentColor; display: grid; place-items: center;
  transition: opacity .2s;
}
.fleche:hover { opacity: .75; }
.fleche::before {
  content: ""; width: 8px; height: 8px;
  border-top: 1.5px solid #000; border-right: 1.5px solid #000;
  transform: translateX(-2px) rotate(45deg);
}
.fleche.prec::before { transform: translateX(2px) rotate(-135deg); }
.fleche.prec { left: 20px; }
.fleche.suiv { right: 20px; }

.diapo-compteur {
  font-family: var(--police-texte); font-size: min(0.75rem, 1rem - 0.28 * var(--u));
  letter-spacing: 0.05em;
}

/* Style « cotes » : flèches à l'extérieur de la photo */
.diaporama.cotes .diapo-scene { margin: 0 calc(var(--c) + var(--g)); }
.diaporama.cotes .fleche.prec { left: 0; }
.diaporama.cotes .fleche.suiv { right: 0; }
.diaporama.gris { color: var(--textes); }

/* Style « compteur » : flèches sur la photo + « 1 / 3 » en bas */
.diaporama.compteur .diapo-compteur {
  position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%); z-index: 3;
}

/* Style « vignettes » : bande de miniatures, puis flèches et compteur en dessous */
.diaporama.vignettes { color: var(--textes); }
.diapo-vignettes {
  flex: none; display: flex; gap: var(--g); margin-top: var(--g);
  height: calc(var(--r) * 2 + var(--g));
  overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth;
}
.diapo-vignettes::-webkit-scrollbar { display: none; }
.diapo-vignettes button { flex: none; height: 100%; opacity: .4; transition: opacity .2s; }
.diapo-vignettes button.active, .diapo-vignettes button:hover { opacity: 1; }
.diapo-vignettes img { height: 100%; width: auto; max-width: none; object-fit: cover; }
.diapo-barre {
  flex: none; position: relative; height: calc(var(--r) * 2 + var(--g));
  display: flex; align-items: center; justify-content: center;
}

/* --- Carrousel : plusieurs photos côte à côte, on fait défiler ------------ */
.carrousel { position: relative; width: 100%; color: #fff; display: flex; }
.carrousel-piste {
  display: flex; gap: var(--ecart, var(--g)); flex: 1 1 auto; min-width: 0;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none;
}
.carrousel-piste::-webkit-scrollbar { display: none; }
.carrousel-piste figure { flex: none; height: 100%; margin: 0; scroll-snap-align: start; }
.carrousel-piste img { height: 100%; width: auto; max-width: none; cursor: zoom-in; }

/* --- Mosaïque en rangées : photos de même hauteur, largeurs variables ----- */
.mosaique { display: flex; flex-wrap: wrap; gap: var(--g); width: 100%; }
.mosaique figure {
  margin: 0; flex-grow: 1;
  height: calc(7 * (var(--r) + var(--g)) - var(--g));
}
.mosaique img {
  height: 100%; min-width: 100%; max-width: 100%; width: auto;
  object-fit: cover; cursor: zoom-in;
}
/* --- Mosaïque en colonnes ------------------------------------------------ */
.mosaique.colonnes { display: grid; grid-template-columns: repeat(3, 1fr); }
.mosaique.colonnes figure { height: auto; }
.mosaique.colonnes img { width: 100%; height: auto; }

/* --- Grille Instagram ----------------------------------------------------- */
.grille-insta {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: var(--g);
  width: 100%; align-content: center; padding: calc(var(--r) / 2) 0;
}
.grille-insta a { display: block; aspect-ratio: 1; overflow: hidden; background: #111; }
.grille-insta img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.grille-insta a:hover img { opacity: .8; }

/* --- Visionneuse : la photo en grand par-dessus la page ------------------- */
.visionneuse {
  position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .96);
  display: none; align-items: center; justify-content: center; color: #fff;
  touch-action: pan-y;
}
.visionneuse.ouverte { display: flex; }
.visionneuse img { max-width: 94vw; max-height: 90vh; max-height: 90dvh; object-fit: contain; }
.visionneuse .fermer {
  position: absolute; top: 16px; right: 20px; width: 40px; height: 40px;
  font-size: 30px; line-height: 1; font-family: var(--police-titre);
}
.visionneuse .compte {
  position: absolute; top: 26px; left: 24px;
  font-size: 12px; letter-spacing: .05em;
}

/* 8. FORMULAIRE DE CONTACT ================================================= */

.formulaire {
  width: 100%; background: var(--fond);
  padding: clamp(24px, 3.4vw, 50px);
  display: flex; flex-direction: column; align-items: flex-start; gap: 30px;
}
.champ { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.champ label, .champ .libelle {
  font-size: min(0.875rem, 1rem - 0.14 * var(--u)); font-weight: 400; line-height: 1.6; color: var(--titres);
}
.champ .requis { color: var(--titres); margin-left: 4px; }
.champ input[type="text"], .champ input[type="email"], .champ textarea {
  width: 100%; background: transparent; color: var(--textes);
  border: 1px solid var(--details); border-radius: 0;
  font: 400 min(0.75rem, 1rem - 0.28 * var(--u))/1.8 var(--police-texte);
  padding: 12px 14px; outline-offset: 2px;
}
.champ textarea { min-height: 102px; resize: vertical; }
.case { display: flex; align-items: flex-start; gap: 12px; }
.case input { width: 16px; height: 16px; margin: 4px 0 0; accent-color: var(--titres); flex: none; }
.case label { font-size: min(0.75rem, 1rem - 0.28 * var(--u)); line-height: 1.8; color: var(--textes); }
.case label a { text-decoration: underline; text-underline-offset: 3px; }
.piege {   /* champ invisible qui piège les robots */
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.formulaire .retour { font-size: 1rem; color: var(--titres); text-transform: none; letter-spacing: 0; }
.formulaire .retour[hidden] { display: none; }
.formulaire button[disabled] { opacity: .3; cursor: not-allowed; }

/* Page de texte simple (mentions légales) */
.page-texte { width: min(94vw, 760px); margin: 0 auto; padding: 5vmax 0; }
.page-texte h1 { margin-bottom: 1.2em; }
.page-texte h2 { font-size: min(1.5rem, 1rem + 0.56 * var(--u)); margin: 2em 0 .6em; }
.page-texte p { margin-bottom: 1em; font-weight: 300; font-size: min(0.875rem, 1rem - 0.14 * var(--u)); letter-spacing: 0; }
.page-texte a { text-decoration: underline; text-underline-offset: 3px; }
.a-completer { color: #e8c07a; }

/* 9. TABLETTE (768 à 991 px) =============================================== */
/* Une « media query » applique des règles seulement pour certaines largeurs d'écran. */

@media (max-width: 991px) {
  .bloc {
    --zone: calc(100vw - 80px);
    --ph: var(--haut-t, var(--haut, 1));
    --pb: var(--bas-t, var(--bas, 1));
  }
  .grille { grid-template-rows: var(--rangees-t, repeat(var(--lignes-t, var(--lignes)), var(--R))); }
  .el { grid-area: var(--t, var(--d)); }
  .entete, .pied { --zone: calc(100vw - 80px); }
  .entete-int { min-height: calc(var(--c) * 2 + var(--g) * 2); }   /* trois lignes de grille */
  .pied { padding-top: calc(var(--marge) * .5); padding-bottom: calc(var(--marge) * .5); }

  /* Le menu devient un panneau plein écran, ouvert par le burger. */
  .burger { display: block; }
  .menu {
    position: fixed; inset: 0; z-index: 60;
    background: var(--fond-accent); color: var(--titres-accent);
    padding: 96px 20px 20px; overflow-y: auto;
    visibility: hidden; opacity: 0; transition: opacity .3s, visibility .3s;
  }
  .menu-ouvert .menu { visibility: visible; opacity: 1; }
  .menu-ouvert { overflow: hidden; }
  .menu-ouvert .entete { color: var(--titres-accent); }
  .menu > ul { flex-direction: column; gap: 30px; padding: 15px 0; }
  .menu li { flex-wrap: wrap; justify-content: center; }
  .menu a, .menu .sous-menu a {
    font-family: var(--police-titre); font-weight: 400;
    font-size: min(1.875rem, 1rem + 0.97 * var(--u)); line-height: 1.3;
    letter-spacing: -0.02em; text-transform: none;
  }
  .menu .sous-menu a { font-size: min(1.5rem, 1rem + 0.56 * var(--u)); }
  .plus { width: 16px; height: 16px; margin-left: 12px; }
  .plus::before, .plus::after { width: 14px; }
  .sous-menu {
    position: static; right: auto; width: 100%; padding: 0;
    visibility: visible; opacity: 1; max-height: 0; overflow: hidden; transition: max-height .3s ease-out;
  }
  .a-sous-menu:hover .sous-menu, .a-sous-menu:focus-within .sous-menu { max-height: 0; }
  .a-sous-menu.ouvert .sous-menu { max-height: 400px; }
  .sous-menu ul { background: transparent; padding: 15px 0 0; gap: 15px; }
  /* Le burger se transforme en croix quand le menu est ouvert. */
  .menu-ouvert .burger span { background: transparent; }
  .menu-ouvert .burger span::before { top: -9px; width: 30px; transform: rotate(45deg); }
  .menu-ouvert .burger span::after { top: -9px; width: 30px; transform: rotate(-45deg); }
}

/* 10. TÉLÉPHONE (767 px et moins) ========================================== */

@media (max-width: 767px) {
  .bloc {
    --zone: calc(100vw - 40px);
    --cols: 8;                                 /* 8 colonnes au lieu de 24 */
    --g: calc(var(--zone) / 32);
    --c: calc((var(--zone) - 7 * var(--g)) / 8);
    --r: calc(var(--c) * 2 / 3 + var(--g));
    --rt: calc(var(--c) * 0.553);
    --ph: var(--haut-m, var(--haut, 1));
    --pb: var(--bas-m, var(--bas, 1));
  }
  .bloc.sans-espace { --g: 0px; --c: calc(var(--zone) / 8); --r: calc(var(--zone) * 0.0897); }
  .grille {
    grid-template-rows: var(--rangees-m, repeat(var(--lignes-m, var(--lignes)), var(--R)));
    row-gap: 0;
  }
  .el { grid-area: var(--m, var(--t, var(--d))); margin: calc(var(--g) / 2) 0; }
  .el[style*="--m:1/"] { margin-top: 0; }           /* pas de marge au-dessus de la première ligne */
  .bloc.sans-espace .el { margin: 0; }

  .vide-m { display: block; }

  .vm-haut { justify-content: flex-start; }
  .vm-centre { justify-content: center; }
  .vm-bas { justify-content: flex-end; }
  .hm-gauche { align-items: flex-start; }
  .hm-centre { align-items: center; }
  .m-centre { text-align: center; }
  .m-gauche { text-align: left; }

  .entete, .pied { --zone: calc(100vw - 40px); }
  .entete { --g: calc(var(--zone) / 32); --c: calc((var(--zone) - 7 * var(--g)) / 8); }
  .entete-int { min-height: calc(var(--c) * 4 / 3 + var(--g)); }

  .pied { flex-direction: column; padding-top: var(--marge); padding-bottom: var(--marge); gap: 28px; }
  .pied p { text-align: center; }

  .diaporama.cotes .diapo-scene { margin: 0; }
  .diaporama.cotes .fleche.prec, .fleche.prec { left: 8px; }
  .diaporama.cotes .fleche.suiv, .fleche.suiv { right: 8px; }
  .mosaique figure { height: calc(4 * var(--r) - var(--g)); }
  .mosaique.colonnes { grid-template-columns: repeat(2, 1fr); }
  .grille-insta { grid-template-columns: repeat(3, 1fr); padding: 0; }
}

/* Respecte le réglage « réduire les animations » du système. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
