/* ═══════════════════════════════════════════════════════════════
   CACHE-CACHE ROYALE — direction artistique « nocturne tactique »
   Fond quasi-noir, vert radar, rouge alerte. AAA, plein soleil.
   ═══════════════════════════════════════════════════════════════ */

/* L'attribut hidden doit gagner sur toute règle display (ex. .seeker-actions en flex). */
[hidden] { display: none !important; }

:root {
  --bg: #0B0E14;
  --panel: #151A24;
  --panel-2: #1C2230;
  --line: #262E40;
  --green: #3DF07C;
  --green-dark: #06240F;
  --red: #FF3B4B;
  --amber: #FFB020;
  --blue: #4EA3FF;
  --white: #FFFFFF;
  --muted: #9AA3B8;
  --radius: 12px;
  --font: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--white);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}

.tab-num { font-variant-numeric: tabular-nums; }

/* ─────────── Écrans ─────────── */
.screen {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
}
.screen[hidden] { display: none; }
.screen.scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: calc(var(--sat) + 16px) 16px 16px;
  gap: 14px;
}
.scroll-pad { height: calc(var(--sab) + 24px); flex-shrink: 0; }
.center-wrap {
  margin: auto; padding: 24px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  max-width: 480px; width: 100%;
  text-align: center;
}

/* ─────────── Boutons ─────────── */
.btn {
  display: block; width: 100%;
  min-height: 56px;
  border: none; border-radius: var(--radius);
  font-family: var(--font);
  font-size: 17px; font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease, opacity 120ms ease;
  user-select: none; -webkit-user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.35; pointer-events: none; }
.btn-primary {
  background: var(--green); color: var(--green-dark);
  box-shadow: 0 0 24px rgba(61, 240, 124, 0.25);
}
.btn-danger {
  background: var(--red); color: #2A0509;
  box-shadow: 0 0 24px rgba(255, 59, 75, 0.25);
}
.btn-ghost {
  background: var(--panel-2); color: var(--white);
  border: 1px solid var(--line);
}
.btn-big { min-height: 64px; font-size: 19px; }
.btn-slim { min-height: 44px; font-size: 14px; }
.btn-mini {
  background: var(--panel-2); color: var(--white);
  border: 1px solid var(--line); border-radius: 10px;
  min-height: 44px; padding: 0 14px;
  font-family: var(--font); font-size: 13px; font-weight: 600;
  cursor: pointer;
}

