/* ---------------------------------------------------------------------------
   DUST2//web — style HUD CS (ambre sur fond sombre, panneaux translucides)
--------------------------------------------------------------------------- */
:root {
  --amber: #ffb000;
  --amber-dim: #b98404;
  --ct: #7db2e8;
  --t: #e8b23a;
  --panel: rgba(12, 14, 10, 0.86);
}

* { margin: 0; padding: 0; box-sizing: border-box; user-select: none; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #0a0a08; }
body {
  font-family: 'Arial Narrow', 'Segoe UI', Arial, sans-serif;
  letter-spacing: 0.4px;
}
#game {
  position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: crosshair;
  /* étalonnage couleur léger, façon désert chaud */
  filter: saturate(1.09) contrast(1.045) brightness(1.01);
}
/* vignette cinémascope discrète par-dessus tout */
#hud::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 52%, rgba(8, 6, 3, 0.38) 100%);
}
#menu::after, #endscreen::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 40%, rgba(6, 5, 3, 0.5) 100%);
}

/* bandeau de frag */
#killbanner {
  position: absolute; bottom: 27%; left: 50%; transform: translateX(-50%);
  font-size: 17px; font-weight: 900; letter-spacing: 1px; color: #fff;
  text-shadow: 0 2px 6px #000; opacity: 0; pointer-events: none;
  padding: 4px 14px; background: rgba(20, 16, 8, 0.55); border-radius: 3px;
  transition: opacity 0.15s;
}
#killbanner.show { opacity: 1; color: #ffd890; }
#killbanner.show.hs { color: #ff6a50; }

/* récapitulatif de mort */
#deathrecap {
  position: absolute; top: 58%; left: 50%; transform: translateX(-50%);
  min-width: 200px; text-align: left; font-size: 13px; color: #e8dcc0;
  background: rgba(15, 11, 6, 0.78); border: 1px solid #4a4432; border-radius: 4px;
  padding: 8px 14px; opacity: 0; pointer-events: none; line-height: 1.55;
  transition: opacity 0.2s;
}
#deathrecap.show { opacity: 1; }
#deathrecap b { color: #ff8a70; letter-spacing: 2px; font-size: 11px; }
#deathrecap .rw { color: #9a8f78; font-size: 11px; }

/* grande carte (M) */
#bigmap {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  border: 2px solid rgba(120, 200, 130, 0.4); border-radius: 6px;
  box-shadow: 0 0 0 6px rgba(0, 0, 0, 0.5), 0 12px 50px rgba(0,0,0,0.7);
}

/* radio */
#radiomenu {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  width: 330px; background: var(--panel); border: 1px solid #4a4432; border-radius: 6px;
  padding: 12px; pointer-events: auto; z-index: 30;
}
#radiomenu h3 { color: var(--amber); letter-spacing: 3px; font-size: 15px; margin-bottom: 8px; }
.radioitem { font-size: 14px; padding: 5px 8px; }

