/* Impact — jetons et base. DA : AUDIT-DESIGN.md (basalte, roche, sable, cendre, ocre, incandescent). */
:root {
  --basalt: #1F1B18; --rock: #2A2420; --rock2: #342C27; --sand: #E8D6B9; --ash: #A8998A; --ochre: #8C3B1F; --glow: #FF7A1A; --void: #FF5A4E;
  --line: rgba(232, 214, 185, .14); --line2: rgba(232, 214, 185, .28);
  --display: "Big Shoulders Display", "Big Shoulders Text", sans-serif; --text: "Big Shoulders Text", system-ui, sans-serif; --mono: "IBM Plex Mono", ui-monospace, monospace;
  --gut: clamp(16px, 4vw, 56px); --max: 1320px; --r: 4px;
  /* strates (accueil « Échelle ») : les sections descendent du basalte vers la roche chaude */
  --s1: #211D19; --s2: #25201B; --s3: #2A231E; --s4: #302720;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--rock2) var(--basalt); accent-color: var(--glow); caret-color: var(--glow); }
::selection { background: var(--glow); color: var(--basalt); }
a { text-underline-offset: .2em; }
.mono, .data, table, dl, ul, ol { font-variant-numeric: tabular-nums; }
body { margin: 0; background: var(--basalt); color: var(--sand); font: 400 18px/1.5 var(--text); overflow-x: hidden; }
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: .92; letter-spacing: -.005em; margin: 0; }
h1 { font-size: clamp(52px, 6.6vw, 96px); }
h2 { font-size: clamp(38px, 4.6vw, 72px); }
h3 { font-size: clamp(26px, 2.6vw, 36px); font-weight: 700; }
p { margin: 0; max-width: 68ch; }
.mono, .data { font-family: var(--mono); font-size: 14px; letter-spacing: 0; }
.muted { color: var(--ash); }
.glow { color: var(--glow); }

/* barre */
.bar { position: sticky; top: 0; z-index: 20; background: rgba(31, 27, 24, .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { font: 800 28px/1 var(--display); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand svg { width: 26px; height: 26px; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; color: var(--ash); font-size: 17px; }
.nav a:hover, .nav a[aria-current] { color: var(--sand); }
@media (max-width: 720px) { .nav a:not(.btn) { display: none; } .bar .wrap { gap: 12px; } }

/* bouton principal : commande usinée (recette hero-financial : ombres intérieures opposées) */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 26px; border-radius: var(--r); border: 0; cursor: pointer;
  font: 800 22px/1 var(--display); letter-spacing: .01em; text-decoration: none; color: var(--basalt); background: var(--glow);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 -3px 0 rgba(0, 0, 0, .25); transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .35); }
.btn.ghost { background: transparent; color: var(--sand); box-shadow: inset 0 0 0 1px var(--line2); }
.btn.small { min-height: 38px; padding: 0 16px; font-size: 18px; }
.nav .btn { color: var(--basalt); }

/* statuts des tranches */
.st { font: 500 12px/1 var(--mono); padding: 5px 8px; border-radius: 4px; white-space: nowrap; border: 1px solid currentColor; }
.st.armed { color: var(--sand); }
.st.burned { color: var(--basalt); background: var(--glow); border-color: var(--glow); }
.st.cancelled { color: var(--void); }
.pill { font: 500 12px/1 var(--mono); padding: 4px 7px; border-radius: 3px; background: var(--rock2); color: var(--ash); }

/* carte */
.map svg { width: 100%; height: auto; }
.map .land { fill: #2F2823; stroke: rgba(232, 214, 185, .22); stroke-width: .5; }
.map .grat { stroke: rgba(232, 214, 185, .06); stroke-width: .5; fill: none; }
.map .c-free { fill: none; stroke: var(--sand); stroke-opacity: .7; stroke-width: .7; }
.map .c-taken { fill: var(--ochre); stroke: var(--glow); stroke-width: .8; }
.map .c-dug { fill: var(--glow); }
.map g.cr { cursor: pointer; }
.map g.cr:hover .c-free, .map g.cr.on .c-free { stroke: var(--glow); stroke-opacity: 1; stroke-width: 1.4; }
.map g.cr.on .c-taken { stroke: var(--sand); stroke-width: 1.4; }
.map .hit { fill: transparent; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: -1px; margin-right: 6px; }

/* coupe / vue de dessus d'un cratère */
.crater-obj .rim { fill: none; stroke: var(--sand); stroke-width: 1.2; }
.crater-obj .cont { fill: none; stroke: rgba(232, 214, 185, .16); stroke-width: .8; }
.crater-obj .th { fill: none; stroke: var(--ash); stroke-dasharray: 3 4; stroke-width: .9; }
.crater-obj .th.hit { stroke: var(--glow); stroke-dasharray: none; }
.crater-obj .dug { fill: url(#dugGrad); }
.crater-obj text { font: 500 11px var(--mono); fill: var(--ash); }
.crater-obj text.on { fill: var(--glow); }
.crater-obj .met { fill: var(--glow); }

/* tableaux de données */
table.data-t { width: 100%; border-collapse: collapse; font: 14px/1.3 var(--mono); }
table.data-t th { text-align: left; font-weight: 500; color: var(--ash); padding: 10px 12px; border-bottom: 1px solid var(--line2); }
table.data-t td { padding: 11px 12px; border-bottom: 1px solid var(--line); }
table.data-t tr:hover td { background: rgba(232, 214, 185, .03); }
.num, table.data-t .num { text-align: right; font-variant-numeric: tabular-nums; }
input[type=file] { font: 13px var(--mono); color: var(--ash); max-width: 100%; }
input[type=file]::file-selector-button { font: 700 17px var(--display); background: transparent; color: var(--sand); border: 1px solid var(--line2); border-radius: 6px; padding: 8px 14px; margin-right: 12px; cursor: pointer; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scroll-x { overflow-x: auto; }

/* FAQ (recette faq-minimilastic : question, réponse qui s'ouvre, rien d'autre) */
.faq details { border-top: 1px solid var(--line); padding: 20px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 18px; font: 700 clamp(22px, 2.2vw, 30px)/1.1 var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--glow); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 12px; color: var(--ash); }

/* pied (recette footer-bold : mot géant à faible opacité) */
.foot { border-top: 1px solid var(--line); margin-top: 0; padding: 48px 0 0; overflow: hidden; }
.foot .cols { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.foot .word { font: 900 clamp(90px, 21vw, 330px)/.78 var(--display); color: rgba(232, 214, 185, .06); margin-top: 40px; white-space: nowrap; letter-spacing: -.01em; }
.slot { display: grid; place-items: center; border: 1px dashed var(--line2); color: var(--ash); font: 12px var(--mono); text-align: center; padding: 10px; border-radius: var(--r); }

/* chaque section est une strate pleine largeur, teinte de plus en plus chaude en descendant (même depuis l'intérieur d'un .wrap) */
main section { --bg: var(--s1); padding: clamp(56px, 7vw, 96px) 0; background: var(--bg); box-shadow: 0 0 0 100vmax var(--bg); clip-path: inset(0 -100vmax); }
main section:nth-of-type(4n+2) { --bg: var(--s2); }
main section:nth-of-type(4n+3) { --bg: var(--s3); }
main section:nth-of-type(4n) { --bg: var(--s4); }
.sec-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
