/* Geotechnisys — le site est un sondage : on descend du terrain naturel au substratum.
   Couleurs des couches tirées du logo (sable clair → argile brune), vert d'eau de la semelle et du pieu. */

:root {
  --papier: #f4efe6;
  --papier-2: #e9e1d3;
  --encre: #17130f;
  --encre-2: #5d5247;
  --vert: #2fc79c;
  --vert-clair: #8ff5d6;
  --vert-fonce: #14876a;
  --vert-nuit: #0d5c49;
  --eau: #5aa9e6;
  --sable-clair: #fff0c2;
  --sable: #f5cf74;
  --ocre: #eba23f;
  --orange: #d9773a;
  --terre: #b9532f;
  --brique: #7f3524;
  --nuit: #06050b;
  --texte-sol: #f1e9dc;
  --texte-sol-2: rgba(241, 233, 220, 0.7);
  --texte-sol-3: rgba(241, 233, 220, 0.45);
  --f-titre: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-serif: "Instrument Serif", ui-serif, Georgia, serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gouttiere: clamp(20px, 5vw, 64px);
  --entete: 72px;
  --ease: cubic-bezier(0.2, 0.75, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--entete); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--nuit);
  color: var(--texte-sol);
  font-family: var(--f-titre);
  font-optical-sizing: auto;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; }
p { margin: 0; }
code { font-family: var(--f-mono); font-size: 0.86em; padding: 0.1em 0.35em; border-radius: 5px; background: rgba(255, 255, 255, 0.08); }
em { font-style: normal; }
:focus-visible { outline: 2px solid var(--vert); outline-offset: 3px; border-radius: 4px; }

.evitement { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--vert); color: var(--nuit); border-radius: 8px; font-weight: 600; text-decoration: none; }
.evitement:focus { top: 12px; }
.visuel-masque { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Boutons et liens ─────────────────────────────────────────────────────────── */
.bouton {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 24px; border-radius: 999px;
  background: var(--vert); color: var(--nuit);
  font-weight: 650; font-size: 16px; line-height: 1; text-decoration: none; white-space: nowrap;
  box-shadow: 0 0 0 0 rgba(47, 199, 156, 0.5);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
}
.bouton:hover { transform: translateY(-2px); background: var(--vert-clair); box-shadow: 0 10px 30px -8px rgba(47, 199, 156, 0.7); }
.bouton--petit { padding: 10px 16px; font-size: 14px; }
.bouton--grand { padding: 20px 32px; font-size: 18px; }
.lien-fleche { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 2px; }
.lien-fleche span { transition: transform 0.3s var(--ease); }
.lien-fleche:hover span { transform: translateY(3px); }

/* ── En-tête ──────────────────────────────────────────────────────────────────── */
.entete {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--entete);
  display: flex; align-items: center; gap: 24px; padding: 0 var(--gouttiere);
  color: var(--encre);
  transition: background 0.4s, color 0.4s, box-shadow 0.4s;
}
.entete.flotte { background: rgba(244, 239, 230, 0.78); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); box-shadow: 0 1px 0 rgba(23, 19, 15, 0.08); }
.entete[data-ton="sombre"] { color: var(--texte-sol); }
.entete[data-ton="sombre"].flotte { background: rgba(18, 14, 12, 0.66); box-shadow: 0 1px 0 rgba(241, 233, 220, 0.08); }
.entete__marque { display: block; flex: none; margin-right: auto; }
.logo { height: 44px; width: auto; }
.logo--sombre, .entete[data-ton="sombre"] .logo--clair { display: none; }
.entete[data-ton="sombre"] .logo--sombre { display: block; }
.entete__nav { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 30px); font-size: 15px; }
.entete__nav a:not(.bouton) { text-decoration: none; opacity: 0.82; position: relative; }
.entete__nav a:not(.bouton)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
.entete__nav a:not(.bouton):hover { opacity: 1; }
.entete__nav a:not(.bouton):hover::after, .entete__nav a.courant::after { transform: scaleX(1); }
.entete__nav a.courant { opacity: 1; }
.entete__menu { display: none; position: relative; width: 44px; height: 44px; border: 0; background: none; color: inherit; cursor: pointer; }
.entete__menu span:not(.visuel-masque) { position: absolute; left: 11px; right: 11px; height: 2px; background: currentColor; border-radius: 2px; transition: transform 0.3s var(--ease), top 0.3s var(--ease); }
.entete__menu span:nth-child(1) { top: 17px; }
.entete__menu span:nth-child(2) { top: 25px; }
.entete__menu[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.entete__menu[aria-expanded="true"] span:nth-child(2) { top: 21px; transform: rotate(-45deg); }

/* ── Jauge de profondeur ──────────────────────────────────────────────────────── */
.sonde {
  position: fixed; z-index: 40; right: 26px; top: 50%; transform: translateY(-50%);
  height: min(58vh, 520px); width: 14px;
  color: var(--encre); transition: color 0.4s;
  font-family: var(--f-mono); font-size: 11px; line-height: 1.2;
}
.sonde[data-ton="sombre"] { color: var(--texte-sol); }
.sonde__titre { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); letter-spacing: 0.12em; opacity: 0.7; }
.sonde__colonne { position: absolute; inset: 0; border-radius: 7px; overflow: hidden; box-shadow: 0 0 0 1px currentColor; opacity: 0.9; }
.sonde__segment { position: absolute; left: 0; right: 0; cursor: pointer; transition: filter 0.2s; }
.sonde__segment:hover { filter: brightness(1.25); }
.sonde__graduation { position: absolute; left: calc(100% + 6px); transform: translateY(-50%); opacity: 0.5; font-size: 9.5px; }
.sonde__curseur {
  position: absolute; right: calc(100% + 10px); top: 0; transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap;
  transition: top 0.12s linear;
}
.sonde__curseur::after { content: ""; position: absolute; right: -10px; top: 50%; width: 24px; height: 2px; margin-top: -1px; background: var(--vert); transform: translateX(50%); box-shadow: 0 0 10px var(--vert); }
.sonde__z { font-size: 13px; font-weight: 500; }
.sonde__nom { opacity: 0.6; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }

/* ── Surface (héros) ──────────────────────────────────────────────────────────── */
.surface {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column;
  background: var(--papier); color: var(--encre);
  overflow: hidden; touch-action: pan-y;
}
.surface__toile { position: absolute; inset: 0; width: 100%; height: 100%; }
.surface__ciel {
  position: relative; z-index: 1; width: 100%; max-width: 1480px; margin: 0 auto;
  padding: calc(var(--entete) + clamp(24px, 6vh, 72px)) calc(var(--gouttiere) + 60px) clamp(84px, 11vh, 120px) var(--gouttiere);
  pointer-events: none;
}
.surface__ciel a { pointer-events: auto; }
.surtitre { display: flex; align-items: center; gap: 10px; margin-bottom: clamp(16px, 3vh, 28px); font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--encre-2); }
.pastille { width: 8px; height: 8px; border-radius: 50%; background: var(--vert); box-shadow: 0 0 0 4px rgba(47, 199, 156, 0.2); animation: pouls 2.4s infinite; }
@keyframes pouls { 50% { box-shadow: 0 0 0 8px rgba(47, 199, 156, 0); } }
.surface__titre {
  font-size: clamp(2.7rem, 6.7vw, 7.4rem); line-height: 0.94; letter-spacing: -0.04em; font-weight: 640;
  font-variation-settings: "opsz" 96; text-wrap: balance;
}
.surface__titre em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -0.015em; color: var(--vert-fonce); font-size: 1.06em; }
.mot { display: inline-block; animation: depot 1s var(--ease) backwards; animation-delay: calc(var(--i) * 75ms + 120ms); }
@keyframes depot { from { opacity: 0; transform: translateY(-0.55em) rotate(-2deg); filter: blur(8px); } }
.surface__chapeau { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 48px; margin-top: clamp(22px, 3.5vh, 36px); animation: depot 1s var(--ease) 0.8s backwards; }
.surface__chapeau p { max-width: 34em; font-size: 18px; line-height: 1.55; color: var(--encre-2); }
.surface__actions { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.surface__sol { position: relative; z-index: 1; flex: 1 0 auto; min-height: 40vh; min-height: 40svh; pointer-events: none; }
.surface__consigne {
  position: absolute; left: var(--gouttiere); bottom: 28px; padding: 6px 12px 6px 8px; border-radius: 999px; background: rgba(23, 19, 15, 0.55);
  display: flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 12px; color: var(--texte-sol-2);
}
.surface__main { width: 22px; height: 22px; border: 1.5px solid currentColor; border-radius: 50%; position: relative; animation: glisse 3s var(--ease) infinite; }
.surface__main::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--vert); }
@keyframes glisse { 0%, 100% { transform: translateX(-4px); } 50% { transform: translateX(6px); } }
.surface__lecture {
  position: absolute; right: calc(var(--gouttiere) + 60px); top: 18px;
  padding: 8px 12px; border-radius: 10px; background: rgba(23, 19, 15, 0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-family: var(--f-mono); font-size: 12px; line-height: 1.6; text-align: right; color: var(--texte-sol);
  white-space: pre;
}
.surface__lecture b { color: var(--vert-clair); font-weight: 500; }

/* ── Couches ──────────────────────────────────────────────────────────────────── */
.couche { position: relative; background: var(--fond); color: var(--texte-sol); isolation: isolate; }
.couche::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-image: var(--motif); opacity: 1; }
.couche::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.09; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.contact { position: absolute; left: 0; width: 100%; height: 44px; top: -43px; z-index: 1; pointer-events: none; }
.couche__interieur { position: relative; z-index: 2; max-width: 1320px; margin: 0 auto; padding: clamp(96px, 15vh, 168px) calc(var(--gouttiere) + 70px) clamp(96px, 15vh, 168px) var(--gouttiere); }

.couche--remblai { --fond: #3a3029; --teinte: var(--sable);
  --motif: radial-gradient(circle at 30% 40%, rgba(255, 236, 200, 0.045) 0 2px, transparent 3px), radial-gradient(circle at 70% 60%, rgba(0, 0, 0, 0.12) 0 3px, transparent 4px), radial-gradient(circle at 50% 50%, rgba(245, 207, 116, 0.05) 0 1.2px, transparent 1.8px); }
