/* ===========================================================================
   BlockFront — interface
   Une seule grammaire pour tout le jeu : fond noir, panneaux a filet blanc
   fin, accent rouge, capitales grasses et espacees. Pas de biseaux, pas de
   neon : la meme langue visuelle que l'ecran d'accueil.
   =========================================================================== */

:root {
  --rouge:    #ff4d3d;
  --rouge-cl: #ff9086;
  --bleu:     #3d7ff2;
  --bleu-cl:  #7fb2ff;
  --jaune:    #ffc531;          /* reserve au code couleur de la phase */
  --vert:     #7fd07f;
  --noir:     #050506;
  --panneau:  rgba(10,11,14,.86);
  --panneau-2:#101116;
  --trait:    rgba(255,255,255,.12);
  --trait-2:  rgba(255,255,255,.22);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  width: 100%; height: 100%; overflow: hidden; background: var(--noir);
  font-family: 'Segoe UI', Tahoma, Verdana, sans-serif; color: #fff;
  user-select: none; -webkit-user-select: none;
}
#game { display: block; width: 100%; height: 100%; }
.hidden { display: none !important; }

/* titraille commune */
.menu-card h1, .menu-card h2, .sb-head h2, #bigmsg, .dead-title,
#topbar .tname, #phaseName, button.big {
  text-transform: uppercase; font-weight: 900; letter-spacing: 2px;
}

/* panneau : la brique de base de toute l'interface */
.panneau { background: var(--panneau); border: 1px solid var(--trait); }

kbd {
  background: rgba(255,255,255,.08); border: 1px solid var(--trait-2);
  padding: 2px 7px; font-family: inherit; font-weight: 800; font-size: .82em;
  display: inline-block; text-align: center; color: #fff;
}

/* ------------------------------------------------------------- Reticules */
#crosshair { position: fixed; left: 50%; top: 50%; width: 0; height: 0; z-index: 5; pointer-events: none; }
#crosshair i {
  position: absolute; background: #fff;
  box-shadow: 0 0 0 1.5px rgba(0,0,0,.85);
  transition: transform .06s linear;
}
#crosshair i:nth-child(1) { width: 3px; height: 9px; left: -1.5px; top: -17px; }
#crosshair i:nth-child(2) { width: 3px; height: 9px; left: -1.5px; top: 8px; }
#crosshair i:nth-child(3) { height: 3px; width: 9px; top: -1.5px; left: -17px; }
#crosshair i:nth-child(4) { height: 3px; width: 9px; top: -1.5px; left: 8px; }

/* point de visee : un simple point blanc, juste cerne de noir pour rester
   lisible sur un fond clair (ciel, sable) */
#dotsight {
  position: fixed; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px;
  z-index: 6; pointer-events: none; border-radius: 50%;
  background: #fff; box-shadow: 0 0 0 1.5px rgba(0,0,0,.75);
}

#scope { position: fixed; inset: 0; z-index: 7; pointer-events: none; }
#scope .lens {
  position: absolute; left: 50%; top: 50%;
  width: min(78vh, 78vw); height: min(78vh, 78vw);
  transform: translate(-50%, -50%); border-radius: 50%;
  box-shadow:
    0 0 0 5px rgba(0,0,0,.96),
    0 0 0 100vmax rgba(0,0,0,.97),
    inset 0 0 90px 30px rgba(0,0,0,.55);
}
#scope .ln, #scope .dot, #scope .tick {
  position: absolute; left: 50%; top: 50%; background: rgba(12,12,12,.92);
}
#scope .v { width: 1.5px; height: min(78vh,78vw); transform: translate(-50%,-50%); }
#scope .h { height: 1.5px; width: min(78vh,78vw); transform: translate(-50%,-50%); }
#scope .dot { width: 4px; height: 4px; border-radius: 50%; transform: translate(-50%,-50%); }
#scope .tick { width: 14px; height: 1.5px; transform: translate(-50%, -50%); }
#scope .t1 { margin-top: 26px; }
#scope .t2 { margin-top: 52px; width: 22px; }
#scope .t3 { margin-top: 78px; }

#hitmarker {
  position: fixed; left: 50%; top: 50%; width: 28px; height: 28px; margin: -14px 0 0 -14px;
  z-index: 8; pointer-events: none; opacity: 0;
  background:
    linear-gradient(45deg, transparent 44%, #fff 44%, #fff 56%, transparent 56%),
    linear-gradient(-45deg, transparent 44%, #fff 44%, #fff 56%, transparent 56%);
  filter: drop-shadow(0 0 2px #000);
}
#hitmarker.show { animation: hm .25s ease-out; }
#hitmarker.head { filter: drop-shadow(0 0 4px var(--rouge)); }
@keyframes hm { from { opacity: 1; transform: scale(.6); } to { opacity: 0; transform: scale(1.3); } }

#flash {
  position: fixed; inset: 0; z-index: 4; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, transparent 32%, rgba(190,0,0,.8) 100%);
}
#flash.on { animation: fl .45s ease-out; }
@keyframes fl { from { opacity: 1; } to { opacity: 0; } }

