/* ===========================================================
   MAIN.CSS — Base, layout, composants partagés
   Ordre de chargement : tokens.css → main.css → pages.css
   =========================================================== */

/* ─────────────────────────────────────────────────────────
   1. RESET
   ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* L'attribut `hidden` doit toujours masquer, y compris sur des éléments à qui
   une classe impose un `display` (boutons, panneaux, groupes du catalogue).
   Sans cette règle, `display: flex` l'emporte et l'élément reste visible. */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-default);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-light);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--fw-semi);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  text-wrap: balance;
}
p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }

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

ul, ol { margin: 0; padding: 0; list-style: none; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}
button { background: none; border: none; cursor: pointer; padding: 0; }

::selection { background: var(--sable); color: var(--noir); }

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

/* Lien d'évitement clavier */
.skip-link {
  position: absolute;
  top: -100px; left: var(--sp-sm);
  z-index: var(--z-modal);
  background: var(--noir);
  color: var(--vanille);
  padding: 12px 22px;
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: var(--sp-sm); }

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

/* ─────────────────────────────────────────────────────────
   2. LAYOUT
   ───────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide { max-width: var(--container-wide); }
.container--text { max-width: var(--container-text); }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: var(--section-y-tight); }

/* Fonds de section */
.section--vanille { background: var(--vanille); }
.section--soft    { background: var(--vanille-clair); }
.section--white   { background: var(--blanc); }
.section--deep    { background: var(--bg-deep); color: var(--text-invert); }
.section--deep .section__title,
.section--deep h2, .section--deep h3 { color: var(--vanille); }
.section--deep p { color: rgba(241, 234, 218, 0.78); }

/* PIÈGE CONNU — deux sections consécutives de même fond additionnent leurs
   marges verticales et creusent un trou visuel. On neutralise le padding
   haut de la seconde pour que le rythme reste continu. */
.section--vanille + .section--vanille,
.section--soft    + .section--soft,
.section--white   + .section--white,
.section--deep    + .section--deep { padding-top: 0; }

/* ─────────────────────────────────────────────────────────
   3. TYPOGRAPHIE
   ───────────────────────────────────────────────────────── */

/* Sur-titre : capitales très espacées. C'est la signature typographique
   du site — elle donne le registre premium malgré la neutralité de Montserrat. */
.eyebrow {
  display: inline-block;
  font-size: var(--fs-nano);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: var(--sp-sm);
}
.eyebrow--accent { color: var(--sable-fonce); }
.eyebrow--invert { color: rgba(241, 234, 218, 0.72); }
/* Sur mobile le sur-titre retombe souvent sur une zone claire de la photo :
   on remonte le contraste plutôt que de le masquer. */
@media (max-width: 780px) {
  .eyebrow--invert { color: rgba(241, 234, 218, 0.92); }
}

/* Filet décoratif accolé au sur-titre.
   `align-items: flex-start` + décalage vertical : sur mobile le libellé passe
   souvent sur deux lignes, et un alignement centré ferait flotter le filet
   au milieu du bloc au lieu de la première ligne. */
.eyebrow--line { display: flex; align-items: flex-start; gap: 14px; }
.eyebrow--line::before {
  content: '';
  width: 34px; height: 1px;
  margin-top: 0.62em;
  background: var(--sable);
  flex: none;
}
/* Dans un bloc centré, le sur-titre doit porter son filet des deux côtés.
   Le bloc étant en flex, `text-align: center` ne l'atteint pas : avec un seul
   filet à gauche, l'ensemble est bien centré mais les mots, eux, paraissent
   décalés vers la droite. */
.section__head--center .eyebrow--line,
.text-center .eyebrow--line { justify-content: center; }
.section__head--center .eyebrow--line::after,
.text-center .eyebrow--line::after {
  content: '';
  width: 34px; height: 1px;
  margin-top: 0.62em;
  background: var(--sable);
  flex: none;
}