.couche--remblai::before { background-size: 43px 59px, 67px 71px, 17px 23px; background-position: 0 0, 21px 33px, 7px 11px; }
.couche--limon { --fond: #33271d; --teinte: var(--ocre);
  --motif: radial-gradient(rgba(235, 162, 63, 0.09) 1px, transparent 1.6px), radial-gradient(rgba(0, 0, 0, 0.16) 1px, transparent 1.6px); }
.couche--limon::before { background-size: 7px 7px, 11px 9px; background-position: 0 0, 3px 4px; }
.couche--sable { --fond: #2b2118; --teinte: #f2b45a;
  --motif: radial-gradient(rgba(255, 220, 150, 0.12) 0.8px, transparent 1.3px), radial-gradient(rgba(255, 240, 194, 0.07) 1px, transparent 1.6px), radial-gradient(rgba(0, 0, 0, 0.2) 1px, transparent 1.6px); }
.couche--sable::before { background-size: 5px 6px, 13px 11px, 9px 7px; background-position: 0 0, 4px 2px, 2px 5px; }
.couche--argile { --fond: #2c1913; --teinte: var(--orange);
  --motif: repeating-linear-gradient(0deg, rgba(255, 190, 150, 0.045) 0 1px, transparent 1px 13px), repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.14) 0 2px, transparent 2px 37px); }
.couche--marne { --fond: #1f1b18; --teinte: #dcb08a;
  --motif: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='36'%3E%3Cpath d='M0 18 C40 10 80 26 120 18 S200 10 240 18' fill='none' stroke='rgba(220,176,138,.07)' stroke-width='1.2'/%3E%3C/svg%3E"); }
.couche--calcaire { --fond: #141311; --teinte: #e8dcc6;
  --motif: repeating-linear-gradient(0deg, rgba(232, 220, 198, 0.05) 0 1px, transparent 1px 110px), repeating-linear-gradient(90deg, rgba(232, 220, 198, 0.03) 0 1px, transparent 1px 180px); }
.couche--substratum { --fond: var(--nuit); --teinte: var(--vert);
  --motif: radial-gradient(ellipse 70% 50% at 70% 100%, rgba(47, 199, 156, 0.16), transparent 70%); }

.cote {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: clamp(20px, 3vh, 32px);
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--teinte);
}
.cote span { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid currentColor; border-radius: 50%; letter-spacing: 0; }
.cote i { font-style: normal; color: var(--texte-sol-3); letter-spacing: 0.06em; }
.cote i::before { content: ""; display: inline-block; vertical-align: middle; width: 36px; height: 1px; margin-right: 12px; background: currentColor; }
.titre-couche { font-size: clamp(2.2rem, 4.9vw, 4.6rem); line-height: 1.0; letter-spacing: -0.035em; font-weight: 600; text-wrap: balance; max-width: 15em; }
.titre-couche em, .refus__titre em { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; color: var(--teinte); }
.chapeau { margin-top: clamp(20px, 3vh, 30px); font-size: clamp(17px, 1.45vw, 20px); line-height: 1.55; color: var(--texte-sol-2); max-width: 36em; text-wrap: pretty; }
.couche p + p:not(.chapeau):not(.cote) { margin-top: 18px; }
.couche strong { color: var(--texte-sol); font-weight: 650; }

.grille-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.grille-titre { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 80px); align-items: end; }
.grille-titre .chapeau { margin-top: 0; }

/* Apparition au défilement (seulement si le script tourne) */
.js .apparait { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: var(--d, 0s); }
.js .apparait.vu { opacity: 1; transform: none; }

