/* ============================================================
   SAMABEL — DESIGN SYSTEM
   ------------------------------------------------------------
   Direction : clair minimal · pierre · bois naturel.
   Référence : Norm Architects, Aesop, Foster + Partners.

   Ce fichier est structuré en 3 couches :
     1. TOKENS      → :root. La charte. C'est le SEUL endroit à toucher
                      pour rehabiller tout le groupe.
     2. PRIMITIVES  → typo, boutons, eyebrow, grille, nav. Réutilisables.
     3. SECTIONS    → hero scrub, stats, éditorial, galerie, process,
                      valeurs, prestations, témoignage, manifeste, contact.

   MULTI-DIVISIONS : chaque division du groupe hérite du squelette et ne
   redéfinit QUE son accent, via [data-division="..."] sur <body>.
   Voir le bloc "DIVISIONS" plus bas. La cohérence est structurelle,
   pas décorative — c'est ce qui la rend indéboulonnable.
   ============================================================ */

/* ============================================================
   1. TOKENS — LA CHARTE
   ============================================================ */
:root {
  /* ---- Fonds : du blanc pur à la pierre ---- */
  --bg:          #faf9f6;   /* blanc pur cassé — fond de page */
  --bg-2:        #f2efe9;   /* pierre clair — bandes alternées */
  --bg-3:        #e9e5dc;   /* pierre — surfaces, cadres vides */
  --ink:         #131311;   /* noir profond — bandes d'ancrage (stats, témoignage, footer) */

  /* ---- Texte sur fond clair ---- */
  --fg:          #171613;   /* near-black — jamais #000 */
  --fg-soft:     #4a473f;   /* gris anthracite — corps de texte */
  --muted:       #8b877c;   /* gris pierre — labels, légendes, legal */

  /* ---- Texte sur fond sombre (--ink, images, hero) ---- */
  --on-ink:       #f6f4ef;  /* blanc tiède — jamais #fff */
  --on-ink-soft:  #cac5b9;
  --on-ink-muted: #8b8578;

  /* ---- Accent : UN SEUL. Bois naturel / chêne huilé. ---- */
  --accent:      #9a7b4f;
  --accent-ink:  #c2a173;   /* même accent, remonté pour rester lisible sur --ink */

  /* ---- Filets : jamais de bordure pleine, uniquement des hairlines ---- */
  --line:        rgba(23, 22, 19, 0.12);
  --line-strong: rgba(23, 22, 19, 0.22);
  --line-ink:    rgba(246, 244, 239, 0.16);

  /* ---- Grille & rythme ---- */
  --maxw:        1280px;
  --maxw-narrow: 940px;
  --pad:         clamp(22px, 5vw, 88px);
  --section-y:   clamp(96px, 14vh, 200px);
  --section-y-lg:clamp(120px, 19vh, 260px);

  /* ---- Motion ---- */
  --ease:        cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);

  /* ---- Typographie ---- */
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans:  "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ============================================================
   DIVISIONS DU GROUPE
   ------------------------------------------------------------
   Le squelette (rythme, grille, typo, whitespace) ne bouge JAMAIS.
   Une division = un accent. C'est tout. Ajoute une ligne ici et
   pose data-division="xxx" sur <body> du site de cette division.
   ============================================================ */
