/* ==========================================================================
   CTLServ, classement.css
   Reprise a l'identique du panneau affiche en jeu (resource ctlserv,
   web/dui.html): memes colonnes, memes tailles, memes couleurs de podium.
   Seules differences assumees: la police du site (Montserrat au lieu de celle
   du DUI) et l'absence de la barre de defilement factice, inutile ici puisque
   la page defile pour de vrai.
   ========================================================================== */

.clsm { position: relative; overflow: hidden; padding: clamp(44px, 6vw, 76px) 0 clamp(56px, 7vw, 90px); }
.clsm__bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.clsm__in { position: relative; }

/* ------------------------------------------------------------------ Carte */

.lb-card {
  width: 100%;
  background: rgba(9, 11, 17, .93);
  border: 1px solid var(--br);
  border-top: 4px solid var(--blue);          /* --accent du DUI */
  border-radius: 12px;
  overflow: hidden;
}

.lb-head { display: flex; align-items: center; gap: 18px; padding: 17px 26px 12px; }
.lb-crown { width: 55px; height: 55px; flex: 0 0 auto; }
.lb-crown path { fill: var(--blue); }
.lb-sub {
  display: block;
  color: var(--blue); font-size: 13px; font-weight: 500; line-height: 1;
  text-transform: uppercase;
}
.lb-head h1 { font-size: 26px; font-weight: 600; line-height: 1; text-transform: uppercase; }

/* ---------------------------------------------------------------- Colonnes */

.lb-cols, .lb-row {
  display: grid;
  grid-template-columns: 1fr 86px 84px 67px 70px;
  align-items: center;
  gap: 10px;
  padding: 0 26px;
}
.lb-cols {
  padding-top: 11px; padding-bottom: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  color: var(--muted); font-size: 13px; font-weight: 500; text-transform: uppercase;
}
.lb-cols span:not(:first-child), .lb-row > :not(:first-child) { text-align: right; }

/* ------------------------------------------------------------------ Lignes */

.lb-rows { list-style: none; margin: 0; padding: 0; }
.lb-row { position: relative; height: 54px; }
.lb-row + .lb-row { border-top: 1px solid rgba(255, 255, 255, .04); }
.lb-row.alt { background: rgba(255, 255, 255, .022); }

.lb-who { display: flex; align-items: baseline; gap: 13px; min-width: 0; }
.lb-rank { flex: 0 0 auto; width: 46px; color: var(--muted); font-size: 17px; }
.lb-name {
  font-size: 22px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.lb-flag {
  flex: 0 0 auto;
  width: 26px; height: 18px;
  border-radius: 3px; overflow: hidden;
  align-self: center;
}
.lb-flag svg { display: block; width: 100%; height: 100%; }
.lb-flag.none { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }

.lb-crew {
  flex: 0 0 auto;
  max-width: 144px;
  font-size: 16px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.lb-elo { font-size: 22px; font-weight: 500; }
.lb-wr, .lb-games { color: var(--muted); font-size: 17px; }
.lb-streak { font-size: 16px; font-weight: 500; }
.lb-streak.up { color: var(--ok); }
.lb-streak.down { color: #ff5c5c; }
.lb-streak.flat { color: var(--muted); }

/* Podium: liseré a gauche et couleur propre au rang, comme en jeu. */
.lb-row.top { background: linear-gradient(90deg, rgba(255, 255, 255, .05), transparent 70%); }
.lb-row.top::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px;
  width: 4px; background: currentColor;
}
.lb-row.r1 { color: #FFCD3C; }
.lb-row.r2 { color: #C8D2E1; }
.lb-row.r3 { color: #D68C4E; }
.lb-row.top .lb-name, .lb-row.top .lb-elo { color: currentColor; }

.lb-empty { padding: 36px 26px; text-align: center; color: var(--muted); font-size: 20px; }
.lb-foot {
  padding: 13px 26px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  color: var(--dim); font-size: 13px;
}

/* ------------------------------------------------------------- Responsive */
/* En dessous de 760 px les cinq colonnes ne tiennent plus. On garde le joueur
   et le rating, les trois autres passent sous le nom. */

@media (max-width: 760px) {
  .lb-cols, .lb-row { grid-template-columns: 1fr 78px; padding: 0 16px; }
  .lb-cols span:nth-child(3), .lb-cols span:nth-child(4), .lb-cols span:nth-child(5) { display: none; }
  .lb-row { height: auto; padding-top: 12px; padding-bottom: 12px; }
  .lb-row .lb-wr, .lb-row .lb-games, .lb-row .lb-streak {
    grid-column: 1 / -1; text-align: left;
    color: var(--muted); font-size: 13.5px;
  }
  .lb-row .lb-wr::before { content: attr(data-lbl) ' '; }
  .lb-row .lb-games::before { content: attr(data-lbl) ' '; }
  .lb-row .lb-streak::before { content: attr(data-lbl) ' '; }
  .lb-name { font-size: 18px; }
  .lb-elo { font-size: 18px; }
  .lb-head { padding: 14px 16px 10px; gap: 12px; }
  .lb-crown { width: 40px; height: 40px; }
  .lb-head h1 { font-size: 20px; }
}