#lowhp {
  position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, transparent 28%, rgba(150,0,0,.6) 100%);
  transition: opacity .4s;
}

/* --------------------------------------------------------------- Bandeaux */
#topbar {
  position: fixed; top: 0; left: 50%; transform: translateX(-50%); z-index: 8;
  display: flex; align-items: center; gap: 22px; padding: 11px 28px;
  background: var(--panneau); border: 1px solid var(--trait); border-top: none;
  pointer-events: none;
}
#topbar .score { display: flex; align-items: center; gap: 12px; font-size: 30px; font-weight: 900; }
#topbar .tname { font-size: 11px; opacity: .55; letter-spacing: 3px; }
#topbar .blue { color: var(--bleu-cl); }
#topbar .red  { color: var(--rouge-cl); }
#intelState {
  font-size: 11px; opacity: .45; min-width: 210px; text-align: center;
  font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
}

#phasebar {
  position: fixed; top: 62px; left: 50%; transform: translateX(-50%); z-index: 8;
  display: flex; align-items: center; gap: 16px; padding: 9px 20px; pointer-events: none;
  background: var(--panneau); border: 1px solid var(--trait); border-left: 3px solid var(--rouge);
}
#phaseName { font-size: 12px; letter-spacing: 2px; }
#phaseTimer { font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; }
#phaseHint { font-size: 11px; opacity: .45; text-transform: uppercase; letter-spacing: 1px; }
#phasebar.urgent { border-left-color: var(--rouge); animation: pulse .7s infinite; }
#phasebar.urgent #phaseTimer { color: var(--rouge); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

#bigmsg {
  position: fixed; left: 50%; top: 30%; transform: translate(-50%,-50%); z-index: 9;
  font-size: clamp(30px, 5.5vw, 72px); text-align: center; pointer-events: none; opacity: 0;
  text-shadow: 0 6px 34px rgba(0,0,0,.85);
}
#bigmsg.show { animation: big 2.6s ease-out forwards; }
@keyframes big {
  0%   { opacity: 0; transform: translate(-50%,-50%) scale(.7); }
  14%  { opacity: 1; transform: translate(-50%,-50%) scale(1); }
  76%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.1); }
}

/* ------------------------------------------------------------- Killfeed */
#killfeed {
  position: fixed; top: 122px; right: 20px; z-index: 8; width: 350px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 5px; pointer-events: none;
}
#killfeed div {
  background: var(--panneau); border-left: 3px solid var(--rouge);
  padding: 6px 12px; font-size: 13px; font-weight: 700;
  animation: kf .3s ease-out;
}
#killfeed .b { color: var(--bleu-cl); font-weight: 900; }
#killfeed .r { color: var(--rouge-cl); font-weight: 900; }
/* enchainement : ligne mise en avant */
#killfeed .multi {
  background: rgba(255,77,61,.22); border-left-width: 4px;
  animation: kf .3s ease-out, multiPulse 1.2s ease-out;
}
#killfeed .multi b { color: #fff; letter-spacing: 2px; }
@keyframes multiPulse { 0% { background: rgba(255,255,255,.55); } 100% { background: rgba(255,77,61,.22); } }
@keyframes kf { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; } }

/* ------------------------------------------------------------------ HUD */
#hud { position: fixed; left: 24px; bottom: 22px; z-index: 8; pointer-events: none; }
#hpbox { display: flex; align-items: center; gap: 14px; }
#hpbar {
  width: 250px; height: 8px; background: rgba(255,255,255,.14);
  border: none; overflow: hidden;
}
#hpfill { display: block; height: 100%; width: 100%; background: #fff; transition: width .18s; }
#hpfill.mid { background: var(--jaune); }
#hpfill.low { background: var(--rouge); }
#hpnum {
  font-size: 42px; font-weight: 900; min-width: 80px; line-height: 1;
  text-shadow: 0 4px 18px rgba(0,0,0,.7);
}
#statline {
  margin-top: 8px; font-size: 11px; opacity: .4; font-weight: 800; letter-spacing: 2px;
  text-transform: uppercase;
}

#rightbox {
  position: fixed; right: 24px; bottom: 22px; z-index: 8; pointer-events: none;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  text-shadow: 0 3px 16px rgba(0,0,0,.7);
}
#ammo { font-size: 46px; font-weight: 900; line-height: 1; }
#ammo span { font-size: 17px; font-weight: 700; opacity: .4; margin-left: 8px; }
#carry { display: flex; gap: 18px; font-size: 15px; font-weight: 800; opacity: .8; }
#tools { display: flex; gap: 5px; }
#tools .tool {
  padding: 6px 11px; font-size: 10px; font-weight: 900; letter-spacing: 1px;
  background: var(--panneau); border: 1px solid transparent; opacity: .45;
  text-transform: uppercase;
}
#tools .tool.active { border-color: var(--rouge); opacity: 1; background: rgba(255,77,61,.16); }
#palette { display: flex; gap: 5px; }
#palette .sw { width: 26px; height: 26px; border: 2px solid rgba(255,255,255,.25); }
#palette .sw.active { border-color: #fff; transform: translateY(-4px); }