[data-division="bois"]         { --accent: #9a7b4f; --accent-ink: #c2a173; } /* chêne huilé */
[data-division="architecture"] { --accent: #6e6b60; --accent-ink: #a3a091; } /* graphite pierre */
[data-division="promotion"]    { --accent: #7d6a52; --accent-ink: #ad9576; } /* terre cuite sourde */
[data-division="renovation"]   { --accent: #8a6a4a; --accent-ink: #b8916a; } /* brique patinée */
[data-division="exterieur"]    { --accent: #5f6b57; --accent-ink: #93a189; } /* vert forêt sourd */
[data-division="investissement"]{ --accent: #6b6558; --accent-ink: #a09889; } /* pierre froide */

/* ============================================================
   2. PRIMITIVES
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* 🔴 clip, JAMAIS hidden : hidden casse le position:sticky du hero scrub. */
  overflow-x: clip;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

h1, h2, h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.015em;
}
em { font-style: italic; }

::selection { background: var(--accent); color: var(--bg); }

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

/* Ancrage : la nav fixe ne doit pas manger le titre de section. */
section[id] { scroll-margin-top: 90px; }

.u-visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* ---- Conteneur & en-tête de section ---------------------------------- */
.container { max-width: var(--maxw); margin: 0 auto; }
.container--narrow { max-width: var(--maxw-narrow); }

.section { padding: var(--section-y) var(--pad); }
.section--lg { padding: var(--section-y-lg) var(--pad); }
.section--stone { background: var(--bg-2); }
.section--ink { background: var(--ink); color: var(--on-ink); }

.section__head { max-width: 720px; margin-bottom: clamp(48px, 7vw, 96px); }
.section__title { font-size: clamp(38px, 5.4vw, 82px); }
.section__title em { color: var(--accent); }
.section--ink .section__title em { color: var(--accent-ink); }

/* ---- Eyebrow ---- */
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 24px;
}
.eyebrow--light { color: var(--on-ink-soft); }
.eyebrow--ink   { color: var(--accent-ink); }
.eyebrow--center { text-align: center; }

/* ---- Corps de texte ---- */
.lede {
  font-size: clamp(16px, 1.35vw, 19px);
  color: var(--fg-soft);
  max-width: 48ch;
  margin: 28px 0 0;
  line-height: 1.8;
}
.section--ink .lede { color: var(--on-ink-soft); }
.meta {
  font-size: 13px; color: var(--muted);
  letter-spacing: 0.03em; margin: 24px 0 0;
}

/* ---- Boutons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--sans); font-size: 11px; font-weight: 500;
  letter-spacing: 0.2em; text-transform: uppercase;
  padding: 17px 32px; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: background .4s var(--ease), color .4s var(--ease),
              border-color .4s var(--ease), transform .4s var(--ease);
}
.btn__arrow { transition: transform .4s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

/* Primaire — sur fond clair */
.btn--primary { background: var(--fg); color: var(--bg); }
.btn--primary:hover { background: var(--accent); transform: translateY(-2px); }

/* Secondaire — hairline sur fond clair */
.btn--ghost { color: var(--fg); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--fg); background: var(--fg); color: var(--bg); transform: translateY(-2px); }

/* Sur image / hero — texte clair */
.btn--light { color: var(--on-ink); border-color: rgba(246,244,239,0.45); }
.btn--light:hover { background: var(--on-ink); color: var(--ink); transform: translateY(-2px); }

.btn--onink { background: var(--on-ink); color: var(--ink); }
.btn--onink:hover { background: var(--accent-ink); transform: translateY(-2px); }

/* ---- Barre de progression de lecture ---- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: var(--accent); z-index: 200;
  transition: width .1s linear;
}

/* ============================================================
   NAV — transparente sur le hero, verre clair une fois passé
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 150;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 26px var(--pad);
  color: var(--on-ink); /* état par défaut : au-dessus du hero sombre */
  transition: background .55s var(--ease), padding .55s var(--ease),
              color .55s var(--ease), border-color .55s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-past-hero {
  background: rgba(250, 249, 246, 0.82);
  backdrop-filter: blur(16px) saturate(115%);
  -webkit-backdrop-filter: blur(16px) saturate(115%);
  color: var(--fg);
  border-bottom-color: var(--line);
}
.nav.is-scrolled { padding-top: 16px; padding-bottom: 16px; }

.nav__brand {
  font-family: var(--sans); font-weight: 500;
  font-size: 15px; letter-spacing: 0.44em; padding-left: 0.44em;
  white-space: nowrap;
}
.nav__links { display: flex; gap: clamp(22px, 2.6vw, 40px); }
.nav__links a {
  font-size: 11px; font-weight: 400; letter-spacing: 0.16em; text-transform: uppercase;
  opacity: 0.78; position: relative; padding: 5px 0;
  transition: opacity .35s var(--ease);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--accent); transition: width .45s var(--ease);
}
.nav.is-past-hero .nav__links a::after { background: var(--accent); }
.nav__links a:hover { opacity: 1; }
.nav__links a:hover::after { width: 100%; }

.nav__cta {
  font-size: 10px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  border: 1px solid currentColor; padding: 11px 22px; border-radius: 999px;
  white-space: nowrap; opacity: 0.9;
  transition: background .4s var(--ease), color .4s var(--ease),
              transform .4s var(--ease), opacity .4s var(--ease);
}
.nav__cta:hover { background: currentColor; opacity: 1; transform: translateY(-1px); }
.nav__cta:hover span { color: var(--ink); }
.nav.is-past-hero .nav__cta:hover span { color: var(--bg); }

/* ============================================================
   3. SECTIONS
   ============================================================ */

/* ------------------------------------------------------------
   HERO — fly-through scroll-scrub
   La hauteur pilote la VITESSE du vol :  hauteur_vh ≈ frames × 4.6
   → 121 frames ≈ 560vh. Trop rapide : monte vers ×6. Trop lent : ×3.
   Vol branché : 121 frames → 121 × 4.6 ≈ 560vh.
   ------------------------------------------------------------ */
.scrub { position: relative; height: 560vh; background: var(--ink); }
.scrub__stage { position: sticky; top: 0; height: 100vh; overflow: hidden; }
.scrub__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scrub__scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(12,12,10,0.86) 0%, rgba(12,12,10,0.30) 44%, rgba(12,12,10,0) 68%),
    linear-gradient(to bottom, rgba(12,12,10,0.55) 0%, rgba(12,12,10,0) 30%),
    linear-gradient(to right, rgba(12,12,10,0.42) 0%, rgba(12,12,10,0) 62%);
}

