/* charpentierprovence.fr — feuille de style unique.
   Identité : calcaire, chêne, terre cuite, ocre, olive, lavande. Aucune police externe (RGPD, vitesse). */

:root {
  --calcaire: #f6f1e7;
  --papier: #fffdf8;
  --pierre: #ece3d0;
  --filet: #ddd2bc;
  --chene: #2e2118;
  --brou: #5d4330;
  --bois: #9a6a3a;
  --bois-clair: #d9a85f;
  --terra: #b4532a;
  --terra-fonce: #933f1b;
  --ocre: #d6a03c;
  --ocre-clair: #f3dfae;
  --olive: #5a6a38;
  --cypres: #1f2a1c;
  --lavande: #7d6fa6;
  --ciel: #cfe1e8;
  --muted: #6c5d50;
  --ok: #3f7a45;
  --alerte: #a8551a;
  --rayon: 14px;
  --ombre: 0 1px 2px rgba(46, 33, 24, .06), 0 8px 24px rgba(46, 33, 24, .07);
  --ombre-forte: 0 2px 4px rgba(46, 33, 24, .08), 0 18px 44px rgba(46, 33, 24, .14);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --entete: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--entete) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  color: var(--chene);
  background: var(--calcaire);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--terra-fonce); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--terra); }
:focus-visible { outline: 3px solid var(--ocre); outline-offset: 2px; 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; background: var(--chene); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 10px; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 22px; }
.container.etroit { max-width: 820px; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.15; letter-spacing: -0.012em; color: var(--chene); margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5.2vw, 3.8rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.28rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin-bottom: .35em; }
strong { font-weight: 650; }
small, .petit { font-size: .86rem; color: var(--muted); }

