/* ============================================================
   PvP Arena · Stadium Mono
   Palette restreinte · accent unique #E63946 (sang)
   Typo : Geist + Geist Mono
   ============================================================ */

/* ---------- 1. TOKENS ---------- */
:root {
  /* Surfaces (sombre charbon) */
  --bg-0:        #0B0D10;   /* fond global */
  --bg-1:        #101317;   /* surface card */
  --bg-2:        #14181D;   /* surface inset */
  --bg-3:        #1A1F25;   /* hover / row alt */
  --bg-4:        #232931;   /* dividers actifs */

  /* Lignes */
  --line-1:      #1F252C;
  --line-2:      #2A323B;
  --line-3:      #3A434E;

  /* Texte */
  --tx-0:        #F2F4F7;
  --tx-1:        #D6DAE0;
  --tx-2:        #98A0AB;
  --tx-3:        #6A727D;
  --tx-4:        #4A525B;

  /* Accent (UNIQUE) - rouge sang amélioré */
  --accent:      #E63946;
  --accent-ink:  #FFFFFF;
  --accent-dim:  #C8313D;
  --accent-rgb:  230, 57, 70;   /* source rgb de l'accent -> pvpnew.css l'override en violet */
  --accent-fade: rgba(230, 57, 70, 0.18);
  --accent-glow: rgba(230, 57, 70, 0.35);

  /* États */
  --ok:          #6FE39B;
  --warn:        #F0B450;
  --err:         #F26B6B;
  --live:        #6FE39B;

  /* Tier (améliorés) */
  --t-bronze:    #CC8040;
  --t-silver:    #B2BBC2;
  --t-gold:      #F0C240;
  --t-platinum:  #4ECAD1;
  --t-diamond:   #8A8CF8;
  --t-master:    #D585F0;
  --t-gm:        #F08A8A;
  --t-gm-glow:   rgba(240, 138, 138, 0.25);

  /* Radii */
  --r-sm: 4px;
  --r-md: 6px;
  --r-lg: 10px;
  --r-xl: 14px;

  /* Type ramp */
  --f-sans: "Geist", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Spacing */
  --gap: 16px;
  --gap-lg: 24px;

  /* Padding horizontal de page (responsive : 16px mobile → 64px ultra-wide) */
  --page-pad: clamp(16px, 3.2vw, 64px);
}

/* ---------- 2. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility; }
body {
  background: var(--bg-0);
  color: var(--tx-1);
  font-family: var(--f-sans);
  font-size: 14px;
  line-height: 1.45;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }
ul, ol { list-style: none; margin: 0; padding: 0; }
svg { display: block; width: 16px; height: 16px; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--accent-ink); }

.mono { font-family: var(--f-mono); font-feature-settings: "tnum" on, "zero" on; letter-spacing: -0.01em; }

/* ---------- 3. SUBTLE BG GRID ---------- */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

/* ---------- 4. TOPBAR ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,13,16,0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-1);
  overflow: hidden; /* coupe les sub-pixels qui dépassent sur petit écran */
}
.topbar__inner {
  max-width: none; width: 100%;
  padding: 14px var(--page-pad);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand__mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: transparent;
  border-radius: var(--r-md);
  overflow: hidden;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px var(--line-2);
}
.brand__mark svg { width: 22px; height: 22px; }
.brand__logo {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__title {
  font-weight: 700; letter-spacing: -0.02em;
  font-size: 16px; color: var(--tx-0);
}
.brand__sub {
  font-family: var(--f-mono);
  font-size: 10.5px; color: var(--tx-3);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-top: 4px;
}

.nav {
  display: flex;
  gap: 4px;
  justify-self: start;
  align-items: center;
  height: 100%;
}
.nav__item {
  position: relative;
  font-size: 13.5px;
  color: var(--tx-2);
  padding: 10px 14px;
  font-weight: 500;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  transition: color 140ms ease;
}
.nav__item:hover { color: var(--tx-0); }
.nav__item.is-active {
  color: var(--tx-0);
  font-weight: 600;
}
.nav__item.is-active::after {
  content: '';
  position: absolute;
  left: 14px; right: 14px; bottom: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  animation: navSlide 240ms cubic-bezier(.22, .9, .3, 1.1);
  transform-origin: left center;
}
@keyframes navSlide {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.topbar__actions { display: flex; align-items: center; gap: 12px; }

.icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  color: var(--tx-2);
  transition: color 120ms, background 120ms;
}
.icon-btn:hover { color: var(--tx-0); background: var(--bg-2); }
.icon-btn--label {
  width: auto;
  height: 36px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--line-2);
  font-size: 12.5px;
  font-weight: 500;
}
.icon-btn--label svg { width: 16px; height: 16px; }
.icon-btn--label:hover { border-color: var(--line-3); }
@media (max-width: 720px) {
  .icon-btn--label .icon-btn__label { display: none; }
  .icon-btn--label { width: 36px; padding: 0; border: 0; }
}

/* Bouton Règles : rouge foncé qui tape à l'oeil (demande ratox 2026-07-12) */
#rules-toggle {
  border-color: rgba(220, 38, 38, .6);
  color: #ffd9d9;
  background: linear-gradient(180deg, rgba(180, 22, 22, .24), rgba(120, 12, 12, .12));
  box-shadow: 0 0 0 1px rgba(220, 38, 38, .12), 0 6px 18px rgba(180, 20, 20, .22);
  animation: rulesPulse 2.4s ease-in-out infinite;
}
#rules-toggle:hover {
  border-color: rgba(239, 68, 68, .95);
  color: #fff;
  background: linear-gradient(180deg, rgba(200, 26, 26, .36), rgba(140, 14, 14, .2));
}
#rules-toggle svg { color: #ff6b6b; }
@keyframes rulesPulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(220, 38, 38, .12), 0 6px 18px rgba(180, 20, 20, .2); }
  50% { box-shadow: 0 0 0 1px rgba(239, 68, 68, .38), 0 8px 26px rgba(220, 38, 38, .42); }
}
@media (prefers-reduced-motion: reduce) { #rules-toggle { animation: none; } }

/* Bouton rafraîchir du classement accueil (demande ratox 2026-07-12) */
.card__head-actions { display: inline-flex; align-items: center; gap: 8px; }
#lb-refresh.is-loading svg { animation: lbSpin .7s linear infinite; }
@keyframes lbSpin { to { transform: rotate(360deg); } }

/* Bouton "Appeler un staff" dans le chat en match (demande ratox 2026-07-12) */
.chat__head-actions { display: inline-flex; align-items: center; gap: 8px; }
.chat__call-staff {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 8px; font: inherit; font-size: 12px; font-weight: 600;
  cursor: pointer; border: 1px solid rgba(245, 179, 66, .4);
  color: #f5c15a; background: rgba(245, 179, 66, .08);
  transition: background .15s, border-color .15s;
}
.chat__call-staff:hover { background: rgba(245, 179, 66, .16); border-color: rgba(245, 179, 66, .7); }
.chat__call-staff:disabled { opacity: .5; cursor: default; }
.chat__call-staff svg { width: 14px; height: 14px; }
@media (max-width: 720px) { .chat__call-staff span { display: none; } .chat__call-staff { padding: 6px; } }

.lang-switch {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--tx-3);
  padding: 0 6px;
}
.lang-switch__opt {
  padding: 6px 4px;
  letter-spacing: 0.06em;
  color: var(--tx-3);
  transition: color 120ms;
}
.lang-switch__opt:hover { color: var(--tx-1); }
.lang-switch__opt.is-active { color: var(--tx-0); }
.lang-switch__sep { color: var(--line-3); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  font-size: 13px; font-weight: 500;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  transition: background 120ms, color 120ms, border-color 120ms, transform 80ms;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { cursor: not-allowed; opacity: 0.55; }
.btn svg { width: 14px; height: 14px; }
.btn--sm { padding: 11px 18px; font-size: 14px; min-height: 42px; gap: 9px; }
.btn--sm svg { width: 16px; height: 16px; }

.btn--ghost {
  background: var(--bg-2); color: var(--tx-1);
  border-color: var(--line-2);
}
.btn--ghost:hover:not(:disabled) { background: var(--bg-3); border-color: var(--line-3); color: var(--tx-0); }

.btn--accent {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  border: 1px solid rgba(230, 57, 70, 0.3);
  box-shadow: 0 2px 4px rgba(230, 57, 70, 0.2);
  transition: all 0.2s cubic-bezier(0.2, 0, 0.1, 1);
}
.btn--accent:hover:not(:disabled) {
  background: #E63946;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3), inset 0 0 0 1px var(--accent-glow);
}
.btn--accent:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(230, 57, 70, 0.2);
}

.btn--danger {
  background: transparent; color: var(--err);
  border-color: rgba(242,107,107,0.35);
}
.btn--danger:hover:not(:disabled) { background: rgba(242,107,107,0.08); border-color: var(--err); color: var(--err); }

.btn--discord {
  background: var(--bg-2); color: var(--tx-0);
  border-color: var(--line-2);
}
.btn--discord:hover { background: var(--bg-3); border-color: var(--line-3); }
.btn--discord svg { width: 16px; height: 16px; color: #DC2730; }

.btn--cta {
  width: 100%;
  background: linear-gradient(135deg, var(--accent), #E63946 60%, #C8313D);
  color: var(--accent-ink);
  padding: 18px 16px;
  border-radius: var(--r-md);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(230, 57, 70, 0.5);
  box-shadow: 0 4px 20px rgba(230, 57, 70, 0.3), inset 0 0 0 1px var(--accent-glow);
  transition: all 0.25s cubic-bezier(0.2, 0, 0.1, 1);
}
.btn--cta:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(230, 57, 70, 0.4), inset 0 0 0 1px rgba(230, 57, 70, 0.7);
}
.btn--cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.25), transparent);
  transform: translateX(-100%);
  transition: transform 800ms;
  pointer-events: none;
}
.btn--cta:hover:not(:disabled)::before {
  transform: translateX(100%);
}
.btn--cta:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 12px rgba(230, 57, 70, 0.3), inset 0 0 0 1px var(--accent-glow);
}
.btn--cta:disabled {
  background: var(--bg-2);
  color: var(--tx-3);
  border: 1px solid var(--line-2);
  box-shadow: none;
  opacity: 0.6;
}
.btn--cta:disabled {
  background: var(--bg-2); color: var(--tx-3);
  border: 1px solid var(--line-2);
}
.btn__main {
  font-size: 16px; font-weight: 700; letter-spacing: -0.01em;
}
.btn__sub {
  font-family: var(--f-mono);
  font-size: 10.5px; letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}
.btn--cta:disabled .btn__sub { color: var(--tx-3); opacity: 1; }

.user-block {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 4px 10px 4px 4px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
}
.user-block__avatar {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  background: var(--bg-3);
  object-fit: cover;
}
.user-block__meta {
  display: flex; flex-direction: column; line-height: 1.1;
  min-width: 0;
  max-width: 160px;
}
.user-block__name {
  font-size: 13px; font-weight: 500; color: var(--tx-0);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%;
}
.user-block__logout {
  font-family: var(--f-mono);
  font-size: 10px; letter-spacing: 0.06em;
  color: var(--tx-3); text-align: left;
  padding: 0; margin-top: 2px;
}
.user-block__logout:hover { color: var(--err); }

/* ---------- 5. STATS BAND ---------- */
.stats-band {
  /* top = hauteur réelle de la topbar desktop (~75px) : à 65px la barre passait ~10px SOUS
     la topbar au scroll (bord rogné). Sur mobile, override plus bas (topbar non-sticky, top:0). */
  position: sticky; top: 74px; z-index: 40;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line-1);
}
.stats-band__inner {
  max-width: none; width: 100%;
  padding: 10px var(--page-pad);
  display: flex; align-items: center; gap: 24px;
  font-size: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}
.stats-band__inner::-webkit-scrollbar { display: none; }
.stat { display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.stat__label {
  font-family: var(--f-mono);
  font-size: 10.5px; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tx-3);
}
.stat__value {
  font-family: var(--f-mono);
  font-size: 13px; font-weight: 500;
  color: var(--tx-0);
}
.stat--top .stat__value { display: inline-flex; gap: 8px; align-items: baseline; }
.stat--top .stat__value > span:first-child { font-family: var(--f-sans); font-weight: 500; }
.stat__elo { color: var(--accent); }
.stat-sep {
  width: 1px; height: 14px; background: var(--line-2);
}
.stat--right { margin-left: auto; }
.stat__clock { color: var(--tx-2); font-size: 12px; }

.stat__pip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono);
  font-size: 10.5px; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--live);
  font-weight: 600;
}
.pulse {
  width: 7px; height: 7px;
  background: var(--live);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 0 0 currentColor;
  animation: pulse 1.6s ease-out infinite;
}
/* Halo VERT (comme --live #6FE39B) : ce pulse anime des indicateurs "live/en match" verts.
   Avant il propageait un halo rouge (242,107,107) autour d'un point vert = incohérent. */
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(111,227,155,0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(111,227,155,0); }
  100% { box-shadow: 0 0 0 0 rgba(111,227,155,0); }
}

/* ---------- 6. DISCLAIMER ---------- */
.disclaimer {
  max-width: none; width: 100%;
  padding: 12px var(--page-pad) 0;
  font-family: var(--f-mono);
  font-size: 10.5px; letter-spacing: 0.06em;
  color: var(--tx-4);
  text-transform: uppercase;
}

/* ---------- 7. MAIN GRID ---------- */
.main { max-width: none; width: 100%; padding: 24px var(--page-pad); }
.main__grid {
  display: grid;
  grid-template-columns: minmax(360px, 460px) 1fr;
  gap: var(--gap-lg);
  align-items: start;
}
.col { display: flex; flex-direction: column; gap: var(--gap-lg); min-width: 0; }

/* ---------- 8. CARD ---------- */
.card {
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  padding: 24px;
  position: relative;
}
.card--inset {
  background: var(--bg-2);
  border-color: var(--line-2);
}
.card__head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}
.card__title-wrap { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.card__eyebrow {
  font-size: 10.5px; letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tx-3);
}
.card__title {
  font-size: 14px; font-weight: 600; color: var(--tx-0);
  margin: 0; letter-spacing: -0.01em;
}
.card__title-lg {
  font-size: 22px; font-weight: 700; color: var(--tx-0);
  margin: 0; letter-spacing: -0.02em;
}
.card__title-xl {
  font-size: 28px; font-weight: 700; color: var(--tx-0);
  margin: 0; letter-spacing: -0.025em;
  line-height: 1.05;
}
.card--prime { background: linear-gradient(180deg, var(--bg-1) 0%, #0F1318 100%); }

/* ---------- 9. STATE PILL (queue) ---------- */
.state-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 10px 6px 8px;
  font-family: var(--f-mono);
  font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  color: var(--tx-2);
  flex-shrink: 0;
}
.state-pill__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--tx-3);
}
.state-pill[data-state="queued"]   { color: var(--accent); border-color: rgba(220, 39, 48,0.35); background: var(--accent-fade); }
.state-pill[data-state="queued"] .state-pill__dot { background: var(--accent); animation: pulse-accent 1.6s ease-out infinite; }
.state-pill[data-state="found"]    { color: var(--accent); }
.state-pill[data-state="found"] .state-pill__dot { background: var(--accent); }
.state-pill[data-state="match"]    { color: var(--live); border-color: rgba(242,107,107,0.35); }
.state-pill[data-state="match"] .state-pill__dot { background: var(--live); animation: pulse 1.6s ease-out infinite; }
@keyframes pulse-accent {
  0%   { box-shadow: 0 0 0 0 rgba(220, 39, 48,0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(220, 39, 48,0); }
  100% { box-shadow: 0 0 0 0 rgba(220, 39, 48,0); }
}

/* ---------- 10. ALERTS ---------- */
.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  margin-bottom: 16px;
}
.alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.alert--warn { background: rgba(240,180,80,0.06); border: 1px solid rgba(240,180,80,0.25); color: var(--warn); }
.alert--err  { background: rgba(242,107,107,0.06); border: 1px solid rgba(242,107,107,0.25); color: var(--err); }