/* ============================= MENUS ==================================== */
#menu, #pause, #endscreen {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
}
#menu, #endscreen {
  background:
    radial-gradient(ellipse at 50% 120%, rgba(0, 0, 0, 0.72), transparent 70%),
    linear-gradient(180deg, rgba(8, 7, 4, 0.55) 0%, rgba(10, 9, 6, 0.35) 45%, rgba(8, 7, 4, 0.82) 100%);
}
#pause {
  background: rgba(6, 5, 3, 0.78);
}
.menuInner { text-align: center; width: min(560px, 92vw); }
h1 {
  font-size: 84px; font-weight: 900; color: var(--amber);
  letter-spacing: 10px; text-shadow: 0 4px 24px rgba(0,0,0,0.8), 0 1px 0 #5a4000;
}
h1 span { color: #fff; }
.tagline { color: #9a8f78; margin: 4px 0 26px; font-size: 15px; line-height: 1.5; }

.panel {
  background: var(--panel); border: 1px solid #3a3527; border-radius: 6px;
  padding: 22px; margin-top: 10px; text-align: left;
}
.panel h2 { color: var(--amber); margin-bottom: 14px; letter-spacing: 3px; font-size: 20px; }

button {
  display: block; width: 100%; padding: 12px 18px; margin: 8px 0;
  background: linear-gradient(180deg, #2e2a1e, #201d14);
  border: 1px solid #4a4432; color: #e8dcc0; font-size: 17px; font-weight: bold;
  letter-spacing: 2px; cursor: pointer; border-radius: 3px;
  font-family: inherit;
}
button:hover { border-color: var(--amber); color: var(--amber); background: #2a261a; }
button.big { font-size: 22px; padding: 15px; }

.matchOpts { margin: 12px 0; }
.optRow {
  display: flex; align-items: center; gap: 12px; padding: 7px 4px;
  color: #c9bfa6; font-size: 15px; border-bottom: 1px solid #2622155e;
}
.optRow span:first-child { flex: 1; }
.optRow button { width: auto; margin: 0; padding: 5px 14px; display: inline-block; }
.optRow b { min-width: 26px; text-align: center; color: #fff; }
.optRow input[type=range] { flex: 1; accent-color: var(--amber); }
.optRow input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--amber); }
.optRow input[type=color] { width: 42px; height: 26px; border: none; background: none; }

.helpTable { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.helpTable td { padding: 5px 8px; color: #c9bfa6; font-size: 14px; border-bottom: 1px solid #26221a; }
.helpTable td:first-child { color: var(--amber); font-weight: bold; white-space: nowrap; }

#endTitle { font-size: 52px; letter-spacing: 4px; }
.endScore { font-size: 26px; color: #fff; margin: 10px 0; letter-spacing: 4px; }
#endStats table { width: 100%; margin: 14px 0; border-collapse: collapse; }
#endStats th, #endStats td { padding: 6px 10px; color: #c9bfa6; font-size: 15px; text-align: left; border-bottom: 1px solid #26221a; }
#endStats th { color: var(--amber); }
#endStats tr.me td { color: #fff; background: #2a261a; }

/* ============================= HUD ====================================== */
#hud { position: fixed; inset: 0; pointer-events: none; z-index: 10; color: var(--amber); }

#radar {
  position: absolute; top: 14px; left: 14px; width: 180px; height: 180px;
  border-radius: 50%; border: 2px solid rgba(120, 200, 130, 0.35);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.35);
}

#fps { position: absolute; top: 14px; right: 16px; color: #9ad08a; font-size: 13px; text-shadow: 0 1px 2px #000; }

#timerbox { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); text-align: center; text-shadow: 0 2px 4px #000; }
#timerbox .scores { display: flex; gap: 14px; align-items: baseline; justify-content: center; }
#timer { font-size: 30px; font-weight: 900; }
#timer.low { color: #ff4030; }
#timer.bomb { color: #ff3020; animation: blinkfast 0.4s infinite; }
#scoreCT, #scoreT { font-size: 22px; font-weight: 900; }
#scoreCT { color: var(--ct); } #scoreT { color: var(--t); }
#roundN { font-size: 11px; color: #bfa87a; letter-spacing: 2px; }
.aliveRow { display: flex; justify-content: center; gap: 10px; font-size: 11px; margin-top: 2px; }
.aCT { color: var(--ct); letter-spacing: 2px; }
.aT { color: var(--t); letter-spacing: 2px; }
.aliveRow .dead { opacity: 0.25; }

/* historique des manches (scoreboard) */
.roundHist { text-align: center; margin-bottom: 6px; min-height: 14px; }
.dotH { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin: 0 2px; }
.dhCT { background: var(--ct); }
.dhT { background: var(--t); }
.noHist { color: #6f684f; font-size: 11px; letter-spacing: 1px; }

#killfeed { position: absolute; top: 64px; right: 16px; text-align: right; font-size: 14px; text-shadow: 0 1px 3px #000; }
.feeditem { margin-bottom: 4px; background: rgba(0,0,0,0.45); padding: 3px 8px; border-radius: 3px; }
.feeditem .ct { color: var(--ct); font-weight: bold; }
.feeditem .t { color: var(--t); font-weight: bold; }
.feeditem .wicon { color: #cfc4a8; margin: 0 6px; font-size: 12px; }
.feeditem .hs { color: #ff5040; margin-right: 4px; }

#botchat { position: absolute; top: 205px; left: 16px; font-size: 13px; color: #d8d0bc; opacity: 0; transition: opacity 0.4s; text-shadow: 0 1px 3px #000; }
#botchat .ct { color: var(--ct); } #botchat .t { color: var(--t); }

#msg {
  position: absolute; top: 20%; left: 50%; transform: translateX(-50%);
  font-size: 26px; font-weight: 900; letter-spacing: 2px; text-shadow: 0 2px 6px #000;
  color: #fff; opacity: 0; transition: opacity 0.3s; text-align: center; white-space: nowrap;
}
#msg.win { color: #9db88a; } #msg.lose { color: #d88a7a; } #msg.bomb { color: #ff4030; }

#submsg { position: absolute; bottom: 26%; left: 50%; transform: translateX(-50%); color: #e8dcc0; font-size: 16px; text-shadow: 0 1px 3px #000; }
#prompt { position: absolute; bottom: 20%; left: 50%; transform: translateX(-50%); color: var(--amber); font-size: 16px; text-shadow: 0 1px 3px #000; }

#progresswrap { position: absolute; bottom: 17%; left: 50%; transform: translateX(-50%); width: 280px; text-align: center; display: none; }
#progresslabel { font-size: 13px; letter-spacing: 2px; text-shadow: 0 1px 3px #000; }
#progressbg { height: 12px; background: rgba(0,0,0,0.6); border: 1px solid var(--amber-dim); margin-top: 4px; }
#progressbar { height: 100%; width: 0; background: var(--amber); transition: width 0.1s linear; }

#hpbox {
  position: absolute; left: 20px; bottom: 18px; display: flex; align-items: center; gap: 10px;
  font-size: 34px; font-weight: 900; text-shadow: 0 2px 4px #000;
}
#hpbox .icon { width: 26px; height: 26px; }
#armorbox { display: inline-flex; align-items: center; gap: 6px; margin-left: 14px; }
#armor { font-size: 26px; }
#helmet { font-size: 15px; }

#c4icon {
  position: absolute; left: 20px; bottom: 74px; padding: 3px 10px;
  background: rgba(90, 20, 10, 0.8); border: 1px solid #ff5040; color: #ff8070;
  font-weight: 900; font-size: 15px; border-radius: 3px;
}
#c4icon.blink { animation: blinkfast 0.5s infinite; }

#ammobox { position: absolute; right: 22px; bottom: 18px; text-align: right; text-shadow: 0 2px 4px #000; }
#wname { font-size: 13px; color: #bfa87a; letter-spacing: 2px; }
#ammo { font-size: 34px; font-weight: 900; }
#ammobox.low #ammo { color: #ff4030; }
#reserve { font-size: 20px; color: var(--amber-dim); margin-left: 4px; }

#money { position: absolute; left: 22px; bottom: 66px; font-size: 22px; font-weight: 900; color: #9db88a; text-shadow: 0 2px 4px #000; }

#crosshair { position: absolute; inset: 0; }
.ch { position: absolute; }

#scope { position: absolute; inset: 0; background: radial-gradient(circle at center, transparent 0 34vmin, #000 35vmin); }
#scope .sline { position: absolute; background: rgba(0,0,0,0.9); }
#scope .v { left: 50%; top: 0; width: 1.5px; height: 100%; }
#scope .h { top: 50%; left: 0; height: 1.5px; width: 100%; }

#hitdir {
  position: absolute; left: 50%; top: 50%; width: 0; height: 0; opacity: 0;
}
#hitdir::before {
  content: ''; position: absolute; left: -60px; top: -150px; width: 120px; height: 26px;
  background: linear-gradient(0deg, rgba(255,40,20,0.85), rgba(255,40,20,0));
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

#flash { position: absolute; inset: 0; background: #fff; opacity: 0; }
#dmgvin { position: absolute; inset: 0; box-shadow: inset 0 0 140px rgba(200, 20, 10, 0.9); opacity: 0; }

#spectate {
  position: absolute; top: 32%; left: 50%; transform: translateX(-50%);
  color: #d88a7a; font-size: 20px; font-weight: bold; letter-spacing: 2px; text-shadow: 0 2px 6px #000;
}

/* menu d'achat */
#buymenu {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 460px; background: var(--panel); border: 1px solid #4a4432; border-radius: 6px;
  padding: 16px; pointer-events: auto; box-shadow: 0 10px 40px rgba(0,0,0,0.6);
}
#buymenu h3 { color: var(--amber); letter-spacing: 3px; font-size: 18px; margin-bottom: 8px; }
#buymenu .hint { font-size: 11px; color: #8a8069; margin-left: 8px; letter-spacing: 1px; }
#buyhint { font-size: 12px; margin-bottom: 8px; }
.buycat { color: #e8dcc0; font-weight: bold; padding: 7px 6px; cursor: pointer; border-bottom: 1px solid #262215; }
.buycat:hover { color: var(--amber); }
.buycat b { color: var(--amber); margin-right: 6px; }
.buylist { margin: 4px 0 10px 22px; }
.buyitem {
  display: flex; gap: 8px; padding: 6px 8px; cursor: pointer; border-radius: 3px;
  color: #c9bfa6; font-size: 14px; align-items: baseline;
}
.buyitem:hover { background: #2a261a; color: #fff; }
.buyitem .k { color: var(--amber); font-weight: bold; min-width: 30px; }
.buyitem .price { margin-left: auto; color: #9db88a; font-weight: bold; }
.buyitem .stats { color: #6f684f; font-size: 11px; min-width: 130px; text-align: right; }

/* scoreboard */
#scoreboard {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 560px; background: var(--panel); border: 1px solid #4a4432; border-radius: 6px; padding: 18px;
}
.sbTeam { font-size: 16px; font-weight: 900; letter-spacing: 2px; margin: 12px 0 4px; }
.ctTitle { color: var(--ct); } .tTitle { color: var(--t); }
#scoreboard table { width: 100%; border-collapse: collapse; }
#scoreboard th { text-align: left; color: #8a8069; font-size: 11px; letter-spacing: 1px; padding: 3px 8px; }
#scoreboard td { padding: 5px 8px; color: #c9bfa6; font-size: 14px; border-top: 1px solid #26221a; }
#scoreboard tr.me td { color: #fff; background: #2a261a; }
.botTag { color: #6f684f; font-size: 10px; }

@keyframes blinkfast { 50% { opacity: 0.25; } }

#nogl { position: fixed; inset: 0; z-index: 99; display: flex; align-items: center; justify-content: center; background: #14120c; color: #c9bfa6; }

/* ============================= ÉDITEUR ================================== */
#editor {
  position: fixed; inset: 0; z-index: 60; overflow-y: auto;
  background: linear-gradient(180deg, rgba(8,7,4,0.6), rgba(10,9,6,0.9));
  display: flex; align-items: flex-start; justify-content: center; padding: 20px 0;
}
#editor .menuInner.wide { width: min(720px, 96vw); text-align: center; }
#edBar, #edBar2, #edBar3 { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 8px 0; }
#edBar button, #edBar2 button, #edBar3 button {
  width: auto; margin: 0; padding: 6px 12px; font-size: 13px; letter-spacing: 1px;
}
#edBar3 select {
  background: #14120c; color: #e8dcc0; border: 1px solid #4a4432; border-radius: 3px;
  padding: 6px 10px; font-family: inherit; font-size: 14px; min-width: 200px;
}
#edBar2 input {
  background: #14120c; color: #e8dcc0; border: 1px solid #4a4432; border-radius: 3px;
  padding: 6px 10px; font-family: inherit; font-size: 14px; width: 170px;
}
#edCanvas {
  width: min(640px, 92vw); height: auto; border: 1px solid #4a4432; border-radius: 4px;
  cursor: crosshair; background: #1c1812; display: block; margin: 8px auto;
}
#edIO {
  width: min(640px, 92vw); background: #14120c; color: #c9bfa6; border: 1px solid #3a3527;
  border-radius: 3px; padding: 6px; font-size: 10px; font-family: monospace;
  resize: vertical; display: block; margin: 6px auto; user-select: text;
}
#edStatus { color: #9db88a; font-size: 12px; min-height: 16px; }

