/* ===== Course de canard : Le lac de la Bust ===== */
:root {
  --lake-deep: #061c24;
  --lake: #0d3b44;
  --lake-light: #2c6e73;
  --panel: rgba(6, 24, 30, .72);
  --panel-line: rgba(232, 184, 90, .35);
  --txt: #f3ead6;
  --txt-dim: rgba(243, 234, 214, .62);
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

[hidden] { display: none !important; }

.game-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--lake-deep);
  color: var(--txt);
  overflow: hidden;
}
.game-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.lake-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(4,16,20,.55) 0%, rgba(4,16,20,.15) 45%, transparent 70%);
  transition: opacity .8s;
}
.game-screen.racing .lake-shade { opacity: 0; }

/* ---------- Panneau d'inscription ---------- */
.duck-panel {
  position: absolute;
  top: 50%;
  left: max(24px, env(safe-area-inset-left, 0px));
  transform: translateY(-50%);
  width: min(520px, calc(100% - 32px));
  max-height: calc(100% - 48px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px 26px 22px;
  border-radius: 22px;
  background: var(--panel);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid var(--panel-line);
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
  animation: panelIn .9s cubic-bezier(.2,.8,.2,1) both .2s;
}
@keyframes panelIn { from { opacity: 0; transform: translate(-24px, -50%); } to { opacity: 1; transform: translate(0, -50%); } }

.dp-kicker {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--gold);
}
.dp-title {
  font-family: 'Cinzel', serif;
  font-weight: 900;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  line-height: 1.1;
  text-transform: uppercase;
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 60%, var(--gold-dark));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-top: 4px;
}
.dp-hint { color: var(--txt-dim); font-size: .9rem; margin-top: 6px; line-height: 1.45; }
kbd {
  font-family: var(--mono); font-size: .78rem;
  padding: 1px 6px; border-radius: 5px;
  border: 1px solid rgba(243,234,214,.35); background: rgba(255,255,255,.06);
}

.dp-entry { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.dp-form { display: flex; gap: 8px; flex: 1 1 220px; min-width: 0; }
.dp-input {
  flex: 1; min-width: 0;
  font: inherit; font-size: 1rem;
  color: var(--txt);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(243,234,214,.22);
  background: rgba(0,0,0,.28);
  transition: border-color .2s, background .2s;
}
.dp-input::placeholder { color: rgba(243,234,214,.4); }
.dp-input:focus { outline: none; border-color: var(--gold); background: rgba(0,0,0,.4); }
.dp-num { flex: 0 0 76px; text-align: center; font-family: var(--mono); }
.dp-num::-webkit-inner-spin-button { opacity: .4; }
.dp-add {
  flex: 0 0 46px;
  border-radius: 12px;
  font-size: 1.4rem; font-weight: 700;
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 60%, var(--gold-dark));
}

.dp-mode {
  display: flex; flex-direction: column; gap: 6px;
  flex: 0 0 auto;
}
.mode-btn {
  font-size: .8rem; font-weight: 600;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid rgba(243,234,214,.18);
  color: var(--txt-dim);
  background: rgba(0,0,0,.2);
  text-align: left;
  transition: all .2s;
}
.mode-btn.on { color: var(--ink); background: var(--gold); border-color: var(--gold); }
.mode-btn:not(.on):hover { color: var(--txt); border-color: rgba(232,184,90,.6); }

.dp-msg { min-height: 1.1em; font-size: .85rem; color: #ffb38a; margin-top: -6px; }

.dp-list-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .82rem; color: var(--txt-dim);
  font-variant-numeric: tabular-nums;
}
.dp-link { color: var(--txt-dim); font-size: .8rem; text-decoration: underline; text-underline-offset: 3px; }
.dp-link:hover { color: var(--gold-light); }

.dp-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  overflow-y: auto;
  min-height: 60px;
  max-height: 36vh;
  padding-right: 4px;
}
.dp-list:empty::before {
  content: "Aucun canard pour l'instant. Ajoute le premier pseudo ci-dessus.";
  grid-column: 1 / -1;
  color: var(--txt-dim); font-size: .85rem;
  padding: 16px; border: 1px dashed rgba(243,234,214,.2); border-radius: 12px; text-align: center;
}
.dp-list li {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 6px 6px 6px;
  border-radius: 10px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.06);
  animation: chipIn .35s cubic-bezier(.2,.8,.2,1) both;
  min-width: 0;
}
@keyframes chipIn { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
.chip-num {
  flex: 0 0 auto;
  min-width: 34px; height: 28px;
  display: grid; place-items: center;
  border-radius: 8px;
  font-family: var(--mono); font-weight: 600; font-size: .85rem;
  color: #fff;
  background: var(--c, #888);
  text-shadow: 0 1px 2px rgba(0,0,0,.4);
}
input.chip-num {
  width: 46px; border: none; text-align: center; padding: 0;
  -moz-appearance: textfield;
}
input.chip-num::-webkit-inner-spin-button, input.chip-num::-webkit-outer-spin-button { -webkit-appearance: none; }
.chip-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; font-size: .92rem; }
.chip-del {
  flex: 0 0 24px; height: 24px; border-radius: 6px;
  color: var(--txt-dim); font-size: 1rem; line-height: 1;
}
.chip-del:hover { color: #fff; background: rgba(255,90,60,.35); }

.dp-actions { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; margin-top: 4px; }
.btn-gold, .btn-ghost {
  font-family: 'Cinzel', serif; font-weight: 700;
  letter-spacing: .08em;
  padding: 12px 22px;
  border-radius: 999px;
  transition: transform .2s, box-shadow .2s, opacity .2s, background .2s;
}
.btn-gold {
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold-light), var(--gold) 55%, var(--gold-dark));
  box-shadow: 0 8px 30px rgba(232,184,90,.3);
}
.btn-gold:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(232,184,90,.5); }
.btn-gold:disabled { opacity: .4; cursor: not-allowed; }
.btn-ghost {
  color: var(--txt);
  border: 1px solid rgba(243,234,214,.3);
  background: rgba(0,0,0,.25);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-light); }
.btn-ghost.sm, .btn-gold.sm { padding: 8px 14px; font-size: .78rem; }

/* ---------- HUD de course ---------- */
.hud { position: absolute; inset: 0; pointer-events: none; }
.hud button { pointer-events: auto; }