/* Bandeau "adversaire ne répond plus" (2026-07-21) : affiché en match quand l'adversaire
   n'a plus donné signe de vie. Aide le joueur présent à vérifier / appeler un staff. */
.match-absent { margin-bottom: 14px; animation: matchAbsentIn .25s ease-out; }
.match-absent__body { display: flex; flex-direction: column; gap: 5px; }
.match-absent__body strong { font-size: 13px; font-weight: 700; }
.match-absent__body span { color: rgba(232,228,242,.82); font-size: 12.5px; line-height: 1.45; }
.match-absent__btn { align-self: flex-start; margin-top: 5px; background: rgba(240,180,80,.14); border: 1px solid rgba(240,180,80,.5); color: var(--warn); }
.match-absent__btn:hover { background: rgba(240,180,80,.22); border-color: rgba(240,180,80,.7); }
@keyframes matchAbsentIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------- 11. SEA PICKER ---------- */
.sea-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.sea-opt {
  display: flex; flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px 14px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  text-align: left;
  position: relative;
  transition: border-color 120ms, background 120ms;
}
.sea-opt:hover { border-color: var(--line-3); }
.sea-opt.is-active {
  border-color: var(--accent);
  background: var(--accent-fade);
}
.sea-opt__num {
  font-size: 10px; letter-spacing: 0.1em;
  color: var(--tx-3);
}
.sea-opt.is-active .sea-opt__num { color: var(--accent); }
.sea-opt__name {
  font-size: 14px; font-weight: 600; color: var(--tx-0);
}
.sea-opt__count {
  position: absolute; top: 12px; right: 12px;
  font-size: 11px; color: var(--tx-2);
  padding: 2px 6px;
  background: var(--bg-3);
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
}
.sea-opt.is-active .sea-opt__count { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

/* ---------- 12. TOGGLE ---------- */
.toggle {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  cursor: pointer;
  margin-bottom: 16px;
}
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle__track {
  width: 36px; height: 20px;
  background: var(--bg-3); border: 1px solid var(--line-3);
  border-radius: 999px;
  position: relative;
  transition: background 120ms, border-color 120ms;
  flex-shrink: 0;
}
.toggle__thumb {
  position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: var(--tx-2);
  border-radius: 50%;
  transition: transform 160ms ease, background 120ms;
}
.toggle input:checked + .toggle__track { background: var(--accent); border-color: var(--accent); }
.toggle input:checked + .toggle__track .toggle__thumb { transform: translateX(16px); background: var(--accent-ink); }
.toggle__label { font-size: 13.5px; font-weight: 500; color: var(--tx-0); }
.toggle__hint {
  font-family: var(--f-mono);
  font-size: 10.5px; letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tx-3);
}

/* ---------- 13. QUEUE META ---------- */
.queue-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  margin-top: 16px;
  overflow: hidden;
}
.queue-meta__cell {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 14px;
  background: var(--bg-1);
}
.queue-meta__k {
  font-size: 10px; letter-spacing: 0.1em;
  color: var(--tx-3);
}
.queue-meta__v {
  font-size: 18px; font-weight: 600; color: var(--tx-0);
  letter-spacing: -0.01em;
}
/* Compteur de joueurs dans la file (demande 3wht 2026-07-25) : en bleu pour ressortir.
   Selecteur par id -> prioritaire sur .queue-meta__v quel que soit le fichier de theme. */
#queue-count { color: #4E9BF8; }

/* ---------- 14. PROFILE ---------- */
.profile { display: flex; flex-direction: column; gap: 20px; }
.profile-empty {
  text-align: center; padding: 32px 16px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-md);
}
.profile-empty__title { font-size: 15px; font-weight: 600; color: var(--tx-0); margin: 0 0 6px; }
.profile-empty__sub { font-size: 13px; color: var(--tx-2); margin: 0; }

.profile__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-1);
}
.profile__avatar {
  width: 64px; height: 64px;
  border-radius: var(--r-md);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  object-fit: cover;
}
.profile__id { min-width: 0; }
.profile__name-row { display: flex; align-items: center; gap: 10px; }
.profile__name {
  font-size: 22px; font-weight: 700;
  color: var(--tx-0);
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.profile__roblox {
  display: inline-flex; gap: 8px; align-items: baseline;
  margin-top: 6px;
}
.profile__roblox-k {
  font-size: 10px; letter-spacing: 0.1em; color: var(--tx-3);
}
.profile__roblox-v { font-size: 13px; color: var(--tx-1); }

.flag {
  font-size: 16px; line-height: 1;
  /* Force Twemoji webfont (cf. <style> in pvp.html) pour que les regional
     indicator emojis s'affichent en image partout, y compris Windows
     (qui les rend comme "FR" / "DE" / etc. avec la police système). */
  font-family: 'Twemoji Country Flags', 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', system-ui;
  font-feature-settings: normal;
}
.flag--lg { font-size: 18px; }

.rank-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  color: var(--tx-1);
  transition: all 0.2s cubic-bezier(0.2, 0, 0.1, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.rank-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.rank-pill__icon {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--t-bronze);
  transform: rotate(45deg);
  transition: transform 0.2s;
}
.rank-pill:hover .rank-pill__icon {
  transform: rotate(45deg) scale(1.2);
}
.rank-pill[data-tier="bronze"] {
  border-color: rgba(204, 128, 64, 0.4);
}
.rank-pill[data-tier="bronze"] .rank-pill__icon { background: var(--t-bronze); }
.rank-pill[data-tier="silver"] {
  border-color: rgba(178, 187, 194, 0.4);
}
.rank-pill[data-tier="silver"] .rank-pill__icon { background: var(--t-silver); }
.rank-pill[data-tier="gold"] {
  border-color: rgba(240, 194, 64, 0.5);
}
.rank-pill[data-tier="gold"] .rank-pill__icon { background: var(--t-gold); }
.rank-pill[data-tier="platinum"] {
  border-color: rgba(78, 202, 209, 0.5);
}
.rank-pill[data-tier="platinum"] .rank-pill__icon { background: var(--t-platinum); }
.rank-pill[data-tier="diamond"] {
  border-color: rgba(138, 140, 248, 0.5);
}
.rank-pill[data-tier="diamond"] .rank-pill__icon { background: var(--t-diamond); }
.rank-pill[data-tier="master"] {
  border-color: rgba(213, 133, 240, 0.5);
}
.rank-pill[data-tier="master"] .rank-pill__icon { background: var(--t-master); }
.rank-pill[data-tier="gm"] {
  border-color: rgba(240, 138, 138, 0.6);
  background: linear-gradient(135deg, rgba(230, 100, 100, 0.1), rgba(240, 138, 138, 0.15));
  box-shadow: 0 2px 8px rgba(240, 138, 138, 0.2);
}
.rank-pill[data-tier="gm"] .rank-pill__icon {
  background: var(--t-gm);
  box-shadow: 0 0 8px var(--t-gm-glow);
}

.profile__bounty {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
}
.profile__bounty-k { font-size: 10px; letter-spacing: 0.1em; color: var(--tx-3); }
.profile__bounty-v { font-size: 17px; font-weight: 600; color: var(--tx-0); }

.profile__loadout-k,
.profile__ranks-k {
  display: block;
  font-size: 10px; letter-spacing: 0.12em;
  color: var(--tx-3);
  margin-bottom: 10px;
}

.loadout {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  overflow: hidden;
}
.loadout__slot {
  display: flex; flex-direction: column;
  gap: 6px;
  padding: 12px 10px;
  background: var(--bg-1);
}
.loadout__k {
  font-family: var(--f-mono);
  font-size: 9.5px; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tx-3);
}
.loadout__v {
  font-size: 13px; font-weight: 500; color: var(--tx-0);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.loadout__v--rich {
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap; overflow: hidden;
}
.loadout__icon {
  flex: 0 0 auto;
  width: 28px; height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 2px;
  image-rendering: -webkit-optimize-contrast;
}
.loadout__lbl {
  font-size: 13px; font-weight: 500; color: var(--tx-0);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}

.profile__elo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.elo-block {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
}
.elo-block__k { font-size: 10px; letter-spacing: 0.12em; color: var(--tx-3); }
.elo-block__v {
  font-size: 26px; font-weight: 700;
  color: var(--tx-0);
  letter-spacing: -0.02em;
  line-height: 1;
}
.elo-block--peak .elo-block__v { color: var(--tx-2); }

.profile__progress { display: flex; flex-direction: column; gap: 8px; }
.prog-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px;
}
.prog-head__label { color: var(--tx-1); font-weight: 500; }
.prog-head__pts { color: var(--tx-3); font-size: 11px; }
.prog-bar {
  height: 6px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.prog-fill {
  display: block; height: 100%;
  background: var(--accent);
  border-radius: inherit;
  transition: width 400ms ease;
}

/* ---------- ELO SPARKLINE (profile card) ---------- */
.profile__spark {
  display: flex; flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
}
.profile__spark-head {
  display: flex; justify-content: space-between; align-items: baseline;
}
.profile__spark-k {
  font-size: 9.5px; letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tx-3);
}
.profile__spark-trend {
  font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
}
.profile__spark-trend--up   { color: var(--ok); }
.profile__spark-trend--down { color: var(--err); }
.profile__spark-trend--flat { color: var(--tx-3); }
.profile__spark-svg {
  width: 100%;
  height: 50px;
  overflow: visible;
}
.profile__spark-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 1px 4px rgba(220, 39, 48, 0.35));
}
.profile__spark-area {
  fill: url(#sparkGrad);
  opacity: 0.65;
}
.profile__spark-dot {
  fill: var(--accent);
  stroke: var(--bg-1);
  stroke-width: 2;
}
.profile__spark-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px; color: var(--tx-4);
  letter-spacing: 0.04em;
}
.profile__spark-meta span:nth-child(2) {
  color: var(--tx-3);
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ---------- CARD HEAD ACTIONS (multi-button) ---------- */
.card__head-actions {
  display: inline-flex; gap: 6px; align-items: center;
}
@media (max-width: 480px) {
  .btn__lbl-mobile-hide { display: none; }
}

.profile__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  overflow: hidden;
}
.kpi {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 14px;
  background: var(--bg-1);
}
.kpi__k { font-size: 9.5px; letter-spacing: 0.1em; color: var(--tx-3); }
.kpi__v { font-size: 18px; font-weight: 600; color: var(--tx-0); }

.rank-trail {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.rank-trail__item {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  font-family: var(--f-mono);
  font-size: 10.5px; letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tx-2);
}
.rank-trail__item .dot {
  width: 6px; height: 6px;
  border-radius: 2px; transform: rotate(45deg);
}
.rank-trail__item.is-current {
  color: var(--tx-0); border-color: var(--line-3);
}

/* ---------- 15. HISTORY ---------- */
.hist { display: flex; flex-direction: column; }
.hist__row {
  display: grid;
  grid-template-columns: auto 1fr auto auto auto;
  gap: 16px; align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line-1);
}
.hist__row:first-child { border-top: none; padding-top: 4px; }
.hist__row:last-child { padding-bottom: 4px; }
.hist__avatar {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  object-fit: cover;
}
.hist__name {
  font-size: 14px; font-weight: 500; color: var(--tx-0);
  display: flex; flex-direction: column; gap: 2px;
}
.hist__name-line {
  display: inline-flex; align-items: center; gap: 6px;
}
.hist__flag { font-size: 14px; line-height: 1; flex: 0 0 auto; }
.hist-full__flag { font-size: 14px; line-height: 1; margin-right: 4px; }
.hist__name small {
  font-family: var(--f-mono);
  font-size: 10px; letter-spacing: 0.06em;
  color: var(--tx-3);
}
.hist__result {
  font-family: var(--f-mono);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em;
  width: 24px; text-align: center;
  padding: 2px 0;
  border-radius: var(--r-sm);
}
.hist__result--w { color: var(--accent); background: var(--accent-fade); }
.hist__result--l { color: var(--err); background: rgba(242,107,107,0.08); }
.hist__delta {
  font-family: var(--f-mono);
  font-size: 12px; font-weight: 500;
  width: 44px; text-align: right;
}
.hist__delta--up { color: var(--accent); }
.hist__delta--down { color: var(--err); }
.hist__score {
  font-family: var(--f-mono);
  font-size: 12px; color: var(--tx-2);
  min-width: 36px; text-align: right;
}

/* ---------- 16. LEADERBOARD ---------- */
.lb-filters { display: flex; gap: 10px; }
.select {
  display: flex; flex-direction: column; gap: 4px;
}
.select__k {
  font-size: 9.5px; letter-spacing: 0.1em;
  color: var(--tx-3);
}
.select select {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  color: var(--tx-1);
  padding: 6px 28px 6px 10px;
  font-size: 12px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2398A0AB' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
  cursor: pointer;
}
.select select:hover { border-color: var(--line-3); color: var(--tx-0); }
.select select:focus { outline: none; border-color: var(--accent); }

.lb-head {
  display: grid;
  grid-template-columns: 56px 1fr 80px 80px 90px;
  gap: 12px;
  padding: 10px 12px;
  font-family: var(--f-mono);
  font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tx-3);
  border-bottom: 1px solid var(--line-1);
  margin-bottom: 4px;
}
.lb-head__elo, .lb-head__wl { text-align: right; }

.lb { display: flex; flex-direction: column; }
.lb__row {
  display: grid;
  grid-template-columns: 56px 1fr 80px 80px 90px;
  gap: 12px; align-items: center;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  transition: background 100ms;
  position: relative;
}
.lb__row:hover { background: var(--bg-2); }
.lb__row.is-me {
  background: var(--accent-fade);
  box-shadow: inset 0 0 0 1px rgba(220, 39, 48,0.35);
}
.lb__row.is-me::before {
  content: ""; position: absolute; left: -1px; top: 8px; bottom: 8px;
  width: 3px; background: var(--accent); border-radius: 2px;
}

.lb__rank {
  font-family: var(--f-mono);
  font-size: 13px; font-weight: 600;
  color: var(--tx-2);
  display: inline-flex; align-items: center; gap: 6px;
}
.lb__medal {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--f-mono);
  font-size: 11px; font-weight: 700;
  color: var(--accent-ink);
}
.lb__medal--1 { background: var(--t-gold); }
.lb__medal--2 { background: var(--t-silver); }
.lb__medal--3 { background: var(--t-bronze); }

.lb__player { display: flex; align-items: center; gap: 10px; min-width: 0; }
.lb__avatar {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  object-fit: cover;
  flex-shrink: 0;
}
.lb__name {
  font-size: 13.5px; font-weight: 500; color: var(--tx-0);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lb__country {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--tx-2);
  display: inline-flex; gap: 6px; align-items: center;
}
.lb__elo {
  font-family: var(--f-mono);
  font-size: 14px; font-weight: 600;
  color: var(--tx-0);
  text-align: right;
  letter-spacing: -0.01em;
}
.lb__wl {
  font-family: var(--f-mono);
  font-size: 12px; color: var(--tx-2);
  text-align: right;
}
.lb__wl strong { color: var(--accent); font-weight: 600; }

.lb-loading {
  padding: 16px 12px;
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tx-3);
}
.spinner {
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 1.5px solid var(--line-3);
  border-top-color: var(--accent);
  animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 17. MATCH ACTIVE ---------- */
.match-active {
  max-width: none; width: 100%;
  margin-top: 16px;
  padding: 0 var(--page-pad);
}
.match-active__bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px;
  background: linear-gradient(180deg, #131820 0%, #0F1318 100%);
  border: 1px solid var(--line-2);
  border-bottom: none;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
.match-active__title {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; color: var(--tx-0);
}
.match-active__sep { color: var(--line-3); }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.dot--live { background: var(--live); animation: pulse 1.6s ease-out infinite; }
.match-active__chrono {
  font-size: 18px; font-weight: 700; color: var(--accent);
  letter-spacing: -0.01em;
}

.match-active__grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 0;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  overflow: hidden;
}
.match-active__main {
  padding: 20px;
  display: flex; flex-direction: column; gap: 16px;
  border-right: 1px solid var(--line-1);
  min-width: 0;
}

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px;
  font-family: var(--f-mono);
  font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--r-sm);
  background: var(--bg-3);
  color: var(--tx-2);
  border: 1px solid var(--line-2);
}
.tag--live { color: var(--live); border-color: rgba(242,107,107,0.3); background: rgba(242,107,107,0.06); }
.tag--mono { color: var(--accent); }