/* Loader de préchargement des frames */
.loader {
  position: absolute; inset: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  background: var(--ink);
  transition: opacity .9s var(--ease), visibility .9s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__brand {
  font-family: var(--sans); font-size: 13px; letter-spacing: 0.52em;
  padding-left: 0.52em; color: var(--on-ink);
}
.loader__track { width: 180px; height: 1px; background: var(--line-ink); overflow: hidden; }
.loader__bar { display: block; height: 100%; width: 0; background: var(--accent-ink); transition: width .25s var(--ease); }
.loader__pct { font-size: 10px; letter-spacing: 0.24em; color: var(--on-ink-muted); }

/* Beats — légendes en fondu par-dessus le vol */
.scrub__beat {
  position: absolute; left: var(--pad); bottom: clamp(72px, 14vh, 152px);
  z-index: 10; max-width: 760px; opacity: 0;
  color: var(--on-ink); will-change: opacity, transform;
}
.scrub__eyebrow {
  font-size: 11px; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--accent-ink); margin: 0 0 20px;
}
.scrub__title {
  font-size: clamp(56px, 9.4vw, 140px); line-height: 0.92;
  text-shadow: 0 2px 60px rgba(0,0,0,0.4);
}
.scrub__title em { font-style: italic; }
.scrub__tagline {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(19px, 2.2vw, 30px);
  color: var(--on-ink-soft); margin: 24px 0 0; max-width: 32ch;
  text-shadow: 0 1px 24px rgba(0,0,0,0.45);
}
.scrub__beat-title {
  font-family: var(--serif); font-weight: 400; line-height: 1.02; letter-spacing: -0.015em;
  font-size: clamp(38px, 6vw, 92px); text-shadow: 0 2px 50px rgba(0,0,0,0.4);
}
.scrub__beat-title em {
  color: var(--accent);
}
.scrub__beat-copy {
  font-size: clamp(16px, 1.4vw, 20px); color: var(--on-ink-soft);
  margin: 24px 0 0; max-width: 44ch; line-height: 1.75;
  text-shadow: 0 1px 22px rgba(0,0,0,0.5);
}
.scrub__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.scrub__cue {
  position: absolute; right: var(--pad); bottom: clamp(52px, 10vh, 104px); z-index: 10;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  font-size: 9px; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--on-ink-soft);
}
.scrub__cue-line {
  width: 1px; height: 58px;
  background: linear-gradient(var(--on-ink-soft), transparent);
  animation: cuePulse 2.6s var(--ease) infinite;
}
@keyframes cuePulse {
  0%, 100% { opacity: .3; transform: scaleY(.65); transform-origin: top; }
  50%      { opacity: 1;  transform: scaleY(1); }
}

/* ------------------------------------------------------------
   STATS — bande d'ancrage sombre, compteurs animés
   ------------------------------------------------------------ */
.stats { background: var(--ink); padding: clamp(76px, 12vh, 140px) var(--pad); }
.stats__inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(28px, 4vw, 64px);
}
.stat { border-left: 1px solid var(--line-ink); padding-left: 28px; }
.stat__num {
  display: block; font-family: var(--serif); font-weight: 400;
  font-size: clamp(48px, 5.8vw, 84px); line-height: 1; color: var(--on-ink);
}
.stat__unit { font-size: 0.38em; color: var(--accent-ink); letter-spacing: 0.02em; }
.stat__label {
  display: block; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--on-ink-muted); margin-top: 18px;
}

/* ------------------------------------------------------------
   ÉDITORIAL — asymétrique, image + texte (jamais 50/50)
   ------------------------------------------------------------ */
.editorial { padding: var(--section-y) var(--pad); background: var(--bg); }
.editorial--stone { background: var(--bg-2); }
.editorial__inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.18fr 0.82fr;
  gap: clamp(40px, 6vw, 100px); align-items: center;
}
.editorial--reverse .editorial__media { order: 2; }
.editorial--reverse .editorial__text  { order: 1; }
.editorial__text { max-width: 500px; }
.editorial__title { font-size: clamp(36px, 5vw, 76px); }
.editorial__title em { color: var(--accent); }

/* Cadre image : ratio fixe (zéro saut de layout) + repli texturé
   si l'image manque — jamais un trou noir. */
.frame {
  margin: 0; position: relative; overflow: hidden; border-radius: 2px;
  aspect-ratio: 16 / 10; background: var(--bg-3);
  background-image: repeating-linear-gradient(45deg, rgba(23,22,19,0.022) 0 14px, transparent 14px 28px);
  box-shadow: 0 44px 90px -52px rgba(23,22,19,0.42);
}
.frame::after {
  content: "Image à venir"; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--sans); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); opacity: 0.55; pointer-events: none;
}
.frame img {
  position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.5s var(--ease);
}
.editorial__media:hover .frame img { transform: scale(1.035); }

/* ------------------------------------------------------------
   FULL-BLEED — image plein écran, scrim renforcé, texte bas-gauche
   Scrim fort : sur un site clair, une photo claire ne porte pas
   le texte toute seule.
   ------------------------------------------------------------ */
.bleed {
  position: relative; min-height: 92vh;
  display: flex; align-items: center; overflow: hidden;
  color: var(--on-ink);
}
.bleed--tall { min-height: 100vh; }
.bleed__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bleed__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(to top,   rgba(12,12,10,0.90) 0%, rgba(12,12,10,0.40) 42%, rgba(12,12,10,0.06) 68%),
    linear-gradient(to right, rgba(12,12,10,0.68) 0%, rgba(12,12,10,0.18) 52%, rgba(12,12,10,0) 82%);
}
.bleed__content { position: relative; z-index: 2; max-width: 740px; padding: 0 var(--pad); }
.bleed__content--low { align-self: flex-end; padding-bottom: clamp(68px, 12vh, 130px); }
.bleed__title { font-size: clamp(38px, 5.8vw, 92px); text-shadow: 0 2px 44px rgba(0,0,0,0.45); }
.bleed__copy {
  font-size: clamp(16px, 1.35vw, 19px); color: var(--on-ink);
  max-width: 48ch; margin: 26px 0 38px; line-height: 1.8;
  text-shadow: 0 1px 26px rgba(0,0,0,0.85), 0 1px 4px rgba(0,0,0,0.55);
}
/* Grille 3 colonnes plutôt que flex : les valeurs longues
   ("R 6,5 m²·K/W") faisaient déborder puis passer une spec à la ligne. */
.bleed__specs {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2.6vw, 40px);
}
.bleed__specs li {
  display: flex; flex-direction: column; gap: 6px;
  padding-top: 18px; border-top: 1px solid rgba(246,244,239,0.28);
}
.bleed__spec-k { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-ink); text-align: center;}
.bleed__spec-v { font-family: var(--serif); font-size: clamp(18px, 1.7vw, 23px); }