/* ─────────── Formulaires ─────────── */
.input {
  width: 100%; min-height: 56px;
  background: var(--panel-2); color: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 16px;
  font-family: var(--font); font-size: 18px; font-weight: 600;
  outline: none;
  transition: border-color 150ms ease;
}
.input:focus { border-color: var(--green); }
.input::placeholder { color: #5A637A; font-weight: 500; }
.input-code {
  text-transform: uppercase; text-align: center;
  font-size: 26px; font-weight: 800; letter-spacing: 0.35em;
  font-variant-numeric: tabular-nums;
}
.field-label {
  display: block; font-size: 13px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.form-error { color: var(--red); font-weight: 600; font-size: 15px; margin-top: 10px; text-align: center; }

/* ─────────── Panneaux ─────────── */
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  flex-shrink: 0;
}
.panel-title {
  font-size: 14px; font-weight: 800;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
}
.count-chip {
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 2px 10px;
  font-size: 13px; color: var(--white);
  font-variant-numeric: tabular-nums;
}
.count-chip.green { color: var(--green); border-color: rgba(61,240,124,0.4); }
.mini-hint { font-size: 13px; color: var(--muted); margin-top: 8px; }
.mini-hint.center { text-align: center; }
.divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em;
  margin: 16px 0;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ═══════════ É1 · ACCUEIL ═══════════ */
.home-wrap {
  margin: auto; width: 100%; max-width: 440px;
  padding: calc(var(--sat) + 32px) 20px calc(var(--sab) + 24px);
  display: flex; flex-direction: column; align-items: center;
  overflow-y: auto;
}
.brand {
  font-size: clamp(34px, 10vw, 46px);
  font-weight: 900; line-height: 1.02;
  text-align: center; letter-spacing: 0.02em;
  margin-top: 20px;
}
.brand-accent {
  color: var(--green);
  text-shadow: 0 0 30px rgba(61, 240, 124, 0.5);
}
.tagline {
  color: var(--muted); text-align: center;
  font-size: 15px; margin: 12px 0 24px; max-width: 320px;
}
.home-panel { width: 100%; }
.home-panel .btn { margin-top: 12px; }
.join-row { display: flex; gap: 10px; }
.join-row .input-code { flex: 1; min-width: 0; }
.join-row .btn { width: auto; padding: 0 20px; margin-top: 0; flex-shrink: 0; }
.home-foot { color: #545D74; font-size: 12px; text-align: center; margin-top: 20px; }

/* Logo radar animé */
.radar-logo {
  position: relative; width: 150px; height: 150px; flex-shrink: 0;
}
.radar-logo.small { width: 100px; height: 100px; }
.radar-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid rgba(61, 240, 124, 0.5);
  animation: radarPulse 3s ease-out infinite;
}
.radar-ring.r2 { animation-delay: 1s; }
.radar-ring.r3 { animation-delay: 2s; }
@keyframes radarPulse {
  0% { transform: scale(0.25); opacity: 1; }
  100% { transform: scale(1.05); opacity: 0; }
}
.radar-sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(61,240,124,0.35), transparent 70deg);
  animation: radarSweep 3s linear infinite;
}
@keyframes radarSweep { to { transform: rotate(360deg); } }
.radar-dot {
  position: absolute; top: 50%; left: 50%;
  width: 10px; height: 10px; margin: -5px;
  border-radius: 50%; background: var(--green);
  box-shadow: 0 0 16px var(--green);
}
.splash-text { color: var(--muted); font-size: 15px; letter-spacing: 0.15em; text-transform: uppercase; }

/* ═══════════ AIDE GÉOLOC ═══════════ */
.bigicon { font-size: 56px; }
.help-text { color: var(--muted); font-size: 15px; }
.help-text code { color: var(--green); font-size: 13px; word-break: break-all; }
.help-panel { text-align: left; font-size: 14px; width: 100%; }
.help-panel ol, .help-panel ul { padding-left: 20px; margin-top: 8px; display: grid; gap: 6px; }

/* ═══════════ É2 · LOBBY ═══════════ */
.lobby-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-shrink: 0;
}
.lobby-code-label {
  display: block; font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em; color: var(--muted);
}
.lobby-code {
  font-size: 40px; font-weight: 900; letter-spacing: 0.18em;
  color: var(--green); line-height: 1.1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 24px rgba(61, 240, 124, 0.4);
}
.qr-panel { display: flex; align-items: center; gap: 14px; }
.qr-box {
  width: 108px; height: 108px; flex-shrink: 0;
  background: var(--white); border-radius: 10px; padding: 6px;
  display: flex; align-items: center; justify-content: center;
}
.qr-box svg, .qr-box img { width: 100%; height: 100%; display: block; }
.qr-hint { font-size: 13px; color: var(--muted); }

