/* ==========================================================================
   Salva Terra Service — Charpente, ossature bois et menuiserie
   Les couleurs viennent des logos : la crème (#fddbb3) et l'orange (#c8601e),
   sur un brun-noir chaud ou un papier crème. Titres en Fraunces, textes en Inter.
   ========================================================================== */

:root {
  /* Couleurs des logos */
  --brand-cream: #fddbb3;
  --brand-orange: #c8601e;

  /* Thème sombre (par défaut). Les variantes « -rgb » servent aux transparences. */
  --bg: #14110e;              --bg-rgb: 20 17 14;
  --surface: #1d1915;         --surface-rgb: 29 25 21;
  --surface-2: #28221c;       --surface-2-rgb: 40 34 28;
  --text: #f4eadb;            --text-rgb: 244 234 219;
  --text-2: #cbbdab;
  --text-3: #9a8d7e;                 /* contraste AA (4,5:1) même sur les cartes */
  --highlight: #e48a52;             /* l'orange du logo, éclairci pour le fond sombre : mots en italique, filets */
  --shade-rgb: 16 13 11;             /* voiles posés sur les photos et la 3D */
  --white: #ffffff;
  --line: rgb(var(--text-rgb) / 0.12);
  --line-strong: rgb(var(--text-rgb) / 0.3);

  /* Couleur d'action : l'orange du logo, à peine assombri pour que le texte
     blanc des boutons reste lisible (contraste AA). */
  --accent: #bd581c;
  --accent-hover: #a24812;

  /* Typographies */
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --display-weight: 360;

  /* Formes */
  --radius-card: 12px;
  --radius-pill: 40px;
  --radius-btn: 32px;

  /* Mise en page */
  --max: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(88px, 11vw, 152px);

  /* Courbes */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
}

/* Thème crème : papier de la marque, encre brun-noir, italiques en orange profond */
.theme-light {
  --bg: #f2e8da;              --bg-rgb: 242 232 218;
  --surface: #e9dcca;         --surface-rgb: 233 220 202;
  --surface-2: #dfcfb8;       --surface-2-rgb: 223 207 184;
  --text: #1a1613;            --text-rgb: 26 22 19;
  --text-2: #5e5348;
  --text-3: #6b5f52;                 /* contraste AA (4,5:1) même sur les cartes */
  --highlight: #963f0d;
  --line: rgb(var(--text-rgb) / 0.14);
  --line-strong: rgb(var(--text-rgb) / 0.32);
  background: var(--bg);
  color: var(--text);
}
/* Deux sections crème qui se suivent : pas de liseré sombre à la jonction (arrondis au sous-pixel) */
.theme-light + .theme-light { box-shadow: 0 -2px 0 var(--bg); }

@property --mx { syntax: '<length>'; inherits: true; initial-value: -999px; }
@property --my { syntax: '<length>'; inherits: true; initial-value: -999px; }
@property --torch { syntax: '<length>'; inherits: true; initial-value: 0px; }

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: clip; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
p { margin: 0; }
::selection { background: var(--highlight); color: var(--bg); }

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

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

.skip-link {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--text);
  color: var(--bg);
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease-out);
}
.skip-link:focus { transform: none; }

.container {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section { position: relative; padding: var(--section-y) 0; }

.card { background: var(--surface); border-radius: var(--radius-card); }

/* ---------- Typographie ---------- */
.h2 {
  margin: 0 0 22px;
  max-width: 20ch;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(2.25rem, 1.3rem + 3.1vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.lead {
  max-width: 52ch;
  color: var(--text-2);
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.125rem);
  line-height: 1.5;
}

.section-head { margin-bottom: clamp(40px, 6vw, 72px); }

/* Sur-titre : petites capitales espacées, précédées d'un filet orange */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 26px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.eyebrow__dot { flex-shrink: 0; width: 28px; height: 1px; background: var(--highlight); }

/* Sur-titres posés sur une image : pastille translucide et point lumineux */
:is(.hero__eyebrow, .build__outro-eyebrow, .case-eyebrow) {
  gap: 10px;
  padding: 8px 15px 8px 13px;
  border: 1px solid rgb(var(--text-rgb) / 0.22);
  border-radius: var(--radius-pill);
  background: rgb(var(--bg-rgb) / 0.3);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--text);
  font-size: 11.5px;
}
:is(.hero__eyebrow, .build__outro-eyebrow, .case-eyebrow) .eyebrow__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  animation: pulse 2.4s ease-in-out infinite;
}

/* Mot mis en valeur dans un titre : italique, couleur de la marque */
:is(h1, h2, h3, .intro__text, .build__outro-title, .work__outro-title) em {
  font-style: italic;
  font-weight: inherit;
  color: var(--highlight);
}
@keyframes pulse { 50% { opacity: 0.3; transform: scale(0.7); } }

.tag {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  color: var(--text-2);
  font-size: 12px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

/* Effet « roulement de lettres » au survol (lettres découpées en JS) */
.roll {
  position: relative;
  display: inline-flex;
  overflow: hidden;
  vertical-align: top;
  line-height: 1.25;
}
.roll__row { display: inline-flex; }
.roll__row--clone { position: absolute; top: 0; left: 0; }
.roll__c {
  display: inline-block;
  white-space: pre;
  transition: transform 0.6s var(--ease-in-out);
  transition-delay: calc(var(--i) * 14ms);
}
.roll__row--clone .roll__c { transform: translateY(110%); }
.has-roll:hover .roll__row:not(.roll__row--clone) .roll__c,
.has-roll:focus-visible .roll__row:not(.roll__row--clone) .roll__c { transform: translateY(-110%); }
.has-roll:hover .roll__row--clone .roll__c,
.has-roll:focus-visible .roll__row--clone .roll__c { transform: translateY(0); }

/* ---------- Boutons ---------- */
.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 0 26px;
  overflow: hidden;
  border-radius: var(--radius-btn);
  font-size: 16px;
  font-weight: 420;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.35s, color 0.35s, border-color 0.35s;
}
.btn--sm { height: 42px; padding: 0 20px; font-size: 15px; }

.btn--primary { background: var(--accent); color: var(--white); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--primary::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.26) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform 0.9s var(--ease-out);
}
.btn--primary:hover::after { transform: translateX(110%); }

.btn--ghost { border: 1px solid var(--text); color: var(--text); }
.btn--ghost::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--text);
  transform: translateY(102%);
  transition: transform 0.55s var(--ease-out);
}
.btn--ghost:hover { color: var(--bg); }
.btn--ghost:hover::before { transform: none; }

/* Bouton crème, pour les fonds orange */
.btn--light { background: var(--brand-cream); color: #2a1a0e; }
.btn--light::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--white);
  transform: translateY(102%);
  transition: transform 0.55s var(--ease-out);
}
.btn--light:hover::after { transform: none; }

.btn__icon {
  width: 18px; height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.45s var(--ease-out);
}
.btn:hover .btn__icon { transform: translateX(4px); }

.icon-btn {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { background: var(--text); border-color: var(--text); color: var(--bg); }

/* ---------- Écran de chargement ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  clip-path: inset(0 0 0 0);
}
.js .loader { display: flex; }
.is-fallback .loader { display: none; }

.loader__center { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.loader__mark { width: auto; height: 96px; }
.loader__word { width: min(240px, 60vw); height: auto; }
.loader__foot {
  position: absolute;
  left: var(--gutter); right: var(--gutter); bottom: 34px;
  display: flex;
  justify-content: space-between;
  color: var(--text-2);
  font-size: 13px;
}
.loader__count { font-variant-numeric: tabular-nums; }
.loader__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgb(var(--text-rgb) / 0.08); }
.loader__bar span { display: block; height: 100%; background: var(--brand-orange); transform: scaleX(0); transform-origin: left; }

/* ---------- Rideau des changements de page ---------- */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  background: var(--bg);
  pointer-events: none;
  visibility: hidden;
  clip-path: inset(100% 0 0 0);
}
.is-arriving .curtain { visibility: visible; clip-path: inset(0 0 0 0); }
.is-leaving .curtain { visibility: visible; pointer-events: auto; }
.is-fallback .curtain { display: none; }
.curtain__mark { width: auto; height: 84px; }

