/* ==========================================================================
   Gabarit site-immersif (HyperMap) — mobile d'abord.
   1. Remplacer les jetons de :root par la palette mesurée sur le logo
      (noter les contrastes WCAG à côté de chaque couleur de texte).
   2. Garder les règles mobiles et reduced-motion telles quelles.
   ========================================================================== */
:root {
  /* Palette mesurée sur le logo (noir pur + blanc) et sur les photos de chantier :
     zinc, cuivre patiné, bois de charpente. Contrastes relevés sur --bg. */
  --bg: #F4F2ED;          /* papier */
  --bg-alt: #E6E3DB;      /* bandes alternées */
  --ink: #14171A;         /* texte principal — 16,1:1 sur --bg */
  --ink-soft: #4C5257;    /* texte secondaire — 7,1:1 sur --bg, 6,2:1 sur --bg-alt */
  --accent: #2F5D50;      /* patine du zinc : boutons, liens — 6,7:1 sur --bg, 7,5:1 avec du blanc dessus */
  --accent-2: #8E5329;    /* cuivre : une touche, jamais un aplat — 5,5:1 sur --bg */
  --wa: #2F5D50;          /* le gabarit s'en sert pour le bouton flottant : ici, l'appel */
  --f-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 4px;          /* angles presque droits : du métal plié, pas du coussin */
  --ease: cubic-bezier(.22, .8, .2, 1);
  --gutter: clamp(16px, 5vw, 56px);
  --max: 1240px;
  --header-h: 76px;
  --paper: #FBFAF7;   /* le blanc du site, sur les blocs verts */
  --vert: #26493F;    /* le vert du hero — --paper dessus : 9,5:1 */
  --vert-2: #35685A;  /* la patine du zinc, bas du dégradé — --paper : 6,1:1 */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
html:not(.lenis) { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1rem/1.6 var(--f-body);
  overflow-x: clip;                       /* filet de sécurité, ne remplace pas le contrôle */
  -webkit-tap-highlight-color: transparent;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.narrow { max-width: 720px; }
.section { padding-block: clamp(64px, 12vw, 140px); }
.section--alt { background: var(--bg-alt); }
.prose { max-width: 70ch; }

/* ---------- Typographie : fluide, jamais de mot qui déborde ---------- */
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.08; overflow-wrap: break-word; hyphens: auto; }
.display { font-family: var(--f-display); font-weight: 700; letter-spacing: -.02em; }
h1.display { font-size: clamp(2.2rem, 8.5vw, 5.4rem); }
h2.display { font-size: clamp(1.8rem, 6vw, 3.4rem); }
.kicker { font-size: .85rem; letter-spacing: .08em; color: var(--ink-soft); margin: 0 0 1rem; }
.lead { font-size: clamp(1.05rem, 2.6vw, 1.3rem); color: var(--ink-soft); max-width: 46ch; }
.statement { font-family: var(--f-display); font-size: clamp(1.6rem, 5.4vw, 3.2rem); line-height: 1.2; margin: 0; }

/* ---------- Boutons : cible tactile >= 44 px ---------- */
.btn {
  --bg-b: var(--accent); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 12px 24px; border-radius: 2px; border: 1px solid transparent;
  background: var(--bg-b); color: var(--fg); font: 500 1rem/1.2 var(--f-body);
  text-decoration: none; cursor: pointer; touch-action: manipulation;
  transition: transform .35s var(--ease), background .3s, color .3s;
}
.btn:active { transform: scale(.97); }
.btn--ghost { --bg-b: transparent; --fg: var(--accent); border-color: currentColor; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); }
  .btn--ghost:hover { --fg: var(--accent-2); }
}

/* ---------- En-tête : se cache en descendant, revient en remontant ---------- */
.header { position: fixed; inset: 0 0 auto; z-index: 50; padding-top: env(safe-area-inset-top); transition: background .4s, transform .4s var(--ease); }
.header.is-scrolled { background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.header.is-hidden { transform: translateY(-100%); }
.header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--header-h); }
.brand { color: var(--ink); text-decoration: none; min-height: 44px; display: flex; align-items: center; }
/* Le logo du client : hauteur fixe, largeur libre — il ne pousse jamais le menu. */
.brand-logo { height: 58px; width: auto; display: block; flex: none; }