.server-link {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  background: rgba(11, 13, 16, 0.55);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  border-radius: var(--r-md);
  padding: 10px 10px 10px 14px;
}
.server-link__url {
  font-family: var(--f-mono);
  font-size: 12px; color: var(--accent);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: 0.02em;
}

/* ---------- SERVER CARD (lien serveur privé prominent) ---------- */
.server-card {
  position: relative;
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.08), var(--bg-1) 72%);
  border: 1px solid rgba(var(--accent-rgb), 0.34);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  display: flex; flex-direction: column;
  gap: 14px;
  overflow: hidden;
}
.server-card__pulse {
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  border-radius: var(--r-lg);
  pointer-events: none;
  animation: serverCardPulse 2.4s ease-out infinite;
}
@keyframes serverCardPulse {
  0%   { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.22); }
  70%  { box-shadow: 0 0 0 8px rgba(var(--accent-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0); }
}
.server-card__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.server-card__head-title {
  display: flex; align-items: center; gap: 12px;
  min-width: 0;
}
.server-card__icon {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  background: rgba(var(--accent-rgb), 0.14);
  border: 1px solid rgba(var(--accent-rgb), 0.42);
  color: var(--accent);
  flex: 0 0 38px;
}
.server-card__icon svg { width: 20px; height: 20px; }
.server-card__eyebrow {
  display: block;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 2px;
  text-transform: uppercase;
}
.server-card__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--tx-0);
}
.server-card__badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  background: rgba(111, 227, 155, 0.10);
  border: 1px solid rgba(111, 227, 155, 0.40);
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--ok);
  font-weight: 700;
  flex-shrink: 0;
}
.server-card__badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(111, 227, 155, 0.6);
  animation: serverCardBadgePulse 1.8s ease-out infinite;
}
@keyframes serverCardBadgePulse {
  0%   { box-shadow: 0 0 0 0 rgba(111, 227, 155, 0.55); }
  70%  { box-shadow: 0 0 0 6px rgba(111, 227, 155, 0); }
  100% { box-shadow: 0 0 0 0 rgba(111, 227, 155, 0); }
}
.server-card__hint {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--tx-2);
}
.server-card__hint strong {
  color: var(--accent);
  font-weight: 600;
}
.server-card__cta {
  position: relative;
  width: 100%;
  display: flex; align-items: center; justify-content: center;
  gap: 12px;
  padding: 16px 22px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dim) 100%);
  color: var(--accent-ink);
  border: 1px solid rgba(255, 130, 140, 0.45);
  border-radius: var(--r-md);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 18px -10px rgba(230, 57, 70, 0.45);
  transition: transform 140ms cubic-bezier(.22,.9,.3,1.1), box-shadow 140ms, background 140ms;
}
.server-card__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -12px rgba(230, 57, 70, 0.55);
  background: linear-gradient(180deg, #F1505D 0%, var(--accent) 100%);
}
.server-card__cta:active { transform: translateY(0); }
.server-card__cta-icon { width: 18px; height: 18px; flex: 0 0 18px; }
.server-card__cta .btn__main { font-size: 16px; font-weight: 700; line-height: 1; }
.server-card__cta .btn__sub {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.72;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-left: 4px;
}
@media (max-width: 540px) {
  .server-card__cta { flex-wrap: wrap; gap: 6px; padding: 14px 18px; }
  .server-card__cta .btn__sub { width: 100%; text-align: center; }
}

/* VS */
.vs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px; align-items: center;
  padding: 24px 20px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
}
.vs__player {
  display: flex; align-items: center; gap: 14px;
  min-width: 0;
}
.vs__player--op { justify-content: flex-end; }
.vs__avatar {
  width: 56px; height: 56px;
  border-radius: var(--r-md);
  background: var(--bg-3);
  border: 1px solid var(--line-3);
  object-fit: cover;
  flex-shrink: 0;
}
.vs__meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vs__meta--right { text-align: right; }
.vs__name {
  font-size: 16px; font-weight: 600; color: var(--tx-0);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vs__sub {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--tx-2);
}
.vs__sub--right { justify-content: flex-end; }
.vs__sub .mono { color: var(--accent); font-weight: 600; }
.vs__divider {
  width: 60px; height: 60px;
  display: grid; place-items: center;
  position: relative;
}
.vs__divider::before, .vs__divider::after {
  content: ""; position: absolute;
  width: 24px; height: 1px; background: var(--line-3);
  top: 50%;
}
.vs__divider::before { left: -32px; }
.vs__divider::after  { right: -32px; }
.vs__label {
  font-family: var(--f-mono);
  font-size: 18px; font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
}

/* Report */
.report { display: flex; flex-direction: column; gap: 14px; }
.report__scores {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: end;
}
.report__dash {
  font-family: var(--f-mono);
  font-size: 24px; font-weight: 600;
  color: var(--tx-3);
  padding-bottom: 8px;
  text-align: center;
}
.report__attach {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 10px;
}
.report__attach-hint {
  font-family: var(--f-mono);
  font-size: 10.5px; letter-spacing: 0.06em;
  color: var(--tx-3);
}
.report__chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  width: 100%;
}
.report__actions {
  display: flex; gap: 8px;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid var(--line-1);
}
.report__actions .btn--ghost { margin-right: auto; }

/* Field / input */
.field { display: flex; flex-direction: column; gap: 6px; position: relative; }
.field__label {
  font-family: var(--f-mono);
  font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tx-3);
}
.field__hint {
  position: absolute; top: 0; right: 0;
  font-size: 10px; color: var(--tx-3);
}
.field__err {
  font-size: 11.5px; color: var(--err);
  min-height: 14px;
}
.field--full { grid-column: 1 / -1; }

.input {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: 13.5px;
  color: var(--tx-0);
  width: 100%;
  transition: border-color 120ms, background 120ms;
}
.input:hover { border-color: var(--line-3); }
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-fade);
}
.input--area { min-height: 72px; resize: vertical; padding-right: 60px; }
.input::placeholder { color: var(--tx-4); }

/* Chip preview */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 8px 4px 4px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  font-size: 11.5px;
  color: var(--tx-1);
}
.chip__thumb {
  width: 24px; height: 24px;
  border-radius: 2px;
  background: var(--bg-1);
  object-fit: cover;
}
.chip__rm {
  margin-left: 4px;
  color: var(--tx-3);
  cursor: pointer;
}
.chip__rm:hover { color: var(--err); }

/* Chat */
/* Le chat prend la hauteur de la colonne de gauche (grid stretch) SANS que ses propres
   messages ne l'agrandissent : son contenu (.chat__inner) est en position:absolute, donc il
   ne "gonfle" pas la ligne du grid -> c'est main qui fixe la hauteur, et la zone
   .chat__messages (min-height:0) SCROLLE quand il y a trop de messages, au lieu de rajouter
   de la place. Le header, le bandeau "revoir déclaration" et la barre de saisie restent
   épinglés (hors zone scrollable). Fix barre-en-bas + scroll, demande pouv 2026-07-09. */
/* Hauteur plafonnee (demande pouv 2026-07-21, ajustee : juste milieu) : le chat ne s'etire
   plus sur toute la colonne de gauche mais reste confortable. align-self:start + height
   plafonnee -> fenetre de conversation ni pleine hauteur ni trop courte ; le trop-plein de
   messages scrolle dans .chat__messages, la barre de saisie reste en bas. */
.chat { position: relative; display: flex; flex-direction: column; align-self: start; height: clamp(620px, 80vh, 730px); min-height: 0; max-height: none; overflow: hidden; }
.chat__inner { position: absolute; inset: 0; display: flex; flex-direction: column; }
.chat__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-1);
}
.chat__title { font-size: 14px; font-weight: 600; color: var(--tx-0); margin: 0; }
/* Colonne de droite du match : chat (hauteur fixe) + carte de rappel de la declaration
   adverse EN DESSOUS (demande pouv 2026-07-21). */
.match-active__side { display: flex; flex-direction: column; gap: 12px; min-width: 0; align-self: start; }
.match-active__side .chat { align-self: stretch; }

/* Carte "L'adversaire a declare le resultat", SOUS le chat : grande, detaillee, avec le recap
   du score. Cliquable -> rouvre la confirmation. Couleur selon le verdict (rouge/vert/ambre). */
.review-recall {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 15px 17px; border-radius: 14px; cursor: pointer;
  background: linear-gradient(180deg, color-mix(in srgb, var(--warn) 15%, var(--bg-1)), var(--bg-1));
  border: 1px solid color-mix(in srgb, var(--warn) 48%, transparent);
  box-shadow: 0 8px 26px rgba(0,0,0,.34);
  color: var(--tx-0); font-family: var(--f-sans);
  --recall-glow: 245, 179, 66;
  transition: transform .15s, border-color .2s, box-shadow .2s;
  animation: recallBlink 10s ease-in-out infinite;
}
.review-recall:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--warn) 78%, transparent); }
.review-recall__icon {
  flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--warn) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent);
}
.review-recall__icon svg { width: 22px; height: 22px; color: var(--warn); }
.review-recall__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.review-recall__title { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--warn); }
.review-recall__verdict { font-size: 14.5px; font-weight: 700; color: var(--tx-0); line-height: 1.25; }
.review-recall__cta { font-size: 12px; font-weight: 600; color: var(--tx-2); }
.review-recall__score {
  flex: none; align-self: center; font-size: 18px; font-weight: 800; letter-spacing: .04em; color: var(--tx-0);
  padding: 8px 14px; border-radius: 11px; background: rgba(255,255,255,.05); border: 1px solid var(--line-2); white-space: nowrap;
}
/* Double clignotement toutes les 10s (calme le reste du temps) pour reperer la carte a
   l'ecran ; la couleur du flash suit le verdict via --recall-glow (ambre/rouge/vert). */
@keyframes recallBlink {
  0%   { box-shadow: 0 8px 26px rgba(0,0,0,.34), 0 0 0 0 rgba(var(--recall-glow), 0); }
  2%   { box-shadow: 0 8px 30px rgba(0,0,0,.34), 0 0 26px 4px rgba(var(--recall-glow), .85); }
  4%   { box-shadow: 0 8px 26px rgba(0,0,0,.34), 0 0 6px 0 rgba(var(--recall-glow), .12); }
  6%   { box-shadow: 0 8px 30px rgba(0,0,0,.34), 0 0 26px 4px rgba(var(--recall-glow), .85); }
  9%   { box-shadow: 0 8px 26px rgba(0,0,0,.34), 0 0 0 0 rgba(var(--recall-glow), 0); }
  100% { box-shadow: 0 8px 26px rgba(0,0,0,.34), 0 0 0 0 rgba(var(--recall-glow), 0); }
}
/* Verdict = defaite (l'adversaire dit avoir gagne) -> rouge */
.review-recall[data-result="loss"] { --recall-glow: 255, 90, 90; border-color: rgba(255,90,90,.6); background: linear-gradient(180deg, rgba(255,70,70,.12), var(--bg-1)); }
.review-recall[data-result="loss"] .review-recall__title { color: #ff7a7a; }
.review-recall[data-result="loss"] .review-recall__icon { background: rgba(255,70,70,.16); border-color: rgba(255,70,70,.42); }
.review-recall[data-result="loss"] .review-recall__icon svg { color: #ff7a7a; }
/* Verdict = victoire (l'adversaire te declare gagnant) -> vert neon */
.review-recall[data-result="win"] { --recall-glow: 72, 255, 156; border-color: rgba(72,255,156,.55); background: linear-gradient(180deg, rgba(52,255,140,.1), var(--bg-1)); }
.review-recall[data-result="win"] .review-recall__title { color: #4dffa0; }
.review-recall[data-result="win"] .review-recall__icon { background: rgba(52,255,140,.14); border-color: rgba(52,255,140,.4); }
.review-recall[data-result="win"] .review-recall__icon svg { color: #4dffa0; }

/* Raccourci compact dans la barre du haut, a cote de "Sea x - Region". */
.match-active__review-pill {
  display: inline-flex; align-items: center; gap: 7px; margin-left: 4px;
  padding: 5px 11px; border-radius: 999px; cursor: pointer;
  font-size: 12px; font-weight: 700; font-family: var(--f-sans); line-height: 1;
  color: var(--warn);
  --recall-glow: 245, 179, 66;
  background: color-mix(in srgb, var(--warn) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent);
  transition: background .2s, border-color .2s, transform .15s;
  animation: pillBlink 10s ease-in-out infinite;
}
.match-active__review-pill:hover { background: color-mix(in srgb, var(--warn) 26%, transparent); transform: translateY(-1px); }
.match-active__review-pill svg { width: 14px; height: 14px; flex: none; }
.match-active__review-pill[data-result="loss"] { --recall-glow: 255, 90, 90; color: #ff7a7a; background: rgba(255,70,70,.14); border-color: rgba(255,70,70,.42); }
.match-active__review-pill[data-result="win"] { --recall-glow: 72, 255, 156; color: #4dffa0; background: rgba(52,255,140,.13); border-color: rgba(52,255,140,.4); }
/* Meme cadence de clignotement que la carte (synchronise : les deux apparaissent ensemble). */
@keyframes pillBlink {
  0%   { box-shadow: 0 0 0 0 rgba(var(--recall-glow), 0); }
  2%   { box-shadow: 0 0 13px 2px rgba(var(--recall-glow), .85); }
  4%   { box-shadow: 0 0 2px 0 rgba(var(--recall-glow), .12); }
  6%   { box-shadow: 0 0 13px 2px rgba(var(--recall-glow), .85); }
  9%   { box-shadow: 0 0 0 0 rgba(var(--recall-glow), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--recall-glow), 0); }
}
@media (max-width: 620px) { .match-active__review-pill span { display: none; } .match-active__review-pill { padding: 5px 7px; } }
@media (prefers-reduced-motion: reduce) {
  .review-recall, .match-active__review-pill { animation: none !important; }
}
.chat__messages {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 16px 20px;
  display: flex; flex-direction: column; gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-3) transparent;
}
.chat__messages::-webkit-scrollbar { width: 6px; }
.chat__messages::-webkit-scrollbar-thumb { background: var(--line-3); border-radius: 3px; }

.msg { display: flex; flex-direction: column; gap: 5px; max-width: 84%; align-self: flex-start; align-items: flex-start; }
.msg--me { align-self: flex-end; align-items: flex-end; }
.msg__head { display: inline-flex; align-items: baseline; gap: 8px; padding: 0 3px; }
.msg__author { font-size: 12px; font-weight: 700; color: var(--tx-1); }
.msg--me .msg__author { color: var(--accent); }
.msg__time { font-family: var(--f-mono); font-size: 10px; color: var(--tx-3); }
/* Bulle joueur : fond distinct, coins facon messagerie (adversaire a gauche, moi a droite) */
.msg__bubble {
  font-size: 13px; color: var(--tx-1); line-height: 1.5;
  word-wrap: break-word; overflow-wrap: anywhere;
  background: var(--bg-2); border: 1px solid var(--line-1);
  padding: 9px 13px; border-radius: 3px 13px 13px 13px;
}
.msg--me .msg__bubble {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--tx-0);
  border-radius: 13px 3px 13px 13px;
}
/* Score mis en avant (pastille) dans les messages systeme de declaration */
.msg__score {
  font-family: var(--f-mono); font-weight: 800; font-size: 12.5px;
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent);
  padding: 1px 9px; border-radius: 999px; letter-spacing: .06em;
  white-space: nowrap; margin: 0 1px;
}
/* === Message SYSTEME : carte jaune encadree, tres distincte === */
.msg--system, .msg--staff {
  max-width: 100%; align-self: stretch; align-items: stretch; gap: 6px;
  padding: 10px 14px; border-radius: 12px;
}
.msg--system {
  background: linear-gradient(180deg, color-mix(in srgb, var(--warn) 13%, transparent), color-mix(in srgb, var(--warn) 5%, transparent));
  border: 1px solid color-mix(in srgb, var(--warn) 42%, transparent);
  border-left: 3px solid var(--warn);
}
.msg--system .msg__head { padding: 0; }
.msg--system .msg__author {
  color: var(--warn); font-weight: 800; font-size: 10.5px;
  text-transform: uppercase; letter-spacing: .14em;
  display: inline-flex; align-items: center; gap: 6px;
}
.msg--system .msg__author::before {
  content: ''; width: 13px; height: 13px; flex: none; display: inline-block;
  background-color: var(--warn);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 100 20 10 10 0 000-20zm0 4.1a1.4 1.4 0 110 2.8 1.4 1.4 0 010-2.8zM14.1 17h-4.2v-1.5H11V12h-1V10.5h2.6v5H14.1V17z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 2a10 10 0 100 20 10 10 0 000-20zm0 4.1a1.4 1.4 0 110 2.8 1.4 1.4 0 010-2.8zM14.1 17h-4.2v-1.5H11V12h-1V10.5h2.6v5H14.1V17z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.msg--system .msg__time { color: color-mix(in srgb, var(--warn) 75%, var(--tx-3)); }
.msg--system .msg__bubble {
  background: none; border: none; padding: 0;
  color: var(--tx-0); font-weight: 500; font-size: 13px;
}
/* === Message STAFF : carte violette encadree === */
.msg--staff {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 13%, transparent), color-mix(in srgb, var(--accent) 5%, transparent));
  border: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
  border-left: 3px solid var(--accent);
}
.msg--staff .msg__author {
  color: var(--accent); font-weight: 800; font-size: 10.5px;
  text-transform: uppercase; letter-spacing: .14em;
}
.msg--staff .msg__bubble { background: none; border: none; padding: 0; color: var(--tx-0); font-weight: 500; }
.msg__attach {
  margin-top: 4px;
  max-width: 220px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  overflow: hidden;
}
.msg__attach img { width: 100%; height: auto; display: block; }

.chat__form {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px; align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--line-1);
  background: var(--bg-1);
}
.chat__input { padding: 8px 10px; font-size: 13px; }
.icon-btn--inline { width: 32px; height: 32px; }