/* ---------- Curseur ---------- */
.cursor { position: fixed; top: 0; left: 0; z-index: 90; display: none; pointer-events: none; transition: opacity 0.3s; }
.has-cursor .cursor { display: block; }
.has-cursor, .has-cursor a, .has-cursor button, .has-cursor label, .has-cursor .species__item { cursor: none; }
.has-cursor input, .has-cursor textarea { cursor: text; }
.cursor.is-hidden, .cursor.is-text { opacity: 0; }

.cursor__dot {
  position: absolute;
  width: 6px; height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--text);
  transition: scale 0.3s var(--ease-out);
}
.cursor__ring {
  position: absolute;
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  margin: -20px 0 0 -20px;
  border: 1px solid rgb(var(--text-rgb) / 0.45);
  border-radius: 50%;
  transition: width 0.45s var(--ease-out), height 0.45s var(--ease-out), margin 0.45s var(--ease-out),
              background-color 0.3s, border-color 0.3s, scale 0.3s var(--ease-out);
}
.cursor__label {
  color: var(--white);
  font-size: 13px;
  font-weight: 480;
  opacity: 0;
  scale: 0.5;
  transition: opacity 0.3s, scale 0.45s var(--ease-out);
}
.cursor.is-hover .cursor__ring { width: 64px; height: 64px; margin: -32px 0 0 -32px; border-color: rgb(var(--text-rgb) / 0.85); background: rgb(var(--text-rgb) / 0.06); }
.cursor.is-hover .cursor__dot { scale: 0; }
/* Sur les sections crème, le curseur passe à l'encre */
.cursor.is-light .cursor__dot { background: #1a1613; }
.cursor.is-light .cursor__ring { border-color: rgb(26 22 19 / 0.45); }
.cursor.is-light.is-hover .cursor__ring { border-color: rgb(26 22 19 / 0.85); background: rgb(26 22 19 / 0.06); }
/* Pastille « Voir », « Agrandir »… aux couleurs du logo */
.cursor.is-label .cursor__ring { width: 96px; height: 96px; margin: -48px 0 0 -48px; border-color: var(--accent); background: var(--accent); }
.cursor.is-label .cursor__label { opacity: 1; scale: 1; }
.cursor.is-label .cursor__dot { scale: 0; }
.cursor.is-down .cursor__ring { scale: 0.85; }

/* ---------- Grain filmique ---------- */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 80;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.1s steps(6) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -5%); }
  60% { transform: translate(-6%, 2%); }
  80% { transform: translate(5%, 4%); }
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 14px var(--gutter);
  transition: transform 0.7s var(--ease-out);
}
.nav.is-hidden { transform: translateY(-130%); }

.nav__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 8px 8px 8px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  transition: background-color 0.5s, border-color 0.5s, -webkit-backdrop-filter 0.5s, backdrop-filter 0.5s;
}
.nav.is-scrolled .nav__bar,
.menu-open .nav__bar {
  border-color: rgb(var(--text-rgb) / 0.08);
  background: rgb(var(--surface-rgb) / 0.62);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
}

.brand { position: relative; display: inline-flex; flex-shrink: 0; align-items: center; }
.brand__logo { width: auto; height: 34px; }
.brand__logo--lg { height: 46px; }
/* Reflet qui balaie le logo au survol (masqué par la forme du logo) */
.brand::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 38%, rgb(255 255 255 / 0.95) 50%, transparent 62%) no-repeat;
  background-size: 260% 100%;
  background-position: 130% 0;
  -webkit-mask: url('../img/logo-clair.png') left center / contain no-repeat;
  mask: url('../img/logo-clair.png') left center / contain no-repeat;
  pointer-events: none;
}
.brand:hover::after { background-position: -30% 0; transition: background-position 1.2s var(--ease-out); }

.nav__links { display: flex; gap: 2px; }
.nav__link {
  position: relative;
  padding: 11px 16px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  transition: background-color 0.3s;
}
.nav__link:hover { background: var(--surface-2); }
.nav__link::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 5px;
  width: 4px; height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: var(--text);
  transform: scale(0);
  transition: transform 0.4s var(--ease-out);
}
.nav__link.is-active::after, .nav__link.is-current::after { transform: none; }
.nav__link.is-current::after { background: var(--highlight); }

.nav__actions { display: flex; align-items: center; gap: 6px; }
.nav__phone { padding: 11px 14px; color: var(--text-2); font-size: 15px; font-variant-numeric: tabular-nums; }

.burger {
  position: relative;
  display: none;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--surface-2);
}
.burger span {
  position: absolute;
  left: 13px; right: 13px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.5s var(--ease-out), top 0.5s var(--ease-out);
}
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 24px; }
.burger[aria-expanded="true"] span:nth-child(1) { top: 20.5px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { top: 20.5px; transform: rotate(-45deg); }

/* Menu mobile plein écran */
.menu {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 112px var(--gutter) 36px;
  background: var(--bg);
  visibility: hidden;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.8s var(--ease-in-out), visibility 0s 0.8s;
}
.menu.is-open { visibility: visible; clip-path: inset(0 0 0 0); transition: clip-path 0.8s var(--ease-in-out), visibility 0s; }
.menu__links { display: flex; flex-direction: column; }
.menu__link {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(30px, 8vw, 52px);
  line-height: 1.15;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s, transform 0.8s var(--ease-out);
}
.menu__link span { color: var(--text-3); font-family: var(--font-body); font-size: 13px; }
.menu.is-open .menu__link { opacity: 1; transform: none; }
.menu.is-open .menu__link:nth-child(1) { transition-delay: 0.25s; }
.menu.is-open .menu__link:nth-child(2) { transition-delay: 0.31s; }
.menu.is-open .menu__link:nth-child(3) { transition-delay: 0.37s; }
.menu.is-open .menu__link:nth-child(4) { transition-delay: 0.43s; }
.menu.is-open .menu__link:nth-child(5) { transition-delay: 0.49s; }
.menu.is-open .menu__link:nth-child(6) { transition-delay: 0.55s; }
.menu.is-open .menu__link:nth-child(7) { transition-delay: 0.61s; }
.menu.is-open .menu__link:nth-child(8) { transition-delay: 0.67s; }
/* huit liens : sur les petits écrans, le menu se resserre et peut défiler */
.menu { overflow-y: auto; }
@media (max-height: 760px) { .menu { padding-top: 92px; } .menu__link { padding: 7px 0; font-size: clamp(24px, 6.6vw, 40px); } }
.menu__foot { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; color: var(--text-2); }
.menu__foot .btn { margin-top: 14px; }

/* ---------- Accueil : la maison à ossature bois se construit au scroll ---------- */
.build { position: relative; }
.build__pin {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 120px var(--gutter) 150px;
  overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, #2e241b 0%, var(--bg) 70%);
}
.hero__media { position: absolute; inset: 0; z-index: -3; }
.hero__img {
  position: absolute;
  inset: -4%;
  width: 108%;
  max-width: none;
  height: 108%;
  object-fit: cover;
  object-position: 50% 40%;
  filter: saturate(0.7) brightness(0.82);
}
.hero__fog {
  position: absolute;
  inset: -20% -40%;
  background:
    radial-gradient(38% 26% at 28% 62%, rgb(var(--text-rgb) / 0.12), transparent 70%),
    radial-gradient(34% 22% at 72% 42%, rgb(var(--text-rgb) / 0.09), transparent 70%);
  filter: blur(24px);
  animation: fog 26s ease-in-out infinite alternate;
}
@keyframes fog {
  from { translate: -8% 0; }
  to { translate: 8% -3%; }
}
.hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgb(var(--bg-rgb) / 0.6) 0%, rgb(var(--bg-rgb) / 0.2) 38%, rgb(var(--bg-rgb) / 0.5) 72%, var(--bg) 100%);
}
.build__canvas { position: absolute; inset: 0; z-index: -2; display: block; width: 100%; height: 100%; opacity: 0; transition: opacity 1.4s var(--ease-out); }
.hero__dust { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.build__shade {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(180deg, rgb(var(--bg-rgb) / 0.55) 0%, rgb(var(--bg-rgb) / 0) 24%, rgb(var(--bg-rgb) / 0) 60%, rgb(var(--bg-rgb) / 0.7) 100%);
  transition: opacity 1.4s var(--ease-out);
}
/* Halo sombre derrière l'accroche d'ouverture, qui s'efface avec elle au premier scroll */
.build__shade::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: var(--intro, 0);
  background: radial-gradient(58% 42% at 50% 47%, rgb(var(--shade-rgb) / 0.5) 0%, rgb(var(--shade-rgb) / 0) 100%);
}