@media (max-width: 480px) { .brand-logo { height: 46px; } }
@media (max-width: 480px) { :root { --header-h: 64px; } }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) { padding: 12px; color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { text-decoration: underline; }
.burger { display: none; width: 48px; height: 48px; border: 0; background: none; position: relative; cursor: pointer; }
.burger span { position: absolute; left: 13px; right: 13px; height: 2px; background: var(--ink); transition: transform .4s var(--ease); }
.burger span:first-child { top: 19px; }
.burger span:last-child { top: 28px; }
.burger[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
@media (max-width: 860px) {
  .burger { display: block; z-index: 2; }
  .nav {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: 8px;
    height: 100dvh; background: var(--bg);
    padding: env(safe-area-inset-top) var(--gutter) env(safe-area-inset-bottom);
    clip-path: circle(0% at calc(100% - 40px) 32px); visibility: hidden;
    transition: clip-path .6s var(--ease), visibility 0s .6s;
  }
  .nav.is-open { clip-path: circle(150% at calc(100% - 40px) 32px); visibility: visible; transition: clip-path .6s var(--ease); }
  .nav a:not(.btn) { font-family: var(--f-display); font-size: 2rem; }
}

/* ---------- Hero : hauteur stable sur mobile (svh) ---------- */
.ph { border-radius: var(--radius); background: linear-gradient(135deg, var(--bg-alt), color-mix(in srgb, var(--accent) 30%, var(--bg-alt))); aspect-ratio: 4 / 3; width: 100%; position: relative; overflow: hidden; }

/* split text : chaque mot est masqué puis monte (CSS, lisible sans JS) */
.split-w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; }
.split-w > span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .js .split-w > span { animation: rise 1s var(--ease) both; animation-delay: calc(var(--i) * 45ms); }
  .js [data-hero-in] { animation: fadeUp .9s var(--ease) both .35s; }
}
@keyframes rise { from { transform: translateY(105%); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } }

/* ---------- Section épinglée : mobile = pile simple ---------- */
}

/* ---------- Défilement horizontal : mobile = scroll-snap natif ---------- */
.hscroll { overflow: clip; }
.hscroll-track {
  display: flex; gap: 16px; padding: 8px var(--gutter) 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.hscroll-track::-webkit-scrollbar { display: none; }
.panel { flex: 0 0 min(82vw, 420px); margin: 0; scroll-snap-align: center; }
.panel figcaption { padding-top: 10px; color: var(--ink-soft); }
.hscroll.is-pinned .hscroll-track { overflow: visible; scroll-snap-type: none; width: max-content; }
/* `!important` parce que ScrollTrigger pose son propre overflow en ligne quand
   il épingle : sans ça, la piste de 2 944 px fait glisser la page entière de
   côté au trackpad sur l'ordinateur (mesuré : scrollWidth 2944 pour 1280). */
.hscroll.is-pinned { overflow: clip !important; }

/* ---------- Avant / après ---------- */
.compare { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; touch-action: pan-y; }
.compare > .ph, .compare-before .ph { position: absolute; inset: 0; aspect-ratio: auto; height: 100%; border-radius: 0; }
.compare-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare::after { content: ""; position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; pointer-events: none; }
.compare input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare input:focus-visible + * , .compare:focus-within { outline: 3px solid var(--accent-2); }

/* ---------- Wizard ---------- */
.wizard { background: var(--bg); border-radius: var(--radius); padding: clamp(18px, 4vw, 36px); }
.wizard fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.wizard legend { font-family: var(--f-display); font-size: 1.4rem; margin-bottom: 14px; }
.wz-step:not([hidden]) { animation: fadeUp .45s var(--ease) both; }
.choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: flex; align-items: center; min-height: 56px; padding: 12px 16px; border: 1.5px solid color-mix(in srgb, var(--ink) 20%, transparent); border-radius: 12px; cursor: pointer; transition: border-color .2s, background .2s; }
.choice input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--bg)); }
.choice input:focus-visible + span { outline: 3px solid var(--accent-2); outline-offset: 2px; }
.field { display: grid; gap: 6px; margin-top: 12px; }
.field input, .field textarea {
  font: inherit; font-size: 16px;          /* 16 px minimum : pas de zoom iOS */
  min-height: 48px; padding: 12px 14px; border-radius: 12px; width: 100%;
  border: 1.5px solid color-mix(in srgb, var(--ink) 25%, transparent); background: #fff; color: var(--ink);
}
.msg-preview { white-space: pre-line; background: var(--bg-alt); border-radius: 12px; padding: 14px; overflow-wrap: anywhere; }
.wz-error { color: #A12A1A; min-height: 1.6em; margin: 10px 0 0; }
.wz-nav { display: flex; gap: 10px; justify-content: space-between; margin-top: 8px; }
.wz-nav [data-wz-next] { margin-left: auto; }

/* ---------- Carte au clic + FAQ ---------- */
.visit { display: grid; gap: 32px; }
@media (min-width: 860px) { .visit { grid-template-columns: 1fr 1fr; align-items: center; } }
.map-attente { margin: 0; color: var(--ink-soft); font-size: .9rem; }
.map:has(iframe) .map-attente { display: none; }
.map { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--bg-alt); display: grid; place-items: center; }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.faq summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-weight: 500; }
.faq .answer { overflow: hidden; }