/* - Chat attachments preview (chips au-dessus du form) - */
.chat__attach-preview {
  display: flex; flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px 0;
  border-top: 1px solid var(--line-1);
  background: var(--bg-1);
}
.chat__attach-preview[hidden] { display: none; }
.chat-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px;
  padding: 0 8px 0 4px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  font-size: 11.5px;
  color: var(--tx-1);
  position: relative;
  animation: chipIn 220ms cubic-bezier(.22, .9, .3, 1.1);
}
@keyframes chipIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.chat-chip.is-loading { border-color: var(--accent-fade); }
.chat-chip.is-error { border-color: rgba(242, 107, 107, 0.45); background: rgba(242, 107, 107, 0.08); }
.chat-chip__thumb {
  width: 22px; height: 22px;
  object-fit: cover;
  border-radius: 3px;
  display: block;
}
.chat-chip__icon {
  width: 18px; height: 18px;
  color: var(--tx-2);
  flex: 0 0 auto;
}
.chat-chip__spinner {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid var(--line-3);
  border-top-color: var(--accent);
  animation: spin 700ms linear infinite;
}
.chat-chip__err {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  background: var(--err);
  color: #fff;
  border-radius: 50%;
  font-size: 11px; font-weight: 700;
}
.chat-chip__name {
  max-width: 130px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-chip__state {
  font-size: 10px;
  color: var(--tx-3);
}
.chat-chip.is-loading .chat-chip__state { color: var(--accent); }
.chat-chip.is-error .chat-chip__state { color: var(--err); }
.chat-chip__close {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  background: transparent;
  border: none;
  color: var(--tx-3);
  font-size: 11px;
  border-radius: 50%;
  cursor: pointer;
  margin-left: 2px;
  transition: background 120ms, color 120ms;
}
.chat-chip__close:hover { background: var(--bg-3); color: var(--tx-0); }

/* ---------- 18. FOOTER ---------- */
.footer {
  margin-top: 48px;
  border-top: 1px solid var(--line-1);
  background: var(--bg-1);
}
.footer__inner {
  max-width: none; width: 100%;
  padding: 24px var(--page-pad);
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap;
  font-family: var(--f-mono);
  font-size: 11px; letter-spacing: 0.06em;
  color: var(--tx-3);
}
.footer__staff {
  color: var(--tx-3);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--line-3);
}
.footer__staff:hover { color: var(--tx-0); }

/* ---------- 19. MODAL ---------- */
.modal {
  position: fixed; inset: 0;
  z-index: 100;
  display: grid; place-items: center;
  padding: 24px;
}
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(2px);
}
.modal__panel {
  position: relative;
  width: 100%; max-width: 600px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  display: flex; flex-direction: column;
  max-height: calc(100vh - 48px);
  box-shadow: 0 16px 60px rgba(0,0,0,0.5);
}

/* ---------- WIZARD MODAL (full-bleed responsive) ---------- */
.modal__panel--wizard {
  max-width: min(960px, 96vw);
  max-height: min(900px, calc(100dvh - 32px));
  height: auto;
  border-radius: var(--r-xl);
  overflow: hidden;
}
/* Sur mobile (et petites hauteurs comme iPhone SE), le wizard prend tout l'écran. */
@media (max-width: 768px), (max-height: 720px) {
  .modal--wizard .modal__panel--wizard {
    max-width: 100vw;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
    border: none;
    /* Override le calc(100vh - 48px) hérité de .modal__panel */
    margin: 0;
  }
  .modal--wizard { padding: 0 !important; }
  /* Footer mobile : pas trop de padding pour que les boutons s'inscrivent */
  .wizard-foot {
    padding-bottom: max(14px, env(safe-area-inset-bottom));
    flex-wrap: wrap;
    gap: 8px;
  }
  .wizard-foot .btn { padding: 11px 14px; font-size: 13px; }
  /* Sur très petit (≤ 380px), bouton Suivant prend la priorité de visibilité */
  .wizard-foot__spacer { flex: 0 1 auto; min-width: 0; }
}
@media (max-width: 380px) {
  .wizard-meta { padding: 14px 14px 12px; }
  .wizard-meta__title { font-size: 18px; }
  .wizard-foot { padding: 12px 12px max(12px, env(safe-area-inset-bottom)); }
  .wizard-foot .btn { padding: 10px 12px; font-size: 12.5px; }
}

.wizard-head {
  display: flex; flex-direction: column;
  border-bottom: 1px solid var(--line-1);
  background: var(--bg-1);
}
.wizard-progress {
  height: 3px;
  background: var(--bg-2);
  position: relative;
}
.wizard-progress__bar {
  position: absolute; inset: 0 auto 0 0;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent));
  transition: width 320ms cubic-bezier(.4, 0, .2, 1);
  box-shadow: 0 0 12px rgba(220, 39, 48, 0.45);
}
.wizard-meta {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 18px var(--page-pad) 14px;
  gap: 16px;
}
.wizard-meta__left { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wizard-meta__step {
  font-size: 11px; letter-spacing: 0.12em;
  color: var(--tx-3);
  text-transform: uppercase;
}
.wizard-meta__step #wizard-cur { color: var(--accent); font-weight: 600; }
.wizard-meta__sep { color: var(--tx-4); margin: 0 2px; }
.wizard-meta__title {
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--tx-0);
  margin: 0;
  line-height: 1.15;
}

.wizard-body {
  flex: 1 1 auto;
  min-height: 0; /* permet au flex de shrinker → footer toujours visible */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 22px var(--page-pad) 28px;
  display: flex; flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: var(--line-3) transparent;
}
@media (max-width: 768px) {
  .wizard-body { padding: 16px var(--page-pad) 18px; }
}
.wizard-body::-webkit-scrollbar { width: 8px; }
.wizard-body::-webkit-scrollbar-thumb { background: var(--line-3); border-radius: 4px; }

.wizard-step { display: none; flex-direction: column; gap: 16px; flex: 1 1 auto; min-height: 0; }
.wizard-step.is-active { display: flex; animation: wizSlide 320ms cubic-bezier(.22,.9,.3,1.1); }
@keyframes wizSlide {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.wizard-step__hint {
  margin: 0; padding: 0;
  color: var(--tx-2);
  font-size: 14px;
  line-height: 1.55;
}
.wizard-step__hint strong { color: var(--tx-0); font-weight: 600; }
.wizard-step__form { display: flex; flex-direction: column; gap: 18px; max-width: 540px; }
.input--lg {
  font-size: 16px;
  padding: 14px 16px;
}

.picker--lg {
  max-height: none;
  flex: 1 1 auto;
  grid-template-columns: repeat(auto-fill, minmax(min(120px, 26vw), 1fr));
  gap: 10px;
  padding: 14px;
  overflow-y: auto;
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
  min-height: 320px;
}
@media (min-width: 768px) {
  .picker--lg { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); min-height: 380px; }
}
@media (min-width: 1100px) {
  .picker--lg { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); min-height: 460px; }
}
.picker--lg .picker__opt {
  min-height: 130px;
  padding: 14px 8px 10px;
  gap: 10px;
}
.picker--lg .picker__img { width: 56px; height: 56px; }
.picker--lg .picker__emoji-fallback { width: 56px; height: 56px; font-size: 38px; }
.picker--lg .picker__lbl {
  font-size: 12px;
  -webkit-line-clamp: 2;
}
.picker--lg .picker__opt.is-selected::after { width: 10px; height: 10px; top: 6px; right: 6px; }
.picker--lg .picker__opt--none .picker__none-icon { width: 56px; height: 56px; font-size: 26px; }
.picker__empty {
  grid-column: 1 / -1;
  padding: 32px;
  text-align: center;
  color: var(--tx-3);
  font-size: 13px;
  font-style: italic;
}
.picker__emoji-fallback {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  font-size: 24px;
  line-height: 1;
  filter: saturate(0.8);
  flex: 0 0 auto;
}
.picker__search {
  margin-bottom: 4px;
  font-size: 13px;
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  font-family: var(--f-sans);
  color: var(--tx-0);
  width: 100%;
  transition: border-color 140ms, background 140ms;
}
.picker__search:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-3);
}

/* Modal wizard agrandi pour avoir plus de colonnes dans le picker */
.modal__panel--wizard { max-width: min(1100px, 96vw); }

/* Bouton danger-soft pour "Abandonner" */
.btn--danger-soft {
  background: transparent;
  color: var(--tx-2);
}
.btn--danger-soft:hover:not(:disabled) {
  color: var(--err);
  border-color: rgba(242, 107, 107, 0.42);
  background: rgba(242, 107, 107, 0.06);
}
/* Exception : le bouton "Contester" (résultat déclaré) vire au JAUNE au survol,
   pour le distinguer du rouge destructif d'"Abandonner" (même classe .btn--danger-soft). */
#opp-report-contest:hover:not(:disabled) {
  color: var(--warn);
  border-color: rgba(245, 196, 81, 0.5);
  background: rgba(245, 196, 81, 0.1);
}
#opp-report-contest:hover:not(:disabled) svg { color: var(--warn); }

/* Hint inline pour le label Bounty */
.field__hint {
  font-size: 10px; letter-spacing: 0.06em;
  color: var(--tx-3);
  margin-left: 6px;
  font-weight: 400;
  text-transform: none;
}
.field__err--info {
  color: var(--accent) !important;
}

.wizard-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 14px var(--page-pad);
  border-top: 1px solid var(--line-1);
  background: var(--bg-1);
}
.wizard-foot__spacer { flex: 1 1 auto; }
.wizard-foot .btn { padding: 12px 20px; font-size: 14px; }

/* Mobile étroit : Suivant/Enregistrer prioritaire (ligne entière) en bas, Précédent + Passer au-dessus */
@media (max-width: 480px) {
  .wizard-foot {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
    column-gap: 8px;
    row-gap: 8px;
    align-items: stretch;
    flex-wrap: nowrap; /* annule le wrap hérité du @media 768 */
  }
  .wizard-foot__spacer { display: none; }
  #wizard-prev { grid-column: 1; grid-row: 1; }
  #wizard-skip { grid-column: 2; grid-row: 1; }
  /* Si Passer est caché, Précédent prend toute la première ligne */
  .wizard-foot:has(#wizard-skip[hidden]) #wizard-prev { grid-column: 1 / -1; }
  #wizard-next, #wizard-save {
    grid-column: 1 / -1;
    grid-row: 2;
    font-weight: 600;
    padding: 14px 16px;
    font-size: 14px;
  }
}

/* ---------- WIZARD RECAP ---------- */
.wizard-recap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}
.wizard-recap__item {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px;
  padding: 18px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  text-align: center;
}
.wizard-recap__cat {
  font-family: var(--f-mono);
  font-size: 10.5px; letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tx-3);
}
.wizard-recap__img {
  width: 52px; height: 52px;
  background: var(--bg-1);
  border-radius: 8px;
  padding: 4px;
  display: grid; place-items: center;
}
.wizard-recap__img img { width: 100%; height: 100%; }
.wizard-recap__none {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  font-size: 22px;
  color: var(--tx-4);
}
.wizard-recap__lbl {
  font-size: 13px;
  font-weight: 600;
  color: var(--tx-0);
  line-height: 1.2;
}
.wizard-recap__lbl--empty { color: var(--tx-3); font-weight: 400; font-style: italic; }

.wizard-recap__form {
  margin-top: 18px;
  display: grid; grid-template-columns: 1fr; /* mobile : pseudo et bounty empiles */
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
}
/* Label AU-DESSUS de la valeur (comme les cartes du recap) : le pseudo et le
   bounty ne se "collent" plus. Chaque bloc = label discret puis valeur nette. */
.wizard-recap__form-row {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 4px; min-width: 0;
}
/* Desktop : 2 colonnes cote a cote, separees par un trait vertical net. */
@media (min-width: 560px) {
  .wizard-recap__form { grid-template-columns: 1fr 1fr; gap: 14px 40px; }
  .wizard-recap__form-row + .wizard-recap__form-row { position: relative; }
  .wizard-recap__form-row + .wizard-recap__form-row::before {
    content: ''; position: absolute; left: -20px; top: 0; bottom: 0;
    width: 1px; background: var(--line-2);
  }
}
.wizard-recap__form-k {
  font-family: var(--f-mono);
  font-size: 10.5px; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tx-3);
}
.wizard-recap__form-v {
  font-size: 14px; font-weight: 500; color: var(--tx-0);
  font-family: var(--f-mono);
}
.modal__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line-1);
}
.modal__title { font-size: 16px; font-weight: 600; color: var(--tx-0); margin: 0; }
.modal__body {
  padding: 20px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 16px;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ---------- LOADOUT PICKER (visual cards) ---------- */
.field-pickers {
  display: flex; flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}
.field--picker { display: flex; flex-direction: column; gap: 6px; }
.field--picker .field__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px;
}
.field--picker .field__label {
  font-family: var(--f-mono);
  font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tx-3);
}
.field__pick-current {
  font-size: 12px; font-weight: 500;
  color: var(--tx-1);
  font-family: var(--f-sans);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 60%;
  text-align: right;
}
.field__pick-current--empty { color: var(--tx-4); font-style: italic; }
.picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 4px;
  padding: 6px;
  max-height: 168px;
  overflow-y: auto;
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  scrollbar-width: thin;
  scrollbar-color: var(--line-3) transparent;
}
.picker::-webkit-scrollbar { width: 6px; height: 6px; }
.picker::-webkit-scrollbar-thumb { background: var(--line-3); border-radius: 3px; }
.picker__opt {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  gap: 4px;
  padding: 7px 4px 5px;
  background: var(--bg-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease, box-shadow 0.18s ease;
  min-height: 64px;
  text-align: center;
}
.picker__opt:hover {
  border-color: var(--line-3);
  background: var(--bg-3);
  transform: translateY(-1px);
}
.picker__opt.is-selected {
  border-color: var(--accent);
  background: var(--accent-fade);
  box-shadow: inset 0 0 0 1px var(--accent), 0 6px 18px rgba(220, 39, 48, 0.18);
}
.picker__opt.is-selected::after {
  content: '';
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--bg-1);
}
.picker__img {
  width: 32px; height: 32px;
  flex: 0 0 auto;
  image-rendering: -webkit-optimize-contrast;
}
.picker__lbl {
  font-size: 9.5px;
  font-weight: 500;
  line-height: 1.15;
  color: var(--tx-2);
  text-align: center;
  letter-spacing: 0.005em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  hyphens: auto;
  max-width: 100%;
}
.picker__opt.is-selected .picker__lbl {
  color: var(--tx-0);
  font-weight: 600;
}
.picker__opt--none {
  border-style: dashed;
  background: transparent;
}
.picker__opt--none .picker__none-icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  color: var(--tx-4);
}
.picker__opt--none.is-selected {
  border-style: solid;
}