/* ------------------------------------------------------------
   GALERIE — le cœur. Mosaïque asymétrique, le texte est secondaire.
   ------------------------------------------------------------ */
.gallery { background: var(--bg-2); padding: var(--section-y-lg) var(--pad); }
.gallery__head {
  max-width: var(--maxw); margin: 0 auto clamp(48px, 6vw, 88px);
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 40px; flex-wrap: wrap;
}
.gallery__head-text { max-width: 620px; }
.gallery__grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: clamp(14px, 1.6vw, 26px);
}

/* Mosaïque : l'empreinte (grid-column) est posée en ligne par le JS,
   calculée pour qu'aucune rangée ne reste incomplète quel que soit le
   nombre de chantiers. Ici on ne décrit que le RATIO associé à chaque
   largeur — c'est l'irrégularité qui fait le portfolio d'architecte. */
.project { position: relative; grid-column: span var(--span, 12); }

/* La carte entière est un bouton : toute la surface est cliquable, et
   l'ouverture de la fiche est atteignable au clavier sans rien ajouter. */
.project__ouvrir {
  display: block; width: 100%; padding: 0; margin: 0;
  background: none; border: 0; text-align: left; cursor: pointer;
  font: inherit; color: inherit;
}
.project__ouvrir:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }

.project__media {
  display: block; position: relative; overflow: hidden;
  background: var(--bg-3); border-radius: 2px;
}
.project--w7  .project__media { aspect-ratio: 3 / 2; }
.project--w5  .project__media { aspect-ratio: 4 / 5; }
.project--w12 .project__media { aspect-ratio: 24 / 10; }

.project__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.6s var(--ease);
}
.project__ouvrir:hover .project__media img { transform: scale(1.045); }

.project__veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(12,12,10,0.62) 0%, rgba(12,12,10,0.12) 40%, rgba(12,12,10,0) 66%);
  opacity: 0; transition: opacity .7s var(--ease);
}
.project__ouvrir:hover .project__veil,
.project__ouvrir:focus-visible .project__veil { opacity: 1; }