/* ============================= COOP / LAN ================================= */
#mpStatus { color: #9db88a; font-size: 13px; min-height: 18px; margin: 6px 0; text-align: center; line-height: 1.4; }
.lanBlock { border: 1px solid #3a3527; border-radius: 4px; padding: 10px; margin: 8px 0; }
.lanBlock b { color: var(--amber); letter-spacing: 2px; font-size: 13px; display: block; margin-bottom: 6px; }
.lanBlock textarea {
  width: 100%; background: #14120c; color: #c9bfa6; border: 1px solid #3a3527;
  border-radius: 3px; padding: 6px; font-size: 10px; font-family: monospace;
  resize: none; margin: 6px 0; user-select: text;
}
.lanBlock textarea:focus { outline: none; border-color: var(--amber-dim); }
#lanStatus { color: #9a8f78; font-size: 12px; text-align: center; min-height: 16px; }

/* ====================== v18 : KILLCAM & VIDÉO ============================ */
#kcframe { position: fixed; inset: 0; pointer-events: none; z-index: 45; }
#kcframe .kcbar {
  position: absolute; left: 0; right: 0; top: 0; height: 54px;
  background: rgba(6, 5, 3, 0.93);
}
#kcframe .kcbar.b { top: auto; bottom: 0; }
#kcframe .kct {
  position: absolute; top: 15px; width: 100%; text-align: center;
  color: var(--amber); font-size: 15px; font-weight: 800; letter-spacing: 3px;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.8);
}
#rec {
  position: fixed; top: 64px; right: 18px; display: none; z-index: 50;
  color: #ff5040; font-size: 15px; font-weight: 800; letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.9);
  animation: recblink 1.2s infinite;
}
@keyframes recblink { 50% { opacity: 0.4; } }
/* v31 : indicateur lampe torche (🔦 allumée) */
#torchhud {
  position: fixed; top: 88px; right: 18px; display: none; z-index: 50;
  color: #ffd98a; font-size: 16px;
  text-shadow: 0 0 10px rgba(255, 200, 110, 0.9), 0 0 3px rgba(0, 0, 0, 0.9);
}
#torchhud.on { display: block; }
/* v33 : bandeau duel classé (ELO + score vs Machine) */
#rankhud {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%);
  display: none; z-index: 50; padding: 4px 14px;
  background: rgba(10, 8, 4, 0.72); border: 1px solid #4a4432; border-radius: 4px;
  color: #ffd98a; font-size: 15px; font-weight: 700; letter-spacing: 0.5px;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.9);
  white-space: nowrap;
}
#rankhud b { color: #fff; }
#rankhud .sub { color: #9a8f6f; font-weight: 400; }
#btnRankedBo { font-size: 15px; padding: 9px 14px; color: #c9bfa6; letter-spacing: 1px; }
#edBar2 select {
  background: #14120c; color: #e8dcc0; border: 1px solid #4a4432; border-radius: 3px;
  padding: 6px 8px; font-family: inherit; font-size: 12px;
}

