/* ==========================================================================
   CAM SERVICES — feuille de style (v5, « éditorial blanc mat »)
   Direction : grande typographie grotesque (Archivo), étiquettes en
   machine à écrire (IBM Plex Mono), grilles à filets fins, blancs mats et
   gris chauds ; profondeur douce (ombres diffuses, verre dépoli sur les
   photos), bandeau final et pied de page sombres. Thème clair uniquement.
   ========================================================================== */

/* ---------- Polices (auto-hébergées, WOFF2, licence SIL OFL) ------------ */
@font-face { font-family: "Archivo"; src: url("../fonts/archivo-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../fonts/plexmono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
/* Polices de secours calibrées : la page ne « saute » pas au chargement */
@font-face { font-family: "Archivo Fallback"; src: local("Arial"), local("Helvetica Neue"), local("Helvetica"), local("Liberation Sans"); ascent-override: 84.7%; descent-override: 20.3%; line-gap-override: 0%; size-adjust: 103.7%; }

/* ---------- Jetons ------------------------------------------------------ */
:root {
  color-scheme: light;

  /* Blancs mats, gris chauds */
  --bg: #fafaf9;
  --bg-2: #f3f2ef;
  --paper: #ffffff;
  --stone: #efeeeb;
  --stone-2: #e8e6e2;
  --ink: #141414;
  --ink-2: #55524d;
  --ink-3: #6f6c66;          /* étiquettes : contraste ≥ 4,5:1 sur les fonds clairs */
  --line: #e4e2de;
  --line-2: #cfccc6;
  --dark: #151515;
  --dark-2: #1d1c1b;
  --on-dark: #f4f3f0;
  --on-dark-2: #b9b6b0;
  --on-dark-line: #2f2e2c;
  --veil: 250, 250, 249;

  --glass: rgba(255, 255, 255, 0.74);
  --glass-edge: rgba(255, 255, 255, 0.85);
  --focus: #141414;
  --danger: #b3261e;
  --danger-bg: #fcf1ef;
  --success: #1c6a3b;
  --success-bg: #eef6f0;

  --grad-stage: radial-gradient(75% 75% at 50% 40%, #ffffff 0%, #f5f4f1 60%, #eceae6 100%);

  --sh-sm: 0 1px 2px rgba(20, 20, 20, 0.04), 0 8px 20px -10px rgba(20, 20, 20, 0.1);
  --sh-md: 0 1px 2px rgba(20, 20, 20, 0.04), 0 14px 32px -14px rgba(20, 20, 20, 0.14), 0 40px 80px -40px rgba(20, 20, 20, 0.16);
  --sh-lg: 0 2px 4px rgba(20, 20, 20, 0.03), 0 28px 60px -26px rgba(20, 20, 20, 0.2), 0 70px 130px -60px rgba(20, 20, 20, 0.22);

  --sans: "Archivo", "Archivo Fallback", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1440px;
  --pad: clamp(20px, 4vw, 56px);
  --blk-y: clamp(80px, 10vw, 140px);
  --header-h: 72px;
  --r: 14px;
  --r-sm: 10px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Base ------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); background: var(--bg); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.025em; line-height: 1.02; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
dl, dd { margin: 0; }
a { color: inherit; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
::selection { background: #e6e3dd; color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

.skip-link { position: absolute; left: 12px; top: -100px; z-index: 100; padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 500; text-decoration: none; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon--lg { width: 26px; height: 26px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.mono { font-family: var(--mono); font-size: 12px; font-weight: 400; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); line-height: 1.4; }
.soft { color: var(--ink-3); }
.lead { font-size: clamp(17px, 1.3vw, 19px); color: var(--ink-2); max-width: 560px; line-height: 1.55; }
.h2 { font-size: clamp(34px, 4.6vw, 64px); letter-spacing: -0.035em; line-height: 1.02; }
.h3 { font-size: 21px; letter-spacing: -0.015em; line-height: 1.2; }

/* Verre dépoli clair (sur les photos) */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: saturate(150%) blur(20px); backdrop-filter: saturate(150%) blur(20px);
  box-shadow: var(--sh-md);
}

/* Photos d'illustration et médias */
.photo { position: absolute; inset: 0; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.media { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r); background: var(--stone); }
.media .photo { inset: -8% 0; z-index: -1; }
.media--wide { aspect-ratio: 16 / 10; margin-top: 16px; }
.media--short { aspect-ratio: 16 / 9; }
.media--band { aspect-ratio: 4 / 3; }
@media (min-width: 700px) { .media--band { aspect-ratio: 21 / 9; } }
.photo-tag { position: absolute; left: 14px; bottom: 14px; padding: 7px 12px; border-radius: 999px; color: var(--ink-2); box-shadow: var(--sh-sm); }

/* ---------- Boutons --------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: #fff;
  font-size: 15px; font-weight: 500; line-height: 1.2; letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap;
  transition: background-color 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease), box-shadow 0.35s var(--ease);
}
.btn .icon { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
.btn:hover { background: #000; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.45); }
.btn:hover .icon:last-child { transform: translateX(4px); }
.btn:active { transform: scale(0.98); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { background: transparent; border-color: var(--ink); box-shadow: none; }
.btn--light { background: #fff; color: var(--ink); border-color: #fff; }
.btn--light:hover { background: #fff; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn--block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

.link-more {
  display: inline-flex; align-items: center; gap: 8px; padding-bottom: 2px;
  font-size: 15px; font-weight: 500; text-decoration: none;
  border-bottom: 1px solid var(--ink);
}
.link-more .icon { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
.link-more:hover .icon { transform: translateX(3px); }

/* ---------- Logo ------------------------------------------------------ */
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand-mark { position: relative; width: 28px; height: 28px; background: var(--ink); flex: none; }
.brand-mark::after { content: ""; position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; background: var(--bg); }
.brand-text b { display: block; font-weight: 700; font-size: 17px; letter-spacing: 0.02em; line-height: 1.15; }
.brand-text > span { display: none; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; color: var(--ink-3); text-transform: uppercase; line-height: 1.25; }
@media (min-width: 560px) { .brand-text > span { display: block; } }

/* ---------- En-tête ---------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(250, 250, 249, 0.86);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.4s var(--ease), background-color 0.4s var(--ease);
}
.site-header.is-scrolled { background: rgba(250, 250, 249, 0.94); box-shadow: 0 10px 30px -24px rgba(20, 20, 20, 0.35); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }
.main-nav { display: none; }
.nav-list { display: flex; gap: 4px; list-style: none; }
.nav-list a { display: block; padding: 10px 16px; border-radius: 999px; font-size: 15px; color: var(--ink-2); text-decoration: none; transition: color 0.2s, background-color 0.2s; }
.nav-list a:hover { color: var(--ink); }
.nav-list a[aria-current] { color: var(--ink); background: var(--stone); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-phone { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.header-phone .icon { width: 18px; height: 18px; }
.header-phone-text, .header-phone--wide, .header-cta { display: none; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-2); border-radius: 50%; background: transparent; color: var(--ink); text-decoration: none; transition: border-color 0.2s, transform 0.2s; }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn:active { transform: scale(0.95); }
.icon-btn .icon { width: 19px; height: 19px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }
@media (min-width: 1024px) {
  .main-nav { display: block; }
  .header-cta { display: inline-flex; }
  .menu-toggle, .header-phone.icon-btn { display: none; }
}
@media (min-width: 1280px) { .header-phone--wide { display: inline-flex; margin-right: 12px; } .header-phone-text { display: inline; } }

/* Barre de progression de lecture */
.scroll-progress { display: none; }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .scroll-progress { display: block; position: fixed; left: 0; right: 0; top: 0; z-index: 70; height: 2px; background: var(--ink); transform-origin: 0 50%; animation: progress linear both; animation-timeline: scroll(root block); }
    @keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  }
}

/* Menu mobile plein écran */
.mobile-menu {
  position: fixed; inset: 0; z-index: 55;
  background: var(--bg); overflow-y: auto;
  padding: calc(var(--header-h) + 12px) var(--pad) calc(24px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 28px;
  visibility: hidden; opacity: 0;
  transition: opacity 0.3s var(--ease), visibility 0s linear 0.3s;
}
.mobile-menu.is-open { visibility: visible; opacity: 1; transition: opacity 0.3s var(--ease), visibility 0s; }
.mobile-menu ul { list-style: none; border-top: 1px solid var(--ink); }
.mobile-menu li { border-bottom: 1px solid var(--line); }
.mobile-menu nav a {
  display: flex; align-items: baseline; gap: 16px; padding: 16px 0;
  font-size: 26px; font-weight: 600; letter-spacing: -0.025em; text-decoration: none;
  opacity: 0; transform: translateY(8px); transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
}
.mobile-menu nav a .mono { width: 24px; }
.mobile-menu.is-open nav a { opacity: 1; transform: none; }
.mobile-menu.is-open li:nth-child(2) a { transition-delay: 0.03s; }
.mobile-menu.is-open li:nth-child(3) a { transition-delay: 0.06s; }
.mobile-menu.is-open li:nth-child(4) a { transition-delay: 0.09s; }
.mobile-menu.is-open li:nth-child(5) a { transition-delay: 0.12s; }
.mobile-menu.is-open li:nth-child(6) a { transition-delay: 0.15s; }
.mobile-menu-actions { display: grid; gap: 10px; margin-top: auto; }
.mobile-menu-meta { text-align: center; font-size: 14px; color: var(--ink-2); }
.mobile-menu-meta a { text-decoration: none; }
@media (min-width: 1024px) { .mobile-menu { display: none; } }
body.menu-open { overflow: hidden; }

/* ---------- Sections --------------------------------------------------- */
main { display: block; }
.blk { position: relative; padding-block: var(--blk-y); }
.blk--paper { background: linear-gradient(180deg, var(--bg-2) 0%, #f1f0ed 100%); }
.blk--tight { padding-top: clamp(40px, 5vw, 72px); }
.blk-hd { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: clamp(40px, 5vw, 64px); }
.blk-hd .lead { margin-top: 20px; }
@media (min-width: 900px) { .blk-hd { grid-template-columns: minmax(160px, 1fr) 3fr; gap: 40px; } .blk-hd > .mono { padding-top: 10px; } }

.split { display: grid; gap: clamp(36px, 6vw, 96px); align-items: start; }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1fr; } .split--center { align-items: center; } }

/* ---------- Hero ------------------------------------------------------ */
.hero { padding-top: clamp(48px, 8vw, 112px); padding-bottom: clamp(56px, 7vw, 96px); background: radial-gradient(60% 50% at 85% 0%, #ffffff 0%, rgba(255, 255, 255, 0) 70%), var(--bg); }
.hero-top { display: grid; gap: 32px; align-items: end; }
.hero h1 { font-size: clamp(44px, 6.6vw, 104px); font-weight: 600; letter-spacing: -0.045em; line-height: 0.95; max-width: 15ch; }
.hero-side { max-width: 380px; padding-bottom: 10px; display: grid; gap: 24px; }
.hero-side p { color: var(--ink-2); }
@media (min-width: 1024px) { .hero-top { grid-template-columns: 1fr auto; gap: 48px; } }
.hero-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; list-style: none; margin-top: clamp(36px, 5vw, 56px); padding-top: 18px; border-top: 1px solid var(--ink); }

/* Scène photo + cartes en verre */
.hero-stage {
  position: relative; isolation: isolate; overflow: hidden;
  margin-top: 28px; border-radius: var(--r);
  min-height: 560px; padding: clamp(14px, 2.4vw, 32px);
  display: grid; gap: 18px; align-items: end;
  background: var(--stone);
  box-shadow: var(--sh-lg);
}
.hero-stage > .photo { inset: -8% 0; z-index: -2; }
.hero-stage > .photo img { object-position: 50% 55%; }
.hero-veil { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, rgba(var(--veil), 0) 35%, rgba(var(--veil), 0.82) 100%), linear-gradient(90deg, rgba(var(--veil), 0.6) 0%, rgba(var(--veil), 0) 55%); }
.hero-caption { order: 2; display: grid; gap: 12px; max-width: 460px; padding: 6px; }
.hero-caption .mono { color: var(--ink-2); }
.hero-caption .title { font-size: clamp(24px, 2.2vw, 32px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.12; }
.hero-caption a { justify-self: start; display: inline-flex; align-items: center; gap: 10px; margin-top: 4px; padding: 6px 18px 6px 6px; border-radius: 999px; font-weight: 500; text-decoration: none; font-variant-numeric: tabular-nums; transition: transform 0.3s var(--ease); }
.hero-caption a:hover { transform: translateY(-2px); }
.hero-caption .dot { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; }
.hero-caption .dot .icon { width: 16px; height: 16px; }

.quick { order: 1; border-radius: var(--r); min-width: 0; }
.quick-body { padding: clamp(20px, 2.4vw, 28px); display: grid; gap: 18px; }
.quick-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.quick-step { display: inline-flex; align-items: center; gap: 6px; }
.quick-step i { display: block; width: 16px; height: 3px; background: var(--line-2); }
.quick-step i:first-child { background: var(--ink); }
.quick fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.quick legend { padding: 0; margin-bottom: 16px; font-size: clamp(22px, 1.8vw, 26px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: block; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; height: 40px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255, 255, 255, 0.6); font-size: 14px; transition: border-color 0.2s, background-color 0.2s, color 0.2s; }
.chip:hover span { border-color: var(--ink); }
.chip input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }
.quick-foot { border-top: 1px solid var(--line); padding-top: 14px; text-align: center; font-size: 14px; color: var(--ink-2); }
.quick-foot a { color: var(--ink); font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; }
@media (min-width: 960px) {
  .hero-stage { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 40px; min-height: 600px; }
  .hero-caption { order: 0; }
  .quick { order: 0; align-self: center; }
}
@media (max-width: 959px) {
  .hero-stage { min-height: 0; padding-top: 180px; }
  .hero-veil { background: linear-gradient(180deg, rgba(var(--veil), 0) 0%, rgba(var(--veil), 0.6) 35%, rgba(var(--veil), 0.94) 100%); }
}

/* ---------- Services : liste numérotée -------------------------------- */
.trades { list-style: none; border-top: 1px solid var(--ink); }
.trades > li { border-bottom: 1px solid var(--line); }
.trade {
  position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) 44px; gap: 6px 16px; align-items: center;
  padding: 24px 0; text-decoration: none;
}
.trade-n { grid-row: span 2; align-self: start; padding-top: 8px; }
.trade-t { font-size: clamp(24px, 2.6vw, 36px); letter-spacing: -0.025em; transition: transform 0.35s var(--ease); }
.trade-d { grid-column: 2; color: var(--ink-2); font-size: 15px; max-width: 480px; }
.trade-go { grid-column: 3; grid-row: 1 / span 2; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 50%; display: grid; place-items: center; transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease); }
.trade-go .icon { width: 18px; height: 18px; }
.trade:hover .trade-t { transform: translateX(10px); }
.trade:hover .trade-go, .trade:focus-visible .trade-go { background: var(--ink); color: #fff; border-color: var(--ink); transform: rotate(-45deg); }
@media (min-width: 900px) {
  .trade { grid-template-columns: 80px 1.2fr 1.6fr 48px; gap: 24px; padding: 30px 0; }
  .trade-n, .trade-d, .trade-go { grid-row: auto; grid-column: auto; padding-top: 0; align-self: center; }
}

/* Vitrine illustrée */
.showcase {
  position: relative; overflow: hidden; isolation: isolate;
  margin-top: clamp(40px, 5vw, 64px);
  display: grid; gap: 8px; align-items: center;
  padding: clamp(28px, 4vw, 48px) clamp(20px, 4vw, 48px) 0;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--grad-stage);
}
.showcase-copy { display: grid; gap: 18px; justify-items: start; max-width: 460px; }
.showcase-title { font-size: clamp(24px, 2.2vw, 32px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.15; }
.showcase-illus { width: 100%; max-width: 680px; justify-self: center; margin-bottom: -4%; }
@media (min-width: 900px) {
  .showcase { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 32px; padding: 40px 32px 0 56px; }
  .showcase-copy { padding-bottom: 40px; }
}

/* ---------- Pour qui -------------------------------------------------- */
.aud { display: grid; gap: 16px; list-style: none; }
@media (min-width: 700px) { .aud { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .aud { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.aud > li { display: flex; }
.aud-c {
  position: relative; display: flex; flex-direction: column; width: 100%;
  padding: 28px; min-height: 420px;
  background: var(--paper); border: 1px solid var(--line);
  transition: border-color 0.25s var(--ease), box-shadow 0.4s var(--ease), transform 0.4s var(--ease);
}
.aud-c:hover { border-color: var(--ink); box-shadow: var(--sh-md); transform: translateY(-3px); }
.aud-illus { display: grid; place-items: center; height: 180px; margin: 12px 0 20px; }
.aud-illus img { width: auto; max-width: 82%; max-height: 160px; transition: transform 0.6s var(--ease-out); }
.aud-c:hover .aud-illus img { transform: translateY(-6px); }
.aud-c .h3 { font-size: 26px; margin: auto 0 12px; }
.aud-c p { color: var(--ink-2); font-size: 15px; }
.aud-c .aud-tags { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 11px; color: var(--ink-3); }

/* ---------- Réalisations ---------------------------------------------- */
.ba-grid { display: grid; gap: 40px 20px; list-style: none; }
@media (min-width: 700px) { .ba-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 24px; } }
@media (min-width: 1100px) { .ba-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 699px) { .ba-grid:not(.is-expanded) .ba--extra { display: none; } }
.ba { margin: 0; }
.ba-fig { margin: 0; display: grid; gap: 14px; }
.ba-open {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 0; border: 0; background: none; text-align: left;
  transition: transform 0.5s var(--ease);
}
.ba-open:hover { transform: translateY(-3px); }
.ba-img { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--stone); border-radius: var(--r-sm); }
.ba-img picture { display: block; width: 100%; height: 100%; }
.ba-img img { width: 100%; height: 100%; object-fit: cover; scale: 1.08; transition: scale 1s var(--ease-out); }
.ba-open:hover .ba-img img { scale: 1.12; }
.ba-label { position: absolute; top: 10px; left: 10px; padding: 4px 9px; border-radius: 999px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; background: rgba(255, 255, 255, 0.82); color: var(--ink); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.ba-label--after { background: var(--ink); color: #fff; }
.ba-zoom { position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, 0.9); color: var(--ink); box-shadow: var(--sh-sm); transition: transform 0.4s var(--ease); }
.ba-zoom .icon { width: 17px; height: 17px; }
.ba-open:hover .ba-zoom { transform: rotate(90deg); }
.ba figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--line); }
.ba figcaption .h3 { font-size: 18px; }
.ba-tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.ba-more { margin-top: 32px; }
@media (min-width: 700px) { .ba-more { display: none; } }

/* Visionneuse */
.lightbox { width: min(1100px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); color: var(--ink); overflow: auto; box-shadow: 0 40px 120px rgba(20, 20, 20, 0.3); }
.lightbox[open] { animation: lb-in 0.45s var(--ease-out); }
@keyframes lb-in { from { opacity: 0; transform: translateY(12px); } }
.lightbox::backdrop { background: rgba(240, 239, 236, 0.78); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.lightbox-inner { display: grid; gap: 14px; padding: 14px; }
.lightbox-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-left: 6px; }
.lightbox-title { font-weight: 500; }
.lightbox-nav { display: flex; gap: 8px; }
.lightbox-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.lightbox-imgs figure { margin: 0; position: relative; }
.lightbox-imgs img { width: 100%; aspect-ratio: 3 / 4; max-height: calc(100dvh - 150px); object-fit: contain; background: var(--stone); border-radius: var(--r-sm); }

/* ---------- Pourquoi : piliers à filets -------------------------------- */
.why-intro { display: grid; gap: 22px; justify-items: start; }
@media (min-width: 960px) { .why-intro { position: sticky; top: calc(var(--header-h) + 40px); } }
.why-side .media { margin-top: 32px; }
.pillars { display: grid; list-style: none; border-top: 1px solid var(--line); }
.pillars li { padding: 30px 0; border-bottom: 1px solid var(--line); }
.pillars .h3 { margin: 12px 0 8px; }
.pillars p { color: var(--ink-2); font-size: 15px; }
@media (min-width: 560px) {
  .pillars { grid-template-columns: 1fr 1fr; }
  .pillars li:nth-child(odd) { padding-right: 24px; border-right: 1px solid var(--line); }
  .pillars li:nth-child(even) { padding-left: 24px; }
}
@media (min-width: 960px) { .pillars li { padding: 36px 28px 36px 0; } .pillars li:nth-child(even) { padding-left: 28px; } }

/* ---------- Processus ------------------------------------------------- */
.steps-wrap { position: relative; border-top: 1px solid var(--line); }
.steps-track { position: absolute; left: 0; right: 0; top: -1px; height: 1px; overflow: hidden; }
.steps-track span { display: block; height: 100%; background: var(--ink); transform-origin: 0 50%; }
.steps { display: grid; list-style: none; }
.step { padding: 28px 0; }
.step .h3 { font-size: 22px; margin: 36px 0 10px; }
.step p { color: var(--ink-2); font-size: 15px; }
.step-num { font-size: 13px; }
@media (min-width: 560px) and (max-width: 899px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .step:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
  .step:nth-child(n + 3) { border-top: 1px solid var(--line); }
}
@media (max-width: 559px) { .step + .step { border-top: 1px solid var(--line); } .step .h3 { margin-top: 16px; } }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
  .step { padding: 28px 28px 0 0; }
  .step + .step { padding-left: 28px; border-left: 1px solid var(--line); }
}
.steps-cta { margin-top: clamp(40px, 5vw, 64px); display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.steps-cta p { color: var(--ink-2); font-size: 15px; }
.steps-cta p a { color: var(--ink); font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; border-bottom: 1px solid var(--ink); }

/* ---------- Devis & rendez-vous -------------------------------------- */
.quote { display: grid; gap: clamp(32px, 5vw, 80px); align-items: start; }
@media (min-width: 1024px) { .quote { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); } .quote-intro { position: sticky; top: calc(var(--header-h) + 32px); } }
.quote-intro { display: grid; gap: 22px; }
.quote-intro .h2 { font-size: clamp(32px, 3.4vw, 52px); }
.checklist { list-style: none; display: grid; gap: 10px; }
.checklist li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; color: var(--ink-2); font-size: 15px; }
.checklist .icon { width: 18px; height: 18px; margin-top: 2px; }
.info-list { border-top: 1px solid var(--ink); }
.info-list > div { padding: 18px 0; border-bottom: 1px solid var(--line); }
.info-list dd { margin-top: 6px; font-size: 19px; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.info-list a { text-decoration: none; }
.info-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.contact-alt-phone { font-size: clamp(26px, 2.4vw, 34px); font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

.form-card { min-width: 0; padding: clamp(22px, 3.5vw, 48px); background: var(--paper); border: 1px solid var(--line); display: grid; gap: 28px; align-content: start; box-shadow: var(--sh-sm); }
.tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border: 1px solid var(--line-2); border-radius: 999px; }
.tabs::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--ink); translate: calc(var(--tab, 0) * 100%) 0; transition: translate 0.5s var(--ease-out); }
.tab { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 12px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); font-size: 15px; font-weight: 500; transition: color 0.3s var(--ease); }
.tab .icon { width: 17px; height: 17px; }
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: #fff; }
.tab .lbl-short { display: none; }
@media (max-width: 479px) { .tab .lbl-full { display: none; } .tab .lbl-short { display: inline; } }
.tab-panel:not([hidden]) { animation: panel-in 0.45s var(--ease-out); }
@keyframes panel-in { from { opacity: 0; transform: translateY(6px); } }

