:root {
    --bg-primary: #1a2847;
    --bg-secondary: #0f1b2e;
    --bg-card: #0a1628;
    --bg-card-dark: #050d1a;
    --border-cyan: rgba(34, 211, 238, 0.2);
    --border-cyan-focus: #22d3ee;
    --accent-orange: #fb923c;
    --accent-orange-dark: #e65639;
    --text-light: #e2e8f0;
    --text-cyan: #22d3ee;
    --shadow-cyan: rgba(34, 211, 238, 0.15);
    --shadow-orange: rgba(251, 146, 60, 0.4);
    --check-bg: #9dc2cb;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-light);
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.container::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px 20px 0 0;
    padding: 2px;
    background: linear-gradient(180deg, var(--text-cyan) 0%, #3b82f6 25%, #8b5cf6 50%, var(--accent-orange-dark) 75%, var(--accent-orange-dark) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    z-index: 0;
    pointer-events: none;
}

.header {
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-card-dark) 100%);
    padding: 50px 30px;
    border-radius: 20px 20px 0 0;
    text-align: center;
    box-shadow: 
        0 0 60px var(--shadow-cyan),
        0 20px 80px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
}

.header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
    z-index: 1;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.logo {
    font-size: 4em;
    margin-bottom: 15px;
    animation: float 3s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.header h1 {
    color: var(--text-cyan);
    font-size: 2.8em;
    font-weight: 800;
    letter-spacing: 3px;
    text-shadow: 
        0 0 20px rgba(34, 211, 238, 0.5),
        0 0 40px rgba(34, 211, 238, 0.3);
    position: relative;
    z-index: 2;
    text-transform: uppercase;
}

.subtitle {
    color: var(--text-light);
    font-size: 1.2em;
    margin-top: 10px;
    font-weight: 300;
    letter-spacing: 1px;
    position: relative;
    z-index: 2;
}

.stats-grid {
    background: rgba(15, 23, 42, 0.8);
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 30px;
    position: relative;
}

.stat-card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-cyan);
    padding: 30px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--border-cyan-focus);
    box-shadow: 
        0 0 0 3px rgba(34, 211, 238, 0.2),
        inset 0 2px 8px rgba(0, 0, 0, 0.3);
    background: rgba(15, 23, 42, 0.95);
}

.stat-icon {
    font-size: 3em;
    filter: drop-shadow(0 0 10px rgba(34, 211, 238, 0.3));
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2.5em;
    font-weight: 800;
    color: var(--text-cyan);
    line-height: 1;
    text-shadow: 0 0 20px rgba(34, 211, 238, 0.5);
}

.stat-label {
    color: var(--text-light);
    font-size: 0.95em;
    margin-top: 5px;
    font-weight: 500;
    opacity: 0.8;
}

.content-section {
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-card-dark) 100%);
    padding: 30px;
    min-height: 400px;
    position: relative;
}

.loading {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-light);
    position: relative;
    z-index: 1;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(34, 211, 238, 0.2);
    border-top: 5px solid var(--text-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.participants-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.participant-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-cyan);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.participant-card:hover {
    border-color: var(--border-cyan-focus);
    box-shadow: 
        0 0 0 3px rgba(34, 211, 238, 0.2),
        0 5px 20px rgba(34, 211, 238, 0.2);
    background: rgba(15, 23, 42, 0.8);
}

.participant-card.rank-1,
.participant-card.rank-2,
.participant-card.rank-3 {
    background: rgba(15, 23, 42, 0.8);
}

.participant-header {
    display: flex;
    align-items: center;
    padding: 20px;
    cursor: pointer;
    gap: 15px;
}

.rank-badge {
    min-width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--text-cyan) 0%, #3b82f6 100%);
    color: var(--bg-card-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.3em;
    box-shadow: 0 0 20px rgba(34, 211, 238, 0.5);
}