#reloadHint {
  position: fixed; left: 50%; top: 60%; transform: translateX(-50%); z-index: 8;
  font-size: 13px; font-weight: 900; letter-spacing: 3px; opacity: 0; transition: opacity .2s;
  color: var(--rouge); pointer-events: none; text-transform: uppercase;
}
#reloadHint.on { opacity: 1; }

/* ----------------------------------------------------------------- Chat */
#chatlog {
  position: fixed; left: 24px; bottom: 120px; z-index: 8; width: 500px; max-height: 210px;
  overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  gap: 3px; pointer-events: none; font-size: 14px;
}
#chatlog div {
  background: var(--panneau); border-left: 2px solid rgba(255,255,255,.22);
  padding: 5px 11px; width: fit-content; max-width: 100%;
}
#chatlog .sys { opacity: .6; border-left-color: var(--rouge); }
#chatlog .b { color: var(--bleu-cl); font-weight: 800; }
#chatlog .r { color: var(--rouge-cl); font-weight: 800; }
#chatlog .fade { animation: chfade 12s forwards; }
@keyframes chfade { 0%,80% { opacity: 1; } 100% { opacity: 0; } }

#chatbar {
  position: fixed; left: 24px; bottom: 84px; z-index: 12; display: none;
  align-items: center; gap: 12px; background: var(--panneau-2);
  border: 1px solid var(--trait); border-left: 3px solid var(--rouge); padding: 9px 13px;
}
#chatbar.on { display: flex; }
#chatscope { font-size: 10px; font-weight: 900; letter-spacing: 2px; color: var(--rouge); }
#chatinput { width: 440px; background: none; border: none; outline: none; color: #fff; font: inherit; font-size: 14px; }

/* ----------------------------------------------------------- Scoreboard */
/* meme tableau que la liste de serveurs de l'accueil */
#scoreboard {
  position: fixed; inset: 0; z-index: 14; display: flex; flex-direction: column;
  align-items: center; justify-content: center; background: rgba(4,5,7,.9); backdrop-filter: blur(5px);
}
.sb-head { text-align: center; margin-bottom: 32px; }
.sb-head h2 { font-size: clamp(30px, 3.4vw, 46px); letter-spacing: 9px; }
#sbScore { font-size: clamp(30px, 3vw, 42px); font-weight: 900; opacity: .55; margin-top: 12px; letter-spacing: 6px; }
/* largeur explicite : sans elle le conteneur se calait sur son contenu et
   les deux equipes s'empilaient meme quand il y avait la place */
.sb-cols {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 26px;
  width: 100%; max-width: min(94vw, 1060px);
}
.sb-col {
  flex: 1 1 380px; max-width: 500px; background: rgba(255,255,255,.04);
  padding: 0 0 10px; border: 1px solid var(--trait);
}
.sb-col h3 {
  font-size: 16px; letter-spacing: 4px; text-transform: uppercase;
  padding: 18px 22px; border-bottom: 1px solid var(--trait); margin-bottom: 4px;
}
.sb-col.blue { border-top: 4px solid var(--bleu); } .sb-col.blue h3 { color: var(--bleu-cl); }
.sb-col.red  { border-top: 4px solid var(--rouge); } .sb-col.red h3  { color: var(--rouge-cl); }
.sb-col table { width: 100%; font-size: 17px; border-collapse: collapse; font-weight: 700; }
.sb-col td { padding: 11px 22px; border-bottom: 1px solid rgba(255,255,255,.05); }
.sb-col td:nth-child(2), .sb-col td:nth-child(3) { text-align: right; width: 74px; opacity: .65; font-variant-numeric: tabular-nums; }
/* en-tete de colonnes : sans ca on ne sait pas ce que sont les deux nombres */
.sb-col tr.hdr td {
  font-size: 11px; font-weight: 900; letter-spacing: 2px; text-transform: uppercase;
  opacity: .35; padding-top: 6px; padding-bottom: 6px;
}
.sb-col tr.vide td { opacity: .3; font-weight: 600; font-size: 14px; text-align: left; }
.sb-col tr.me td { background: rgba(255,77,61,.14); }
.sb-foot { margin-top: 26px; font-size: 13px; opacity: .35; letter-spacing: 2px; text-transform: uppercase; }