/* Mot d'accroche manuscrit — réservé aux mots isolés, jamais un paragraphe */
.script {
  font-family: var(--font-script);
  font-size: var(--fs-script);
  font-weight: var(--fw-regular);
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  color: var(--noir);
}

/* Grands titres : Regular + interlettrage resserré. Le SemiBold reste sur les
   niveaux inférieurs (cartes, valeurs), où il porte la hiérarchie. */
.title-display,
.title-1,
.title-2 {
  font-weight: var(--fw-display);
  letter-spacing: -0.025em;
}
.title-display { font-size: var(--fs-display); line-height: var(--lh-tight); }
.title-1 { font-size: var(--fs-h1); }
.title-2 { font-size: var(--fs-h2); }
.title-3 { font-size: var(--fs-h3); }

.lead {
  font-size: var(--fs-lead);
  line-height: var(--lh-loose);
  color: var(--text-soft);
  font-weight: var(--fw-light);
}
.text-soft  { color: var(--text-soft); }
.text-center { text-align: center; }

/* En-tête de section réutilisable */
.section__head { margin-bottom: var(--sp-xl); max-width: 720px; }
.section__head--center { margin-inline: auto; text-align: center; }
.section__title {
  font-size: var(--fs-h1);
  font-weight: var(--fw-display);
  letter-spacing: -0.025em;
  margin-bottom: var(--sp-sm);
}
.section__intro { font-size: var(--fs-lead); color: var(--text-soft); line-height: var(--lh-loose); }

/* ─────────────────────────────────────────────────────────
   4. BOUTONS
   ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 34px;
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--t-base) var(--ease),
              color var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease),
              transform var(--t-fast) var(--ease);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--noir);
  color: var(--vanille);
  border-color: var(--noir);
}
.btn--primary:hover { background: transparent; color: var(--noir); }

.btn--outline {
  background: transparent;
  color: var(--noir);
  border-color: var(--line-strong);
}
.btn--outline:hover { background: var(--noir); color: var(--vanille); border-color: var(--noir); }

.btn--light {
  background: var(--vanille);
  color: var(--noir);
  border-color: var(--vanille);
}
.btn--light:hover { background: transparent; color: var(--vanille); border-color: rgba(241, 234, 218, 0.5); }

.btn--ghost-light {
  background: transparent;
  color: var(--vanille);
  border-color: rgba(241, 234, 218, 0.4);
}
.btn--ghost-light:hover { background: var(--vanille); color: var(--noir); border-color: var(--vanille); }

.btn--sm { padding: 12px 24px; font-size: var(--fs-nano); }

/* Lien fléché souligné à l'ouverture */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line-strong);
  transition: gap var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.link-arrow:hover { gap: 18px; border-color: var(--noir); }
.link-arrow::after { content: '→'; font-size: 14px; line-height: 1; }

/* ─────────────────────────────────────────────────────────
   5. HEADER
   ───────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-header);
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease),
              height var(--t-base) var(--ease);
}
/* Sur un hero plein écran, le header est posé sur la photo */
.site-header--over { background: transparent; }
.site-header--over .header__inner { color: var(--vanille); }
.site-header--over .logo-svg { color: var(--vanille); }

/* Au scroll (classe posée par main.js) ou sur les pages sans hero */
.site-header.is-stuck,
.site-header--solid {
  background: var(--vanille);
  box-shadow: 0 1px 0 var(--line);
  height: var(--header-h-sm);
}
.site-header.is-stuck .header__inner,
.site-header--solid .header__inner { color: var(--noir); }
.site-header.is-stuck .logo-svg,
.site-header--solid .logo-svg { color: var(--noir); }

/* Trois colonnes égales sur les bords : c'est ce qui garde le logo
   optiquement centré même quand la navigation et les actions n'ont pas la
   même largeur. */
.header__inner {
  width: 100%;
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--sp-sm);
  color: var(--noir);
}