/* ================= v18 : REJEU DE MANCHE ================================== */
/* v22 : entraîneur de spray — nuage de déviations autour du crosshair */
#spraydots {
  position: absolute; top: 50%; left: 50%; width: 96px; height: 96px;
  transform: translate(-50%, -50%); pointer-events: none; z-index: 5;
  background: rgba(8, 10, 6, 0.35); border: 1px solid rgba(120, 200, 130, 0.25);
  border-radius: 4px;
}
#spraydots .sdot {
  position: absolute; top: 0; left: 0; width: 5px; height: 5px;
  background: #ff6a50; border-radius: 50%;
}
#spraydots .sdot.cross {
  transform: translate(46px, 46px); background: #9db88a; opacity: 0.9;
}
#replaybar {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
  display: none; z-index: 55; padding: 8px 18px;
  background: rgba(6, 5, 3, 0.88); border: 1px solid #4a4432; border-radius: 4px;
  color: #e8dcc0; font-size: 14px; font-weight: 700; letter-spacing: 1px;
  text-shadow: 0 0 6px rgba(0, 0, 0, 0.8); white-space: nowrap;
}

/* ================= v21 : NIVEAUX D'INTELLIGENCE BOTS ====================== */
.botLv {
  font-size: 10px; font-weight: 700; letter-spacing: 0.5px;
  padding: 1px 5px; border-radius: 3px; margin-left: 4px;
}
.botLv.lv1 { color: #e07850; background: rgba(224, 120, 80, 0.15); }
.botLv.lv2 { color: #d8a850; background: rgba(216, 168, 80, 0.15); }
.botLv.lv3 { color: #c9c078; background: rgba(201, 192, 120, 0.15); }
.botLv.lv4 { color: #9db88a; background: rgba(157, 184, 138, 0.18); }
.botLv.lv5 { color: #7dd8b0; background: rgba(125, 216, 176, 0.2); }

/* ================= v34 : BADGE DUEL CLASSÉ AU SCOREBOARD ================== */
.duelBadge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.4px;
  padding: 1px 5px; border-radius: 3px; margin-left: 4px;
  color: #ffd98a; background: rgba(255, 190, 80, 0.14);
  border: 1px solid rgba(255, 190, 80, 0.35); white-space: nowrap;
}

/* ================= v23 : TOURNOI DES BOTS ================= */
/* le spectateur n'a pas de HUD de joueur */
body.tourney #hpbox, body.tourney #ammobox, body.tourney #money,
body.tourney #crosshair, body.tourney #radar, body.tourney #timerbox,
body.tourney #hitdir, body.tourney #scope { display: none !important; }

/* panneau de configuration */
#panelTourney { max-width: 640px; }
#panelTourney .tIntro { color: #b8ae93; font-size: 12px; line-height: 1.45; margin: 4px 0 10px; }
#panelTourney .tBal { color: #e8dcc0; margin-bottom: 8px; }
#tourneyList { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.tcard {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  background: rgba(24, 22, 16, 0.85); border: 1px solid #3a3527; border-radius: 4px;
  cursor: pointer; transition: border-color .12s, background .12s;
}
.tcard:hover { border-color: #8a7f5f; }
.tcard.sel { border-color: #e8b23a; background: rgba(232, 178, 58, 0.12); }
.tcard .tname { flex: 1; color: #e8dcc0; font-weight: bold; }
.tcard .todds { color: #9db88a; font-variant-numeric: tabular-nums; }
#tourneyBets { display: flex; gap: 6px; margin-bottom: 10px; }
#tourneyBets button {
  flex: 1; padding: 6px 0; background: #26231a; color: #d8cfae;
  border: 1px solid #3a3527; border-radius: 3px; cursor: pointer;
}
#tourneyBets button.sel { border-color: #e8b23a; color: #ffd76a; }

/* HUD tournoi en jeu */
#tourhud { position: fixed; inset: 0; pointer-events: none; z-index: 40;
  font-family: 'Rajdhani', 'Segoe UI', sans-serif; }
#tourTop { position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  background: rgba(12, 11, 8, 0.82); border: 1px solid #4a4331; border-radius: 4px;
  padding: 6px 18px; color: #ffd76a; letter-spacing: 1px; }
#tourTop #tourSpeed { margin-left: 12px; color: #9db88a; }
#tourBracket { position: absolute; top: 64px; right: 14px; width: 208px;
  background: rgba(12, 11, 8, 0.78); border: 1px solid #3a3527; border-radius: 4px;
  padding: 8px 10px; font-size: 12px; color: #b8ae93; }
.tbRound { color: #8a7f5f; text-transform: uppercase; letter-spacing: 1px;
  font-size: 10px; margin: 7px 0 3px; }
.tbRound:first-child { margin-top: 0; }
.tbMatch { display: flex; justify-content: space-between; gap: 6px; padding: 2px 0; }
.tbMatch span { flex: 1; }
.tbMatch span.w { color: #9db88a; font-weight: bold; }
.tbMatch i { color: #6f684f; font-style: normal; font-variant-numeric: tabular-nums; }
.tbMatch.live { color: #ffd76a; }
.tbMatch.live i { color: #ffd76a; }
#tourLive { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: rgba(12, 11, 8, 0.82); border: 1px solid #4a4331; border-radius: 4px;
  padding: 8px 22px; color: #e8dcc0; font-size: 17px; text-align: center; }
#tourLive b { color: #ffd76a; }
#tourLive i { color: #8a7f5f; font-style: normal; font-size: 13px; }
#tourLive .tk { color: #6f684f; font-size: 11px; margin-top: 2px; }
#tourBet { position: absolute; bottom: 20px; left: 14px; color: #d8cfae;
  background: rgba(12, 11, 8, 0.7); border-radius: 4px; padding: 6px 10px; font-size: 13px; }
#tourBet b { color: #ffd76a; }
#tourHelp { position: absolute; bottom: 20px; right: 14px; color: #6f684f;
  font-size: 11px; letter-spacing: 1px; }

/* écran de fin de tournoi */
#tourEnd { position: fixed; inset: 0; z-index: 60; display: none;
  background: rgba(6, 5, 3, 0.88); overflow-y: auto; }
#tourEnd .teInner { max-width: 560px; margin: 8vh auto; text-align: center;
  font-family: 'Rajdhani', 'Segoe UI', sans-serif; }
#tourEnd h1 { color: #ffd76a; letter-spacing: 2px; margin-bottom: 18px; }
#tourEnd .teBracket { background: rgba(18, 16, 11, 0.9); border: 1px solid #3a3527;
  border-radius: 4px; padding: 10px 14px; text-align: left; margin-bottom: 12px; }
#tourEnd .teBet { color: #e8dcc0; margin-bottom: 18px; }
#tourEnd button { display: block; width: 100%; margin: 8px 0; }

/* v26 : rapport de dégâts du killcam (zones + %) */
#kcdmg {
  position: absolute; bottom: 14px; width: 100%; text-align: center;
  color: #e8dcc0; font-size: 14px; letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(0, 0, 0, 0.9); line-height: 1.5;
}
#kcdmg b { color: var(--amber); }
#kcdmg i { color: #9a8f78; font-style: normal; font-size: 12px; }
#kcdmg .kcz { font-size: 11px; }

/* ================= v38 : écran de chargement ================= */
#boot { position: fixed; inset: 0; z-index: 200; background: #14110c;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.45s ease; }
#boot.done { opacity: 0; pointer-events: none; }
#boot .bootInner { text-align: center; font-family: 'Rajdhani', 'Segoe UI', sans-serif; }
#boot .bootLogo { font-size: 58px; font-weight: 700; letter-spacing: 8px;
  color: #e8dcc0; text-shadow: 0 0 26px rgba(255, 176, 0, 0.25); }
#boot .bootLogo span { color: var(--amber, #ffb000); }
#boot .bootBar { width: 220px; height: 3px; background: #2c2820; margin: 18px auto 10px;
  border-radius: 2px; overflow: hidden; }
#boot .bootBar i { display: block; height: 100%; width: 40%; background: #ffb000;
  border-radius: 2px; animation: bootslide 1.1s ease-in-out infinite alternate; }
@keyframes bootslide { from { transform: translateX(-60%); } to { transform: translateX(260%); } }
#boot .bootTxt { color: #6f684f; font-size: 12px; letter-spacing: 2px; }

/* ================= v38 : contrôles tactiles ================= */
body.touch { overscroll-behavior: none; }
body.touch #game { touch-action: none; }
#touchui { position: fixed; inset: 0; z-index: 40; touch-action: none;
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
#touchui.menuopen .tbtn[data-act]:not([data-act=pause]) { display: none; }
#joybase { position: fixed; width: 140px; height: 140px; border-radius: 50%;
  border: 2px solid rgba(255, 216, 120, 0.35); background: rgba(20, 17, 12, 0.35);
  display: none; pointer-events: none; z-index: 41; }