/* ------------------------------------------------------------ Ecran de mort */
#deadscreen {
  position: fixed; inset: 0; z-index: 13; display: flex; align-items: center; justify-content: center;
  background: rgba(4,5,7,.7); backdrop-filter: blur(3px);
}
.dead-card {
  text-align: center; background: var(--panneau-2); padding: 32px 46px;
  border: 1px solid var(--trait); border-top: 3px solid var(--rouge);
}
.dead-title { font-size: clamp(34px, 4vw, 52px); color: var(--rouge); letter-spacing: 8px; }
#deadBy { margin: 10px 0 18px; opacity: .6; font-weight: 700; font-size: 14px; }
.dead-timer { font-size: 15px; font-weight: 700; opacity: .8; }
.dead-timer b { font-size: 28px; color: #fff; }
.dead-hint { margin: 20px 0 12px; font-size: 11px; opacity: .4; text-transform: uppercase; letter-spacing: 2px; }

/* ===========================================================================
   ECRAN D'ACCUEIL — noir / blanc / rouge, nav en haut, titre a gauche,
   colonne de cartes a droite.
   =========================================================================== */
#menu {
  position: fixed; inset: 0; z-index: 20;
  overflow-x: hidden; overflow-y: auto;   /* petits ecrans : on defile, on ne rogne pas */
  background: radial-gradient(120% 100% at 20% 0%, #16181c 0%, #08090b 55%, #050506 100%);
  color: #fff;
}
/* enorme filigrane en fond */
.wz-watermark {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  font-size: min(20vw, 42vh); font-weight: 900; letter-spacing: -.02em; white-space: nowrap;
  color: transparent; -webkit-text-stroke: 2px rgba(255,255,255,.05);
  pointer-events: none; user-select: none;
}
/* arcs de lumiere balayant l'ecran */
.wz-arcs {
  position: absolute; inset: -20% -10%; pointer-events: none; opacity: .5;
  background:
    repeating-conic-gradient(from 200deg at 78% 120%,
      rgba(255,255,255,0) 0deg 3deg,
      rgba(255,255,255,.055) 3deg 3.7deg,
      rgba(255,255,255,0) 3.7deg 7deg);
  mask-image: radial-gradient(70% 70% at 70% 100%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(70% 70% at 70% 100%, #000 0%, transparent 72%);
}

/* Le contenu est CENTRE et borne : sur un ecran large, les deux colonnes
   restaient collees aux bords opposes avec un trou geant au milieu. */
.wz {
  position: relative; min-height: 100%;
  width: 100%; max-width: min(1820px, 94vw); margin: 0 auto;
  display: flex; flex-direction: column;
  padding: clamp(14px, 1.8vh, 34px) clamp(18px, 2.2vw, 56px);
}

/* ------------------------------------------------------------- barre du haut */
.wz-top {
  display: flex; align-items: center; gap: clamp(14px, 3vw, 44px);
  padding-bottom: 16px;
}
.wz-logo { line-height: 1; }
.wz-logo-main { font-size: clamp(17px, 1.7vw, 23px); font-weight: 900; letter-spacing: 1px; }
.wz-logo-main b { color: #fff; font-weight: 900; }
.wz-logo-sub {
  margin-top: 4px; font-size: 9px; letter-spacing: 3px; font-weight: 800;
  background: #fff; color: #000; display: inline-block; padding: 2px 7px;
}
.wz-nav { display: flex; align-items: center; gap: clamp(10px, 1.6vw, 26px); flex: 1; }
.wz-tab {
  background: none; border: none; color: rgba(255,255,255,.55);
  font: inherit; font-size: 13px; font-weight: 800; letter-spacing: 1.5px;
  padding: 8px 2px; position: relative; cursor: pointer;
}
.wz-tab:hover { color: #fff; }
.wz-tab.on { color: #fff; }
.wz-tab.on::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #fff;
}
.wz-tab.off { color: rgba(255,255,255,.22); cursor: default; }
.wz-tab[data-tab="classes"].on::after,
.wz-tab[data-tab="how"].on::after { background: var(--rouge); }

.wz-me { display: flex; align-items: center; gap: 10px; }
.wz-chip {
  display: flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  padding: 7px 12px;
}
.wz-chip .av { width: 16px; height: 16px; background: var(--rouge); display: block; }
.wz-chip input {
  background: none; border: none; outline: none; color: #fff;
  font: inherit; font-size: 13px; font-weight: 700; width: 110px;
}
.wz-gear {
  width: 36px; height: 36px; background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14); color: #fff; font-size: 16px; line-height: 1;
}
.wz-gear:hover { background: rgba(255,255,255,.16); }

/* ------------------------------------------------------------------ corps */
.wz-body {
  flex: 1; display: grid; grid-template-columns: minmax(0,1fr) clamp(320px, 25%, 480px);
  gap: clamp(20px, 2.6vw, 58px); min-height: 0;
}
.wz-left { display: flex; flex-direction: column; justify-content: center; min-height: 0; overflow-y: auto; }
.wz-pane { max-width: 1060px; width: 100%; }

.wz-title { line-height: .82; margin-bottom: 14px; position: relative; }
/* on borne aussi par la hauteur : sur un ecran large mais court, le titre
   doit grandir sans deborder */
.wz-title .t1 {
  display: block; font-size: clamp(56px, min(8.2vw, 15vh), 172px); font-weight: 900;
  letter-spacing: -.01em; text-transform: uppercase;
}
/* le mot accent, penche et en rouge, qui deborde sur le premier */
.wz-title .t2 {
  display: block; font-size: clamp(48px, min(7vw, 12.8vh), 148px); font-weight: 900;
  color: var(--rouge); text-transform: lowercase; font-style: italic;
  letter-spacing: -.02em; margin-top: -.16em; margin-left: .06em;
  transform: rotate(-3deg); transform-origin: left center;
  text-shadow: 0 4px 26px rgba(255,77,61,.35);
}
.wz-sub {
  font-size: clamp(13px, .9vw, 16px); letter-spacing: 1.5px; text-transform: uppercase;
  opacity: .55; margin-bottom: clamp(20px, 2.6vh, 34px); font-weight: 700;
}
.wz-h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 900; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }

/* gros bouton blanc */
.wz-start {
  display: block; width: min(100%, 420px); padding: 19px 26px;
  background: #fff; color: #000; border: none;
  font: inherit; font-size: 22px; font-weight: 900; letter-spacing: 3px;
  text-transform: uppercase; cursor: pointer;
  box-shadow: 10px 10px 0 rgba(255,77,61,.85);
  transition: transform .08s, box-shadow .08s, background .15s;
}
.wz-start:hover { background: #f1f1f1; }
.wz-start:active { transform: translate(5px, 5px); box-shadow: 5px 5px 0 rgba(255,77,61,.85); }

.wz-join { display: flex; gap: 10px; margin-top: 18px; width: min(100%, 420px); }
.wz-join input {
  flex: 1; min-width: 0; padding: 13px 16px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18);
  color: #fff; font: inherit; font-size: 20px; font-weight: 900;
  letter-spacing: 8px; text-align: center; text-transform: uppercase; outline: none;
}
.wz-join input::placeholder { color: rgba(255,255,255,.25); letter-spacing: 5px; }
.wz-join input:focus { border-color: #fff; background: rgba(255,255,255,.1); }
.wz-join button {
  padding: 0 22px; background: none; border: 1px solid rgba(255,255,255,.25);
  color: #fff; font: inherit; font-size: 13px; font-weight: 800; letter-spacing: 1.5px;
  white-space: nowrap;
}
.wz-join button:hover { background: #fff; color: #000; }

/* classes en onglet */
.wz-classes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 620px; margin-top: 18px; }
.wz-classes .c {
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12);
  padding: 18px 14px; border-top: 3px solid var(--rouge);
}
.wz-classes .c .i { font-size: 30px; display: block; margin-bottom: 8px; }
.wz-classes .c .n { font-size: 15px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; display: block; }
.wz-classes .c .d { font-size: 11px; opacity: .55; display: block; margin: 7px 0 10px; line-height: 1.5; }
.wz-classes .c .s { font-size: 11px; font-weight: 800; color: var(--rouge); display: block; }

/* etapes */
.wz-steps { list-style: none; counter-reset: s; max-width: 620px; margin-top: 20px; }
.wz-steps li {
  counter-increment: s; position: relative; padding: 0 0 18px 52px;
  border-left: 1px solid rgba(255,255,255,.14); margin-left: 14px;
}
.wz-steps li:last-child { border-left-color: transparent; padding-bottom: 0; }
.wz-steps li::before {
  content: counter(s); position: absolute; left: -15px; top: -2px;
  width: 29px; height: 29px; background: var(--rouge); color: #fff;
  font-size: 13px; font-weight: 900; display: grid; place-items: center;
}
.wz-steps b { display: block; font-size: 15px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.wz-steps span { font-size: 13px; opacity: .6; line-height: 1.6; }

.wz-field { display: block; max-width: 420px; margin-top: 20px; }
.wz-field > span { display: block; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; opacity: .6; margin-bottom: 10px; font-weight: 800; }
.wz-field > span b { color: var(--rouge); }
.wz-field input[type=range] { width: 100%; accent-color: var(--rouge); }

/* ----------------------------------------------------- colonne de droite */
.wz-right {
  display: flex; flex-direction: column; gap: 12px;
  overflow-y: auto; min-height: 0; padding-right: 2px;
}
.wz-card { background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.1); padding: clamp(14px, 1.6vh, 20px) 18px; }
.wz-card-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 13px; }
.wz-card-h h3 { font-size: 14px; font-weight: 900; text-transform: uppercase; letter-spacing: 2px; }
.wz-card-h span { font-size: 12px; opacity: .5; font-weight: 700; }
.wz-card-note { font-size: 12px; opacity: .4; margin-top: 10px; line-height: 1.5; }

/* carte illustree */
.wz-hero { padding: 0; position: relative; overflow: hidden; min-height: clamp(150px, 20vh, 210px); }
.wz-hero-art {
  position: absolute; inset: 0;
  background:
    radial-gradient(80% 120% at 80% 0%, rgba(255,77,61,.55), transparent 60%),
    repeating-linear-gradient(115deg, rgba(255,255,255,.07) 0 2px, transparent 2px 16px),
    linear-gradient(160deg, #1b1e24, #0a0b0e);
}
.wz-hero-txt {
  position: relative; padding: 22px 20px; font-size: clamp(24px, 1.9vw, 32px); font-weight: 900;
  line-height: 1; text-transform: uppercase; letter-spacing: 1px;
  text-shadow: 0 4px 20px rgba(0,0,0,.7);
}
.wz-hero-txt b { color: var(--rouge); font-size: 1.28em; }

/* segment temps de construction */
.wz-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.wz-seg button {
  padding: 11px 4px; background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.7);
  font: inherit; font-size: 14px; font-weight: 900; line-height: 1.25;
}
.wz-seg button small { display: block; font-size: 9px; font-weight: 700; opacity: .5; letter-spacing: .5px; text-transform: uppercase; margin-top: 3px; }
.wz-seg button:hover { border-color: rgba(255,255,255,.35); color: #fff; }
.wz-seg button.on { background: #fff; color: #000; border-color: #fff; }
.wz-seg button.on small { opacity: .6; }

.wz-bar { height: 5px; background: rgba(255,255,255,.1); margin-top: 12px; }
.wz-bar i { display: block; height: 100%; background: var(--rouge); transition: width .25s; }

/* mini-liste (deroulement) */
.wz-mini { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.wz-mini li { display: flex; flex-direction: column; gap: 2px; padding-left: 11px; border-left: 2px solid var(--rouge); }
.wz-mini b { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; }
.wz-mini span { font-size: 11px; opacity: .45; }

/* ping */
.wz-ping-big { display: flex; align-items: baseline; gap: 6px; }
.wz-ping-big b { font-size: 40px; font-weight: 900; line-height: 1; }
.wz-ping-big span { font-size: 13px; opacity: .45; font-weight: 700; }

/* ===================================================== Navigateur de serveurs */
.srv { display: flex; flex-direction: column; width: 100%; max-width: 1060px; }
.srv-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.srv-top h2 { font-size: clamp(15px, 1.15vw, 19px); font-weight: 900; text-transform: uppercase; letter-spacing: 2px; }
.srv-meta { display: flex; align-items: center; gap: 10px; }
.srv-meta span { font-size: 13px; opacity: .45; font-weight: 700; }
#refreshBtn {
  width: 32px; height: 32px; background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14); color: #fff; font-size: 15px; line-height: 1;
}
#refreshBtn:hover { background: rgba(255,255,255,.16); }

/* colonnes : nom | type | etat | joueurs | ping */
.srv-head, .srv-list button {
  display: grid; grid-template-columns: minmax(0,1fr) 150px 128px 92px 76px;
  gap: 12px; align-items: center;
}
.srv-head {
  padding: 0 14px 9px; font-size: 11px; font-weight: 900;
  letter-spacing: 1.5px; text-transform: uppercase; opacity: .35;
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.srv-head .c-pop, .srv-head .c-ping { text-align: right; }

.srv-list {
  display: flex; flex-direction: column;
  max-height: min(38vh, 400px); min-height: 110px; overflow-y: auto;
}
.srv-list button {
  width: 100%; padding: clamp(13px, 1.6vh, 22px) 14px; background: none; border: none;
  border-bottom: 1px solid rgba(255,255,255,.07);
  color: #fff; font: inherit; font-size: clamp(13px, .95vw, 18px); text-align: left; cursor: pointer;
}
.srv-list button:hover { background: rgba(255,77,61,.14); }
.srv-list .s-name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-list .s-name i {
  font-style: normal; font-size: 11px; opacity: .4; font-weight: 700;
  letter-spacing: 2px; margin-left: 8px;
}
.srv-list .s-mode { font-size: 12px; font-weight: 800; letter-spacing: 1px; opacity: .7; text-transform: uppercase; }
.srv-list .s-phase { font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.srv-list .s-phase.warmup { color: #7fd07f; }
.srv-list .s-phase.build  { color: var(--jaune); }
.srv-list .s-phase.fight  { color: var(--rouge); }
.srv-list .s-pop  { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.srv-list .s-ping { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.srv-list .s-ping.bon   { color: #7fd07f; }
.srv-list .s-ping.moyen { color: var(--jaune); }
.srv-list .s-ping.mauvais { color: var(--rouge); }
.srv-list .vide {
  display: grid; place-items: center; padding: 30px 10px;
  font-size: 12px; opacity: .3; text-align: center; line-height: 1.7;
}

.srv-foot {
  display: flex; align-items: stretch; flex-wrap: wrap; gap: 12px; margin-top: 18px;
  padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12);
}
.srv-foot .wz-join { margin-top: 0; width: auto; flex: 1 1 230px; min-width: 0; }
.srv-foot .wz-start {
  width: auto; flex: 1 1 260px; font-size: clamp(14px, 1.4vw, 18px);
  padding: 15px 18px; white-space: nowrap; letter-spacing: 2px;
}

/* ------------------------------------------- Fenetre de creation de serveur */
#createModal {
  position: fixed; inset: 0; z-index: 24; display: flex; align-items: center; justify-content: center;
  background: rgba(4,5,7,.82); backdrop-filter: blur(4px); padding: 22px; overflow-y: auto;
}
.cm-box {
  width: 100%; max-width: 480px; background: #101116;
  border: 1px solid rgba(255,255,255,.14); padding: 26px 28px;
  box-shadow: 0 30px 90px rgba(0,0,0,.7);
}
.cm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.cm-head h2 { font-size: 20px; font-weight: 900; text-transform: uppercase; letter-spacing: 2px; }
#cmClose {
  width: 32px; height: 32px; background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14); color: #fff; font-size: 14px;
}
#cmClose:hover { background: var(--rouge); border-color: var(--rouge); }

.cm-field { display: block; margin-bottom: 20px; }
.cm-field > span {
  display: block; font-size: 11px; font-weight: 800; letter-spacing: 2px;
  text-transform: uppercase; opacity: .5; margin-bottom: 9px;
}
.cm-field > span b { color: var(--rouge); opacity: 1; }
.cm-field input {
  width: 100%; padding: 13px 15px; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.18); color: #fff;
  font: inherit; font-size: 15px; font-weight: 700; outline: none;
}
.cm-field input:focus { border-color: #fff; }
.cm-mode { background: rgba(255,77,61,.1); border-left: 3px solid var(--rouge); padding: 12px 14px; }
.cm-mode b { display: block; font-size: 14px; font-weight: 900; letter-spacing: 1.5px; }
.cm-mode em { display: block; font-style: normal; font-size: 11px; opacity: .55; margin-top: 5px; line-height: 1.6; }
.cm-note { display: block; font-style: normal; font-size: 11px; opacity: .4; margin-top: 10px; }
#cmGo { width: 100%; margin-top: 4px; }

#menu .joinerr { max-width: 420px; }
#menu .keys { margin: 20px 0 0; opacity: .85; }

/* --------------------------------------------------- Pause & choix de classe */
/* memes regles que la fenetre "Creer un serveur" de l'accueil */
#pause, #classpick {
  position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center;
  background: rgba(4,5,7,.84); backdrop-filter: blur(5px);
  overflow-y: auto; padding: 22px;
}
#classpick { z-index: 22; }

.menu-card {
  position: relative; width: 100%; max-width: 720px;
  background: var(--panneau-2); border: 1px solid var(--trait);
  padding: clamp(30px, 4vh, 48px) clamp(28px, 3.4vw, 52px); text-align: center;
  box-shadow: 0 30px 90px rgba(0,0,0,.7);
}
.menu-card.small { max-width: 520px; }
.menu-card h2 {
  font-size: clamp(26px, 2.8vw, 38px); margin-bottom: 28px; letter-spacing: 4px; color: #fff;
}

/* --- Code de la salle (menu Pause) : gros, lisible, copiable ------------- */
.code-bloc {
  background: rgba(255,255,255,.04); border: 1px solid var(--trait);
  border-left: 4px solid var(--rouge); padding: 22px 24px; margin-bottom: 26px;
}
.code-label {
  font-size: 11px; font-weight: 800; letter-spacing: 3px;
  text-transform: uppercase; opacity: .5; margin-bottom: 12px;
}
.code-val {
  font-size: clamp(46px, 6vw, 76px); font-weight: 900; line-height: 1;
  letter-spacing: clamp(8px, 1.2vw, 18px); color: var(--rouge);
  margin-bottom: 18px; user-select: all;
}
#copyBtn {
  padding: 13px 26px; background: rgba(255,255,255,.1); color: #fff;
  font-size: 13px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.22);
}
#copyBtn:hover { background: var(--rouge); border-color: var(--rouge); }
.tag { opacity: .5; font-size: 12px; margin: 10px 0 24px; letter-spacing: 2px; text-transform: uppercase; }

.field { display: block; text-align: left; margin-bottom: 20px; }
.field > span {
  display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 2px;
  opacity: .5; margin-bottom: 9px; font-weight: 800;
}
.field > span b { color: var(--rouge); opacity: 1; }
.field input[type=text], .field input:not([type]) {
  width: 100%; padding: 13px 15px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06); color: #fff; font: inherit; font-size: 15px;
  font-weight: 700; outline: none;
}
.field input:focus { border-color: #fff; }
.field input[type=range] { width: 100%; accent-color: var(--rouge); }

/* boutons : plats, l'accent est la couleur, pas le relief */
button { font: inherit; cursor: pointer; border: none; transition: background .15s, border-color .15s, transform .06s; }
button.big {
  width: 100%; padding: 16px; font-size: 17px; letter-spacing: 3px;
  background: #fff; color: #000; margin-bottom: 12px;
  box-shadow: 8px 8px 0 rgba(255,77,61,.85);
}
button.big:hover { background: #f1f1f1; }
button.big:active { transform: translate(4px, 4px); box-shadow: 4px 4px 0 rgba(255,77,61,.85); }
button.ghost {
  padding: 12px 16px; background: rgba(255,255,255,.06); color: #fff; font-size: 13px;
  font-weight: 800; letter-spacing: 1px; border: 1px solid rgba(255,255,255,.18);
  text-transform: uppercase;
}
button.ghost:hover:not(:disabled) { background: rgba(255,77,61,.18); border-color: var(--rouge); }
button.ghost:disabled { opacity: .3; cursor: default; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.team-blue { border-color: var(--bleu) !important; color: var(--bleu-cl); }
.team-blue:hover { background: rgba(61,127,242,.18) !important; }
.team-red  { border-color: var(--rouge) !important; color: var(--rouge-cl); }

.sep { display: flex; align-items: center; gap: 14px; margin: 20px 0 16px; }
.sep::before, .sep::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,.12); }
.sep span { font-size: 11px; text-transform: uppercase; letter-spacing: 2px; opacity: .45; white-space: nowrap; font-weight: 800; }

.joinrow { display: flex; gap: 10px; }
.joinerr { min-height: 18px; margin-top: 10px; font-size: 13px; color: var(--rouge-cl); font-weight: 700; }
button.wide { width: 100%; margin-top: 18px; }


/* choix de classe : memes fiches que l'onglet CLASSES de l'accueil */
.classsub { font-size: 15px; opacity: .55; margin: -18px 0 30px; letter-spacing: 1px; }
.classsub b { color: var(--rouge); letter-spacing: 5px; font-weight: 900; opacity: 1; font-size: 17px; }
.classlist { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.classlist button {
  padding: 28px 16px; background: rgba(255,255,255,.05); border: 1px solid var(--trait);
  border-top: 4px solid rgba(255,255,255,.2);
  color: #fff; text-align: center; line-height: 1.4;
}
.classlist button:hover { border-color: rgba(255,255,255,.4); border-top-color: var(--rouge); background: rgba(255,255,255,.08); }
.classlist button.on { border-top-color: var(--rouge); background: rgba(255,77,61,.16); border-color: rgba(255,77,61,.5); }
.classlist .ci { font-size: 46px; display: block; margin-bottom: 12px; }
.classlist .cn { font-size: 19px; font-weight: 900; display: block; text-transform: uppercase; letter-spacing: 1.5px; }
.classlist .cd { font-size: 13px; opacity: .55; display: block; margin: 10px 0 14px; min-height: 54px; line-height: 1.55; }
.classlist .cs { font-size: 14px; display: block; color: var(--rouge); font-weight: 800; }
.classlist.small button { padding: 14px 10px; border-top-width: 3px; }
.classlist.small .ci { font-size: 28px; margin-bottom: 6px; }
.classlist.small .cn { font-size: 15px; }
.classlist.small .cd { display: none; }
.classlist.small .cs { font-size: 13px; }

.wpick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.wpick button {
  padding: 12px 8px; background: rgba(255,255,255,.05); border: 1px solid var(--trait);
  color: #fff; font-size: 13px; font-weight: 700; line-height: 1.3;
}
.wpick button small { display: block; opacity: .45; font-size: 11px; }
.wpick button.on { border-color: var(--rouge); background: rgba(255,77,61,.16); }

.keys {
  display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; text-align: left;
  font-size: 13px; margin: 24px auto 0; width: fit-content; opacity: .75;
}

#fps { position: fixed; top: 8px; left: 14px; z-index: 8; font-size: 11px; opacity: .35; pointer-events: none; font-weight: 700; }
#roomTag {
  position: fixed; top: 24px; left: 14px; z-index: 8; font-size: 11px; pointer-events: none;
  opacity: .6; font-weight: 800; letter-spacing: 2px; text-transform: uppercase;
}
#roomTag b { color: var(--rouge); letter-spacing: 3px; font-weight: 900; }

#conn {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 30;
  background: var(--rouge); padding: 18px 30px; font-weight: 900; letter-spacing: 2px;
  text-transform: uppercase;
}
/* ============================ Ecrans etroits : on simplifie progressivement */
/* la colonne de droite passe dessous, en bandeau */
@media (max-width: 1180px) {
  .wz-body { grid-template-columns: minmax(0,1fr); }
  .wz-left { justify-content: flex-start; overflow: visible; }
  .wz-right { flex-direction: row; flex-wrap: wrap; overflow: visible; margin-top: 18px; }
  .wz-right .wz-card { flex: 1 1 240px; }
  .wz-hero { display: none; }
  .srv-list { max-height: none; }
}
/* on retire la colonne TYPE : le mode est de toute facon unique pour l'instant */
@media (max-width: 1000px) {
  .srv-head, .srv-list button { grid-template-columns: minmax(0,1fr) 118px 76px 62px; }
  .srv-head .c-mode, .srv-list .s-mode { display: none; }
}
/* puis la colonne ETAT */
@media (max-width: 720px) {
  .srv-head, .srv-list button { grid-template-columns: minmax(0,1fr) 70px 58px; }
  .srv-head .c-phase, .srv-list .s-phase { display: none; }
  .srv-foot { flex-direction: column; }
  .srv-foot .wz-join, .srv-foot .wz-start { flex: 1 1 auto; width: 100%; }
  .wz-nav { gap: 10px; overflow-x: auto; }
  .wz-chip input { width: 78px; }
}

/* ------------------------------------------ Fenetres etroites : on compacte */
@media (max-width: 900px) {
  #hpbar { width: 150px; height: 16px; }
  #hpnum { font-size: 26px; min-width: 52px; }
  #ammo { font-size: 30px; }
  #chatlog { width: 330px; bottom: 132px; }
  #chatinput { width: 270px; }
  #killfeed { width: 250px; font-size: 12px; top: 120px; }
  #tools .tool { padding: 3px 7px; font-size: 10px; }
  #palette .sw { width: 21px; height: 21px; }
  #topbar .score { font-size: 22px; }
  #intelState { display: none; }
}