.header__logo {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
  /* PIÈGE CONNU — un enfant en width:100% dans un conteneur sans largeur
     explicite se réduit à zéro et l'image disparaît. On dimensionne le
     conteneur du logo, jamais l'inverse.
     Ratio 2.08 : à 148px de large il fait 71px de haut, ce qui remplit bien
     un header de 96px sans toucher les bords. */
  width: clamp(112px, 11vw, 148px);
  transition: width var(--t-base) var(--ease);
}
.site-header.is-stuck .header__logo,
.site-header--solid .header__logo { width: clamp(100px, 9vw, 124px); }

.logo-svg {
  width: 100%;
  height: auto;
  color: var(--noir);
  transition: color var(--t-base) var(--ease);
}
.logo-svg path { fill: currentColor; }

/* Navigation principale */
.nav { display: flex; align-items: center; gap: clamp(18px, 2.2vw, 36px); }
.nav--gauche { grid-column: 1; justify-self: start; }
.nav__link {
  position: relative;
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  padding-block: 8px;
  white-space: nowrap;
  transition: opacity var(--t-fast) var(--ease);
}
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 2px;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--t-base) var(--ease);
}
.nav__link:hover::after,
.nav__link.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav__link.is-active { font-weight: var(--fw-semi); }

/* Sous-menu « Nos univers » */
.nav__item { position: relative; }
.nav__toggle { display: inline-flex; align-items: center; gap: 7px; }
.nav__toggle::before {
  content: '';
  width: 5px; height: 5px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  order: 2;
  transition: transform var(--t-base) var(--ease);
}
.nav__item:hover .nav__toggle::before,
.nav__item:focus-within .nav__toggle::before { transform: rotate(225deg) translateY(-3px); }

/* Aligné sur le bord gauche de son parent, et non centré : « Nos univers »
   ouvre la navigation, un menu centré sur lui déborderait hors de l'écran. */
.nav__submenu {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  transform: translateY(-8px);
  min-width: 268px;
  background: var(--vanille);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  padding: var(--sp-2xs);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base) var(--ease),
              transform var(--t-base) var(--ease),
              visibility var(--t-base);
}
.nav__item:hover .nav__submenu,
.nav__item:focus-within .nav__submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
/* Zone tampon : évite que le menu se ferme en traversant l'espace vide */
.nav__submenu::before {
  content: '';
  position: absolute;
  top: -16px; left: 0; right: 0;
  height: 16px;
}
.nav__submenu a {
  display: block;
  padding: 13px 18px;
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--noir);
  transition: background var(--t-fast) var(--ease), padding-left var(--t-fast) var(--ease);
}
.nav__submenu a:hover { background: var(--vanille-fonce); padding-left: 24px; }
/* Page courante : un filet sable à gauche plutôt qu'un simple gras, pour ne
   pas dépendre de la seule couleur. */
.nav__submenu a.is-active {
  font-weight: var(--fw-medium);
  box-shadow: inset 2px 0 0 var(--sable-fonce);
}

/* Actions à droite : lien contact + recherche + CTA */
.header__actions {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* 44 px : le minimum pour être visé du pouce sans rater. Le picto, lui,
     garde sa taille — c'est la zone sensible qui grandit. */
  width: 44px; height: 44px;
  border-radius: var(--radius-pill);
  transition: background var(--t-fast) var(--ease);
}
.icon-btn:hover { background: rgba(27, 24, 21, 0.07); }
.site-header--over .icon-btn:hover { background: rgba(241, 234, 218, 0.18); }
.icon-btn svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.4; }