/* ---------- Pied de page + bouton flottant (safe-area) ---------- */
.footer { background: var(--ink); color: var(--bg); padding: 48px 0 calc(96px + env(safe-area-inset-bottom)); }
.footer a { color: inherit; }
.footer .wrap { display: grid; gap: 16px; }
.fab {
  position: fixed; z-index: 60;
  right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom));
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
  background: var(--wa); color: #fff; font-weight: 600; text-decoration: none;
  transform: translateY(160%); transition: transform .4s var(--ease);
}
.fab.is-visible { transform: none; }
.notfound { min-height: 80svh; display: grid; place-items: center; text-align: center; }

/* ---------- Effets pointeur fin uniquement ---------- */

/* ---------- Apparitions (le contenu reste visible sans JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); }
.js .reveal.is-in { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }

/* ---------- Transitions de page natives (Chrome, Safari 18.2+) ---------- */
@view-transition { navigation: auto; }

/* ---------- Mouvement réduit : tout est lisible et immobile ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
  @view-transition { navigation: none; }
}
@media print { .header, .fab { display: none !important; } }

/* ==========================================================================
   Mathurin Toitures — ajouts propres à ce site
   ========================================================================== */

/* Photos : toutes les sources sont des portraits d'iPhone. On assume le format. */
.shot { margin: 0; position: relative; overflow: hidden; background: var(--bg-alt); border-radius: var(--radius); }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot--tall { aspect-ratio: 3 / 4; }
.shot--square { aspect-ratio: 1; }
.shot--wide { aspect-ratio: 4 / 3; }
.shot figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 16px 12px;
  font-size: .84rem; color: #fff; background: linear-gradient(transparent, rgba(12,14,16,.78)); }

/* Hero : la photo déborde en hauteur pour que la parallaxe ait de la matière */

/* Cartes de service */
.cards { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); }
.card { display: flex; flex-direction: column; background: var(--bg); border: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); }
.card .shot { border-radius: 0; }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card h3 { margin: 0; font-family: var(--f-display); font-size: 1.3rem; }
.card p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.card ul { margin: 0; padding-left: 1.1em; color: var(--ink-soft); font-size: .92rem; }
.card .more { margin-top: auto; padding-top: 10px; font-weight: 500; min-height: 44px; display: flex; align-items: center; }

/* Liste de prestations en deux colonnes */
.cols { columns: 2 220px; column-gap: 40px; padding-left: 1.1em; }
.cols li { break-inside: avoid; margin-bottom: .45em; }

/* Qualifications */
.quals { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1px; background: color-mix(in srgb, var(--ink) 14%, transparent); }
.quals li { background: var(--bg); padding: 20px 24px; display: grid; gap: 4px; }
@media (min-width: 760px) { .quals li { grid-template-columns: 200px 1fr; gap: 24px; align-items: baseline; } }
.quals b { font-family: var(--f-display); font-size: 1.05rem; letter-spacing: .02em; }
.quals span { color: var(--ink-soft); font-size: .95rem; }