#joyknob { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px;
  margin: -28px 0 0 -28px; border-radius: 50%;
  background: rgba(255, 200, 100, 0.5); border: 2px solid rgba(255, 216, 120, 0.7); }
#joyhint { position: fixed; left: 26px; bottom: 34px; color: rgba(232, 220, 192, 0.4);
  font-size: 12px; letter-spacing: 1px; pointer-events: none;
  font-family: 'Rajdhani', 'Segoe UI', sans-serif; }
.tbtn { position: fixed; border-radius: 50%; border: 2px solid rgba(255, 216, 120, 0.4);
  background: rgba(20, 17, 12, 0.42); color: #ffe9b0; font-size: 24px;
  width: 58px; height: 58px; display: flex; align-items: center; justify-content: center;
  padding: 0; outline: none; }
.tbtn.big { width: 92px; height: 92px; font-size: 36px;
  border-color: rgba(255, 120, 60, 0.55); }
.tbtn.small { width: 46px; height: 46px; font-size: 18px; }
.tbtn.on { background: rgba(255, 176, 0, 0.4); border-color: #ffd878; }
#touchrow { position: fixed; left: 14px; bottom: 100px; display: flex; gap: 8px; }
#touchrow .tbtn { position: static; }

/* v38.2 : version + date de release au pied du menu (toujours visible,
   quel que soit le panneau ouvert) */
#version { margin-top: 14px; text-align: center; color: #6f684f;
  font-size: 11px; letter-spacing: 1.5px;
  font-family: 'Rajdhani', 'Segoe UI', sans-serif; }
#version b { color: #b8a06a; font-weight: 600; }

/* v38.3 : compteur FPS hors HUD (visible aussi au menu) — sur tactile il
   laisse la place au bouton pause ☰ */
body.touch #fps { right: 72px; }

/* v38.4 : emblème (soleil couchant sur dunes dans le viseur) */
#menuLogo { width: 128px; height: 128px; display: block; margin: 0 auto 10px;
  filter: drop-shadow(0 6px 22px rgba(255, 176, 0, 0.22)); }
.bootEmblem { width: 132px; height: 132px; margin: 0 auto 14px; display: block;
  filter: drop-shadow(0 0 34px rgba(255, 176, 0, 0.3)); }

/* v38.5 : champ pseudo dans les options */
.optRow input[type=text] {
  width: 190px; padding: 5px 9px; border-radius: 3px;
  border: 1px solid #4a4231; background: rgba(18, 15, 10, 0.85);
  color: #e8dcc0; font: 600 14px 'Rajdhani', 'Segoe UI', sans-serif;
  letter-spacing: 1px; outline: none; }
.optRow input[type=text]:focus { border-color: var(--amber, #ffb000); }
