/* =====================================================================
   Ateliers JCA — feuille de style du site public
   Charte : noir #000 / anthracite #141414, or #CBB36B, or clair #E6DA86
   Titres : Bodoni Moda · Texte : Jost · Annotations : IBM Plex Mono
   ===================================================================== */

/* ---------- Polices auto-hébergées ---------- */
@font-face { font-family: 'Bodoni Moda'; src: url('../fonts/bodoni-moda-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Bodoni Moda'; src: url('../fonts/bodoni-moda-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Bodoni Moda'; src: url('../fonts/bodoni-moda-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Bodoni Moda'; src: url('../fonts/bodoni-moda-latin-500-italic.woff2') format('woff2'); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: 'Jost'; src: url('../fonts/jost-latin-300-normal.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Jost'; src: url('../fonts/jost-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Jost'; src: url('../fonts/jost-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('../fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('../fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }

/* ---------- Jetons ---------- */
:root {
  --ink: #0b0b0a;
  --ink-2: #141414;
  --ink-3: #1d1c1a;
  --paper: #f2eee4;
  --paper-2: #e8e2d4;
  --paper-3: #ddd5c3;
  --gold: #cbb36b;
  --gold-light: #e6da86;
  --gold-pale: #f7ef9e;
  --gold-deep: #6e5a22;          /* or foncé lisible sur papier (5,7:1) */
  --text: #1a1916;
  --muted: #5e594f;               /* sur papier (6:1) */
  --muted-d: #a39e92;             /* sur noir (7,3:1) */
  --line: #cfc7b4;
  --line-d: rgba(203, 179, 107, .22);
  --ok: #3f6b3a;
  --err: #a23b2a;

  --f-display: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, serif;
  --f-body: 'Jost', 'Futura', system-ui, sans-serif;
  --f-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --wrap: 1320px;
  --gut: clamp(20px, 4vw, 48px);
  --sec: clamp(72px, 10vw, 140px);
  --hdr: 72px;

  --ease: cubic-bezier(.2, .7, .1, 1);
  --t-fast: 160ms;
  --t-med: 320ms;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr) + 16px); }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font: 400 17px/1.62 var(--f-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 400; line-height: 1.08; margin: 0; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
::selection { background: var(--gold-light); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.on-paper :focus-visible, main :focus-visible { outline-color: var(--gold-deep); }
.ink :focus-visible { outline-color: var(--gold); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--gold); color: var(--ink); padding: 10px 16px; font-weight: 500; }
.skip:focus { top: 12px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--gut); }
.ink { background: var(--ink); color: var(--paper); }
.ink-2 { background: var(--ink-2); color: var(--paper); }

/* Annotations techniques (style cartouche de plan) */
.mono { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 400; }
.mono-n { font-family: var(--f-mono); font-size: .8rem; letter-spacing: .02em; }
.muted { color: var(--muted); }
.ink .muted, .ink-2 .muted { color: var(--muted-d); }
.gold { color: var(--gold-deep); }
.ink .gold, .ink-2 .gold { color: var(--gold); }
em.serif, .serif-i { font-family: var(--f-display); font-style: italic; }

/* ---------- Boutons ---------- */
.btn {
  --b: var(--ink); --c: var(--paper);
  display: inline-flex; align-items: center; justify-content: center; gap: .7em;
  min-height: 48px; padding: 0 22px; border: 1px solid var(--b); background: var(--b); color: var(--c);
  font: 500 .95rem/1 var(--f-body); letter-spacing: .02em; text-decoration: none; cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast);
}
.btn i { font-size: .85em; transition: transform var(--t-med) var(--ease); }
.btn:hover i.fa-arrow-right-long { transform: translateX(4px); }
.btn:hover { background: transparent; color: var(--b); }
.btn-gold { --b: var(--gold); --c: var(--ink); }
.ink .btn-gold:hover, .ink-2 .btn-gold:hover { color: var(--gold); }
.btn-line { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--paper); }
.ink .btn-line, .ink-2 .btn-line { color: var(--paper); border-color: rgba(242,238,228,.5); }
.ink .btn-line:hover, .ink-2 .btn-line:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: .88rem; }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
.btn.is-loading::after { content: ''; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.link-arrow { display: inline-flex; align-items: center; gap: .6em; font-weight: 500; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 3px; min-height: 32px; }
.link-arrow i { font-size: .8em; transition: transform var(--t-med) var(--ease); }
.link-arrow:hover i { transform: translateX(4px); }

/* ---------- En-tête ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--ink); color: var(--paper); min-height: var(--hdr); border-bottom: 1px solid var(--line-d); }
.hdr { display: flex; align-items: center; gap: 28px; height: var(--hdr); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex-shrink: 0; }
.brand img { width: 42px; height: auto; }
.brand-name { font-family: var(--f-display); font-size: 1.22rem; letter-spacing: .06em; color: var(--gold-light); line-height: 1; }
.brand-name small { display: block; font-family: var(--f-mono); font-size: .58rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted-d); margin-top: 5px; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav > a, .nav-dd > button {
  position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px;
  font-size: .93rem; color: var(--paper); text-decoration: none; background: none; border: 0; cursor: pointer;
}
.nav > a::after, .nav-dd > button::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 8px; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform var(--t-med) var(--ease); }
.nav > a:hover::after, .nav > a[aria-current="page"]::after, .nav-dd > button:hover::after, .nav-dd.is-current > button::after { transform: scaleX(1); }
.nav-dd { position: relative; }
.nav-dd > button i { font-size: .65em; transition: transform var(--t-fast); }
.nav-dd.open > button i { transform: rotate(180deg); }
.dd {
  position: absolute; top: calc(100% + 1px); left: -12px; min-width: 300px; background: var(--ink-2); border: 1px solid var(--line-d);
  padding: 10px 0; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity var(--t-fast), transform var(--t-fast), visibility var(--t-fast);
}
.nav-dd.open .dd { opacity: 1; visibility: visible; transform: none; }
.dd a { display: flex; align-items: baseline; gap: 14px; padding: 10px 20px; text-decoration: none; font-size: .93rem; }
.dd a span { color: var(--muted-d); }
.dd a:hover { background: var(--ink-3); color: var(--gold-light); }
.hdr-cta { margin-left: 8px; white-space: nowrap; }
.burger { display: none; width: 44px; height: 44px; background: none; border: 1px solid var(--line-d); color: var(--paper); cursor: pointer; }

@media (max-width: 1040px) {
  .nav { position: fixed; inset: var(--hdr) 0 0 0; background: var(--ink); flex-direction: column; align-items: stretch; gap: 0; padding: 16px var(--gut) 40px; overflow-y: auto; transform: translateX(100%); transition: transform var(--t-med) var(--ease); margin: 0; }
  body.nav-open .nav { transform: none; }
  body.nav-open { overflow: hidden; }
  .nav > a, .nav-dd > button { min-height: 56px; font-family: var(--f-display); font-size: 1.6rem; padding: 0; border-bottom: 1px solid var(--line-d); width: 100%; justify-content: space-between; }
  .nav > a::after, .nav-dd > button::after { display: none; }
  .dd { position: static; opacity: 1; visibility: visible; transform: none; display: none; border: 0; background: none; min-width: 0; padding: 4px 0 12px; }
  .nav-dd.open .dd { display: block; }
  .dd a { padding: 10px 0; }
  .burger { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; }
  .hdr-cta { margin-left: 0; }
  .hdr { gap: 12px; }
}
@media (max-width: 520px) {
  .brand-name small { display: none; }
  .hdr-cta { padding: 0 12px; font-size: .82rem; }
  .hdr-cta .t-long { display: none; }
}
@media (min-width: 521px) { .hdr-cta .t-short { display: none; } }

/* ---------- Hero accueil ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line-d); }
.hero-grid-lines { position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(to right, rgba(203,179,107,.07) 1px, transparent 1px);
  background-size: calc((min(100vw, var(--wrap)) - 2 * var(--gut)) / 12) 100%; background-position: center; }
.hero-in { position: relative; display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 24px; padding-block: clamp(48px, 8vw, 110px) clamp(40px, 6vw, 72px); align-items: end; }
.hero-text { grid-column: 1 / span 7; }
.hero-text .mono { color: var(--gold); display: flex; gap: 14px; align-items: center; margin-bottom: 28px; }
.hero-text .mono::before { content: ''; width: 36px; height: 1px; background: var(--gold); }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 5.1rem); line-height: 1.02; color: var(--paper); }
.hero h1 em { font-style: italic; color: var(--gold-light); }
.hero-lead { max-width: 34em; margin: 28px 0 36px; color: #d9d3c4; font-size: 1.08rem; font-weight: 300; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; }
.hero-draw { grid-column: 8 / span 5; align-self: center; margin: 0; }
.hero-draw svg { width: 100%; height: auto; overflow: visible; }
.hero-draw figcaption { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-d); color: var(--muted-d); }
@media (max-width: 900px) {
  .hero-text, .hero-draw { grid-column: 1 / -1; }
  .hero-draw { margin-top: 48px; max-width: 520px; }
}

/* Dessin bioclimatique */
.sd-line { stroke: var(--gold); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.sd-thin { stroke: rgba(203,179,107,.45); stroke-width: 1; fill: none; }
.sd-cut { fill: url(#hatch); stroke: var(--gold); stroke-width: 1; }
.sd-ray { stroke: var(--gold-light); stroke-width: 1.2; fill: none; stroke-dasharray: 1; stroke-dashoffset: 1; }
.sd-ray-dash { stroke: var(--gold-light); stroke-width: 1; fill: none; stroke-dasharray: 4 4; opacity: 0; }
.sd-sun { fill: none; stroke: var(--gold-light); stroke-width: 1.2; opacity: 0; }
.sd-wind { stroke: var(--muted-d); stroke-width: 1; fill: none; stroke-dasharray: 2 5; }
.sd-txt { font-family: var(--f-mono); font-size: 9.5px; letter-spacing: .08em; fill: var(--muted-d); opacity: 0; }
.sd-txt.g { fill: var(--gold); }
.hero-draw.is-drawn .sd-ray { animation: draw 1.4s var(--ease) forwards; }
.hero-draw.is-drawn .sd-ray.r2 { animation-delay: .5s; }
.hero-draw.is-drawn .sd-ray-dash { animation: fadein .6s ease forwards 1.1s; }
.hero-draw.is-drawn .sd-sun { animation: fadein .8s ease forwards .2s; }
.hero-draw.is-drawn .sd-txt { animation: fadein .6s ease forwards 1.3s; }
.hero-draw.is-drawn .sd-wind { animation: wind 3.5s linear infinite; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadein { to { opacity: 1; } }
@keyframes wind { to { stroke-dashoffset: -42; } }

/* Chiffres de preuve en cartouche */
.proofs { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-d); }
.proof { padding: 26px 24px 30px 0; border-right: 1px solid var(--line-d); }
.proof + .proof { padding-left: 24px; }
.proof:last-child { border-right: 0; }
.proof b { display: block; font-family: var(--f-display); font-weight: 400; font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1; color: var(--gold-light); }
.proof span { display: block; margin-top: 10px; color: var(--muted-d); }
@media (max-width: 640px) {
  .proofs { grid-template-columns: 1fr; }
  .proof, .proof + .proof { padding: 18px 0; border-right: 0; border-bottom: 1px solid var(--line-d); display: flex; align-items: baseline; gap: 16px; }
  .proof span { margin: 0; }
}

/* ---------- Sections ---------- */
.sec { padding-block: var(--sec); }
.sec-tight { padding-block: clamp(32px, 4.5vw, 64px); }
.sec-head { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 24px; margin-bottom: clamp(40px, 6vw, 72px); align-items: end; }
.sec-idx { grid-column: 1 / span 3; color: var(--gold-deep); padding-bottom: .6em; display: flex; gap: 12px; align-items: center; }
.ink .sec-idx, .ink-2 .sec-idx { color: var(--gold); }
.sec-idx::after { content: ''; flex: 1; height: 1px; background: currentColor; opacity: .5; max-width: 80px; }
.sec-title { grid-column: 4 / span 8; font-size: clamp(2rem, 3.8vw, 3.3rem); }
.sec-title em { font-style: italic; color: var(--gold-deep); }
.ink .sec-title em, .ink-2 .sec-title em { color: var(--gold-light); }
.sec-head .sec-aside { grid-column: 4 / span 7; margin-top: 18px; color: var(--muted); max-width: 40em; }
.ink .sec-head .sec-aside { color: var(--muted-d); }
@media (max-width: 760px) {
  .sec-idx, .sec-title, .sec-head .sec-aside { grid-column: 1 / -1; }
  .sec-idx { margin-bottom: 14px; }
}

/* Grille éditoriale : colonne de marge + contenu */
.ed { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 24px; }
.ed-side { grid-column: 1 / span 3; }
.ed-main { grid-column: 4 / span 8; }
.ed-main-wide { grid-column: 4 / -1; }
@media (max-width: 860px) { .ed-side, .ed-main, .ed-main-wide { grid-column: 1 / -1; } .ed-side { margin-bottom: 24px; } }
.sticky { position: sticky; top: calc(var(--hdr) + 32px); }

/* ---------- Approche (accueil) : trois principes ---------- */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.principle { padding: 32px 28px 8px 0; }
.principle + .principle { border-left: 1px solid var(--line); padding-left: 28px; }
.principle .mono { color: var(--gold-deep); }
.principle h3 { font-size: 1.7rem; margin: 18px 0 12px; }
.principle p { color: var(--muted); }
.swatch { height: 64px; margin-top: 18px; border: 1px solid var(--line); }
@media (max-width: 800px) { .principles { grid-template-columns: 1fr; } .principle + .principle { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; } }

/* Hachures de matériaux (conventions de dessin) */
.h-wood  { background: repeating-linear-gradient(90deg, transparent 0 9px, rgba(110,90,34,.3) 9px 10px), repeating-linear-gradient(90deg, transparent 0 23px, rgba(110,90,34,.2) 23px 24px), var(--paper-2); }
.h-earth { background: radial-gradient(circle, rgba(110,90,34,.42) 1px, transparent 1.4px) 0 0 / 7px 7px, radial-gradient(circle, rgba(110,90,34,.25) 1px, transparent 1.4px) 3px 4px / 11px 11px, var(--paper-2); }
.h-stone { background: repeating-linear-gradient(45deg, transparent 0 13px, rgba(110,90,34,.3) 13px 14px), repeating-linear-gradient(-45deg, transparent 0 13px, rgba(110,90,34,.3) 13px 14px), var(--paper-2); }
.h-fiber { background: repeating-linear-gradient(60deg, transparent 0 5px, rgba(110,90,34,.3) 5px 6px), repeating-linear-gradient(120deg, transparent 0 13px, rgba(110,90,34,.18) 13px 14px), var(--paper-2); }
.h-lime  { background: repeating-linear-gradient(0deg, transparent 0 6px, rgba(110,90,34,.28) 6px 7px), var(--paper-2); }
.ink .h-wood, .ink .h-earth, .ink .h-stone, .ink .h-fiber, .ink .h-lime { background-color: var(--ink-3); filter: invert(0); }

/* ---------- Projets : planche (grille) ---------- */
.plates { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(28px, 4vw, 48px) 24px; }
.plate { grid-column: span 4; text-decoration: none; display: block; }
.plates.feature .plate:first-child { grid-column: span 7; grid-row: span 2; }
.plates.feature .plate:nth-child(2), .plates.feature .plate:nth-child(3) { grid-column: span 5; }
.plate-fig { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); }
.plates.feature .plate:first-child { display: flex; flex-direction: column; }
.plates.feature .plate:first-child .plate-fig { flex: 1; aspect-ratio: auto; min-height: 360px; }
.plate-fig img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease); }
.plate:hover .plate-fig img { transform: scale(1.03); }
.plate-ph { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 14px; }
.plate-ph .mono { background: var(--paper); padding: 4px 8px; color: var(--muted); }
.plate-no { position: absolute; top: 0; left: 0; background: var(--ink); color: var(--gold-light); padding: 7px 10px; }
.plate-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; color: var(--muted); }
.plate h3 { font-size: 1.45rem; margin-top: 8px; transition: color var(--t-fast); }
.plate:hover h3 { color: var(--gold-deep); }
.plate .coords { margin-top: 8px; color: var(--muted); }
@media (max-width: 960px) { .plate, .plates.feature .plate:nth-child(n) { grid-column: span 6; grid-row: auto; } }
@media (max-width: 600px) { .plate, .plates.feature .plate:nth-child(n) { grid-column: 1 / -1; } }

/* Projets : index (liste) */
.pindex { border-top: 1px solid var(--line); }
.prow { display: grid; grid-template-columns: 70px 1fr 200px 120px 90px 28px; gap: 16px; align-items: center; min-height: 72px; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; position: relative; }
.prow h3 { font-size: 1.35rem; }
.prow .mono, .prow .mono-n { color: var(--muted); }
.prow i { color: var(--gold-deep); transition: transform var(--t-med) var(--ease); }
.prow:hover { background: linear-gradient(90deg, var(--paper-2), transparent); }
.prow:hover i { transform: translateX(4px); }
.prow-preview { position: fixed; z-index: 30; width: 260px; aspect-ratio: 4/3; pointer-events: none; opacity: 0; transition: opacity var(--t-fast); background-size: cover; background-position: center; border: 1px solid var(--ink); }
.prow-preview.on { opacity: 1; }
@media (max-width: 760px) {
  .prow { grid-template-columns: 48px 1fr 24px; }
  .prow .c-loc, .prow .c-type, .prow .c-year { display: none; }
  .prow-preview { display: none; }
}

/* Filtres */
.filters { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 32px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 40px; }
.fgroup { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 2px; }
.fgroup > .mono { margin-right: 10px; color: var(--muted); }
.chip { min-height: 40px; padding: 0 12px; border: 1px solid transparent; background: none; cursor: pointer; font-size: .92rem; color: var(--text); display: inline-flex; align-items: center; gap: 7px; transition: border-color var(--t-fast), background var(--t-fast); }
.chip sup { font-family: var(--f-mono); font-size: .66rem; color: var(--muted); }
.chip:hover { border-color: var(--line); }
.chip[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.chip[aria-pressed="true"] sup { color: var(--gold); }
.view-toggle { display: flex; border: 1px solid var(--line); }
.view-toggle button { min-height: 40px; min-width: 44px; padding: 0 12px; background: none; border: 0; cursor: pointer; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; }
.view-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--gold-light); }

/* ---------- Services (liste) ---------- */
.slist { border-top: 1px solid var(--line-d); counter-reset: s; }
.srow { display: grid; grid-template-columns: 90px 1.1fr 1fr 40px; gap: 24px; align-items: baseline; padding: 28px 0; border-bottom: 1px solid var(--line-d); text-decoration: none; transition: padding var(--t-med) var(--ease); }
.srow .num { font-family: var(--f-display); font-style: italic; font-size: 1.9rem; color: var(--gold); line-height: 1; }
.srow h3 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); }
.srow p { margin: 0; color: var(--muted-d); }
.srow i { color: var(--gold); justify-self: end; transition: transform var(--t-med) var(--ease); }
.srow:hover { padding-left: 12px; }
.srow:hover h3 { color: var(--gold-light); }
.srow:hover i { transform: translateX(6px); }
.on-paper .srow, main.paper .srow { border-color: var(--line); }
.on-paper .srow .num { color: var(--gold-deep); }
.on-paper .srow p { color: var(--muted); }
.on-paper .srow i { color: var(--gold-deep); }
.on-paper .srow:hover h3 { color: var(--gold-deep); }
.on-paper .slist { border-color: var(--line); }
@media (max-width: 760px) { .srow { grid-template-columns: 50px 1fr 24px; } .srow p { grid-column: 2 / 3; } .srow i { grid-row: 1; grid-column: 3; } }

