/* =====================================================
   ATHLE CLASSEMENTS — Styles
   Thème rouge/sombre (cohérent avec athle.tn)
   ===================================================== */

:root {
    --athle-red:        #c0392b;
    --athle-red-dark:   #922b21;
    --athle-dark:       #1a1a2e;
    --athle-grey:       #f5f5f5;
    --athle-border:     #e0e0e0;
    --athle-text:       #333;
    --athle-gold:       #f39c12;
    --athle-silver:     #95a5a6;
    --athle-bronze:     #ca6f1e;
    --athle-green:      #27ae60;
}

/* ---- Wrapper principal ---- */
.athle-classements-page {
    font-family: inherit;
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 0 40px;
}

/* ---- En-tête ---- */
.athle-classements-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.athle-classements-header h2 {
    margin: 0;
    font-size: 1.6rem;
    color: var(--athle-dark);
}
.athle-saison-badge {
    background: var(--athle-red);
    color: #fff;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ---- Barre de filtres ---- */
.athle-filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    background: var(--athle-grey);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    align-items: flex-end;
}
.athle-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 140px;
}
.athle-filter-group label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 0.5px;
}
.athle-select {
    padding: 8px 12px;
    border: 1px solid var(--athle-border);
    border-radius: 6px;
    font-size: 0.9rem;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
}
.athle-select:focus { border-color: var(--athle-red); outline: none; box-shadow: 0 0 0 2px rgba(192,57,43,.15); }

/* ---- Boutons ---- */
.athle-btn-primary {
    background: var(--athle-red);
    color: #fff;
    border: none;
    padding: 9px 22px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    align-self: flex-end;
}
.athle-btn-primary:hover { background: var(--athle-red-dark); }

/* ---- Onglets ---- */
.athle-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--athle-border);
    margin-bottom: 25px;
    overflow-x: auto;
}
.athle-tab-btn {
    background: none;
    border: none;
    padding: 12px 22px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    white-space: nowrap;
}
.athle-tab-btn:hover { color: var(--athle-red); }
.athle-tab-btn.active {
    color: var(--athle-red);
    border-bottom-color: var(--athle-red);
}

/* ---- Controls top perfs ---- */
.athle-top-perfs-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
    margin-bottom: 20px;
    padding: 15px;
    background: #fafafa;
    border-radius: 8px;
    border: 1px solid var(--athle-border);
}

/* ---- Tables ---- */
.athle-table-wrap {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.athle-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    background: #fff;
}
.athle-table thead {
    background: var(--athle-dark);
    color: #fff;
}
.athle-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.athle-table tbody tr {
    border-bottom: 1px solid var(--athle-border);
    transition: background 0.15s;
}
.athle-table tbody tr:hover { background: #fef9f9; }
.athle-table tbody td {
    padding: 11px 16px;
    vertical-align: middle;
}

/* ---- Podium ---- */
.athle-podium-1 { background: linear-gradient(90deg, #fffde7 0%, #fff9c4 100%) !important; }
.athle-podium-2 { background: linear-gradient(90deg, #fafafa 0%, #f5f5f5 100%) !important; }
.athle-podium-3 { background: linear-gradient(90deg, #fff3e0 0%, #ffe0b2 100%) !important; }
.athle-podium-1:hover { background: #fffde7 !important; }
.athle-podium-2:hover { background: #f5f5f5 !important; }
.athle-podium-3:hover { background: #ffe0b2 !important; }

/* ---- Rang ---- */
.athle-rang {
    font-size: 1.1rem;
    font-weight: 700;
    min-width: 32px;
    display: inline-block;
    text-align: center;
}

/* ---- Nom athlète ---- */
.athle-nom {
    font-weight: 600;
    color: var(--athle-dark);
}
.athle-club-nom { font-weight: 600; }

/* ---- Badges ---- */
.athle-cat-badge {
    background: #e8eaf6;
    color: #3949ab;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
}
.athle-genre-badge {
    display: inline-block;
    font-size: 0.85rem;
    margin-left: 4px;
}
.athle-genre-badge.athle-genre-m { color: #1565c0; }
.athle-genre-badge.athle-genre-f { color: #ad1457; }

.athle-points-badge {
    background: var(--athle-red);
    color: #fff;
    padding: 3px 10px;
    border-radius: 14px;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}
.athle-points-club { background: var(--athle-dark); }

.athle-record-badge {
    font-size: 0.85rem;
    margin-left: 4px;
    cursor: help;
}

/* ---- Performance valeur ---- */
.athle-perf-value {
    font-size: 1.05rem;
    color: var(--athle-dark);
    font-family: 'Courier New', monospace;
}

/* ---- Vent ---- */
.athle-vent { font-size: 0.85rem; color: #666; }
.athle-vent-illegal { color: #e74c3c; font-weight: 600; }

/* ---- Record row ---- */
.athle-record { border-left: 3px solid var(--athle-gold) !important; }

/* ---- Vide ---- */
.athle-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}
.athle-icon { font-size: 2.5rem; display: block; margin-bottom: 10px; }
.athle-hint { color: #aaa; font-style: italic; padding: 20px; text-align: center; }

/* ---- Footer table ---- */
.athle-table-footer {
    text-align: right;
    font-size: 0.8rem;
    color: #999;
    margin-top: 8px;
}

/* ---- Admin tabs ---- */
.athle-admin-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
}
.athle-admin .athle-tab-btn {
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px 4px 0 0;
    padding: 8px 18px;
    cursor: pointer;
}
.athle-admin .athle-tab-btn.active {
    background: #fff;
    border-bottom-color: #fff;
    color: var(--athle-red);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .athle-filters-bar { padding: 12px; gap: 10px; }
    .athle-filter-group { min-width: 110px; }
    .athle-tab-btn { padding: 10px 14px; font-size: 0.85rem; }
    .athle-table thead th,
    .athle-table tbody td { padding: 9px 10px; font-size: 0.83rem; }
    .col-saison, .col-vent { display: none; }
    .athle-classements-header h2 { font-size: 1.2rem; }
}
@media (max-width: 480px) {
    .col-cat, .col-participations { display: none; }
}