/* Affordance : rien n'indiquait qu'une carte était cliquable. */
.project__loupe {
  position: absolute; z-index: 2; left: 22px; bottom: 22px;
  display: inline-block; padding: 10px 20px; border-radius: 999px;
  background: rgba(246, 244, 239, 0.92); color: var(--ink);
  font-size: 10px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  opacity: 0; transform: translateY(8px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
  pointer-events: none;
}
.project__ouvrir:hover .project__loupe,
.project__ouvrir:focus-visible .project__loupe { opacity: 1; transform: translateY(0); }

.project__caption {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 20px; padding: 18px 2px 0; border-top: 1px solid var(--line); margin-top: 18px;
}
.project__name { font-family: var(--serif); font-size: clamp(19px, 1.9vw, 26px); color: var(--fg); }
.project__meta { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }

.gallery__noscript { max-width: var(--maxw); margin: 0 auto; color: var(--fg-soft); }

/* ------------------------------------------------------------
   FICHE CHANTIER (modale)
   ------------------------------------------------------------ */
.fiche { position: fixed; inset: 0; z-index: 300; display: flex; }
.fiche[hidden] { display: none; }

.fiche__backdrop {
  position: absolute; inset: 0;
  background: rgba(19, 19, 17, 0.62);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .45s var(--ease);
}
.fiche.is-open .fiche__backdrop { opacity: 1; }

.fiche__panel {
  position: relative; z-index: 1;
  margin: auto; width: min(1120px, calc(100% - 2 * var(--pad)));
  max-height: min(88vh, 900px);
  /* 🔴 overflow-x: hidden en plus du défilement vertical : rien ne doit
     pouvoir être déplacé latéralement à l'intérieur de la fiche, même si
     un contenu dépasse (mot long, image large, transition en cours). */
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  background: var(--bg); border-radius: 3px;
  box-shadow: 0 60px 120px -50px rgba(19, 19, 17, 0.6);
  /* 🔴 minmax(0, …) et non 1fr : une piste `1fr` vaut minmax(auto, 1fr),
     et ce `auto` refuse de passer sous la largeur min-content des enfants.
     La piste s'élargit alors au-delà du panneau et le contenu devient
     déplaçable latéralement. C'est LA cause des débordements en grille. */
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  opacity: 0; transform: translateY(18px) scale(0.985);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.fiche.is-open .fiche__panel { opacity: 1; transform: none; }

.fiche__close {
  position: absolute; top: 16px; right: 16px; z-index: 3;
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(250, 249, 246, 0.9); border: 1px solid var(--line);
  color: var(--fg);
  transition: background .35s var(--ease), transform .35s var(--ease);
}
.fiche__close svg { width: 18px; height: 18px; }
.fiche__close:hover { background: var(--fg); color: var(--bg); transform: rotate(90deg); }

/* ---- Galerie photo de la fiche ---- */
.fiche__media {
  margin: 0; position: relative; background: var(--bg-3);
  display: flex; flex-direction: column; min-height: 0; min-width: 0;
}
.fiche__body { min-width: 0; }
.fiche__viewport { position: relative; flex: 1; overflow: hidden; min-height: 260px; }
.fiche__viewport img {
  width: 100%; height: 100%; object-fit: cover;
  transition: opacity .26s var(--ease);
}
/* Fondu croisé entre deux photos : le JS pose la classe le temps du
   préchargement, puis permute le src et la retire. */
.fiche__viewport.est-en-fondu img { opacity: 0; }

.fiche__photo-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  display: none; align-items: center; justify-content: center;
  background: rgba(246, 244, 239, 0.88); border: 1px solid var(--line);
  color: var(--ink);
  transition: background .3s var(--ease), opacity .3s var(--ease);
}
.fiche__photo-nav svg { width: 20px; height: 20px; }
.fiche__photo-nav:hover { background: var(--fg); color: var(--bg); }
.fiche__photo-nav--prev { left: 14px; }
.fiche__photo-nav--next { right: 14px; }

.fiche__photo-rang {
  position: absolute; right: 14px; bottom: 14px; z-index: 2;
  display: none; padding: 7px 14px; border-radius: 999px;
  background: rgba(19, 19, 17, 0.62); color: var(--on-ink);
  font-size: 10px; letter-spacing: 0.16em;
}

.fiche__legende {
  margin: 0; padding: 12px 16px;
  font-size: 12px; letter-spacing: 0.02em; color: var(--muted);
  background: var(--bg-2); border-top: 1px solid var(--line);
}
.fiche__legende:empty { display: none; }

/* Grille qui se replie plutôt qu'une bande qui défile : rien ne sort
   jamais du panneau sur l'axe horizontal, quel que soit le nombre de
   photos. Au-delà de ce que la ligne peut tenir, ça passe à la ligne. */
.fiche__vignettes {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 8px; padding: 12px 16px;
  background: var(--bg-2); border-top: 1px solid var(--line);
  overflow: hidden;
}
.fiche__vignettes:empty { display: none; }
.fiche__vignette {
  width: 100%; aspect-ratio: 3 / 2; height: auto; padding: 0; cursor: pointer;
  border: 1px solid transparent; border-radius: 2px; overflow: hidden;
  background: var(--bg-3); opacity: 0.55;
  transition: opacity .3s var(--ease), border-color .3s var(--ease);
}
.fiche__vignette img { width: 100%; height: 100%; object-fit: cover; }
.fiche__vignette:hover { opacity: 0.85; }
.fiche__vignette.est-active { opacity: 1; border-color: var(--accent); }

/* Contrôles révélés seulement s'il y a plus d'une photo — le JS pose
   la classe sur le panneau. */
.fiche__panel.a-plusieurs-photos .fiche__photo-nav,
.fiche__panel.a-plusieurs-photos .fiche__photo-rang { display: flex; }

/* ---- Transition d'une fiche à l'autre ----
   Le contenu sort du côté de la navigation, puis entre depuis l'autre. */
.fiche__media, .fiche__body {
  transition: opacity .26s var(--ease), transform .26s var(--ease);
}
.fiche__panel.sans-transition .fiche__media,
.fiche__panel.sans-transition .fiche__body { transition: none; }

.fiche__panel.sort-gauche  .fiche__media,
.fiche__panel.sort-gauche  .fiche__body,
.fiche__panel.entre-gauche .fiche__media,
.fiche__panel.entre-gauche .fiche__body { opacity: 0; transform: translateX(-26px); }

.fiche__panel.sort-droite  .fiche__media,
.fiche__panel.sort-droite  .fiche__body,
.fiche__panel.entre-droite .fiche__media,
.fiche__panel.entre-droite .fiche__body { opacity: 0; transform: translateX(26px); }

.fiche__body { padding: clamp(32px, 4vw, 56px); }
.fiche__titre { font-size: clamp(30px, 3.4vw, 48px); margin-top: 4px; }
.fiche__resume {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(18px, 1.7vw, 23px); color: var(--fg-soft);
  margin: 18px 0 0; line-height: 1.5;
}
.fiche__specs {
  list-style: none; margin: clamp(26px, 3vw, 38px) 0 0; padding: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0;
  border-top: 1px solid var(--line);
}
.fiche__specs li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  padding: 13px 0; border-bottom: 1px solid var(--line);
}
.fiche__specs li:nth-child(odd) { padding-right: 18px; }
.fiche__specs li:nth-child(even) { padding-left: 18px; }
.fiche__spec-k { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.fiche__spec-v { font-family: var(--serif); font-size: 16px; color: var(--fg); text-align: right; }
.fiche__texte { color: var(--fg-soft); margin: clamp(24px, 3vw, 34px) 0 clamp(28px, 3vw, 38px); font-size: 15px; }

.fiche__nav {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 18px clamp(32px, 4vw, 56px);
  border-top: 1px solid var(--line); background: var(--bg-2);
}
.fiche__nav button {
  background: none; border: 0; cursor: pointer; padding: 8px 0;
  font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--fg); transition: color .3s var(--ease);
}
.fiche__nav button:hover { color: var(--accent); }
.fiche__rang { font-family: var(--serif); font-size: 15px; color: var(--muted); }

/* ------------------------------------------------------------
   PROCESSUS — timeline verticale, ligne qui se remplit au scroll
   ------------------------------------------------------------ */
