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

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

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(180deg, #007DA5 0%, #036A78 48%, #047632 72%, #086745 100%) no-repeat;
    min-height: 100vh;
    color: #262626;
}

/* --- Bandeau GeoGaming --- */
.gg-banner {
    background: rgba(0, 0, 0, 0.25);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gg-banner-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
}

.gg-banner-logo img {
    height: 32px;
}

.gg-banner-logo span {
    font-size: 16px;
    font-weight: 700;
}

.gg-banner-link {
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    opacity: 0.85;
    transition: opacity 0.2s;
}

.gg-banner-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* --- Conteneur principal --- */
.classement-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* --- En-tete trophee + titre --- */
.classement-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.trophy-badge {
    display: inline-flex;
    padding: 20px 12px;
    border-radius: 50%;
    border: 5px solid #0097CE;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.trophy-badge img {
    height: 70px;
}

.classement-title-bar {
    background: #0097CE;
    border-radius: 10px;
    max-width: 600px;
    width: 100%;
    padding: 20px 30px;
    margin-top: -25px;
    text-align: center;
    z-index: 1;
}

.classement-title-bar h1 {
    color: #fff;
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 10px;
}

/* --- Carte blanche contenu --- */
.classement-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* --- Onglets switcher --- */
.classement-switcher {
    display: flex;
    background: #e8eef1;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 25px;
    gap: 4px;
}

.switcher-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #557;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.25s, color 0.25s, box-shadow 0.25s;
    text-align: center;
}

.switcher-btn:hover {
    background: rgba(255, 255, 255, 0.6);
    color: #0097CE;
}

.switcher-btn.active {
    background: #fff;
    color: #0097CE;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* --- Filtre temporel --- */
.classement-periods {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.classement-period {
    padding: 8px 18px;
    background: #e8f4f8;
    color: #0097CE;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

.classement-period:hover {
    background: #0097CE;
    color: #fff;
}

.classement-period.active {
    background: #0097CE;
    color: #fff;
}

/* --- Filtre par plage de dates (calendrier) --- */
.classement-daterange {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: -10px 0 25px;
    padding: 14px 16px;
    background: #f0f7fa;
    border-radius: 12px;
}

.classement-daterange.active {
    background: #e8f4f8;
    box-shadow: inset 0 0 0 2px #0097CE;
}

.daterange-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #0097CE;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.daterange-field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #557;
}

.daterange-field input[type="date"] {
    padding: 8px 10px;
    border: 2px solid #0097CE;
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.daterange-field input[type="date"]:focus {
    outline: none;
    border-color: #007DA5;
    box-shadow: 0 0 0 3px rgba(0, 151, 206, 0.15);
}

.daterange-btn {
    padding: 9px 20px;
    background: #0097CE;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.daterange-btn:hover {
    background: #007DA5;
}

.daterange-reset {
    padding: 8px 14px;
    background: #fff;
    color: #d9534f;
    text-decoration: none;
    border: 2px solid #f0c0bd;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.daterange-reset:hover {
    background: #d9534f;
    color: #fff;
    border-color: #d9534f;
}

/* --- Lien retour --- */
.classement-retour {
    margin-bottom: 20px;
}

.classement-retour a {
    display: inline-block;
    padding: 8px 16px;
    background: #e8f4f8;
    color: #0097CE;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

.classement-retour a:hover {
    background: #0097CE;
    color: #fff;
}

/* --- Selecteur parcours (onglet 3) --- */
.parcours-selector {
    text-align: center;
    padding: 20px 0 25px;
}

.parcours-selector label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 10px;
}

.parcours-selector select {
    padding: 10px 16px;
    border: 2px solid #0097CE;
    border-radius: 8px;
    background: #fff;
    color: #333;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    max-width: 450px;
    width: 100%;
    appearance: auto;
}

.parcours-selector select:focus {
    outline: none;
    border-color: #007DA5;
    box-shadow: 0 0 0 3px rgba(0, 151, 206, 0.15);
}

/* --- Tableau --- */
.classement-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.classement-table thead th {
    background: #0097CE;
    color: #fff;
    padding: 14px 16px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.classement-table thead th:first-child {
    border-radius: 8px 0 0 8px;
}

.classement-table thead th:last-child {
    border-radius: 0 8px 8px 0;
}

.classement-table tbody tr {
    background: #f0f7fa;
    transition: transform 0.15s, box-shadow 0.15s;
}

.classement-table tbody tr:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.classement-table tbody td {
    padding: 12px 16px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
}

.classement-table tbody td:first-child {
    border-radius: 8px 0 0 8px;
}

.classement-table tbody td:last-child {
    border-radius: 0 8px 8px 0;
}

/* --- Podium --- */
.classement-table tbody tr.gold {
    background: linear-gradient(135deg, #FFD700 0%, #FFC107 100%);
    color: #5d4200;
    font-size: 1.05rem;
}

.classement-table tbody tr.silver {
    background: linear-gradient(135deg, #E8E8E8 0%, #C0C0C0 100%);
    color: #3a3a3a;
}

.classement-table tbody tr.bronze {
    background: linear-gradient(135deg, #EDCBA0 0%, #CD7F32 100%);
    color: #4a2f00;
}

.medal {
    width: 50px;
    height: 50px;
    vertical-align: middle;
}

/* --- Message vide --- */
.classement-empty {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

/* --- Footer --- */
.classement-footer {
    text-align: center;
    padding: 30px 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
}

.classement-footer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.classement-footer a:hover {
    text-decoration: underline;
}

/* --- Responsive mobile --- */
@media (max-width: 768px) {
    .classement-page {
        padding: 20px 10px 40px;
    }

    .classement-title-bar h1 {
        font-size: 1.2rem;
    }

    .trophy-badge img {
        height: 50px;
    }

    .classement-card {
        padding: 15px;
    }

    .classement-switcher {
        flex-direction: column;
    }

    .classement-daterange {
        flex-direction: column;
        align-items: stretch;
    }

    .daterange-field {
        justify-content: space-between;
    }

    .daterange-field input[type="date"] {
        flex: 1;
    }

    .classement-table thead {
        display: none;
    }

    .classement-table tbody tr {
        display: block;
        border-radius: 12px;
        margin-bottom: 12px;
        padding: 15px;
    }

    .classement-table tbody td {
        display: block;
        text-align: left;
        padding: 6px 0;
        border-radius: 0 !important;
    }

    .classement-table tbody td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #666;
        margin-right: 10px;
        font-size: 0.8rem;
        text-transform: uppercase;
    }

    .medal {
        width: 35px;
        height: 35px;
    }

    .gg-banner {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
}