/* Voile qui assure la lisibilité du texte final par-dessus la scène */
.build__scrim { display: none; }
.build.is-3d .build__scrim {
  position: absolute;
  inset: 0;
  z-index: -1;
  display: block;
  pointer-events: none;
  opacity: var(--outro, 0);
  background: linear-gradient(90deg, rgb(var(--shade-rgb) / 0.82) 0%, rgb(var(--shade-rgb) / 0.55) 34%, rgb(var(--shade-rgb) / 0) 62%);
}

/* Sans 3D : accroche et formulaire centrés, comme un hero classique */
.build__content { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 820px; text-align: center; }
.build__intro, .build__outro { display: flex; flex-direction: column; align-items: center; width: 100%; }
.build__outro-eyebrow, .build__outro-title, .build__outro-lead, .build__steps, .build__rail { display: none; }

/* Avec 3D : section épinglée, la scène occupe tout l'écran */
.build.is-3d .build__pin { height: 100vh; height: 100svh; min-height: 0; padding: 0; }
.build.is-3d .build__canvas, .build.is-3d .build__shade { opacity: 1; }
.build.is-3d .hero__media { visibility: hidden; }
.build.is-3d .build__content { position: absolute; inset: 0; display: block; max-width: none; }
.build.is-3d .build__intro { position: absolute; inset: 0; justify-content: center; padding: 110px var(--gutter) 170px; }
.build.is-3d .build__lead { max-width: 520px; }
.build.is-3d .build__outro {
  position: absolute;
  top: 50%; left: var(--gutter);
  width: min(520px, calc(100% - 2 * var(--gutter)));
  align-items: flex-start;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-42%);
  transition: opacity 0.8s var(--ease-out), transform 1s var(--ease-out), visibility 0s 0.8s;
}
.build.is-3d .build__outro.is-visible { opacity: 1; visibility: visible; transform: translateY(-50%); transition: opacity 0.8s var(--ease-out), transform 1s var(--ease-out), visibility 0s; }
.build.is-3d .build__outro-eyebrow { display: inline-flex; border-color: rgb(var(--text-rgb) / 0.22); background: rgb(var(--bg-rgb) / 0.3); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: var(--text); }
.build.is-3d .build__outro-title {
  display: block;
  margin: 0 0 18px;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(2.1rem, 1.2rem + 2.8vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.012em;
}
.build.is-3d .build__outro-lead { display: block; max-width: 440px; margin-bottom: 28px; }

/* Carte des étapes du chantier */
.build.is-3d .build__steps {
  position: absolute;
  left: var(--gutter); bottom: clamp(20px, 4vh, 40px);
  z-index: 1;
  display: block;
  width: min(400px, calc(100% - 2 * var(--gutter)));
  padding: 20px 24px 22px;
  border: 1px solid rgb(var(--text-rgb) / 0.1);
  border-radius: var(--radius-card);
  background: rgb(var(--bg-rgb) / 0.58);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  opacity: 0;
  visibility: hidden;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-out), transform 0.8s var(--ease-out), visibility 0s 0.6s;
}
.build.is-3d .build__steps.is-visible { opacity: 1; visibility: visible; transform: none; transition: opacity 0.6s var(--ease-out), transform 0.8s var(--ease-out), visibility 0s; }
.build__bars { display: flex; gap: 6px; margin-bottom: 16px; }
.build__bars i { position: relative; flex: 1; height: 2px; overflow: hidden; background: rgb(var(--text-rgb) / 0.16); }
.build__bars i::after { content: ''; position: absolute; inset: 0; background: var(--highlight); transform: scaleX(var(--p, 0)); transform-origin: left; }
.build__list { display: grid; margin: 0; padding: 0; list-style: none; }
.build__step { grid-area: 1 / 1; opacity: 0; transform: translateY(14px); transition: opacity 0.5s var(--ease-out), transform 0.7s var(--ease-out); }
.build__step.is-past { transform: translateY(-14px); }
.build__step.is-active { opacity: 1; transform: none; }
.build__step-num { display: block; margin-bottom: 8px; color: var(--text-2); font-size: 13px; }
.build__step-title {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.7rem);
  line-height: 1.15;
  letter-spacing: -0.012em;
}
.build__step-text { display: block; color: var(--text-2); font-size: 15px; line-height: 1.5; }

/* Rail des chapitres (bureau) */
.build.is-3d .build__rail {
  position: absolute;
  top: 50%; right: var(--gutter);
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 0.6s;
}
.build.is-3d .build__rail.is-visible { opacity: 1; }
.build__rail li {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  color: rgb(var(--text-rgb) / 0.5);
  font-size: 13px;
  text-shadow: 0 1px 10px rgb(var(--shade-rgb) / 0.6);
  transition: color 0.4s;
}
.build__rail li::after { content: ''; width: 7px; height: 7px; border: 1px solid currentColor; border-radius: 50%; transition: background-color 0.4s, transform 0.5s var(--ease-out); }
.build__rail li.is-done { color: var(--text); }
.build__rail li.is-done::after { background: currentColor; }
.build__rail li.is-active { color: var(--white); }
.build__rail li.is-active::after { background: currentColor; transform: scale(1.5); }
.hero__eyebrow { border-color: rgb(var(--text-rgb) / 0.22); background: rgb(var(--bg-rgb) / 0.25); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: var(--text); }
.hero__title {
  margin: 0 0 26px;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 320;
  font-size: clamp(2.9rem, 1.4rem + 5.8vw, 6.4rem);
  line-height: 0.98;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.hero__lead {
  max-width: 560px;
  margin: 0 0 38px;
  color: var(--text);
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.18rem);
  font-weight: 420;
  line-height: 1.45;
}

.capture { display: flex; width: 100%; max-width: 480px; height: 54px; }
.capture__input {
  flex: 1;
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 18px 0 24px;
  border: 1px solid var(--text);
  border-right: 0;
  border-radius: var(--radius-btn) 0 0 var(--radius-btn);
  background: rgb(var(--bg-rgb) / 0.35);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--text);
  transition: background-color 0.3s;
}
.capture__input::placeholder { color: var(--text-2); }
.capture__input:focus { outline: none; background: rgb(var(--bg-rgb) / 0.6); }
.capture__input:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.capture__btn { height: 100%; padding: 0 26px; border-radius: 0 var(--radius-btn) var(--radius-btn) 0; }
.hero__note { margin-top: 16px; color: var(--text-2); font-size: 13px; }

.hero__foot {
  position: absolute;
  left: var(--gutter); right: var(--gutter); bottom: 26px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.scroll-cue { display: inline-flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 13px; }
.scroll-cue__line { position: relative; width: 1px; height: 52px; overflow: hidden; background: rgb(var(--text-rgb) / 0.2); }
.scroll-cue__line::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 40%;
  background: var(--text);
  animation: cue 2.2s var(--ease-in-out) infinite;
}
@keyframes cue { from { transform: translateY(-100%); } to { transform: translateY(260%); } }

.badge { position: relative; display: grid; place-items: center; width: 116px; height: 116px; }
.badge::before {
  content: '';
  position: absolute;
  inset: 27px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: rgb(var(--bg-rgb) / 0.3);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: transform 0.6s var(--ease-out), background-color 0.4s;
}
.badge:hover::before { transform: scale(1.14); background: rgb(var(--text-rgb) / 0.14); }
.badge__ring { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 20s linear infinite; overflow: visible; }
.badge__ring text { fill: var(--text); font-family: var(--font-body); font-size: 9.6px; font-weight: 480; letter-spacing: 0.16em; text-transform: uppercase; }
.badge__arrow { position: relative; width: 24px; height: 24px; fill: none; stroke: var(--text); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.5s var(--ease-out); }
.badge:hover .badge__arrow { transform: rotate(45deg); }
@keyframes spin { to { rotate: 360deg; } }