.modal__foot {
  padding: 14px 20px;
  border-top: 1px solid var(--line-1);
  display: flex; justify-content: flex-end; gap: 8px;
}

/* ---------- MATCH FOUND OVERLAY (plein écran, flash + son) ---------- */
.match-found-overlay {
  position: fixed; inset: 0;
  z-index: 1000;
  background: rgba(11, 13, 16, 0.92);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  display: grid; place-items: center;
  padding: var(--page-pad);
  animation: mfoIn 320ms cubic-bezier(.22, .9, .3, 1.1);
}
@keyframes mfoIn {
  from { opacity: 0; backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0); }
  to   { opacity: 1; }
}
.match-found-overlay__panel {
  position: relative;
  width: 100%; max-width: 580px;
  padding: clamp(28px, 5vw, 44px) clamp(20px, 4vw, 36px);
  background: linear-gradient(180deg, rgba(220, 39, 48, 0.10), var(--bg-1));
  border: 1px solid var(--accent);
  border-radius: var(--r-xl);
  box-shadow: 0 0 0 1px rgba(230, 57, 70, 0.18), 0 24px 70px -22px rgba(0, 0, 0, 0.72);
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
  gap: 22px;
  animation: mfoPop 480ms cubic-bezier(.22, 1.6, .3, 1);
}
@keyframes mfoPop {
  from { opacity: 0; transform: scale(0.85) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.match-found-overlay__pulse {
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  border: 2px solid var(--accent);
  border-radius: var(--r-xl);
  pointer-events: none;
  animation: mfoPulse 1.6s ease-out infinite;
}
@keyframes mfoPulse {
  0%   { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.30); }
  70%  { box-shadow: 0 0 0 10px rgba(230, 57, 70, 0); }
  100% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0); }
}

@keyframes mfoGlow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(240, 57, 70, 0.3)); }
  50% { filter: drop-shadow(0 0 16px rgba(240, 57, 70, 0.6)); }
}
.match-found-overlay__title {
  font-size: clamp(20px, 3.4vw, 28px);
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.match-found-overlay__vs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(14px, 3vw, 28px);
  width: 100%;
}
.match-found-overlay__player {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.match-found-overlay__avatar {
  width: clamp(64px, 12vw, 96px);
  height: clamp(64px, 12vw, 96px);
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line-3);
}
.match-found-overlay__name {
  font-size: clamp(14px, 2.4vw, 17px);
  font-weight: 600;
  color: var(--tx-0);
  max-width: 140px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.match-found-overlay__sep {
  font-family: var(--f-mono);
  font-size: clamp(14px, 2.4vw, 18px);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
  padding: 6px 10px;
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  background: var(--accent-fade);
}
.match-found-overlay__meta {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--tx-3);
  text-transform: uppercase;
}
.match-found-overlay .btn--lg {
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 700;
  min-height: 50px;
}
.match-found-overlay[hidden] { display: none !important; }

/* ---------- OPPONENT REPORT OVERLAY (le gagnant a déclaré, je dois Accepter/Contester) ---------- */
.opp-report-overlay { z-index: 1001; }
.opp-report-panel {
  max-width: 640px;
  background: linear-gradient(180deg, rgba(111, 227, 155, 0.06), var(--bg-1) 60%);
  border: 1px solid var(--line-2);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02), 0 28px 80px -16px rgba(0, 0, 0, 0.6), inset 0 0 32px rgba(111, 227, 155, 0.03);
  text-align: left;
  gap: 18px;
}
.opp-report-panel__pulse {
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  border: 1px solid rgba(111, 227, 155, 0.4);
  border-radius: var(--r-xl);
  pointer-events: none;
  animation: oppReportPulse 2.2s ease-out infinite;
}
@keyframes oppReportPulse {
  0%   { box-shadow: 0 0 0 0 rgba(111, 227, 155, 0.22); }
  70%  { box-shadow: 0 0 0 8px rgba(111, 227, 155, 0); }
  100% { box-shadow: 0 0 0 0 rgba(111, 227, 155, 0); }
}
.opp-report-panel__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  align-self: flex-start;
  font-size: 11px; letter-spacing: 0.18em;
  color: var(--ok);
  font-weight: 700;
  text-transform: uppercase;
}
.opp-report-panel__live {
  display: inline-block;
  width: 7px; height: 7px;
}
.opp-report-panel__live .pulse {
  display: block; width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(111, 227, 155, 0.6);
  animation: oppReportLive 1.6s ease-out infinite;
}
@keyframes oppReportLive {
  0%   { box-shadow: 0 0 0 0 rgba(111, 227, 155, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(111, 227, 155, 0); }
  100% { box-shadow: 0 0 0 0 rgba(111, 227, 155, 0); }
}
.opp-report-panel__title {
  margin: 0;
  font-size: clamp(18px, 2.6vw, 22px);
  font-weight: 600;
  color: var(--tx-0);
  line-height: 1.3;
  text-align: left;
  align-self: stretch;
}
.opp-report-panel__vs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(12px, 2.5vw, 22px);
  width: 100%;
  padding: 18px;
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-lg);
}
.opp-report-panel__side {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 6px;
}
.opp-report-panel__crown {
  position: absolute;
  top: -16px; left: 50%; transform: translateX(-50%);
  width: 28px; height: 28px;
  display: grid; place-items: center;
  color: var(--accent);
  filter: drop-shadow(0 0 4px rgba(230, 57, 70, 0.3));
  opacity: 0;
  transition: opacity 200ms;
}
.opp-report-panel__side--winner .opp-report-panel__crown { opacity: 1; }
.opp-report-panel__side--winner .opp-report-panel__avatar {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(220, 39, 48, 0.16);
}
.opp-report-panel__side--loser .opp-report-panel__avatar {
  filter: grayscale(0.55);
  opacity: 0.78;
}
.opp-report-panel__avatar {
  width: clamp(60px, 15vw, 80px);
  height: clamp(60px, 15vw, 80px);
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line-3);
  background: var(--bg-1);
  display: block;
  transition: filter 200ms, opacity 200ms;
}
.opp-report-panel__name {
  font-size: clamp(13px, 2vw, 15px);
  font-weight: 600;
  color: var(--tx-0);
  max-width: 140px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-align: center;
}
.opp-report-panel__role {
  font-size: 10px; letter-spacing: 0.16em;
  color: var(--tx-3);
}
.opp-report-panel__side--winner .opp-report-panel__role { color: var(--accent); }
.opp-report-panel__score {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 12px 14px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  min-width: 88px;
}
.opp-report-panel__score-val {
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 700;
  color: var(--tx-0);
  letter-spacing: 0.04em;
}
.opp-report-panel__score-k {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--tx-3);
}
.opp-report-panel__cancel {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: rgba(240, 180, 80, 0.08);
  border: 1px solid rgba(240, 180, 80, 0.32);
  border-radius: var(--r-md);
  color: var(--warn);
  font-size: 13px;
}
.opp-report-panel__cancel svg { width: 18px; height: 18px; flex: 0 0 18px; }
.opp-report-panel__note {
  width: 100%;
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
}
.opp-report-panel__note-k {
  font-size: 10px; letter-spacing: 0.16em; color: var(--tx-3);
}
.opp-report-panel__note-text {
  margin: 0;
  font-size: 13px;
  color: var(--tx-1);
  line-height: 1.5;
  word-break: break-word;
}
.opp-report-panel__attachments {
  width: 100%;
  display: flex; flex-direction: column; gap: 8px;
}
.opp-report-panel__attachments-k {
  font-size: 10px; letter-spacing: 0.16em; color: var(--tx-3);
}
.opp-report-panel__attachments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 6px;
}
.opp-report-panel__attachment {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 140ms, transform 140ms;
}
.opp-report-panel__attachment:hover { border-color: var(--accent); transform: translateY(-1px); }
.opp-report-panel__attachment img,
.opp-report-panel__attachment video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.opp-report-panel__attachment-icon {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--tx-2);
}
.opp-report-panel__attachment-icon svg { width: 26px; height: 26px; }
.opp-report-panel__summary {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 15px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--tx-1);
  line-height: 1.6;
}
.opp-report-panel__summary-icon { color: var(--tx-2); flex: 0 0 18px; padding-top: 1px; }
.opp-report-panel__summary-icon svg { width: 18px; height: 18px; display: block; }
.opp-report-panel__actions {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  flex-wrap: wrap;
}
.opp-report-panel__actions .btn--lg { margin-left: auto; }
.opp-report-panel__actions .btn--ghost {
  padding: 12px 18px;
  min-height: 48px;
}
/* Icônes des boutons de l'overlay (contester / accepter / confirmer) : nettes,
   taille fixe, jamais écrasées par le flex même si le libellé est long. */
.opp-report-panel__actions .btn svg,
.opp-report-panel__contest-actions .btn svg { width: 15px; height: 15px; flex: none; }
.opp-report-panel__contest-form {
  width: 100%;
  display: flex; flex-direction: column; gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line-1);
  animation: oppReportContestSlide 220ms cubic-bezier(.22, .9, .3, 1.1);
}
@keyframes oppReportContestSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.opp-report-panel__contest-actions {
  display: flex; gap: 8px;
  justify-content: flex-end;
}
@media (max-width: 540px) {
  .opp-report-panel__vs {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 14px;
  }
  .opp-report-panel__score { order: 2; min-width: 0; }
  .opp-report-panel__side--winner { order: 1; }
  .opp-report-panel__side--loser { order: 3; }
  .opp-report-panel__actions { gap: 6px; }
  .opp-report-panel__actions .btn--lg { margin-left: 0; flex: 1 1 100%; }
}

/* Sound toggle button state */
#sound-toggle.is-muted {
  opacity: 0.4;
  position: relative;
}
#sound-toggle.is-muted::after {
  content: '';
  position: absolute; top: 50%; left: 8px; right: 8px;
  height: 1.5px;
  background: currentColor;
  transform: rotate(-30deg);
  border-radius: 1px;
}

/* ---------- 20. TOASTS ---------- */
.toasts {
  position: fixed;
  bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 200;
  display: flex; flex-direction: column-reverse; gap: 8px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: var(--bg-2);
  border: 1px solid var(--line-3);
  border-radius: var(--r-md);
  padding: 15px 20px;
  font-size: 15.5px; line-height: 1.45; font-weight: 500; color: var(--tx-0);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  display: inline-flex; align-items: center; gap: 12px;
  animation: toast-in 220ms ease-out;
  max-width: 480px;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.toast--ok  { border-color: rgba(111,227,155,0.4); }
.toast--ok  .toast__pip { background: var(--ok); }
.toast--err { border-color: rgba(242,107,107,0.4); }
.toast--err .toast__pip { background: var(--err); }
.toast__pip { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--accent); }

/* ---------- 21. RESPONSIVE ---------- */
@media (max-width: 1279px) {
  .main__grid { grid-template-columns: 1fr; }
  .match-active__grid { grid-template-columns: 1fr; }
  .match-active__main { border-right: none; border-bottom: 1px solid var(--line-1); }
  /* En colonne unique, on replafonne le chat (le max-height:none du desktop ferait une
     page interminable sur mobile). Hauteur bornee + scroll interne. */
  .chat { height: auto; min-height: 380px; max-height: 70vh; }
}