.process { background: var(--bg); padding: var(--section-y-lg) var(--pad); }
.process__inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(44px, 6vw, 100px); align-items: start;
}
.process__head { position: sticky; top: 130px; }
.process__steps { position: relative; list-style: none; margin: 0; padding: 0 0 0 clamp(34px, 4vw, 58px); }
/* Rail + jauge de progression */
.process__steps::before,
.process__steps::after {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 1px;
}
.process__steps::before { background: var(--line); }
.process__steps::after {
  background: var(--accent); transform-origin: top;
  transform: scaleY(var(--process-fill, 0));
  transition: transform .35s linear;
}
.step { position: relative; padding: clamp(26px, 3.2vw, 44px) 0; }
.step + .step { border-top: 1px solid var(--line); }
.step__dot {
  position: absolute; left: calc(clamp(34px, 4vw, 58px) * -1); top: calc(clamp(26px, 3.2vw, 44px) + 14px);
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line-strong);
  transform: translateX(-3px);
  transition: background .5s var(--ease), border-color .5s var(--ease), transform .5s var(--ease);
}
.step.is-reached .step__dot { background: var(--accent); border-color: var(--accent); transform: translateX(-3px) scale(1.25); }
.step__index {
  font-family: var(--sans); font-size: 12px; letter-spacing: 0.22em;
  color: var(--accent); display: block; margin-bottom: 12px;
}
.step__title { font-family: var(--serif); font-size: clamp(26px, 2.8vw, 40px); color: var(--fg); }
.step__copy { color: var(--fg-soft); margin: 14px 0 0; max-width: 52ch; font-size: 15px; }

/* ------------------------------------------------------------
   VALEURS — cartes, effet verre très discret, lueur au curseur
   ------------------------------------------------------------ */
.values { background: var(--bg-2); padding: var(--section-y-lg) var(--pad); }
.values__grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(28px, 3.4vw, 56px);
}

/* Un principe = un filet, un mot, une phrase. Le filet se remplit en
   accent au survol : c'est la seule animation, et elle suffit. */
.principe {
  position: relative;
  padding-top: clamp(22px, 2.4vw, 32px);
  border-top: 1px solid var(--line-strong);
}
.principe::after {
  content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 0;
  background: var(--accent); transition: width .9s var(--ease);
}
.principe:hover::after { width: 100%; }

.principe__titre {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(26px, 2.7vw, 40px); line-height: 1.05; color: var(--fg);
}
.principe__copy {
  color: var(--fg-soft); font-size: 15px; line-height: 1.7;
  margin: clamp(14px, 1.6vw, 20px) 0 0; max-width: 34ch;
}

/* ------------------------------------------------------------
   PRESTATIONS — liste numérotée, tête sticky
   ------------------------------------------------------------ */
.amenities { background: var(--bg); padding: var(--section-y-lg) var(--pad); }
.amenities__inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 0.82fr 1.18fr; gap: clamp(44px, 6vw, 100px); align-items: start;
}
.amenities__head { position: sticky; top: 130px; }
.amenities__title { font-size: clamp(32px, 4.2vw, 62px); }
.amenities__title em { color: var(--accent); }
.amenities__list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(30px, 4vw, 60px);
}
.amenity {
  display: flex; gap: 20px; align-items: baseline;
  padding: 26px 0; border-bottom: 1px solid var(--line);
}
.amenity__index {
  font-family: var(--serif); font-size: 15px; color: var(--accent);
  letter-spacing: 0.04em; flex: 0 0 auto; min-width: 28px;
}
.amenity__text { font-size: clamp(15px, 1.1vw, 17px); color: var(--fg-soft); line-height: 1.55; }

/* ------------------------------------------------------------
   TÉMOIGNAGE — bande sombre, grande photo + citation
   ------------------------------------------------------------ */
.testimonial { background: var(--ink); color: var(--on-ink); padding: var(--section-y-lg) var(--pad); }
.testimonial__inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 0.72fr 1.28fr;
  gap: clamp(40px, 6vw, 92px); align-items: center;
}
.testimonial__media { position: relative; overflow: hidden; border-radius: 2px; aspect-ratio: 7 / 8; background: #1d1c19; }
.testimonial__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.6s var(--ease); }
.testimonial__media:hover img { transform: scale(1.04); }
.testimonial__quote {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(27px, 3.4vw, 52px); line-height: 1.22;
  letter-spacing: -0.012em; color: var(--on-ink); margin: 0;
}
.testimonial__quote em { color: var(--accent-ink); }
.testimonial__author { display: flex; flex-direction: column; gap: 4px; margin-top: clamp(32px, 4vw, 52px); padding-top: 26px; border-top: 1px solid var(--line-ink); }
.testimonial__name { font-size: 14px; letter-spacing: 0.06em; color: var(--on-ink); }
.testimonial__role { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--on-ink-muted); }

/* ------------------------------------------------------------
   MANIFESTE — le seul centrage légitime du site
   ------------------------------------------------------------ */
.manifesto { background: var(--bg); padding: var(--section-y-lg) var(--pad); }
.manifesto__inner { max-width: var(--maxw-narrow); margin: 0 auto; text-align: center; }
.manifesto__title { font-size: clamp(38px, 6.2vw, 104px); }
.manifesto__title em { color: var(--accent); }
.manifesto__copy {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(19px, 2.1vw, 30px); color: var(--fg-soft);
  margin: 38px auto 0; max-width: 58ch; line-height: 1.55;
}

/* ------------------------------------------------------------
   CONTACT — formulaire + coordonnées
   ------------------------------------------------------------ */