/* Burger — colonne de gauche sur mobile, pour équilibrer le logo centré */
.burger {
  display: none;
  grid-column: 1;
  justify-self: start;
  width: 44px; height: 44px;   /* cible tactile confortable */
  align-items: center;
  justify-content: center;
}
.burger span {
  display: block;
  width: 22px; height: 1.5px;
  background: currentColor;
  position: relative;
  transition: background var(--t-fast) var(--ease);
}
.burger span::before, .burger span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 22px; height: 1.5px;
  background: currentColor;
  transition: transform var(--t-base) var(--ease);
}
.burger span::before { top: -7px; }
.burger span::after  { top: 7px; }
body.menu-open .burger span { background: transparent; }
body.menu-open .burger span::before { transform: translateY(7px) rotate(45deg); }
body.menu-open .burger span::after  { transform: translateY(-7px) rotate(-45deg); }

/* ─────────────────────────────────────────────────────────
   6. MENU MOBILE
   ───────────────────────────────────────────────────────── */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: var(--z-menu);
  background: var(--vanille);
  padding: calc(var(--header-h-sm) + var(--sp-lg)) var(--gutter) var(--sp-xl);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity var(--t-base) var(--ease),
              transform var(--t-base) var(--ease),
              visibility var(--t-base);
}
body.menu-open .mobile-menu { opacity: 1; visibility: visible; transform: none; }
body.menu-open { overflow: hidden; }

.mobile-menu__list { display: flex; flex-direction: column; }
.mobile-menu__list > li { border-bottom: 1px solid var(--line); }
.mobile-menu__list a {
  display: block;
  padding: 20px 0;
  font-size: clamp(19px, 4.4vw, 25px);
  font-weight: var(--fw-light);
  letter-spacing: var(--ls-wide);
}
.mobile-menu__list .is-sub a {
  padding: 13px 0 13px var(--sp-sm);
  font-size: var(--fs-small);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--text-soft);
}
.mobile-menu__foot { margin-top: var(--sp-xl); display: flex; flex-direction: column; gap: var(--sp-sm); }

/* ─────────────────────────────────────────────────────────
   7. RECHERCHE
   ───────────────────────────────────────────────────────── */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(27, 24, 21, 0.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-base) var(--ease), visibility var(--t-base);
}
body.search-open .search-overlay { opacity: 1; visibility: visible; }

.search-panel {
  background: var(--vanille);
  padding: var(--sp-xl) var(--gutter);
  transform: translateY(-24px);
  transition: transform var(--t-base) var(--ease-out);
}
body.search-open .search-panel { transform: none; }

.search-form {
  max-width: var(--container-text);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: var(--sp-xs);
}
.search-form input {
  flex: 1;
  min-width: 0;   /* sinon l'input déborde du flex sur mobile */
  background: none;
  border: none;
  font-size: clamp(20px, 3.2vw, 32px);
  font-weight: var(--fw-light);
  padding: 6px 0;
}
.search-form input::placeholder { color: var(--text-faint); }
.search-form input:focus { outline: none; }
/* La croix d'effacement native de type="search" s'affiche en bleu système,
   juste à côté de notre propre croix de fermeture : deux croix, dont une hors
   charte. On garde la nôtre. */
.search-form input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.search-hint {
  max-width: var(--container-text);
  margin: var(--sp-sm) auto 0;
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-wide);
  color: var(--text-faint);
}

/* Suggestions au fil de la frappe.
   La hauteur est bornée et la liste défile : sur un écran bas, six résultats
   pousseraient le champ hors de vue. */
