:root { --fond: #03040a; --texte: #e2e8f0; --doux: #94a3b8; --bord: rgba(148, 163, 184, .2); --accent: #d97757; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--fond); color: var(--texte); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; overflow: hidden; }
#scene { position: fixed; inset: 0; }
.verre { position: fixed; background: rgba(6, 10, 22, .72); border: 1px solid var(--bord); border-radius: 16px; backdrop-filter: blur(10px); box-shadow: 0 10px 40px rgba(0, 0, 0, .4); }

#barre { top: 14px; left: 14px; right: 14px; display: flex; align-items: center; gap: 20px; padding: 12px 18px; }
#barre .titre h1 { margin: 0; font-size: 20px; letter-spacing: .01em; background: linear-gradient(90deg, #fbbf24, #d97757, #c084fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
#barre .titre p { margin: 2px 0 0; color: var(--doux); font-size: 12px; }
.chiffres { display: flex; gap: 10px; flex: 1; justify-content: center; flex-wrap: wrap; }
.chiffre { background: rgba(30, 41, 59, .55); border-radius: 12px; padding: 6px 14px; min-width: 104px; text-align: center; }
.chiffre b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.chiffre.grand b { font-size: 26px; color: #fbbf24; }
.chiffre span { color: var(--doux); font-size: 11px; }
.pastille { padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; background: #1e3a8a; white-space: nowrap; }

#pedago { top: 108px; left: 14px; width: 330px; max-height: calc(100vh - 380px); overflow: auto; padding: 14px 16px; }
#pedago h2, #langues h2 { margin: 0 0 10px; font-size: 15px; }
#etapes { margin: 0; padding: 0; list-style: none; counter-reset: e; }
#etapes li { counter-increment: e; position: relative; padding: 8px 8px 8px 40px; border-radius: 10px; margin-bottom: 4px; transition: background .4s; }
#etapes li::before { content: counter(e); position: absolute; left: 8px; top: 9px; width: 22px; height: 22px; border-radius: 50%; background: #1e293b; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
#etapes li b { display: block; }
#etapes li span { color: var(--doux); font-size: 12px; }
#etapes li.active { background: rgba(217, 119, 87, .18); }
#etapes li.active::before { background: var(--accent); box-shadow: 0 0 14px var(--accent); }
#etapes li.faite::before { background: #166534; content: "✓"; }
.legende { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; margin-top: 10px; font-size: 12px; color: var(--doux); }
.legende i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.c-attente { background: #334155; } .c-vol { background: #fff; box-shadow: 0 0 8px #fff; } .c-repli { background: #ef4444; }
.note { color: var(--doux); font-size: 12px; margin: 10px 0 0; }

#langues { top: 108px; right: 14px; width: 300px; padding: 14px 16px; }
.langue { margin-bottom: 14px; }
.langue .ligne { display: flex; justify-content: space-between; font-weight: 700; }
.barre { height: 10px; border-radius: 999px; background: #1e293b; overflow: hidden; margin: 6px 0 4px; }
.barre i { display: block; height: 100%; border-radius: 999px; transition: width .8s; box-shadow: 0 0 12px currentColor; }
.langue small { color: var(--doux); font-size: 11px; display: block; }

#commandes { right: 14px; bottom: 14px; width: 420px; padding: 12px 14px; }
#commandes .ligne { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
#commandes .lib { color: var(--doux); font-size: 12px; }
#commandes label { font-weight: 600; cursor: pointer; }
select, button { font: inherit; color: var(--texte); background: #1e293b; border: 1px solid var(--bord); border-radius: 10px; padding: 6px 10px; cursor: pointer; }
button:hover { background: #334155; }
button.primaire { background: linear-gradient(135deg, #d97757, #b45309); border: 0; font-weight: 700; }
button.replay { background: linear-gradient(135deg, #6d28d9, #4338ca); border: 0; font-weight: 700; }
#timeline input { width: 100%; accent-color: #a78bfa; }
#t-heure { font-variant-numeric: tabular-nums; color: #c4b5fd; font-weight: 700; flex: 1; }
#message { min-height: 18px; font-size: 12px; color: #fbbf24; }

#journal { left: 14px; bottom: 14px; width: min(640px, calc(100vw - 470px)); height: 240px; overflow: auto; padding: 10px 14px; font: 12px/1.55 ui-monospace, Consolas, monospace; color: #cbd5e1; }
#journal div { white-space: pre-wrap; border-left: 2px solid transparent; padding-left: 6px; }
#journal div.neuf { border-color: var(--accent); }

#hors-ligne { position: fixed; inset: 0; display: none; place-items: center; z-index: 5; pointer-events: none; }
#hors-ligne .verre { position: static; padding: 24px 28px; text-align: center; max-width: 520px; pointer-events: auto; }
#hors-ligne code { color: #fbbf24; }

.etiquette { color: #f8fafc; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 8px; background: rgba(6, 10, 22, .78); border: 1px solid var(--bord); white-space: nowrap; pointer-events: none; text-align: center; }
.etiquette small { display: block; color: var(--doux); font-weight: 500; font-size: 10px; }
.etiquette.quartier { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; background: rgba(6, 10, 22, .55); }
.etiquette.bot { font-size: 10px; padding: 2px 6px; }

@media (max-width: 1100px) { #pedago { display: none; } #journal { width: calc(100vw - 470px); } }
@media (max-width: 760px) { #langues, #journal { display: none; } #commandes { left: 14px; width: auto; } .chiffre { min-width: 80px; } }