/* ---------- Le regard de l'architecte (signature) ---------- */
.regard { position: relative; display: grid; grid-template-columns: 120px 1fr; gap: 24px; padding: 34px 0; border-top: 1px solid var(--gold-deep); border-bottom: 1px solid var(--line); }
.regard > .mono { color: var(--gold-deep); writing-mode: vertical-rl; transform: rotate(180deg); justify-self: start; align-self: start; }
.regard blockquote { margin: 0; font-family: var(--f-display); font-style: italic; font-size: clamp(1.4rem, 2.4vw, 2rem); line-height: 1.3; }
.regard cite { display: block; margin-top: 18px; font-style: normal; color: var(--muted); }
.ink .regard, .ink-2 .regard { border-top-color: var(--gold); border-bottom-color: var(--line-d); }
.ink .regard > .mono { color: var(--gold); }
.ink .regard cite { color: var(--muted-d); }
@media (max-width: 600px) { .regard { grid-template-columns: 1fr; } .regard > .mono { writing-mode: horizontal-tb; transform: none; } }

/* ---------- Bandeau inter-sites (Académie) ---------- */
.cross { border-top: 1px solid var(--line-d); }
.cross-in { display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; align-items: center; padding-block: 44px; }
.cross h2 { font-size: clamp(1.6rem, 2.8vw, 2.3rem); }
.cross p { margin: 10px 0 0; color: var(--muted-d); max-width: 46em; }
@media (max-width: 700px) { .cross-in { grid-template-columns: 1fr; } }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--ink); color: var(--paper); }
.ftr { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px 32px; padding-block: 64px 40px; border-top: 1px solid var(--line-d); }
.ftr h4 { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); font-weight: 400; margin-bottom: 16px; }
.ftr ul { list-style: none; margin: 0; padding: 0; }
.ftr li a { display: inline-flex; min-height: 34px; align-items: center; text-decoration: none; color: #d9d3c4; font-size: .94rem; }
.ftr li a:hover { color: var(--gold-light); }
.ftr .brand { margin-bottom: 18px; }
.ftr address { font-style: normal; color: var(--muted-d); font-size: .94rem; line-height: 1.8; }
.ftr address a { color: #d9d3c4; }
.ftr-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding-block: 22px 32px; border-top: 1px solid var(--line-d); color: var(--muted-d); font-size: .85rem; }
.ftr-legal nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.ftr-legal a { text-decoration: none; min-height: 32px; display: inline-flex; align-items: center; }
.ftr-legal a:hover { color: var(--gold-light); }
.scalebar { display: flex; align-items: flex-end; gap: 0; margin-top: 22px; }
.scalebar span { width: 28px; height: 6px; border: 1px solid var(--gold); }
.scalebar span:nth-child(odd) { background: var(--gold); }
.scalebar + .mono { margin-top: 6px; color: var(--muted-d); display: block; font-size: .62rem; }
.nl-form { display: flex; margin-top: 12px; border: 1px solid var(--line-d); }
.nl-form input { flex: 1; min-width: 0; min-height: 46px; background: transparent; border: 0; padding: 0 14px; color: var(--paper); }
.nl-form input::placeholder { color: var(--muted-d); }
.nl-form button { min-width: 48px; background: var(--gold); color: var(--ink); border: 0; cursor: pointer; }
@media (max-width: 900px) { .ftr { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ftr { grid-template-columns: 1fr; } }

/* WhatsApp (visible surtout sur téléphone) */
.wa { position: fixed; right: 16px; bottom: 16px; z-index: 40; width: 54px; height: 54px; display: none; align-items: center; justify-content: center; background: var(--ink); color: var(--gold-light); border: 1px solid var(--gold); font-size: 1.5rem; text-decoration: none; box-shadow: 0 6px 24px rgba(0,0,0,.25); }
.wa.on { display: flex; }
@media (min-width: 1041px) { .wa.on { width: 48px; height: 48px; font-size: 1.3rem; } }

/* ---------- En-tête de page intérieure ---------- */
.phead { padding-block: clamp(48px, 8vw, 104px) clamp(36px, 5vw, 64px); border-bottom: 1px solid var(--line-d); }
.crumbs { display: flex; flex-wrap: wrap; gap: 10px; color: var(--muted-d); margin-bottom: 28px; }
.crumbs a { text-decoration: none; color: var(--gold); }
.crumbs a:hover { text-decoration: underline; }
.phead h1 { font-size: clamp(2.4rem, 5.4vw, 4.6rem); max-width: 16em; }
.phead h1 em { font-style: italic; color: var(--gold-light); }
.phead .lead { margin-top: 22px; max-width: 40em; color: #d9d3c4; font-weight: 300; font-size: 1.1rem; }

/* ---------- Texte riche (Markdown) ---------- */
.prose { max-width: 42em; }
.prose h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 1.8em 0 .6em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.35rem; margin: 1.5em 0 .5em; }
.prose ul { padding-left: 0; list-style: none; margin: 0 0 1.2em; }
.prose ul li { position: relative; padding: 8px 0 8px 32px; border-bottom: 1px solid var(--line); }
.prose ul li::before { content: ''; position: absolute; left: 0; top: 1.15em; width: 18px; height: 1px; background: var(--gold-deep); }
.prose strong { font-weight: 500; }
.prose a { color: var(--gold-deep); }
.prose blockquote { margin: 1.4em 0; padding-left: 20px; border-left: 1px solid var(--gold-deep); font-family: var(--f-display); font-style: italic; font-size: 1.3rem; }

/* ---------- Fiche projet ---------- */
.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.gallery button { padding: 0; border: 0; background: var(--paper-2); cursor: zoom-in; aspect-ratio: 4/3; overflow: hidden; }
.gallery button:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 8; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: opacity var(--t-fast); }
.gallery button:hover img { opacity: .88; }
.gallery-empty { aspect-ratio: 16 / 7; position: relative; border: 1px solid var(--line); }
.gallery-empty .mono { position: absolute; left: 16px; bottom: 16px; background: var(--paper); padding: 6px 10px; color: var(--muted); }

/* Cartouche (bloc-titre de plan) */
.cartouche { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--ink); margin-top: clamp(32px, 5vw, 56px); }
.cartouche > div { padding: 14px 16px 16px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); min-height: 82px; }
.cartouche > div:nth-child(4n) { border-right: 0; }
.cartouche dt { color: var(--muted); }
.cartouche dd { margin: 8px 0 0; font-size: 1.05rem; }
.cartouche .wide { grid-column: span 2; }
.cartouche .full { grid-column: 1 / -1; border-right: 0; }
.cartouche .ttl { grid-column: span 2; background: var(--ink); color: var(--paper); }
.cartouche .ttl dt { color: var(--gold); }
.cartouche .ttl dd { font-family: var(--f-display); font-size: 1.3rem; }
@media (max-width: 700px) { .cartouche { grid-template-columns: 1fr 1fr; } .cartouche > div { border-right: 1px solid var(--ink); } .cartouche > div:nth-child(2n) { border-right: 0; } .cartouche .ttl, .cartouche .wide { grid-column: 1 / -1; border-right: 0; } }

