/* Quicksand — jetons et composants partagés. Contraste mesuré : voir AUDIT-DESIGN.md.
   Règle : l'orange n'est JAMAIS du texte sur sable/papier ; c'est un fond (texte --deep) ou un texte sur --brown/--deep. */
:root {
  --sand: #E3C99A; --paper: #F3E6C8; --ocre: #B9853F; --ocre-dk: #6B4516; --brown: #3B2A1A; --deep: #241910; --orange: #FF6B1A;
  --red: #B42318; --ok: #2F5D2A;
  --display: "Archivo Black", "Arial Black", sans-serif; --mono: "Space Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 56px); --max: 1240px;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--brown); font: 400 15px/1.6 var(--mono); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; color: var(--deep); margin: 0; line-height: 1.02; letter-spacing: -0.01em; }
h1 { font-size: clamp(40px, 6.4vw, 92px); }
h2 { font-size: clamp(30px, 4vw, 54px); }
h3 { font-size: clamp(19px, 1.8vw, 24px); line-height: 1.15; }
p { margin: 0; max-width: 64ch; }
:focus-visible { outline: 3px solid var(--deep); outline-offset: 3px; box-shadow: 0 0 0 6px var(--orange); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ocre-dk); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border: 3px solid var(--deep);
  font: 400 17px/1 var(--display); color: var(--deep); background: var(--paper); text-decoration: none; cursor: pointer; border-radius: 4px; }
.btn:hover { background: var(--sand); }
.btn-launch { background: var(--orange); box-shadow: 5px 5px 0 var(--deep); }
.btn-launch:hover { background: var(--orange); transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--deep); }
.btn-launch:active { transform: translate(5px, 5px); box-shadow: none; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }

/* ruban de chantier : seulement aux frontières */
.tape { height: 14px; background: repeating-linear-gradient(-45deg, var(--deep) 0 14px, var(--orange) 14px 28px); }

/* barre du haut */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px var(--gutter); }
.logo { font: 400 22px/1 var(--display); color: var(--deep); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.logo svg { flex: none; }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { text-decoration: none; font-weight: 700; }
.nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 760px) { .nav a:not(.btn) { display: none; } }

/* panneau d'avertissement */
.sign { display: inline-grid; place-items: center; width: 132px; aspect-ratio: 1.12; background: var(--orange);
  clip-path: polygon(50% 0, 100% 100%, 0 100%); position: relative; }