/* ---------- boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 2px solid transparent;
  font: 600 .98rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primaire { background: var(--terra); color: #fff; box-shadow: 0 6px 18px rgba(180, 83, 42, .28); }
.btn-primaire:hover { background: var(--terra-fonce); color: #fff; }
.btn-contour { background: rgba(255, 253, 248, .7); color: var(--chene); border-color: var(--chene); }
.btn-contour:hover { background: var(--chene); color: #fff; }
.btn-clair { background: var(--papier); color: var(--chene); }
.btn-clair:hover { background: var(--ocre-clair); color: var(--chene); }
.btn-petit { padding: 8px 16px; font-size: .9rem; }
.btn svg { width: 18px; height: 18px; }

/* ---------- en-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 238, .92);
  -webkit-backdrop-filter: saturate(1.3) blur(10px); backdrop-filter: saturate(1.3) blur(10px);
  border-bottom: 1px solid var(--filet);
  transition: box-shadow .2s ease;
}
.site-header.scrolle { box-shadow: 0 6px 22px rgba(46, 33, 24, .09); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: var(--entete); gap: 18px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--chene); }
.logo svg { width: 38px; height: 38px; flex: none; }
.logo .mot { font-family: var(--serif); font-size: 1.28rem; font-weight: 700; letter-spacing: -.01em; line-height: 1; }
.logo .mot em { display: block; font-style: italic; font-weight: 600; color: var(--terra); font-size: .98rem; letter-spacing: .02em; margin-top: 2px; }
.site-header nav { display: flex; align-items: center; gap: 4px; }
.site-header nav a:not(.btn) {
  padding: 8px 13px; border-radius: 999px; color: var(--chene); text-decoration: none; font-weight: 550; font-size: .96rem;
  position: relative;
}
.site-header nav a:not(.btn):hover { background: var(--pierre); color: var(--chene); }
.site-header nav a.actif:not(.btn) { background: var(--ocre-clair); }
.site-header nav .btn { margin-left: 8px; }
.nav-toggle { display: none; background: var(--papier); border: 1px solid var(--filet); border-radius: 12px; padding: 9px 11px; cursor: pointer; color: var(--chene); }
.nav-toggle svg { width: 24px; height: 24px; display: block; }

/* ---------- héros accueil ---------- */
.hero-home { position: relative; overflow: hidden; background: var(--ciel); isolation: isolate; }
.hero-home .scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 66% 56%; z-index: -2; }
.hero-home::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(250, 246, 238, .88) 0%, rgba(250, 246, 238, .62) 34%, rgba(250, 246, 238, 0) 62%);
}
.hero-home .container { padding-top: clamp(54px, 8vw, 112px); padding-bottom: clamp(150px, 20vw, 290px); }
.hero-copy { max-width: 600px; }
.surtitre { display: inline-block; font: 700 .78rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--terra-fonce); margin-bottom: 16px; }
.hero-home h1 { margin-bottom: 18px; }
.hero-home h1 em { font-style: italic; color: var(--terra); }
.hero-home .chapeau { font-size: clamp(1.05rem, 1.7vw, 1.28rem); line-height: 1.5; color: #3d2d22; max-width: 520px; margin-bottom: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-home .legende { position: absolute; right: 14px; bottom: 10px; font-size: .72rem; color: rgba(255, 253, 248, .85); text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }

/* ---------- héros pages ---------- */
.hero-page {
  position: relative; overflow: hidden;
  background: var(--cypres); color: #fff;
  padding: clamp(38px, 6vw, 72px) 0 clamp(40px, 6vw, 70px);
}
.hero-page::before {
  content: ""; position: absolute; inset: 0; opacity: .13;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='92' viewBox='0 0 160 92'%3E%3Cg fill='none' stroke='%23f3dfae' stroke-width='1.6'%3E%3Cpath d='M0 92 L40 40 L80 92 M40 40 V92 M80 92 L120 40 L160 92 M120 40 V92 M-40 92 L0 40 M160 40 L200 92'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 160px 92px;
}
.hero-page::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: linear-gradient(90deg, var(--terra), var(--ocre), var(--olive)); }
.hero-page .container { position: relative; }
.hero-page h1 { color: #fff; font-size: clamp(2rem, 4.6vw, 3.3rem); max-width: 860px; }
.hero-page .chapeau { font-size: clamp(1.02rem, 1.6vw, 1.22rem); color: #e8dfcc; max-width: 760px; margin: 0; }
.hero-page .surtitre { color: var(--ocre); }
.fil { font-size: .85rem; margin-bottom: 18px; color: #cdbf9f; }
.fil a { color: #e9dcc0; text-decoration: none; }
.fil a:hover { color: #fff; text-decoration: underline; }
.fil span { margin: 0 7px; opacity: .6; }

/* ---------- sections ---------- */
.section { padding: clamp(48px, 7vw, 92px) 0; }
.section.papier { background: var(--papier); }
.section.pierre { background: var(--pierre); }
.section.sombre { background: var(--cypres); color: #f1e9d6; }
.section.sombre h2, .section.sombre h3 { color: #fff; }
.entete-section { max-width: 760px; margin-bottom: clamp(26px, 4vw, 46px); }
.entete-section .surtitre { margin-bottom: 10px; }
.entete-section p { font-size: 1.1rem; color: var(--brou); }
.section.sombre .entete-section p { color: #d9ceb6; }
.section.sombre .surtitre { color: var(--ocre); }

/* ---------- chiffres ---------- */
.bandeau-chiffres { background: var(--cypres); color: #f1e9d6; padding: 34px 0; position: relative; margin-top: -1px; }
.chiffres { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.chiffre { padding: 6px 14px; border-left: 1px solid rgba(243, 223, 174, .22); }
.chiffre:first-child { border-left: 0; }
.chiffre b { display: block; font-family: var(--serif); font-size: clamp(1.7rem, 3.2vw, 2.5rem); color: var(--ocre); line-height: 1; margin-bottom: 8px; }
.chiffre span { font-size: .9rem; line-height: 1.35; display: block; color: #d9ceb6; }

/* ---------- cartes ---------- */
.grille { display: grid; gap: 22px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.carte {
  background: var(--papier); border: 1px solid var(--filet); border-radius: var(--rayon);
  padding: 24px; display: flex; flex-direction: column; box-shadow: var(--ombre);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
a.carte, .carte.lien { text-decoration: none; color: inherit; }
a.carte:hover, .carte.lien:hover { transform: translateY(-4px); box-shadow: var(--ombre-forte); border-color: var(--bois-clair); color: inherit; }
.carte h3 { margin-bottom: 8px; }
.carte p { color: var(--brou); font-size: .96rem; flex: 1; }
.carte .suite { font-weight: 650; font-size: .93rem; color: var(--terra-fonce); margin-top: 6px; }
.carte .suite::after { content: " →"; }
.icone { width: 52px; height: 52px; border-radius: 14px; background: var(--ocre-clair); display: grid; place-items: center; margin-bottom: 16px; color: var(--terra-fonce); }
.icone svg { width: 30px; height: 30px; }
.section.sombre .carte { background: rgba(255, 253, 248, .06); border-color: rgba(243, 223, 174, .2); box-shadow: none; }
.section.sombre .carte p { color: #d9ceb6; }
.section.sombre .carte .suite { color: var(--ocre); }
.section.sombre .icone { background: rgba(243, 223, 174, .14); color: var(--ocre); }

/* cartes d'ouvrages avec illustration */
.ouvrage-carte { padding: 0; overflow: hidden; }
.ouvrage-carte .vignette { background: linear-gradient(180deg, #e7eef0, #f4ead2); aspect-ratio: 8 / 5; display: grid; place-items: center; border-bottom: 1px solid var(--filet); }
.ouvrage-carte .vignette svg { width: 100%; height: 100%; display: block; }
.ouvrage-carte .corps { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.etiquettes { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.etiquettes li { margin: 0; font-size: .74rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: var(--pierre); color: var(--brou); }
.etiquettes li.t-toit { background: #f0d6c4; color: #7a3516; }
.etiquettes li.t-hab { background: #dde5c8; color: #3f4d22; }
.etiquettes li.t-ext { background: #e3dcf0; color: #4b3f78; }
.etiquettes li.t-reno { background: #f3dfae; color: #6b4a0e; }

/* ---------- puces filtres ---------- */
.filtres { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.puce {
  border: 1.5px solid var(--filet); background: var(--papier); color: var(--chene);
  padding: 8px 16px; border-radius: 999px; font: 600 .9rem/1 var(--sans); cursor: pointer;
}
.puce:hover { border-color: var(--bois); }
.puce[aria-pressed="true"] { background: var(--chene); border-color: var(--chene); color: #fff; }

/* ---------- encadrés ---------- */
.encadre { border-left: 5px solid var(--ocre); background: var(--papier); border-radius: 0 var(--rayon) var(--rayon) 0; padding: 16px 20px; margin: 22px 0; box-shadow: var(--ombre); }
.encadre > :last-child { margin-bottom: 0; }
.encadre .titre { display: block; font: 700 .76rem/1 var(--sans); letter-spacing: .13em; text-transform: uppercase; margin-bottom: 8px; color: var(--bois); }
.encadre.avis { border-color: var(--terra); }
.encadre.avis .titre { color: var(--terra-fonce); }
.encadre.reserve { border-color: var(--lavande); }
.encadre.reserve .titre { color: #5b4d8a; }
.encadre.vert { border-color: var(--olive); }
.encadre.vert .titre { color: var(--olive); }

/* ---------- tableaux ---------- */
.tableau-wrap { overflow-x: auto; border-radius: var(--rayon); border: 1px solid var(--filet); background: var(--papier); box-shadow: var(--ombre); margin: 22px 0; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: 13px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--filet); }
th { font: 700 .76rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--brou); background: var(--pierre); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
caption { text-align: left; padding: 12px 16px; font-size: .86rem; color: var(--muted); caption-side: bottom; }

/* ---------- diagramme interactif de charpente ---------- */
.anatomie { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 28px; align-items: start; }
.anatomie-dessin { background: linear-gradient(180deg, #dbe8ec, #f5ead0); border: 1px solid var(--filet); border-radius: var(--rayon); padding: 12px; box-shadow: var(--ombre); }
.anatomie-dessin svg { display: block; width: 100%; height: auto; }
.anatomie-dessin [data-part] { cursor: pointer; outline: none; }
.anatomie-dessin [data-part] .piece { transition: fill .15s ease, stroke .15s ease, filter .15s ease; }
.anatomie-dessin [data-part]:hover .piece, .anatomie-dessin [data-part].actif .piece, .anatomie-dessin [data-part]:focus-visible .piece { fill: var(--terra); stroke: var(--terra-fonce); filter: drop-shadow(0 2px 4px rgba(147, 63, 27, .35)); }
.anatomie-dessin [data-part]:focus-visible .piece { stroke: var(--chene); stroke-width: 3; }
.anatomie-dessin .pastille { fill: var(--chene); }
.anatomie-dessin text { font: 700 13px var(--sans); fill: #fff; pointer-events: none; text-anchor: middle; dominant-baseline: central; }
.anatomie-fiche { background: var(--papier); border: 1px solid var(--filet); border-radius: var(--rayon); padding: 22px; box-shadow: var(--ombre); position: sticky; top: calc(var(--entete) + 18px); min-height: 250px; }
.anatomie-fiche .num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--terra); color: #fff; font-weight: 700; font-size: .9rem; margin-bottom: 10px; }
.anatomie-fiche h3 { margin-bottom: 8px; }
.anatomie-fiche p { font-size: .96rem; }
.anatomie-fiche .piege { font-size: .9rem; background: var(--ocre-clair); border-radius: 10px; padding: 10px 12px; margin: 0; }
.anatomie-liste { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.anatomie-liste button { border: 1px solid var(--filet); background: var(--calcaire); border-radius: 999px; padding: 5px 11px; font: 600 .8rem/1 var(--sans); cursor: pointer; color: var(--chene); }
.anatomie-liste button:hover, .anatomie-liste button.actif { background: var(--chene); color: #fff; border-color: var(--chene); }

/* ---------- outils : champs ---------- */
.outil { background: var(--papier); border: 1px solid var(--filet); border-radius: 20px; box-shadow: var(--ombre-forte); overflow: hidden; }
.outil-tete { padding: 22px 28px; background: var(--chene); color: #fff; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between; }
.outil-tete h2, .outil-tete h3 { color: #fff; margin: 0; font-size: 1.35rem; }
.outil-tete .sous { color: #d9ceb6; font-size: .9rem; margin: 0; }
.outil-corps { padding: 28px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 32px; }
.champ { margin-bottom: 20px; }
.champ label, .champ .lib { display: flex; justify-content: space-between; align-items: baseline; font-weight: 650; font-size: .94rem; margin-bottom: 8px; gap: 12px; }
.champ output { font-family: var(--serif); font-size: 1.15rem; color: var(--terra-fonce); font-weight: 700; }
.champ select, .champ input[type="text"], .champ input[type="number"], .champ input[type="tel"], .champ input[type="email"], .champ textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--filet); border-radius: 12px; background: #fff; font: inherit; color: var(--chene);
}
.champ select:focus, .champ input:focus, .champ textarea:focus { border-color: var(--bois); outline: 3px solid rgba(214, 160, 60, .35); }
.champ textarea { min-height: 110px; resize: vertical; }
input[type="range"] { width: 100%; accent-color: var(--terra); height: 28px; cursor: pointer; }
.choix { display: flex; flex-wrap: wrap; gap: 8px; }
.choix label { position: relative; font-weight: 600; margin: 0; }
.choix input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choix span { display: block; padding: 9px 15px; border: 1.5px solid var(--filet); border-radius: 999px; background: #fff; font-size: .9rem; }
.choix input:checked + span { background: var(--chene); color: #fff; border-color: var(--chene); }
.choix input:focus-visible + span { outline: 3px solid var(--ocre); outline-offset: 2px; }
.resultat { background: var(--calcaire); border-radius: 16px; padding: 22px; border: 1px solid var(--filet); }
.resultat .gros { font-family: var(--serif); font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 700; line-height: 1.1; margin: 0 0 6px; }
.resultat .sous-gros { color: var(--brou); margin: 0 0 16px; font-size: .94rem; }
.pastille-regime { display: inline-block; font: 700 .78rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 7px 12px; border-radius: 999px; color: #fff; margin-bottom: 12px; }
.r-aucune { background: var(--ok); }
.r-dp { background: var(--ocre); color: var(--chene); }
.r-pc { background: var(--terra); }
.liste-points { padding-left: 1.1em; font-size: .93rem; }
.fourchette { position: relative; height: 14px; background: var(--pierre); border-radius: 999px; margin: 22px 0 10px; overflow: hidden; }
.fourchette i { position: absolute; top: 0; bottom: 0; background: linear-gradient(90deg, var(--ocre), var(--terra)); border-radius: 999px; transition: left .35s ease, width .35s ease; }

/* simulateur de pergola */
.pergola-scene { background: linear-gradient(180deg, #d6e6ec 0%, #f7ecd0 72%, #cdbb8d 72%, #bfa974 100%); border-radius: 16px; border: 1px solid var(--filet); overflow: hidden; margin-bottom: 18px; }
.pergola-scene svg { display: block; width: 100%; height: auto; }
.cote { font: 600 12px var(--sans); fill: var(--chene); }

/* quiz */
.quiz { max-width: 860px; margin: 0 auto; }
.quiz-progres { height: 8px; background: var(--pierre); border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.quiz-progres i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ocre), var(--terra)); transition: width .35s ease; border-radius: 999px; }
.quiz-etape { font-size: .84rem; color: var(--muted); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 16px; }
.quiz-question h2, .quiz-question h3 { font-size: clamp(1.4rem, 2.8vw, 2rem); }
.quiz-options { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); margin-top: 20px; }
.quiz-option {
  text-align: left; background: var(--papier); border: 2px solid var(--filet); border-radius: 16px; padding: 16px 18px; cursor: pointer;
  font: inherit; color: inherit; display: flex; gap: 14px; align-items: flex-start; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.quiz-option:hover { border-color: var(--terra); transform: translateY(-2px); box-shadow: var(--ombre); }
.quiz-option svg { flex: none; width: 34px; height: 34px; color: var(--terra-fonce); }
.quiz-option b { display: block; font-size: 1rem; margin-bottom: 2px; }
.quiz-option small { display: block; line-height: 1.35; }
.quiz-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }
.quiz-resultat .classement { counter-reset: rang; display: grid; gap: 22px; }
.quiz-reco { background: var(--papier); border: 2px solid var(--filet); border-radius: 20px; overflow: hidden; display: grid; grid-template-columns: 240px 1fr; box-shadow: var(--ombre); }
.quiz-reco:first-child { border-color: var(--terra); box-shadow: var(--ombre-forte); }
.quiz-reco .vignette { background: linear-gradient(180deg, #e7eef0, #f4ead2); display: grid; place-items: center; padding: 14px; }
.quiz-reco .contenu { padding: 22px 24px; }
.quiz-reco .rang { display: inline-block; font: 700 .76rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--terra-fonce); margin-bottom: 8px; }
.quiz-reco dl { display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; margin: 14px 0; font-size: .92rem; }
.quiz-reco dt { font-weight: 700; color: var(--brou); }
.quiz-reco dd { margin: 0; }

/* chantier : frise */
.frise { position: relative; counter-reset: etape; display: grid; gap: 0; }
.frise::before { content: ""; position: absolute; left: 27px; top: 10px; bottom: 10px; width: 3px; background: linear-gradient(180deg, var(--ocre), var(--terra) 60%, var(--olive)); border-radius: 3px; }
.etape { position: relative; padding: 0 0 34px 82px; counter-increment: etape; }
.etape:last-child { padding-bottom: 0; }
.etape::before {
  content: counter(etape); position: absolute; left: 0; top: 0; width: 56px; height: 56px; border-radius: 50%;
  background: var(--papier); border: 3px solid var(--terra); color: var(--terra-fonce);
  font: 700 1.35rem/1 var(--serif); display: grid; place-items: center; box-shadow: 0 0 0 6px var(--calcaire);
}
.section.papier .etape::before { box-shadow: 0 0 0 6px var(--papier); }
.etape h3 { margin-bottom: 6px; padding-top: 8px; }
.etape .qui { font: 700 .74rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--olive); margin-bottom: 8px; display: block; }
.etape p { max-width: 700px; }
.frise-courte { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: ec; }
.frise-courte .pas { background: var(--papier); border: 1px solid var(--filet); border-radius: var(--rayon); padding: 18px; counter-increment: ec; position: relative; }
.frise-courte .pas::before { content: counter(ec); font: 700 2rem/1 var(--serif); color: var(--ocre); display: block; margin-bottom: 6px; }
.frise-courte .pas b { display: block; margin-bottom: 4px; }
.frise-courte .pas span { font-size: .9rem; color: var(--brou); }

/* checklist */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { margin: 0; }
.checklist label { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; background: var(--papier); border: 1.5px solid var(--filet); border-radius: 14px; cursor: pointer; }
.checklist input { width: 22px; height: 22px; accent-color: var(--olive); margin-top: 3px; flex: none; }
.checklist label:has(input:checked) { background: #eef2e0; border-color: var(--olive); }
.checklist b { display: block; }
.checklist small { display: block; margin-top: 2px; }
.score { font-family: var(--serif); font-size: 1.4rem; font-weight: 700; }

/* FAQ */
.faq details { background: var(--papier); border: 1px solid var(--filet); border-radius: 14px; margin-bottom: 10px; box-shadow: var(--ombre); }
.faq summary { cursor: pointer; font-weight: 650; padding: 16px 20px; list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 1.6rem/1 var(--serif); color: var(--terra); flex: none; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .reponse { padding: 0 20px 18px; color: var(--brou); }
.faq .reponse > :last-child { margin-bottom: 0; }

/* sources */
.sources { font-size: .9rem; color: var(--brou); }
.sources h2, .sources h3 { font-size: 1.15rem; }
.sources ol { padding-left: 1.3em; }
.sources li { margin-bottom: .5em; }
.sources .date { color: var(--muted); }

/* ouvrages (fiches détaillées) */
.fiche-ouvrage { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 36px; padding: 40px 0; border-top: 1px solid var(--filet); align-items: start; }
.fiche-ouvrage:first-of-type { border-top: 0; }
.fiche-ouvrage .vignette { background: linear-gradient(180deg, #e7eef0, #f4ead2); border-radius: 18px; border: 1px solid var(--filet); padding: 14px; position: sticky; top: calc(var(--entete) + 20px); box-shadow: var(--ombre); }
.fiche-ouvrage .vignette svg { width: 100%; height: auto; display: block; }
.fiche-ouvrage h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
.faits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.fait { background: var(--papier); border: 1px solid var(--filet); border-radius: 12px; padding: 12px 14px; }
.fait b { display: block; font: 700 .72rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--bois); margin-bottom: 6px; }
.fait span { font-size: .93rem; line-height: 1.4; display: block; }

/* carte géographique */
.carte-geo-wrap { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
#carte-provence { height: 560px; border-radius: var(--rayon); border: 1px solid var(--filet); box-shadow: var(--ombre); z-index: 1; background: var(--pierre); }
.carte-liste { max-height: 560px; overflow: auto; background: var(--papier); border: 1px solid var(--filet); border-radius: var(--rayon); box-shadow: var(--ombre); }
.carte-liste h3 { padding: 16px 18px 0; font-size: 1.05rem; margin-bottom: 4px; }
.carte-liste ul { list-style: none; margin: 0; padding: 8px 8px 12px; }
.carte-liste li { margin: 0; }
.carte-liste button { width: 100%; text-align: left; background: none; border: 0; padding: 9px 10px; border-radius: 10px; cursor: pointer; font: inherit; color: inherit; display: block; }
.carte-liste button:hover, .carte-liste button.actif { background: var(--ocre-clair); }
.carte-liste small { display: block; }
.dep-titre { padding: 12px 18px 2px; font: 700 .74rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--bois); }
.leaflet-popup-content { font-family: var(--sans); font-size: .9rem; line-height: 1.45; }
.leaflet-popup-content b { font-family: var(--serif); font-size: 1.05rem; }
.marqueur { width: 16px; height: 16px; border-radius: 50%; background: var(--terra); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.marqueur.m-84 { background: var(--lavande); }
.marqueur.m-83 { background: var(--olive); }
.marqueur.m-04 { background: var(--ocre); }

/* appels à l'action */
.bloc-devis { background: linear-gradient(135deg, var(--terra-fonce), var(--terra)); color: #fff; border-radius: 24px; padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: center; position: relative; overflow: hidden; }
.bloc-devis::after { content: ""; position: absolute; right: -60px; top: -60px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(243, 223, 174, .38), rgba(243, 223, 174, 0) 70%); }
.bloc-devis h2 { color: #fff; }
.bloc-devis p { color: #fbeadc; }
.bloc-devis .actions { display: flex; flex-direction: column; gap: 12px; position: relative; z-index: 1; }
.bloc-artisan { background: var(--papier); border: 2px dashed var(--bois-clair); border-radius: 20px; padding: clamp(24px, 4vw, 40px); display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.bloc-artisan h2 { font-size: 1.6rem; }
.bloc-artisan .groupe { display: flex; flex-wrap: wrap; gap: 12px; }

/* pied */
.site-footer { background: var(--cypres); color: #d9ceb6; padding: 54px 0 28px; font-size: .93rem; }
.site-footer a { color: #f3dfae; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.pied-grille { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.site-footer h4 { color: #fff; font-family: var(--sans); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 7px; }
.pied-marque { max-width: 340px; }
.pied-marque .logo { color: #fff; margin-bottom: 14px; }
.pied-marque .logo .mot em { color: var(--ocre); }
.pied-bas { margin-top: 36px; padding-top: 22px; border-top: 1px solid rgba(243, 223, 174, .18); display: flex; align-items: center; gap: 24px; flex-wrap: wrap; font-size: .86rem; }
.pied-bas img { height: 54px; width: auto; background: #fff; border-radius: 8px; padding: 4px 8px; }
.pied-bas p { margin: 0 0 4px; }

/* utilitaires */
.centre { text-align: center; }
.mt0 { margin-top: 0; }
.mb0 { margin-bottom: 0; }
.deux-col { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
.chapeau-article { font-size: 1.2rem; color: var(--brou); }
.article h2 { margin-top: 1.7em; }
.article h2:first-child { margin-top: 0; }
.article h3 { margin-top: 1.5em; }
.sommaire { background: var(--papier); border: 1px solid var(--filet); border-radius: var(--rayon); padding: 18px 22px; margin: 0 0 32px; }
.sommaire b { font: 700 .76rem/1 var(--sans); letter-spacing: .13em; text-transform: uppercase; color: var(--bois); display: block; margin-bottom: 10px; }
.sommaire ol { margin: 0; columns: 2; column-gap: 28px; }
.sommaire a { text-decoration: none; }
.sommaire a:hover { text-decoration: underline; }

/* glossaire */
.glossaire { display: grid; grid-template-columns: 170px 1fr; gap: 0; margin: 20px 0; border-top: 1px solid var(--filet); }
.glossaire dt { font-family: var(--serif); font-weight: 700; padding: 12px 10px 12px 0; border-bottom: 1px solid var(--filet); }
.glossaire dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--filet); color: var(--brou); }
@media (max-width: 640px) { .glossaire { grid-template-columns: 1fr; } .glossaire dt { border-bottom: 0; padding-bottom: 0; } }

/* apparition au défilement */
.revele { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.revele.visible { opacity: 1; transform: none; }
.no-js .revele { opacity: 1; transform: none; }

/* ---------- adaptatif ---------- */
@media (max-width: 1020px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: repeat(2, 1fr); }
  .chiffres { grid-template-columns: repeat(3, 1fr); row-gap: 22px; }
  .chiffre:nth-child(4) { border-left: 0; }
  .anatomie, .outil-corps, .carte-geo-wrap, .fiche-ouvrage, .bloc-devis, .deux-col { grid-template-columns: 1fr; }
  .anatomie-fiche, .fiche-ouvrage .vignette { position: static; }
  .fiche-ouvrage .vignette { max-width: 420px; }
  .frise-courte { grid-template-columns: repeat(2, 1fr); }
  .pied-grille { grid-template-columns: 1fr 1fr; }
  .quiz-reco { grid-template-columns: 1fr; }
  .quiz-reco .vignette { max-height: 200px; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-header nav {
    position: absolute; left: 0; right: 0; top: 100%; background: var(--papier); flex-direction: column; align-items: stretch; gap: 2px;
    padding: 12px 18px 18px; border-bottom: 1px solid var(--filet); box-shadow: 0 18px 34px rgba(46, 33, 24, .14);
    display: none;
  }
  .site-header nav.nav-open { display: flex; }
  .site-header nav a:not(.btn) { padding: 13px 14px; border-radius: 12px; }
  .site-header nav .btn { margin: 8px 0 0; justify-content: center; }
  .hero-home { display: flex; flex-direction: column; background: var(--calcaire); }
  .hero-home::before { display: none; }
  .hero-home .container { order: 1; padding-top: 38px; padding-bottom: 22px; }
  .hero-home .scene {
    position: relative; inset: auto; order: 2; width: 100%; height: auto; aspect-ratio: 3 / 2; z-index: 0;
    object-fit: cover; object-position: 67% 100%;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%); mask-image: linear-gradient(to bottom, transparent 0, #000 22%);
  }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .g2, .g3, .g4, .quiz-options, .faits, .frise-courte { grid-template-columns: 1fr; }
  .chiffres { grid-template-columns: repeat(2, 1fr); }
  .chiffre { border-left: 0; }
  .chiffre:nth-child(odd) { border-right: 1px solid rgba(243, 223, 174, .22); }
  .sommaire ol { columns: 1; }
  .pied-grille { grid-template-columns: 1fr; }
  .bloc-artisan { grid-template-columns: 1fr; }
  .outil-corps { padding: 20px; }
  .etape { padding-left: 70px; }
  .etape::before { width: 48px; height: 48px; font-size: 1.15rem; }
  .frise::before { left: 22px; }
  #carte-provence { height: 420px; }
  .quiz-reco dl { grid-template-columns: 1fr; gap: 2px; }
  .quiz-reco dt { margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .revele { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; }
}
@media print {
  .site-header, .site-footer, .bloc-devis, .bloc-artisan, .hero-home .scene, .nav-toggle, .btn { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .hero-page { background: #fff; color: #000; padding: 0 0 12px; }
  .hero-page h1, .hero-page .chapeau { color: #000; }
  .hero-page::before, .hero-page::after { display: none; }
  .revele { opacity: 1 !important; transform: none !important; }
  .checklist label { break-inside: avoid; }
  a { color: #000; }
}
