/* ==========================================================================
   CLASSEMENT.CSS — Page classement — Style Épique / Dark Fantasy
   Dépend de : global.css
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Rajdhani:wght@400;500;600;700&display=swap');

/* ==========================================================================
   PAGE BASE
   ========================================================================== */
.classement-page {
    flex: 1;
    background: #060b14;
    font-family: 'Rajdhani', Arial, sans-serif;
    color: #e2e8f0;
    position: relative;
    overflow-x: hidden;
    padding: 50px 20px 80px;
}

/* Grille de fond */
.classement-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(251,191,36,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(251,191,36,0.025) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* Halo doré */
.classement-page::after {
    content: '';
    position: fixed;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(251,191,36,0.055) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.classement-page .main-content {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   CARTE PRINCIPALE
   ========================================================================== */
.classement-page .ranking-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(251,191,36,0.15);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

/* Coins décoratifs */
.classement-page .ranking-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 50px; height: 50px;
    border-top: 2px solid rgba(251,191,36,0.45);
    border-left: 2px solid rgba(251,191,36,0.45);
    border-radius: 16px 0 0 0;
    pointer-events: none;
}

.classement-page .ranking-card::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 50px; height: 50px;
    border-bottom: 2px solid rgba(251,191,36,0.2);
    border-right: 2px solid rgba(251,191,36,0.2);
    border-radius: 0 0 16px 0;
    pointer-events: none;
}

/* ==========================================================================
   TITRE
   ========================================================================== */
.classement-page .ranking-card h2 {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.1rem, 2.5vw, 1.6rem);
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 5px;
    text-shadow: 0 0 25px rgba(251,191,36,0.35);
    text-align: center;
    padding: 32px 20px 24px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border-bottom: 1px solid rgba(251,191,36,0.1);
}

.classement-page .ranking-card h2::before,
.classement-page .ranking-card h2::after {
    content: '';
    flex: 1;
    max-width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(251,191,36,0.4));
}

.classement-page .ranking-card h2::after {
    background: linear-gradient(90deg, rgba(251,191,36,0.4), transparent);
}

/* ==========================================================================
   FILTRES
   ========================================================================== */
.classement-page .filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    padding: 20px 24px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.classement-page .filters label,
.classement-page .filters .muted {
    font-size: 0.68rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    display: block;
    margin-bottom: 6px;
}