@media (max-width: 768px) {
  /* Topbar mobile en 3 lignes EMPILEES : marque / controles / onglets.
     Avant, la ligne controles (son + regles + langues + connexion) debordait a
     droite et passait sous le bouton menu fixe -> bouton connexion hors ecran +
     langues cachees. En pleine largeur + wrap, tout reste visible (fix 2026-07-11). */
  .topbar__inner {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-rows: auto;
    padding: 14px var(--page-pad) 12px;
    gap: 12px 0;
    align-items: center;
  }
  .brand { justify-self: start; grid-column: 1 / -1; order: 1; }
  .topbar__actions {
    grid-column: 1 / -1;
    order: 2;
    flex-wrap: wrap;          /* rien ne deborde : ca passe a la ligne */
    gap: 10px;
  }
  .nav {
    grid-column: 1 / -1;
    order: 3;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  /* Le bouton de connexion reste un VRAI bouton lisible (texte visible), pousse a
     droite de sa ligne - plus une icone perdue hors ecran. */
  .btn--discord { padding: 9px 14px; margin-left: auto; }
  .btn--discord span { display: inline; }

  /* La topbar mobile est haute (3 lignes empilees) : on la laisse DEFILER (non-sticky)
     au lieu de figer ~197px en haut de l'ecran. La barre de stats compacte prend le
     relais, collee en haut au scroll. Evite le couplage fragile de hauteur. */
  .topbar { position: static; }
  .stats-band { top: 0; }
  .stats-band__inner { padding: 10px var(--page-pad); gap: 16px; }
  .stat-sep { display: none; }

  .main { padding: 16px var(--page-pad); }
  .disclaimer { padding: 12px var(--page-pad) 0; }
  .match-active { padding: 0 var(--page-pad); }

  .card { padding: 18px; }
  .card__title-xl { font-size: 22px; }
  .card__title-lg { font-size: 18px; }

  .sea-picker { grid-template-columns: 1fr; }
  .loadout { grid-template-columns: repeat(2, 1fr); }
  .profile__stats { grid-template-columns: repeat(2, 1fr); }
  .profile__elo { grid-template-columns: 1fr; }

  .lb-head { grid-template-columns: 36px 1fr 60px 70px; }
  .lb__row  { grid-template-columns: 36px 1fr 60px 70px; }
  .lb-head__country, .lb__country { display: none; }

  .field-grid { grid-template-columns: 1fr; }

  .vs { grid-template-columns: 1fr; gap: 12px; padding: 16px; text-align: center; }
  .vs__player { justify-content: center; }
  .vs__player--op { flex-direction: row-reverse; }
  .vs__meta--right, .vs__sub--right { text-align: left; justify-content: flex-start; }
  .vs__divider { width: auto; height: 24px; }
  .vs__divider::before, .vs__divider::after { display: none; }

  .footer__inner { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ============================================================
   ULTRA-NARROW PHONES (≤ 480px) - éviter tout overflow horizontal
   ============================================================ */
@media (max-width: 480px) {
  /* Topbar : compacter le user-block, masquer le sub-text */
  .brand__sub { display: none; }
  .brand__title { font-size: 14px; }
  .brand__mark { width: 32px; height: 32px; }
  .user-block { padding: 2px 8px 2px 2px; gap: 6px; }
  .user-block__avatar { width: 26px; height: 26px; }
  .user-block__meta { line-height: 1.1; }
  .user-block__name { font-size: 12px; max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .user-block__logout { font-size: 9.5px; }
  .topbar__actions { gap: 6px; }
  .topbar__inner { gap: 8px 12px; }

  /* Stats band : permettre le scroll horizontal sans pousser le body */
  .stats-band__inner { padding: 10px var(--page-pad); }
  .stats-band { overflow: hidden; }
  .stat--right { margin-left: 12px; }

  /* Card heading : actions wrap si trop large */
  .card__head-actions { gap: 4px; flex-wrap: wrap; justify-content: flex-end; }

  /* Loadout sur très petit : 2 cols et hauteur réduite */
  .loadout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .loadout__slot { min-width: 0; padding: 10px 8px; }
  .loadout__lbl { font-size: 11.5px; }

  /* Bounty value autorise wrap */
  .profile__bounty { gap: 8px; }
  .profile__bounty-v { font-size: 14px; }

  /* Profile avatar legèrement réduit */
  .profile__head { gap: 12px; }
  .profile__avatar { width: 56px; height: 56px; }

  /* Card titles plus compacts */
  .card { padding: 14px; }
  .card__title-lg { font-size: 17px; line-height: 1.2; }
  .card__title-xl { font-size: 19px; line-height: 1.2; }

  /* Buttons header passent en icône-only (cache le label) */
  .btn--sm .btn__lbl-mobile-hide { display: none; }
  .btn--sm svg { width: 14px; height: 14px; }
}

/* ============================================================
   GALAXY-FOLD AND BELOW (≤ 360px) - derniers ajustements
   ============================================================ */
@media (max-width: 360px) {
  .nav__item { padding: 8px 10px; font-size: 12.5px; }
  .stats-band__inner { gap: 12px; font-size: 11px; }
  .stat__label { font-size: 9px; }
  .stat__value { font-size: 11.5px; }
  .user-block__name { max-width: 70px; }
  .brand__title { font-size: 13px; }
  .topbar__inner { padding: 10px 12px; }
  .main { padding-left: 12px !important; padding-right: 12px !important; }

  /* Cache le sound + lang switch sur très petits écrans pour éviter overflow */
  #sound-toggle,
  .lang-switch { display: none !important; }
  .user-block__logout { display: none; }
  .user-block__name { font-size: 11.5px; max-width: 60px; }
  .topbar__inner { gap: 6px 8px; }
  /* Force le topbar à ne pas dépasser */
  .topbar__inner { overflow: hidden; }
  .topbar__actions { min-width: 0; }
  .user-block { min-width: 0; flex-shrink: 1; }
  .user-block__meta { min-width: 0; flex-shrink: 1; overflow: hidden; }
}


/* ============================================================
   ROUTING - show only active route
   ============================================================ */
.route { display: block; }
.route[hidden] { display: none !important; }

/* ============================================================
   PAGE HEAD (leaderboard / history pages)
   ============================================================ */
.page-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
  padding: 8px 0 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line-1);
}
.page-head__main { display: flex; flex-direction: column; gap: 8px; }
.page-head__eyebrow {
  font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.page-head__title {
  font-size: 40px; font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--tx-0);
  line-height: 1.05;
  margin: 0;
}
.page-head__sub {
  font-size: 14px; color: var(--tx-2); margin: 0; max-width: 560px;
}
.page-head__kpis {
  display: flex; gap: 1px;
  background: var(--line-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  overflow: hidden;
}
.page-kpi {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 20px;
  background: var(--bg-1);
  min-width: 96px;
}
.page-kpi__k { font-size: 10px; letter-spacing: 0.1em; color: var(--tx-3); }
.page-kpi__v {
  font-size: 22px; font-weight: 700;
  color: var(--tx-0);
  letter-spacing: -0.02em;
  line-height: 1;
}

/* ============================================================
   PODIUM (top 3)
   ============================================================ */
.podium {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  gap: 16px;
  margin-bottom: 32px;
  padding: 0 8px;
}
.podium__slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0, 0.1, 1);
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.podium__slot:hover {
  transform: translateY(-3px);
  border-color: var(--line-3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.podium__slot::before {
  content: '';
  position: absolute;
  top: -16px;
  width: 100%;
  height: 16px;
  background: radial-gradient(ellipse at bottom, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50% 50% 0 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.podium__slot:hover::before {
  opacity: 1;
}
.podium__slot[data-rank="1"] {
  order: 2;
  background: linear-gradient(180deg, rgba(226,179,57,0.12) 0%, rgba(20,23,29,0.9) 50%, var(--bg-2) 100%);
  border-color: rgba(240,194,64,0.5);
}
.podium__slot[data-rank="2"] { order: 1; }
.podium__slot[data-rank="3"] { order: 3; }
.podium__slot[data-rank="1"]::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 56%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(240,194,64,0.32), rgba(240,194,64,0.5), rgba(240,194,64,0.32), transparent);
  border-radius: 2px;
}
.podium__crown {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--f-mono);
  font-weight: 700;
  font-size: 15px;
  color: var(--accent-ink);
  margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.podium__slot[data-rank="1"] .podium__crown {
  background: var(--t-gold);
  animation: crownFloat 4s ease-in-out infinite;
}
.podium__slot[data-rank="2"] .podium__crown {
  background: var(--t-silver);
}
.podium__slot[data-rank="3"] .podium__crown {
  background: var(--t-bronze);
}
@keyframes crownFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-4px); }
}
.podium__avatar {
  width: 68px;
  height: 68px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-3);
  background: var(--bg-3);
  margin-bottom: 10px;
  object-fit: cover;
  transition: all 0.3s ease;
}
.podium__slot:hover .podium__avatar {
  transform: scale(1.05);
}
.podium__slot[data-rank="1"] .podium__avatar {
  width: 84px;
  height: 84px;
  border: 2px solid var(--t-gold);
  border-width: 2px 2px 4px 2px;
}
.podium__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--tx-0);
  margin-bottom: 4px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.podium__country {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--tx-3);
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}
.podium__elo {
  font-family: var(--f-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--tx-0);
  letter-spacing: -0.02em;
  transition: all 0.3s ease;
}
.podium__slot[data-rank="1"] .podium__elo {
  color: var(--t-gold);
  font-size: 28px;
  transform: scale(1.1);
}

/* ============================================================
   SEARCH + FILTERS HEAD
   ============================================================ */
.card__head--filters {
  flex-wrap: wrap; gap: 14px;
  align-items: center;
}
.search {
  display: inline-flex; align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 0 10px 0 12px;
  flex: 1;
  min-width: 240px;
  max-width: 360px;
  transition: border-color 120ms;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-fade); }
.search svg { width: 14px; height: 14px; color: var(--tx-3); flex-shrink: 0; }
.search__input {
  background: transparent;
  border: none;
  padding: 9px 8px;
  font-size: 13px;
  color: var(--tx-0);
  width: 100%;
  outline: none;
}
.search__input::placeholder { color: var(--tx-3); }
.search--inline { flex: 0 1 280px; }

/* ============================================================
   SEGMENTED CONTROL (filter)
   ============================================================ */
.seg {
  display: inline-flex;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  padding: 3px;
  gap: 2px;
}
.seg__opt {
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--tx-2);
  border-radius: 4px;
  transition: color 120ms, background 120ms;
}
.seg__opt:hover { color: var(--tx-0); }
.seg__opt.is-active {
  background: var(--bg-1);
  color: var(--tx-0);
  box-shadow: inset 0 0 0 1px var(--line-3);
}

/* ============================================================
   LEADERBOARD FULL
   ============================================================ */
.lb-head--full {
  grid-template-columns: 56px 1fr 90px 110px 80px 80px 60px;
}
.lb--full .lb__row {
  grid-template-columns: 56px 1fr 90px 110px 80px 80px 60px;
  cursor: pointer;
}
.lb--full .lb__row:hover { background: var(--bg-2); }
.lb__tier-cell {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono);
  font-size: 11px; letter-spacing: 0.06em;
  color: var(--tx-2);
  text-transform: uppercase;
}
.lb__tier-cell .dot { width: 6px; height: 6px; border-radius: 2px; transform: rotate(45deg); }
.lb__wr {
  font-family: var(--f-mono);
  font-size: 12px; color: var(--tx-2);
  text-align: right;
}
.lb__wr--high { color: var(--accent); }
.lb__wr--low  { color: var(--tx-3); }

.lb-empty {
  padding: 32px 16px; text-align: center;
  color: var(--tx-3);
  font-size: 13px;
}
.lb-more {
  margin: 16px auto 0;
  display: flex;
}

/* ============================================================
   HISTORY FULL
   ============================================================ */
.hist-head {
  display: grid;
  grid-template-columns: 1.6fr 80px 80px 80px 56px 1fr;
  gap: 12px;
  padding: 10px 12px;
  font-family: var(--f-mono);
  font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tx-3);
  border-bottom: 1px solid var(--line-1);
  margin-bottom: 4px;
}
.hist-full { display: flex; flex-direction: column; gap: 1px; }
.hist-full__row {
  display: grid;
  grid-template-columns: 1.6fr 80px 80px 80px 56px 1fr;
  gap: 12px; align-items: center;
  padding: 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 120ms;
}
.hist-full__row:hover { background: var(--bg-2); }
.hist-full__opp { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hist-full__avatar {
  width: 32px; height: 32px;
  border-radius: var(--r-sm);
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  object-fit: cover;
  flex-shrink: 0;
}
.hist-full__name {
  display: flex; flex-direction: column; gap: 2px; min-width: 0;
}
.hist-full__name strong {
  font-size: 13.5px; color: var(--tx-0); font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hist-full__name small {
  font-family: var(--f-mono);
  font-size: 10px; color: var(--tx-3);
  letter-spacing: 0.06em;
}
.hist-full__date {
  font-family: var(--f-mono);
  font-size: 11px; color: var(--tx-3);
  text-align: right;
}
.hist-full__sea {
  font-family: var(--f-mono);
  font-size: 11px; color: var(--tx-2);
  text-align: center;
}
.hist-full__score, .hist-full__delta {
  font-family: var(--f-mono);
  font-size: 13px; font-weight: 500;
  color: var(--tx-1);
  text-align: center;
}
.hist-full__delta--up { color: var(--accent); }
.hist-full__delta--down { color: var(--err); }

/* En-têtes alignés sur l'alignement réel des valeurs de chaque colonne
   (sinon les titres restent collés à gauche pendant que les valeurs sont
   centrées/à droite -> impression de colonnes désalignées). */
.hist-head__c { text-align: center; }
.hist-head__c:first-child { text-align: left; }   /* ADVERSAIRE */
.hist-head__c:last-child  { text-align: right; }   /* DATE */
/* Badge RÉSULTAT centré dans sa colonne, comme son en-tête */
.hist-full__row .hist__result { justify-self: center; }

/* ============================================================
   PLAYER MODAL
   ============================================================ */
.modal__panel--lg { max-width: 720px; }

/* ---------- RULES MODAL ---------- */
.rules-modal { max-width: 720px; }
.rules-modal__eyebrow {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 4px;
  font-weight: 700;
  text-transform: uppercase;
}
.rules-modal__body {
  display: flex; flex-direction: column;
  gap: 18px;
  padding-bottom: 8px;
}
.rules-section {
  display: flex; flex-direction: column;
  gap: 8px;
}
.rules-section__title {
  margin: 0;
  display: flex; align-items: center; gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--tx-0);
}
.rules-section__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 22px;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--accent);
  background: var(--accent-fade);
  border: 1px solid rgba(220, 39, 48, 0.32);
  border-radius: 4px;
  font-weight: 700;
}
.rules-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex; flex-direction: column;
  gap: 6px;
}
.rules-list li {
  position: relative;
  padding: 8px 10px 8px 24px;
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--tx-1);
  line-height: 1.5;
}
.rules-list li::before {
  content: '';
  position: absolute;
  left: 10px; top: 14px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.7;
}
/* Pastille "?" d'explication sur une regle : bulle au survol (souris) ou au focus
   (clavier/tap). CSS pur, sans listener JS -> survit au clone innerHTML de la
   porte d'acceptation des regles (showRulesAcceptGate). */
.rules-tip {
  position: relative;
  display: inline-flex;
  vertical-align: -2px;
  margin-left: 4px;
  outline: none;
}
.rules-tip__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px;
  border-radius: 50%;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-fade);
  border: 1px solid var(--line-3);
  cursor: help;
  user-select: none;
}
.rules-tip__bubble {
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(280px, 74vw);
  padding: 8px 11px;
  background: var(--bg-3);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--tx-1);
  line-height: 1.45;
  text-align: left;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.14s ease;
  pointer-events: none;
  z-index: 6;
}
.rules-tip:hover .rules-tip__bubble,
.rules-tip:focus .rules-tip__bubble,
.rules-tip:focus-within .rules-tip__bubble { opacity: 1; visibility: visible; }
.rules-modal__foot {
  margin: 4px 0 0;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--tx-3);
  text-align: center;
}

/* ---------- PORTE D'ACCEPTATION DES REGLES (au match trouve) ----------
   Reprend la disposition de la modale de regles de l'accueil (#rules-modal) :
   panneau large 720px, aligne a gauche, entete/corps defilant/pied facon modale.
   On neutralise le centrage etroit herite de .match-found-overlay__panel. Le theme
   rouge (accent + degrade rouge du panneau overlay) est conserve. (demande 2026-07-20) */
.rules-accept-overlay { z-index: 992; }
.rules-accept-panel {
  width: 100%;
  max-width: 720px;
  padding: 0;
  gap: 0;
  text-align: left;
  align-items: stretch;
  max-height: min(88vh, 780px);
  overflow: hidden;
}
.rules-accept__head {
  display: flex; flex-direction: column; gap: 3px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-1);
}
.rules-accept__sub {
  margin: 4px 0 0;
  font-size: 13px; line-height: 1.5; color: var(--tx-2);
}
.rules-accept__body {
  padding: 20px 22px;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-3) transparent;
}
.rules-accept__body::-webkit-scrollbar { width: 6px; }
.rules-accept__body::-webkit-scrollbar-thumb { background: var(--line-3); border-radius: 3px; }
.rules-accept__foot {
  padding: 14px 22px;
  border-top: 1px solid var(--line-1);
  display: flex; justify-content: flex-end;
}
.rules-accept__foot .btn { min-width: 240px; justify-content: center; }

/* ---------- REPORT CARD (déclaration du score, scoreboard + verdict) ---------- */
.report-card {
  display: flex; flex-direction: column;
  gap: 14px;
}
.report-card__step {
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
}
.report-card__hint {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--tx-2);
}

.report-score-board {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  padding: 18px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
}
.report-score-board__side {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px;
  min-width: 0;
}
.report-score-board__avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line-3);
  background: var(--bg-3);
}
.report-score-board__side--me .report-score-board__avatar { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(220,39,48,0.12); }
.report-score-board__side--op .report-score-board__avatar { border-color: var(--line-3); }
.report-score-board__meta {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px;
  text-align: center;
  max-width: 140px;
}
.report-score-board__role {
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--tx-3);
  font-weight: 700;
}
.report-score-board__side--me .report-score-board__role { color: var(--accent); }
.report-score-board__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--tx-0);
  max-width: 130px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.report-score-board__field {
  display: inline-flex; align-items: center;
  gap: 4px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 2px;
}
.report-score-board__input {
  width: 64px;
  height: 44px;
  padding: 0 4px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  background: transparent;
  border: none;
  color: var(--tx-0);
  letter-spacing: 0.04em;
  -moz-appearance: textfield;
}
.report-score-board__input::-webkit-outer-spin-button,
.report-score-board__input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.report-score-board__input:focus { outline: none; background: var(--bg-3); border-radius: var(--r-sm); }
.report-stepper {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  color: var(--tx-1);
  border-radius: var(--r-sm);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  user-select: none;
  cursor: pointer;
  transition: background 140ms, color 140ms, border-color 140ms;
  font-family: var(--f-mono);
}
.report-stepper:hover { background: var(--bg-3); color: var(--tx-0); border-color: var(--line-3); }
.report-stepper:active { transform: scale(0.95); }
.report-score-board__separator {
  display: grid; place-items: center;
  height: 100%;
}
.report-score-board__vs {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 6px 10px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--accent);
  font-weight: 700;
}