.players { list-style: none; display: grid; gap: 8px; }
.player-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px;
  min-height: 52px;
}
.player-row.tappable { cursor: pointer; }
.player-row.tappable:active { filter: brightness(1.3); }
.player-row.is-seeker { border-color: rgba(255, 59, 75, 0.5); }
.pdot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
  box-shadow: 0 0 8px rgba(61,240,124,0.6);
}
.pdot.off { background: #4A5268; box-shadow: none; }
.pname { font-weight: 700; font-size: 16px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pbadge {
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em;
  padding: 3px 7px; border-radius: 6px; flex-shrink: 0;
}
.pbadge.host { background: rgba(255, 176, 32, 0.15); color: var(--amber); border: 1px solid rgba(255,176,32,0.4); }
.pbadge.seeker { background: rgba(255, 59, 75, 0.15); color: var(--red); border: 1px solid rgba(255,59,75,0.4); }
.pready { font-size: 18px; flex-shrink: 0; width: 24px; text-align: center; color: var(--green); }
.pready.no { color: #4A5268; }

.lobby-map {
  height: 240px; border-radius: 10px; overflow: hidden;
  border: 1px solid var(--line);
  background: #F2EFE6; /* crème du style « Snap Map » (visible avant les tuiles / hors ligne) */
}
.zone-controls { margin-top: 12px; display: grid; gap: 10px; }
.slider-row {
  display: flex; align-items: center; gap: 12px; min-height: 44px;
}
.slider-label {
  font-size: 13px; font-weight: 700; color: var(--muted);
  width: 108px; flex-shrink: 0;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.slider-val {
  font-size: 15px; font-weight: 800; color: var(--green);
  width: 64px; text-align: right; flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
input[type="range"] {
  flex: 1; min-width: 0; appearance: none; -webkit-appearance: none;
  height: 6px; border-radius: 3px; background: var(--line);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none; -webkit-appearance: none;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--green); border: 3px solid var(--bg);
  box-shadow: 0 0 10px rgba(61,240,124,0.5);
  cursor: pointer;
}
.seg-row { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.seg { display: flex; flex: 1; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg-btn {
  flex: 1; min-height: 44px; border: none; background: transparent;
  color: var(--muted); font-family: var(--font); font-size: 14px; font-weight: 700;
  cursor: pointer;
}
.seg-btn.active { background: var(--green); color: var(--green-dark); }

.safety-panel { display: grid; gap: 14px; }
.safety-check {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 14px; color: var(--muted); cursor: pointer;
}
.safety-check strong { color: var(--white); }
.safety-check input {
  width: 24px; height: 24px; flex-shrink: 0; margin-top: 2px;
  accent-color: var(--green);
}
.leave-btn { flex-shrink: 0; }

/* Modal rituel */
.modal {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(4, 6, 10, 0.85);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
}
.modal[hidden] { display: none; }
.modal-card {
  width: 100%; max-width: 480px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px 20px 0 0;
  padding: 24px 20px calc(var(--sab) + 24px);
  display: grid; gap: 14px;
  animation: sheetUp 220ms cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
.modal-title { font-size: 18px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
.ready-steps { list-style: none; display: grid; gap: 10px; font-size: 15px; color: var(--muted); }
.ready-steps li.done { color: var(--green); font-weight: 600; }
.ready-steps li.doing { color: var(--white); font-weight: 600; }
.ready-steps li.fail { color: var(--amber); }
.step-ico { display: inline-block; width: 22px; }
.soundtest-txt { font-size: 15px; line-height: 1.5; }
#ready-soundtest { display: grid; gap: 10px; }

/* ═══════════ JEU · CARTE + HUD ═══════════ */
/* Carte vectorielle claire « Snap Map » : le chrome sombre de l'app flotte au-dessus. */
.game-map { position: absolute; inset: 0; background: #F2EFE6; }

.maplibregl-map { font-family: var(--font); }
.maplibregl-canvas { outline: none; }
.maplibregl-ctrl-attrib {
  background: rgba(255, 255, 255, 0.72) !important;
  font-size: 9px !important; line-height: 1.3;
  color: #857C6A; border-radius: 8px 0 0 0;
}
.maplibregl-ctrl-attrib a { color: #6E6552 !important; }

.hud { position: absolute; left: 0; right: 0; z-index: 20; pointer-events: none; padding: 0 12px; }
.hud-top { top: calc(var(--sat) + 10px); display: grid; gap: 8px; }
.hud-bottom { bottom: calc(var(--sab) + 14px); display: grid; gap: 10px; }
.hud-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hud-chips { justify-content: flex-start; flex-wrap: wrap; }

.hud-role {
  background: rgba(21, 26, 36, 0.9); border: 1px solid var(--line);
  border-radius: 10px; padding: 6px 12px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.14em;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hud-role.seeker { color: var(--red); border-color: rgba(255,59,75,0.5); }
.hud-role.hider { color: var(--green); border-color: rgba(61,240,124,0.5); }
.hud-role.renfort { color: var(--amber); border-color: rgba(255,176,32,0.5); }
.hud-timer {
  font-size: 38px; font-weight: 900; letter-spacing: 0.02em;
  color: var(--white);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.9), 0 0 4px rgba(0,0,0,0.9);
}
.hud-timer.danger { color: var(--red); animation: pulseTxt 1s ease-in-out infinite; }
@keyframes pulseTxt { 50% { opacity: 0.55; } }
.hud-code { font-size: 12px; font-weight: 700; color: #545D74; letter-spacing: 0.14em; }

.chip {
  background: rgba(21, 26, 36, 0.9); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px;
  font-size: 14px; font-weight: 800; letter-spacing: 0.06em;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.chip-sonar { color: var(--green); border-color: rgba(61,240,124,0.45); }
.chip-sonar.imminent { color: var(--red); border-color: rgba(255,59,75,0.6); animation: pulseTxt 0.8s ease-in-out infinite; }
.chip-warn { color: var(--amber); border-color: rgba(255,176,32,0.45); }
.chip.oob { color: var(--red); border-color: rgba(255,59,75,0.6); }

.map-fabs {
  position: absolute; right: 12px; bottom: calc(var(--sab) + 120px);
  z-index: 20; display: grid; gap: 10px;
}
.fab {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(21, 26, 36, 0.92); color: var(--white);
  border: 1px solid var(--line); font-size: 20px;
  cursor: pointer;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.fab:active { filter: brightness(1.4); }

.seeker-actions { display: flex; gap: 10px; pointer-events: auto; }
.btn-action { flex: 1; box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.hud-bottom .btn { pointer-events: auto; }

.hide-banner {
  background: rgba(21, 26, 36, 0.92); border: 1px solid rgba(61,240,124,0.5);
  border-radius: 16px; padding: 12px;
  text-align: center;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.hide-banner-title {
  font-size: 18px; font-weight: 900; letter-spacing: 0.2em; color: var(--green);
}
.hide-banner-timer { font-size: 44px; font-weight: 900; line-height: 1.05; }
.mock-hint {
  text-align: center; font-size: 12px; font-weight: 700;
  color: var(--amber); letter-spacing: 0.08em;
  text-shadow: 0 1px 6px rgba(0,0,0,0.9);
}

/* Marqueurs MapLibre (éléments DOM 0×0, enfants centrés) — bulles façon Snap.
   Carte claire → pastilles rondes à bord blanc, ombre douce, étiquette pilule blanche. */
.bub { position: relative; width: 0; height: 0; pointer-events: none; }
.bub-core {
  position: absolute; left: 0; top: 0;
  width: 38px; height: 38px;
  transform: translate(-50%, -50%);
  border-radius: 50%; border: 3px solid var(--white);
  background: #8B93A7; color: var(--white);
  font-size: 17px; font-weight: 800; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 10px rgba(42, 36, 26, 0.30), 0 1px 3px rgba(42, 36, 26, 0.18);
}
.bub-name {
  position: absolute; left: 0; top: 22px; transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95); color: #4C4436;
  border-radius: 999px; padding: 2px 9px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 2px 6px rgba(42, 36, 26, 0.20);
}
.bub-pulse {
  position: absolute; left: -19px; top: -19px;
  width: 38px; height: 38px;
  border-radius: 50%; background: rgba(255, 90, 102, 0.45);
  animation: bubPulse 1.6s ease-out infinite;
}
@keyframes bubPulse { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(2.2); opacity: 0; } }
.bub-seeker .bub-core { background: #FF5A66; font-size: 19px; }
.bub-oob .bub-core { background: #FF5A66; }
.bub-oob .bub-name { color: #C4303E; }
.bub-stale .bub-core { background: #AAB2C2; animation: pulseTxt 1.2s ease-in-out infinite; }
.bub-stale .bub-name::after { content: " · signal perdu"; color: #9A917E; font-weight: 600; }
.bub-neutral .bub-core { background: #FFB020; }
.bub-me .bub-core {
  width: 22px; height: 22px;
  background: var(--blue);
  box-shadow: 0 2px 8px rgba(42, 36, 26, 0.35);
}
.bub-me .bub-pulse { background: rgba(78, 163, 255, 0.4); animation-duration: 2s; }

/* pin de zone (lobby, hôte) — pointe sur la coordonnée (élément 0×0) */
.snap-pin { position: relative; width: 0; height: 0; }
.snap-pin-head {
  position: absolute; left: -17px; top: -41px;
  width: 34px; height: 34px;
  background: var(--green); border: 3px solid var(--white);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 4px 12px rgba(42, 36, 26, 0.35);
  cursor: grab;
}
.snap-pin-dot {
  position: absolute; left: -6px; top: -30px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--green-dark); pointer-events: none;
}

/* Écran bloqué chercheur */
.seeker-lock {
  position: absolute; inset: 0; z-index: 60;
  background: #000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px; padding: 24px; text-align: center;
}
.seeker-lock[hidden] { display: none; }
.lock-top { font-size: 14px; font-weight: 800; letter-spacing: 0.25em; color: var(--muted); }
.lock-countdown {
  font-size: clamp(88px, 28vw, 150px); font-weight: 900; line-height: 1;
  color: var(--white);
}
.lock-countdown.final { color: var(--red); animation: lockBeat 1s ease-in-out infinite; }
@keyframes lockBeat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.07); } }
.lock-rule { font-size: 22px; font-weight: 900; letter-spacing: 0.12em; color: var(--red); line-height: 1.6; }

/* ═══════════ FEUILLES & OVERLAYS ═══════════ */
.sheet {
  position: fixed; inset: 0; z-index: 75;
  background: rgba(4, 6, 10, 0.7);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet[hidden] { display: none; }
.sheet-card {
  width: 100%; max-width: 480px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 20px 20px 0 0;
  padding: 12px 20px calc(var(--sab) + 20px);
  display: grid; gap: 12px;
  max-height: 75vh; overflow-y: auto;
  animation: sheetUp 220ms cubic-bezier(0.2, 0.9, 0.3, 1);
}
.sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto; }
.tag-list { list-style: none; display: grid; gap: 8px; }
.tag-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; min-height: 60px;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 14px;
  color: var(--white); font-family: var(--font);
  font-size: 17px; font-weight: 700; cursor: pointer;
  text-align: left;
}
.tag-item:active { filter: brightness(1.3); }
.tag-item:disabled { opacity: 0.35; pointer-events: none; }
.tag-dist { font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.tag-dist.near { color: var(--green); }

.fullscreen-overlay {
  position: fixed; inset: 0; z-index: 80;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: 28px; text-align: center;
  background: rgba(11, 14, 20, 0.96);
}
.fullscreen-overlay[hidden] { display: none; }
.fullscreen-overlay .btn { max-width: 380px; }
.catch-target { background: rgba(42, 5, 9, 0.97); }
.catch-kicker { font-size: 13px; font-weight: 800; letter-spacing: 0.3em; color: var(--red); }
.catch-title { font-size: 26px; font-weight: 900; line-height: 1.25; max-width: 360px; }
.catch-timer {
  font-size: 92px; font-weight: 900; line-height: 1; color: var(--white);
}
.catch-timer.final { color: var(--red); animation: lockBeat 1s ease-in-out infinite; }
.catch-result { font-size: 20px; font-weight: 800; }
.catch-result.ok { color: var(--green); }
.catch-result.ko { color: var(--red); }
.resume-overlay { background: rgba(11, 14, 20, 0.98); }

/* Flash sonar */
.sonar-flash {
  position: fixed; inset: 0; z-index: 100;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  opacity: 0;
}
.sonar-flash[hidden] { display: none; }
.sonar-flash.on { animation: sonarFlash 1s ease-out; }
@keyframes sonarFlash {
  0% { opacity: 0.95; } 55% { opacity: 0.25; } 100% { opacity: 0; }
}
.sonar-label {
  font-size: 40px; font-weight: 900; letter-spacing: 0.3em;
  color: var(--bg);
}

/* Bannières */
.banner {
  position: fixed; left: 0; right: 0; z-index: 50;
  padding: 12px 16px calc(12px);
  text-align: center; font-size: 15px; font-weight: 800;
  letter-spacing: 0.05em;
  animation: bannerDown 200ms ease-out;
}
.banner[hidden] { display: none; }
@keyframes bannerDown { from { transform: translateY(-110%); } }
.banner-oob {
  top: 0; padding-top: calc(var(--sat) + 12px);
  background: var(--red); color: var(--white);
  font-size: 17px; text-transform: uppercase;
  animation: bannerDown 200ms ease-out, oobThrob 1s ease-in-out infinite;
}
@keyframes oobThrob { 50% { filter: brightness(0.8); } }
.banner-oob span { display: block; font-size: 13px; font-weight: 700; opacity: 0.9; text-transform: none; }
.banner-reconnect {
  top: 0; padding-top: calc(var(--sat) + 10px);
  background: var(--amber); color: #241800;
}
.banner-wakelock {
  bottom: calc(var(--sab) + 84px);
  left: 12px; right: 12px; border-radius: 12px;
  background: var(--amber); color: #241800; font-size: 14px;
}

/* ═══════════ É7 · FIN ═══════════ */
.over-hero {
  padding: 28px 16px 8px; text-align: center; flex-shrink: 0;
}
.over-kicker { font-size: 13px; font-weight: 800; letter-spacing: 0.3em; color: var(--muted); }
.over-winner {
  font-size: clamp(30px, 9vw, 42px); font-weight: 900; line-height: 1.1;
  margin-top: 10px;
}
.over-winner.hiders { color: var(--green); text-shadow: 0 0 30px rgba(61,240,124,0.4); }
.over-winner.seeker { color: var(--red); text-shadow: 0 0 30px rgba(255,59,75,0.4); }
.over-reason { color: var(--muted); font-size: 15px; margin-top: 8px; }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; }
.survivor-chip {
  background: rgba(61, 240, 124, 0.12); color: var(--green);
  border: 1px solid rgba(61, 240, 124, 0.45);
  border-radius: 999px; padding: 8px 16px;
  font-size: 15px; font-weight: 800;
}
.timeline { list-style: none; display: grid; gap: 10px; }
.timeline-item { display: flex; align-items: baseline; gap: 12px; font-size: 15px; }
.timeline-time {
  color: var(--red); font-weight: 800; font-variant-numeric: tabular-nums;
  width: 52px; flex-shrink: 0; text-align: right;
}
.timeline-empty { color: var(--muted); font-size: 14px; }
.advice { font-size: 14px; color: var(--muted); }
.advice strong { color: var(--white); }

/* ═══════════ TOASTS ═══════════ */
.toasts {
  position: fixed; left: 12px; right: 12px;
  bottom: calc(var(--sab) + 16px); z-index: 110;
  display: grid; gap: 8px; pointer-events: none;
}
.toast {
  background: var(--panel-2); color: var(--white);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 16px; font-size: 14px; font-weight: 600;
  text-align: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
  animation: toastIn 200ms ease-out;
}
.toast.err { border-color: rgba(255, 59, 75, 0.6); color: var(--red); }
.toast.ok { border-color: rgba(61, 240, 124, 0.6); color: var(--green); }
.toast.warn { border-color: rgba(255, 176, 32, 0.6); color: var(--amber); }
.toast.out { animation: toastOut 250ms ease-in forwards; }
@keyframes toastIn { from { transform: translateY(14px); opacity: 0; } }
@keyframes toastOut { to { transform: translateY(14px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .radar-sweep, .radar-ring, .bub-pulse { animation-duration: 6s; }
}