.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--line); }
.duo > div { padding: 32px 32px 32px 0; }
.duo > div + div { border-left: 1px solid var(--line); padding-left: 32px; padding-right: 0; }
.duo h2 { font-size: 1.9rem; margin: 12px 0 16px; }
.duo .mono { color: var(--gold-deep); }
@media (max-width: 760px) { .duo { grid-template-columns: 1fr; } .duo > div + div { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; } }

.mats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.mat { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 8px; border: 1px solid var(--line); }
.mat i { width: 34px; height: 34px; display: block; border: 1px solid var(--line); }

/* Encadré carbone : lignes de cote */
.carbon { padding: 32px; border: 1px solid var(--ink); background: var(--paper); }
.carbon-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.carbon-head h3 { font-size: 1.6rem; }
.cote { position: relative; margin: 22px 0 8px; }
.cote-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.cote-label b { font-family: var(--f-display); font-weight: 400; font-size: 1.5rem; }
.cote-line { position: relative; height: 18px; }
.cote-line::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: currentColor; }
.cote-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 0; color: var(--gold-deep); transition: width 1.2s var(--ease); }
.cote-bar::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: currentColor; }
.cote-bar::after, .cote-bar > i { content: ''; position: absolute; top: 2px; bottom: 2px; width: 1px; background: currentColor; transform: skewX(-35deg); }
.cote-bar::after { right: 0; }
.cote-bar > i { left: 0; }
.cote-bar.ref { color: var(--muted); }
.cote-bar.proj { color: var(--ok); height: 100%; }
.cote-bar.proj::before { height: 3px; margin-top: -1px; }
.carbon-gain { margin-top: 22px; padding-top: 16px; border-top: 1px dashed var(--line); display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; }
.carbon-gain b { font-family: var(--f-display); font-weight: 400; font-size: 2.2rem; color: var(--ok); line-height: 1; }
.carbon-note { margin-top: 14px; font-size: .86rem; color: var(--muted); }