.contact { background: var(--bg-2); padding: var(--section-y-lg) var(--pad); }
.contact__inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(44px, 7vw, 110px); align-items: start;
}
.contact__title { font-size: clamp(32px, 4.4vw, 62px); margin-top: 6px; }
.contact__title em { color: var(--accent); }
.contact__copy { color: var(--fg-soft); max-width: 44ch; margin: 28px 0 0; }
.contact__details { display: flex; flex-direction: column; margin-top: clamp(40px, 5vw, 64px); }
.contact__row {
  display: flex; justify-content: space-between; align-items: baseline; gap: 20px;
  padding: 20px 0; border-bottom: 1px solid var(--line);
  transition: padding-left .4s var(--ease);
}
.contact__row:not(.contact__row--static):hover { padding-left: 10px; }
.contact__label { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.contact__value { font-family: var(--serif); font-size: clamp(17px, 1.6vw, 23px); color: var(--fg); text-align: right; }

/* Formulaire */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 2.4vw, 34px); }
.field { display: flex; flex-direction: column; gap: 10px; }
.field--full { grid-column: 1 / -1; }
.field__label { font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
.field input,
.field select,
.field textarea {
  font-family: var(--sans); font-size: 16px; font-weight: 300; color: var(--fg);
  background: transparent; border: 0; border-bottom: 1px solid var(--line-strong);
  padding: 12px 0; border-radius: 0; width: 100%;
  transition: border-color .4s var(--ease);
}
.field textarea { resize: vertical; min-height: 108px; line-height: 1.6; }
.field select { appearance: none; cursor: pointer; }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: .7; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-bottom-color: var(--accent);
}
.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea { border-bottom-color: #a4483a; }
.field__error { font-size: 12px; color: #a4483a; min-height: 1em; display: none; }
.field.is-invalid .field__error { display: block; }

.form__foot { grid-column: 1 / -1; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 8px; }
.form__note { font-size: 12px; color: var(--muted); max-width: 34ch; }
.form__status { grid-column: 1 / -1; font-size: 14px; color: var(--accent); min-height: 1.4em; }

/* ------------------------------------------------------------
   FOOTER
   ------------------------------------------------------------ */
.footer { background: var(--ink); color: var(--on-ink); padding: clamp(70px, 10vh, 130px) var(--pad) 40px; }
.footer__inner {
  max-width: var(--maxw); margin: 0 auto; padding-bottom: 56px;
  border-bottom: 1px solid var(--line-ink);
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: clamp(36px, 5vw, 80px);
}
.footer__brand { font-family: var(--serif); font-size: clamp(34px, 4.2vw, 58px); display: block; }
.footer__brand em { color: var(--accent-ink); }
.footer__tagline { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--on-ink-muted); margin: 14px 0 0; max-width: 30ch; }
.footer__col-title { font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--on-ink-muted); margin: 0 0 20px; }
.footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.footer__list a { font-size: 14px; color: var(--on-ink-soft); transition: color .35s var(--ease); }
.footer__list a:hover { color: var(--accent-ink); }
.footer__base {
  max-width: var(--maxw); margin: 32px auto 0;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.footer__legal { font-size: 12px; color: var(--on-ink-muted); }

/* ============================================================
   COUCHE MOTION (additive — ne touche jamais au moteur scrub)
   Tout est neutralisé sous prefers-reduced-motion (bloc final).
   ============================================================ */

/* Reveal générique à l'entrée dans le viewport */
.reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Révélation des titres ligne par ligne, derrière un masque (JS) */
.ml-reveal .ml-line { overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.ml-reveal .ml-line__inner {
  display: block; transform: translateY(110%);
  transition: transform 0.95s var(--ease-out);
  transition-delay: var(--ml-delay, 0s);
  will-change: transform;
}
.ml-reveal.is-shown .ml-line__inner { transform: translateY(0); }

/* Eyebrow au-dessus d'un titre masqué : ouverture au clip-path */
.ml-eyebrow {
  clip-path: inset(0 0 100% 0); opacity: 0;
  transition: clip-path 0.75s var(--ease), opacity 0.75s var(--ease);
}
.ml-eyebrow.is-shown { clip-path: inset(0 0 0 0); opacity: 1; }

/* Compteurs */
.stat__num.is-counting { font-variant-numeric: tabular-nums; }

/* Parallaxe des full-bleed — JS pose --py */
.bleed__img { will-change: transform; transform: translate3d(0, var(--py, 0px), 0) scale(1.14); }

/* Masque d'apparition des images de galerie.
   🔴 Le clip-path porte sur .project__media, JAMAIS sur .project :
   un élément clippé à hauteur zéro n'intersecte plus rien, donc
   l'IntersectionObserver ne le révélerait jamais (il s'observe lui-même
   invisible). On observe le conteneur, on masque l'enfant.
   .is-masked n'est posée que par le JS : sans JS, la galerie reste visible. */
.project.is-masked .project__media {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.15s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}
.project.is-masked.is-visible .project__media { clip-path: inset(0 0 0 0); }

.project.is-masked .project__caption {
  opacity: 0; transform: translateY(14px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: calc(var(--reveal-delay, 0s) + .28s);
}
.project.is-masked.is-visible .project__caption { opacity: 1; transform: none; }

/* Retour tactile sur les CTA */
.btn:active, .nav__cta:active { transform: translateY(0) scale(0.985); transition-duration: 0.12s; }

/* Intro : la nav apparaît une fois la page prête (gating CSS pur —
   si le JS échoue, la nav reste visible). */
body.intro-ready .nav { opacity: 0; transform: translateY(-14px); }
body.intro-ready.is-loaded .nav {
  opacity: 1; transform: translateY(0);
  transition: opacity .9s var(--ease), transform .9s var(--ease),
              background .55s var(--ease), color .55s var(--ease), padding .55s var(--ease);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .values__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 980px) {
  .editorial__inner,
  .contact__inner,
  .testimonial__inner { grid-template-columns: 1fr; gap: 44px; }
  .editorial--reverse .editorial__media { order: 1; }
  .editorial--reverse .editorial__text  { order: 2; }
  .testimonial__media { aspect-ratio: 16 / 10; }
  .stats__inner { grid-template-columns: repeat(2, 1fr); gap: 44px 30px; }
  .amenities__inner,
  .process__inner { grid-template-columns: 1fr; gap: 48px; }
  .amenities__head, .process__head { position: static; }
  .amenities__list { grid-template-columns: 1fr; }
  .nav__links { display: none; }

  /* Galerie : mosaïque → deux colonnes lisibles */
  .project { grid-column: span 6; }
  .project--w12 { grid-column: span 12; }

  /* La modale passe en une colonne, image en tête. */
  .fiche__panel { grid-template-columns: minmax(0, 1fr); max-height: 92vh; }
  /* 🔴 Le ratio va sur le VIEWPORT, jamais sur .fiche__media : ce dernier
     contient aussi la légende et les vignettes, et le contraindre à 16:10
     rognait la bande de vignettes. */
  .fiche__media { aspect-ratio: auto; }
  .fiche__viewport { aspect-ratio: 16 / 10; flex: 0 0 auto; }

  /* Vignettes plus grandes au doigt : la grille les étire, on ne fixe
     que la taille minimale — sinon elles déborderaient du panneau. */
  .fiche__vignettes { padding: 14px 16px; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
  .fiche__vignette { opacity: 0.7; }
  .fiche__vignette.est-active { border-width: 2px; }
  /* 🔴 En une colonne, le panneau défile — un bouton en position:absolute
     disparaît avec le contenu et la sortie devient introuvable. On le fixe
     au viewport (.fiche est déjà en position:fixed). */
  .fiche__close { position: fixed; top: 14px; right: 14px; }
}

/* 🔴 820px = le breakpoint JS `isSmall` : sous cette largeur le scrub passe
   en STATIQUE (une frame fixe). Le hero DOIT donc revenir à 100vh, sinon on
   scrolle plusieurs écrans de vide sur une image figée.
   Si tu changes le breakpoint JS, change celui-ci du même coup. */
@media (max-width: 820px) {
  .scrub { height: 100vh; }
  .scrub__cue { display: none; }
}

@media (max-width: 700px) {
  .form { grid-template-columns: 1fr; }
  .gallery__grid { grid-template-columns: 1fr; }
  .project, .project--w12 { grid-column: span 1; }
  /* En une colonne, tout le monde repasse au même ratio : la mosaïque
     n'a plus de sens, la lisibilité prime. */
  .project--w5 .project__media,
  .project--w12 .project__media { aspect-ratio: 4 / 3; }
  .fiche__specs { grid-template-columns: 1fr; }
  .fiche__specs li:nth-child(odd),
  .fiche__specs li:nth-child(even) { padding-left: 0; padding-right: 0; }
  .fiche__nav { padding-left: var(--pad); padding-right: var(--pad); }
}

@media (max-width: 560px) {
  .stats__inner { grid-template-columns: 1fr; }
  .values__grid { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .footer__base { flex-direction: column; align-items: flex-start; }
  /* Le CTA reste visible sur mobile : les liens de nav basculent dans le
     footer, mais le chemin de conversion, lui, ne disparaît jamais.
     On le resserre au lieu de le masquer. */
  .nav__cta { padding: 10px 16px; letter-spacing: 0.12em; font-size: 9px; }
  .nav__brand { font-size: 13px; letter-spacing: 0.3em; padding-left: 0.3em; }
  .bleed__specs { gap: 22px; }
  .contact__value { text-align: left; }
  .contact__row { flex-direction: column; gap: 6px; }

  /* Fiche chantier : largeur FIXE sur téléphone.
     Avant, le panneau faisait 100% - 2×pad, donc ~88 % de l'écran quelle
     que soit sa taille — il collait aux bords sur les grands modèles.
     Une largeur fixe donne la même respiration partout. Le max-width
     reste un garde-fou pour les écrans étroits (≤ 352 px). */
  .fiche__panel { width: 320px; max-width: calc(100% - 32px); }
  /* Exactement 3 par ligne dans 320 px : la grille les dimensionne, donc
     ça tient toujours, et une 4e photo passe simplement à la ligne. */
  .fiche__vignettes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px 14px; }
  /* Un mot très long (nom de commune, référence) ne doit pas pousser
     le panneau et créer un déplacement latéral. */
  .fiche__titre, .fiche__resume, .fiche__texte,
  .fiche__spec-v, .fiche__legende { overflow-wrap: anywhere; }
}

/* ============================================================
   PREFERS-REDUCED-MOTION — neutralise TOUTE la couche motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .ml-reveal .ml-line { overflow: visible; padding-bottom: 0; margin-bottom: 0; }
  .ml-reveal .ml-line__inner { transform: none !important; transition: none !important; }
  .ml-eyebrow { clip-path: none !important; opacity: 1 !important; transition: none !important; }
  .project__media,
  .project__caption { clip-path: none !important; opacity: 1 !important; transform: none !important; transition: none !important; }
  .fiche__panel, .fiche__backdrop,
  .fiche__media, .fiche__body,
  .fiche__viewport img { transition: none !important; transform: none !important; opacity: 1 !important; }
  .fiche__close:hover { transform: none !important; }
  .bleed__img { transform: none !important; will-change: auto; }
  .principe::after { transition: none !important; }
  .btn:active, .nav__cta:active { transform: none !important; }
  .process__steps::after { transition: none !important; }
  body.intro-ready .nav { opacity: 1 !important; transform: none !important; transition: none !important; }
}