/* ---------- Bandeau défilant ---------- */
/* Bande orange du logo, ponctuée de l'emblème ; un intitulé sur deux en italique */
.marquee { position: relative; padding: clamp(22px, 2.6vw, 34px) 0; overflow: hidden; background: var(--brand-orange); color: var(--brand-cream); }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__group { display: flex; flex-shrink: 0; align-items: center; }
.marquee__item {
  padding: 0 clamp(20px, 3vw, 44px);
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(1.7rem, 1.1rem + 2.3vw, 3.3rem);
  line-height: 1.15;
  letter-spacing: -0.012em;
  white-space: nowrap;
  transition: color 0.4s;
}
.marquee__item:nth-child(4n+3) { font-style: italic; }
.marquee__item:hover { color: var(--white); }
.marquee__sep { flex-shrink: 0; width: auto; height: clamp(30px, 3.2vw, 46px); opacity: 0.9; transition: transform 0.8s var(--ease-out); }
.marquee:hover .marquee__sep { transform: rotate(-8deg) scale(1.08); }

/* ---------- L'atelier ---------- */
.intro__text {
  max-width: 1080px;
  margin: 0 0 clamp(56px, 8vw, 112px);
  font-family: var(--font-display);
  font-weight: 320;
  font-size: clamp(1.75rem, 1rem + 2.7vw, 3.35rem);
  line-height: 1.16;
  letter-spacing: -0.016em;
  text-wrap: pretty;
}

.intro__sig { margin: calc(clamp(56px, 8vw, 112px) * -0.6) 0 clamp(56px, 8vw, 112px); color: var(--text-2); font-size: 15px; }
.intro__sig::before { content: ''; display: inline-block; width: 28px; height: 1px; margin-right: 12px; vertical-align: middle; background: var(--text-3); }

.intro__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: end; }
.intro__media {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--surface);
}
.intro__media img { position: absolute; inset: -10% 0; width: 100%; height: 120%; max-width: none; object-fit: cover; filter: saturate(0.85); }

/* Chiffres clés : une ligne par chiffre, le nombre à gauche de sa légende */
.stats { display: grid; gap: 10px; margin: 0 0 32px; }
.stat {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  align-items: center;
  gap: 24px;
  position: relative;
  margin: 0;
  padding: 20px 24px;
  overflow: hidden;
  transition: background-color 0.4s;
}
/* Survol : un filet orange monte le long de la carte, le chiffre se décale */
.stat::before {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 3px;
  background: var(--highlight);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.6s var(--ease-out);
}
.stat:hover { background: var(--surface-2); }
.stat:hover::before { transform: none; }
.stat__num {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(2.2rem, 1.8rem + 1.4vw, 3.2rem);
  white-space: nowrap;
  min-width: 3em;
  line-height: 1;
  letter-spacing: -0.012em;
  font-variant-numeric: tabular-nums;
  transition: color 0.4s, transform 0.6s var(--ease-out);
}
.stat:hover .stat__num { color: var(--highlight); transform: translateX(6px); }
.stat__num small { margin-left: 4px; color: var(--text-2); font-size: 0.45em; font-weight: 420; }
.stat__label { max-width: 30ch; color: var(--text-2); font-size: 15px; line-height: 1.4; }
.intro__copy { max-width: 46ch; margin-bottom: 28px; color: var(--text-2); }

/* ---------- Savoir-faire ---------- */
.services__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.service {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  min-height: 390px;
  padding: 32px;
  overflow: hidden;
}
/* Halo qui suit la souris */
.service::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgb(var(--text-rgb) / 0.08), transparent 45%);
  opacity: 0;
  transition: opacity 0.5s;
}
/* Liseré lumineux */
.service::after {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgb(var(--text-rgb) / 0.55), transparent 65%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s;
}
.service:hover::before, .service:hover::after { opacity: 1; }

/* Photo du chantier en fond : discrète au repos, révélée au survol */
.service__bg { position: absolute; inset: 0; z-index: -2; opacity: 0.55; transition: opacity 0.8s var(--ease-out); }
.service__bg img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.8); transform: scale(1.18); transition: transform 1.4s var(--ease-out); }
.service__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(var(--surface-rgb) / 0.2) 0%, rgb(var(--surface-rgb) / 0.72) 44%, var(--surface) 78%); }
.service:hover .service__bg { opacity: 0.9; }
.service:hover .service__bg img { transform: scale(1); }

.service__top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: auto; padding-bottom: 56px; }
.service__icon { width: 48px; height: 48px; fill: none; stroke: var(--text); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.service__icon path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.service:hover .service__icon path { animation: draw 1.2s var(--ease-out) both; }
.service:hover .service__icon path:nth-child(2) { animation-delay: 0.1s; }
.service:hover .service__icon path:nth-child(3) { animation-delay: 0.2s; }
.service:hover .service__icon path:nth-child(4) { animation-delay: 0.3s; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.service__num { color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; transition: color 0.4s; }
.service:hover .service__num { color: var(--text); }
.service__title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(1.4rem, 1.2rem + 0.6vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: -0.012em;
  transition: transform 0.6s var(--ease-out);
}
.service:hover .service__title { transform: translateX(6px); }
.service__text { margin-bottom: 24px; color: var(--text-2); }
.service__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.service:hover .tag { border-color: var(--line-strong); color: var(--text); }
.tag { transition: border-color 0.4s, color 0.4s; }

/* Liens vers les chantiers en ligne, soulignés au survol */
.service__more { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.service__more span { color: var(--text-3); }
.service__more a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 2px;
  color: var(--text);
  background: linear-gradient(var(--highlight), var(--highlight)) 0 100% / 0 1px no-repeat;
  transition: background-size 0.5s var(--ease-out), color 0.3s;
}
.service__more a svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.45s var(--ease-out); }
.service__more a:hover { color: var(--highlight); background-size: 100% 1px; }
.service__more a:hover svg { transform: translate(2px, -2px); }

/* Septième savoir-faire : un bandeau sur toute la largeur, texte à gauche, mots-clés à droite */
.service--wide { grid-column: 1 / -1; min-height: 320px; }
@media (min-width: 900px) {
  .service--wide { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: 1fr auto auto; column-gap: clamp(32px, 6vw, 96px); }
  .service--wide .service__top { grid-column: 1 / -1; }
  .service--wide .service__title { grid-column: 1; grid-row: 2; }
  .service--wide .service__text { grid-column: 1; grid-row: 3; max-width: 52ch; margin-bottom: 0; }
  .service--wide .service__tags { grid-column: 2; grid-row: 2; align-self: end; margin-bottom: 4px; }
  .service--wide .service__more { grid-column: 2; grid-row: 3; align-self: end; }
  .service--wide .service__bg::after { background: linear-gradient(90deg, var(--surface) 0%, rgb(var(--surface-rgb) / 0.8) 42%, rgb(var(--surface-rgb) / 0.35) 100%); }
}

/* ---------- Méthode (ferme dessinée) ---------- */
.method { position: relative; }
.method__pin { display: flex; align-items: center; padding: var(--section-y) 0; }
.method__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: center; }

.steps { display: grid; gap: 28px; margin: 32px 0; }
.step__num { margin-bottom: 10px; color: var(--text-2); font-size: 13px; }
.step__title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(1.45rem, 1.2rem + 0.9vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.012em;
}
.step__text { max-width: 42ch; color: var(--text-2); }

.method__progress { display: none; align-items: center; gap: 16px; margin-bottom: 32px; }
.method__count { min-width: 56px; color: var(--text-2); font-size: 13px; font-variant-numeric: tabular-nums; }
.method__bars { display: flex; flex: 1; gap: 6px; max-width: 240px; }
.method__bars i { position: relative; flex: 1; height: 2px; overflow: hidden; background: rgb(var(--text-rgb) / 0.14); }
.method__bars i::after { content: ''; position: absolute; inset: 0; background: var(--highlight); transform: scaleX(var(--p, 0)); transform-origin: left; }

