/* ============================================================
   BigTracker Valorant - Feuille de style principale
   ============================================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Scrollbar dorée */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: rgba(200, 170, 110, 0.4);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(200, 170, 110, 0.75);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(200, 170, 110, 0.4) var(--bg);
}

:root {
    --bg:           #0d0e14;
    --bg-card:      #13151f;
    --bg-hover:     #1a1d2e;
    --border:       #1e2030;
    --border-hover: #2e3150;
    --accent:       #c8aa6e;
    --accent-hover: #dfc18a;
    --accent-glow:  rgba(200, 170, 110, 0.15);
    --text:         #ece8e1;
    --text-muted:   #7a8694;
    --text-dim:     #3d4558;
    --gold:         #ffd700;
    --silver:       #b0b0b0;
    --bronze:       #cd7f32;
    --radius:       8px;
    --radius-lg:    12px;
    --transition:   0.18s ease;
    --shadow:       0 4px 24px rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg);
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================
   HEADER
   ============================================================ */

/* Overlay sombre sur le background image */
.bg-layer {
    position: fixed;
    inset: 0;
    background: rgba(5, 6, 12, 0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    pointer-events: none;
    z-index: 0;
}

.header, .main, footer {
    position: relative;
    z-index: 1;
}

.header {
    background: rgba(13, 14, 20, 0.96);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header .container {
    max-width: 100%;
    padding: 0 48px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

/* Barre de recherche header */
.header-search {
    flex-shrink: 0;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    pointer-events: none;
    flex-shrink: 0;
}

.header-search-input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-family: inherit;
    font-size: 0.875rem;
    padding: 10px 18px 10px 42px;
    width: 260px;
    outline: none;
    transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.header-search-input::placeholder {
    color: var(--text-dim);
}

.header-search-input:not(:disabled):focus {
    border-color: var(--accent);
    background: rgba(200, 170, 110, 0.05);
    box-shadow: 0 0 0 3px rgba(200, 170, 110, 0.1);
}

.header-search-input:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Dropdown de recherche */
.search-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #0e1020;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5);
    z-index: 500;
}
.sd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    text-decoration: none;
    color: var(--text);
    transition: background 0.15s;
    border-bottom: 1px solid var(--border);
}
.sd-item:last-child { border-bottom: none; }
.sd-item:hover { background: var(--bg-hover); }
.sd-avatar {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}
.sd-avatar--init {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    color: var(--text-muted);
    font-size: 0.6rem;
    font-weight: 700;
}
.sd-name {
    flex: 1;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sd-tag {
    color: var(--text-dim);
    font-weight: 400;
    margin-left: 2px;
}
.sd-rank {
    font-size: 0.72rem;
    font-weight: 600;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
    user-select: none;
}

.logo-img {
    height: 54px;
    width: auto;
    object-fit: contain;
    margin-right: 6px;
}

.logo-big {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: -1px;
}

.logo-tracker {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -1px;
}

.logo-badge {
    font-size: 0.6rem;
    font-weight: 700;
    background: var(--accent);
    color: #fff;
    padding: 3px 7px;
    border-radius: 4px;
    margin-left: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.header-nav {
    display: flex;
    gap: 4px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: var(--radius);
    transition: color var(--transition), background var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text);
    background: var(--bg-hover);
}

.nav-link.active {
    color: var(--accent);
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
    padding: 48px 0 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    display: none;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 12px;
    line-height: 1.1;
    position: relative;
}

.accent {
    color: var(--accent);
}

.hero-meta {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.season-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(200, 170, 110, 0.1);
    border: 1px solid rgba(200, 170, 110, 0.35);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 20px;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    font-weight: 400;
    position: relative;
}

/* ============================================================
   MAIN
   ============================================================ */

.main {
    padding: 0 0 80px;
}

/* ============================================================
   EN-TETE DU CLASSEMENT
   ============================================================ */

.board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.board-header .section-title {
    margin-bottom: 0;
}

.board-update {
    font-size: 0.78rem;
    color: var(--text-dim);
}

/* ============================================================
   CARDS JOUEURS
   ============================================================ */

.players-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Card de base */
.player-card {
    background: rgba(13, 14, 20, 0.78);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 22px;
    position: relative;
    transition: transform var(--transition), box-shadow var(--transition);
    backdrop-filter: blur(6px);
}

.player-card:hover {
    transform: translateY(-3px);
}

/* --- TOP 1 : OR avec néon animé --- */
@keyframes neon-gold {
    0%   { box-shadow: 0 0 6px 1px rgba(255,215,0,0.15), 0 4px 20px rgba(255,215,0,0.08); }
    50%  { box-shadow: 0 0 12px 2px rgba(255,215,0,0.28), 0 4px 32px rgba(255,215,0,0.13); }
    100% { box-shadow: 0 0 6px 1px rgba(255,215,0,0.15), 0 4px 20px rgba(255,215,0,0.08); }
}

.player-card.top-1 {
    background: linear-gradient(135deg, rgba(255,215,0,0.08) 0%, rgba(255,180,0,0.04) 40%, rgba(13,14,20,0.92) 100%);
    border: 1px solid rgba(255, 215, 0, 0.35);
    animation: neon-gold 3s ease-in-out infinite;
}

.player-card.top-1:hover {
    transform: translateY(-4px);
}

/* --- TOP 2 : ARGENT --- */
.player-card.top-2 {
    background: linear-gradient(135deg, rgba(192,192,192,0.10) 0%, rgba(160,160,160,0.05) 40%, rgba(13,14,20,0.92) 100%);
    border: 1px solid rgba(192, 192, 192, 0.45);
    box-shadow: 0 0 12px 2px rgba(192,192,192,0.15), 0 0 32px 4px rgba(192,192,192,0.07);
}

/* --- TOP 3 : BRONZE --- */
.player-card.top-3 {
    background: linear-gradient(135deg, rgba(205,127,50,0.10) 0%, rgba(180,100,30,0.05) 40%, rgba(13,14,20,0.92) 100%);
    border: 1px solid rgba(205, 127, 50, 0.45);
    box-shadow: 0 0 12px 2px rgba(205,127,50,0.15), 0 0 32px 4px rgba(205,127,50,0.07);
}

/* Position */
.card-position {
    width: 40px;
    text-align: center;
    flex-shrink: 0;
}

.pos-number {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text-muted);
    letter-spacing: -1px;
}
.pos-number.pos-1 { color: var(--gold);   text-shadow: 0 0 12px rgba(255,215,0,0.6); }
.pos-number.pos-2 { color: var(--silver); text-shadow: 0 0 10px rgba(192,192,192,0.4); }
.pos-number.pos-3 { color: var(--bronze); text-shadow: 0 0 10px rgba(205,127,50,0.4); }

/* Avatar */
.card-avatar {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border);
    background: var(--bg-hover);
}