.report-card__verdict {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.btn--verdict {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  padding: 16px 12px;
  border: 1px solid;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0, 0.1, 1);
  overflow: hidden;
}
.btn--verdict::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: translateX(-100%);
  transition: transform 800ms;
  pointer-events: none;
}
.btn--verdict:hover::before {
  transform: translateX(100%);
}
.btn--verdict svg {
  width: 22px;
  height: 22px;
  transition: transform 0.2s;
}
.btn--verdict .btn__main {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 0.2s;
}
.btn--verdict .btn__sub {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  font-family: var(--f-mono);
  text-transform: uppercase;
  opacity: 0.78;
  transition: opacity 0.2s;
}
.btn--verdict:active {
  transform: translateY(1px);
}
.btn--verdict:hover {
  transform: translateY(-1px);
}
.btn--verdict-loss {
  background: rgba(242, 107, 107, 0.08);
  border-color: rgba(242, 107, 107, 0.4);
  color: var(--err);
  box-shadow: 0 2px 6px rgba(242, 107, 107, 0.15);
}
.btn--verdict-loss:hover {
  background: rgba(242, 107, 107, 0.15);
  border-color: var(--err);
  box-shadow: 0 8px 24px rgba(242, 107, 107, 0.25);
}
.btn--verdict-loss svg,
.btn--verdict-loss .btn__main {
  transform: scale(1.05);
}
.btn--verdict-loss:hover .btn__sub {
  opacity: 0.9;
}
.btn--verdict-win {
  background: linear-gradient(180deg, rgba(111, 227, 155, 0.15), rgba(111, 227, 155, 0.08));
  border-color: rgba(111, 227, 155, 0.55);
  color: var(--ok);
  box-shadow: 0 2px 6px rgba(111, 227, 155, 0.15);
}
.btn--verdict-win:hover {
  background: linear-gradient(180deg, rgba(111, 227, 155, 0.25), rgba(111, 227, 155, 0.15));
  border-color: var(--ok);
  box-shadow: 0 8px 24px rgba(111, 227, 155, 0.25);
}
.btn--verdict-win svg,
.btn--verdict-win .btn__main {
  transform: scale(1.05);
}
.btn--verdict-win:hover .btn__sub {
  opacity: 0.9;
}

.report-card__extra {
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  padding: 0;
  overflow: hidden;
}
.report-card__summary {
  list-style: none;
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--tx-2);
  cursor: pointer;
  user-select: none;
  transition: color 140ms, background 140ms;
}
.report-card__summary::-webkit-details-marker { display: none; }
.report-card__summary svg { width: 14px; height: 14px; flex: 0 0 14px; }
.report-card__summary::after {
  content: '';
  margin-left: auto;
  width: 8px; height: 8px;
  border: 1.5px solid var(--tx-3);
  border-top: 0; border-left: 0;
  transform: rotate(45deg);
  transition: transform 200ms;
}
.report-card__extra[open] .report-card__summary::after {
  transform: rotate(225deg);
  margin-bottom: -3px;
}
.report-card__summary:hover { background: var(--bg-3); color: var(--tx-0); }
.report-card__extra-body {
  padding: 6px 14px 14px;
  display: flex; flex-direction: column; gap: 12px;
  border-top: 1px solid var(--line-1);
}

.report-card__actions {
  display: flex; gap: 8px;
  justify-content: flex-end;
  padding-top: 6px;
}

@media (max-width: 540px) {
  .report-score-board {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .report-score-board__separator { padding: 4px 0; }
  .report-card__verdict { grid-template-columns: 1fr; }
  .report-card__actions { flex-wrap: wrap; }
}

/* ---------- MATCH PROOFS (galerie inline dans match-active) ---------- */
.match-proofs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 6px;
  margin-top: 6px;
}
.match-proofs__item {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 140ms, transform 140ms;
}
.match-proofs__item:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.match-proofs__item img,
.match-proofs__item video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.match-proofs__item-uploader {
  position: absolute;
  left: 4px; bottom: 4px;
  padding: 2px 6px;
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.04em;
  background: rgba(11, 13, 16, 0.78);
  border-radius: 3px;
  color: var(--tx-1);
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  max-width: calc(100% - 8px);
}
.match-proofs__item-icon {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  color: var(--tx-2);
  pointer-events: none;
}
.match-proofs__item-icon svg { width: 24px; height: 24px; }

/* ---------- END MATCH OVERLAY (résultat + Rejouer) ---------- */
.end-match-overlay { z-index: 1002; }
.end-match-panel {
  max-width: 580px;
  text-align: center;
  gap: 16px;
}
/* Contour néon de célébration : vert vif en victoire, rouge en défaite */
.end-match-panel[data-result="win"] {
  background: linear-gradient(180deg, rgba(52, 255, 140, 0.13), var(--bg-1) 60%);
  border: 1.5px solid rgba(72, 255, 156, 0.92);
  box-shadow:
    0 0 20px rgba(52, 255, 140, 0.55),
    0 0 56px rgba(52, 255, 140, 0.34),
    inset 0 0 24px rgba(52, 255, 140, 0.12),
    0 24px 70px -22px rgba(0, 0, 0, 0.72);
}
.end-match-panel[data-result="loss"] {
  background: linear-gradient(180deg, rgba(255, 72, 72, 0.11), var(--bg-1) 64%);
  border: 1.5px solid rgba(255, 86, 86, 0.9);
  box-shadow:
    0 0 20px rgba(255, 68, 68, 0.5),
    0 0 56px rgba(255, 68, 68, 0.3),
    inset 0 0 24px rgba(255, 68, 68, 0.1),
    0 24px 70px -22px rgba(0, 0, 0, 0.72);
}
.end-match-panel[data-result="draw"], .end-match-panel[data-result="cancel"] {
  background: linear-gradient(180deg, rgba(240, 180, 80, 0.08), var(--bg-1) 65%);
  border: 1px solid rgba(240, 180, 80, 0.40);
}
.end-match-panel__pulse {
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  border-radius: var(--r-xl);
  pointer-events: none;
  animation: endMatchPulse 1.8s ease-out infinite;
}
.end-match-panel[data-result="win"] .end-match-panel__pulse { animation-name: endMatchPulseWin; }
.end-match-panel[data-result="loss"] .end-match-panel__pulse { animation-name: endMatchPulseLoss; }
@keyframes endMatchPulseWin {
  0%   { box-shadow: 0 0 0 0 rgba(111, 227, 155, 0.28); }
  70%  { box-shadow: 0 0 0 9px rgba(111, 227, 155, 0); }
  100% { box-shadow: 0 0 0 0 rgba(111, 227, 155, 0); }
}

@keyframes winGlow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(111, 227, 155, 0.3)); }
  50% { filter: drop-shadow(0 0 16px rgba(111, 227, 155, 0.6)); }
}
@keyframes endMatchPulseLoss {
  0%   { box-shadow: 0 0 0 0 rgba(242, 107, 107, 0.26); }
  70%  { box-shadow: 0 0 0 9px rgba(242, 107, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(242, 107, 107, 0); }
}
.end-match-panel__eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--tx-3);
  font-weight: 700;
}
.end-match-panel__title {
  margin: 0;
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.end-match-panel[data-result="win"] .end-match-panel__title { color: var(--ok); }
.end-match-panel[data-result="loss"] .end-match-panel__title { color: var(--err); }
.end-match-panel[data-result="draw"] .end-match-panel__title,
.end-match-panel[data-result="cancel"] .end-match-panel__title { color: var(--warn); }
.end-match-panel__delta {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 6px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 999px;
}
.end-match-panel__delta-val {
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.end-match-panel[data-result="win"] .end-match-panel__delta-val { color: var(--ok); }
.end-match-panel[data-result="loss"] .end-match-panel__delta-val { color: var(--err); }
.end-match-panel__delta-k {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--tx-3);
}
.end-match-panel__vs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(10px, 2.4vw, 22px);
  width: 100%;
}
.end-match-panel__player {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.end-match-panel__avatar {
  width: clamp(56px, 10vw, 78px);
  height: clamp(56px, 10vw, 78px);
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line-3);
}
.end-match-panel__name {
  font-size: clamp(13px, 2vw, 15px);
  font-weight: 600;
  color: var(--tx-0);
  max-width: 140px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-align: center;
}
.end-match-panel__role {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--tx-3);
}
.end-match-panel__score {
  padding: 10px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
}
.end-match-panel__score-val {
  font-size: clamp(20px, 4vw, 28px);
  font-weight: 700;
  color: var(--tx-0);
  letter-spacing: 0.04em;
}
.end-match-panel__actions {
  /* Rejouer seul et CENTRÉ sur la 1re ligne (juste sous le score), puis les deux
     boutons secondaires côte à côte et de taille égale sur la 2e ligne. Grille
     2 colonnes : Rejouer occupe les 2 colonnes (donc parfaitement centré sous le
     score), Voir mon profil + Fermer une colonne chacune. Fini le décalage dû à
     la largeur inégale des deux autres boutons quand ils partageaient la ligne
     de Rejouer. */
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
  max-width: 340px;
  margin-inline: auto;
}
/* Rejouer : 1re ligne, pleine largeur, label centré (le compteur reste en
   médaillon absolu à droite). */
.end-match-panel__actions #end-match-replay {
  order: 0;
  grid-column: 1 / -1;
  justify-content: center;
}
/* Les deux secondaires s'adaptent : demi-largeur égale, contenu centré, un peu
   plus compacts que le bouton principal. */
.end-match-panel__actions #end-match-profile { order: 1; }
.end-match-panel__actions #end-match-close   { order: 2; }
.end-match-panel__actions #end-match-profile,
.end-match-panel__actions #end-match-close {
  justify-content: center;
  min-width: 0;            /* autorise le rétrécissement dans la colonne 1fr */
  padding: 9px 10px;
  font-size: 12.5px;
}
.end-match-panel__actions .btn--lg {
  position: relative;
  padding-right: 50px;
}
.end-match-panel__countdown {
  position: absolute;
  right: 14px; top: 50%; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  letter-spacing: 0;
}
.end-match-panel__hint {
  margin: 0;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--tx-3);
}
@media (max-width: 380px) {
  /* Très petit écran : Rejouer reste pleine largeur en tête, et on empile aussi
     les deux secondaires (une seule colonne) pour éviter tout tassement. */
  .end-match-panel__actions { grid-template-columns: 1fr; max-width: 260px; gap: 6px; }
  .end-match-panel__actions #end-match-profile,
  .end-match-panel__actions #end-match-close { grid-column: 1 / -1; }
}

/* ---------- WIN STREAK MILESTONE OVERLAY ---------- */
.streak-overlay { z-index: 1003; }
.streak-panel {
  max-width: 460px;
  text-align: center;
  gap: 14px;
  background: linear-gradient(180deg, rgba(230, 57, 70, 0.12), var(--bg-1) 62%);
  border: 1px solid rgba(230, 57, 70, 0.5);
  box-shadow: 0 0 0 1px rgba(230, 57, 70, 0.2), 0 24px 70px -22px rgba(0, 0, 0, 0.72);
  overflow: hidden;
  position: relative;
}
.streak-panel__halo {
  position: absolute;
  top: -40%; left: -20%; right: -20%;
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(230, 57, 70, 0.10), transparent 70%);
  pointer-events: none;
}
.streak-panel__flame {
  position: relative;
  display: grid; place-items: center;
  width: 76px; height: 76px;
  margin: 4px auto 0;
  color: var(--accent);
  filter: drop-shadow(0 0 6px rgba(230, 57, 70, 0.28));
  animation: streakFlame 2.4s ease-in-out infinite;
}
.streak-panel__flame svg { width: 56px; height: 56px; }
@keyframes streakFlame {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.04); }
}
.streak-panel__num {
  position: relative;
  font-size: clamp(56px, 9vw, 88px);
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 0.9;
}

@keyframes pulseAccent {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(230, 57, 70, 0.5)); }
  50% { filter: drop-shadow(0 0 16px rgba(230, 57, 70, 0.8)); transform: scale(1.02); }
}
.streak-panel__title {
  position: relative;
  margin: 0;
  font-size: clamp(18px, 2.6vw, 22px);
  color: var(--tx-0);
  font-weight: 700;
}
.streak-panel__sub {
  position: relative;
  margin: 0;
  font-size: 13px;
  color: var(--tx-2);
}

/* ---------- RIVALRY pills (player card) ---------- */
.rivalry {
  display: flex; flex-direction: column;
  gap: 8px;
}
.rivalry__pill {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-2);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  border-left: 3px solid var(--line-2);
  font-size: 13px;
  color: var(--tx-1);
}
.rivalry__pill--win, .rivalry__pill--dominant {
  border-left-color: var(--ok);
  background: linear-gradient(180deg, rgba(111, 227, 155, 0.04), var(--bg-2) 80%);
}
.rivalry__pill--dominant {
  border-color: rgba(111, 227, 155, 0.32);
}
.rivalry__pill--loss, .rivalry__pill--nemesis {
  border-left-color: var(--err);
  background: linear-gradient(180deg, rgba(242, 107, 107, 0.04), var(--bg-2) 80%);
}
.rivalry__pill--nemesis {
  border-color: rgba(242, 107, 107, 0.32);
}
.rivalry__verdict {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--tx-3);
  text-transform: uppercase;
  font-weight: 700;
  white-space: nowrap;
}
.rivalry__pill--win .rivalry__verdict, .rivalry__pill--dominant .rivalry__verdict { color: var(--ok); }
.rivalry__pill--loss .rivalry__verdict, .rivalry__pill--nemesis .rivalry__verdict { color: var(--err); }
.rivalry__player {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 500;
  color: var(--tx-0);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.rivalry__player .flag { font-size: 14px; }
.rivalry__score {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--tx-0);
}
.rivalry__pill--win .rivalry__score, .rivalry__pill--dominant .rivalry__score { color: var(--ok); }
.rivalry__pill--loss .rivalry__score, .rivalry__pill--nemesis .rivalry__score { color: var(--err); }

