/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Wu'Stats – Plugin CSS
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* ── Header ───────────────────────────────────────────────── */
.wustats-header {
    text-align: center;
    padding: 2rem 0 1.5rem;
}

.wustats-header h1 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wustats-subtitle {
    color: #6c757d;
    font-size: 1rem;
}

/* ── Leaderboard Search ──────────────────────────────────── */
.wustats-search-wrap {
    width: 100%;
    max-width: 430px;
}

.wustats-search-suggestions {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    z-index: 20;
}

/* ── Table ────────────────────────────────────────────────── */
.wustats-table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    border-bottom: 2px solid #dee2e6;
}

.wustats-table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

.wustats-row:hover {
    background-color: rgba(102, 126, 234, 0.05) !important;
}

/* ── Top 3 highlight ──────────────────────────────────────── */
.wustats-top-1 {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.08), transparent) !important;
}

.wustats-top-2 {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.08), transparent) !important;
}

.wustats-top-3 {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.08), transparent) !important;
}

.wustats-medal {
    font-size: 1.3rem;
}

/* Médailles personnalisées (1er / 2e / 3e) du classement */
.wustats-medal-img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    vertical-align: middle;
}

/* Stat « joueur » (synergies / pire ennemi) : pseudo + popover avatar au survol */
.ws-pvp {
    position: relative;
    cursor: default;
    outline: none;
}
.ws-pvp-name {
    border-bottom: 1px dotted currentColor;
}

