npm start/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary: #00ffff;
    --secondary: #ff00ff;
    --accent: #ffd700;
    --bg-dark: #0a0a0a;
    --bg-card: #1a1a2e;
    --bg-card-hover: #252545;
    --text-light: #ffffff;
    --text-muted: #aaaaaa;
    --border: rgba(255, 215, 0, 0.3);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #16213e 100%);
    color: var(--text-light);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== ACCESSIBILITY ===== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent);
    color: var(--bg-dark);
    padding: 8px;
    text-decoration: none;
    font-weight: bold;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Focus visible pour l'accessibilité clavier */
*:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* ===== HEADER ===== */
header {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: var(--spacing-lg) 0;
    text-align: center;
    border-bottom: 3px solid var(--accent);
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

header h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-xs);
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===== SECTIONS ===== */
section {
    margin: var(--spacing-xl) 0;
}

section h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-lg);
    color: var(--accent);
    text-align: center;
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.stat-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: var(--spacing-lg);
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
    border-color: var(--accent);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--accent);
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

/* ===== PODIUM ===== */
.podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: var(--spacing-md);
    margin: var(--spacing-xl) 0;
    flex-wrap: wrap;
}

.podium-place {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    position: relative;
    text-align: center;
}

.medal {
    font-size: 4rem;
    margin-bottom: var(--spacing-sm);
    animation: bounce 2s ease-in-out infinite;
}

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

.podium-content {
    background: var(--bg-card);
    border: 3px solid var(--border);
    border-radius: 15px;
    padding: var(--spacing-lg);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: var(--transition);
}

.first .podium-content {
    border-color: #ffd700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
    min-height: 250px;
}

.second .podium-content {
    border-color: #c0c0c0;
    box-shadow: 0 0 20px rgba(192, 192, 192, 0.3);
}

.third .podium-content {
    border-color: #cd7f32;
    box-shadow: 0 0 20px rgba(205, 127, 50, 0.3);
}

.podium-content:hover {
    transform: scale(1.05);
}

.rank {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
}

.player-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--text-light);
    margin-bottom: var(--spacing-xs);
}

.team-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin: var(--spacing-xs) 0;
    font-weight: 500;
}

.score-display {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent);
    margin: var(--spacing-sm) 0;
}

.score-details {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.empty-state {
    color: var(--text-muted);
    font-style: italic;
}

/* ===== FILTERS ===== */
.filters {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 25px;
    color: var(--text-light);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
}

.filter-btn.active {
    background: var(--accent);
    color: var(--bg-dark);
    border-color: var(--accent);
}

/* ===== TABLE ===== */
.table-container {
    overflow-x: auto;
    background: var(--bg-card);
    border-radius: 15px;
    border: 2px solid var(--border);
}

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

.leaderboard-table thead {
    background: rgba(255, 215, 0, 0.1);
}

.leaderboard-table th {
    padding: var(--spacing-md);
    text-align: left;
    font-weight: bold;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.leaderboard-table td {
    padding: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

.leaderboard-table tbody tr {
    transition: var(--transition);
}

.leaderboard-table tbody tr:hover {
    background: var(--bg-card-hover);
}

.leaderboard-table tbody tr.new-score {
    animation: highlight 1s ease-in-out;
}

@keyframes highlight {
    0%, 100% { background: var(--bg-card); }
    50% { background: rgba(255, 215, 0, 0.2); }
}

.rank-badge {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    border-radius: 50%;
    background: var(--bg-dark);
    font-weight: bold;
}

.rank-badge.top3 {
    background: linear-gradient(135deg, var(--accent), #ff8800);
    color: var(--bg-dark);
}

/* ===== TEAMS GRID ===== */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.team-card {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: var(--spacing-lg);
    transition: var(--transition);
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
}

.team-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.team-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid white;
}

.team-name {
    font-size: 1.3rem;
    font-weight: bold;
}

.team-stats {
    display: flex;
    justify-content: space-between;
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border);
}

.team-stat {
    text-align: center;
}

.team-stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
}

.team-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ===== FORM ===== */
.score-form {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: var(--spacing-lg);
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-md);
}

label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--text-light);
    font-weight: 500;
}

input, select {
    width: 100%;
    padding: 0.8rem;
    background: var(--bg-dark);
    border: 2px solid var(--border);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 1rem;
    transition: var(--transition);
}

input:focus, select:focus {
    border-color: var(--accent);
    outline: none;
}

.btn-primary {
    width: 100%;
    padding: var(--spacing-md);
    background: linear-gradient(135deg, var(--accent), #ff8800);
    border: none;
    border-radius: 8px;
    color: var(--bg-dark);
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.5);
}

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

/* ===== LOADING ===== */
.loading {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-muted);
}

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 215, 0, 0.3);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ===== FOOTER ===== */
footer {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: var(--spacing-lg) 0;
    text-align: center;
    margin-top: var(--spacing-xl);
    border-top: 2px solid var(--border);
}

.connection-status {
    margin-top: var(--spacing-sm);
    font-size: 0.9rem;
}

.status-indicator {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    background: var(--bg-card);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .podium {
        flex-direction: column;
        align-items: center;
    }
    
    .podium-place {
        max-width: 100%;
    }
    
    .first .podium-content {
        min-height: 200px;
    }
    
    .leaderboard-table {
        font-size: 0.9rem;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: var(--spacing-sm);
    }
}

/* ===== PRINT ===== */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .add-score-section,
    footer,
    .filter-btn {
        display: none;
    }
}