.player-card {
  display: flex; flex-direction: column; gap: 18px;
}
.player-card__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-1);
}
/* Ligne « badge de rang + copier l'ID » de la fiche joueur. */
.player-card__badges {
  display: flex;
  align-items: center;
  gap: 10px;
}
.copy-id {
  display: inline-flex;
  align-items: center;
  min-height: 34px;               /* cible tactile confortable au pouce */
  padding: 7px 14px;
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  color: var(--tx-2);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.2, 0, 0.1, 1);
}
.copy-id:hover { background: var(--bg-3); border-color: var(--line-3); color: var(--tx-1); }
.copy-id:active { transform: scale(0.97); }
.copy-id.is-copied { color: var(--ok); border-color: var(--ok); }
.player-card__avatar {
  width: 80px; height: 80px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  object-fit: cover;
}
.player-card__name {
  font-size: 26px; font-weight: 700;
  color: var(--tx-0);
  letter-spacing: -0.02em;
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 4px;
}
.player-card__sub {
  display: flex; gap: 14px; align-items: baseline;
  font-size: 12px; color: var(--tx-3);
  font-family: var(--f-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.player-card__sub strong { color: var(--tx-1); font-weight: 500; }

.player-card__elo {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 1px;
  background: var(--line-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  overflow: hidden;
}
.player-card__loadout {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line-1);
  border: 1px solid var(--line-1);
  border-radius: var(--r-md);
  overflow: hidden;
}
.player-card__h {
  font-family: var(--f-mono);
  font-size: 10px; letter-spacing: 0.1em;
  color: var(--tx-3);
  text-transform: uppercase;
  margin: 0 0 8px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .page-head { grid-template-columns: 1fr; gap: 18px; }
  .page-head__title { font-size: 32px; }
  .lb-head--full { grid-template-columns: 44px 1fr 70px 80px 70px; }
  .lb--full .lb__row  { grid-template-columns: 44px 1fr 70px 80px 70px; }
  .lb-head--full > :nth-child(7), .lb--full .lb__row > :nth-child(7) { display: none; }
  .lb-head--full > :nth-child(4), .lb--full .lb__row > :nth-child(4) { display: none; }
}

@media (max-width: 768px) {
  .page-head__title { font-size: 26px; }
  .page-head__kpis { width: 100%; flex-wrap: wrap; }
  .page-kpi { flex: 1 1 40%; min-width: 0; padding: 10px 12px; }
  .page-kpi__v { font-size: 18px; }

  .podium { grid-template-columns: 1fr; gap: 8px; }
  .podium__slot[data-rank="1"], .podium__slot[data-rank="2"], .podium__slot[data-rank="3"] { order: 0; }

  .card__head--filters { gap: 10px; }
  .search { max-width: 100%; flex: 1 1 100%; }
  .lb-filters { flex: 1 1 100%; flex-wrap: wrap; }

  .hist-head { grid-template-columns: 1.6fr 60px 60px 60px; }
  .hist-full__row { grid-template-columns: 1.6fr 60px 60px 60px; }
  .hist-head > :nth-child(5), .hist-head > :nth-child(6),
  .hist-full__row > :nth-child(5), .hist-full__row > :nth-child(6) { display: none; }

  .player-card__head { grid-template-columns: auto 1fr; }
  /* Sur téléphone, le badge de rang et le bouton « copier l'ID » passent sur
     leur propre ligne : rang à gauche, bouton à droite. */
  .player-card__head .player-card__badges {
    grid-column: 1 / -1;
    justify-self: stretch;
    justify-content: space-between;
  }
  .player-card__elo { grid-template-columns: 1fr 1fr; }
  .player-card__loadout { grid-template-columns: repeat(2, 1fr); }
}


/* ============================================================
   POLISH - Match flow, transitions, modals
   ============================================================ */

/* - Stats band: tighter, no live pip - */
.stats-band__inner { padding-top: 12px; padding-bottom: 12px; }

/* - Match-active: more cinematic - */
.match-active {
  position: relative;
  animation: matchSlideIn 420ms cubic-bezier(.22,.9,.3,1.1);
}
.match-active::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: var(--r-md);
  background: radial-gradient(ellipse at top, rgba(220, 39, 48,0.06) 0%, transparent 60%);
  pointer-events: none;
}
@keyframes matchSlideIn {
  0%   { opacity: 0; transform: translateY(-12px) scale(0.99); }
  100% { opacity: 1; transform: translateY(0)    scale(1); }
}

.match-active__bar {
  background: linear-gradient(90deg, var(--bg-2) 0%, var(--bg-1) 100%);
  border-bottom: 1px solid var(--accent-fade);
}
.match-active__title { font-weight: 600; letter-spacing: 0.01em; }
.match-active__chrono {
  font-size: 18px;
  color: var(--accent);
  letter-spacing: 0.04em;
  font-weight: 600;
}

/* - VS bar: punchy - */
.vs {
  position: relative;
  padding: 28px 24px;
  background:
    radial-gradient(circle at 50% 50%, rgba(220, 39, 48,0.04) 0%, transparent 50%),
    var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  overflow: hidden;
}
.vs::before, .vs::after {
  content: '';
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 80px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-3), transparent);
}
.vs::before { left: 25%; }
.vs::after  { right: 25%; }

.vs__avatar {
  width: 72px; height: 72px;
  border-radius: var(--r-md);
  border: 1px solid var(--line-3);
  background: var(--bg-3);
  object-fit: cover;
  transition: transform 240ms;
}
.vs__player--me .vs__avatar  { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-fade); }
.vs__player--op .vs__avatar  { border-color: var(--err); box-shadow: 0 0 0 2px rgba(232, 95, 95, 0.18); }

.vs__name {
  font-size: 18px; font-weight: 700;
  color: var(--tx-0);
  letter-spacing: -0.015em;
  margin-bottom: 4px;
}
.vs__sub {
  display: inline-flex; gap: 8px; align-items: center;
  font-size: 12px; color: var(--tx-2);
  font-family: var(--f-mono);
  letter-spacing: 0.04em;
}
.vs__divider {
  position: relative;
  width: 56px; height: 56px;
  display: grid; place-items: center;
  background: var(--bg-3);
  border: 1px solid var(--accent-fade);
  border-radius: 50%;
  z-index: 1;
}
.vs__divider::before {
  content: '';
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 1px solid var(--accent-fade);
  animation: vsRing 2.4s ease-in-out infinite;
}
@keyframes vsRing {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50%      { opacity: 0.8; transform: scale(1.08); }
}
.vs__label {
  font-family: var(--f-mono);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--accent);
}

/* ════════════════════════════════════════════════════════════
   ROUTE RANGS · échelle des paliers ELO (ajout 2026-07-10)
   Hérite var(--accent) (violet sur /pvp) + couleurs de tier --t-*.
   ════════════════════════════════════════════════════════════ */
.rankladder { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }

.rankrow {
  --tier: var(--line-3);
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px 20px 16px 24px;
  border: 1px solid var(--line-1);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 42%), var(--bg-1);
  transition: transform 200ms cubic-bezier(.22, .9, .3, 1.1), border-color 200ms ease, box-shadow 200ms ease;
}
.rankrow::before {
  content: '';
  position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--tier);
  box-shadow: 0 0 16px -2px var(--tier);
}
.rankrow:hover { transform: translateY(-2px); border-color: var(--line-3); box-shadow: 0 16px 38px rgba(0, 0, 0, 0.38); }

.rankrow.is-locked { opacity: 0.5; }
.rankrow.is-locked .rankmedal { filter: grayscale(0.6) brightness(0.92); }
.rankrow.is-locked::before { opacity: 0.35; box-shadow: none; }

.rankrow.is-current {
  border-color: color-mix(in srgb, var(--accent) 72%, transparent);
  background: radial-gradient(130% 150% at 0% 0%, var(--accent-fade), transparent 55%), var(--bg-1);
  box-shadow: 0 0 0 1px var(--accent-glow), 0 20px 48px rgba(0, 0, 0, 0.46);
}

.rankmedal {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 27px; line-height: 1;
  border: 1.5px solid var(--line-2);
  border-color: color-mix(in srgb, var(--tier) 62%, transparent);
  background:
    radial-gradient(circle at 50% 34%, color-mix(in srgb, var(--tier) 42%, transparent), transparent 68%),
    var(--bg-2);
  box-shadow: 0 6px 18px -7px var(--tier), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.rankmedal__img {
  width: 42px; height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.45));
}

.rankrow__body { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rankrow__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rankrow__name { font-size: 17px; font-weight: 800; letter-spacing: 0.01em; }
.rankrow__badge {
  font-size: 10px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 99px; line-height: 1;
}
.rankrow__badge--you { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 18px -3px var(--accent-glow); }
.rankrow__badge--top { background: var(--bg-3); color: var(--tx-2); border: 1px solid var(--line-2); }
.rankrow__range { font-size: 13px; color: var(--tx-1); letter-spacing: 0.02em; }
.rankrow__climb { font-size: 12px; color: var(--tx-2); }

.rankrow__prog { margin-top: 9px; display: flex; flex-direction: column; gap: 5px; }
.rankrow__prog-bar { height: 6px; border-radius: 99px; background: var(--bg-3); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line-1); }
.rankrow__prog-bar > i { display: block; height: 100%; border-radius: 99px; box-shadow: 0 0 10px -2px var(--tier); transition: width 500ms cubic-bezier(.22, .9, .3, 1.1); }
.rankrow__prog-txt { font-size: 11.5px; color: var(--tx-1); letter-spacing: 0.02em; }

.rankrow__req { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; padding-left: 10px; }
.rankrow__req-v { font-size: 25px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.rankrow__req-k { font-size: 9.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--tx-2); }

.rankladder__foot { margin: 18px 2px 2px; font-size: 12px; color: var(--tx-2); text-align: center; }

@media (max-width: 560px) {
  .rankrow { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; padding: 14px 14px 14px 16px; }
  .rankmedal { width: 44px; height: 44px; font-size: 21px; }
  .rankmedal__img { width: 33px; height: 33px; }
  .rankrow__name { font-size: 15px; }
  .rankrow__req-v { font-size: 18px; }
  .rankrow__climb { font-size: 11px; }
  .rankrow__range { font-size: 12px; }
}

/* - Match-found overlay (cinematic burst) - */
.match-found-overlay {
  position: fixed; inset: 0;
  background: rgba(8,10,12,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  display: grid; place-items: center;
  animation: foundFade 240ms ease-out;
}
@keyframes foundFade { from { opacity: 0; } to { opacity: 1; } }

.match-found {
  text-align: center;
  max-width: 540px;
  padding: 0 24px;
}
.match-found__eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  display: inline-flex; align-items: center; gap: 10px;
  animation: foundEyebrow 360ms cubic-bezier(.22,.9,.3,1.1);
}
.match-found__eyebrow::before, .match-found__eyebrow::after {
  content: ''; width: 36px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
@keyframes foundEyebrow {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.match-found__title {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--tx-0);
  line-height: 1;
  margin: 0 0 28px;
  animation: foundTitle 420ms cubic-bezier(.22,.9,.3,1.1);
}
@keyframes foundTitle {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.match-found__vs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 28px;
}
.match-found__player { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.match-found__player img {
  width: 96px; height: 96px;
  border-radius: var(--r-md);
  border: 2px solid var(--line-3);
  object-fit: cover;
  background: var(--bg-2);
}
.match-found__player--me img { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-fade); }
.match-found__player--op img { border-color: var(--err);    box-shadow: 0 0 0 4px rgba(232, 95, 95, 0.18); }
.match-found__player strong {
  font-size: 18px; font-weight: 700; color: var(--tx-0);
  letter-spacing: -0.01em;
}
.match-found__player small {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--tx-3);
  letter-spacing: 0.06em;
}
.match-found__vs-mid {
  font-family: var(--f-mono);
  font-size: 22px; font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.04em;
  animation: vsRing 2s ease-in-out infinite;
}

.match-found__meta {
  display: flex; justify-content: center; gap: 32px;
  margin-bottom: 28px;
}
.match-found__meta div { display: flex; flex-direction: column; gap: 4px; }
.match-found__meta dt {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--tx-3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.match-found__meta dd {
  font-size: 16px;
  color: var(--tx-0);
  font-weight: 600;
  margin: 0;
}

.match-found__countdown {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 22px;
  background: var(--bg-2);
  border: 1px solid var(--accent-fade);
  border-radius: var(--r-md);
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--tx-2);
  letter-spacing: 0.06em;
}
.match-found__countdown strong {
  color: var(--accent);
  font-size: 22px;
  font-weight: 700;
  min-width: 28px;
  display: inline-block;
  text-align: center;
}

/* - State pill: animate - */
.state-pill[data-state="queued"] { border-color: var(--accent-fade); }
.state-pill[data-state="queued"] .state-pill__dot {
  background: var(--accent);
  animation: pillPulse 1.2s ease-in-out infinite;
}
.state-pill[data-state="match"] { border-color: rgba(232, 95, 95, 0.3); }
.state-pill[data-state="match"] .state-pill__dot { background: var(--err); animation: pillPulse 1s ease-in-out infinite; }
@keyframes pillPulse {
  0%, 100% { opacity: 1;   box-shadow: 0 0 0 0 currentColor; }
  50%      { opacity: 0.6; box-shadow: 0 0 0 4px rgba(220, 39, 48,0.0); }
}

/* - Sea picker: cleaner - */
.sea-opt {
  position: relative;
  overflow: hidden;
  transition: transform 160ms, border-color 160ms, background 160ms;
}
.sea-opt:hover { transform: translateY(-1px); }
.sea-opt.is-active::after {
  content: '';
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--accent);
  animation: seaSlide 240ms cubic-bezier(.22,.9,.3,1.1);
}
@keyframes seaSlide {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* - CTA button: more presence - */
.btn--cta {
  position: relative;
  overflow: hidden;
  transition: transform 160ms, box-shadow 240ms;
}
.btn--cta:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -10px var(--accent), inset 0 0 0 1px var(--accent);
}
.btn--cta:not(:disabled)::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transform: translateX(-100%);
  transition: transform 600ms;
}
.btn--cta:not(:disabled):hover::before { transform: translateX(100%); }

/* CTA when "leave queue" - animated pattern */
.btn--cta[data-state="queued"] {
  background: var(--bg-2);
  color: var(--tx-0);
  box-shadow: inset 0 0 0 1px var(--line-3);
}
.btn--cta[data-state="queued"] .btn__main { color: var(--tx-0); }

/* - Toasts: refined - */
.toast {
  background: var(--bg-2);
  border: 1px solid var(--line-3);
  box-shadow: 0 12px 32px -12px rgba(0,0,0,0.6);
  animation: toastIn 240ms cubic-bezier(.22,.9,.3,1.1);
  transition: opacity 280ms, transform 280ms;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}
.toast--ok  .toast__pip { background: var(--ok); }
.toast--err .toast__pip { background: var(--err); }

/* - Modals: smoother - */
.modal { animation: modalFade 200ms ease-out; }
.modal__panel { animation: modalPop 280ms cubic-bezier(.22,.9,.3,1.1); }
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalPop {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}
.modal__backdrop { backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }

/* (.nav__item active state consolidated section 4 - kept here for legacy hash refs) */

/* - LB rows / hist rows: subtle hover lift - */
.lb__row, .hist__row, .hist-full__row, .podium__slot {
  transition: background 120ms, border-color 120ms, transform 120ms;
}
.lb__row:hover { background: var(--bg-2); }

/* - Cleanup: progress bar animation - */
.prog-fill {
  transition: width 600ms cubic-bezier(.22,.9,.3,1.1);
}

/* ============================================================
   REDUCED MOTION - respecte prefers-reduced-motion (charte design)
   Coupe les boucles/pulses décoratifs, garde l'UI réactive.
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .server-card__pulse, .server-card__badge-dot,
  .match-found-overlay__pulse, .opp-report-panel__pulse,
  .opp-report-panel__live .pulse, .end-match-panel__pulse,
  .streak-panel__flame, .streak-panel__halo,
  .podium__slot[data-rank="1"] .podium__crown {
    animation: none !important;
  }
}

/* ============================================================
   POLISH round 2 (2026-05-22)
   ============================================================ */
/* Anneau de focus CLAVIER (a11y) - :focus-visible ne se déclenche qu'au
   clavier, jamais au clic souris, donc zéro impact visuel pour la souris.
   Les inputs gardent leur focus par border-color (spécificité supérieure). */
a:focus-visible, button:focus-visible, summary:focus-visible,
[tabindex]:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
/* Empty state de l'aperçu historique (matchmaking) : centré + atténué,
   cohérent avec la pleine page Historique. */
.hist__row--empty {
  display: flex;
  justify-content: center;
  text-align: center;
  padding: 18px 0;
  border-top: none;
}
.hist__row--empty .hist__name { color: var(--tx-3); }

/* [KYO] option-dark 2026-07-09 */
/* Options des menus deroulants <select> : fond sombre + texte clair.
   Par defaut le navigateur les rend en blanc -> illisible sur la DA sombre. */
select option, .select option {
  background-color: #14141e;
  color: #f2f2f6;
}
select option:disabled, .select option:disabled { color: #7a7a88; }
select option:checked, .select option:checked {
  background: linear-gradient(#2a2340, #2a2340);
  color: #ffffff;
  font-weight: 600;
}
select optgroup, .select optgroup {
  background-color: #0d0d13;
  color: #9c9cab;
  font-style: normal;
}

/* ============================================================
   ENJEU ELO (2026-07-21) - "Victoire +X · Défaite -Y" affiché
   sous le bloc VS du match et sur l'overlay MATCH TROUVÉ.
   ============================================================ */
.vs-stakes {
  margin: 2px 0 14px;
  text-align: center;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--tx-2);
  letter-spacing: 0.05em;
}
.mfo2__stakes {
  margin-top: 8px;
  text-align: center;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--tx-2);
  letter-spacing: 0.05em;
}