.panel-head { display: grid; gap: 6px; }
.panel-head .h3 { font-size: clamp(26px, 2.2vw, 32px); letter-spacing: -0.025em; }
.panel-head p { color: var(--ink-2); font-size: 14px; }
.notice { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 14px 16px; background: var(--bg-2); border-left: 2px solid var(--ink); font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.notice .icon { width: 18px; height: 18px; margin-top: 1px; color: var(--ink); }

.form { display: grid; gap: 24px; }
.form-grid { display: grid; gap: 20px 24px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .field--full { grid-column: 1 / -1; } }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field label, .field .label { font-size: 14px; color: var(--ink-2); line-height: 1.3; }
.req { color: var(--ink); margin-left: 2px; }
.opt { color: var(--ink-3); }
.hint { color: var(--ink-3); font-size: 13px; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 0;
  border: 0; border-bottom: 1px solid #8f8b84; border-radius: 0;
  background: transparent; color: var(--ink);
  font-size: 16px; line-height: 1.4;
  transition: border-color 0.2s, box-shadow 0.2s;
  -webkit-appearance: none; appearance: none;
}
.input::placeholder, .textarea::placeholder { color: #9a968f; }
.select { padding-right: 28px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 12px) 55%, calc(100% - 6px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
.textarea { min-height: 120px; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-bottom-color: var(--ink); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-bottom-color: var(--ink); box-shadow: 0 1px 0 0 var(--ink); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: none; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-bottom-color: var(--danger); box-shadow: 0 1px 0 0 var(--danger); }
.field.has-error .file-drop { border-color: var(--danger); }
.field-error { display: none; align-items: flex-start; gap: 6px; color: var(--danger); font-size: 13px; font-weight: 500; line-height: 1.35; }
.field-error .icon { width: 15px; height: 15px; margin-top: 1px; }
.field.has-error .field-error { display: flex; animation: panel-in 0.3s var(--ease-out); }
.file-drop { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px dashed #8f8b84; background: var(--bg); transition: border-color 0.2s, background-color 0.2s; }
.file-drop:hover, .file-drop.is-dragover { border-color: var(--ink); background: var(--paper); }
.file-drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-drop input[type="file"]:focus-visible + .file-drop-icon { outline: 2px solid var(--focus); outline-offset: 3px; }
.file-drop-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); flex: none; }
.file-drop-icon .icon { width: 18px; height: 18px; }
.file-drop-text { display: grid; gap: 2px; font-size: 15px; min-width: 0; }
.file-drop-text strong { font-weight: 500; }
.file-list { list-style: none; display: grid; gap: 6px; font-size: 14px; }
.file-list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.file-list .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.file-list .size { color: var(--ink-3); font-variant-numeric: tabular-nums; flex: none; }
.file-clear { justify-self: start; border: 0; background: none; padding: 4px 0; font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-summary { display: none; gap: 10px; grid-template-columns: auto minmax(0, 1fr); padding: 12px 16px; background: var(--danger-bg); border-left: 2px solid var(--danger); color: var(--danger); font-weight: 500; font-size: 14px; }
.form-summary.is-visible { display: grid; animation: panel-in 0.3s var(--ease-out); }
.form-summary .icon { width: 18px; height: 18px; }
.form-legal { color: var(--ink-3); font-size: 13px; line-height: 1.5; text-align: center; }
.form-legal a { color: var(--ink); }
.btn[aria-busy="true"] { pointer-events: none; opacity: 0.85; }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.result { display: grid; gap: 14px; justify-items: start; padding: 28px; background: var(--bg-2); border-left: 2px solid var(--ink); animation: panel-in 0.45s var(--ease-out); }
.result:focus { outline: none; }
.result--success { background: var(--success-bg); border-left-color: var(--success); }
.result--success .result-icon { background: var(--success); }
.result-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: #fff; }
.result .h3 { font-size: 26px; }
.result p { color: var(--ink-2); }
.result .btn-row { width: 100%; align-items: center; }
.result-contact { font-size: 14px; color: var(--ink-2); }
.result-contact a { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.copy-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; font-size: 14px; font-weight: 500; transition: border-color 0.2s; }
.copy-btn:hover { border-color: var(--ink); }
.copy-btn .icon { width: 16px; height: 16px; }
.copy-btn.is-copied { border-color: var(--success); color: var(--success); }

/* ---------- À propos -------------------------------------------------- */
.about-copy { display: grid; gap: 22px; justify-items: start; }
.about-copy > p:not(.lead):not(.mono) { color: var(--ink-2); max-width: 60ch; }
.points { list-style: none; display: grid; gap: 12px; }
.points li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; }
.points .icon { width: 18px; height: 18px; margin-top: 3px; }
.sheet { padding: clamp(24px, 3vw, 40px); background: var(--paper); border: 1px solid var(--line); box-shadow: var(--sh-md); display: grid; gap: 22px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--ink); }
.sheet-title { color: var(--ink); }
.sheet-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink-2); }
.sheet-pill .icon { width: 13px; height: 13px; }
.sheet-big { display: grid; gap: 4px; }
.sheet-big span { color: var(--ink-3); font-size: 14px; }
.sheet-big strong { font-size: clamp(32px, 3vw, 44px); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.sheet dl { display: grid; border-top: 1px solid var(--line); }
.sheet-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.sheet dt { color: var(--ink-3); font-size: 14px; flex: none; }
.sheet dd { font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; min-width: 0; }

/* ---------- Zone d'intervention -------------------------------------- */
.zone-copy { display: grid; gap: 22px; justify-items: start; }
.zone-copy > p:not(.lead):not(.mono) { color: var(--ink-2); }
.zone-map { position: relative; overflow: hidden; isolation: isolate; min-height: 380px; border-radius: var(--r); background: var(--stone); box-shadow: var(--sh-lg); display: grid; place-items: center; }
.zone-map .photo { inset: -8% 0; z-index: -2; }
.zone-veil { position: absolute; inset: 0; z-index: -1; background: radial-gradient(55% 50% at 50% 50%, rgba(var(--veil), 0.45) 0%, rgba(var(--veil), 0.1) 75%), linear-gradient(180deg, rgba(var(--veil), 0.05), rgba(var(--veil), 0.3)); }
.zone-pin { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 22px 30px 20px; border-radius: var(--r); }
.zone-pin-dot { position: relative; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--ink); color: #fff; }
.zone-pin-dot::before, .zone-pin-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--ink); opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .zone-pin-dot::before, .zone-pin-dot::after { animation: ping 3.2s var(--ease-out) infinite; }
  .zone-pin-dot::after { animation-delay: 1.6s; }
  @keyframes ping { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(2.4); opacity: 0; } }
}
.zone-pin-name { margin-top: 6px; font-size: 36px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.zone-pin-sub { color: var(--ink-2); font-size: 14px; }
@media (min-width: 960px) { .zone-map { min-height: 0; aspect-ratio: 4 / 3.2; } }
.zone-coords { position: absolute; left: 14px; bottom: 14px; padding: 6px 12px; border-radius: 999px; color: var(--ink-2); box-shadow: var(--sh-sm); }

/* ---------- Contact --------------------------------------------------- */
.contact-grid { display: grid; list-style: none; border-top: 1px solid var(--ink); }
.contact-card { display: flex; flex-direction: column; gap: 10px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.contact-value { font-size: 21px; letter-spacing: -0.01em; line-height: 1.3; overflow-wrap: anywhere; }
.contact-value--big { font-size: clamp(30px, 3vw, 42px); font-weight: 600; letter-spacing: -0.035em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.contact-card .muted { color: var(--ink-2); font-size: 15px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; }
@media (min-width: 900px) {
  .contact-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .contact-card { padding: 32px 32px 32px 0; border-bottom: 0; }
  .contact-card + .contact-card { padding-left: 32px; border-left: 1px solid var(--line); }
}

/* ---------- Bandeau final sombre -------------------------------------- */
.cta { position: relative; overflow: hidden; isolation: isolate; padding-block: clamp(80px, 10vw, 140px); background: radial-gradient(60% 80% at 100% 0%, #262524 0%, rgba(38, 37, 36, 0) 60%), var(--dark); color: var(--on-dark); }
.cta .mono { color: var(--on-dark-2); margin-bottom: 28px; }
.cta h2 { font-size: clamp(40px, 6.4vw, 96px); letter-spacing: -0.04em; line-height: 1; max-width: 1100px; }
.cta h2 span { color: #8a8782; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 48px; align-items: center; }
.cta .btn--ghost { color: var(--on-dark); border-color: #45433f; }
.cta .btn--ghost:hover { border-color: #fff; }
.cta :focus-visible { outline-color: #fff; }

/* ---------- Pied de page sombre --------------------------------------- */
.site-footer { background: var(--dark); color: var(--on-dark-2); border-top: 1px solid var(--on-dark-line); padding: 64px 0 32px; font-size: 15px; }
.site-footer :focus-visible { outline-color: #fff; }
.footer-main { display: grid; gap: 40px; }
@media (min-width: 640px) { .footer-main { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-main { grid-template-columns: 2fr 1fr 1.2fr 1.2fr; gap: 32px; } }
.footer-brand { display: grid; gap: 18px; align-content: start; max-width: 360px; }
.site-footer .brand-mark { background: #fff; }
.site-footer .brand-mark::after { background: var(--dark); }
.site-footer .brand-text b { color: #fff; }
.footer-tagline { color: var(--on-dark); }
.footer-title { color: #8a8782; margin-bottom: 16px; }
.footer-list { list-style: none; display: grid; gap: 8px; }
.footer-list a { text-decoration: none; overflow-wrap: anywhere; transition: color 0.2s; }
.footer-list a:hover { color: #fff; }
.footer-info { display: grid; gap: 8px; }
.footer-info div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
.footer-info dt { color: #8a8782; }
.footer-info dd { color: var(--on-dark); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--on-dark-line); color: #8a8782; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 20px; list-style: none; }
.footer-bottom a { text-decoration: none; }
.footer-bottom a:hover { color: #fff; }

/* ---------- Barre d'appel mobile ------------------------------------- */
.mobile-cta {
  position: fixed; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); z-index: 50;
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 6px;
  border-radius: 999px; background: rgba(250, 250, 249, 0.88);
  border: 1px solid var(--line); box-shadow: var(--sh-md);
  -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
  transform: translateY(calc(100% + 24px)); transition: transform 0.5s var(--ease-out);
}
.mobile-cta.is-visible { transform: none; }
.mobile-cta .btn { min-height: 46px; }
.mobile-cta .btn--ghost { background: #fff; }
@media (min-width: 1024px) { .mobile-cta { display: none; } }
@media (max-width: 1023px) { .site-footer { padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px)); } }

/* ---------- Pages intérieures ---------------------------------------- */
.page-hero { padding: clamp(48px, 7vw, 104px) 0 clamp(36px, 5vw, 64px); }
.page-hero .wrap { display: grid; gap: 22px; justify-items: start; }
.page-hero h1 { font-size: clamp(44px, 7vw, 108px); letter-spacing: -0.045em; line-height: 0.95; }
.page-hero p:not(.mono) { color: var(--ink-2); max-width: 620px; font-size: clamp(17px, 1.4vw, 19px); }
.breadcrumb { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.breadcrumb a { color: var(--ink-3); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb li + li::before { content: "/"; margin-right: 10px; color: var(--line-2); }
.breadcrumb [aria-current] { color: var(--ink); }

.ex-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); padding-bottom: clamp(56px, 8vw, 104px); }
.ex-nav { display: none; }
@media (min-width: 1024px) {
  .ex-layout { grid-template-columns: 240px minmax(0, 1fr); }
  .ex-nav { display: block; position: sticky; top: calc(var(--header-h) + 32px); align-self: start; padding-top: 48px; }
  .ex-nav > .mono { margin-bottom: 14px; }
  .toc { list-style: none; }
  .toc a { display: flex; align-items: baseline; gap: 14px; padding: 9px 0; font-size: 15px; color: var(--ink-3); text-decoration: none; transition: color 0.2s; }
  .toc a .mono { color: inherit; }
  .toc a:hover, .toc a[aria-current] { color: var(--ink); }
}
.cat { padding: 48px 0 64px; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 8px); }
.cat:last-child { border-bottom: 0; }
.cat-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; margin-bottom: 28px; }
.cat-h .h2 { font-size: clamp(32px, 4vw, 56px); }
.cat-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); }
@media (min-width: 900px) { .cat-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.cat-lead { font-size: 18px; color: var(--ink-2); margin-bottom: 28px; }
.cat-list { list-style: none; border-top: 1px solid var(--line); }
.cat-list li { border-bottom: 1px solid var(--line); }
.cat-list a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; text-decoration: none; }
.cat-list a > span { display: grid; gap: 3px; min-width: 0; }
.cat-list b { font-weight: 600; font-size: 16px; }
.cat-list a > span > span { color: var(--ink-2); font-size: 14px; }
.cat-list .icon { width: 18px; height: 18px; color: var(--ink-3); transition: transform 0.3s var(--ease), color 0.3s; }
.cat-list a:hover .icon { transform: translateX(4px); color: var(--ink); }
.cat-illus { display: grid; place-items: center; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: var(--r); background: var(--grad-stage); }
.cat-illus img { width: auto; max-width: 68%; max-height: 72%; }
.media--band { margin-bottom: clamp(24px, 4vw, 48px); }

.prose { display: grid; gap: 16px; }
.prose > * { max-width: 760px; }
.prose h2 { font-size: clamp(24px, 2.2vw, 30px); letter-spacing: -0.02em; line-height: 1.15; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul { padding-left: 1.2em; display: grid; gap: 6px; }
.prose a { color: var(--ink); text-underline-offset: 3px; }
.prose .todo { display: inline; padding: 2px 8px; border: 1px dashed var(--line-2); border-radius: 999px; color: var(--ink); font-size: 14px; font-weight: 500; }
.prose dl { display: grid; border-top: 1px solid var(--ink); }
.prose dl div { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 560px) { .prose dl div { grid-template-columns: 220px minmax(0, 1fr); gap: 16px; } }
.prose dt { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); padding-top: 3px; }
.prose dd { font-weight: 500; overflow-wrap: anywhere; }
.error-page { min-height: 52vh; display: grid; align-content: center; justify-items: start; gap: 20px; }
.error-code { font-size: clamp(96px, 16vw, 220px); font-weight: 600; letter-spacing: -0.06em; line-height: 0.85; color: var(--stone-2); }

/* ==========================================================================
   Mouvement
   1. Entrée du haut de page au chargement
   2. Apparitions au défilement (état au repos visible)
   3. Parallaxe et progression pilotées par le défilement (CSS, hors thread
      principal) : grands écrans uniquement, coupées en mode « léger »
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  [data-enter] { animation: enter 0.9s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 80ms + 40ms); }
  @keyframes enter { from { opacity: 0; translate: 0 16px; } }
  .is-revealed { animation: reveal-up 0.9s var(--ease-out) both; animation-delay: var(--d, 0ms); }
  [data-reveal="fade"].is-revealed { animation-name: reveal-fade; }
  [data-reveal="zoom"].is-revealed { animation-name: reveal-zoom; animation-duration: 1.1s; }
  @keyframes reveal-up { from { opacity: 0; translate: 0 22px; } }
  @keyframes reveal-fade { from { opacity: 0; } }
  @keyframes reveal-zoom { from { opacity: 0; scale: 0.97; translate: 0 18px; } }
}
@supports (animation-timeline: view()) {
  @media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
    html:not(.lite) .hero-stage > .photo { animation: par-photo linear both; animation-timeline: view(); animation-range: cover; }
    html:not(.lite) .hero-stage .quick { animation: par-quick linear both; animation-timeline: view(); animation-range: cover 30% cover 100%; }
    html:not(.lite) .media .photo,
    html:not(.lite) .zone-map .photo,
    html:not(.lite) .ba-img img { animation: par-img linear both; animation-timeline: view(); animation-range: cover; }
    html:not(.lite) .showcase-illus { animation: par-illus linear both; animation-timeline: view(); animation-range: entry 0% cover 55%; }
    @keyframes par-photo { from { translate: 0 -6%; } to { translate: 0 6%; } }
    @keyframes par-quick { from { translate: 0 0; } to { translate: 0 -32px; } }
    @keyframes par-img { from { translate: 0 -4%; } to { translate: 0 4%; } }
    @keyframes par-illus { from { translate: 0 40px; } to { translate: 0 0; } }
  }
  @media (prefers-reduced-motion: no-preference) {
    .steps-track span { animation: track linear both; animation-timeline: view(); animation-range: entry 30% cover 50%; }
    @keyframes track { from { scale: 0 1; } to { scale: 1 1; } }
  }
}
@supports not (animation-timeline: view()) { .steps-track { display: none; } }

/* Mode léger : pas de flou d'arrière-plan (coûteux sur les petits processeurs) */
html.lite .site-header, html.lite .mobile-cta, html.lite .glass { -webkit-backdrop-filter: none; backdrop-filter: none; }
html.lite .site-header, html.lite .mobile-cta { background: rgba(250, 250, 249, 0.98); }
html.lite .glass { background: rgba(255, 255, 255, 0.94); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .steps-track { display: none; }
}