/* Galerie horizontale : le moment fort */
.gal .panel { flex: 0 0 min(78vw, 340px); }
.gal .panel .shot { aspect-ratio: 3 / 4; }
.gal-head { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; justify-content: space-between; }
.gal-hint { color: var(--ink-soft); font-size: .9rem; }

/* Patrimoine : bande sombre */

/* Zone d'intervention */
.zones { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.zones li { border: 1px solid color-mix(in srgb, var(--ink) 20%, transparent); padding: 8px 14px; font-size: .9rem; }

/* Devis : wizard sur fond alterné */
.wizard { border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent); }
.wz-actions { display: grid; gap: 10px; margin-top: 14px; }
@media (min-width: 560px) { .wz-actions { grid-template-columns: 1fr 1fr; } }

/* Pied de page */
.foot-grid { display: grid; gap: 24px; }
@media (min-width: 760px) { .foot-grid { grid-template-columns: repeat(3, 1fr); } }
.foot-grid p { margin: 0; line-height: 1.7; }
.foot-grid a { display: inline-flex; align-items: center; min-height: 44px; }
.foot-legal a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 2px; }
.foot-legal { font-size: .85rem; color: color-mix(in srgb, var(--bg) 70%, transparent); margin: 28px 0 0;
  padding-top: 20px; border-top: 1px solid color-mix(in srgb, var(--bg) 22%, transparent); }
.fab { border-radius: 50%; }

/* Pages internes : chapeau */
.page-head { padding: calc(var(--header-h) + 56px) 0 0; }
.page-head .lead { max-width: 56ch; }
.breadcrumb { font-size: .85rem; color: var(--ink-soft); margin: 0 0 18px; }
.breadcrumb a { color: inherit; display: inline-flex; align-items: center; min-height: 44px; }

/* Deux colonnes texte + photo */
.duo { display: grid; gap: 28px; align-items: center; }
@media (min-width: 900px) { .duo { grid-template-columns: 1fr 1fr; gap: 56px; } .duo--rev > :first-child { order: 2; }
  .perso--flot { max-height: 150px; margin-left: 28px; }
}
@media (prefers-reduced-motion: reduce) { .perso { filter: none; } }

/* ================= Hero : l'illustration, et le texte posé dessus ==========
   Une scène dessinée, pas une photo : Mathurin sur un toit en zinc au-dessus
   du lac. Le `alt` le dit, et la note de bas de page aussi. Le voile est vert,
   pas noir — le noir écrasait tout et faisait un hero « trop sombre ». ===== */
.hero { position: relative; isolation: isolate; min-height: 100svh;
  display: grid; align-items: end; overflow: clip; color: var(--paper);
  padding: calc(var(--header-h) + 24px + env(safe-area-inset-top)) 0
           calc(56px + env(safe-area-inset-bottom)); }
.hero-bg { position: absolute; inset: 0; z-index: -2; display: block; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(20,38,32,.42) 0%, rgba(20,38,32,.04) 26%,
                    rgba(21,45,38,.52) 58%, rgba(19,42,35,.86) 84%, rgba(18,40,34,.95) 100%); }
.hero-inner { max-width: 720px; }
.hero h1 { color: var(--paper); text-wrap: balance; margin: 0 0 18px;
  font-size: clamp(2.5rem, 10.5vw, 4.6rem); line-height: 1; letter-spacing: -.03em;
  text-shadow: 0 2px 24px rgba(12,28,22,.45); }
.hero h1 .split-w > span { font-weight: 700; }
.hero .lead { color: color-mix(in srgb, var(--paper) 92%, transparent); max-width: 46ch;
  text-shadow: 0 1px 14px rgba(12,28,22,.5); }
.hero-rule { display: flex; gap: 10px; align-items: center; margin: 0 0 16px;
  font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
  color: color-mix(in srgb, var(--paper) 84%, transparent); }
.hero-rule::before { content: ""; width: 36px; height: 2px; background: var(--accent-2); }
.hero-proof { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 7px;
  font-size: .88rem; color: color-mix(in srgb, var(--paper) 88%, transparent); }