/* Version épinglée (activée par le JS) : les étapes se superposent */
.method.is-pinned .method__pin { min-height: 100vh; padding: 96px 0 40px; }
.method.is-pinned .steps { gap: 0; }
.method.is-pinned .step {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(26px);
  pointer-events: none;
  transition: opacity 0.6s var(--ease-out), transform 0.7s var(--ease-out);
}
.method.is-pinned .step.is-past { transform: translateY(-26px); }
.method.is-pinned .step.is-active { opacity: 1; transform: none; pointer-events: auto; }
.method.is-pinned .method__progress { display: flex; }

.method .h2 { max-width: none; font-size: clamp(1.9rem, 1rem + 2.2vw, 3rem); }
.method__lead { max-width: 40ch; margin-top: -4px; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 18px; max-width: 440px; margin: 0; padding: 0; list-style: none; }
.legend__item { display: flex; align-items: center; gap: 8px; padding: 4px 0; color: var(--text); font-size: 14px; transition: color 0.5s; }
.legend__item span {
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
  transition: background-color 0.3s, color 0.3s;
}
.method.is-pinned .legend__item { color: var(--text-3); }
.method.is-pinned .legend__item.is-on { color: var(--text); }
.legend__item.is-on:hover span { background: var(--text); color: var(--bg); }

.method__visual { margin: 0; padding: clamp(12px, 2vw, 28px); }
.truss { width: 100%; height: auto; overflow: visible; --fill: 0; }
.truss text { font-family: var(--font-body); }
#t-dots circle { fill: rgb(var(--text-rgb) / 0.13); }
#t-hatch line { stroke: rgb(var(--text-rgb) / 0.2); stroke-width: 1.5; }
.t-title__main { fill: var(--text); font-size: 18px; font-weight: 480; letter-spacing: 0.18em; }
.t-title__sub { fill: var(--text-3); font-size: 16px; }
.t-cons line { stroke: rgb(var(--text-rgb) / 0.26); stroke-width: 1.5; stroke-dasharray: 8 8; }
.t-dims path { fill: none; stroke: var(--text-2); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: 0; }
.t-dims text { fill: var(--text-2); font-size: 20px; }
.t-walls path { fill: none; stroke: rgb(var(--text-rgb) / 0.5); stroke-width: 2; }
.part {
  fill: var(--text);
  fill-opacity: var(--fill);
  stroke: var(--text);
  stroke-width: 2.4;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: opacity 0.35s, fill-opacity 0.35s;
}
.t-pegs circle { fill: var(--surface); stroke: var(--text); stroke-width: 2; }
.callout { transition: opacity 0.35s; }
.callout path { fill: none; stroke: var(--text-2); stroke-width: 1.5; }
.callout__dot { fill: var(--text); }
.callout__ring { fill: var(--surface); stroke: var(--text); stroke-width: 1.5; }
.callout text { fill: var(--text); font-size: 18px; font-weight: 480; }
.truss.has-hl .part, .truss.has-hl .callout { opacity: 0.16; }
.truss.has-hl .part.is-hl { opacity: 1; fill-opacity: 0.16; }
.truss.has-hl .callout.is-hl { opacity: 1; }

/* ---------- Réalisations ---------- */
.work { position: relative; }
.work__pin { position: relative; padding: var(--section-y) 0 calc(var(--section-y) * 0.7); }
.work__intro { max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto 40px; padding: 0 var(--gutter); }
.work__hint { display: none; align-items: center; gap: 10px; margin-top: 28px; color: var(--text-2); font-size: 14px; }
.work__hint svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; animation: nudge 1.6s var(--ease-in-out) infinite; }
@keyframes nudge { 50% { transform: translateX(6px); } }

.work__list {
  display: flex;
  gap: 16px;
  padding: 0 var(--gutter) 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
}
.work__list::-webkit-scrollbar { display: none; }

.project {
  position: relative;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  gap: 18px;
  width: min(78vw, 400px);
  text-align: left;
  scroll-snap-align: start;
}
.project--wide { width: min(86vw, 560px); }
.project__media {
  position: relative;
  display: block;
  height: min(58vh, 460px);
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--surface);
}
.project__img {
  position: absolute;
  top: 0; left: -12%;
  width: 124%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.88);
  transition: scale 1.3s var(--ease-out), filter 0.6s;
}
.project:hover .project__img, .project:focus-visible .project__img { scale: 1.08; filter: saturate(1.05); }

/* Ce que contient la page du chantier */
.project__badges { position: absolute; top: 14px; left: 14px; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; }
.project__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: rgb(20 17 14 / 0.6);
  color: var(--white);
  font-size: 11.5px;
  letter-spacing: 0.02em;
}
.project__badge svg { width: 9px; height: 9px; fill: var(--brand-cream); }

/* Au survol : la description monte, avec l'invitation à ouvrir le chantier */
.project__hover {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 72px 22px 22px;
  background: linear-gradient(180deg, rgb(16 13 11 / 0) 0%, rgb(16 13 11 / 0.82) 55%);
  color: var(--white);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s var(--ease-out), transform 0.7s var(--ease-out);
}
.project:hover .project__hover, .project:focus-visible .project__hover { opacity: 1; transform: none; }
.project__desc { max-width: 34ch; font-size: 15px; line-height: 1.45; }
.project__go {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  font-size: 14px;
  font-weight: 500;
}
.project__go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.45s var(--ease-out); }
.project:hover .project__go svg { transform: translateX(4px); }

.project__info { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.project__head { display: flex; align-items: center; gap: 12px; }
.project__num { color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; transition: color 0.4s; }
.project:hover .project__num { color: var(--highlight); }
.project__title {
  padding-bottom: 3px;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(1.3rem, 1.1rem + 0.6vw, 1.7rem);
  line-height: 1.2;
  letter-spacing: -0.012em;
  background: linear-gradient(var(--highlight), var(--highlight)) 0 100% / 0 1px no-repeat;
  transition: background-size 0.7s var(--ease-out);
}
.project:hover .project__title, .project:focus-visible .project__title { background-size: 100% 1px; }
.project__facts { display: flex; flex-wrap: wrap; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.project__facts span:not(:last-child)::after { content: '·'; margin: 0 8px; color: var(--text-3); }
.project:hover .tag { border-color: var(--line-strong); color: var(--text); }

.work__outro { display: flex; flex-direction: column; flex-shrink: 0; align-items: flex-start; justify-content: center; gap: 24px; width: min(78vw, 360px); padding: 0 8px; scroll-snap-align: start; }
.work__outro-title {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.012em;
}
.work__progress { display: none; }
.work__bar { display: block; height: 2px; overflow: hidden; background: rgb(var(--text-rgb) / 0.12); }
.work__bar span { display: block; height: 100%; background: var(--highlight); transform: scaleX(0); transform-origin: left; }

/* Version épinglée (défilement horizontal piloté par le scroll) */
.work.is-pinned .work__pin { display: flex; flex-direction: column; justify-content: center; height: 100vh; padding: 0; overflow: hidden; }
.work.is-pinned .work__track { display: flex; align-items: center; gap: clamp(24px, 3vw, 56px); width: max-content; padding: 40px var(--gutter) 0; will-change: transform; }
.work.is-pinned .work__intro { flex-shrink: 0; width: clamp(320px, 30vw, 440px); margin: 0; padding: 0; }
.work.is-pinned .work__hint { display: inline-flex; }
.work.is-pinned .work__list { gap: clamp(16px, 2vw, 28px); padding: 0; overflow: visible; scroll-snap-type: none; }
.work.is-pinned .project { width: clamp(280px, 26vw, 400px); }
.work.is-pinned .project--wide { width: clamp(340px, 40vw, 620px); }
.work.is-pinned .project__media { height: min(56vh, 560px); }
.work.is-pinned .work__outro { width: clamp(300px, 28vw, 420px); padding: 0 clamp(16px, 4vw, 64px); }
.work.is-pinned .work__progress { display: block; position: absolute; left: 0; right: 0; bottom: 5vh; }

/* ---------- Réalisations (galerie en colonnes) ---------- */
.gallery__grid { columns: 4 240px; column-gap: 12px; }
.shot { display: block; width: 100%; margin: 0 0 14px; break-inside: avoid; text-align: left; transition: opacity 0.5s var(--ease-out); }
.shot__media { position: relative; display: block; overflow: hidden; border-radius: var(--radius-card); background: var(--surface); }
.shot__media img { width: 100%; height: auto; filter: saturate(0.88); transition: scale 1.3s var(--ease-out), filter 0.6s; }
/* Cadre orange qui se dessine autour de la photo survolée */
.shot__media::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 2px solid var(--highlight);
  border-radius: inherit;
  opacity: 0;
  scale: 1.04;
  transition: opacity 0.4s, scale 0.6s var(--ease-out);
}
.shot:hover .shot__media img, .shot:focus-visible .shot__media img { scale: 1.06; filter: saturate(1.05); }
.shot:hover .shot__media::after, .shot:focus-visible .shot__media::after { opacity: 1; scale: 1; }
.shot__cap { display: block; padding: 10px 2px 4px; color: var(--text-2); font-size: 14px; line-height: 1.4; transition: color 0.4s, transform 0.6s var(--ease-out); }
.shot:hover .shot__cap { color: var(--text); transform: translateX(4px); }
/* Les autres photos s'estompent pendant le survol */
@media (hover: hover) {
  .gallery__grid:hover .shot:not(:hover) { opacity: 0.5; }
}

/* ---------- Matériaux (liste avec aperçu au survol) ---------- */
.species__list { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--line); }
.species__item {
  position: relative;
  display: grid;
  grid-template-columns: 64px minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1.2fr) 32px;
  gap: 24px;
  align-items: center;
  padding: clamp(22px, 2.6vw, 34px) 0;
  border-top: 1px solid var(--line);
  transition: opacity 0.5s var(--ease-out);
}
.species__item::after {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 1px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s var(--ease-out);
}
.species__item:hover::after { transform: scaleX(1); }
.species__list:hover .species__item:not(:hover) { opacity: 0.32; }
.species__idx { color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; }
.species__name {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.6rem);
  line-height: 1;
  letter-spacing: -0.012em;
  transition: transform 0.8s var(--ease-out);
}
.species__item:hover .species__name { transform: translateX(18px); }
.species__trait { font-size: 15px; }
.species__use { color: var(--text-2); font-size: 15px; }
.species__arrow { width: 28px; height: 28px; fill: none; stroke: var(--text); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.7s var(--ease-out); }
.species__item:hover .species__arrow { transform: rotate(45deg); }