/* ── 01 Remblai : principes ───────────────────────────────────────────────────── */
.principes { list-style: none; margin: clamp(48px, 8vh, 88px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2px; }
.principe { position: relative; padding: 30px 28px 34px; background: rgba(255, 240, 210, 0.04); border-top: 1px solid rgba(245, 207, 116, 0.35); transition: background 0.4s; }
.principe:hover { background: rgba(255, 240, 210, 0.08); }
.principe:nth-child(2) { --d: 0.1s; }
.principe:nth-child(3) { --d: 0.2s; }
.principe__num { font-family: var(--f-serif); font-style: italic; font-size: 38px; line-height: 1; color: var(--teinte); }
.principe h3 { margin: 18px 0 10px; font-size: 22px; letter-spacing: -0.015em; }
.principe p { color: var(--texte-sol-2); font-size: 16px; }

/* ── 02 Limon : coupe interactive ─────────────────────────────────────────────── */
.puces { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; font-size: 15.5px; color: var(--texte-sol-2); }
.puces li { position: relative; padding-left: 26px; }
.puces li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 12px; height: 2px; background: var(--teinte); }
.coupe { margin: 0; padding: clamp(16px, 2vw, 26px); border-radius: 22px; background: rgba(10, 8, 6, 0.35); box-shadow: inset 0 0 0 1px rgba(235, 162, 63, 0.18); }
.coupe__toile { aspect-ratio: 560 / 480; width: 100%; touch-action: pan-y; cursor: crosshair; user-select: none; -webkit-user-select: none; }
.coupe__toile svg { width: 100%; height: 100%; overflow: visible; }
.coupe__commande { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin-top: 12px; font-family: var(--f-mono); font-size: 12px; color: var(--texte-sol-2); }
.coupe__commande input { width: 100%; accent-color: var(--eau); }
.coupe__nappe { color: var(--eau); min-width: 4.5em; text-align: right; }
.coupe__valeurs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0 0; }
.coupe__valeurs div { padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); }
.coupe__valeurs dt { font-family: var(--f-mono); font-size: 11px; color: var(--texte-sol-3); }
.coupe__valeurs dd { margin: 2px 0 0; font-family: var(--f-mono); font-size: 14px; font-weight: 500; white-space: nowrap; }
.coupe__valeurs .fort { background: rgba(47, 199, 156, 0.14); }
.coupe__valeurs .fort dd { color: var(--vert-clair); }
.coupe figcaption, .feuille figcaption { margin-top: 12px; font-family: var(--f-mono); font-size: 11px; color: var(--texte-sol-3); }
.c-axe { stroke: rgba(241, 233, 220, 0.3); stroke-width: 1; }
.c-grille { stroke: rgba(241, 233, 220, 0.07); stroke-width: 1; }
.c-txt { font-family: var(--f-mono); font-size: 11px; fill: rgba(241, 233, 220, 0.55); }
.c-txt--couche { font-family: var(--f-titre); font-size: 13px; font-weight: 600; fill: #1d1712; }
.c-txt--gamma { font-family: var(--f-mono); font-size: 10px; fill: rgba(29, 23, 18, 0.72); }
.c-sv { stroke: var(--sable); stroke-width: 2; fill: none; }
.c-u { stroke: var(--eau); stroke-width: 2; fill: none; }
.c-sve { stroke: var(--vert); stroke-width: 3.2; fill: none; filter: drop-shadow(0 0 6px rgba(47, 199, 156, 0.5)); }
.c-aire { fill: rgba(47, 199, 156, 0.1); }
.c-eau { fill: rgba(90, 169, 230, 0.1); }
.c-nappe { stroke: var(--eau); stroke-width: 1.6; stroke-dasharray: 6 5; }
.c-poignee { fill: var(--eau); stroke: #0f0c0a; stroke-width: 2; }
.c-sonde { stroke: rgba(241, 233, 220, 0.5); stroke-width: 1; stroke-dasharray: 2 3; }

/* ── 03 Sable : caisse à carottes ─────────────────────────────────────────────── */
.caisse-et-fiche { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(260px, 1fr); gap: clamp(28px, 4vw, 56px); align-items: start; margin-top: clamp(40px, 7vh, 72px); }
.caisse {
  position: relative; padding: 14px 16px 18px; border-radius: 14px;
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.07) 0 2px, transparent 2px 9px, rgba(255, 220, 170, 0.04) 9px 10px, transparent 10px 23px),
    linear-gradient(180deg, #84603b, #634529);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 230, 190, 0.25), inset 0 -3px 0 rgba(0, 0, 0, 0.3);
}
.caisse__etiquette {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 0 4px 12px; padding: 7px 12px; border-radius: 3px;
  background: #efe5cf; color: #3a2d22; transform: rotate(-0.5deg);
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.passe { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 0 10px; padding: 6px 0; border-top: 5px solid #4f3720; }
.passe:first-of-type { border-top: 0; }
.passe__cote { grid-row: 1; font-family: var(--f-mono); font-size: 10px; line-height: 1.25; color: rgba(255, 238, 210, 0.75); }
.passe__nom { grid-row: 2; grid-column: 1; font-size: 11px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: #ffe9c4; margin-top: 2px; }
.passe__carottes { grid-row: 1 / span 2; grid-column: 2; display: flex; gap: 5px; padding: 6px; border-radius: 6px; background: #2b1b0e; box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.6); }
.carotte {
  --base: #c9a56e; --tex: none; --ink: #21160e;
  position: relative; flex: var(--l, 1) 1 0; min-width: 0; height: 48px; border: 0; border-radius: 12px 9px 11px 10px / 50% 46% 54% 50%;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.07) 26%, rgba(0, 0, 0, 0) 52%, rgba(0, 0, 0, 0.38) 100%),
    var(--tex), var(--base);
  color: var(--ink); font: 600 13px/1.1 var(--f-titre); text-align: left; padding: 0 12px; cursor: pointer;
  box-shadow: 0 4px 6px -2px rgba(0, 0, 0, 0.6);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), filter 0.25s;
}
.carotte::before { content: attr(data-n); display: block; font: 500 9.5px/1 var(--f-mono); opacity: 0.6; margin-bottom: 3px; }
.carotte:hover, .carotte:focus-visible, .carotte.actif { transform: translateY(-4px); box-shadow: 0 0 0 2px var(--vert), 0 14px 24px -6px rgba(0, 0, 0, 0.7), 0 0 26px rgba(47, 199, 156, 0.35); filter: saturate(1.15) brightness(1.05); outline: none; }
.carotte__lib { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: top; padding: 1px 6px; margin-left: -6px; border-radius: 6px; background: var(--lib, rgba(255, 248, 235, 0.55)); }
.t-argile { --lib: rgba(70, 25, 10, 0.45); }
.carotte__neuf { position: absolute; top: -7px; right: 8px; padding: 2px 6px; border-radius: 6px; background: var(--vert); color: var(--nuit); font: 600 9.5px/1.2 var(--f-mono); }
.t-remblai { --base: #a68f73; --tex: radial-gradient(circle at 30% 40%, rgba(0, 0, 0, 0.25) 0 2px, transparent 3px) 0 0 / 17px 13px, radial-gradient(circle, rgba(255, 255, 255, 0.25) 0 1.5px, transparent 2px) 5px 3px / 11px 9px; }
.t-limon { --base: #c79e62; --tex: radial-gradient(rgba(60, 35, 10, 0.25) 0.8px, transparent 1.2px) 0 0 / 4px 4px; }
.t-sable { --base: #e4bf72; --tex: radial-gradient(rgba(120, 70, 20, 0.35) 0.7px, transparent 1.1px) 0 0 / 3px 4px, radial-gradient(rgba(255, 255, 255, 0.5) 0.7px, transparent 1.1px) 1px 2px / 5px 3px; }
.t-gravier { --base: #b7a387; --tex: radial-gradient(ellipse 4px 3px, #8a7a66 0 70%, transparent 75%) 0 0 / 14px 11px, radial-gradient(ellipse 3px 2.5px, #e0d3bd 0 70%, transparent 75%) 6px 5px / 12px 10px; }
.t-argile { --base: #a85f3e; --ink: #fff3e6; --tex: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.12) 0 1px, transparent 1px 6px); }
.t-marne { --base: #a8998a; --tex: repeating-linear-gradient(80deg, rgba(60, 50, 40, 0.18) 0 1px, transparent 1px 7px); }
.t-beton { --base: #bdb9b1; --tex: linear-gradient(90deg, transparent 0 calc(50% - 1px), rgba(0, 0, 0, 0.3) calc(50% - 1px) calc(50% + 1px), transparent 0) 0 0 / 34px 100%, radial-gradient(rgba(0, 0, 0, 0.18) 0.8px, transparent 1.2px) 0 0 / 5px 5px; }
.fiche { position: sticky; top: calc(var(--entete) + 40px); padding: 28px 28px 30px; border-radius: 20px; background: rgba(255, 240, 210, 0.05); box-shadow: inset 0 0 0 1px rgba(242, 180, 90, 0.25); }
.fiche__num { font-family: var(--f-serif); font-style: italic; font-size: 64px; line-height: 0.9; color: var(--teinte); }
.fiche__titre { margin-top: 12px; font-size: 26px; letter-spacing: -0.02em; }
.fiche__texte { margin-top: 12px; color: var(--texte-sol-2); }
.fiche__norme { display: inline-block; margin-top: 18px; padding: 6px 12px; border-radius: 999px; background: rgba(47, 199, 156, 0.14); color: var(--vert-clair); font-family: var(--f-mono); font-size: 12px; }
.fiche__pied { margin-top: 22px !important; padding-top: 18px; border-top: 1px solid rgba(241, 233, 220, 0.12); font-size: 14px; color: var(--texte-sol-3); }
.fiche.change .fiche__titre, .fiche.change .fiche__texte, .fiche.change .fiche__num { animation: fondu 0.45s var(--ease); }
@keyframes fondu { from { opacity: 0; transform: translateY(6px); } }

/* ── 04 Argile : note de calcul ───────────────────────────────────────────────── */
.liste-note { margin: 30px 0 0; padding: 0; list-style: none; display: grid; gap: 0; }
.liste-note li { padding: 14px 0; border-top: 1px solid rgba(241, 233, 220, 0.1); color: var(--texte-sol-2); font-size: 16px; }
.liste-note b { color: var(--texte-sol); font-weight: 650; }
.feuille { margin: 0; perspective: 1400px; }
.feuille__papier {
  padding: clamp(18px, 2.4vw, 30px); border-radius: 6px; background: #fbf8f2; color: #1d1a17; font-size: 13.5px; line-height: 1.5;
  box-shadow: 0 50px 90px -30px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(0, 0, 0, 0.05);
  transform: rotate(1.6deg) translateY(10px); transition: transform 0.8s var(--ease);
}
.feuille:hover .feuille__papier { transform: rotate(0deg); }
.feuille__cartouche { display: grid; grid-template-columns: 1.2fr 1.6fr 1.4fr 0.5fr; border: 1px solid rgba(29, 26, 23, 0.25); font-size: 12px; }
.feuille__cartouche div { padding: 7px 9px; border-left: 1px solid rgba(29, 26, 23, 0.18); }
.feuille__cartouche div:first-child { border-left: 0; }
.feuille__cartouche span { display: block; font: 500 9px/1.3 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: #8a7f74; }
.feuille__rubrique { margin-top: 18px !important; margin-bottom: 8px; padding-bottom: 4px; border-bottom: 1.5px solid var(--vert-fonce); font: 600 10.5px/1 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--vert-fonce); }
.feuille__ligne { color: #4a433c; }
.feuille__etapes { margin: 0; padding-left: 1.5em; display: grid; gap: 4px; }
.feuille__etapes li { color: #4a433c; }
.feuille__etapes b { font-family: var(--f-mono); font-weight: 500; font-size: 12.5px; color: #1d1a17; }
.feuille__controles { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.feuille__controles li { display: grid; grid-template-columns: minmax(0, 1fr) 30% 3.2em; align-items: center; gap: 10px; font-size: 12.5px; }
.feuille__controles span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #4a433c; }
.feuille__controles i { position: relative; height: 8px; border-radius: 4px; background: #e9e3d8; overflow: hidden; }
.feuille__controles i::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, var(--vert-fonce), var(--vert)); transform-origin: left; transform: scaleX(var(--taux)); transition: transform 1.3s var(--ease); }
.feuille__controles .eleve i::after { background: linear-gradient(90deg, #c4782f, var(--ocre)); }
.feuille__controles b { font-family: var(--f-mono); font-weight: 500; text-align: right; }
.js .feuille:not(.vu) .feuille__controles i::after { transform: scaleX(0); }
.js .feuille .feuille__etapes li { opacity: 0; transform: translateX(-8px); transition: opacity 0.5s, transform 0.5s var(--ease); }
.js .feuille.vu .feuille__etapes li { opacity: 1; transform: none; }
.feuille.vu .feuille__etapes li:nth-child(2) { transition-delay: 0.15s; }
.feuille.vu .feuille__etapes li:nth-child(3) { transition-delay: 0.3s; }
.feuille.vu .feuille__etapes li:nth-child(4) { transition-delay: 0.45s; }
.feuille.vu .feuille__etapes li:nth-child(5) { transition-delay: 0.6s; }
.feuille.vu .feuille__controles li:nth-child(2) i::after { transition-delay: 0.1s; }
.feuille.vu .feuille__controles li:nth-child(3) i::after { transition-delay: 0.2s; }
.feuille.vu .feuille__controles li:nth-child(4) i::after { transition-delay: 0.3s; }
.feuille.vu .feuille__controles li:nth-child(5) i::after { transition-delay: 0.4s; }
.feuille__pied { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px !important; padding-top: 10px; border-top: 1px solid rgba(29, 26, 23, 0.15); font: 500 11px/1.3 var(--f-mono); color: #8a7f74; }
.feuille__pied span:last-child { color: var(--vert-fonce); }
.feuille__pied span:last-child::before { content: "✓ "; }

/* ── 05 Marne : l’écosystème ──────────────────────────────────────────────────── */
.echanges { display: grid; gap: 14px; margin-top: 34px; }
.echange { padding: 18px 20px; border-radius: 16px; background: rgba(255, 240, 220, 0.04); box-shadow: inset 0 0 0 1px rgba(220, 176, 138, 0.16); }
.echange:nth-child(2) { --d: 0.1s; }
.echange:nth-child(3) { --d: 0.2s; }
.echange h3 { display: flex; align-items: center; gap: 10px; font-size: 18px; letter-spacing: -0.01em; }
.echange h3 span { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(47, 199, 156, 0.16); color: var(--vert-clair); font-size: 14px; }
.echange p { margin-top: 8px; color: var(--texte-sol-2); font-size: 15.5px; }
.echange em { color: var(--texte-sol); font-style: italic; }
.schema { margin: 0; }
.schema svg { width: 100%; height: auto; max-height: 76vh; margin: 0 auto; }
.voie { fill: none; stroke: rgba(241, 233, 220, 0.28); stroke-width: 2; stroke-dasharray: 3 7; stroke-linecap: round; animation: avance 1.2s linear infinite; }
.voie--retour { stroke: rgba(143, 245, 214, 0.45); }
.voie--armalys { stroke: rgba(217, 119, 58, 0.55); }
@keyframes avance { to { stroke-dashoffset: -20; } }
.paquet { fill: var(--sable); }
.paquet--retour { fill: var(--vert-clair); }
.paquet--armalys { fill: var(--orange); }
.noeud rect { fill: rgba(255, 245, 230, 0.05); stroke: rgba(241, 233, 220, 0.2); stroke-width: 1.2; }
.noeud--geo rect { fill: rgba(47, 199, 156, 0.12); stroke: var(--vert); stroke-width: 1.6; }
.noeud__nom { font-family: var(--f-titre); font-size: 22px; font-weight: 650; fill: var(--texte-sol); letter-spacing: -0.01em; }
.noeud__role { font-family: var(--f-mono); font-size: 12px; fill: rgba(241, 233, 220, 0.55); }
.etiquette { font-family: var(--f-mono); font-size: 12px; fill: var(--sable); }
.etiquette--retour { fill: var(--vert-clair); }
.etiquette--armalys { fill: var(--orange); }

/* ── 06 Calcaire : repères ────────────────────────────────────────────────────── */
.couche--calcaire .couche__interieur:first-child { padding-bottom: clamp(48px, 8vh, 80px); }
.couche--calcaire .couche__interieur:last-child { padding-top: clamp(48px, 8vh, 80px); }
.chiffres { list-style: none; margin: clamp(44px, 7vh, 72px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.chiffres li { border-top: 1px solid rgba(232, 220, 198, 0.22); padding-top: 18px; }
.chiffres li:nth-child(2) { --d: 0.08s; }
.chiffres li:nth-child(3) { --d: 0.16s; }
.chiffres li:nth-child(4) { --d: 0.24s; }
.chiffres b { display: block; font-family: var(--f-serif); font-weight: 400; font-size: clamp(4rem, 8vw, 7.5rem); line-height: 0.9; letter-spacing: -0.02em; color: var(--teinte); font-variant-numeric: tabular-nums; }
.chiffres li:last-child b { color: var(--vert); }
.chiffres span { display: block; margin-top: 12px; max-width: 16em; color: var(--texte-sol-2); font-size: 15px; }
.defile { position: relative; z-index: 2; overflow: hidden; padding: 26px 0; border-block: 1px solid rgba(232, 220, 198, 0.12); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.defile__piste { display: flex; width: max-content; animation: defile 70s linear infinite; }
.defile:hover .defile__piste { animation-play-state: paused; }
.defile__piste span { flex: none; padding: 0 0.5em; font-size: clamp(2.4rem, 5.6vw, 5rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; color: transparent; -webkit-text-stroke: 1.2px rgba(232, 220, 198, 0.42); white-space: nowrap; transition: color 0.3s, -webkit-text-stroke-color 0.3s; }
.defile__piste span::after { content: "·"; padding-left: 0.5em; -webkit-text-stroke: 0; color: var(--ocre); }
.defile__piste span:hover { color: rgba(232, 220, 198, 0.9); }
@keyframes defile { to { transform: translateX(-50%); } }
.limites { max-width: 54em; padding: 4px 0 4px 26px; border-left: 3px solid var(--ocre); }
.limites h3 { font-size: 22px; letter-spacing: -0.015em; }
.limites p { margin-top: 10px; color: var(--texte-sol-2); }
.limites em { font-family: var(--f-serif); font-style: italic; font-size: 1.18em; color: var(--texte-sol); }

/* ── 07 Substratum : le refus ─────────────────────────────────────────────────── */
.pieu-cadre { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.refus { padding-bottom: clamp(80px, 12vh, 140px); }
.refus__titre { font-size: clamp(2.8rem, 7.6vw, 7.8rem); line-height: 0.95; letter-spacing: -0.04em; font-weight: 640; max-width: 11em; }
.refus__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 30px; margin-top: 40px; }
.refus__actions .lien-fleche { font-family: var(--f-mono); font-weight: 500; }
.refus__faits { display: flex; flex-wrap: wrap; gap: 10px; margin: 44px 0 0; padding: 0; list-style: none; }
.refus__faits li { padding: 8px 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(47, 199, 156, 0.35); font-size: 14px; color: var(--texte-sol-2); }
.pieu { position: absolute; top: 0; right: clamp(120px, 16vw, 260px); width: 22px; height: 64%; z-index: 0; pointer-events: none; }
.pieu__fut { position: absolute; inset: 0; border-radius: 0 0 3px 3px; background: linear-gradient(90deg, #8ff5d6 0%, #2fc79c 35%, #0e6b54 100%); transform-origin: top; transform: scaleY(0); transition: transform 2s cubic-bezier(0.5, 0, 0.2, 1); box-shadow: 0 0 40px rgba(47, 199, 156, 0.35); }
.pieu::after { content: "REFUS"; position: absolute; left: 50%; top: 100%; width: 190px; transform: translateX(-50%); padding-top: 10px; border-top: 2px solid rgba(232, 220, 198, 0.5); text-align: center; font: 500 11px/1 var(--f-mono); letter-spacing: 0.3em; color: rgba(232, 220, 198, 0.55); opacity: 0; transition: opacity 0.6s 1.8s; }
.pieu__onde { position: absolute; left: 50%; top: 100%; width: 120px; height: 34px; margin: -17px 0 0 -60px; border-radius: 50%; border: 1.5px solid var(--vert); opacity: 0; }
.pieu.vu .pieu__fut { transform: scaleY(1); }
.pieu.vu::after { opacity: 1; }
.pieu.vu .pieu__onde { animation: onde 2.6s var(--ease) 1.9s infinite; }
.pieu.vu .pieu__onde + .pieu__onde { animation-delay: 2.5s; }
@keyframes onde { 0% { opacity: 0.8; transform: scale(0.3); } 100% { opacity: 0; transform: scale(2.2); } }
.pied { position: relative; z-index: 2; max-width: 1320px; margin: 0 auto; padding: 36px calc(var(--gouttiere) + 70px) 44px var(--gouttiere); border-top: 1px solid rgba(241, 233, 220, 0.1); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 32px; align-items: center; font-size: 14px; color: var(--texte-sol-3); }
.pied img { height: 40px; width: auto; grid-row: span 2; }
.pied a { color: var(--texte-sol-2); text-decoration: none; border-bottom: 1px solid rgba(241, 233, 220, 0.25); }
.pied a:hover { color: var(--texte-sol); }
.pied__liens { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* ── Pages de texte (mentions légales) et 404 ──────────────────────────────────── */
.page-texte { background: var(--papier); color: var(--encre); }
.page-texte .entete__marque { margin-right: auto; }
.texte { max-width: 760px; margin: 0 auto; padding: calc(var(--entete) + 64px) var(--gouttiere) 96px; }
.texte h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1; letter-spacing: -0.035em; margin-bottom: 40px; }
.texte h1 em { font-family: var(--f-serif); font-style: italic; font-weight: 400; color: var(--vert-fonce); }
.texte h2 { margin: 40px 0 10px; font-size: 20px; letter-spacing: -0.01em; }
.texte p { color: var(--encre-2); }
.texte p + p { margin-top: 12px; }
.texte a { color: var(--vert-fonce); }
.texte code { background: rgba(23, 19, 15, 0.07); }
.texte__maj { margin-top: 48px !important; font-family: var(--f-mono); font-size: 12px; }
.page-404 { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; background: radial-gradient(ellipse 70% 50% at 50% 100%, rgba(47, 199, 156, 0.16), transparent 70%), var(--nuit); --teinte: var(--vert); }
.introuvable { max-width: 720px; padding: 48px var(--gouttiere); }
.introuvable h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); line-height: 0.98; letter-spacing: -0.04em; }
.introuvable h1 em { font-family: var(--f-serif); font-style: italic; font-weight: 400; color: var(--vert); }
.introuvable p:not(.cote) { margin: 22px 0 32px; color: var(--texte-sol-2); font-size: 18px; }

/* ── Écrans moyens et petits ──────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .sonde { top: auto; bottom: 14px; right: 14px; transform: none; height: auto; width: auto; padding: 8px 12px; border-radius: 12px; background: rgba(18, 14, 12, 0.7); color: var(--texte-sol); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .sonde[data-ton="clair"] { color: var(--texte-sol); }
  .sonde__titre, .sonde__colonne, .sonde__graduation { display: none; }
  .sonde__curseur { position: static; transform: none; align-items: flex-end; }
  .sonde__curseur::after { display: none; }
  .surface__ciel, .couche__interieur, .pied { padding-right: var(--gouttiere); }
  .surface__lecture { right: var(--gouttiere); }
}
@media (max-width: 960px) {
  :root { --entete: 64px; }
  .entete__nav {
    position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center; align-items: flex-start; gap: 6px;
    padding: 90px var(--gouttiere) 40px; background: rgba(12, 10, 9, 0.96); color: var(--texte-sol);
    opacity: 0; visibility: hidden; transition: opacity 0.35s, visibility 0.35s;
  }
  .entete__nav a:not(.bouton) { font-size: clamp(2rem, 9vw, 3rem); font-weight: 600; letter-spacing: -0.03em; opacity: 1; }
  .entete__nav .bouton { margin-top: 24px; }
  .entete.ouvert .entete__nav { opacity: 1; visibility: visible; }
  .entete.ouvert { color: var(--texte-sol); }
  .entete.ouvert .logo--clair { display: none; }
  .entete.ouvert .logo--sombre { display: block; }
  .entete__menu { display: block; }
  .logo { height: 38px; }
  .surface__chapeau { flex-direction: column; align-items: flex-start; }
  .surface__chapeau p { font-size: 17px; }
  .surface__sol { min-height: 44vh; min-height: 44svh; }
  .grille-2, .grille-titre, .caisse-et-fiche { grid-template-columns: minmax(0, 1fr); }
  .fiche { position: relative; top: 0; }
  .principes { grid-template-columns: minmax(0, 1fr); }
  .chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 40px; }
  .pieu { right: 14%; height: 40%; opacity: 0.5; }
  .sonde { z-index: 55; pointer-events: none; top: calc((var(--entete) - 34px) / 2); bottom: auto; right: calc(var(--gouttiere) + 52px); padding: 2px 4px; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .sonde[data-ton="clair"] { color: var(--encre); }
  .entete.ouvert ~ .sonde { visibility: hidden; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .surface__consigne { bottom: 18px; font-size: 11px; max-width: 60%; }
  .surface__lecture { font-size: 10.5px; top: 12px; }
  .passe { grid-template-columns: 52px minmax(0, 1fr); gap: 0 6px; }
  .passe__nom { display: none; }
  .passe__carottes { grid-row: 1; }
  .carotte { padding: 0 6px; height: 44px; }
  .carotte__lib { display: none; }
  .carotte::before { font-size: 11px; opacity: 0.85; margin: 0; text-align: center; }
  .coupe__valeurs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .coupe__commande { grid-template-columns: 1fr auto; }
  .coupe__commande label { grid-column: 1 / -1; }
  .feuille__cartouche { grid-template-columns: 1fr 1fr; }
  .feuille__cartouche div:nth-child(3) { border-left: 0; }
  .feuille__cartouche div:nth-child(n+3) { border-top: 1px solid rgba(29, 26, 23, 0.18); }
  .feuille__controles li { grid-template-columns: minmax(0, 1fr) 22% 2.8em; }
  .pied { grid-template-columns: minmax(0, 1fr); }
  .pied img { grid-row: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; transition-duration: 0.001s !important; transition-delay: 0s !important; }
  .defile__piste { animation: none; flex-wrap: wrap; width: auto; padding: 0 var(--gouttiere); }
  .defile__piste span[aria-hidden] { display: none; }
}