.hud-top {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top, 0px));
  left: 50%; transform: translateX(-50%);
  width: min(560px, calc(100% - 32px));
  text-align: center;
  padding: 10px 18px 12px;
  border-radius: 16px;
  background: var(--panel);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--panel-line);
}
.hud-title {
  font-family: 'Cinzel', serif; font-weight: 900; letter-spacing: .12em;
  text-transform: uppercase; font-size: 1rem; color: var(--gold-light);
}
.hud-progress {
  position: relative; height: 6px; margin: 8px 22px 6px 0;
  border-radius: 6px; background: rgba(255,255,255,.12);
}
.hud-bar {
  position: absolute; inset: 0 auto 0 0; width: 0%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
  box-shadow: 0 0 12px rgba(232,184,90,.6);
}
.hud-flag { position: absolute; right: -22px; top: -9px; font-size: .95rem; }
.hud-info { font-family: var(--mono); font-size: .8rem; color: var(--txt-dim); font-variant-numeric: tabular-nums; }

.hud-rank {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top, 0px));
  left: max(16px, env(safe-area-inset-left, 0px));
  width: 230px;
  padding: 10px 10px 8px;
  border-radius: 14px;
  background: var(--panel);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--panel-line);
}
.hud-rank-head { font-family: 'Cinzel', serif; font-weight: 700; font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin: 0 4px 6px; }
.hud-ranklist { list-style: none; display: flex; flex-direction: column; gap: 3px; }
.hud-ranklist li {
  display: flex; align-items: center; gap: 8px;
  font-size: .85rem; padding: 3px 4px; border-radius: 7px;
  font-variant-numeric: tabular-nums;
}
.hud-ranklist li:first-child { background: rgba(232,184,90,.16); }
.hud-ranklist .r { width: 18px; text-align: right; font-family: var(--mono); color: var(--txt-dim); font-size: .78rem; }
.hud-ranklist .n { min-width: 28px; height: 20px; display: grid; place-items: center; border-radius: 6px; font-family: var(--mono); font-size: .74rem; font-weight: 600; background: var(--c); color: #fff; }
.hud-ranklist .p { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud-ranklist .more { color: var(--txt-dim); font-size: .75rem; justify-content: center; }

.hud-console {
  position: absolute;
  left: max(16px, env(safe-area-inset-left, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  width: min(440px, calc(100% - 32px));
  border-radius: 14px;
  background: rgba(3, 12, 15, .78);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(120, 220, 200, .22);
  font-family: var(--mono);
  overflow: hidden;
}
.console-head {
  display: flex; align-items: center; gap: 8px;
  font-size: .7rem; letter-spacing: .18em; text-transform: uppercase;
  color: #8fe3cf;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(120,220,200,.15);
}
.console-head .dot { width: 7px; height: 7px; border-radius: 50%; background: #45e0a8; box-shadow: 0 0 8px #45e0a8; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .3; } }
.console-log {
  height: 150px; overflow-y: auto;
  padding: 8px 12px 10px;
  display: flex; flex-direction: column; gap: 4px;
  font-size: .78rem; line-height: 1.4;
}
.console-log p { color: #d6efe6; animation: lineIn .3s ease both; }
.console-log p .t { color: #5fae9a; margin-right: 8px; }
.console-log p.big { color: var(--gold-light); font-weight: 600; }
@keyframes lineIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }

.hud-btns {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
}

/* ---------- Compte à rebours ---------- */
.countdown {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  pointer-events: none;
  font-family: 'Cinzel', serif; font-weight: 900;
  font-size: clamp(4rem, 16vw, 11rem);
  color: var(--gold-light);
  text-shadow: 0 6px 40px rgba(0,0,0,.55), 0 0 30px rgba(232,184,90,.5);
}
.countdown span { animation: cd 1s cubic-bezier(.2,.8,.2,1) both; }
@keyframes cd {
  0% { opacity: 0; transform: scale(1.8); }
  25% { opacity: 1; transform: scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: scale(.85); }
}

/* ---------- Résultats (panneau latéral : le podium 3D reste visible) ---------- */
.results {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: flex-end;
  padding: 16px max(16px, env(safe-area-inset-right, 0px)) 16px 16px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 45%, rgba(3,12,15,.5));
  animation: fadeIn .8s ease both;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.res-card {
  pointer-events: auto;
  width: min(380px, 100%);
  max-height: calc(100% - 16px);
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px;
  padding: 22px;
  border-radius: 22px;
  background: var(--panel);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--panel-line);
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
  animation: slideIn .8s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
.podium { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.pod {
  display: flex; align-items: center; gap: 10px; min-width: 0;
  padding: 8px 10px; border-radius: 12px;
  background: rgba(255,255,255,.05);
  animation: rise .6s cubic-bezier(.2,.8,.2,1) both;
}
.pod.p1 { background: linear-gradient(90deg, rgba(232,184,90,.32), rgba(232,184,90,.08)); border: 1px solid rgba(232,184,90,.5); padding: 12px 10px; }
.pod.p2 { animation-delay: .12s; }
.pod.p3 { animation-delay: .24s; }
.pod .medal { font-size: 1.5rem; }
.pod.p1 .medal { font-size: 1.9rem; }
.pod .num { font-family: var(--mono); font-size: .78rem; padding: 2px 7px; border-radius: 6px; background: var(--c); color: #fff; }
.pod .who { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod.p1 .who { font-size: 1.15rem; color: var(--gold-light); }
.pod .time { font-family: var(--mono); font-size: .78rem; color: var(--txt-dim); }

.full-rank {
  list-style: none;
  display: flex; flex-direction: column; gap: 3px;
  max-height: 24vh; overflow-y: auto;
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
}
.full-rank:empty { display: none; }
.full-rank li { display: flex; gap: 8px; align-items: center; padding: 4px 8px; border-radius: 8px; background: rgba(255,255,255,.03); min-width: 0; }
.full-rank .r { width: 26px; font-family: var(--mono); color: var(--txt-dim); }
.full-rank .n { min-width: 30px; text-align: center; font-family: var(--mono); font-size: .75rem; border-radius: 6px; background: var(--c); color: #fff; padding: 1px 4px; }
.full-rank .p { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.full-rank .tm { font-family: var(--mono); font-size: .75rem; color: var(--txt-dim); }
.res-card .dp-actions { flex-wrap: wrap; }
.res-card .dp-actions button { flex: 1 1 auto; padding: 10px 14px; font-size: .82rem; }
.res-card .dp-actions .btn-gold { flex-basis: 100%; order: -1; font-size: 1rem; padding: 12px; }

/* ---------- Transition ondulation ---------- */
#ripple {
  position: fixed; inset: 0; z-index: 80;
  pointer-events: none;
  visibility: hidden;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), var(--lake-light) 0%, var(--lake) 30%, var(--lake-deep) 75%);
  clip-path: circle(0px at var(--x, 50%) var(--y, 50%));
}
#ripple.grow {
  visibility: visible;
  animation: rippleGrow 1.5s cubic-bezier(.65,0,.35,1) forwards;
}
#ripple.fade {
  visibility: visible;
  clip-path: circle(160vmax at var(--x, 50%) var(--y, 50%));
  animation: rippleFade 1.2s ease forwards;
}
@keyframes rippleGrow {
  from { clip-path: circle(0px at var(--x, 50%) var(--y, 50%)); }
  to   { clip-path: circle(160vmax at var(--x, 50%) var(--y, 50%)); }
}
@keyframes rippleFade { from { opacity: 1; } to { opacity: 0; } }
#ripple i {
  position: absolute;
  left: var(--x, 50%); top: var(--y, 50%);
  width: 40px; height: 40px;
  margin: -20px 0 0 -20px;
  border-radius: 50%;
  border: 2px solid rgba(190, 240, 235, .55);
  opacity: 0;
}
#ripple.grow i { animation: ring 1.6s ease-out forwards; }
#ripple.grow i:nth-child(2) { animation-delay: .22s; }
#ripple.grow i:nth-child(3) { animation-delay: .44s; }
@keyframes ring {
  0%   { opacity: .9; transform: scale(.4); }
  100% { opacity: 0; transform: scale(28); }
}

/* Voile doux pour le retour à l'accueil */
#veil {
  position: fixed; inset: 0; z-index: 80; pointer-events: none;
  background: #050403; opacity: 0; transition: opacity .7s ease;
}
#veil.on { opacity: 1; pointer-events: auto; }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .lake-shade { background: linear-gradient(0deg, rgba(4,16,20,.6) 0%, rgba(4,16,20,.1) 60%); }
  .duck-panel {
    top: auto; bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    left: 50%; transform: translateX(-50%);
    padding: 18px 16px 16px;
    max-height: 72%;
    animation: none;
  }
  .dp-mode { flex-direction: row; flex: 1 1 100%; }
  .mode-btn { flex: 1; text-align: center; }
  .dp-list { grid-template-columns: minmax(0, 1fr); max-height: 22vh; }
  .hud-rank { width: 168px; top: calc(118px + env(safe-area-inset-top, 0px)); }
  .hud-ranklist li:nth-child(n+6):not(.more) { display: none; }
  .hud-top { top: calc(10px + env(safe-area-inset-top, 0px)); }
  .hud-btns { top: auto; bottom: calc(150px + env(safe-area-inset-bottom, 0px)); flex-direction: row; }
  .console-log { height: 96px; }
  .results { align-items: flex-end; justify-content: center; background: linear-gradient(0deg, rgba(3,12,15,.55), transparent 55%); }
  .res-card { width: 100%; max-height: 58%; padding: 16px; }
  .full-rank { max-height: 14vh; }
}

/* ---------- Sélecteur de caméra ---------- */
.cam-switch {
  display: flex; gap: 2px; padding: 3px;
  border-radius: 999px;
  background: var(--panel);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--panel-line);
}
.cam-switch button {
  font-size: .78rem; font-weight: 600;
  padding: 7px 12px; border-radius: 999px;
  color: var(--txt-dim);
  transition: background .2s, color .2s;
}
.cam-switch button:hover { color: var(--txt); }
.cam-switch button.on { background: var(--gold); color: var(--ink); }

/* ---------- Vidéo de la course ---------- */
.video-box { display: flex; flex-direction: column; gap: 4px; }
.btn-video {
  font-weight: 700; font-size: .9rem;
  padding: 11px 14px; border-radius: 12px;
  color: var(--txt);
  background: rgba(120, 220, 200, .12);
  border: 1px solid rgba(120, 220, 200, .4);
  transition: background .2s, opacity .2s;
}
.btn-video:hover:not(:disabled) { background: rgba(120, 220, 200, .24); }
.btn-video:disabled { opacity: .6; cursor: progress; }
.video-msg { font-size: .76rem; color: var(--txt-dim); min-height: 1em; }

/* ---------- Only Up : extras ---------- */
.ou-shade { background: linear-gradient(90deg, rgba(10,24,48,.5) 0%, rgba(10,24,48,.12) 45%, transparent 70%); }
.chip-sex {
  flex: 0 0 26px; height: 26px; border-radius: 7px;
  font-size: .95rem; font-weight: 700;
  background: rgba(255,255,255,.08); color: var(--txt);
}
.chip-sex.f { color: #ff9fcf; }
.chip-sex.m { color: #8cc8ff; }
.fallen-head { margin-top: 10px !important; color: #ff9b8a !important; }
.fallen-list li { opacity: .75; }
.fallen-list li .p { text-decoration: line-through; text-decoration-color: rgba(255,155,138,.6); }
.fall-toast {
  position: absolute; left: 50%; top: 32%;
  transform: translate(-50%, -50%) scale(.9);
  padding: 14px 26px; border-radius: 16px;
  font-family: 'Cinzel', serif; font-weight: 900; font-size: clamp(1.1rem, 3vw, 1.8rem);
  color: #fff; text-align: center;
  background: rgba(150, 20, 20, .82);
  border: 1px solid rgba(255,180,160,.6);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
  max-width: calc(100% - 32px);
}
.fall-toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.fall-toast small { display: block; font-family: 'Inter', sans-serif; font-weight: 600; font-size: .8rem; opacity: .85; margin-top: 4px; }

/* Transition "ascension" */
#skyrise {
  position: fixed; inset: 0; z-index: 80; pointer-events: none;
  visibility: hidden; overflow: hidden;
  background: linear-gradient(180deg, #1d3d7a 0%, #4f86c6 45%, #a9d2f0 80%, #f7e2b8 100%);
  transform: translateY(100%);
}
#skyrise.go { visibility: visible; animation: srUp 1.1s cubic-bezier(.7,0,.3,1) forwards; }
#skyrise.out { visibility: visible; transform: none; animation: srOut 1s ease forwards; }
@keyframes srUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes srOut { from { opacity: 1; } to { opacity: 0; } }
.sr-clouds { position: absolute; inset: -50% 0; }
.sr-clouds i {
  position: absolute; border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,.95) 0%, rgba(255,255,255,.6) 45%, rgba(255,255,255,0) 70%);
  animation: cloudDown 1.4s linear infinite;
}
@keyframes cloudDown { from { transform: translateY(-60vh); } to { transform: translateY(160vh); } }
.sr-label {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-family: 'Cinzel', serif; font-weight: 900; letter-spacing: .25em;
  font-size: clamp(2.4rem, 9vw, 6rem);
  color: #fff; text-shadow: 0 6px 30px rgba(20,40,90,.5);
  opacity: 0;
}
#skyrise.go .sr-label { animation: srLabel 1.9s ease .5s forwards; }
@keyframes srLabel { 0% { opacity: 0; transform: translate(-50%, -30%); } 40% { opacity: 1; transform: translate(-50%, -50%); } 100% { opacity: 1; transform: translate(-50%, -60%); } }

@media (max-width: 760px) {
  .cam-switch button { padding: 6px 9px; font-size: .72rem; }
  .ou-shade { background: linear-gradient(0deg, rgba(10,24,48,.55) 0%, rgba(10,24,48,.1) 60%); }
}

/* ---------- 100 m ---------- */
.sp-shade { background: linear-gradient(90deg, rgba(20,8,6,.55) 0%, rgba(20,8,6,.12) 45%, transparent 70%); }
.sp-top { padding-bottom: 10px; }
.sp-round { font-size: .78rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-top: 2px; font-weight: 700; }
.sp-clock {
  font-family: var(--mono); font-weight: 600; font-size: 1.9rem; color: #ffd84d;
  text-shadow: 0 0 12px rgba(255,200,60,.4); font-variant-numeric: tabular-nums; margin-top: 2px;
}
.sp-call {
  position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%);
  font-family: 'Cinzel', serif; font-weight: 900; font-size: clamp(1.6rem, 5vw, 3.4rem);
  color: #fff; text-shadow: 0 6px 30px rgba(0,0,0,.6); letter-spacing: .06em;
  opacity: 0; transition: opacity .25s; pointer-events: none; text-align: center; white-space: nowrap;
}
.sp-call.show { opacity: 1; }
.sp-lower {
  position: absolute; left: max(16px, env(safe-area-inset-left, 0px)); bottom: calc(40px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: stretch; gap: 0; border-radius: 10px; overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
  opacity: 0; transform: translateX(-30px); transition: opacity .35s, transform .35s; pointer-events: none;
  max-width: calc(100% - 32px);
}
.sp-lower.show { opacity: 1; transform: none; }
.sp-lower .ln { background: var(--gold); color: var(--ink); font-family: 'Cinzel', serif; font-weight: 900; font-size: 2.4rem; padding: 10px 18px; display: grid; place-items: center; }
.sp-lower .who { background: rgba(10,10,14,.88); padding: 10px 22px 12px; min-width: 0; }
.sp-lower .who b { display: block; font-family: 'Cinzel', serif; font-weight: 900; font-size: clamp(1.3rem, 3.4vw, 2.3rem); color: #fff; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-lower .who span { font-size: .85rem; color: var(--gold-light); letter-spacing: .12em; text-transform: uppercase; }
.sp-board {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(560px, calc(100% - 32px)); max-height: calc(100% - 140px); overflow-y: auto;
  border-radius: 18px; padding: 16px 18px;
  background: rgba(10,12,18,.9); border: 1px solid var(--panel-line);
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
  animation: fadeIn .4s ease both; pointer-events: auto;
}
.sp-board h3 { font-family: 'Cinzel', serif; font-weight: 900; color: var(--gold-light); letter-spacing: .08em; font-size: 1.1rem; }
.sp-board p.sub { color: var(--txt-dim); font-size: .8rem; margin: 2px 0 10px; }
.sp-board table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.sp-board td { padding: 6px 6px; border-top: 1px solid rgba(255,255,255,.06); font-size: .92rem; }
.sp-board td.pl { width: 28px; color: var(--txt-dim); font-family: var(--mono); }
.sp-board td.ln { width: 34px; font-family: var(--mono); color: var(--txt-dim); }
.sp-board td.nm { font-weight: 600; }
.sp-board td.nm i { font-style: normal; display: inline-block; min-width: 30px; text-align: center; padding: 1px 5px; border-radius: 5px; background: var(--c); color: #fff; font-family: var(--mono); font-size: .75rem; margin-right: 8px; }
.sp-board td.tm { text-align: right; font-family: var(--mono); color: #ffd84d; }
.sp-board td.mk { width: 30px; text-align: center; }
.sp-board .Q, .sp-board .q { display: inline-block; min-width: 22px; padding: 1px 6px; border-radius: 6px; font-weight: 800; font-size: .8rem; }
.sp-board .Q { background: #2a9d8f; color: #fff; }
.sp-board .q { background: rgba(42,157,143,.25); color: #8fe3cf; border: 1px solid #2a9d8f; }
.sp-board tr.out td { opacity: .55; }
.sp-board tr { animation: rowIn .35s ease both; }
@keyframes rowIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.sp-board .go { margin-top: 12px; width: 100%; }

/* Transition piste */
#trackwipe {
  position: fixed; inset: 0; z-index: 80; pointer-events: none; visibility: hidden; overflow: hidden;
  background: #b5472f;
}
#trackwipe .tw-lanes {
  position: absolute; inset: -20% -40%;
  background: repeating-linear-gradient(0deg, transparent 0 86px, rgba(255,255,255,.95) 86px 92px);
  transform: skewY(-8deg);
}
#trackwipe .tw-text {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-family: 'Cinzel', serif; font-weight: 900; font-style: italic; text-align: center;
  font-size: clamp(2rem, 7vw, 5rem); line-height: 1.05; color: #fff; letter-spacing: .04em;
  text-shadow: 0 8px 30px rgba(60,10,0,.5); white-space: nowrap; opacity: 0;
}
#trackwipe .tw-text small { display: block; font-size: .28em; letter-spacing: .4em; font-style: normal; color: #ffe39a; margin-bottom: .5em; }
#trackwipe.go { visibility: visible; animation: twIn .9s cubic-bezier(.7,0,.3,1) forwards; }
#trackwipe.go .tw-lanes { animation: twLanes 2.6s linear forwards; }
#trackwipe.go .tw-text { animation: twText 2.6s cubic-bezier(.2,.8,.2,1) .5s forwards; }
#trackwipe.out { visibility: visible; clip-path: inset(0); animation: twOut .9s ease forwards; }
@keyframes twIn { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
@keyframes twLanes { from { transform: skewY(-8deg) translateX(30%); } to { transform: skewY(-8deg) translateX(-30%); } }
@keyframes twText { 0% { opacity: 0; transform: translate(-80%, -50%) skewX(-12deg); filter: blur(8px); } 35% { opacity: 1; transform: translate(-50%, -50%) skewX(-6deg); filter: blur(0); } 100% { opacity: 1; transform: translate(-46%, -50%) skewX(-6deg); } }
@keyframes twOut { from { opacity: 1; } to { opacity: 0; } }

@media (max-width: 760px) {
  .sp-lower .ln { font-size: 1.6rem; padding: 8px 12px; }
  .sp-clock { font-size: 1.4rem; }
}
#spList:empty::before { content: "Aucun sprinteur pour l'instant. Ajoute le premier pseudo ci-dessus."; }
#ouList:empty::before { content: "Aucun grimpeur pour l'instant. Ajoute le premier pseudo ci-dessus."; }

/* ---------- Natation ---------- */
.sw-shade { background: linear-gradient(90deg, rgba(4,20,34,.55) 0%, rgba(4,20,34,.12) 45%, transparent 70%); }
#swList:empty::before { content: "Aucun nageur pour l'instant. Ajoute le premier pseudo ci-dessus."; }
#poolwipe {
  position: fixed; inset: 0; z-index: 80; pointer-events: none; visibility: hidden; overflow: hidden;
  background: #04263d;
}
#poolwipe .pw-water {
  position: absolute; left: -10%; right: -10%; bottom: -10%; height: 130%;
  background:
    radial-gradient(120% 40% at 50% 0%, rgba(255,255,255,.35), transparent 60%),
    linear-gradient(180deg, #4fd1ec 0%, #1690c4 35%, #0a4f7a 75%, #04263d 100%);
  border-radius: 45% 55% 0 0 / 6% 6% 0 0;
  transform: translateY(100%);
}
#poolwipe .pw-bubbles i {
  position: absolute; bottom: -40px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.7); background: rgba(255,255,255,.12);
  animation: bubbleUp 2.2s ease-in infinite;
}
@keyframes bubbleUp { from { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } to { transform: translateY(-115vh); opacity: 0; } }
#poolwipe .pw-text {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-family: 'Cinzel', serif; font-weight: 900; text-align: center; white-space: nowrap;
  font-size: clamp(2rem, 7vw, 5rem); line-height: 1.05; color: #fff; letter-spacing: .04em;
  text-shadow: 0 8px 30px rgba(0,30,60,.6); opacity: 0;
}
#poolwipe .pw-text small { display: block; font-size: .28em; letter-spacing: .4em; color: #bff3ff; margin-bottom: .5em; }
#poolwipe.go { visibility: visible; }
#poolwipe.go .pw-water { animation: pwRise 1.3s cubic-bezier(.6,0,.3,1) forwards; }
#poolwipe.go .pw-text { animation: pwText 2.4s ease .7s forwards; }
#poolwipe.out { visibility: visible; animation: twOut .9s ease forwards; }
#poolwipe.out .pw-water { transform: none; }
#poolwipe.out .pw-text { opacity: 1; }
@keyframes pwRise { to { transform: translateY(0); } }
@keyframes pwText { 0% { opacity: 0; transform: translate(-50%, -30%); filter: blur(6px); } 35% { opacity: 1; transform: translate(-50%, -50%); filter: blur(0); } 100% { opacity: 1; transform: translate(-50%, -54%); } }

/* ---------- 1, 2, 3, j'ai bust ! ---------- */
.sl-shade { background: linear-gradient(90deg, rgba(40,20,4,.5) 0%, rgba(40,20,4,.1) 45%, transparent 70%); }
#slList:empty::before { content: "Aucun joueur pour l'instant. Ajoute au moins 2 pseudos."; }
.sl-start {
  position: absolute; left: 50%; bottom: calc(40px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  pointer-events: auto; font-size: 1.15rem; padding: 16px 34px;
  animation: pulse 1.8s ease-in-out infinite;
}
#eyeswipe { position: fixed; inset: 0; z-index: 80; pointer-events: none; visibility: hidden; background: #050303; }
#eyeswipe .ew-eyes { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); display: flex; gap: 90px; }
#eyeswipe .ew-eyes i {
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #fff 0 8%, #ff2a2a 14%, #b30000 45%, #3a0000 70%, transparent 72%);
  box-shadow: 0 0 60px 20px rgba(255,0,0,.5);
  transform: scaleY(0);
}
#eyeswipe .ew-text {
  position: absolute; left: 50%; top: 66%; transform: translate(-50%, -50%);
  font-family: 'Cinzel', serif; font-weight: 900; text-align: center; color: #f3e6d0; white-space: nowrap;
  font-size: clamp(1.4rem, 4.5vw, 3rem); line-height: 1.1; letter-spacing: .06em; opacity: 0;
}
#eyeswipe .ew-text b { display: block; color: #ff3b3b; font-size: 1.5em; text-shadow: 0 0 30px rgba(255,0,0,.6); }
#eyeswipe.go { visibility: visible; animation: fadeIn .4s ease both; }
#eyeswipe.go .ew-eyes i { animation: eyeOpen .5s cubic-bezier(.2,.8,.2,1) 1.1s forwards; }
#eyeswipe.go .ew-text { animation: fadeIn .6s ease .3s forwards; }
#eyeswipe.out { visibility: visible; animation: twOut .9s ease forwards; }
#eyeswipe.out .ew-eyes i { transform: scaleY(1); }
#eyeswipe.out .ew-text { opacity: 1; }
@keyframes eyeOpen { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@media (max-width: 760px) { #eyeswipe .ew-eyes { gap: 40px; } #eyeswipe .ew-eyes i { width: 70px; height: 70px; } }
.game-screen.scan::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 50%, rgba(255,0,0,.28)); animation: blink .5s infinite; }
/* 1, 2, 3 : bouton stable, console en haut à droite */
.sl-start { left: 0; right: 0; margin: 0 auto; width: max-content; transform: none; }
.sl-start:hover:not(:disabled) { transform: translateY(-2px); }
#sl .hud-console { left: auto; bottom: auto; right: max(16px, env(safe-area-inset-right, 0px)); top: calc(110px + env(safe-area-inset-top, 0px)); width: min(340px, calc(100% - 32px)); }
#sl .hud-console .console-log { height: 118px; }
@media (max-width: 760px) { #sl .hud-console { top: auto; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); } #sl .hud-console .console-log { height: 70px; } }

/* ---------- Hunger Bust ---------- */
.hb-shade { background: linear-gradient(90deg, rgba(8,6,2,.65) 0%, rgba(8,6,2,.2) 45%, transparent 70%); }
#hbList:empty::before { content: "Aucun tribut pour l'instant. Ajoute au moins 2 pseudos."; }
.hb-head { text-align: center; }
.hb-title {
  font-family: 'Cinzel', serif; font-weight: 900; font-size: clamp(2.2rem, 6vw, 3.6rem); letter-spacing: .08em; line-height: 1;
  background: linear-gradient(180deg, #fff6d8 0%, #e8b85a 38%, #8a5a14 52%, #f3d48a 68%, #9a6b1f 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.6));
}
.hb-sub { font-family: 'Cinzel', serif; font-weight: 700; letter-spacing: .6em; color: #d9c08a; margin-top: 6px; font-size: .95rem; }
.hb-tag { font-style: italic; color: var(--txt-dim); margin-top: 6px; }
.hb-top {
  position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 18px; padding: 8px 18px; border-radius: 14px;
  background: rgba(10,8,4,.78); border: 1px solid rgba(232,184,90,.45); white-space: nowrap;
}
.hb-logo { font-family: 'Cinzel', serif; font-weight: 900; letter-spacing: .12em; color: #e8b85a; }
.hb-clock { font-family: var(--mono); font-weight: 600; color: #fff1c9; font-size: 1.2rem; }
.hb-alive { font-size: .85rem; color: var(--txt); }
.hb-btns { top: calc(70px + env(safe-area-inset-top, 0px)); }
.hb-feed {
  position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); top: calc(170px + env(safe-area-inset-top, 0px));
  width: min(380px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 6px; pointer-events: none;
}
.hb-feed p {
  padding: 7px 12px; border-radius: 10px; font-size: .85rem; line-height: 1.35;
  background: rgba(10,8,4,.78); border-left: 3px solid #c1121f; color: #f3ead6;
  animation: lineIn .35s ease both;
}
.hb-feed p.env { border-left-color: #e8b85a; }
.hb-banner {
  position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%) scale(.95);
  padding: 14px 30px; border-radius: 6px; text-align: center; max-width: calc(100% - 32px);
  font-family: 'Cinzel', serif; font-weight: 900; letter-spacing: .1em; font-size: clamp(1.2rem, 3.4vw, 2.2rem); color: #fff1c9;
  background: linear-gradient(90deg, transparent, rgba(10,8,4,.88) 15%, rgba(10,8,4,.88) 85%, transparent);
  border-top: 1px solid rgba(232,184,90,.6); border-bottom: 1px solid rgba(232,184,90,.6);
  opacity: 0; transition: opacity .35s, transform .35s; pointer-events: none;
}
.hb-banner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.hb-banner.warn { color: #ffb347; }
.hb-count {
  position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); pointer-events: none;
  font-family: 'Cinzel', serif; font-weight: 900; font-size: clamp(4rem, 18vw, 12rem); color: #fff1c9;
  text-shadow: 0 0 40px rgba(232,184,90,.6), 0 8px 30px rgba(0,0,0,.6);
}
.hb-bars i { position: absolute; left: 0; right: 0; height: 0; background: #000; transition: height .5s ease; z-index: 3; }
.hb-bars i:first-child { top: 0; } .hb-bars i:last-child { bottom: 0; }
.hb-bars.on i { height: 12vh; }
.hb-scope {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 2;
  background: radial-gradient(circle at 50% 50%, transparent 0 30vmin, #000 30.4vmin);
}
.hb-scope.on { opacity: 1; }
.hb-scope .ret {
  position: absolute; left: 50%; top: 50%; width: 60vmin; height: 60vmin; transform: translate(-50%, -50%);
  background:
    linear-gradient(#000, #000) center / 2px 100% no-repeat,
    linear-gradient(#000, #000) center / 100% 2px no-repeat;
  border-radius: 50%;
}
.hb-scope .ret::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px; border-radius: 50%; background: #e11d48; box-shadow: 0 0 8px #e11d48; }
.hb-killtext {
  position: absolute; left: 50%; bottom: 15vh; transform: translateX(-50%); z-index: 4; pointer-events: none;
  font-family: 'Cinzel', serif; font-weight: 900; font-size: clamp(1rem, 2.8vw, 1.8rem); color: #fff; text-align: center;
  text-shadow: 0 4px 20px rgba(0,0,0,.8); opacity: 0; transition: opacity .3s; white-space: nowrap; max-width: calc(100% - 32px);
}
.hb-killtext.show { opacity: 1; }
.hb-end { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; background: radial-gradient(ellipse at center, rgba(10,8,4,.35), rgba(10,8,4,.8)); animation: fadeIn .8s ease both; }
.hb-end-card {
  width: min(560px, 100%); max-height: calc(100% - 16px); overflow-y: auto; text-align: center;
  display: flex; flex-direction: column; gap: 10px; padding: 24px;
  background: rgba(14,10,4,.9); border: 1px solid rgba(232,184,90,.55); border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.6);
}
.hb-crown { font-size: 3rem; animation: rise .8s ease both; }
.hb-win-k { font-family: 'Cinzel', serif; font-weight: 700; letter-spacing: .14em; color: #e8b85a; font-size: .95rem; }
.hb-win-name { font-family: 'Cinzel', serif; font-weight: 900; font-size: clamp(2rem, 6vw, 3.2rem); background: linear-gradient(180deg, #fff6d8, #e8b85a 50%, #9a6b1f); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hb-win-sub { color: var(--txt-dim); font-style: italic; }
.hb-stats { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.hb-stats div { padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.06); font-size: .85rem; }
.hb-stats b { color: #ffd77a; }
.hb-deaths { text-align: left; max-height: 30vh; }
@media (max-width: 760px) {
  .hb-top { gap: 8px; padding: 6px 10px; font-size: .8rem; }
  .hb-logo { display: none; }
  .hb-feed { top: auto; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .hb-feed p:nth-child(-n+2) { display: none; }
}

/* 100 m / natation : titre de course moderne, placé haut, au-dessus des pseudos */
#sp .sp-call, #sw .sp-call {
  top: 21%; font-family: 'Inter', system-ui, sans-serif; font-weight: 900; font-style: italic; text-transform: uppercase;
  letter-spacing: .08em; font-size: clamp(1.2rem, 3.6vw, 2.4rem); color: #fff;
  padding: 10px 26px 10px 22px; border-radius: 6px;
  background: linear-gradient(100deg, rgba(232,184,90,.95) 0 10px, rgba(12,14,22,.88) 10px 100%);
  box-shadow: 0 14px 40px rgba(0,0,0,.45); text-shadow: none;
  border-right: 4px solid #e8b85a;
}
#sp .sp-call.show, #sw .sp-call.show { animation: callIn .45s cubic-bezier(.2,.8,.2,1) both; }
@keyframes callIn { from { opacity: 0; transform: translate(-60%, -50%) skewX(-8deg); } to { opacity: 1; transform: translate(-50%, -50%); } }
#sp .sp-clock { font-size: 1.35rem; }
#sp .hud-top { padding-bottom: 6px; }

/* ---------- Bust Rumble ---------- */
.br-shade { background: linear-gradient(90deg, rgba(4,2,2,.72) 0%, rgba(4,2,2,.25) 45%, transparent 70%); }
#brList:empty::before { content: "Aucun catcheur pour l'instant. Ajoute au moins 2 pseudos."; }
.br-panel { border-color: rgba(225,29,46,.5); }
.br-head { text-align: center; }
.br-title {
  font-family: 'Inter', system-ui, sans-serif; font-weight: 900; font-style: italic; font-size: clamp(2.4rem, 7vw, 4rem); line-height: .9; letter-spacing: .02em;
  background: linear-gradient(180deg, #ffffff 0%, #d9dde3 40%, #8b939e 52%, #f2f4f7 70%, #9aa3ad 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 #b3121f) drop-shadow(0 8px 18px rgba(0,0,0,.7));
}
.br-tag { margin-top: 10px; font-weight: 800; letter-spacing: .3em; text-transform: uppercase; font-size: .78rem; color: #ff4d5e; }
.btn-red {
  font-family: 'Inter', system-ui, sans-serif; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; font-size: .85rem;
  padding: 12px 20px; border-radius: 999px; border: 0; cursor: pointer; color: #fff;
  background: linear-gradient(180deg, #ff3b4e, #b3121f); box-shadow: 0 8px 24px rgba(225,29,46,.45), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .2s, filter .2s;
}
.btn-red:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.08); }
.btn-red:disabled { opacity: .45; cursor: not-allowed; }
.br-top {
  position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 16px; padding: 7px 16px; border-radius: 12px; white-space: nowrap;
  background: linear-gradient(180deg, rgba(20,20,24,.88), rgba(6,6,8,.88)); border: 1px solid rgba(255,255,255,.18); border-bottom: 2px solid #e11d2e;
}
.br-logo { font-weight: 900; font-style: italic; letter-spacing: .06em; color: #fff; }
.br-logo::first-letter { color: #ff3b4e; }
.br-clock { font-family: var(--mono); font-weight: 700; color: #fff; font-size: 1.15rem; }
.br-info { font-size: .8rem; color: #d7dbe0; }
.br-btns { top: calc(66px + env(safe-area-inset-top, 0px)); }
.br-feed {
  position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); top: calc(160px + env(safe-area-inset-top, 0px));
  width: min(390px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 6px; pointer-events: none;
}
.br-feed p { padding: 7px 12px; border-radius: 8px; font-size: .85rem; line-height: 1.35; background: rgba(8,8,10,.82); border-left: 3px solid #e11d2e; color: #f1f1f1; animation: lineIn .35s ease both; }
.br-feed p.gold { border-left-color: #f5c242; }
.br-feed p.blue { border-left-color: #3aa0ff; }
.br-cd {
  position: absolute; left: 50%; top: calc(64px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); pointer-events: none;
  font-weight: 900; font-style: italic; font-size: clamp(2.4rem, 7vw, 4.2rem); color: #fff; line-height: 1;
  text-shadow: 0 0 22px rgba(225,29,46,.9), 0 4px 18px rgba(0,0,0,.8);
}
.br-cd.pop { animation: cdPop .5s ease both; }
@keyframes cdPop { from { transform: translateX(-50%) scale(1.6); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
.br-move {
  position: absolute; left: 50%; top: 26%; transform: translate(-50%, -50%) skewX(-8deg) scale(.6); pointer-events: none; opacity: 0;
  font-weight: 900; font-style: italic; letter-spacing: .02em; font-size: clamp(1.8rem, 6vw, 4rem); color: #fff; white-space: nowrap;
  padding: 6px 28px; background: linear-gradient(90deg, transparent, #b3121f 12%, #e11d2e 50%, #b3121f 88%, transparent);
  text-shadow: 0 3px 0 #000, 0 0 18px rgba(0,0,0,.6);
}
.br-move.show { animation: moveIn 1.5s cubic-bezier(.2,.9,.2,1) both; }
.br-move.big { font-size: clamp(2.4rem, 9vw, 6rem); background: linear-gradient(90deg, transparent, #000 10%, #b3121f 50%, #000 90%, transparent); border-top: 3px solid #f5c242; border-bottom: 3px solid #f5c242; }
@keyframes moveIn { 0% { opacity: 0; transform: translate(-50%, -50%) skewX(-8deg) scale(2.2); } 12% { opacity: 1; transform: translate(-50%, -50%) skewX(-8deg) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) skewX(-8deg) scale(1.05); } }
.br-lower {
  position: absolute; left: max(18px, env(safe-area-inset-left, 0px)); bottom: calc(40px + env(safe-area-inset-bottom, 0px)); pointer-events: none;
  display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; align-items: center; column-gap: 12px;
  padding: 10px 22px 10px 12px; background: linear-gradient(90deg, rgba(8,8,10,.95), rgba(8,8,10,.75)); border-left: 6px solid #e11d2e;
  transform: translateX(-120%); transition: transform .5s cubic-bezier(.2,.9,.2,1);
}
.br-lower.show { transform: none; }
.br-lower .n { grid-row: span 2; font-weight: 900; font-style: italic; font-size: 2.6rem; color: #e11d2e; line-height: 1; }
.br-lower b { font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 1.6rem; color: #fff; letter-spacing: .02em; }
.br-lower small { color: #c9ced4; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; }
.br-sub {
  position: absolute; left: 50%; bottom: calc(34px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: min(860px, calc(100% - 32px));
  padding: 12px 18px 14px; background: rgba(6,6,8,.86); border-radius: 10px; border-top: 3px solid #e11d2e; pointer-events: none;
  opacity: 0; transition: opacity .3s;
}
.br-sub.show { opacity: 1; }
.br-sub .who { display: inline-block; font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; color: #fff; background: #e11d2e; padding: 2px 10px; border-radius: 4px; }
.br-sub p { margin-top: 8px; color: #fff; font-size: clamp(.95rem, 2.1vw, 1.15rem); line-height: 1.45; }
.br-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .25s; }
.br-flash.on { opacity: .55; transition: none; }
.br-end { background: radial-gradient(ellipse at center, rgba(6,4,4,.35), rgba(6,4,4,.82)); }
.br-end-card { border-color: rgba(225,29,46,.6); background: rgba(10,8,10,.92); }
.br-win-k { font-weight: 900; font-style: italic; letter-spacing: .14em; color: #ff4d5e; font-size: .9rem; }
.br-win-name { font-weight: 900; font-style: italic; font-size: clamp(2rem, 6vw, 3.4rem); text-transform: uppercase; background: linear-gradient(180deg, #fff, #c9ced6 50%, #7d8590); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 #b3121f); }
.br-stats b { color: #ff7a86; }
@media (max-width: 760px) {
  .br-top { gap: 8px; padding: 6px 10px; font-size: .8rem; }
  .br-logo { display: none; }
  .br-feed { top: auto; bottom: calc(150px + env(safe-area-inset-bottom, 0px)); }
  .br-feed p:nth-child(-n+3) { display: none; }
  .br-lower b { font-size: 1.15rem; } .br-lower .n { font-size: 1.9rem; }
}
.br-next { position: absolute; left: 50%; top: calc(128px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); pointer-events: none; font-weight: 800; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: rgba(8,8,10,.8); border-left: 3px solid #e11d2e; padding: 4px 12px; border-radius: 6px; white-space: nowrap; }
.br-next:empty { display: none; }
.br-vol { position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; background: rgba(8,8,10,.8); border: 1px solid rgba(255,255,255,.15); font-size: .9rem; z-index: 5; }
.br-vol label { display: flex; align-items: center; gap: 4px; }
.br-vol input[type=range] { width: 84px; accent-color: #e11d2e; }
#brCams button.on { background: #e11d2e; color: #fff; }
@media (max-width: 760px) { .br-vol input[type=range] { width: 60px; } .br-vol { bottom: calc(96px + env(safe-area-inset-bottom, 0px)); } }
/* Bust Rumble : la console à gauche, les réglages de son cliquables */
#br .br-feed { right: auto; left: max(16px, env(safe-area-inset-left, 0px)); }
#br .br-vol, #br .br-vol * { pointer-events: auto; }
#br .cam-switch, #br .cam-switch * { pointer-events: auto; }
/* Hunger Bust : réglage du son */
.hb-vol { position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 12px; background: rgba(10,8,4,.8); border: 1px solid rgba(232,184,90,.45); pointer-events: auto; z-index: 5; color: #fff1c9; font-size: .85rem; }
.hb-vol input { width: 120px; accent-color: #e8b85a; pointer-events: auto; }
.hb-vol b { min-width: 42px; text-align: right; font-family: var(--mono); }
/* 1, 2, 3 j'ai bust : la console à gauche */
#sl .hud-console { right: auto; left: max(16px, env(safe-area-inset-left, 0px)); }
/* 1, 2, 3 j'ai bust : console tout en bas à gauche, réglage du son */
#sl .hud-console { top: auto !important; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); right: auto; left: max(16px, env(safe-area-inset-left, 0px)); }
.sl-vol { position: absolute; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 30; display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 12px; background: rgba(10,10,12,.82); border: 1px solid rgba(236,72,153,.5); color: #fff; font-size: .85rem; }
.sl-vol[hidden] { display: none; }
.sl-vol input { width: 120px; accent-color: #ec4899; }
.sl-vol b { min-width: 42px; text-align: right; font-family: var(--mono); }
/* Groupes sauvegardés */
.grp-bar { display: flex; gap: 8px; margin: 2px 0 6px; flex-wrap: wrap; }
.grp-btn { padding: 7px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; color: #fff1c9; background: rgba(255,255,255,.07); border: 1px solid rgba(232,184,90,.45); cursor: pointer; transition: background .2s; }
.grp-btn:hover { background: rgba(232,184,90,.22); }
.grp-pop { margin: 0 0 8px; padding: 10px; border-radius: 12px; background: rgba(0,0,0,.35); border: 1px solid rgba(232,184,90,.3); }
.grp-pop[hidden] { display: none; }
.grp-form { display: flex; gap: 6px; align-items: center; }
.grp-form .dp-input { flex: 1; min-width: 0; padding: 8px 12px; font-size: .9rem; }
.grp-sub, .grp-msg { font-size: .8rem; color: #e9dcc0; margin-top: 6px; }
.grp-msg { margin: 0; }
.grp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; color: #fff1c9; }
.grp-list { list-style: none; display: flex; flex-direction: column; gap: 6px; max-height: 180px; overflow-y: auto; }
.grp-list li { display: flex; align-items: center; gap: 6px; }
.grp-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font-weight: 700; font-size: .9rem; }
.grp-n small { color: #bfb39a; font-weight: 500; margin-left: 4px; }
.grp-del { padding: 6px 9px; }