/* Trois principes « air salin » : titre et explication sur une même ligne */
.species__list--salt .species__item { grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr) 32px; }
.species__list--salt .species__name { font-size: clamp(1.6rem, 1.05rem + 1.7vw, 2.6rem); line-height: 1.1; text-wrap: balance; }
.species__list--salt .species__item:hover .species__name { transform: translateX(12px); }
.species__list--salt .species__use { max-width: 46ch; font-size: 16px; line-height: 1.5; }

/* Idée reçue (« le bois mouillé, ça glisse ») : carte aux couleurs du logo sous les trois principes */
.myth {
  --text: #fff4e8;              --text-rgb: 255 244 232;
  --text-2: rgb(255 244 232 / 0.86);
  --highlight: var(--brand-cream);
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 64px);
  margin-top: clamp(48px, 6vw, 88px);
  padding: clamp(28px, 4vw, 56px);
  overflow: hidden;
  border-radius: var(--radius-card);
  background: #9e4a15;
  color: var(--text);
}
.myth::after {
  content: '';
  position: absolute;
  right: -30px;
  bottom: -40px;
  width: 170px;
  aspect-ratio: 171 / 240;
  background: url('../img/embleme.png') center / contain no-repeat;
  opacity: 0.12;
  transform: rotate(-10deg);
  pointer-events: none;
}
.myth__k { margin-bottom: 14px; color: var(--highlight); font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; }
.myth__claim { font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(1.7rem, 1.1rem + 2vw, 3rem); line-height: 1.1; letter-spacing: -0.016em; text-wrap: balance; }
.myth__claim s { text-decoration-thickness: 0.07em; text-decoration-color: rgb(var(--shade-rgb) / 0.55); }
.myth__claim em { display: block; margin-top: 10px; color: var(--highlight); font-style: italic; }
.myth__body { position: relative; z-index: 1; align-self: end; color: var(--text-2); }
.myth__body p + p { margin-top: 0.9em; }
.myth__link { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; color: var(--text); font-weight: 500; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: 3px; }
.myth__link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.5s var(--ease-out); }
.myth__link:hover svg { transform: translateX(6px); }
@media (max-width: 899px) { .myth { grid-template-columns: 1fr; } }

/* ---------- Zone d'intervention et avis ---------- */
.zone__grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.towns {
  display: flex;
  flex-wrap: wrap;
  margin: 8px 0 28px;
  padding: 0;
  list-style: none;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(1.5rem, 0.95rem + 2.1vw, 2.75rem);
  line-height: 1.3;
  letter-spacing: -0.012em;
}
.towns li { display: inline-flex; align-items: center; color: var(--text-2); white-space: nowrap; transition: color 0.4s; }
.towns li:hover, .towns .towns__home { color: var(--text); }
.towns li:not(:last-child)::after { content: '/'; margin: 0 0.42em; color: var(--text-3); }
/* Communes où un chantier est en ligne : soulignées au survol, photo qui suit la souris */
.towns__link {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.12em;
  color: var(--text);
  background: linear-gradient(var(--highlight), var(--highlight)) 0 94% / 0 2px no-repeat;
  transition: background-size 0.6s var(--ease-out), color 0.3s;
}
.towns__link svg { width: 0.42em; height: 0.42em; margin-top: 0.18em; fill: none; stroke: var(--highlight); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.5s var(--ease-out); }
.towns__link:hover { color: var(--highlight); background-size: 100% 2px; }
.towns__link:hover svg { transform: translate(2px, -2px); }
.towns__tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  margin-left: 0.5em;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.reviews { padding: clamp(28px, 3.4vw, 44px); }
.reviews__score {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(3.6rem, 2.6rem + 3vw, 5.6rem);
  line-height: 1;
  letter-spacing: -0.012em;
  font-variant-numeric: tabular-nums;
}
.reviews__score small { margin-left: 6px; color: var(--text-2); font-size: 0.34em; font-weight: 420; }
.reviews__stars { display: flex; gap: 6px; margin: 20px 0 14px; }
.reviews__stars svg { width: 22px; height: 22px; fill: var(--text); transition: fill 0.4s, transform 0.6s var(--ease-out); }
/* Survol : les étoiles s'allument une à une, à l'orange du logo */
.reviews:hover .reviews__stars svg { fill: var(--highlight); transform: translateY(-4px) scale(1.12); }
.reviews__stars svg:nth-child(2) { transition-delay: 0.05s; }
.reviews__stars svg:nth-child(3) { transition-delay: 0.1s; }
.reviews__stars svg:nth-child(4) { transition-delay: 0.15s; }
.reviews__stars svg:nth-child(5) { transition-delay: 0.2s; }
.reviews { transition: background-color 0.4s; }
.reviews:hover { background: var(--surface-2); }
.reviews__text { margin-bottom: 30px; color: var(--text-2); }
.reviews__more { color: var(--text); background: linear-gradient(var(--highlight), var(--highlight)) 0 100% / 100% 1px no-repeat; transition: color 0.3s; }
.reviews__more:hover { color: var(--highlight); }