.testi { margin: 0; padding: 32px 0; border-top: 1px solid var(--line); }
.testi p { font-family: var(--f-display); font-size: clamp(1.3rem, 2.2vw, 1.75rem); line-height: 1.35; }
.testi p::before { content: '«\00a0'; color: var(--gold-deep); }
.testi p::after { content: '\00a0»'; color: var(--gold-deep); }
.testi footer { color: var(--muted); }

/* Bloc d'appel à l'action unique */
.cta-block { display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; align-items: center; padding: clamp(32px, 5vw, 56px); background: var(--ink); color: var(--paper); }
.cta-block h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
.cta-block p { margin: 10px 0 0; color: var(--muted-d); }
@media (max-width: 700px) { .cta-block { grid-template-columns: 1fr; } }

/* ---------- Page service ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); border-top: 1px solid var(--ink); }
.steps li { position: relative; padding: 22px 20px 26px 0; }
.steps li::before { content: ''; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; background: var(--paper); border: 1px solid var(--ink); border-radius: 50%; }
.steps li .mono { color: var(--gold-deep); display: block; margin-bottom: 10px; }
.steps li p { margin: 0; font-size: 1.02rem; }
.incl { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 32px; }
.incl li { break-inside: avoid; display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.incl li i { color: var(--gold-deep); margin-top: .35em; font-size: .8rem; }
@media (max-width: 640px) { .incl { columns: 1; } }

.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 64px; padding: 14px 0; font-family: var(--f-display); font-size: 1.25rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { color: var(--gold-deep); transition: transform var(--t-med) var(--ease); flex-shrink: 0; }
.faq details[open] summary i { transform: rotate(45deg); }
.faq details > div { padding: 0 0 20px; color: var(--muted); max-width: 42em; }

/* ---------- Ressources ---------- */
.guides { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.guide { display: grid; grid-template-rows: auto 1fr auto; border: 1px solid var(--ink); background: var(--paper); }
.guide-cover { position: relative; aspect-ratio: 3 / 2; border-bottom: 1px solid var(--ink); display: flex; align-items: flex-end; padding: 18px; }
.guide-cover .tag { background: var(--ink); color: var(--gold-light); padding: 5px 9px; }
.guide-body { padding: 22px; }
.guide-body h3 { font-size: 1.45rem; margin-bottom: 10px; }
.guide-body p { color: var(--muted); margin: 0; }
.guide-foot { padding: 0 22px 22px; }

.alist { border-top: 1px solid var(--line); }
.arow { display: grid; grid-template-columns: 130px 1fr 160px; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); text-decoration: none; align-items: baseline; }
.arow h3 { font-size: 1.5rem; }
.arow p { margin: 6px 0 0; color: var(--muted); }
.arow:hover h3 { color: var(--gold-deep); }
@media (max-width: 700px) { .arow { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- Formulaires ---------- */
.form { display: grid; gap: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; }
.field > label, .field > .lbl { font-size: .9rem; font-weight: 500; }
.field .opt { color: var(--muted); font-weight: 400; }
.field .help { font-size: .84rem; color: var(--muted); }
.input, .textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; background: #fbf9f4; border: 1px solid var(--line); border-bottom-color: var(--ink);
  border-radius: 0; transition: border-color var(--t-fast), box-shadow var(--t-fast); appearance: none;
}
.textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.input:hover, .textarea:hover { border-color: var(--muted); border-bottom-color: var(--ink); }
.input:focus, .textarea:focus { outline: none; border-color: var(--ink); box-shadow: inset 0 -2px 0 var(--gold-deep); }
.field.has-err .input, .field.has-err .textarea, .field.has-err .cs-btn { border-color: var(--err); }
.ferr { color: var(--err); font-size: .85rem; display: flex; gap: 6px; align-items: center; }
.ferr:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Cases à cocher / boutons radio personnalisés */
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: .92rem; line-height: 1.5; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box { flex-shrink: 0; width: 22px; height: 22px; margin-top: 1px; border: 1px solid var(--ink); background: #fbf9f4; display: inline-flex; align-items: center; justify-content: center; transition: background var(--t-fast); }
.check .box i { font-size: .7rem; color: var(--gold-light); opacity: 0; transform: scale(.6); transition: opacity var(--t-fast), transform var(--t-fast); }
.check input:checked + .box { background: var(--ink); }
.check input:checked + .box i { opacity: 1; transform: none; }
.check input:focus-visible + .box { outline: 2px solid var(--gold-deep); outline-offset: 2px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { position: relative; cursor: pointer; }
.tile input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.tile span { display: flex; flex-direction: column; gap: 10px; min-height: 96px; padding: 16px; border: 1px solid var(--line); background: #fbf9f4; transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast); }
.tile span i { color: var(--gold-deep); font-size: 1.15rem; }
.tile span b { font-weight: 500; font-size: .95rem; }
.tile:hover span { border-color: var(--ink); }
.tile input:checked + span { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.tile input:checked + span i { color: var(--gold-light); }
.tile input:focus-visible + span { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
.tiles.sm .tile span { min-height: 0; flex-direction: row; align-items: center; padding: 12px 14px; }

/* Sélecteur personnalisé (remplace le <select> natif) */
.cs { position: relative; }
.cs select { position: absolute; opacity: 0; pointer-events: none; width: 1px; height: 1px; }
.cs-btn { width: 100%; min-height: 50px; padding: 0 44px 0 14px; display: flex; align-items: center; text-align: left; background: #fbf9f4; border: 1px solid var(--line); border-bottom-color: var(--ink); cursor: pointer; position: relative; }
.cs-btn::after { content: '\f107'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--gold-deep); transition: transform var(--t-fast); }
.cs.open .cs-btn::after { transform: translateY(-50%) rotate(180deg); }
.cs-btn.ph { color: var(--muted); }
.cs-btn:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
.cs-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 6px 0; list-style: none; background: #fbf9f4; border: 1px solid var(--ink); max-height: 280px; overflow-y: auto; display: none; box-shadow: 0 16px 40px rgba(11,11,10,.14); }
.cs.open .cs-list { display: block; }
.cs-list li { padding: 11px 14px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.cs-list li[aria-selected="true"] { font-weight: 500; }
.cs-list li[aria-selected="true"]::after { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: var(--gold-deep); font-size: .8rem; }
.cs-list li.act, .cs-list li:hover { background: var(--paper-2); }
@media (max-width: 640px) {
  .cs.open .cs-list { position: fixed; left: 0; right: 0; bottom: 0; top: auto; max-height: 60vh; border-width: 1px 0 0; padding: 8px 0 calc(12px + env(safe-area-inset-bottom)); z-index: 90; box-shadow: 0 -20px 60px rgba(11,11,10,.3); }
  .cs.open .cs-list li { min-height: 52px; align-items: center; padding: 0 20px; }
  .cs-veil { position: fixed; inset: 0; background: rgba(11,11,10,.45); z-index: 89; }
}

/* Assistant pas-à-pas (simulateur) */
.wizard { border: 1px solid var(--ink); background: var(--paper); }
.wz-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--ink); }
.wz-bar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; flex: 1; max-width: 360px; }
.wz-bar span { height: 3px; background: var(--paper-3); transition: background var(--t-med); }
.wz-bar span.done { background: var(--gold-deep); }
.wz-step { padding: clamp(24px, 4vw, 44px); display: none; }
.wz-step.on { display: block; animation: stepin var(--t-med) var(--ease); }
@keyframes stepin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.wz-step h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 10px; }
.wz-step > p { color: var(--muted); margin-bottom: 26px; }
.wz-nav { display: flex; justify-content: space-between; gap: 12px; padding: 18px 24px; border-top: 1px solid var(--line); }
.range-wrap { display: grid; gap: 14px; }
.range-out { font-family: var(--f-display); font-size: 3rem; line-height: 1; }
.range-out small { font-family: var(--f-mono); font-size: .8rem; color: var(--muted); letter-spacing: .1em; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 1px; background: var(--ink); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -11px; background: var(--gold); border: 1px solid var(--ink); border-radius: 0; transform: rotate(45deg); }
input[type="range"]::-moz-range-track { height: 1px; background: var(--ink); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; background: var(--gold); border: 1px solid var(--ink); border-radius: 0; transform: rotate(45deg); }
.range-scale { display: flex; justify-content: space-between; color: var(--muted); }

/* Questionnaire numéroté */
.qlist { counter-reset: q; display: grid; gap: 0; }
.q { display: grid; grid-template-columns: 70px 1fr; gap: 20px; padding: 32px 0; border-top: 1px solid var(--line); }
.q-n { font-family: var(--f-display); font-style: italic; font-size: 1.8rem; color: var(--gold-deep); line-height: 1; }
.q h3 { font-size: 1.4rem; margin-bottom: 16px; }
@media (max-width: 640px) { .q { grid-template-columns: 1fr; gap: 8px; } }

/* Onglets */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--ink); margin-bottom: 28px; overflow-x: auto; }
.tabs button { min-height: 50px; padding: 0 20px; background: none; border: 0; border-bottom: 3px solid transparent; cursor: pointer; font-weight: 500; color: var(--muted); white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--gold-deep); }