.participant-card.rank-1 .rank-badge {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.participant-card.rank-2 .rank-badge {
    background: linear-gradient(135deg, #C0C0C0 0%, #A0A0A0 100%);
    color: #333;
    box-shadow: 0 0 20px rgba(192, 192, 192, 0.5);
}

.participant-card.rank-3 .rank-badge {
    background: linear-gradient(135deg, #CD7F32 0%, #B8792E 100%);
    color: white;
    box-shadow: 0 0 20px rgba(205, 127, 50, 0.5);
}

.participant-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.participant-name {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--text-light);
}

.medal {
    font-size: 1.5em;
}

.session-count {
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-orange-dark) 100%);
    color: white;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 800;
    font-size: 1.2em;
    box-shadow: 
        0 4px 20px var(--shadow-orange),
        0 0 30px rgba(251, 146, 60, 0.2);
}

.chevron {
    color: var(--text-cyan);
    transition: transform 0.3s ease;
    font-size: 1.2em;
}

.chevron.expanded {
    transform: rotate(90deg);
}

.dates-section {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(10, 22, 40, 0.5);
}

.dates-section.show {
    max-height: 5000px;
    border-top: 1px solid var(--border-cyan);
}

.dates-content {
    padding: 20px;
}

.dates-title {
    font-weight: 700;
    color: var(--text-cyan);
    margin-bottom: 15px;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-list {
    display: grid;
    gap: 10px;
}

.date-item {
    background: rgba(15, 23, 42, 0.8);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-cyan);
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.date-item:hover {
    border-color: var(--border-cyan-focus);
    box-shadow: 
        0 0 0 3px rgba(34, 211, 238, 0.2),
        inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.date-number {
    min-width: 35px;
    height: 35px;
    background: var(--check-bg);
    color: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9em;
}

.date-text {
    color: var(--text-light);
    font-size: 0.95em;
}

.refresh-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--accent-orange-dark) 100%);
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 0;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 20px var(--shadow-orange),
        0 0 30px rgba(251, 146, 60, 0.2);
    position: relative;
}

.refresh-btn:hover {
    background: linear-gradient(135deg, var(--accent-orange-dark) 0%, #d94d2e 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 6px 30px var(--shadow-orange),
        0 0 40px rgba(251, 146, 60, 0.3);
}

.refresh-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.3em;
    animation: rotate 2s linear infinite paused;
}

.refresh-btn:hover .btn-icon {
    animation-play-state: running;
}

/* bouton filtrer par mois */

.filter-section {
    background: rgba(15, 23, 42, 0.8);
    padding: 20px 30px;
    position: relative;
}

.filter-container {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: center;
}

.filter-label {
    color: var(--text-cyan);
    font-weight: 700;
    font-size: 1.1em;
}

.month-select {
    background: rgba(15, 23, 42, 0.9);
    border: 2px solid var(--border-cyan);
    color: var(--text-light);
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.month-select:hover {
    border-color: var(--border-cyan-focus);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2);
}

.month-select:focus {
    outline: none;
    border-color: var(--border-cyan-focus);
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2);
}

.month-select option {
    background: var(--bg-card);
    color: var(--text-light);
    padding: 10px;
}





@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.footer {
    background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-card-dark) 100%);
    text-align: center;
    padding: 20px;
    border-radius: 0 0 20px 20px;
    color: var(--text-light);
    font-size: 0.9em;
    box-shadow: 
        0 0 60px var(--shadow-cyan),
        0 20px 80px rgba(0, 0, 0, 0.4);
    position: relative;
}

.footer p {
    position: relative;
    z-index: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header {
        padding: 30px 20px;
    }

    .header h1 {
        font-size: 2em;
    }

    .logo {
        font-size: 3em;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 15px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-value {
        font-size: 2em;
    }

    .content-section {
        padding: 15px;
    }

    .participant-header {
        padding: 15px;
        gap: 10px;
    }

    .rank-badge {
        min-width: 40px;
        height: 40px;
        font-size: 1.1em;
    }

    .participant-name {
        font-size: 1em;
    }

    .session-count {
        padding: 8px 20px;
        font-size: 1em;
    }

    .dates-content {
        padding: 15px;
    }

    .date-item {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5em;
        letter-spacing: 1px;
    }

    .subtitle {
        font-size: 1em;
    }

    .stat-icon {
        font-size: 2em;
    }

    .stat-value {
        font-size: 1.8em;
    }

    .participant-header {
        flex-wrap: wrap;
    }

    .session-count {
        order: -1;
        margin-left: auto;
    }
}