.classement-page .filters select,
.classement-page .filters input[type="number"] {
    width: 100%;
    padding: 9px 12px;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #e2e8f0;
    font-family: 'Rajdhani', Arial, sans-serif;
    font-size: 0.92rem;
    font-weight: 500;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.classement-page .filters select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23fbbf24' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}

.classement-page .filters select:focus,
.classement-page .filters input[type="number"]:focus {
    border-color: rgba(251,191,36,0.5);
    box-shadow: 0 0 0 3px rgba(251,191,36,0.1);
}

.classement-page .filters select option {
    background: #0f172a;
    color: #e2e8f0;
}

/* Boutons filtres */
.classement-page .filters button,
.classement-page .filters .btn-reset {
    padding: 10px 18px;
    border-radius: 8px;
    font-family: 'Cinzel', serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.classement-page .filters button {
    background: var(--gold);
    color: #000;
    box-shadow: 0 0 0 rgba(251,191,36,0);
}

.classement-page .filters button:hover {
    background: #fde68a;
    box-shadow: 0 0 16px rgba(251,191,36,0.4);
    transform: translateY(-1px);
}

.classement-page .filters .btn-reset {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: #64748b;
}

.classement-page .filters .btn-reset:hover {
    border-color: rgba(248,113,113,0.4);
    color: #f87171;
    background: rgba(248,113,113,0.06);
}

/* ==========================================================================
   TABLEAU
   ========================================================================== */
.classement-page table.rank {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.classement-page table.rank thead tr {
    background: rgba(0,0,0,0.3);
}

.classement-page table.rank th {
    font-family: 'Cinzel', serif;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #64748b;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(251,191,36,0.1);
    white-space: nowrap;
}

.classement-page table.rank td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: #cbd5e1;
    vertical-align: middle;
    transition: background 0.15s;
}

/* Lignes alternées */
.classement-page table.rank tbody tr:nth-child(even) td {
    background: rgba(255,255,255,0.015);
}

/* Hover ligne */
.classement-page table.rank tbody tr:hover td {
    background: rgba(251,191,36,0.05);
}

/* Ligne joueur en ligne */
.classement-page table.rank tbody tr.online-row td {
    background: rgba(34,197,94,0.05) !important;
}

/* TOP 3 — mise en avant spéciale */
.classement-page table.rank tbody tr:nth-child(1) td:first-child { color: #fbbf24; font-weight: 700; font-size: 1.1rem; }
.classement-page table.rank tbody tr:nth-child(2) td:first-child { color: #94a3b8; font-weight: 700; }
.classement-page table.rank tbody tr:nth-child(3) td:first-child { color: #b45309; font-weight: 700; }

/* Colonne rang */
.classement-page table.rank td:first-child {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    color: #475569;
    text-align: center;
    width: 50px;
}

/* Colonne nom */
.classement-page table.rank td:nth-child(2) {
    font-weight: 600;
    color: #f1f5f9;
    letter-spacing: 0.3px;
}

/* Colonne niveau */
.classement-page table.rank td:nth-child(3) {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    color: var(--gold);
    text-align: center;
}

/* Icône job */
.classement-page .job-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 2px;
    display: block;
    transition: transform 0.2s, border-color 0.2s;
}

.classement-page table.rank tbody tr:hover .job-icon {
    transform: scale(1.15);
    border-color: rgba(251,191,36,0.3);
}

/* ==========================================================================
   BADGES STATUT
   ========================================================================== */
.classement-page .badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.classement-page .badge::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.classement-page .badge.online {
    background: rgba(34,197,94,0.1);
    color: #4ade80;
    border: 1px solid rgba(34,197,94,0.3);
}

.classement-page .badge.online::before {
    background: #4ade80;
    box-shadow: 0 0 5px #4ade80;
    animation: dot-pulse 1.8s ease-in-out infinite;
}

.classement-page .badge.offline {
    background: rgba(100,116,139,0.1);
    color: #475569;
    border: 1px solid rgba(100,116,139,0.2);
}

.classement-page .badge.offline::before {
    background: #475569;
}

@keyframes dot-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(1.4); }
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.classement-page .pagination {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    padding: 20px 24px;
    border-top: 1px solid rgba(255,255,255,0.04);
}

.classement-page .pagination a {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.08);
    color: #94a3b8;
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    transition: all 0.2s;
    white-space: nowrap;
}

.classement-page .pagination a:hover {
    border-color: rgba(251,191,36,0.4);
    color: var(--gold);
    background: rgba(251,191,36,0.06);
    transform: translateY(-1px);
}

.classement-page .pagination .active {
    background: rgba(251,191,36,0.1);
    border: 1px solid rgba(251,191,36,0.3);
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 8px 16px;
    border-radius: 8px;
    white-space: nowrap;
}

.classement-page .pagination .muted {
    color: #334155;
    font-size: 0.78rem;
    letter-spacing: 1px;
}

/* ==========================================================================
   ÉTAT VIDE
   ========================================================================== */
.classement-page .muted {
    color: #475569;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .classement-page { padding: 30px 12px 60px; }
    .classement-page .filters { grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px; }
    .classement-page table.rank th,
    .classement-page table.rank td { padding: 10px 10px; }
    .classement-page .job-icon { width: 26px; height: 26px; }
    .classement-page .ranking-card h2 { font-size: 1rem; letter-spacing: 3px; padding: 24px 16px 18px; }
    .classement-page .pagination { gap: 6px; }
    .classement-page .pagination a { padding: 7px 10px; font-size: 0.62rem; }
}

@media (max-width: 480px) {
    .classement-page .filters { grid-template-columns: 1fr; }
    /* Masquer colonne job sur très petit écran */
    .classement-page table.rank th:nth-child(4),
    .classement-page table.rank td:nth-child(4) { display: none; }
}