/* Lien vers la page stat d'un joueur (synergies, pire ennemi, kills) */
.ws-player-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
.ws-player-link:hover {
    color: var(--wc-accent, #667eea);
}
.ws-pvp-pop {
    display: none;
    position: absolute;
    right: 0;
    bottom: calc(100% + 6px);
    z-index: 30;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.55rem;
    border-radius: 8px;
    background: #1b1f2a;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
    white-space: nowrap;
}
.ws-pvp:hover .ws-pvp-pop,
.ws-pvp:focus .ws-pvp-pop {
    display: flex;
}
.ws-pvp-pop-avatar {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    image-rendering: pixelated;
    flex: none;
}
.ws-pvp-pop-info {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    text-align: left;
}
.ws-pvp-pop-name {
    font-weight: 700;
}
.ws-pvp-pop-count {
    font-size: 0.78rem;
    opacity: 0.8;
    font-weight: 600;
}

/* Compteur V/D des stats de map (plus petit, vert / rouge) */
.ws-map-count {
    font-size: 0.78rem;
    font-weight: 600;
}
.ws-map-count--win { color: #34d399; }
.ws-map-count--loss { color: #f0556a; }

/* Pied « Top élo » sous le graphe de progression */
.ws-elo-foot {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-top: 0.4rem;
    padding: 0.6rem 1rem 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.ws-elo-foot-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--wc-muted, #8b93a3);
    font-size: 0.82rem;
    font-weight: 600;
}
.ws-elo-foot-value {
    font-family: var(--wc-display, inherit);
    font-weight: 800;
    font-size: 1.05rem;
    color: #f4c430;
}

/* Statistiques : sous-catégories cliquables (onglets) */
.ws-stats-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.ws-subtabs {
    display: inline-flex;
    gap: 0.2rem;
    padding: 0.2rem;
    border-radius: 999px;
    background: rgba(127, 127, 127, 0.12);
}
.ws-subtab {
    border: none;
    background: transparent;
    color: var(--wc-muted, #8b93a3);
    font-weight: 600;
    font-size: 0.8rem;
    line-height: 1;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.15s, background-color 0.15s;
}
.ws-subtab:hover {
    color: inherit;
}
.ws-subtab.active {
    background: var(--wc-accent, #667eea);
    color: #fff;
}
.ws-subpanel {
    display: none;
}
.ws-subpanel.active {
    display: block;
}

/* Onglets du graphe ELO (Récent / Saison) */
.ws-elo-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

/* Infobulle multi-lignes du graphe (vue Saison : date / ELO / nb de matchs) */
.ws-elo-tip.is-multi {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    line-height: 1.25;
    padding: 0.4rem 0.6rem;
}
.ws-elo-tip-date { font-size: 0.72rem; opacity: 0.7; }
.ws-elo-tip-elo { font-weight: 800; }
.ws-elo-tip-games { font-size: 0.72rem; opacity: 0.7; }
.ws-elo-tip-match { font-size: 0.74rem; font-weight: 700; color: #8ab4ff; text-decoration: none; }
.ws-elo-tip-match:hover { text-decoration: underline; }

/* Zones de match cliquables sur le graphe (vue Récent) */
.ws-elo-hit { cursor: pointer; }

/* ── Player Link ──────────────────────────────────────────── */
.wustats-player-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
    transition: color 0.15s;
}

.wustats-player-link:hover {
    color: #667eea;
}

.wustats-avatar {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    image-rendering: pixelated;
}

/* ── ELO Badge ────────────────────────────────────────────── */
.wustats-elo {
    font-weight: 700;
    color: #667eea;
    font-size: 1rem;
}

.wustats-elo-big {
    font-weight: 800;
    font-size: 1.3rem;
    color: #667eea;
}

/* ── Match Header ─────────────────────────────────────────── */
.wustats-match-stats {
    display: inline-flex;
    gap: 1.5rem;
}

.wustats-stat-box {
    text-align: center;
}

.wustats-stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 800;
    color: #333;
}

.wustats-stat-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
}

/* ── MVP ──────────────────────────────────────────────────── */
.wustats-mvp-badge {
    font-weight: 600;
    color: #d4a017;
}

.wustats-mvp-badge a {
    color: #d4a017;
    text-decoration: underline;
}

.wustats-mvp-row {
    background-color: rgba(255, 215, 0, 0.06) !important;
}

.wustats-mvp-star {
    font-size: 0.85rem;
}

/* ── Player Profile Stat Cards ────────────────────────────── */
.wustats-stat-card {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
    transition: transform 0.15s, box-shadow 0.15s;
}

.wustats-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.wustats-stat-card-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #333;
}

.wustats-stat-card-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* ── Dark mode support (Bootstrap 5.3+ / Azuriom themes) ── */
[data-bs-theme="dark"] .wustats-header h1,
.dark .wustats-header h1 {
    background: linear-gradient(135deg, #a5b4fc 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-bs-theme="dark"] .wustats-stat-card,
.dark .wustats-stat-card {
    background: #1e1e2e;
    border-color: #313244;
}

[data-bs-theme="dark"] .wustats-stat-card-value,
.dark .wustats-stat-card-value,
[data-bs-theme="dark"] .wustats-stat-value,
.dark .wustats-stat-value {
    color: #cdd6f4;
}

[data-bs-theme="dark"] .wustats-row:hover,
.dark .wustats-row:hover {
    background-color: rgba(165, 180, 252, 0.08) !important;
}

[data-bs-theme="dark"] .wustats-elo,
[data-bs-theme="dark"] .wustats-elo-big,
.dark .wustats-elo,
.dark .wustats-elo-big {
    color: #a5b4fc;
}

/* ── Responsive adjustments ───────────────────────────────── */
@media (max-width: 768px) {
    .wustats-search-wrap {
        max-width: none;
    }

    .wustats-match-stats {
        flex-wrap: wrap;
        gap: 1rem;
        justify-content: center;
    }

    .wustats-header h1 {
        font-size: 1.5rem;
    }
}

/* ============================================================================
   PAGE DE MATCH — refonte "affiche esport" (prefixe wsm-)
   S'appuie sur les variables du theme (--wc-*) -> s'adapte au jour/nuit.
   ============================================================================ */
.wsm { --wsm-win: #28b765; --wsm-lose: #e23b3b; }
.wsm .wsm-card, .wsm-vs, .wsm-mvp, .wsm-board { color: var(--wc-text); }

/* Bandeau annule */
.wsm-cancelled { display:flex; gap:.8rem; align-items:center; background:rgba(226,59,59,.12);
  border:1px solid rgba(226,59,59,.4); border-radius:var(--wc-radius); padding:1rem 1.2rem; margin-bottom:1.4rem; }
.wsm-cancelled i { font-size:1.5rem; color:var(--wsm-lose); }
.wsm-cancelled small { color:var(--wc-muted); }

/* ---- En-tete VS ---- */
.wsm-vs { position:relative; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:1rem;
  background:var(--wc-surface); border:1px solid var(--wc-border);
  border-radius:var(--wc-radius); padding:1.6rem 1.4rem; }
.wsm-vs-side { position:relative; display:flex; flex-direction:column; align-items:center; gap:.5rem; text-align:center; min-width:0; }
.wsm-vs-result { font-family:var(--wc-display); font-weight:700; text-transform:uppercase; letter-spacing:.14em; font-size:.7rem; opacity:.85; }
.wsm-vs-win .wsm-vs-result { color:var(--wsm-win); }
.wsm-vs-lose .wsm-vs-result { color:var(--wsm-lose); }
.wsm-vs-team { font-family:var(--wc-display); font-weight:700; font-size:clamp(1.2rem,3vw,1.8rem); line-height:1.05;
  text-transform:uppercase; letter-spacing:.01em; max-width:100%; overflow:hidden; text-overflow:ellipsis; }
.wsm-vs-win .wsm-vs-team { color:var(--wsm-win); }
.wsm-vs-lose .wsm-vs-team { color:var(--wsm-lose); }
.wsm-vs-faces { display:flex; flex-wrap:wrap; justify-content:center; gap:.3rem; }
.wsm-vs-faces img { width:34px; height:34px; border-radius:7px; image-rendering:pixelated; border:1px solid var(--wc-border); background:var(--wc-surface-3); }
.wsm-vs-center { position:relative; text-align:center; padding:0 .5rem; }
.wsm-vs-score { font-family:var(--wc-display); font-weight:800; font-size:clamp(2rem,6vw,3.4rem); line-height:1; display:flex; align-items:center; gap:.5rem; justify-content:center; }
.wsm-vs-score .w { color:var(--wsm-win); } .wsm-vs-score .l { color:var(--wsm-lose); }
.wsm-vs-score em { color:var(--wc-muted-2); font-style:normal; font-size:.7em; }
.wsm-vs-time { color:var(--wc-text); }
.wsm-vs-time i { color:var(--wc-accent); font-size:.62em; }
.wsm-vs-badge { display:inline-block; margin-top:.3rem; font-family:var(--wc-display); font-weight:800; letter-spacing:.12em;
  font-size:.8rem; color:#14141a; background:var(--wc-accent); padding:.12rem .6rem; border-radius:6px; }
.wsm-vs-sub { margin-top:.35rem; font-size:.78rem; color:var(--wc-muted); }

/* ---- Chips meta ---- */
.wsm-meta { display:flex; flex-wrap:wrap; gap:.5rem; justify-content:center; margin:1rem 0 1.5rem; }
.wsm-chip { display:inline-flex; align-items:center; gap:.35rem; font-size:.8rem; font-weight:600;
  background:var(--wc-surface-2); border-radius:6px; padding:.28rem .65rem; color:var(--wc-muted); }
.wsm-chip i { color:var(--wc-muted-2); }

/* ---- Spotlight MVP ---- */
.wsm-mvp { position:relative; display:flex; align-items:center; gap:1.4rem; margin-bottom:1.5rem;
  background:radial-gradient(120% 140% at 12% 0%, rgba(255,193,7,.16), transparent 60%), var(--wc-surface);
  border:1px solid var(--wc-accent); border-radius:var(--wc-radius); padding:1rem 1.4rem; box-shadow:var(--wc-shadow); }
.wsm-mvp-render { flex:0 0 auto; width:84px; display:flex; justify-content:center; }
.wsm-mvp-render img { height:128px; width:auto; image-rendering:pixelated; filter:drop-shadow(0 8px 14px rgba(0,0,0,.45)); }
.wsm-mvp-info { flex:1 1 auto; min-width:0; }
.wsm-mvp-tag { display:inline-flex; align-items:center; gap:.35rem; font-family:var(--wc-display); font-weight:800;
  text-transform:uppercase; letter-spacing:.05em; font-size:.78rem; color:#14141a; background:var(--wc-accent); padding:.18rem .7rem; border-radius:999px; }
.wsm-mvp-tag i { color:#14141a; }
.wsm-mvp-name { display:block; margin:.45rem 0 .7rem; font-family:var(--wc-display); font-weight:800; font-size:1.7rem;
  color:var(--wc-text); text-decoration:none; }
.wsm-mvp-name:hover { color:var(--wc-accent); }
.wsm-mvp-stats { display:flex; flex-wrap:wrap; gap:.6rem 1.4rem; }
.wsm-mvp-stats > div { display:flex; flex-direction:column; line-height:1.1; }
.wsm-mvp-stats b { font-family:var(--wc-display); font-weight:800; font-size:1.4rem; color:var(--wc-accent); }
.wsm-mvp-stats span { font-size:.72rem; text-transform:uppercase; letter-spacing:.04em; color:var(--wc-muted); }
.wsm-mvp-stats .up b { color:var(--wsm-win); } .wsm-mvp-stats .down b { color:var(--wsm-lose); }

/* ---- Cartes generiques ---- */
.wsm-card { background:var(--wc-surface); border:1px solid var(--wc-border); border-radius:var(--wc-radius); margin-bottom:1.5rem; overflow:hidden; }
.wsm-card-head { font-family:var(--wc-display); font-weight:700; text-transform:uppercase; letter-spacing:.04em;
  padding:.9rem 1.2rem; border-bottom:1px solid var(--wc-border); background:var(--wc-surface-2); }
.wsm-card-head i { color:var(--wc-accent); margin-right:.4rem; }

/* ---- Scoreboard d'equipe ---- */
.wsm-board { background:var(--wc-surface); border:1px solid var(--wc-border); border-radius:var(--wc-radius);
  margin-bottom:1.4rem; overflow:hidden; border-top:3px solid var(--wsm-win); }
.wsm-board.is-lose { border-top-color:var(--wsm-lose); }
.wsm-board.is-cancelled { border-top-color:var(--wc-muted-2); }
.wsm-board-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:.6rem;
  padding:.85rem 1.2rem; background:var(--wc-surface-2); border-bottom:1px solid var(--wc-border); }
.wsm-board-team { font-family:var(--wc-display); font-weight:800; text-transform:uppercase; letter-spacing:.04em; font-size:1.1rem; }
.wsm-board.is-win .wsm-board-team { color:var(--wsm-win); }
.wsm-board.is-lose .wsm-board-team { color:var(--wsm-lose); }
.wsm-board-totals { display:flex; gap:1rem; flex-wrap:wrap; font-size:.82rem; color:var(--wc-muted); }
.wsm-board-totals b { color:var(--wc-text); font-family:var(--wc-display); font-weight:700; }

.wsm-table-wrap { overflow-x:auto; }
.wsm-table { width:100%; border-collapse:collapse; }
.wsm-table thead th { font-size:.72rem; text-transform:uppercase; letter-spacing:.03em; color:var(--wc-muted);
  font-weight:700; padding:.6rem .5rem; text-align:center; border-bottom:1px solid var(--wc-border); white-space:normal; line-height:1.15; vertical-align:bottom; }
.wsm-table th.wsm-th-player { text-align:left; padding-left:1.2rem; }
.wsm-th-q { color:var(--wc-muted-2); font-weight:600; }   /* précision grisée : infligés / reçus */
/* Largeurs de colonnes FIXES et identiques pour les 2 tableaux d'équipe -> colonnes alignées entre Vert et Rouge */
@media (min-width: 992px) {
    .wsm-table { table-layout:fixed; }
    .wsm-table th:nth-child(1), .wsm-table td:nth-child(1) { width:22%; }  /* joueur */
    .wsm-table th:nth-child(2), .wsm-table td:nth-child(2) { width:9%; }   /* kills */
    .wsm-table th:nth-child(3), .wsm-table td:nth-child(3) { width:8%; }   /* morts */
    .wsm-table th:nth-child(4), .wsm-table td:nth-child(4) { width:9%; }   /* k/d */
    .wsm-table th:nth-child(5), .wsm-table td:nth-child(5) { width:10%; }  /* lit détruit */
    .wsm-table th:nth-child(6), .wsm-table td:nth-child(6) { width:13%; }  /* dégâts */
    .wsm-table th:nth-child(7), .wsm-table td:nth-child(7) { width:13%; }  /* reçus */
    .wsm-table th:nth-child(8), .wsm-table td:nth-child(8) { width:9%; }   /* score */
    .wsm-table th:nth-child(9), .wsm-table td:nth-child(9) { width:7%; }   /* elo */
}
.wsm-table tbody td { padding:.55rem .5rem; text-align:center; border-bottom:1px solid var(--wc-border-soft); vertical-align:middle; }
.wsm-table tbody tr:last-child td { border-bottom:0; }
.wsm-table tbody tr.is-mvp { box-shadow:inset 3px 0 0 var(--wc-accent); }
.wsm-mvp-tag-inline { font-family:var(--wc-display); font-size:.6rem; font-weight:700; letter-spacing:.08em;
  text-transform:uppercase; color:var(--wc-accent); border:1px solid currentColor; border-radius:4px; padding:.02rem .28rem; margin-left:.2rem; opacity:.9; }
.wsm-td-player { text-align:left !important; padding-left:1.2rem !important; }
.wsm-td-player a { display:flex; align-items:center; gap:.55rem; text-decoration:none; color:var(--wc-text); min-width:0; }
.wsm-td-player a:hover .wsm-name { color:var(--wc-accent); }
.wsm-face { width:30px; height:30px; border-radius:6px; image-rendering:pixelated; background:var(--wc-surface-3); flex:0 0 auto; }
.wsm-name { font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wsm-mvp-star { font-size:.85rem; }
.wsm-final { color:var(--wsm-lose); font-weight:800; }
.wsm-score { font-family:var(--wc-display); font-weight:700; }

/* Badge MVP (1er de chaque équipe, par score) — effet 3D extrudé.
   Doré pour l'équipe gagnante, argenté pour la perdante. */
.wsm-mvp-badge { display:inline-block; font-family:var(--wc-display); font-weight:800;
  font-size:.92rem; letter-spacing:.06em; text-transform:uppercase; line-height:1; }
.wsm-mvp-badge.is-win { color:#ffd24a; }
.wsm-mvp-badge.is-lose { color:#dfe5ee; }
.wsm-sm { font-size:.8rem; }
/* K/D coloré (rouge pastel -> vert pastel) : un peu de gras pour faire ressortir la teinte */
.wsm-kd { font-weight:700; }

/* ── Joueur « en feu » : K/D > 2.5 ET >= 30% des ressources de l'équipe ── */
@keyframes wsm-fire-glow {
  0%, 100% { box-shadow: 0 0 6px 1px rgba(255,138,40,.55), 0 0 12px 2px rgba(255,80,30,.32); }
  50%      { box-shadow: 0 0 11px 3px rgba(255,170,70,.85), 0 0 22px 5px rgba(255,90,30,.5); }
}
@keyframes wsm-fire-flicker {
  0%, 100% { transform: scale(1) rotate(-3deg); opacity: 1; }
  45%      { transform: scale(1.2) rotate(4deg); opacity: .82; }
  70%      { transform: scale(1.05) rotate(-1deg); opacity: .95; }
}
.wsm-onfire { background: linear-gradient(90deg, rgba(255,120,40,.12), transparent 55%); }
.wsm-onfire .wsm-face { border: 1px solid rgba(255,150,50,.85);
  animation: wsm-fire-glow 1.6s ease-in-out infinite; }
.wsm-onfire .wsm-name { color: #ffb15c;
  text-shadow: 0 0 6px rgba(255,120,40,.7), 0 0 13px rgba(255,80,20,.4); }
.wsm-onfire .wsm-td-player a:hover .wsm-name { color: #ffc98a; }
.wsm-fire { display: inline-block; margin-left: .3rem; font-size: .95em; line-height: 1;
  filter: drop-shadow(0 0 4px rgba(255,120,30,.85));
  animation: wsm-fire-flicker 1.1s ease-in-out infinite; transform-origin: 50% 80%; }
@media (prefers-reduced-motion: reduce) {
  .wsm-onfire .wsm-face, .wsm-fire { animation: none; }
}
/* rond vert = lit détruit ; rond gris foncé discret = aucun lit */
.wsm-bed-dot { display:inline-block; width:12px; height:12px; border-radius:50%; background:var(--wsm-win);
  border:2px solid var(--wc-surface); box-shadow:0 0 0 2px var(--wsm-win); }
.wsm-bed-dot.is-none { background:var(--wc-muted-2); box-shadow:0 0 0 2px var(--wc-muted-2); opacity:.3; }
/* ELO : pastille sur fond plus sombre pour ressortir */
.wsm-elo { color:var(--wc-muted-2); }
.wsm-elo.up, .wsm-elo.down { display:inline-block; padding:.1rem .45rem; border-radius:6px; background:rgba(0,0,0,.28); font-weight:700; }
.wsm-elo.up { color:var(--wsm-win); }
.wsm-elo.down { color:var(--wsm-lose); }
/* en mode jour : pastille ELO beige (comme le fond des cartes) au lieu du fond sombre */
html.wc-light .wsm-elo.up, html.wc-light .wsm-elo.down { background:var(--wc-surface-3); }

/* barres de degats */
.wsm-td-bar { min-width:120px; }
.wsm-bar { display:block; height:6px; border-radius:4px; background:var(--wc-surface-3); overflow:hidden; margin-bottom:.2rem; }
.wsm-bar i { display:block; height:100%; border-radius:4px; }
.wsm-bar-dmg i { background:var(--wc-accent); }
.wsm-bar-rec i { background:var(--wsm-lose); }
.wsm-bar-val { font-size:.8rem; color:var(--wc-muted-2); opacity:.75; }

/* ---- Cartes dépliables (enchantements, ressources) ---- */
.wsm-fold summary { cursor:pointer; list-style:none; display:flex; align-items:center; gap:.5rem; }
.wsm-fold summary::-webkit-details-marker { display:none; }
.wsm-fold:not([open]) summary { border-bottom:0; }
.wsm-count { font-family:var(--wc-display); font-weight:700; font-size:.72rem; color:var(--wc-muted);
  background:var(--wc-surface-3); border-radius:999px; padding:.05rem .5rem; }
.wsm-chev { margin-left:auto; color:var(--wc-muted); transition:transform .2s ease; }
.wsm-fold[open] .wsm-chev { transform:rotate(180deg); }
/* liste en une seule colonne (comme au début) avec rail vertical = effet timeline */
.wsm-timeline { list-style:none; margin:0; padding:.8rem 1.2rem; position:relative; }
.wsm-timeline::before { content:""; position:absolute; top:.8rem; bottom:.8rem; left:calc(1.2rem + 58px); width:2px; background:var(--wc-border); z-index:0; }
.wsm-tl-item { position:relative; z-index:1; display:grid; grid-template-columns:42px 18px minmax(0, 1fr); align-items:center; gap:.5rem; padding:.3rem 0; min-width:0; }
.wsm-tl-time { font-family:var(--wc-display); font-weight:700; font-size:.82rem; color:var(--wc-muted); text-align:right; }
/* le rond prend la couleur RÉELLE de l'équipe (variable --c posée en inline) */
.wsm-tl-dot { width:12px; height:12px; border-radius:50%; justify-self:center; background:var(--c, var(--wc-muted-2));
  border:2px solid var(--wc-surface); box-shadow:0 0 0 2px var(--c, var(--wc-muted-2)); }
.wsm-tl-enchant { font-weight:700; font-size:.86rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
/* Cellule contenu d'un objectif : nom + récompense en ligne (reste dans la 3e colonne) */
.wsm-tl-obj { min-width:0; display:flex; flex-wrap:wrap; align-items:baseline; gap:.2rem .6rem; }
.wsm-tl-obj > b { font-size:.86rem; }
.wsm-tl-reward { font-size:.78rem; color:var(--wc-muted); white-space:nowrap; }

/* ---- Ressources ---- */
/* Ressources : colonnes alignées -> total centré sous le label, tiers sous (T1/T2/T3) */
.wsm-res { padding:.5rem .6rem; }
.wsm-res-head, .wsm-res-row { display:grid; grid-template-columns:minmax(0,1fr) 4.6rem 5.4rem 4.6rem 5.4rem; gap:.4rem; padding:.4rem .5rem; align-items:center; }
.wsm-res-head { padding-bottom:.5rem; margin-bottom:.2rem; border-bottom:1px solid var(--wc-border); }
.wsm-res-head span { font-size:.66rem; text-transform:uppercase; letter-spacing:.02em; font-weight:700; color:var(--wc-muted); text-align:center; }
.wsm-res-head span:first-child { text-align:left; }
.wsm-res-head .wsm-dia-k { color:#3aa6c9; }
.wsm-res-head .wsm-eme-k { color:var(--wsm-win); }
.wsm-res-head .wsm-tiers-k { color:var(--wc-muted-2); font-weight:600; font-size:.58rem; }
.wsm-res-row { border-radius:8px; }
.wsm-res-row:nth-child(even) { background:var(--wc-surface-2); }
.wsm-res-player { display:flex; align-items:center; gap:.5rem; text-decoration:none; color:var(--wc-text); min-width:0; font-weight:600; }
.wsm-res-player img { width:26px; height:26px; border-radius:6px; image-rendering:pixelated; flex:0 0 auto; }
.wsm-res-player span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wsm-res-player:hover span { color:var(--wc-accent); }
.wsm-res-n { text-align:center; font-family:var(--wc-display); font-weight:800; font-size:1.02rem; }
.wsm-res-d { text-align:center; font-size:.72rem; color:var(--wc-muted-2); }

/* Ressources & enchantements côte à côte (ressources à gauche) */
.wsm-folds { display:grid; grid-template-columns:minmax(0, 1.15fr) minmax(0, 0.85fr); gap:1.4rem; align-items:start; margin-bottom:1.5rem; }
.wsm-folds > .wsm-card { margin-bottom:0; }

/* ---- Bouton retour ---- */
.wsm-back { display:inline-flex; align-items:center; gap:.5rem; text-decoration:none; font-weight:600;
  color:var(--wc-text); background:var(--wc-surface-2); border:1px solid var(--wc-border); border-radius:999px; padding:.55rem 1.2rem; transition:.2s; }
.wsm-back:hover { border-color:var(--wc-accent); color:var(--wc-accent); transform:translateY(-1px); }

/* ============ Responsive : tableaux -> cartes empilees ============ */
@media (max-width: 575.98px) {
    .wsm-vs { grid-template-columns:1fr; gap:.8rem; }
    .wsm-vs-center { order:-1; }
}
@media (max-width: 991.98px) {
    .wsm-folds { grid-template-columns:1fr; }
    .wsm-table-wrap { overflow-x:visible; }
    .wsm-table thead { display:none; }
    .wsm-table, .wsm-table tbody, .wsm-table tr, .wsm-table td { display:block; width:100%; }
    .wsm-table tbody tr { padding:.6rem 1rem; border-bottom:1px solid var(--wc-border); }
    .wsm-table tbody td { display:flex; justify-content:space-between; align-items:center; text-align:right !important;
      padding:.25rem 0 !important; border:0; }
    .wsm-table tbody td::before { content:attr(data-label); color:var(--wc-muted); font-size:.78rem; text-transform:uppercase; letter-spacing:.03em; }
    .wsm-td-player { padding-left:0 !important; }
    .wsm-td-player::before { display:none; }
    .wsm-td-player a { width:100%; }
    .wsm-td-bar { flex-wrap:wrap; }
    .wsm-td-bar .wsm-bar { width:100%; order:3; margin-top:.25rem; }
}
@media (max-width: 575.98px) {
    .wsm-res-head, .wsm-res-row { grid-template-columns:minmax(0,1fr) 2.4rem 3.7rem 2.4rem 3.7rem; gap:.25rem; }
    .wsm-res-n { font-size:.92rem; }
    .wsm-res-head span { font-size:.58rem; }
    .wsm-res-head .wsm-tiers-k { font-size:.52rem; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Profil joueur – Graphe ELO + Jauge Winrate
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ws-charts {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}
.ws-chart-card {
    background: var(--wc-surface, #181b22);
    border: 1px solid var(--wc-border, #2a2f3a);
    border-radius: var(--wc-radius, 12px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.ws-chart-head {
    font-family: var(--wc-display, inherit);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: .9rem;
    padding: .85rem 1.2rem;
    border-bottom: 1px solid var(--wc-border, #2a2f3a);
    background: var(--wc-surface-2, #1f232c);
}
.ws-chart-head i { color: var(--wc-accent, #ffc107); margin-right: .45rem; }

/* ── Graphe ELO ── */
.ws-elo-chart { position: relative; padding: .6rem .8rem; min-height: 120px; }
.ws-elo-svg { display: block; width: 100%; height: auto; }
.ws-chart-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--wc-muted, #8b93a3);
    font-size: .9rem;
}
.ws-elo-rank-elo { font-family: var(--wc-display, inherit); font-weight: 700; font-size: 12px; }
.ws-elo-rank-icon { filter: drop-shadow(0 1px 2px rgba(0,0,0,.45)); }
.ws-elo-focus-line { stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; pointer-events: none; }
.ws-elo-focus-dot { stroke: #10131a; stroke-width: 2; opacity: 0; pointer-events: none; }
.ws-elo-chart.is-hover .ws-elo-focus-line,
.ws-elo-chart.is-hover .ws-elo-focus-dot { opacity: 1; }
.ws-elo-tip {
    position: absolute;
    transform: translate(-50%, -140%);
    background: var(--wc-surface-3, #0f1218);
    border: 1px solid var(--wc-border, #2a2f3a);
    color: var(--wc-text, #eef1f6);
    font-family: var(--wc-display, inherit);
    font-weight: 700;
    font-size: .78rem;
    padding: .2rem .5rem;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity .12s ease;
    z-index: 5;
}
.ws-elo-chart.is-hover .ws-elo-tip { opacity: 1; }

/* ── Jauge Winrate ── */
.ws-winrate-card { align-items: stretch; }
.ws-winrate-gauge { padding: 1rem 1.2rem 1.3rem; display: flex; align-items: center; justify-content: center; flex: 1; }
.ws-wr-svg { width: 100%; max-width: 260px; height: auto; }
.ws-wr-pct {
    font-family: var(--wc-display, inherit);
    font-weight: 800;
    font-size: 34px;
    fill: var(--wc-text, #eef1f6);
}
.ws-wr-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    fill: var(--wc-muted, #8b93a3);
}
.ws-wr-detail { font-family: var(--wc-display, inherit); font-weight: 700; font-size: 15px; }
.ws-wr-sep { fill: var(--wc-muted-2, #5b6373); }

@media (max-width: 767.98px) {
    .ws-charts { grid-template-columns: 1fr; }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Titres joueur (badges colorés par tier, à côté du pseudo)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
.ws-titles {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.ws-title {
    display: inline-flex;
    align-items: center;
    font-family: var(--wc-display, inherit);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
    padding: 0.32rem 0.6rem;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: default;
}

/* Dégradé de tier : S (le plus rare, bleu ciel) > A (vert) → E (pire, rouge). */
.ws-title--S { color: #0ea5e9; background: rgba(56, 189, 248, 0.16); border-color: rgba(56, 189, 248, 0.5); }
.ws-title--A { color: #27ae60; background: rgba(46, 204, 113, 0.15); border-color: rgba(46, 204, 113, 0.45); }
.ws-title--B { color: #7cb342; background: rgba(139, 195, 74, 0.15); border-color: rgba(139, 195, 74, 0.45); }
.ws-title--C { color: #c79100; background: rgba(244, 196, 48, 0.18); border-color: rgba(244, 196, 48, 0.5); }
.ws-title--D { color: #e67e22; background: rgba(230, 126, 34, 0.15); border-color: rgba(230, 126, 34, 0.45); }
.ws-title--E { color: #e0245e; background: rgba(224, 36, 94, 0.15); border-color: rgba(224, 36, 94, 0.45); }

/* Bouton « +N » / repli. */
.ws-title-more {
    display: inline-flex;
    align-items: center;
    font-family: var(--wc-display, inherit);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.32rem 0.55rem;
    border-radius: 999px;
    border: 1px dashed rgba(127, 127, 127, 0.55);
    background: transparent;
    color: var(--wc-muted, #8b93a3);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.ws-title-more:hover {
    color: inherit;
    border-color: rgba(127, 127, 127, 0.85);
}

/* Les titres au-delà des 4 premiers restent cachés tant que non déplié. */
.ws-titles:not(.is-expanded) .ws-title-extra {
    display: none;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   Classement : mouvements (places gagnées / perdues)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
/* Colonne-gouttière dédiée, tout à gauche du tableau. */
.ws-move-col,
.ws-move-cell {
    width: 40px;
    white-space: nowrap;
    padding-left: 0.25rem;
    padding-right: 0.1rem;
}

.ws-move {
    display: inline-flex;
    align-items: center;
    gap: 0.02rem;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

.ws-move i {
    font-size: 1.05em;
}

.ws-move-up { color: #27ae60; }
.ws-move-down { color: #e0245e; }

/* Gouttière entièrement masquée quand le bouton « Mouvements » est désactivé. */
.ws-leaderboard:not(.ws-show-moves) .ws-move-col,
.ws-leaderboard:not(.ws-show-moves) .ws-move-cell {
    display: none;
}

.wustats-moves-toggle.is-off {
    opacity: 0.55;
}