/* ---------- Avis clients : cartes en colonnes, chaque avis renvoie à son chantier ---------- */
.voices__grid { columns: 3 300px; column-gap: 14px; }
.voice {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0 0 14px;
  padding: clamp(24px, 2.6vw, 34px);
  break-inside: avoid;
  transition: background-color 0.4s;
}
.voice:hover { background: var(--surface-2, var(--surface)); }
.voice__stars { display: flex; gap: 4px; }
.voice__stars svg { width: 16px; height: 16px; fill: var(--highlight); transition: transform 0.5s var(--ease-out); }
.voice:hover .voice__stars svg { transform: translateY(-2px); }
.voice:hover .voice__stars svg:nth-child(2) { transition-delay: 0.04s; }
.voice:hover .voice__stars svg:nth-child(3) { transition-delay: 0.08s; }
.voice:hover .voice__stars svg:nth-child(4) { transition-delay: 0.12s; }
.voice:hover .voice__stars svg:nth-child(5) { transition-delay: 0.16s; }
.voice__quote { margin: 0; font-family: var(--font-display); font-weight: var(--display-weight); font-size: clamp(1.08rem, 1rem + 0.3vw, 1.25rem); line-height: 1.45; letter-spacing: -0.005em; }
.voice__quote p + p { margin-top: 0.6em; }
.voice__quote p:first-child::before { content: '« '; color: var(--highlight); }
.voice__quote p:last-child::after { content: ' »'; color: var(--highlight); }
.voice__by { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.voice__name { font-weight: 600; }
.voice__ctx { color: var(--text-3, var(--text-2)); }
.voice__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-2);
  background: linear-gradient(var(--highlight), var(--highlight)) 0 100% / 0 1px no-repeat;
  transition: background-size 0.5s var(--ease-out), color 0.3s;
}
.voice__link svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.45s var(--ease-out); }
.voice__link:hover { color: var(--highlight); background-size: 100% 1px; }
.voice__link:hover svg { transform: translate(2px, -2px); }
.voices__foot { margin-top: clamp(28px, 4vw, 48px); text-align: center; display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.preview {
  position: fixed;
  top: 0; left: 0;
  z-index: 30;
  width: 280px; height: 360px;
  margin: -180px 0 0 -140px;
  pointer-events: none;
  opacity: 0;
  scale: 0.6;
  transition: opacity 0.4s, scale 0.7s var(--ease-out);
}
.preview.is-visible { opacity: 1; scale: 1; }
/* Variante décalée à droite du curseur, pour laisser lisible le nom survolé */
.preview--side { width: 220px; height: 290px; margin: -145px 0 0 44px; transform-origin: 0 50%; }
.preview__inner { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: var(--radius-card); background: var(--surface); }
.preview__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  clip-path: inset(100% 0 0 0);
  transform: scale(1.25);
  transition: clip-path 0.8s var(--ease-in-out), transform 1.2s var(--ease-out);
}
.preview__img.is-active { z-index: 1; clip-path: inset(0 0 0 0); transform: scale(1); }

/* ---------- Contact ---------- */
.contact { overflow: hidden; isolation: isolate; }
.contact__bg { position: absolute; inset: 0; z-index: -1; }
.contact__bg img { position: absolute; inset: -15% 0; width: 100%; height: 130%; max-width: none; object-fit: cover; filter: saturate(0.6) brightness(0.55); }
.contact__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg) 0%, rgb(var(--bg-rgb) / 0.72) 28%, rgb(var(--bg-rgb) / 0.82) 72%, var(--bg) 100%); }

.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact__title {
  margin: 0 0 24px;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 320;
  font-size: clamp(2.8rem, 1.5rem + 4.6vw, 5rem);
  line-height: 1;
  letter-spacing: -0.02em;
}
.contact__list { display: grid; gap: 14px; margin: 40px 0 32px; padding: 0; list-style: none; }
.contact__list li { display: flex; align-items: center; gap: 14px; }
.contact__list svg { flex-shrink: 0; width: 20px; height: 20px; fill: none; stroke: var(--text-2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.3s, transform 0.5s var(--ease-out); }
.contact__list a { transition: color 0.3s; }
.contact__list li:hover svg { stroke: var(--highlight); transform: scale(1.15); }
.contact__list li:hover a { color: var(--highlight); }
.pledges { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 24px; margin: 0; padding: 24px 0 0; list-style: none; border-top: 1px solid var(--line); }
.pledges li { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 14px; }
.pledges svg { flex-shrink: 0; width: 18px; height: 18px; fill: none; stroke: var(--text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Lien vers la page des questions fréquentes */
.contact__faq {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  align-items: center;
  margin-top: 28px;
  padding: 18px 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  transition: border-color 0.4s, background-color 0.4s;
}
.contact__faq-k { color: var(--highlight); font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; }
.contact__faq-t { grid-column: 1; color: var(--text); font-family: var(--font-display); font-size: 1.15rem; line-height: 1.3; }
.contact__faq svg { grid-row: 1 / span 2; grid-column: 2; width: 22px; height: 22px; fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.6s var(--ease-out), stroke 0.3s; }
.contact__faq:hover { border-color: var(--highlight); background: rgb(var(--text-rgb) / 0.04); }
.contact__faq:hover svg { transform: translateX(6px); stroke: var(--highlight); }

.form { display: grid; gap: 14px; padding: clamp(24px, 3vw, 40px); background: rgb(var(--surface-rgb) / 0.9); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.form__group { min-width: 0; margin: 0 0 6px; padding: 0; border: 0; }
.form__legend { margin-bottom: 14px; padding: 0; color: var(--text-2); font-size: 14px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: inherit; }
.pill span {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 14px;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.pill:hover span { border-color: var(--text); }
.pill input:checked + span { border-color: var(--text); background: var(--text); color: var(--bg); }
.pill input:focus-visible + span { outline: 2px solid var(--text); outline-offset: 3px; }

.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { position: relative; }
.field__input {
  width: 100%;
  height: 56px;
  padding: 22px 22px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-btn);
  background: transparent;
  color: var(--text);
  transition: border-color 0.3s, background-color 0.3s;
}
.field__input:hover { border-color: rgb(var(--text-rgb) / 0.6); }
.field__input:focus { outline: none; border-color: var(--text); background: rgb(var(--text-rgb) / 0.04); }
.field__input[aria-invalid="true"] { border-color: var(--text); border-style: dashed; }
.field--area .field__input { height: auto; min-height: 140px; padding-top: 28px; border-radius: 22px; line-height: 1.5; resize: vertical; }
.field__label {
  position: absolute;
  top: 17px; left: 23px;
  max-width: calc(100% - 46px);
  overflow: hidden;
  color: var(--text-2);
  white-space: nowrap;
  text-overflow: ellipsis;
  pointer-events: none;
  transform-origin: left top;
  transition: transform 0.35s var(--ease-out), color 0.3s;
}
.field__input:focus + .field__label,
.field__input:not(:placeholder-shown) + .field__label { transform: translateY(-9px) scale(0.75); }

.form__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 20px; margin-top: 6px; }
.form__note { flex: 1 1 200px; max-width: 40ch; color: var(--text-3); font-size: 13px; }
.form__note a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.form__note a:hover { color: var(--highlight); }
.form__status { min-height: 1.5em; font-size: 14px; }
/* message d'erreur sous le champ concerné */
.field__error { margin: 6px 0 0 22px; color: var(--highlight); font-size: 13px; line-height: 1.4; }
.field__error:empty { display: none; }
.field__input[aria-invalid="true"] { border-color: var(--highlight); border-style: solid; }
/* champ piège anti-spam : hors de l'écran pour les visiteurs, visible pour les robots qui lisent le code */
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Bandeau de consentement aux cookies ---------- */
.consent {
  position: fixed;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 16px;
  z-index: 60;
  max-width: 920px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.4s var(--ease-out), transform 0.6s var(--ease-out);
}
.consent.is-visible { opacity: 1; transform: none; }
.consent__inner {
  display: flex;
  align-items: center;
  gap: 16px 28px;
  padding: 20px 24px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-card);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.5;
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.6);
}
.consent__text { flex: 1; }
.consent__title { margin-bottom: 4px; color: var(--text); font-weight: 600; }
.consent__text a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.consent__actions { display: flex; gap: 10px; flex-shrink: 0; }
/* refuser et accepter : même taille, même poids visuel (exigence de la CNIL) */
.consent__btn {
  min-width: 112px;
  padding: 12px 20px;
  border: 1px solid var(--text);
  border-radius: var(--radius-btn);
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.3s, color 0.3s;
}
.consent__btn:hover { background: transparent; color: var(--text); }
.consent__btn:focus-visible { outline: 2px solid var(--highlight); outline-offset: 3px; }
@media (max-width: 640px) {
  .consent { bottom: 10px; left: 10px; right: 10px; }
  .consent__inner { flex-direction: column; align-items: stretch; padding: 18px; }
  .consent__actions .consent__btn { flex: 1; }
}

/* ---------- Pied de page ---------- */
.footer { position: relative; padding-top: clamp(72px, 9vw, 120px); overflow: hidden; border-top: 1px solid var(--line); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer__brand p { max-width: 30ch; margin-top: 18px; color: var(--text-2); }
.footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; color: var(--text-2); font-size: 15px; }
.footer__col a { color: var(--text); transition: color 0.3s; }
.footer__col a:hover { color: var(--highlight); }
.footer__title { margin-bottom: 6px; color: var(--text-3); font-size: 13px; }

.footer__giant { margin-top: clamp(48px, 7vw, 96px); padding: 0 var(--gutter); overflow: hidden; text-align: center; line-height: 0.82; }
.footer__giant span {
  display: inline-block;
  padding-bottom: 0.06em;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: 19vw;
  letter-spacing: -0.012em;
  white-space: nowrap;
  color: transparent;
  background: radial-gradient(var(--torch) circle at var(--mx) var(--my), rgb(var(--text-rgb) / 0.92), var(--surface) 75%), var(--surface);
  -webkit-background-clip: text;
  background-clip: text;
  transition: --torch 0.7s var(--ease-out);
}

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  padding-bottom: 32px;
  border-top: 1px solid var(--line);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 480;
  letter-spacing: 0.01em;
}
.footer__links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer__links a, .footer__cookies { color: var(--text-2); font: inherit; letter-spacing: inherit; transition: color 0.3s; }
.footer__links a:hover, .footer__cookies:hover { color: var(--text); }
.footer__cookies { padding: 0; border: 0; background: none; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* ---------- Retour en haut ---------- */
.totop {
  position: fixed;
  right: var(--gutter); bottom: 24px;
  z-index: 40;
  display: grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgb(var(--surface-2-rgb) / 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(0.9);
  transition: opacity 0.5s, transform 0.6s var(--ease-out), background-color 0.3s;
}
.totop.is-visible { opacity: 1; pointer-events: auto; transform: none; }
.totop__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.totop__ring circle { fill: none; stroke: var(--highlight); stroke-width: 1.5; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--progress, 0)); }
.totop__arrow { width: 20px; height: 20px; fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.45s var(--ease-out); }
.totop:hover .totop__arrow { transform: translateY(-3px); }