.hero-proof li { display: flex; gap: 10px; align-items: baseline; }
.hero-proof li::before { content: "—"; color: var(--accent-2); }
@media (min-width: 900px) {
  .hero h1 { font-size: clamp(3.2rem, 5.8vw, 5.6rem); }
  .hero-proof { grid-auto-flow: column; justify-content: start; gap: 28px; }
  .hero-inner { max-width: 760px; }
}
/* L'en-tête est posé sur l'illustration tant qu'on n'a pas défilé. */
body:has(.hero) .header:not(.is-scrolled),
body:has(.hero) .header:not(.is-scrolled) a { color: var(--paper); }
body:has(.hero) .header:not(.is-scrolled) .burger span { background: var(--paper); }
.btn--paper { background: var(--paper); color: var(--vert); border-color: var(--paper); }
.hero .btn--ghost { color: var(--paper); border-color: color-mix(in srgb, var(--paper) 58%, transparent); }
@media (hover: hover) and (pointer: fine) {
  .hero .btn--ghost:hover { background: color-mix(in srgb, var(--paper) 16%, transparent); border-color: var(--paper); }
}

/* ---- Section verte : le même vert, pour le bloc parcours ---- */
.section--vert { background: var(--vert); color: var(--paper); }
.section--vert .kicker { color: color-mix(in srgb, var(--paper) 72%, transparent); }
.section--vert p { color: color-mix(in srgb, var(--paper) 86%, transparent); }
.section--vert h2 { color: var(--paper); }
.duo--perso { align-items: end; }
.duo--perso .perso--duo, .perso-duo-stage .perso--duo { max-height: 300px; }
@media (min-width: 900px) { .duo--perso .perso--duo, .perso-duo-stage .perso--duo { max-height: 420px; } }

/* ---- Cartes : une illustration, un titre, une phrase. Rien de plus. ---- */
.card-fig { background: var(--bg-alt); display: grid; place-items: end center;
  padding: 18px 12px 0; min-height: 170px; }
.card-fig .perso { max-height: 150px; margin: 0; filter: drop-shadow(0 14px 18px rgba(10,20,16,.20)); }
@media (min-width: 900px) { .card-fig { min-height: 200px; } .card-fig .perso { max-height: 180px; } }

/* ---- Les six étapes, en liste simple : plus de section épinglée ---- */
.etapes { list-style: none; counter-reset: e; margin: 2.2rem 0 0; padding: 0;
  display: grid; gap: 1px; background: color-mix(in srgb, var(--ink) 12%, transparent); }
.etapes li { counter-increment: e; background: var(--bg); padding: 22px 20px; }
.etapes h3 { margin: 0 0 6px; font-family: var(--f-display); font-size: 1.1rem;
  display: flex; gap: 12px; align-items: baseline; }
.etapes h3::before { content: counter(e, decimal-leading-zero); font-size: .85rem;
  color: var(--accent-2); letter-spacing: .06em; }