.top-1 .card-avatar { border-color: rgba(255,215,0,0.5); }
.top-2 .card-avatar { border-color: rgba(192,192,192,0.4); }
.top-3 .card-avatar { border-color: rgba(205,127,50,0.4); }

.card-avatar--placeholder {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background: var(--bg-hover);
    border: 2px solid var(--border);
    flex-shrink: 0;
}

/* Icone de rang */
.card-rank-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

.card-rank-icon--empty {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.tier-label {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Note personnalisee */
.card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.player-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Infos principales */
.card-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.card-player-name {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

/* Stats — centrees */
.card-stats {
    display: flex;
    gap: 0;
    align-items: stretch;
    flex-shrink: 0;
    border-left: 1px solid rgba(255,255,255,0.07);
    border-right: 1px solid rgba(255,255,255,0.07);
    margin: 0 auto;
}

/* Bouton détail */
.card-btn-detail {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    background: transparent;
    text-decoration: none;
    flex-shrink: 0;
    transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.card-btn-detail:hover {
    color: var(--accent);
    border-color: rgba(200, 170, 110, 0.5);
    background: rgba(200, 170, 110, 0.08);
}

.top-1 .card-btn-detail:hover {
    color: var(--gold);
    border-color: rgba(255, 215, 0, 0.5);
    background: rgba(255, 215, 0, 0.08);
}

.stat {
    text-align: center;
    min-width: 72px;
    padding: 0 20px;
    border-right: 1px solid rgba(255,255,255,0.07);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
}

.stat:last-child { border-right: none; }

.stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

.stat-dash { color: var(--text-dim); }

.wins   { color: #00c853; }
.losses { color: #e84057; }

.card-last-game {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Erreur inline sur une card */
.row-error {
    font-size: 0.72rem;
    color: var(--accent);
    margin-top: 2px;
}

/* ============================================================
   BARRE DE CONTROLES (conservee pour futur usage)
   ============================================================ */

.controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.control-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-right: 10px;
    flex-shrink: 0;
}

.region-selector {
    display: flex;
    align-items: center;
}

.region-buttons {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.region-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.region-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
    border-color: var(--border-hover);
}

.region-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #111;
    box-shadow: 0 0 12px rgba(200, 170, 110, 0.3);
}

.player-search {
    display: flex;
    gap: 8px;
}

.search-input {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-family: inherit;
    width: 280px;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.search-input::placeholder {
    color: var(--text-dim);
}

.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(200, 170, 110, 0.1);
}

/* ============================================================
   BOUTONS
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: #111;
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 70, 85, 0.3);
}

.btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-outline {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border);
}

.btn-outline:hover {
    background: var(--bg-hover);
    color: var(--text);
    border-color: var(--border-hover);
}

/* ============================================================
   MON GROUPE
   ============================================================ */

.my-group {
    margin-bottom: 28px;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 14px;
}

.group-players {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.group-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: border-color var(--transition);
    position: relative;
}

.group-card:hover {
    border-color: var(--border-hover);
}

.group-rank {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-muted);
    min-width: 44px;
    text-align: center;
    flex-shrink: 0;
}

.group-player-info {
    flex: 1;
    min-width: 0;
}

.group-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.not-ranked {
    font-size: 0.78rem;
    color: var(--text-dim);
    margin-top: 4px;
}

.btn-remove {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: color var(--transition), background var(--transition);
    line-height: 1;
    flex-shrink: 0;
}

.btn-remove:hover {
    color: var(--accent);
    background: rgba(255, 70, 85, 0.12);
}

/* ============================================================
   CARTE CLASSEMENT
   ============================================================ */

.leaderboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.leaderboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}

.leaderboard-header .section-title {
    margin-bottom: 0;
}

.leaderboard-info {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================================
   ETATS DE CHARGEMENT / ERREUR
   ============================================================ */

.loading-state,
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 80px 20px;
    color: var(--text-muted);
}

.spinner {
    width: 38px;
    height: 38px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-icon {
    font-size: 2.5rem;
}

.error-state p {
    font-size: 0.95rem;
    text-align: center;
    max-width: 400px;
}

/* ============================================================
   TABLEAU CLASSEMENT
   ============================================================ */

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead tr {
    background: rgba(255, 255, 255, 0.02);
}

.table th {
    padding: 11px 20px;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.table-row {
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}

.table-row:last-child {
    border-bottom: none;
}

.table-row:hover {
    background: var(--bg-hover);
}

/* Top 3 couleurs */
.table-row.top-1 { background: rgba(255, 215, 0, 0.04); }
.table-row.top-2 { background: rgba(192, 192, 192, 0.04); }
.table-row.top-3 { background: rgba(205, 127, 50, 0.04); }
.table-row.top-1:hover { background: rgba(255, 215, 0, 0.08); }
.table-row.top-2:hover { background: rgba(192, 192, 192, 0.08); }
.table-row.top-3:hover { background: rgba(205, 127, 50, 0.08); }

/* Animation mise en surbrillance apres recherche */
.table-row.highlight {
    animation: highlightRow 2s ease;
}

@keyframes highlightRow {
    0%, 100% { background: transparent; }
    25%, 75%  { background: rgba(200, 170, 110, 0.18); }
}

.table td {
    padding: 12px 20px;
    vertical-align: middle;
}

/* Colonne rang */
.rank-cell {
    width: 72px;
    text-align: center;
}

.rank-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-weight: 700;
    font-size: 0.875rem;
}

.rank-1 { color: var(--gold); }
.rank-2 { color: var(--silver); }
.rank-3 { color: var(--bronze); }

.rank-number {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Colonne joueur */
.player-info {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.player-name {
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.4;
    color: var(--text);
}

.player-tag {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text);
}

/* Badge tier */
.tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.775rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.tier-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

/* Colonne RR */
.rr-cell {
    white-space: nowrap;
}

.rr-value {
    font-weight: 700;
    font-size: 1rem;
    margin-right: 3px;
}

.rr-label {
    font-size: 0.72rem;
    color: var(--text-dim);
    font-weight: 600;
}

/* Colonne victoires */
.wins-value {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Valeur absente */
.text-dim {
    color: var(--text-dim);
    font-size: 0.875rem;
}

/* Classement mondial */
.global-rank {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Erreur par ligne */
.row-error {
    font-size: 0.72rem;
    color: var(--accent);
    margin-top: 3px;
}

/* Pied de tableau */
.table-footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid var(--border);
}

/* ============================================================
   PAGE STATS JOUEUR
   ============================================================ */

.ps-main { padding: 0 0 80px; }

.ps-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 32px 0 28px;
    transition: color var(--transition);
}
.ps-back:hover { color: var(--accent); }

/* Hero joueur */
.ps-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(13, 14, 20, 0.6);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 14px;
    gap: 24px;
    backdrop-filter: blur(6px);
}

.ps-hero-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ps-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.ps-avatar {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid var(--border);
    background: var(--bg-hover);
    display: block;
}

.ps-hero-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ps-player-name {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.ps-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.5px;
}

.ps-tag {
    font-size: 0.95rem;
    color: var(--text-dim);
    font-weight: 500;
}

.ps-rank-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ps-rank-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.ps-tier-label {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ps-lp {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    background: rgba(255,255,255,0.05);
    padding: 3px 10px;
    border-radius: 6px;
    border: 1px solid var(--border);
}

.ps-hero-right {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.ps-wl-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0 24px;
}

.ps-wl-sep {
    width: 1px;
    height: 36px;
    background: var(--border);
}

.ps-wl-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text);
}

.ps-wl-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

/* Barre de stats */
.ps-stats-bar {
    display: flex;
    align-items: center;
    background: rgba(13, 14, 20, 0.6);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px 0;
    margin-bottom: 24px;
    backdrop-filter: blur(6px);
}

.ps-stat-block {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.ps-stat-sep {
    width: 1px;
    height: 40px;
    background: var(--border);
    flex-shrink: 0;
}

.ps-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.ps-stat-label {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

/* Header matches */
.ps-matches-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ps-matches-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
}

.ps-matches-count {
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* Liste des matchs */
.ps-matches-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ps-no-matches {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    padding: 40px 0;
}

/* Card match */
.ps-match {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgb(13, 14, 20);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    transition: transform var(--transition);
}

.ps-match:hover { transform: translateX(3px); }

/* 1er — métal doré + néon or */
.ps-match.plac-1 {
    border-left: 3px solid #f0c030;
    border-color: rgba(240,192,48,0.5);
    background: linear-gradient(105deg,
        rgba(240,192,48,0.18) 0%,
        rgba(255,220,80,0.10) 25%,
        rgb(13,14,20) 60%);
    box-shadow: 0 0 6px rgba(240,192,48,0.5), 0 0 18px rgba(240,192,48,0.2), inset 0 1px 0 rgba(255,235,120,0.12);
}
.ps-match.plac-1:hover {
    box-shadow: 0 0 8px rgba(240,192,48,0.65), 0 0 28px rgba(240,192,48,0.3), inset 0 1px 0 rgba(255,235,120,0.18);
}

/* 2e — métal argenté + néon argent */
.ps-match.plac-2 {
    border-left: 3px solid #c0c0c0;
    border-color: rgba(192,192,192,0.5);
    background: linear-gradient(105deg,
        rgba(192,192,192,0.16) 0%,
        rgba(220,220,220,0.08) 25%,
        rgb(13,14,20) 60%);
    box-shadow: 0 0 6px rgba(192,192,192,0.45), 0 0 18px rgba(192,192,192,0.18), inset 0 1px 0 rgba(255,255,255,0.08);
}
.ps-match.plac-2:hover {
    box-shadow: 0 0 8px rgba(192,192,192,0.6), 0 0 28px rgba(192,192,192,0.28), inset 0 1px 0 rgba(255,255,255,0.14);
}

/* 3e — métal bronze + néon bronze */
.ps-match.plac-3 {
    border-left: 3px solid #cd7f32;
    border-color: rgba(205,127,50,0.5);
    background: linear-gradient(105deg,
        rgba(205,127,50,0.18) 0%,
        rgba(230,155,70,0.09) 25%,
        rgb(13,14,20) 60%);
    box-shadow: 0 0 6px rgba(205,127,50,0.5), 0 0 18px rgba(205,127,50,0.2), inset 0 1px 0 rgba(240,180,100,0.10);
}
.ps-match.plac-3:hover {
    box-shadow: 0 0 8px rgba(205,127,50,0.65), 0 0 28px rgba(205,127,50,0.3), inset 0 1px 0 rgba(240,180,100,0.16);
}
/* 4e–5e — fond bleu foncé neutre */
.ps-match.plac-mid {
    border-left-color: #3a6ea8;
    background: linear-gradient(90deg, rgba(58,110,168,0.15) 0%, rgba(58,110,168,0.06) 35%, rgb(13,14,20) 65%);
}
/* 6e–8e — fond rouge */
.ps-match.plac-bot {
    border-left-color: #e84057;
    background: linear-gradient(90deg, rgba(232,64,87,0.15) 0%, rgba(232,64,87,0.06) 35%, rgb(13,14,20) 65%);
}

/* Placement */
.ps-match-placement {
    width: 54px;
    text-align: center;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.ps-plac-number {
    font-size: 1.6rem;
    font-weight: 900;
    line-height: 1;
}

.ps-plac-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.ps-lp-badge {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 1px 5px;
    border-radius: 4px;
}
.ps-lp-gain  { color: #00c853; background: rgba(0,200,83,0.12); }
.ps-lp-loss  { color: #e84057; background: rgba(232,64,87,0.12); }
.ps-lp-promo { color: #c8aa6e; background: rgba(200,170,110,0.12); }
.ps-lp-retro { color: #e84057; background: rgba(232,64,87,0.12); }

/* Corps du match */
.ps-match-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.ps-match-augments {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.ps-augment {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid rgba(200, 170, 110, 0.3);
    overflow: hidden;
    background: rgba(200, 170, 110, 0.06);
    flex-shrink: 0;
    cursor: default;
}

.ps-augment-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ps-augment-name {
    font-size: 0.6rem;
    color: var(--accent);
    text-align: center;
    padding: 2px 3px;
    line-height: 1.2;
    word-break: break-word;
}

.ps-augment-empty {
    font-size: 0.72rem;
    color: var(--text-dim);
}

/* Tooltip au hover sur les augments */
.ps-augment::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1d2e;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 10;
}

.ps-augment:hover::after { opacity: 1; }

/* Unites */
.ps-match-units {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: flex-start;
}

.ps-unit {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: default;
}

.ps-unit-img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid var(--border);
    display: block;
    background: var(--bg-hover);
}

/* Bordures par coût (1=gris, 2=vert, 3=bleu, 4=violet, 5=or) */
.ps-unit--c1 .ps-unit-img { border-color: #6b6b6b; }
.ps-unit--c2 .ps-unit-img { border-color: #1ab34a; box-shadow: 0 0 6px rgba(26,179,74,0.35); }
.ps-unit--c3 .ps-unit-img { border-color: #4a90e2; box-shadow: 0 0 6px rgba(74,144,226,0.35); }
.ps-unit--c4 .ps-unit-img { border-color: #a64dff; box-shadow: 0 0 6px rgba(166,77,255,0.35); }
.ps-unit--c5 .ps-unit-img { border-color: #f0c030; box-shadow: 0 0 8px rgba(240,192,48,0.45); }

.ps-unit-stars {
    font-size: 0.55rem;
    line-height: 1;
    margin-top: 2px;
    letter-spacing: -1px;
}

.ps-unit--c1 .ps-unit-stars { color: #6b6b6b; }
.ps-unit--c2 .ps-unit-stars { color: #1ab34a; }
.ps-unit--c3 .ps-unit-stars { color: #4a90e2; }
.ps-unit--c4 .ps-unit-stars { color: #a64dff; }
.ps-unit--c5 .ps-unit-stars { color: #f0c030; }

/* Tooltip unites */
.ps-unit::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1d2e;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 10;
}
.ps-unit:hover::after { opacity: 1; }

.ps-match-traits {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.ps-match-traits {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: flex-start;
}

/* Trait affiché en icône */
.ps-trait-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px 4px 4px;
    border-radius: 8px;
    border: 1px solid var(--trait-color, var(--border));
    background: rgba(0, 0, 0, 0.35);
    cursor: default;
}

.ps-trait-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
    flex-shrink: 0;
    filter: brightness(0) saturate(100%);
}

/* Colorisation des icones blanches selon le style du trait */
.ps-trait-s1 .ps-trait-img {
    /* Bronze */
    filter: brightness(0) saturate(100%) invert(55%) sepia(60%) saturate(600%) hue-rotate(15deg) brightness(0.9);
}
.ps-trait-s2 .ps-trait-img {
    /* Argent */
    filter: brightness(0) saturate(0%) invert(75%) brightness(1.4);
}
.ps-trait-s3 .ps-trait-img {
    /* Or */
    filter: brightness(0) saturate(100%) invert(80%) sepia(80%) saturate(600%) hue-rotate(5deg) brightness(1.1);
}
.ps-trait-s4 .ps-trait-img {
    /* Chromatic / Prismatique */
    filter: brightness(0) saturate(100%) invert(60%) sepia(80%) saturate(800%) hue-rotate(240deg) brightness(1.1);
}

.ps-trait-count {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--trait-color, var(--text-muted));
    line-height: 1;
}

/* Tooltip */
.ps-trait-icon-wrap::after {
    content: attr(title);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1d2e;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 10;
}
.ps-trait-icon-wrap:hover::after { opacity: 1; }

/* Fallback texte si pas d'image */
.ps-trait--text {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid;
    background: rgba(0,0,0,0.2);
    white-space: nowrap;
}

/* Grille participants (4x2) */
.ps-participants-grid {
    display: grid;
    grid-template-columns: repeat(4, 38px);
    grid-template-rows: repeat(2, 38px);
    gap: 4px;
    flex-shrink: 0;
    align-self: center;
}

.ps-participant {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    overflow: visible;
    border: 2px solid transparent;
    cursor: default;
}

.ps-participant img,
.ps-participant-init {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    overflow: hidden;
    display: block;
    object-fit: cover;
}

.ps-participant-init {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    background: var(--bg-hover);
    color: var(--text-muted);
}

.ps-participant.top4 { border-color: rgba(0,200,83,0.5); }
.ps-participant.bot4 { border-color: rgba(232,64,87,0.4); }
.ps-participant--me  { border-color: #f0c030 !important; box-shadow: 0 0 6px rgba(240,192,48,0.55); }

/* Tooltip custom — commun */
.ps-participant::after,
.modal-unit::after,
.modal-aug-img::after,
.modal-aug-txt::after,
.modal-trait::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%);
    background: #12141f;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 10;
}
.ps-participant:hover::after,
.modal-unit:hover::after,
.modal-aug-img:hover::after,
.modal-aug-txt:hover::after,
.modal-trait:hover::after { opacity: 1; }

/* Tooltips dans la modal : apparaissent en dessous pour éviter le clipping overflow */
.modal-unit::after,
.modal-aug-img::after,
.modal-aug-txt::after,
.modal-trait::after {
    bottom: auto;
    top: calc(100% + 6px);
    z-index: 9999;
}

/* Couleur de bordure du tooltip selon le placement */
.ps-participant.plac-tip-1::after { border-color: #f0c030; color: #f0c030; box-shadow: 0 0 8px rgba(240,192,48,0.25); }
.ps-participant.plac-tip-2::after { border-color: #c0c0c0; color: #c0c0c0; }
.ps-participant.plac-tip-3::after { border-color: #cd7f32; color: #cd7f32; }

/* Meta du match — ligne horizontale dans le body */
.ps-match-meta {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 0;
    margin-top: 6px;
}

.ps-match-info {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.ps-match-sep {
    font-size: 0.72rem;
    color: var(--text-dim);
    padding: 0 6px;
}

.ps-match-date {
    font-size: 0.72rem;
    color: var(--text-dim);
}

/* ============================================================
   MODAL DETAIL MATCH
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 6, 12, 0.82);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-box {
    background: #0e1020;
    border: 1px solid var(--border);
    border-radius: 16px;
    width: 100%;
    max-width: 90vw;
    height: calc(100vh - 32px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 60px rgba(0,0,0,0.6);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.modal-header-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.modal-result {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}
.modal-result.victory { color: #00c853; }
.modal-result.defeat  { color: #e84057; }

.modal-meta-item {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.modal-copy-id {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 10px;
    color: var(--text-muted);
    font-size: 0.7rem;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}
.modal-copy-id:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.modal-copy-id.copied {
    border-color: #00c853;
    color: #00c853;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color var(--transition), background var(--transition);
}
.modal-close:hover { color: var(--text); background: var(--bg-hover); }

.modal-body {
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    padding: 4px 0;
}

/* Ligne participant */
.modal-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 16px;
    border-left: 3px solid transparent;
    transition: background var(--transition);
    flex: 1;
}
.modal-row:hover         { background: rgba(255,255,255,0.03); }
.modal-row.top4          { border-left-color: rgba(0,200,83,0.4); }
.modal-row.bot4          { border-left-color: rgba(232,64,87,0.35); }
.modal-row--me           { background: rgba(240,192,48,0.06); border-left-color: #f0c030 !important; }
.modal-row--me:hover     { background: rgba(240,192,48,0.09); }

.modal-placement {
    font-size: 1.1rem;
    font-weight: 800;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.modal-player-info {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 220px;
    flex-shrink: 0;
}

.modal-player-icon {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}
.modal-player-init {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    color: var(--text-muted);
    font-size: 0.6rem;
    font-weight: 700;
}

.modal-player-name {
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.modal-tag { color: var(--text-dim); font-weight: 400; margin-left: 1px; }

.modal-augments {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}
.modal-aug-img {
    position: relative;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
}
.modal-aug-txt {
    position: relative;
    width: 24px;
    height: 24px;
    border-radius: 5px;
    background: var(--bg-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    color: var(--text-muted);
}

.modal-units-block {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.modal-units {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

.modal-unit {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 2px solid transparent;
    flex-shrink: 0;
}
.modal-unit img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}
.modal-unit-stars {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.45rem;
    line-height: 1.2;
    background: rgba(0,0,0,0.55);
}

/* Réutiliser les couleurs de coût pour les unités de la modal */
.modal-unit.ps-unit--c1 { border-color: #6b6b6b; }
.modal-unit.ps-unit--c2 { border-color: #1ab34a; }
.modal-unit.ps-unit--c3 { border-color: #4a90e2; }
.modal-unit.ps-unit--c4 { border-color: #a64dff; }
.modal-unit.ps-unit--c5 { border-color: #f0c030; }

.modal-traits {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

.modal-trait {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(255,255,255,0.05);
    border-radius: 5px;
    padding: 2px 4px;
    border: 1px solid rgba(255,255,255,0.08);
}
.modal-trait .ps-trait-img {
    width: 14px;
    height: 14px;
}
.modal-trait .ps-trait-count {
    font-size: 0.65rem;
}
.modal-trait--text {
    font-size: 0.6rem;
    border: 1px solid;
    padding: 2px 5px;
    border-radius: 4px;
}

.modal-col-header {
    display: flex;
    justify-content: flex-end;
    padding: 4px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.modal-col-label {
    width: 70px;
    text-align: center;
    font-size: 0.58rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.modal-stats {
    display: flex;
    flex-direction: row;
    flex-shrink: 0;
}
.modal-stat {
    width: 70px;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
}
.modal-row:nth-child(even) {
    background: rgba(255,255,255,0.04);
}

/* ============================================================
   RESPONSIVE — player-stats.php
   ============================================================ */

/* Tablette (≤ 900px) : cacher la grille participants */
@media (max-width: 900px) {
    .ps-participants-grid { display: none; }
}

/* Tablette (≤ 768px) */
@media (max-width: 768px) {
    /* Hero */
    .ps-hero { flex-direction: column; align-items: flex-start; padding: 20px; gap: 16px; }
    .ps-hero-right { align-self: stretch; justify-content: space-around; border-top: 1px solid var(--border); padding-top: 16px; width: 100%; }
    .ps-wl-stat { padding: 0 12px; }
    .ps-stat-value { font-size: 1.3rem; }
    .ps-stats-bar { flex-wrap: wrap; gap: 0; }

    /* Cards match */
    .ps-match { padding: 12px; gap: 10px; flex-wrap: wrap; }
    .ps-match-placement { width: 48px; }
    .ps-match-body { flex: 1 1 calc(100% - 58px); min-width: 0; }
    .ps-unit-img { width: 34px; height: 34px; }
    .ps-augment { width: 30px; height: 30px; }
    .ps-match-meta { flex-wrap: wrap; row-gap: 2px; }

    /* Modal — plein écran */
    .modal-box {
        width: 100vw;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        margin: 0;
    }
    .modal-header { padding: 10px 12px; flex-wrap: wrap; gap: 6px; }
    .modal-header-info { flex-wrap: wrap; gap: 4px; font-size: 0.78rem; }
    .modal-copy-id { font-size: 0.65rem; padding: 2px 6px; }
    .modal-body { justify-content: flex-start; overflow-y: auto; }

    /* Lignes modal — réduites mais tout affiché */
    .modal-row { padding: 5px 8px; gap: 5px; min-width: 600px; }
    .modal-body { overflow-y: auto; overflow-x: auto; justify-content: flex-start; }
    .modal-col-header { min-width: 600px; }
    .modal-placement { font-size: 0.9rem; width: 22px; }
    .modal-player-info { width: 90px; min-width: 70px; flex-shrink: 0; }
    .modal-player-name { font-size: 0.68rem; }
    .modal-player-icon { width: 22px; height: 22px; }
    .modal-unit { width: 28px; height: 28px; }
    .modal-unit img { border-radius: 3px; }
    .modal-units { gap: 2px; }
    .modal-col-label { width: 52px; font-size: 0.58rem; }
    .modal-stat { width: 52px; font-size: 0.7rem; }
}

/* Mobile (≤ 540px) */
@media (max-width: 540px) {
    /* Cards match */
    .ps-match-placement { width: 42px; }
    .ps-plac-number { font-size: 1.1rem; }
    .ps-unit-img { width: 28px; height: 28px; }
    .ps-augment { width: 26px; height: 26px; }
    .ps-match-augments { display: none; }
    .ps-lp-badge { font-size: 0.62rem; padding: 1px 4px; }

    /* Modal — scroll horizontal sur les lignes si besoin */
    .modal-row { min-width: 520px; }
    .modal-col-header { min-width: 520px; }
    .modal-unit { width: 24px; height: 24px; }
    .modal-player-info { width: 80px; min-width: 60px; }
    .modal-player-icon { width: 18px; height: 18px; }

    /* Hero compact */
    .ps-hero-left { gap: 10px; }
    .ps-avatar { width: 52px; height: 52px; }
    .ps-name { font-size: 1.1rem; }
}

/* ============================================================
   FOOTER
   ============================================================ */

.footer {
    border-top: 1px solid var(--border);
    padding: 28px 0;
    text-align: center;
    margin-top: 40px;
}

.footer p {
    font-size: 0.78rem;
    color: var(--text-dim);
}

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */

.toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 9999;
    max-width: 90vw;
    text-align: center;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-success { border-color: #00c853; }
.toast-error   { border-color: var(--accent); }
.toast-info    { border-color: #00bfff; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .header .container { padding: 0 20px; }
    .header-search { display: none; }

    .hero {
        padding: 64px 0 48px;
    }

    .player-card {
        padding: 18px 16px;
        gap: 14px;
    }

    .card-rank-icon { width: 36px; height: 36px; }

    .stat {
        min-width: 56px;
        padding: 0 12px;
    }

    .stat-value { font-size: 0.95rem; }

    .board-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 540px) {
    .logo-badge {
        display: none;
    }

    .card-stats .stat:last-child { display: none; }

    .player-card {
        padding: 14px;
        gap: 10px;
    }

    .card-avatar,
    .card-avatar--placeholder {
        width: 46px;
        height: 46px;
    }

    .card-rank-icon { width: 30px; height: 30px; }
}