/* ---------- Visionneuse ---------- */
.lightbox {
  width: 100%; height: 100%;
  max-width: none; max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
}
.lightbox::backdrop { background: rgb(var(--bg-rgb) / 0.94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lightbox__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 48px;
  align-items: center;
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 88px var(--gutter) 48px;
}
.lightbox__figure { height: 100%; max-height: 78vh; margin: 0; overflow: hidden; border-radius: var(--radius-card); background: var(--surface); }
/* photos en hauteur comme en largeur : on montre l'image entière */
.lightbox__img { width: 100%; height: 100%; object-fit: contain; }
.lightbox__cap > p:empty { display: none; }
.lightbox__link { margin-bottom: 36px; }
.lightbox__link[hidden] { display: none; }
.lightbox__title {
  margin: 18px 0 6px;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.2rem);
  line-height: 1.15;
  letter-spacing: -0.012em;
}
.lightbox__meta { margin-bottom: 20px; color: var(--text-2); font-size: 14px; }
.lightbox__desc { margin-bottom: 36px; color: var(--text-2); }
.lightbox__nav { display: flex; align-items: center; gap: 16px; }
.lightbox__count { min-width: 64px; color: var(--text-2); font-size: 13px; text-align: center; font-variant-numeric: tabular-nums; }
.lightbox__close { position: absolute; top: 24px; right: var(--gutter); }

html.menu-open { overflow: hidden; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .nav__phone { display: none; }
  .nav__link { padding: 10px 12px; font-size: 14.5px; }
  .services__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .species__item { grid-template-columns: 48px minmax(0, 1fr) minmax(0, 1fr) 28px; }
  .species__trait { display: none; }
  .form__row { grid-template-columns: 1fr; }
}

/* sept liens dans la barre : le téléphone s'efface d'abord, puis les liens se resserrent, puis le menu passe au bouton */
@media (max-width: 1280px) { .nav__phone { display: none; } }
@media (max-width: 1180px) { .nav__link { padding: 10px 10px; font-size: 14.5px; } }
@media (max-width: 1023px) { .nav__links { display: none; } .burger { display: block; } }

@media (max-width: 899px) {
  .nav__links { display: none; }
  .burger { display: block; }
  .nav__bar { padding-left: 16px; }

  .build__pin { padding-bottom: 170px; }
  .build.is-3d .build__intro { justify-content: flex-start; padding-top: 112px; }
  .build__shade::before { background: linear-gradient(180deg, rgb(var(--shade-rgb) / 0.72) 0%, rgb(var(--shade-rgb) / 0.5) 34%, rgb(var(--shade-rgb) / 0) 58%); }
  .build.is-3d .build__rail { display: none; }
  .build.is-3d .build__steps { bottom: 16px; padding: 16px 18px 18px; }
  .build__step-text { font-size: 14px; }
  .build.is-3d .build__scrim { background: linear-gradient(0deg, rgb(var(--shade-rgb) / 0.88) 0%, rgb(var(--shade-rgb) / 0.55) 40%, rgb(var(--shade-rgb) / 0) 64%); }
  .build.is-3d .build__outro { top: auto; bottom: 28px; transform: translateY(20px); }
  .build.is-3d .build__outro.is-visible { transform: none; }
  .badge { width: 100px; height: 100px; }
  .badge::before { inset: 23px; }

  .intro__grid { grid-template-columns: 1fr; }
  .intro__media { aspect-ratio: 4 / 3.4; }

  .method__grid { grid-template-columns: 1fr; gap: 0; }
  .method__text { display: contents; }
  .method .eyebrow { order: 1; justify-self: start; }
  .method .h2, .method__lead { order: 2; }
  .method__visual { order: 3; margin: 12px 0 8px; }
  .steps { order: 4; }
  .method__progress { order: 5; margin-bottom: 0; }
  .legend { order: 6; margin-top: 24px; }
  .method.is-pinned .method__pin { padding: 84px 0 24px; }
  .method.is-pinned .eyebrow, .method.is-pinned .legend, .method.is-pinned .method__lead { display: none; }
  .method.is-pinned .h2 { font-size: clamp(1.7rem, 1.2rem + 2.4vw, 2.3rem); margin-bottom: 8px; }
  .method.is-pinned .steps { margin: 20px 0; }
  .t-title, .t-dims text, .t-callouts { display: none; }
  .part { stroke-width: 4; }
  .t-dims path, .t-cons line { stroke-width: 2.5; }

  .species__item, .species__list--salt .species__item { grid-template-columns: 36px minmax(0, 1fr) 24px; gap: 4px 14px; }
  .species__use { grid-column: 2; grid-row: 2; font-size: 14px; }
  .species__list--salt .species__use { margin-top: 6px; font-size: 15px; }
  .species__arrow { grid-column: 3; grid-row: 1; width: 22px; height: 22px; }
  .preview { display: none; }

  .zone__grid { grid-template-columns: 1fr; }

  .contact__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }

  .lightbox__inner { grid-template-columns: 1fr; gap: 24px; align-content: center; padding-top: 84px; }
  .lightbox__figure { height: 52vh; }
}

@media (max-width: 560px) {
  /* « Construire en bois, / face à l'océan. » tient sur deux lignes */
  .hero__title { font-size: clamp(2.1rem, 11vw, 2.75rem); }
  :is(.hero__eyebrow, .build__outro-eyebrow, .case-eyebrow) { font-size: 10.5px; letter-spacing: 0.1em; }
  .nav__actions .btn { display: none; }
  .services__grid { grid-template-columns: 1fr; }
  .service { min-height: 340px; padding: 28px; }
  .stats { gap: 8px; }
  .stat { gap: 18px; padding: 16px 18px; }
  .gallery__grid { columns: 2; column-gap: 8px; }
  .shot { margin-bottom: 10px; }
  .shot__cap { font-size: 13px; }
  .form__row { grid-template-columns: 1fr; }
  .form__foot .btn { width: 100%; }
  /* très petits écrans : les boutons d'action passent sur deux lignes plutôt que de déborder */
  .btn { max-width: 100%; white-space: normal; text-align: center; }
  .pledges { grid-template-columns: 1fr; }
  .capture__btn { padding: 0 18px; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__legal { flex-direction: column; }
}

/* Mouvement réduit : on coupe les animations décoratives */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .grain { display: none; }
}
