/* Charte noir/or — docs/13_VISUELS.md et docs/05_INTERFACE.md. Corps 18 px, cibles 48 px, contraste >= 4.5:1. */
:root {
    --bg: #0C1010;
    --surface: #191D1C;
    --surface-2: #232928;
    --text: #F5EDDD;
    --text-muted: #C5C9C4;
    --gold: #C7A363;
    --gold-strong: #E2C27E;
    --gold-soft: rgba(199, 163, 99, 0.35);
    --danger: #F0A08E;
    --success: #A9D6B0;
    --radius: 14px;
    --nav-height: 64px;
    --font-title: Georgia, "Times New Roman", "DejaVu Serif", serif;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); color: var(--text); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); font-size: 18px; line-height: 1.5; min-height: 100dvh; background: var(--bg); }
h1, h2, h3 { font-family: var(--font-title); font-weight: 600; line-height: 1.2; margin: 0 0 0.5rem; }
h2 { font-size: 1.35rem; color: var(--gold-strong); }
p { margin: 0 0 0.75rem; }
a { color: var(--gold-strong); }
:focus-visible { outline: 3px solid var(--gold-strong); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.title { font-size: 2rem; color: var(--gold); }
.eyebrow { margin: 0 0 0.25rem; color: var(--text-muted); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.85rem; }
.lead { margin: 0.5rem 0 0.75rem; }
.note { color: var(--text-muted); font-size: 0.95rem; }
.muted { color: var(--text-muted); }

.page { max-width: 44rem; margin: 0 auto; padding: 0 1rem calc(var(--nav-height) + 1.5rem + env(safe-area-inset-bottom)); }
.page--no-nav { padding-bottom: calc(1.5rem + env(safe-area-inset-bottom)); }
.page > * + * { margin-top: 1rem; }

.card { background: var(--surface); border: 1px solid var(--gold-soft); border-radius: var(--radius); padding: 1.25rem; }
.card--section h2 { margin-bottom: 0.5rem; }
.card--muted { background: var(--surface-2); border-color: transparent; }

.welcome__hero { height: clamp(150px, 30vh, 300px); margin: 0 -1rem 1rem; background-color: var(--surface); background-image: linear-gradient(to bottom, rgba(12,16,16,0.1), rgba(12,16,16,0.92)), url("/images/ambiance/venue-night-v1.png"); background-size: cover; background-position: 70% center; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 48px; padding: 0.6rem 1.2rem; border-radius: 12px; border: 1px solid var(--gold); background: transparent; color: var(--gold-strong); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.button--primary { background: var(--gold); color: #111; border-color: var(--gold); }
.button--block { width: 100%; }
.button[disabled], .button[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.button + .button { margin-left: 0.5rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.actions .button + .button { margin-left: 0; }

.field { display: block; margin: 0.75rem 0 0.35rem; font-weight: 600; }
.input, .textarea { width: 100%; min-height: 48px; padding: 0.6rem 0.9rem; border-radius: 12px; border: 1px solid var(--gold-soft); background: var(--bg); color: var(--text); font: inherit; }
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .textarea:focus { border-color: var(--gold); }
form .button { margin-top: 1rem; }

.alert { padding: 0.75rem 1rem; border-radius: 12px; border: 1px solid; }
.alert--error { color: var(--danger); border-color: var(--danger); }
.alert--success { color: var(--success); border-color: var(--success); }
.alert--info { color: var(--text); border-color: var(--gold-soft); background: var(--surface-2); }
.banner { margin: 0 -1rem; padding: 0.6rem 1rem; text-align: center; font-weight: 600; }
.banner--private { background: #2A2416; color: var(--gold-strong); border-bottom: 1px solid var(--gold-soft); }
.banner--preview { background: #3A2A1A; color: var(--text); }
.badge { display: inline-block; padding: 0.1rem 0.6rem; border-radius: 999px; background: var(--gold); color: #111; font-size: 0.8rem; font-weight: 700; vertical-align: middle; }
.badge--muted { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--gold-soft); }

.list { list-style: none; margin: 0; padding: 0; }
.list > li + li { margin-top: 0.75rem; }
.item { display: block; padding: 1rem 1.1rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--gold-soft); color: var(--text); text-decoration: none; }
.item__title { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-title); font-size: 1.2rem; color: var(--gold-strong); margin-bottom: 0.25rem; }
.item__meta { color: var(--text-muted); font-size: 0.9rem; }

.character { display: grid; grid-template-columns: 64px 1fr; gap: 1rem; align-items: start; }
.avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--gold-soft); display: grid; place-items: center; font-family: var(--font-title); font-size: 1.6rem; color: var(--gold-strong); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.character__questions { margin: 0.5rem 0 0; padding-left: 1.1rem; color: var(--text-muted); }

details.topic, details.followup { border: 1px solid var(--gold-soft); border-radius: 12px; padding: 0.4rem 0.9rem; margin: 0.5rem 0; background: var(--surface-2); }
details summary { min-height: 40px; display: flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--gold-strong); }
.question { font-weight: 600; margin-top: 0.75rem; }
.answer { margin-bottom: 0.25rem; }
.evidence__body { white-space: pre-line; background: var(--surface-2); padding: 1rem; border-radius: 12px; }
.evidence__media { width: 100%; height: auto; border-radius: 12px; display: block; margin-bottom: 1rem; }

.choice-grid { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.choice { min-height: 64px; padding: 0.9rem; border-radius: var(--radius); border: 2px solid var(--gold-soft); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.choice[aria-pressed="true"] { border-color: var(--gold); background: #2A2416; color: var(--gold-strong); }
.choice--wide { grid-column: 1 / -1; }
.counter { font-weight: 700; color: var(--gold-strong); }

.nav { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--nav-height) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border-top: 1px solid var(--gold-soft); z-index: 10; }
.nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 48px; color: var(--text-muted); text-decoration: none; font-size: 0.8rem; font-weight: 600; }
.nav a[aria-current="page"] { color: var(--gold-strong); }
.nav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; }

@media (min-width: 720px) { .page { padding-top: 1rem; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Console GM — iPad paysage : trois zones ; portrait : zones empilées. Fond uni, pas de photo. */
.admin { max-width: 1400px; margin: 0 auto; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); }
.admin__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.admin__bar-right { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.admin__bar-right form { margin: 0; } .admin__bar-right .button { margin: 0; }
.admin__title { font-size: 1.6rem; color: var(--gold); margin: 0; }
.admin__grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 1100px) { .admin__grid { grid-template-columns: 1fr 1.6fr 1.2fr; align-items: start; } }
.admin__zone h2 { margin-top: 1.25rem; } .admin__zone h2:first-child { margin-top: 0; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline__step { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.45rem 0.6rem; border-left: 3px solid var(--gold-soft); color: var(--text-muted); }
.timeline__step.is-done { color: var(--text); border-left-color: var(--gold); opacity: 0.75; }
.timeline__step.is-current { color: var(--gold-strong); border-left-color: var(--gold-strong); font-weight: 700; background: var(--surface-2); }
.speech { margin: 0 0 0.75rem; padding: 0.9rem 1rem; border-left: 4px solid var(--gold); background: var(--surface-2); font-size: 1.1rem; }
.action-card { margin: 0.5rem 0 1rem; }
.action-card__preview { margin-top: 0.75rem; padding: 1rem; border-radius: 12px; border: 1px solid var(--gold); background: var(--surface-2); }
.action-card__preview .actions { margin-top: 0.5rem; } .action-card__preview .button { margin-top: 0; }
.item.is-pending { border-color: var(--gold); }
.item form { display: flex; gap: 0.5rem; margin-top: 0.5rem; } .item form .button { margin: 0; }
.item .button { margin-top: 0.5rem; }
.history { list-style: none; margin: 0; padding: 0; font-size: 0.9rem; color: var(--text-muted); max-height: 16rem; overflow: auto; }
.token-box { margin-top: 0.5rem; }
label.field input[type="checkbox"] { width: 24px; height: 24px; vertical-align: middle; margin-right: 0.5rem; }
.button--toggle[aria-pressed="true"] { background: var(--gold); color: #111; }
.compact { margin: 0 0 0.75rem; padding-left: 1.1rem; font-size: 0.95rem; }
.gauge__bar { display: block; height: 10px; margin-top: 0.35rem; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.gauge__bar span { display: block; height: 100%; background: var(--gold); }
/* Texte exact superposé sur l’image d’une pièce (position en % définie dans le contenu, taille lisible à l’écran). */
.evidence__figure { position: relative; margin: 0 0 1rem; container-type: inline-size; }
.evidence__figure .evidence__media { margin: 0; }
.evidence__overlay-text { position: absolute; display: flex; align-items: center; justify-content: center; text-align: center; padding: 2%; color: #2A2118; background: rgba(243, 232, 210, 0.86); box-shadow: 0 0 14px 10px rgba(243, 232, 210, 0.86); border-radius: 4px; font-family: var(--font-title); font-style: italic; font-size: clamp(11px, 4.2cqw, 24px); line-height: 1.3; overflow: hidden; }
.qr { width: 220px; max-width: 100%; margin: 0.5rem 0; padding: 8px; background: #fff; border-radius: 8px; }
.qr svg { display: block; width: 100%; height: auto; }
.pause-form .input { margin-bottom: 0.5rem; }