.etapes p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
@media (min-width: 720px) { .etapes { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .etapes { grid-template-columns: repeat(3, 1fr); } }

/* ---- Le personnage : une illustration, jamais présentée comme une photo ---- */
.perso { display: block; width: auto; max-width: 100%; height: auto; max-height: 340px;
  margin-inline: auto; filter: drop-shadow(0 22px 30px rgba(10,20,16,.26)); }
.perso-note { margin: 0 auto; padding: 28px 0 40px; font-size: .78rem; line-height: 1.5;
  color: var(--ink-soft); text-align: center; }
@media (prefers-reduced-motion: reduce) { .perso { filter: none; } }

/* ---- Réalisations : chaque chantier s'ouvre et se raconte ---- */
.panel { position: relative; }
.panel-more { position: absolute; right: 12px; bottom: 12px; min-height: 44px;
  display: inline-flex; align-items: center; gap: 8px; padding: 0 16px;
  border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-size: .88rem;
  background: var(--paper); color: var(--vert); box-shadow: 0 6px 16px rgba(8,18,14,.26);
  transition: background .2s, color .2s; }
.panel-more::after { content: "+"; font-size: 1.15rem; line-height: 1; }
@media (hover: hover) and (pointer: fine) {
  .panel-more:hover { background: var(--vert); color: var(--paper); }
}
.work { width: min(560px, calc(100vw - 32px)); max-height: 86svh; padding: 0; border: 0;
  border-radius: var(--radius); background: var(--bg); color: var(--ink); overflow: auto; }
.work::backdrop { background: rgba(10,22,18,.62); backdrop-filter: blur(3px); }
.work form { position: sticky; top: 0; z-index: 2; height: 0; text-align: right; }
.work-close { position: relative; top: 10px; right: 10px; width: 44px; height: 44px;
  border: 0; border-radius: 50%; cursor: pointer; font-size: 1.5rem; line-height: 1;
  background: var(--paper); color: var(--ink); box-shadow: 0 4px 14px rgba(8,18,14,.2); }
.work-img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.work-body h3 { margin: 24px 24px 12px; font-family: var(--f-display); font-size: 1.5rem; }
.work-body p { margin: 0 24px 14px; color: var(--ink-soft); }
.work-body p:last-child { padding-bottom: 26px; }
.work-voice { color: var(--ink) !important; border-left: 3px solid var(--accent-2);
  padding-left: 14px; margin-left: 24px !important; }

/* Le bouton WhatsApp reprend le vert de la marque : c'est ce vert que les gens
   reconnaissent avant de lire le texte du bouton. Reintroduit le 03/10/2026,
   quand WhatsApp est devenu l'envoi principal du formulaire. */
.btn--wa { background: var(--wa); border-color: var(--wa); color: #fff; }
.btn--wa:hover { filter: brightness(1.06); }

/* ---------- Hero narratif ----------
   Le texte arrive bloc par bloc pendant que l'image zoome. La classe
   `is-story` n'est posee que si GSAP tourne : sans elle, tout est lisible. */
.hero--story { overflow: clip; }
.hero--story .hero-bg img { transform-origin: 50% 45%; will-change: transform; }
.hero-beat { margin: 0 0 14px; }
.hero--story .hero-inner { max-width: 760px; }
.hero--story .btn-row { margin-top: 26px; }
.hero--story.is-story .hero-beat { opacity: 0; }
.hero-hint { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: color-mix(in srgb, var(--paper) 72%, transparent); pointer-events: none; }
.hero-hint::after { content: ""; display: block; width: 1px; height: 26px; margin: 8px auto 0;
  background: linear-gradient(to bottom, currentColor, transparent); }
@media (prefers-reduced-motion: reduce) { .hero-hint { display: none; } }
/* Un prenom ne se coupe pas en deux : le titre du hero prefere deborder sur
   une ligne de plus plutot que de cesurer « Ma-thurin ». */
.hero--story h1 { hyphens: none; -webkit-hyphens: none; overflow-wrap: normal; }
@media (max-width: 420px) { .hero--story h1 { font-size: clamp(2rem, 11vw, 2.8rem); } }

/* ---------- Le recit continue apres le hero ----------
   Un titre decoupe en mots ne doit pas s'animer hors de l'ecran : quand il
   porte `reveal`, l'animation attend `is-in` au lieu de partir au chargement. */
.js .reveal[data-split] { opacity: 1; transform: none; }
/* `rise` ne joue que sur transform : c'est le overflow du .split-w qui cache
   le mot. Mettre une opacite ici le laisserait invisible apres l'animation. */
.js .reveal[data-split] .split-w > span { animation: none; transform: translateY(105%); }
.js .reveal[data-split].is-in .split-w > span { animation: rise 1s var(--ease) both;
  animation-delay: calc(var(--i) * 45ms); transform: none; }

/* Chaque section est un chapitre : le kicker porte son numero. */
.section { counter-increment: chapitre; }
.kicker::before { content: counter(chapitre, decimal-leading-zero); margin-right: .7em;
  opacity: .5; font-variant-numeric: tabular-nums; }
body { counter-reset: chapitre; }

/* La barre de lecture : ou on en est dans l'histoire. */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60;
  background: transparent; pointer-events: none; }
.progress > span { display: block; height: 100%; width: 100%; transform-origin: 0 50%;
  transform: scaleX(var(--p, 0)); background: var(--accent-2); }
@media (prefers-reduced-motion: reduce) { .progress { display: none; } }