.search-results {
  max-width: var(--container-text);
  margin: var(--sp-sm) auto 0;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.suggestion + .suggestion { border-top: 1px solid var(--line); }
.suggestion__link,
.suggestion__tous {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 10px 12px;
  color: inherit;
  text-decoration: none;
  transition: background var(--t-fast) var(--ease);
}
.suggestion.is-active .suggestion__link,
.suggestion.is-active .suggestion__tous,
.suggestion__link:hover,
.suggestion__tous:hover { background: var(--vanille-fonce); }

.suggestion__thumb {
  flex: none;
  width: 56px; height: 44px;
  overflow: hidden;
  background: var(--vanille-fonce);
}
.suggestion__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Une page n'a pas de vignette : le carré reste, pour que les titres
   s'alignent d'une ligne à l'autre. */
.suggestion__thumb.is-vide { background: var(--sable-clair); }

.suggestion__body { min-width: 0; }   /* sans quoi un titre long pousse la ligne */
.suggestion__type,
.suggestion__titre { display: block; }
.suggestion__type {
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 2px;
}
.suggestion__titre {
  font-size: 15px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.suggestion--vide {
  padding: 14px 12px;
  color: var(--text-soft);
  font-size: 15px;
}
.suggestion__tous {
  justify-content: center;
  font-size: var(--fs-micro);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}
.suggestion--tous { border-top: 1px solid var(--line-strong); }

/* ─────────────────────────────────────────────────────────
   8. MÉDIAS
   ───────────────────────────────────────────────────────── */
.media { position: relative; overflow: hidden; background: var(--vanille-fonce); }
.media img { width: 100%; height: 100%; object-fit: cover; }

.media--ratio-1  { aspect-ratio: 1 / 1; }
.media--ratio-43 { aspect-ratio: 4 / 3; }
.media--ratio-34 { aspect-ratio: 3 / 4; }
.media--ratio-169{ aspect-ratio: 16 / 9; }
.media--ratio-32 { aspect-ratio: 3 / 2; }

/* Arche — motif repris du logo */
.media--arch { border-radius: var(--radius-arch); }
/* Le rayon vertical se calcule sur la hauteur : une photo plus haute a besoin
   d'un pourcentage plus petit pour garder le même demi-cercle. */
.media--arch.media--ratio-34 { border-radius: var(--radius-arch-34); }

/* Zoom doux au survol d'une carte */
.media--zoom img { transition: transform var(--t-slow) var(--ease-out); }
a:hover .media--zoom img,
.card:hover .media--zoom img { transform: scale(1.05); }

/* La carte se soulève de quelques pixels : le zoom seul se remarque à peine
   quand la photo est petite. */
.realisation__link,
.theme__link { display: block; transition: transform var(--t-base) var(--ease-out); }
.realisation:hover .realisation__link,
.realisation__link:focus-visible,
.theme:not(.is-empty):hover .theme__link,
.theme__link:focus-visible { transform: translateY(-6px); }

/* ─────────────────────────────────────────────────────────
   9. APPARITION AU SCROLL
   ───────────────────────────────────────────────────────── */
/* L'état masqué n'est appliqué QUE si JavaScript répond (classe posée par un
   script inline dans le <head>). Sans cette garde, un échec de chargement du
   JS rendrait la totalité du contenu invisible — pour le visiteur comme pour
   les moteurs de recherche. */
.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.85s var(--ease-out), transform 0.85s var(--ease-out);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.reveal--d1 { transition-delay: 0.1s; }
.reveal--d2 { transition-delay: 0.2s; }
.reveal--d3 { transition-delay: 0.3s; }
.reveal--d4 { transition-delay: 0.4s; }
.reveal--d5 { transition-delay: 0.5s; }

/* Glissement latéral, pour les blocs côte à côte : le texte et la photo
   n'arrivent pas du même bord, ce qui donne son sens à la composition. */
.js .reveal--gauche { transform: translate3d(-30px, 0, 0); }
.js .reveal--droite { transform: translate3d(30px, 0, 0); }
/* Sous 900 px les blocs sont empilés : l'arrivée latérale n'a plus de sens, et
   les 30 px de décalage créaient une barre de défilement horizontale le temps
   de l'animation. */
@media (max-width: 900px) {
  .js .reveal--gauche,
  .js .reveal--droite { transform: translate3d(0, 22px, 0); }
}

/* Dévoilement en volet : le cadre s'ouvre de haut en bas. Il remplace le
   glissement de base — les deux ensemble feraient beaucoup pour une photo. */
.js .reveal--voile { opacity: 1; transform: none; }
.js .reveal--voile .media,
.js .reveal--voile > img {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.05s var(--ease-out);
  transition-delay: inherit;
}
.js .reveal--voile.is-visible .media,
.js .reveal--voile.is-visible > img { clip-path: inset(0 0 0 0); }

/* Parallaxe : la photo dérive un peu moins vite que la page.
   L'image est volontairement plus haute que son cadre, et remontée d'autant :
   c'est cette réserve — 8 % en haut, 8 % en bas — qui autorise le décalage
   sans jamais découvrir le fond. Le décalage en pourcentage passe par `top`
   et non par une marge : une marge en pourcentage se calcule sur la LARGEUR
   du conteneur, ce qui donnerait n'importe quoi sur un bandeau panoramique. */
.js .parallax > img,
.js .parallax .media > img {
  position: relative;
  height: 116%;
  top: -8%;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
  /* La variante « visible » est plus spécifique que la règle de base : il faut
     la neutraliser elle aussi, sans quoi le volet resterait piloté par une
     transition dont on ne veut pas ici. */
  .js .reveal--voile .media,
  .js .reveal--voile > img,
  .js .reveal--voile.is-visible .media,
  .js .reveal--voile.is-visible > img { clip-path: none; transition: none; }
  .js .parallax > img,
  .js .parallax .media > img { height: 100%; top: 0; transform: none !important; }
}

/* ─────────────────────────────────────────────────────────
   9 bis. FORMULAIRES
   Partagés entre la page d'attente et la page contact.
   ───────────────────────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: var(--sp-sm); }

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-sm);
}
@media (max-width: 620px) { .form__row { grid-template-columns: 1fr; } }

.form__group { display: flex; flex-direction: column; gap: 7px; min-width: 0; }

/* Champ piège anti-spam : hors écran plutôt que display:none, que certains
   robots savent reconnaître et ignorer. Hors flux, il ne décale rien. */
.form__piege {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__group label {
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--text-soft);
}
.form__group label span[aria-hidden] { color: var(--sable-fonce); }
.form__optional {
  text-transform: none;
  letter-spacing: 0;
  font-weight: var(--fw-light);
  font-style: italic;
  color: var(--text-faint);
}

.form__group input,
.form__group select,
.form__group textarea {
  width: 100%;
  padding: 13px 15px;
  background: var(--blanc);
  border: 1px solid var(--line);
  border-radius: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-light);
  color: var(--text-default);
  transition: border-color var(--t-fast) var(--ease);
  /* Sans cela, Safari applique son propre style aux champs date et select. */
  -webkit-appearance: none;
  appearance: none;
}
.form__group textarea { resize: vertical; min-height: 120px; line-height: 1.6; }

/* Le select perd sa flèche avec appearance:none — on la redessine. */
.form__group select {
  background-image:
    linear-gradient(45deg, transparent 50%, var(--gris) 50%),
    linear-gradient(135deg, var(--gris) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
  cursor: pointer;
}

.form__group input:focus,
.form__group select:focus,
.form__group textarea:focus {
  outline: none;
  border-color: var(--noir);
}
.form__group input::placeholder,
.form__group textarea::placeholder { color: var(--text-faint); }

.form__group.has-error input,
.form__group.has-error select,
.form__group.has-error textarea { border-color: #b5533f; }

.form__error { font-size: var(--fs-micro); color: #b5533f; }

.form__consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: var(--sp-2xs);
}
.form__consent input {
  flex: none;
  width: 17px; height: 17px;
  margin-top: 3px;
  accent-color: var(--noir);
  cursor: pointer;
}
.form__consent label {
  font-size: var(--fs-small);
  font-weight: var(--fw-light);
  line-height: 1.6;
  color: var(--text-soft);
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}
.form__consent.has-error label { color: #b5533f; }

.form__submit { align-self: flex-start; margin-top: var(--sp-xs); }
.form__status { font-size: var(--fs-small); min-height: 1.3em; }
.form__status.is-ok    { color: #2f5a3c; }
.form__status.is-error { color: #b5533f; }

.form-success {
  padding: var(--sp-md);
  background: var(--blanc);
  border-left: 2px solid var(--sable);
  font-size: var(--fs-lead);
  line-height: var(--lh-loose);
  text-align: left;
}

/* ─────────────────────────────────────────────────────────
   10. FOOTER
   ───────────────────────────────────────────────────────── */
.site-footer { background: var(--noir-doux); color: var(--vanille); }

.footer__top {
  padding-block: var(--section-y-tight);
  border-bottom: 1px solid rgba(241, 234, 218, 0.13);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
  gap: var(--sp-xl) var(--sp-lg);
}
.footer__logo { width: 172px; margin-bottom: var(--sp-sm); }
.footer__logo .logo-svg { color: var(--vanille); }
.footer__tagline {
  font-size: var(--fs-small);
  color: rgba(241, 234, 218, 0.62);
  line-height: var(--lh-normal);
  max-width: 30ch;
}
.footer__title {
  font-size: var(--fs-nano);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: rgba(241, 234, 218, 0.58);   /* 5.2:1 sur le fond du pied — c’était 4.3:1 */
  margin-bottom: var(--sp-sm);
}
.footer__list li { margin-bottom: 11px; }
.footer__list a {
  font-size: var(--fs-small);
  color: rgba(241, 234, 218, 0.82);
  transition: color var(--t-fast) var(--ease), padding-left var(--t-fast) var(--ease);
}
.footer__list a:hover { color: var(--vanille); padding-left: 5px; }

/* Newsletter — discrète, comme demandé */
.newsletter__label {
  font-size: var(--fs-small);
  color: rgba(241, 234, 218, 0.62);
  margin-bottom: var(--sp-xs);
  line-height: var(--lh-normal);
}
.newsletter__form {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(241, 234, 218, 0.3);
  padding-bottom: 9px;
  transition: border-color var(--t-base) var(--ease);
}
.newsletter__form:focus-within { border-color: var(--vanille); }
.newsletter__form input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  color: var(--vanille);
  /* 16 px : sous ce seuil, iOS zoome tout seul à la mise au point du champ et
     déforme la page. La hauteur passe à 44 px, comme toute cible tactile. */
  font-size: 16px;
  min-height: 44px;
  padding: 4px 0;
}
.newsletter__form input::placeholder { color: rgba(241, 234, 218, 0.6); }
.newsletter__form input:focus { outline: none; }
.newsletter__form button {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 4px;
  font-size: var(--fs-nano);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--vanille);
  opacity: 0.72;
  transition: opacity var(--t-fast) var(--ease);
}
.newsletter__form button:hover { opacity: 1; }
.newsletter__note {
  font-size: var(--fs-nano);
  color: rgba(241, 234, 218, 0.62);   /* 5.8:1 — c’était 3.1:1 */
  margin-top: 10px;
  line-height: 1.6;
}
.newsletter__msg { font-size: var(--fs-micro); margin-top: 10px; min-height: 1em; }
.newsletter__msg.is-ok    { color: #a8c8a0; }
.newsletter__msg.is-error { color: #e0a89a; }

.footer__socials { display: flex; gap: var(--sp-xs); margin-top: var(--sp-md); }
.footer__socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;   /* cible tactile */
  border: 1px solid rgba(241, 234, 218, 0.24);
  border-radius: var(--radius-pill);
  transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.footer__socials a:hover { background: var(--vanille); border-color: var(--vanille); }
.footer__socials svg { width: 16px; height: 16px; fill: currentColor; transition: fill var(--t-base) var(--ease); }
.footer__socials a:hover svg { fill: var(--noir); }

/* Trois colonnes égales sur les bords : c'est ce qui garde le crédit
   optiquement centré, même si le copyright et les liens légaux n'ont pas la
   même largeur. */
.footer__bottom {
  padding-block: var(--sp-md);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--sp-sm) var(--sp-md);
  font-size: var(--fs-micro);
  color: rgba(241, 234, 218, 0.58);   /* 5.2:1 — c’était 4.1:1 */
}
.footer__copyright { margin: 0; }
.footer__credit { margin: 0; justify-self: center; text-align: center; }
.footer__credit a {
  color: rgba(241, 234, 218, 0.62);
  border-bottom: 1px solid transparent;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.footer__credit a:hover { color: var(--vanille); border-color: var(--sable); }

.footer__legal {
  display: flex;
  gap: var(--sp-sm);
  flex-wrap: wrap;
  justify-self: end;
}
.footer__legal a { transition: color var(--t-fast) var(--ease); }
.footer__legal a:hover { color: var(--vanille); }

/* Sous cette largeur, les trois blocs ne tiennent plus côte à côte sans se
   tasser : ils s'empilent, alignés à gauche. */
@media (max-width: 1000px) {
  .footer__bottom { grid-template-columns: 1fr; justify-items: start; }
  .footer__credit { justify-self: start; text-align: left; }
  .footer__legal { justify-self: start; }
}

/* ─────────────────────────────────────────────────────────
   11. RESPONSIVE
   ───────────────────────────────────────────────────────── */
/* Le lien Contact du bloc de droite disparaît avant le reste : le bouton de
   devis y mène déjà, et l'espace se resserre d'abord de ce côté. */
@media (max-width: 1240px) {
  .nav--droite-lien { display: none; }
}

@media (max-width: 1080px) {
  .nav--gauche, .header__cta { display: none; }
  .burger { display: inline-flex; }
  .site-header { height: var(--header-h-sm); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .footer__grid { grid-template-columns: 1fr; gap: var(--sp-lg); }
  .btn { padding: 15px 26px; }
}

/* ─────────────────────────────────────────────────────────
   12. ZONES SENSIBLES AU TOUCHER
   ───────────────────────────────────────────────────────── */
/* Un lien de 20 px de haut se rate au pouce : il en faut 44. Plutôt que
   d'épaissir les liens — ce qui décalerait toute la mise en page — on étend
   leur zone sensible par un pseudo-élément. Il est en position absolue, donc
   hors flux : il ne devient pas un enfant flex et ne déplace rien.

   Le fil d'Ariane fait exception : ses éléments passent parfois à la ligne, et
   deux zones de 44 px se chevaucheraient. Là, on agrandit vraiment les liens
   et on rattrape la hauteur par une marge négative sur le conteneur. */
@media (max-width: 900px) {
  .link-arrow,
  .footer__legal a,
  .infobloc__lien,
  .detail__themes a,
  .legal__nav a {
    position: relative;
  }
  .link-arrow::before,
  .footer__legal a::before,
  .infobloc__lien::before,
  .detail__themes a::before,
  .legal__nav a::before {
    content: '';
    position: absolute;
    left: 0; right: 0;
    top: 50%;
    height: 44px;
    transform: translateY(-50%);
  }

  .fil a,
  .fil > span {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  /* Le fil garde sa place à l'écran : ce qui grandit, c'est la zone touchable. */
  .fil { margin-top: -12px; margin-bottom: calc(var(--sp-md) - 12px); }
}

/* Une case à cocher de 17 px se rate aussi. On l'agrandit et on étend sa zone
   sensible à l'intitulé, qui lui est déjà associé. */
.form__consent input { width: 20px; height: 20px; margin-top: 2px; }
@media (max-width: 900px) {
  .form__consent input { position: relative; }
  .form__consent input::before {
    content: '';
    position: absolute;
    inset: -12px;
  }
}

/* Les boutons atteignent 44 px sur les écrans tactiles : le rembourrage seul
   les laissait à 43 px en version compacte. */
@media (max-width: 900px) {
  .btn { min-height: 44px; }
}