.sign::before { content: ""; position: absolute; inset: 9px; background: var(--deep); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.sign::after { content: ""; position: absolute; inset: 17px; background: var(--orange); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.sign span { position: relative; z-index: 1; font: 400 13px/1 var(--display); color: var(--deep); margin-top: 34px; text-align: center; }

/* tableau des profondeurs */
.boardwrap { border: 3px solid var(--sand); background: #1A120B; color: var(--paper); overflow-x: auto; }
.board { width: 100%; border-collapse: collapse; }
.board th { text-align: left; font: 700 12px/1 var(--mono); color: var(--sand); padding: 14px; border-bottom: 2px solid var(--sand); }
.board td { padding: 10px 14px; border-top: 2px solid var(--brown); vertical-align: middle; }
.board tbody tr:first-child td { border-top: 0; }
.board td:first-child { white-space: nowrap; }
.board tr:hover td { background: #2A1D12; }
.board a:not(.btn) { text-decoration: none; color: var(--paper); }
.board a:hover .flap i { background: #3B2A1A; }
.board .lvl { color: var(--sand); }
.board .tag { border-color: var(--sand); color: var(--sand); }
.board tr.next td { background: #2A1D12; }
.trend svg { display: block; width: 20px; height: 20px; }
.trend.down { color: var(--orange); } .trend.up { color: var(--sand); } .trend.flat { color: #8C7A63; }
.flap { display: inline-flex; gap: 3px; vertical-align: middle; }
.flap i { font: 700 var(--flap, clamp(15px, 1.5vw, 22px))/1 var(--mono); font-style: normal; color: var(--paper); background: #2E2014;
  border-top: 1px solid #4A3622; width: 1.05em; padding: 6px 0; text-align: center; position: relative; transition: background .15s; }
.flap i::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid #120C07; }
.flap.o i { color: var(--orange); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.depthbar { position: relative; height: 14px; background: var(--sand); border: 2px solid var(--deep); min-width: 90px; }
.depthbar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--brown); }
.tag { display: inline-block; padding: 2px 8px; border: 2px solid var(--deep); font: 700 12px/1.4 var(--mono); white-space: nowrap; }
.tag.sim { border-style: dashed; }
.st-ARMED { background: var(--paper); }
.st-BURNED { background: var(--orange); color: var(--deep); }
.st-CANCELLED { background: var(--red); color: #fff; border-color: var(--red); }

/* accordéon (FAQ) */
details.qa { border-top: 3px solid var(--deep); padding: 18px 0; }
details.qa:last-child { border-bottom: 3px solid var(--deep); }
details.qa summary { cursor: pointer; list-style: none; font: 400 clamp(18px, 1.7vw, 22px)/1.2 var(--display); color: var(--deep); display: flex; justify-content: space-between; gap: 16px; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: "+"; font-family: var(--mono); font-weight: 700; }
details.qa[open] summary::after { content: "−"; }
details.qa p { margin-top: 12px; }

/* frise défilante */
.marquee { overflow: hidden; border-block: 3px solid var(--deep); background: var(--brown); color: var(--paper); }
.marquee .track { display: flex; gap: 40px; width: max-content; padding: 14px 0; flex-wrap: wrap; width: auto; padding-inline: var(--gutter); gap: 10px 40px; }
.marquee .item { white-space: nowrap; font-weight: 700; }
.marquee .item b { color: var(--orange); }
@keyframes slide { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee .track { animation: none; flex-wrap: wrap; width: auto; padding-inline: var(--gutter); } }

.empty-slot { display: grid; place-items: center; min-height: 160px; border: 3px dashed var(--ocre-dk); color: var(--ocre-dk); font-weight: 700; text-align: center; padding: 16px; }
footer.foot { background: var(--deep); color: var(--sand); padding: 80px var(--gutter) 56px; display: grid; gap: 24px; justify-items: start; }
footer.foot .word { font: 400 clamp(56px, 14vw, 220px)/.85 var(--display); color: var(--orange); letter-spacing: -.02em; }
footer.foot p { max-width: 60ch; }
footer.foot a:not(.btn) { color: var(--paper); }
@media (max-width: 640px) { .hide-s { display: none; } .board td, .board th { padding-inline: 6px; } }

/* pages intérieures */
.phead { background: var(--deep); color: var(--sand); }
.phead h1 { color: var(--paper); }
.phead .wrap { padding-block: 36px 40px; }
.phead p { max-width: 64ch; margin-top: 12px; }
.nav a[aria-current=page] { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
main.page { padding: 48px 0 80px; }
.note { border: 3px solid var(--deep); background: var(--paper); padding: 14px 16px; }
.note.warn { background: var(--orange); }
.note.bad { background: var(--red); color: #fff; border-color: var(--red); }
.note.ok { background: var(--deep); color: var(--paper); }
.muted { color: var(--ocre-dk); }

/* formulaires */
.field { display: grid; gap: 6px; min-width: 0; }
.field > * { min-width: 0; }
.field > span { font-weight: 700; }
.field small { color: var(--ocre-dk); }
.field input[type=text], .field input[type=url], .field textarea, .field select {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 3px solid var(--deep); background: var(--paper); color: var(--deep); font: 400 15px/1.4 var(--mono); border-radius: 0; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible, .btn:focus-visible, a:focus-visible, input[type=range]:focus-visible, summary:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.field input[type=file] { font: 400 14px var(--mono); max-width: 100%; }
.field input[type=range] { width: 100%; margin: 0; accent-color: var(--orange); }
.field .val { font: 400 22px/1 var(--display); color: var(--deep); }
fieldset { border: 3px solid var(--deep); padding: 18px; margin: 0; display: grid; gap: 16px; min-width: 0; }
legend { font: 400 19px/1 var(--display); padding: 0 8px; color: var(--deep); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 700; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--orange); }

/* étapes de signature */
.steps-v { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border: 3px solid var(--deep); }
.steps-v li { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 2px solid var(--deep); background: var(--paper); }
.steps-v li:last-child { border-bottom: 0; }
.steps-v .dot { width: 26px; height: 26px; border: 3px solid var(--deep); display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.steps-v li.done .dot { background: var(--deep); color: var(--paper); }
.steps-v li.now { background: var(--sand); } .steps-v li.now .dot { background: var(--orange); }
.steps-v li.fail .dot { background: var(--red); color: #fff; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0; }
.kv dt { color: var(--ocre-dk); } .kv dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.code { font: 700 13px/1.4 var(--mono); background: var(--deep); color: var(--paper); padding: 8px 10px; overflow-wrap: anywhere; display: block; }

/* style « Tableau » : bandeau sombre partout, sélection et focus aux couleurs du site */
.top { background: var(--deep); }
.top .logo, .top .nav a:not(.btn) { color: var(--paper); }
::selection { background: var(--orange); color: var(--deep); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

::placeholder { color: #6E5B44; opacity: 1; }
p, dd, li { text-wrap: pretty; }