.contact-card { border: 1px solid var(--ink); }
.contact-card > div { padding: 20px 22px; border-bottom: 1px solid var(--line); }
.contact-card > div:last-child { border-bottom: 0; }
.contact-card a { text-decoration: none; display: inline-flex; gap: 10px; align-items: center; min-height: 32px; }
.contact-card a:hover { color: var(--gold-deep); }
.contact-card i { color: var(--gold-deep); width: 18px; }
.booking-frame { width: 100%; min-height: 680px; border: 1px solid var(--ink); background: #fff; }

/* Résultat d'envoi */
.done-box { padding: clamp(28px, 4vw, 48px); border: 1px solid var(--ink); background: var(--paper); }
.done-box i.fa-check { width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center; background: var(--ink); color: var(--gold-light); margin-bottom: 18px; }
.done-box h2 { font-size: 2rem; margin-bottom: 10px; }
.recap { margin: 20px 0; border-top: 1px solid var(--line); }
.recap div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.recap dt { color: var(--muted); }
.recap dd { margin: 0; text-align: right; }

/* ---------- Toasts & modales ---------- */
.toasts { position: fixed; z-index: 200; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 10px; width: min(92vw, 440px); }
.toast { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--ink); color: var(--paper); border-left: 3px solid var(--gold); box-shadow: 0 14px 40px rgba(0,0,0,.3); animation: toastin var(--t-med) var(--ease); font-size: .94rem; }
.toast.err { border-left-color: #d0604c; }
.toast.ok { border-left-color: #7fae6b; }
.toast i { margin-top: .2em; color: var(--gold); }
.toast.err i { color: #e08a78; }
.toast.ok i { color: #9fcb8b; }
.toast.out { opacity: 0; transform: translateY(6px); transition: opacity 200ms, transform 200ms; }
@keyframes toastin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.modal-veil { position: fixed; inset: 0; z-index: 150; background: rgba(11,11,10,.7); display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadein2 200ms ease; }
@keyframes fadein2 { from { opacity: 0; } to { opacity: 1; } }
.modal { position: relative; width: min(100%, 560px); max-height: calc(100vh - 40px); overflow-y: auto; background: var(--paper); border-top: 3px solid var(--gold); padding: clamp(24px, 4vw, 40px); animation: stepin var(--t-med) var(--ease); }
.modal h2 { font-size: 1.9rem; margin: 10px 0 10px; padding-right: 40px; }
.modal-x { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; font-size: 1.1rem; }
.modal-x:hover { color: var(--gold-deep); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
@media (max-width: 560px) {
  .modal-veil { align-items: flex-end; padding: 0; }
  .modal { width: 100%; max-height: 92vh; padding-bottom: calc(28px + env(safe-area-inset-bottom)); }
}

.lightbox { position: fixed; inset: 0; z-index: 160; background: rgba(11,11,10,.96); display: flex; align-items: center; justify-content: center; }
.lightbox img { max-width: 92vw; max-height: 84vh; object-fit: contain; }
.lightbox button { position: absolute; width: 52px; height: 52px; background: none; border: 1px solid var(--line-d); color: var(--paper); cursor: pointer; font-size: 1.1rem; }
.lightbox .lb-x { top: 16px; right: 16px; }
.lightbox .lb-p { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-n { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-c { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: var(--muted-d); }

/* Squelettes de chargement */
.sk { background: linear-gradient(90deg, var(--paper-2) 0, var(--paper-3) 50%, var(--paper-2) 100%) 0 0 / 200% 100%; animation: sk 1.4s linear infinite; }
.ink .sk { background: linear-gradient(90deg, var(--ink-2) 0, var(--ink-3) 50%, var(--ink-2) 100%) 0 0 / 200% 100%; }
@keyframes sk { to { background-position: -200% 0; } }
.empty { padding: 48px 0; color: var(--muted); border-top: 1px solid var(--line); }

/* Apparition au défilement */
.rv { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.rv.in { opacity: 1; transform: none; }

.mt-s { margin-top: 16px; } .mt-m { margin-top: 32px; } .mt-l { margin-top: clamp(48px, 7vw, 88px); }
.mb-m { margin-bottom: 32px; }
.demo-flag { display: inline-flex; gap: 8px; align-items: center; padding: 6px 10px; border: 1px dashed var(--gold-deep); color: var(--gold-deep); margin-bottom: 18px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; }
  .sd-ray { stroke-dashoffset: 0; } .sd-ray-dash, .sd-sun, .sd-txt { opacity: 1; }
}

@media print {
  .site-header, .site-footer, .wa, .cross, .cta-block { display: none !important; }
  body { background: #fff; }
}

/* Étapes verticales (colonne latérale) */
.steps.v { grid-template-columns: 1fr; border-top: 0; border-left: 1px solid var(--ink); margin-top: 18px; padding-left: 20px; }
.steps.v li { padding: 6px 0 18px; }
.steps.v li::before { top: 10px; left: -25px; }
