/* Monster Truck — interface : tôle noire, jaune chantier, lettrage épais */
:root {
  --ink: #f6efe2;
  --dim: rgba(246, 239, 226, .68);
  --panel: rgba(20, 14, 9, .84);
  --line: rgba(246, 239, 226, .18);
  --yellow: #ffc928;
  --orange: #ff7a1a;
  --f-title: 'Russo One', 'Arial Black', Impact, sans-serif;
  --f: 'Barlow Condensed', 'Segoe UI', system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1b130c; color: var(--ink); font: 600 17px/1.35 var(--f); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; touch-action: manipulation; cursor: pointer; }
[hidden] { display: none !important; }
#stage { position: fixed; inset: 0; overflow: hidden; user-select: none; -webkit-user-select: none; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

/* ── Tableau de bord ─────────────────────────────────────────── */
.hud { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: flex-start; gap: 18px; padding: max(10px, env(safe-area-inset-top)) 64px 0 14px; pointer-events: none; text-shadow: 0 2px 6px rgba(0, 0, 0, .65); }
.stat { display: grid; }
.stat small { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.stat b { font: 400 1.5rem/1.05 var(--f-title); font-variant-numeric: tabular-nums; }
.stat.dim b { color: var(--dim); font-size: 1.15rem; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; pointer-events: auto; }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hud .icon-btn { margin-left: auto; }
.sound { position: absolute; right: 12px; top: max(10px, env(safe-area-inset-top)); z-index: 3; }
.sound .off, .sound[aria-pressed="true"] .on { display: none; }
.sound[aria-pressed="true"] .off { display: block; }
.hint { position: absolute; left: 50%; top: 86px; transform: translateX(-50%); width: max-content; max-width: min(92%, 520px); padding: 8px 14px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--yellow); border-radius: 6px; text-align: center; pointer-events: none; }
.over { position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%); display: grid; gap: 4px; text-align: center; pointer-events: none; text-shadow: 0 3px 10px rgba(0, 0, 0, .8); }
.over { width: max-content; max-width: 96vw; }
.over b { white-space: nowrap; font: 400 clamp(1.7rem, 8.5vw, 4rem)/1 var(--f-title); color: var(--orange); text-transform: uppercase; }
.over span { font-size: 1.3rem; }
.over small { color: var(--dim); }
.float { position: absolute; transform: translate(-50%, -50%); font: 400 1.25rem/1 var(--f-title); color: var(--yellow); white-space: nowrap; opacity: 0; text-shadow: 0 2px 0 #000, 0 0 12px rgba(0, 0, 0, .7); }
.float.big { font-size: 1.8rem; color: #fff; }
.float.go { animation: rise 1.5s ease-out forwards; }
@keyframes rise { 0% { opacity: 0; translate: 0 14px; scale: .7; } 15% { opacity: 1; scale: 1.1; } 30% { scale: 1; } 80% { opacity: 1; } 100% { opacity: 0; translate: 0 -46px; } }

/* ── Pédales tactiles ────────────────────────────────────────── */
.touch { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 0 16px max(16px, env(safe-area-inset-bottom)); pointer-events: none; }
.pedal { pointer-events: auto; width: 112px; height: 112px; display: grid; place-content: center; justify-items: center; gap: 2px; background: var(--panel); border: 2px solid var(--line); border-radius: 22px; text-transform: uppercase; letter-spacing: .08em; font-size: .86rem; touch-action: none; }
.pedal svg { width: 44px; height: 44px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.pedal.gas { border-color: var(--yellow); color: var(--yellow); }
.pedal.on { background: rgba(255, 201, 40, .28); transform: scale(.96); }

/* ── Menu, feuilles ──────────────────────────────────────────── */
.menu { position: absolute; inset: 0; display: grid; align-items: center; padding: 20px clamp(18px, 6vw, 70px); background: linear-gradient(90deg, rgba(14, 9, 5, .82), rgba(14, 9, 5, .35) 55%, rgba(14, 9, 5, 0)); }
.menu-in { max-width: 430px; display: grid; gap: 12px; justify-items: start; }
.menu h1 { margin: 0; font: 400 clamp(3rem, 12vw, 5.6rem)/.86 var(--f-title); text-transform: uppercase; color: var(--yellow); text-shadow: 4px 4px 0 #000, 0 0 30px rgba(255, 122, 26, .5); letter-spacing: .01em; }
.lead { margin: 0; font-size: 1.2rem; }
.help { margin: 0; color: var(--dim); font-size: 1rem; }
.ver { font-size: .74rem; color: var(--dim); }
.cta { min-height: 54px; padding: 10px 34px; border: 0; border-radius: 10px; background: linear-gradient(180deg, #ffe066, var(--yellow)); color: #1b130c; font: 400 1.35rem/1 var(--f-title); text-transform: uppercase; letter-spacing: .04em; box-shadow: 0 5px 0 #a87a08, 0 12px 24px rgba(0, 0, 0, .4); }
.cta:active { transform: translateY(3px); box-shadow: 0 2px 0 #a87a08; }
.quiet { padding: 8px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; }
.veil { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 16px; background: rgba(10, 6, 3, .62); }
.sheet { width: min(420px, 100%); padding: 22px; display: grid; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; text-align: center; justify-items: center; }
.sheet h2 { margin: 0; font: 400 1.9rem/1 var(--f-title); text-transform: uppercase; color: var(--yellow); }
.sheet dl { margin: 0; display: grid; gap: 4px; }
.sheet dt { margin-top: 8px; font-size: .76rem; letter-spacing: .16em; text-transform: uppercase; color: var(--orange); }
.sheet dd { margin: 0; font-size: 1.1rem; line-height: 1.3; }
.sheet small { color: var(--dim); font-weight: 500; }
/* Téléphone tenu debout : on demande de le tourner (la piste a besoin de largeur) */
.rotate { position: absolute; inset: 0; z-index: 8; display: none; place-content: center; justify-items: center; gap: 10px; padding: 28px; background: rgba(14, 9, 5, .94); text-align: center; }
.rotate svg { width: 96px; height: 96px; fill: none; stroke: var(--yellow); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.rotate .phone { transform-origin: 32px 30px; animation: tilt 2.4s ease-in-out infinite; }
.rotate b { font: 400 1.7rem/1.1 var(--f-title); text-transform: uppercase; color: var(--yellow); }
.rotate span { color: var(--dim); font-size: 1.1rem; }
@keyframes tilt { 0%, 25% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }
@media (orientation: portrait) and (pointer: coarse) { .rotate { display: grid; } }
.fatal { position: absolute; inset: 0; z-index: 9; display: grid; place-content: center; gap: 8px; padding: 28px; background: #1b130c; text-align: center; }

@media (max-width: 560px) {
  .hud { gap: 12px; }
  .stat b { font-size: 1.2rem; }
  .stat.dim { display: none; }
  .hint { top: 70px; font-size: .95rem; }
}
@media (max-height: 460px) {
  .menu h1 { font-size: 2.6rem; }
  .menu h1 br { display: none; }
  .help { display: none; }
  .pedal { width: 92px; height: 92px; }
}
@media (prefers-reduced-motion: reduce) { .float.go { animation-duration: .01s; } .rotate .phone { animation: none; transform: rotate(-90deg); } }

/* Hall of fame (classes mbh-*, voir /css/hall.css) : aux couleurs du monster truck */
.mbh, .mbh-board, .mbh-toast { --mbh-accent: var(--yellow); --mbh-radius: 8px; }
.mbh { max-width: 430px; }
.mbh-title, .mbh-board-head h2 { font-family: var(--f-title); font-weight: 400; letter-spacing: .08em; }
.mbh-board-head h2 { font-size: 1.7rem; text-transform: uppercase; }
