:root {
    --primary: #DC143C;
    --primary-dark: #B8112E;
    --secondary: #1B5E20;
    --accent: #FFD700;
    --dark: #1a1a1a;
    --dark-light: #2a2a2a;
    --gray: #555;
    --light: #f5f5f5;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.3);
    --success: #4CAF50;
    --danger: #f44336;
}

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

body {
    font-family: 'Work Sans', sans-serif !important;
    color: var(--light) !important;
    margin: 0;
    min-height: 100vh;
    background-image: 
        /* Filtre avec dégradé Rouge/Noir/Vert */
        linear-gradient(
            135deg, 
            rgba(220, 20, 60, 0.4) 0%,   /* Rouge (--primary) */
            rgba(0, 0, 0, 0.6) 50%,      /* Noir pour le centre (lisibilité) */
            rgba(27, 94, 32, 0.4) 100%   /* Vert (--secondary) */
        ),
        url('image.jpg');
    background-size: cover !important;
    background-position: center !important;
    background-attachment: fixed !important; /* L'image ne bouge pas au scroll */
}

/* Navigation */
.main-nav {
    background: var(--dark);
    border-bottom: 3px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px var(--shadow);
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    display: block;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: var(--primary);
    letter-spacing: 3px;
    line-height: 1;
}

.logo-sub {
    font-size: 0.8rem;
    color: var(--light);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--light);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    display: inline-block;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link.active {
    color: var(--primary);
}

/* Pages */
.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.hero {
    background: 
        linear-gradient(
            135deg, 
            rgba(220, 20, 60, 0.4) 0%,   /* Rouge (--primary) */
            rgba(0, 0, 0, 0.6) 50%,      /* Noir pour le centre (lisibilité) */
            rgba(27, 94, 32, 0.4) 100%   /* Vert (--secondary) */
        ),
        url('bumting.webp');
    background-size: cover;
    background-position: center;
    min-height: 100vh; /* Prend 100% de la hauteur de l'écran */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3rem 2rem;
    text-align: center;
    border-bottom: 3px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 5rem;
    letter-spacing: 5px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.hero-dart {
    font-size: 4rem;
    animation: bounce 2s ease infinite;
}

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

.hero-highlight {
    color: var(--primary);
    position: relative;
}

.hero-highlight::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 8px;
    background: var(--primary);
    opacity: 0.3;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--light);
    font-weight: 300;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
    margin-top: auto; /* Pousse les stats vers le bas */
    position: relative;
    z-index: 2;
}

.stat-card {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.stat-card:hover::before {
    transform: translateX(0);
}

.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow);
}

.stat-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3.5rem;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

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

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Section Title */
.section-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--light);
    letter-spacing: 3px;
    border-left: 5px solid var(--primary);
    padding-left: 1rem;
}

.page-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--light);
    letter-spacing: 4px;
    text-align: center;
}

.page-subtitle {
    text-align: center;
    color: var(--light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* Top Players Grid */
.top-players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.player-card {
    background: var(--dark-light);
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid var(--dark);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.player-card::before {
    content: '🎯';
    position: absolute;
    font-size: 8rem;
    opacity: 0.05;
    right: -1rem;
    bottom: -1rem;
    pointer-events: none;
}

.player-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px var(--shadow);
}

.player-card.rank-1 {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, var(--dark-light) 100%);
}

.player-card.rank-2 {
    border-color: #C0C0C0;
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.1) 0%, var(--dark-light) 100%);
}

.player-card.rank-3 {
    border-color: #CD7F32;
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.1) 0%, var(--dark-light) 100%);
}

/* Photos Top 6 */
.player-card-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
    position: relative;
}

.player-photo-wrapper {
    position: relative;
    margin-bottom: 0.75rem;
}

.player-photo-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.15);
    display: block;
    background: var(--dark-light);
    transition: transform 0.3s, border-color 0.3s;
}

.player-card:hover .player-photo-circle {
    transform: scale(1.06);
}

.rank-1-photo .player-photo-circle { border-color: #FFD700; box-shadow: 0 0 16px rgba(255,215,0,0.4); }
.rank-2-photo .player-photo-circle { border-color: #C0C0C0; box-shadow: 0 0 12px rgba(192,192,192,0.3); }
.rank-3-photo .player-photo-circle { border-color: #CD7F32; box-shadow: 0 0 12px rgba(205,127,50,0.3); }

.player-medal {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--dark);
    border: 2px solid var(--dark-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    line-height: 1;
}

.rank-num {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.75rem;
    color: var(--primary);
}

.player-card.rank-1 .player-name { color: #FFD700; }
.player-card.rank-2 .player-name { color: #C0C0C0; }
.player-card.rank-3 .player-name { color: #CD7F32; }

.player-name {
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
}

/* Photos dans le classement */
.classement-name-with-photo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.classement-photo {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
    background: var(--dark-light);
    transition: transform 0.2s;
}

tr:hover .classement-photo {
    transform: scale(1.12);
    border-color: var(--primary);
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.player-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--light);
}

.player-rank {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: var(--primary);
    opacity: 0.5;
}

.player-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.player-stat {
    text-align: center;
    padding: 0.75rem;
    background: var(--dark);
    border-radius: 8px;
}

.player-stat-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--primary);
}

.player-stat-label {
    font-size: 0.8rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Recent Matches */
.recent-matches {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ============================================
   BASE COMMUNE POUR TOUS LES MATCHS
   ============================================ */

.match-card {
    background: var(--dark-light);
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid var(--dark);
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.match-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Variantes par tournoi */
.match-cnf3 {
    border-left: 4px solid var(--accent);
}

.match-cnf12 {
    border-left: 4px solid var(--primary);
}

/* ============================================
   HEADER (IDENTIQUE POUR TOUS)
   ============================================ */

.match-header {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--dark);
    flex-wrap: wrap;
}

.match-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.match-badge-cnf3 {
    background: linear-gradient(135deg, var(--accent), #FFB347);
    color: var(--dark);
}

.match-badge-cnf12 {
    background: var(--primary);
    color: white;
}

.match-badge-phase {
    background: var(--dark);
    color: var(--gray);
    font-weight: 600;
}

.match-date {
    color: var(--gray);
    font-size: 0.85rem;
    margin-left: auto;
}

/* ============================================
   CONTENU (IDENTIQUE POUR TOUS)
   ============================================ */

.match-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    align-items: center;
}

/* Côtés (joueurs ou équipes) */
.match-side {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.match-side.winner {
    opacity: 1;
}

.match-side.loser {
    opacity: 0.5;
}

.match-side:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Noms (équipes ou joueurs) */
.match-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--light);
}

.match-cnf3 .match-side.winner .match-name {
    color: var(--accent);
}

.match-cnf12 .match-side.winner .match-name {
    color: var(--primary);
}

/* Détails joueurs (uniquement CNF3) */
.match-players {
    font-size: 0.9rem;
    color: var(--gray);
}

/* Score */
.match-score {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    line-height: 1;
    text-align: center;
}

.match-cnf3 .match-score {
    color: var(--accent);
}

.match-cnf12 .match-score {
    color: var(--primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .match-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .match-score {
        padding: 0.5rem 0;
    }
    
    .match-side {
        text-align: center;
        align-items: center;
    }
    
    .match-header {
        justify-content: center;
    }
    
    .match-date {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
}

/* Filters */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-input,
.sort-select,
.filter-select,
.player-select {
    padding: 0.8rem 1.2rem;
    background: var(--dark-light);
    border: 2px solid var(--dark);
    border-radius: 8px;
    color: var(--light);
    font-size: 1rem;
    font-family: 'Work Sans', sans-serif;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 200px;
}

.search-input:focus,
.sort-select:focus,
.filter-select:focus,
.player-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.1);
}

/* Players Grid */
.players-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Matches List */
.matches-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Ranking Table */
.ranking-table-container {
    background: var(--dark-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px var(--shadow);
}

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

.ranking-table thead {
    background: var(--dark);
    border-bottom: 3px solid var(--primary);
}

.ranking-table th {
    padding: 1.2rem;
    text-align: left;
    font-weight: 700;
    color: var(--light);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.ranking-table tbody tr {
    border-bottom: 1px solid var(--dark);
    transition: all 0.3s ease;
}

.ranking-table tbody tr:hover {
    background: rgba(220, 20, 60, 0.05);
    transform: translateX(5px);
}

.ranking-table td {
    padding: 1.2rem;
    color: var(--light);
}

.rank-cell {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: bold;
}

.rank-cell.top-3 {
    color: var(--accent);
}

.player-name-cell {
    font-weight: 600;
    font-size: 1.1rem;
}

.positive {
    color: var(--success);
    font-weight: 600;
}

.negative {
    color: var(--danger);
    font-weight: 600;
}

/* Predictions */
.prediction-selector {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    align-items: center;
}

.team-selector {
    background: var(--dark-light);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--dark);
    text-align: center;
}

.team-selector h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--primary);
    text-align: center;
    letter-spacing: 2px;
}

.vs-separator {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    color: var(--primary);
    text-align: center;
    letter-spacing: 3px;
}

.btn-primary {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 2rem auto;
    padding: 1.2rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Bebas Neue', sans-serif;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(220, 20, 60, 0.4);
}

.prediction-result {
    background: var(--dark-light);
    border-radius: 12px;
    padding: 3rem;
    margin-top: 2rem;
    border: 2px solid var(--primary);
}

.prediction-result.hidden {
    display: none;
}

.prediction-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 2rem;
}

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

.prediction-team h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--light);
}

.prediction-odds {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.prediction-percentage {
    font-size: 1.5rem;
    color: var(--gray);
}

.prediction-separator {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    color: var(--gray);
}

.prediction-details {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--dark);
}

.prediction-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.prediction-detail {
    background: var(--dark);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.prediction-detail-label {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.prediction-detail-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: var(--primary);
}

/* Comparator */
.compare-selector {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: center;
}

.comparison-result {
    background: var(--dark-light);
    border-radius: 12px;
    padding: 3rem;
    border: 2px solid var(--dark);
}

.comparison-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: center;
}

.comparison-player {
    text-align: center;
}

.comparison-player h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.comparison-vs {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    color: var(--gray);
}

.comparison-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comparison-stat-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    padding: 1.5rem;
    background: var(--dark);
    border-radius: 8px;
}

.comparison-stat-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    text-align: center;
}

.comparison-stat-value.better {
    color: var(--primary);
}

.comparison-stat-label {
    text-align: center;
    font-size: 0.9rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: block;
}

.modal-content {
    background: var(--dark-light);
    margin: 5% auto;
    padding: 3rem;
    border-radius: 12px;
    max-width: 900px;
    position: relative;
    border: 2px solid var(--primary);
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2.5rem;
    color: var(--light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .prediction-selector,
    .compare-selector,
    .comparison-header {
        grid-template-columns: 1fr;
    }

    .vs-separator,
    .comparison-vs {
        transform: rotate(90deg);
    }

    .match-card {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .prediction-teams {
        grid-template-columns: 1fr;
    }

    .prediction-separator {
        transform: rotate(90deg);
    }
}

/* Animations pour le chargement */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1.5s ease infinite;
}

/* Classes ELO */
.elo-master {
    color: var(--accent);
    font-weight: 700;
}

.elo-expert {
    color: #FFB347;
    font-weight: 700;
}

.elo-advanced {
    color: var(--success);
    font-weight: 600;
}

/* Équipes CNF 3 */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.team-card {
    background: var(--dark-light);
    border-radius: 12px;
    padding: 2rem;
    border: 2px solid var(--dark);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.team-card::before {
    content: '🎯';
    position: absolute;
    font-size: 10rem;
    opacity: 0.03;
    right: -2rem;
    bottom: -3rem;
    pointer-events: none;
}

.team-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px var(--shadow);
}

.team-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.team-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--light);
    flex: 1;
}

.team-chapeau {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.team-players {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.team-player {
    flex: 1;
    background: var(--dark);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.team-player-name {
    font-weight: 600;
    color: var(--light);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.team-player-elo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    color: var(--primary);
}

.team-vs {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: var(--gray);
}

.team-elo-moyen {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid var(--dark);
}

/* Onglets CNF 3 */
.cnf3-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.cnf3-tab {
    padding: 1rem 2rem;
    background: var(--dark-light);
    border: 2px solid var(--dark);
    border-radius: 8px;
    color: var(--light);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Work Sans', sans-serif;
}

.cnf3-tab:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.cnf3-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.cnf3-view {
    display: none;
}

.cnf3-view.active {
    display: block;
}

/* Poules CNF 3 */
.poules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.poule-card {
    background: var(--dark-light);
    border-radius: 12px;
    border: 2px solid var(--dark);
    overflow: hidden;
    transition: all 0.3s ease;
}

.poule-card:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 30px var(--shadow);
    transform: translateY(-5px);
}

.poule-header {
    background: var(--dark);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--primary);
}

.poule-header h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--primary);
    margin: 0;
    letter-spacing: 2px;
}

.poule-equipes-count {
    font-size: 0.9rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.poule-equipes {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.poule-equipe {
    background: var(--dark);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.poule-equipe-nom {
    font-weight: 700;
    color: var(--light);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.poule-equipe-joueurs {
    font-size: 0.95rem;
    color: var(--light);
    margin-bottom: 0.5rem;
}

.poule-equipe-joueurs span {
    color: var(--light);
}

.poule-equipe-elo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    color: var(--primary);
}

/* Tableau final CNF 3 */
.bracket-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.phases-finales {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.phase-section {
    background: var(--dark-light);
    border-radius: 12px;
    padding: 2rem;
    border: 2px solid var(--dark);
}

.phase-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: var(--primary);
    text-align: center;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.phase-matches {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.bracket-match {
    background: var(--dark);
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--dark);
    transition: all 0.3s ease;
}

.bracket-match:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px var(--shadow);
}

.bracket-team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--dark-light);
    transition: all 0.3s ease;
}

.bracket-team:last-child {
    border-bottom: none;
}

.bracket-team.winner {
    background: linear-gradient(90deg, rgba(220, 20, 60, 0.2) 0%, transparent 100%);
    border-left: 4px solid var(--primary);
}

.bracket-team-name {
    font-weight: 600;
    color: var(--light);
    flex: 1;
}

.bracket-team.winner .bracket-team-name {
    color: var(--primary);
    font-weight: 700;
}

.bracket-team-score {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--gray);
    margin-left: 1rem;
}

.bracket-team.winner .bracket-team-score {
    color: var(--primary);
}

/* Champion section */
.champion-section {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--dark-light) 0%, var(--dark) 100%);
    border-radius: 12px;
    border: 2px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.champion-trophy {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: bounce 2s ease infinite;
}

.champion-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 1rem;
}

.champion-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 4rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 5px;
    position: relative;
    z-index: 1;
}

/* Responsive bracket */
@media (max-width: 768px) {
    .phase-matches {
        grid-template-columns: 1fr;
    }
    
    .champion-name {
        font-size: 2.5rem;
    }
}

/* ============================================
   PHOTOS DES JOUEURS
   ============================================ */

/* Photo dans les cartes joueurs */
.player-card {
    display: flex;
    flex-direction: column;
    background: var(--dark-light);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid var(--dark);
}

.player-card-photo {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--dark);
    position: relative;
}

.player-card-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.player-card:hover .player-card-photo img {
    transform: scale(1.1);
}

.player-card-content {
    padding: 1.5rem;
}

/* Photo dans le modal de profil */
.player-profile-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary);
    box-shadow: 0 0 20px rgba(220, 20, 60, 0.5);
    flex-shrink: 0;
}

.player-profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive */
@media (max-width: 768px) {
    .player-profile-photo {
        width: 100px;
        height: 100px;
    }
    
    .player-card-photo {
        height: 150px;
    }
}

/* Footer avec icônes */
.site-footer {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    border-top: 3px solid var(--primary);
    margin-top: 4rem;
    padding: 3rem 2rem 1rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.footer-section h3 i {
    margin-right: 0.5rem;
}

.footer-section p {
    color: var(--light);
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.footer-credits {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--dark);
    color: var(--gray) !important;
    font-size: 0.9rem;
}

.contact-item {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--dark);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
    color: var(--light);
}

.contact-item i {
    color: var(--primary);
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

.contact-item strong {
    color: var(--primary);
}

.contact-item a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.social-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--dark);
    color: var(--light);
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid var(--dark);
    transition: all 0.3s ease;
    font-weight: 600;
}

.social-link i {
    margin-right: 0.75rem;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.social-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    transform: translateX(5px);
}

.social-link:hover i {
    transform: scale(1.2);
}

/* Couleurs spécifiques aux réseaux sociaux */
.social-link:has(.fa-instagram):hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-color: #e6683c;
}

.social-link:has(.fa-facebook):hover {
    background: #1877f2;
    border-color: #1877f2;
}

.social-link:has(.fa-discord):hover {
    background: #5865f2;
    border-color: #5865f2;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--dark);
    color: var(--gray);
    font-size: 0.9rem;
}

.footer-bottom p {
    margin: 0.5rem 0;
}

.footer-bottom i {
    margin-right: 0.5rem;
}

/* Responsive footer */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .site-footer {
        padding: 2rem 1rem 1rem;
    }
}
/* ============================================
   PAGE PALMARÈS
   ============================================ */

.palmares-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.palmares-card {
    background: var(--dark-light);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--dark);
    transition: all 0.3s ease;
}

.palmares-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px var(--shadow);
}

.palmares-upcoming {
    border-color: var(--gray);
    opacity: 0.7;
}

.palmares-header {
    background: var(--dark-light);
    padding: 2rem;
    text-align: center;
    border-bottom: 2px solid var(--primary);
}

.palmares-header h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    color: var(--white);
    margin: 0;
    letter-spacing: 3px;
}

.palmares-date {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 0.5rem;
}

.palmares-content {
    padding: 2rem;
}

.champion-section {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 5rem;
    border-bottom: 2px solid var(--dark);
}

.trophy-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.trophy-icon svg {
    width: 100%;
    height: 100%;
}

.champion-label {
    font-size: 0.9rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.champion-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: var(--primary);
    cursor: pointer;
    transition: color 0.3s ease;
}

.champion-name:hover {
    color: var(--accent);
}

.prix-section {
    margin-top: 2rem;
}

.prix-section h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.prix-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.prix-item {
    background: var(--dark);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--primary);
    transition: all 0.3s ease;
}   

.prix-item:hover {
    background: rgba(220, 20, 60, 0.1);
    transform: translateX(5px);
}

.prix-name {
    font-weight: 600;
    color: var(--light);
    flex: 1;
}

.prix-winner {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.prix-winner:hover {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .palmares-grid {
        grid-template-columns: 1fr;
    }
    
    .palmares-header h2 {
        font-size: 2rem;
    }
    
    .champion-name {
        font-size: 1.8rem;
    }
    
    .prix-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ============================================
   PLANNING CNF 3
   ============================================ */

.planning-container {
    max-width: 1200px;
    margin: 0 auto;
}

.planning-week {
    margin-bottom: 4rem;
}

.planning-week-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: 2px;
}

.planning-days {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.planning-day {
    background: var(--dark-light);
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--dark);
    transition: all 0.3s ease;
}

.planning-day:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.planning-day.special {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--dark-light) 0%, rgba(255, 215, 0, 0.05) 100%);
}

.day-header {
    background: var(--dark);
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid var(--primary);
}

.day-header.evening {
    background: rgba(220, 20, 60, 0.1);
    border-bottom: 1px solid rgba(220, 20, 60, 0.3);
    padding: 1rem 1.5rem;
}

.day-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    color: var(--light);
    letter-spacing: 1px;
}

.day-info {
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.day-matches {
    padding: 1.5rem;
}

.match-slot {
    background: var(--dark);
    padding: 1rem;
    border-radius: 8px;
    color: var(--light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    border-left: 3px solid var(--primary);
}

.match-slot:last-child {
    margin-bottom: 0;
}

.match-slot.highlight {
    background: rgba(255, 215, 0, 0.1);
    border-left-color: var(--accent);
    font-weight: 600;
    color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
    .planning-days {
        grid-template-columns: 1fr;
    }
    
    .planning-week-title {
        font-size: 1.5rem;
    }
}

/* Menu déroulant Prix */
.prix-toggle {
    cursor: pointer;
    user-select: none;
    margin-bottom: 1rem;
}

.prix-toggle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--dark);
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.prix-toggle-header:hover {
    background: rgba(220, 20, 60, 0.1);
    border-color: var(--primary);
}

.prix-toggle h3 {
    margin: 0;
}

.prix-arrow {
    color: var(--primary);
    transition: transform 0.3s ease;
}

.prix-toggle.active .prix-arrow {
    transform: rotate(180deg);
}

.prix-list.collapsed {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.prix-list.expanded {
    max-height: 800px;
    opacity: 1;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}
/* ============================================
   AMÉLIORATIONS CNF
   ============================================ */

/* 1. FORME RÉCENTE (points verts/rouges) */
.forme-recent {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
    margin-top: 0.5rem;
}

.forme-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    cursor: help;
    transition: transform 0.2s;
}

.forme-dot:hover {
    transform: scale(1.3);
}

.forme-dot.win {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.forme-dot.loss {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

/* 2. PAGE D'ACCUEIL DYNAMIQUE */
.home-dynamic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.dynamic-card {
    background: var(--dark-light);
    border-radius: 12px;
    padding: 2rem;
    border: 2px solid var(--dark);
    transition: all 0.3s ease;
    cursor: pointer;
}

.dynamic-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px var(--shadow);
}

.dynamic-card h3 {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Podium */
.podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.podium-item {
    background: var(--dark);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.podium-item:hover {
    background: rgba(220, 20, 60, 0.1);
    transform: scale(1.05);
}

.podium-item.first {
    order: 2;
    padding: 1.5rem 1rem;
    border: 2px solid var(--accent);
}

.podium-item.second {
    order: 1;
}

.podium-item.third {
    order: 3;
}

.podium-trophy {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.podium-rank {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.podium-name {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    color: var(--light);
    margin-bottom: 0.25rem;
}

.podium-elo {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.3rem;
}

/* Progression */
.progression-content {
    text-align: center;
}

.progression-player {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--light);
    margin-bottom: 0.5rem;
}

.progression-value {
    font-size: 2rem;
    font-weight: 700;
    color: #22c55e;
    margin-bottom: 1rem;
}

.progression-bar-container {
    background: var(--dark);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}

.progression-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 1s ease;
}

/* Forme */
.forme-content {
    text-align: center;
}

.forme-player {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--light);
    margin-bottom: 0.5rem;
}

.forme-stats {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Match du jour */
.match-content {
    text-align: center;
}

.match-players-home {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.match-player-home {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--dark);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.match-player-home:hover {
    background: rgba(220, 20, 60, 0.1);
    transform: translateX(5px);
}

.match-player-home.winner {
    background: rgba(220, 20, 60, 0.1);
    border-left: 4px solid var(--primary);
}

.match-score-home {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.match-vs-home {
    font-weight: 700;
    color: var(--gray);
    text-align: center;
    margin: 0.25rem 0;
}

.match-info-home {
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* 3. GRAPHIQUE ELO */
.elo-graph-container {
    margin: 2rem 0;
    padding: 2rem;
    background: var(--dark-light);
    border-radius: 12px;
    border: 2px solid var(--dark);
}

.elo-graph {
    width: 100%;
    height: auto;
    margin-bottom: 1.5rem;
}

.elo-point {
    transition: r 0.2s;
}

.elo-point:hover {
    r: 6;
}

.elo-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.elo-stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--dark);
    border-radius: 8px;
}

.elo-stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.elo-stat-value {
    display: block;
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 700;
}

/* 4. MODE LIVE SCORING */
.live-indicator {
    color: #ef4444;
    animation: pulse-live 2s ease infinite;
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.live-scoring-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.live-form-card,
.live-recent-card {
    background: var(--dark-light);
    border-radius: 12px;
    padding: 2rem;
    border: 2px solid var(--dark);
}

.live-form-card h2,
.live-recent-card h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: var(--light);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-control {
    padding: 0.75rem;
    background: var(--dark);
    border: 2px solid var(--dark);
    border-radius: 8px;
    color: var(--light);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(220, 20, 60, 0.05);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-primary,
.btn-secondary {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 20, 60, 0.4);
}

.btn-secondary {
    background: var(--dark);
    color: var(--light);
}

.btn-secondary:hover {
    background: var(--dark-light);
}

/* Matchs Live */
.live-match-item {
    background: var(--dark);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--dark);
    transition: all 0.3s ease;
}

.live-match-item:hover {
    background: rgba(220, 20, 60, 0.05);
    border-left-color: var(--primary);
}

.live-match-item.live-new {
    border-left-color: #22c55e;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.live-match-players {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.live-player {
    flex: 1;
    color: var(--light);
}

.live-player.winner {
    font-weight: 700;
    color: var(--primary);
}

.live-match-score {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    padding: 0 1rem;
}

.live-match-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--gray);
}

.live-badge {
    background: #22c55e;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Notification */
.notification-success {
    position: fixed;
    top: 100px;
    right: 20px;
    background: #22c55e;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
    }
    to {
        transform: translateX(0);
    }
}

#live-matchs-container {
    display: grid;
    /* On force 2 colonnes sur desktop, 1 sur mobile pour garder des boxs compactes */
    grid-template-columns: repeat(2, 1fr); 
    gap: 15px;
    max-width: 1000px; /* Optionnel : pour éviter que ce soit trop large */
    margin: 0 auto;
}

@media (max-width: 600px) {
    #live-matchs-container {
        grid-template-columns: 1fr; /* 1 seule colonne sur petit écran */
    }
}

/* Responsive */
@media (max-width: 768px) {
    .home-dynamic-grid {
        grid-template-columns: 1fr;
    }
    
    .live-scoring-container {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .elo-stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   PAGE LIVE (LECTURE SEULE)
   ============================================ */

.live-indicator {
    color: #ef4444;
    animation: pulse-live 2s ease infinite;
}

@keyframes pulse-live {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Stats Live */
.live-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.live-stat-card {
    background: var(--dark-light);
    border-radius: 12px;
    padding: 2rem;
    border: 2px solid var(--dark);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
}

.live-stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.live-stat-icon {
    font-size: 3rem;
    filter: grayscale(0.3);
}

.live-stat-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: var(--primary);
    line-height: 1;
}

.live-stat-label {
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Filtres */
.live-filters {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--dark);
    border: 2px solid var(--dark);
    border-radius: 8px;
    color: var(--light);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary);
    background: rgba(220, 20, 60, 0.1);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Grille des matchs */
.live-matchs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.live-match-card {
    background: var(--dark-light);
    border-radius: 12px;
    border: 2px solid var(--dark);
    overflow: hidden;
    transition: all 0.3s ease;
}

.live-match-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px var(--shadow);
}

.live-match-header {
    display: flex;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--dark);
    border-bottom: 2px solid var(--dark-light);
}

.live-match-phase {
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.phase-poule {
    background: rgba(255, 215, 0, 0.1);
    color: var(--accent);
}

.phase-tableau {
    background: rgba(220, 20, 60, 0.1);
    color: var(--primary);
}

.live-match-date {
    color: var(--gray);
    font-size: 0.85rem;
}

.live-match-content {
    padding: 1.5rem;
}

.live-match-team {
    padding: 1rem;
    background: var(--dark);
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.live-match-team.winner {
    background: rgba(220, 20, 60, 0.1);
    border: 2px solid var(--primary);
}

.team-name {
    font-weight: 700;
    color: var(--light);
    flex: 1;
}

.team-players {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 0.25rem;
}

.team-score {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: var(--primary);
    margin-left: 1rem;
}

.live-match-vs {
    text-align: center;
    color: var(--gray);
    font-weight: 700;
    margin: 0.5rem 0;
}

.live-match-winner {
    background: var(--primary);
    color: white;
    padding: 0.75rem;
    text-align: center;
    font-weight: 700;
}

.live-match-winner i {
    margin-right: 0.5rem;
}

/* Message vide */
.live-no-matchs {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--gray);
}

.live-no-matchs i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.live-no-matchs p {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.live-no-matchs small {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ============================================
   TABLEAU FINAL CNF3
   ============================================ */

.tableau-final-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-top: 2rem;
}

.phase-section {
    background: var(--dark-light);
    border-radius: 12px;
    padding: 2rem;
    border: 2px solid var(--dark);
}

.phase-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.phase-matchs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.tableau-match {
    background: var(--dark);
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--dark-light);
}

.tableau-team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    transition: all 0.3s ease;
}

.tableau-team.qualified {
    background: rgba(220, 20, 60, 0.1);
    font-weight: 700;
}

.tableau-team.eliminated {
    opacity: 0.6;
}

.team-name-tableau {
    flex: 1;
    color: var(--light);
}

.team-score-tableau {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    color: var(--primary);
    margin-left: 1rem;
}

.tableau-separator {
    height: 2px;
    background: var(--dark-light);
}

/* Champion CNF3 */
.champion-section-cnf3 {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--dark-light) 0%, var(--dark) 100%);
    border-radius: 12px;
    margin-top: 3rem;
    border: 3px solid var(--primary);
}

.champion-trophy {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: bounce 2s ease infinite;
}

.champion-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 4px;
    margin-bottom: 1rem;
}

.champion-name-cnf3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 4rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 5px;
}

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

/* Responsive */
@media (max-width: 768px) {
    .live-matchs-grid {
        grid-template-columns: 1fr;
    }
    
    .phase-matchs {
        grid-template-columns: 1fr;
    }
    
    .live-stats {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   MATCHS CNF3 DANS PAGE ACCUEIL
   ============================================ */

/* Card spéciale pour matchs doubles */
.match-card-double {
    background: var(--dark-light);
    border-left: 4px solid var(--accent);
}

/* Header avec tags CNF3 */
.match-header-tag {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.match-tag-cnf3 {
    background: linear-gradient(135deg, var(--accent), #FFB347);
    color: var(--dark);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.match-tag-phase {
    background: var(--dark);
    color: var(--gray);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
}

/* Noms des joueurs en duo */
.match-player-duo {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 0.25rem;
    font-weight: normal;
}

/* Animation d'apparition pour nouveaux matchs */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.match-card-double {
    animation: slideInFromRight 0.5s ease;
}

/* ============================================
   AFFICHAGE MATCHS UNIFORMISÉ
   ============================================ */

/* Base commune pour tous les matchs */
.match-card {
    background: var(--dark-light);
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid var(--dark);
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.match-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Variante CNF3 */
.match-card-cnf3 {
    border-left: 4px solid var(--primary);
}

.match-card-cnf3:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.15);
}

/* Variante CNF1/2 */
.match-card-individual {
    border-left: 4px solid var(--primary);
}

.match-card-individual:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(220, 20, 60, 0.15);
}

/* ============================================
   EN-TÊTE DU MATCH (commune)
   ============================================ */

.match-header {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--dark);
}

/* Badges */
.match-badge {
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.match-badge-cnf3 {
    background: linear-gradient(135deg, var(--accent), #FFB347);
    color: var(--dark);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.match-badge-individual {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.3);
}

.match-badge-phase {
    background: var(--dark);
    color: var(--gray);
    font-weight: 600;
}

.match-date {
    color: var(--gray);
    font-size: 0.85rem;
    margin-left: auto;
    font-weight: 500;
}

/* ============================================
   CONTENU DU MATCH (commune)
   ============================================ */

.match-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    align-items: center;
}

/* Côtés (joueurs ou équipes) */
.match-side {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.match-side.winner {
    opacity: 1;
}

.match-side.loser {
    opacity: 0.5;
}

/* Noms des équipes (CNF3) */
.match-team-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--light);
}

.match-side.winner .match-team-name {
    color: var(--primary);
}

/* Noms des joueurs (CNF1/2) */
.match-player-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--light);
}

.match-side.winner .match-player-name {
    color: var(--primary);
}

/* Noms des joueurs dans une équipe (CNF3) */
.match-players {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--gray);
}

.match-players i {
    font-size: 0.85rem;
    color: var(--gray);
}

.match-players .separator {
    color: var(--gray);
    margin: 0 0.2rem;
}

/* Score (commune) */
.match-score {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
}

.score-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: var(--primary);
    line-height: 1;
}

.match-card-cnf3 .score-number {
    color: var(--primary);
}

.score-separator {
    color: var(--gray);
    font-size: 1.5rem;
    font-weight: 300;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .match-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .match-score {
        padding: 0.5rem 0;
        justify-content: center;
    }
    
    .match-side {
        text-align: center;
        align-items: center;
    }
    
    .match-players {
        justify-content: center;
    }
    
    .match-header {
        justify-content: center;
    }
    
    .match-date {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.match-card {
    animation: fadeInUp 0.4s ease;
}

/* Animation au survol des côtés */
.match-side {
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.match-side:hover {
    background: rgba(255, 255, 255, 0.02);
}

.match-side.winner:hover {
    background: rgba(220, 20, 60, 0.05);
}

.match-card-cnf3 .match-side.winner:hover {
    background: rgba(255, 215, 0, 0.05);
}

:root {
    --primary: #DC143C;
    --primary-dark: #B8112E;
    --secondary: #1B5E20;
    --accent: #FFD700;
    --dark: #1a1a1a;
    --dark-light: #2a2a2a;
    --gray: #555;
    --light: #f5f5f5;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.3);
    --success: #4CAF50;
    --danger: #f44336;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Sécurité pour empêcher les éléments de dépasser la largeur de l'écran */
    max-width: 100vw; 
}

body {
    font-family: 'Work Sans', sans-serif !important;
    color: var(--light) !important;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden; /* Empêche le scroll horizontal global indésirable */
    background-image: 
        linear-gradient(
            135deg, 
            rgba(220, 20, 60, 0.4) 0%,   
            rgba(0, 0, 0, 0.6) 50%,      
            rgba(27, 94, 32, 0.4) 100%   
        ),
        url('image.jpg'); /* Assurez-vous que le nom de l'image est correct ici */
    background-size: cover !important;
    background-position: center !important;
    background-attachment: fixed !important;
}

/* ============================================
   NAVIGATION
   ============================================ */
.main-nav {
    background: var(--dark);
    border-bottom: 3px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px var(--shadow);
    width: 100%;
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-shrink: 0;
    text-decoration: none;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: var(--primary);
    letter-spacing: 2px;
    line-height: 1;
}

.logo-sub {
    font-size: 0.7rem;
    color: var(--light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--light);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    padding: 0.5rem 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
    display: inline-block;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

/* ============================================
   PAGES & ANIMATIONS
   ============================================ */
.page {
    display: none;
    animation: fadeIn 0.5s ease;
    padding-bottom: 2rem;
    width: 100%;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Container Global */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    width: 100%;
}


.stat-card {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    text-align: center;
    /* Important pour mobile: ne pas dépasser la largeur */
    min-width: 0; 
}

.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.stat-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

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

/* ============================================
   TITRES & SECTIONS
   ============================================ */
.section-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    color: var(--light);
    letter-spacing: 2px;
    border-left: 5px solid var(--primary);
    padding-left: 1rem;
}

.page-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: var(--light);
    letter-spacing: 3px;
    text-align: center;
    line-height: 1;
    word-break: break-word; /* Évite dépassement des longs mots */
}

.page-subtitle {
    text-align: center;
    color: var(--light);
    font-size: 1rem;
    margin-bottom: 2.5rem;
    padding: 0 1rem;
}

/* ============================================
   FILTRES & INPUTS
   ============================================ */
.filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-input,
.sort-select,
.filter-select,
.player-select {
    padding: 0.8rem 1rem;
    background: var(--dark-light);
    border: 2px solid var(--dark);
    border-radius: 8px;
    color: var(--light);
    font-size: 1rem;
    font-family: 'Work Sans', sans-serif;
    flex: 1;
    min-width: 200px;
}

/* ============================================
   GRILLES (Layouts)
   ============================================ */
.top-players-grid,
.players-grid,
.teams-grid,
.poules-grid,
.palmares-grid,
.planning-days,
.live-matchs-grid,
.home-dynamic-grid {
    display: grid;
    /* Responsive auto : min 280px sinon passe à la ligne */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 1.5rem;
    width: 100%;
}

.matches-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ============================================
   CARTES (Joueurs, Teams, etc.)
   ============================================ */
.player-card, .team-card, .dynamic-card {
    background: var(--dark-light);
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid var(--dark);
    transition: transform 0.3s ease;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.player-header, .team-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.player-name, .team-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--light);
    word-break: break-word;
}

.player-rank {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--primary);
}

.player-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.player-stat {
    text-align: center;
    padding: 0.5rem;
    background: var(--dark);
    border-radius: 8px;
}

.player-stat-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    color: var(--primary);
}

/* ============================================
   TABLEAUX (Classement)
   ============================================ */
/* Container crucial pour le mobile */
.ranking-table-container {
    background: var(--dark-light);
    border-radius: 12px;
    box-shadow: 0 10px 40px var(--shadow);
    /* Active le scroll horizontal uniquement sur le tableau si besoin */
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-bottom: 2rem;
    border: 1px solid var(--dark);
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    /* Force une largeur min pour déclencher le scroll sur petit écran */
    min-width: 600px; 
}

.ranking-table th, .ranking-table td {
    padding: 1rem;
    text-align: left;
    white-space: nowrap; /* Garde le texte sur une ligne */
}

.ranking-table thead {
    background: var(--dark);
    border-bottom: 3px solid var(--primary);
}

.ranking-table th {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--light);
}

.rank-cell {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    color: var(--primary);
}

/* ============================================
   MATCHS (Design Unifié & Responsive)
   ============================================ */
.match-card {
    background: var(--dark-light);
    border-radius: 12px;
    padding: 1.2rem;
    border: 2px solid var(--dark);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary);
    width: 100%;
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.match-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.match-badge-cnf3 { background: linear-gradient(135deg, var(--accent), #FFB347); color: var(--dark); }
.match-badge-cnf12 { background: var(--primary); color: white; }

.match-date {
    font-size: 0.8rem;
    color: var(--gray);
}

/* Contenu Match (Grille Desktop par défaut) */
.match-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
}

.match-side {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    /* Centrer le texte pour que ce soit propre */
    text-align: center; 
}

.match-name {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--light);
}

.match-score {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: var(--primary);
    text-align: center;
    white-space: nowrap;
}

/* Styles Vainqueur / Perdant */
.match-side.winner .match-name { color: var(--primary); }
.match-cnf3 .match-side.winner .match-name { color: var(--accent); }
.match-side.loser { opacity: 0.6; }

/* ============================================
   PRÉDICTIONS & COMPARATEUR
   ============================================ */
.prediction-selector, .compare-selector {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.team-selector {
    background: var(--dark-light);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--dark);
}

.vs-separator {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    color: var(--primary);
    text-align: center;
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 1px;
    cursor: pointer;
    margin-top: 1rem;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

/* ============================================
   LIVE SCORING FORM
   ============================================ */
.live-scoring-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem;
    background: var(--dark);
    border: 1px solid #333;
    color: white;
    border-radius: 6px;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--dark);
    border-top: 3px solid var(--primary);
    margin-top: 4rem;
    padding: 3rem 1.5rem 1rem;
    width: 100%;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-section h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.social-link {
    color: var(--light);
    text-decoration: none;
    transition: color 0.3s;
}
.social-link:hover { color: var(--primary); }

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.8rem;
    color: var(--gray);
}

/* ==========================================================================
   📱 OPTIMISATIONS MOBILES (Max-width 768px)
   ========================================================================== */
@media (max-width: 768px) {
    
    /* 1. Navigation : Scroll Horizontal */
    .nav-container {
        flex-direction: column;
        padding: 0.5rem;
        gap: 0.5rem;
        align-items: stretch; /* Prend toute la largeur */
    }

    .logo {
        justify-content: center; /* Centre le logo */
        margin-bottom: 0.5rem;
    }

    .nav-links {
        width: 100%;
        overflow-x: auto; /* Active le scroll horizontal */
        padding-bottom: 10px; /* Espace pour toucher */
        gap: 1rem;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start; /* Aligne à gauche pour permettre le scroll */
        flex-wrap: nowrap; /* Interdit le retour à la ligne */
    }
    
    /* Barre de défilement discrète */
    .nav-links::-webkit-scrollbar { height: 3px; }
    .nav-links::-webkit-scrollbar-thumb { background: var(--primary); }

    /* 2. Hero Section Compacte */
    .hero {
        min-height: auto;
        padding: 3rem 1rem;
    }

    .hero-title {
        font-size: 2.5rem; /* Taille réduite */
        flex-direction: column;
        gap: 0;
    }

    .hero-stats {
        grid-template-columns: 1fr; /* Une seule colonne */
        gap: 1rem;
    }

    .stat-card {
        padding: 1rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
        text-align: left;
    }
    
    .stat-number {
        font-size: 2rem;
        margin-bottom: 0;
    }

    /* 3. Matchs : Disposition Verticale */
    .match-content {
        grid-template-columns: 1fr; /* Une colonne */
        gap: 1rem;
    }

    .match-side {
        background: rgba(0,0,0,0.2);
        padding: 0.8rem;
        border-radius: 8px;
        width: 100%;
    }

    .match-score {
        padding: 0.2rem 0;
        font-size: 2rem;
        background: rgba(220, 20, 60, 0.1);
        border-radius: 8px;
        margin: 0.2rem 0;
        width: 100%;
    }

    /* 4. VS / Comparateur Vertical */
    .prediction-selector, .compare-selector {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .vs-separator {
        transform: rotate(90deg); /* VS vertical */
        margin: 0.5rem 0;
        font-size: 2rem;
    }
    
    /* 5. Grilles en 1 colonne */
    .top-players-grid, 
    .players-grid, 
    .teams-grid,
    .poules-grid,
    .live-matchs-grid,
    .planning-days {
        grid-template-columns: 1fr;
    }

    /* 6. Footer aligné */
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    /* Ajustements généraux polices */
    .section-title { font-size: 1.8rem; }
    .page-title { font-size: 2.2rem; }
}/* ==========================================
   CORRECTIFS MOBILE UNIQUEMENT
   Ne touche PAS au design PC
   ========================================== */

/* ==========================================
   MEDIA QUERY MOBILE (< 768px)
   Toutes les corrections sont ici
   ========================================== */

@media (max-width: 768px) {
    
    /* 1. EMPÊCHER LE DÉBORDEMENT HORIZONTAL */
    html {
        overflow-x: hidden !important;
        width: 100%;
        max-width: 100vw;
    }
    
    body {
        overflow-x: hidden !important;
        width: 100%;
        max-width: 100vw;
        /* Image de fond moins zoomée sur mobile */
        background-attachment: scroll !important;
        background-position: center center !important;
    }
    
    * {
        max-width: 100vw;
    }
    
    /* 2. NAVIGATION */
    .nav-container {
        flex-direction: column !important;
        padding: 0.8rem 1rem !important;
        gap: 0.8rem !important;
    }
    
    .logo {
        justify-content: center !important;
    }
    
    .logo img {
        height: 45px !important;
    }
    
    .logo-main {
        font-size: 1.8rem !important;
    }
    
    .logo-sub {
        font-size: 0.65rem !important;
    }
    
    .nav-links {
        overflow-x: auto !important;
        width: calc(100vw - 2rem) !important;
        flex-wrap: nowrap !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-link {
        font-size: 0.75rem !important;
        padding: 0.5rem 0.8rem !important;
        white-space: nowrap !important;
    }
    
    /* 3. HERO SECTION */
    .hero {
        padding: 2rem 1rem !important;
        min-height: auto !important;
    }
    
    .hero-title {
        font-size: 2rem !important;
        flex-direction: column !important;
    }
    
    .hero-highlight {
        font-size: 2.2rem !important;
    }
    
    .hero-stats {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .stat-card {
        padding: 1rem !important;
    }
    
    .stat-number {
        font-size: 2rem !important;
    }
    
    /* 4. TITRES */
    .page-title {
        font-size: 2rem !important;
    }
    
    .section-title {
        font-size: 1.5rem !important;
    }
    
    /* 5. GRILLES - 1 COLONNE */
    .top-players-grid,
    .players-grid,
    .teams-grid,
    .poules-grid,
    .live-matchs-grid,
    .planning-days,
    .dynamic-home-stats {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    /* 6. CARTES JOUEURS */
    .player-card {
        padding: 1.2rem !important;
    }
    
    .player-rank {
        font-size: 2rem !important;
    }
    
    .player-name {
        font-size: 1.2rem !important;
    }
    
    .player-elo {
        font-size: 1.5rem !important;
    }
    
    .player-photo img {
        width: 80px !important;
        height: 80px !important;
    }
    
    /* 7. MATCHS */
    .match-card {
        padding: 1rem !important;
    }
    
    .match-content {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
    }
    
    .match-player {
        font-size: 1rem !important;
        padding: 0.8rem !important;
    }
    
    .match-score {
        font-size: 1.8rem !important;
        padding: 0.8rem !important;
    }
    
    /* 8. FILTRES */
    .filters {
        flex-direction: column !important;
        gap: 0.8rem !important;
    }
    
    .search-input,
    .sort-select,
    select,
    input[type="text"] {
        width: 100% !important;
        font-size: 1rem !important;
    }
    
    /* 9. TABLEAUX SCROLLABLES */
    .ranking-table {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    
    .ranking-table table {
        min-width: 600px !important;
        font-size: 0.85rem !important;
    }
    
    .ranking-table th,
    .ranking-table td {
        padding: 0.6rem 0.4rem !important;
        white-space: nowrap !important;
    }
    
    /* 10. MODAL (PROFIL JOUEUR) - CORRECTIONS IMPORTANTES */
    .modal {
        overflow-y: scroll !important;
        -webkit-overflow-scrolling: touch;
        padding: 1rem 0 !important;
    }
    
    .modal.active {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start !important;
        padding-top: 2rem !important;
    }
    
    .modal-content {
        width: 95% !important;
        max-width: 95% !important;
        max-height: none !important;
        height: auto !important;
        margin: 0 auto 3rem auto !important;
        padding: 1.5rem 1rem !important;
        overflow: visible !important;
    }
    
    .modal-close {
        font-size: 2rem !important;
    }
    
    /* Historique des matchs dans le profil */
    #player-modal-content > div[style*="max-height"] {
        max-height: none !important;
        overflow-y: visible !important;
    }
    
    /* 11. PAGES - SCROLL VERTICAL */
    .page {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        min-height: 100vh !important;
        padding-bottom: 3rem !important;
    }
    
    /* Page classement */
    #classement {
        overflow-y: auto !important;
        min-height: 100vh;
        padding-bottom: 3rem !important;
    }
    
    /* Page joueurs */
    #joueurs {
        overflow-y: auto !important;
        min-height: 100vh;
        padding-bottom: 3rem !important;
    }
    
    .container {
        padding: 1rem 0.5rem !important;
        padding-bottom: 3rem !important;
    }
    
    /* 12. PRÉDICTIONS / COMPARATEUR */
    .prediction-selector,
    .compare-selector {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .vs-separator {
        font-size: 2rem !important;
        padding: 0.5rem !important;
    }
    
    .probability {
        font-size: 2.5rem !important;
    }
    
    /* 13. FOOTER */
    .site-footer {
        padding: 2rem 1rem !important;
    }
    
    .footer-container {
        grid-template-columns: 1fr !important;
        text-align: center !important;
    }
    
    /* 14. ONGLETS */
    .tabs {
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }
    
    .tab-button {
        flex: 1 1 calc(50% - 0.25rem) !important;
        font-size: 0.9rem !important;
        padding: 0.7rem 0.5rem !important;
    }
    
    /* 15. PALMARÈS PODIUM */
    .palmares-podium {
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .podium-item {
        width: 100% !important;
        max-width: 280px !important;
    }
}

/* ==========================================
   TRÈS PETITS ÉCRANS (< 380px)
   ========================================== */

@media (max-width: 380px) {
    .logo-main {
        font-size: 1.5rem !important;
    }
    
    .logo img {
        height: 40px !important;
    }
    
    .nav-link {
        font-size: 0.7rem !important;
        padding: 0.4rem 0.6rem !important;
    }
    
    .hero-title {
        font-size: 1.7rem !important;
    }
    
    .stat-number {
        font-size: 1.7rem !important;
    }
    
    .page-title {
        font-size: 1.7rem !important;
    }
    
    .match-score {
        font-size: 1.5rem !important;
    }
}

/* ==========================================
    CORRECTIFS SUPPLÉMENTAIRES MOBILE
    À AJOUTER À LA FIN DE styles.css
    ========================================== */

    /* 1. CORRIGER L'IMAGE DE FOND SUR MOBILE */
    @media (max-width: 768px) {
        body {
            background-image: 
                linear-gradient(
                    135deg, 
                    rgba(220, 20, 60, 0.5) 0%,
                    rgba(0, 0, 0, 0.7) 50%,
                    rgba(27, 94, 32, 0.5) 100%
                ),
                url('image.jpg');
            background-size: cover !important;
            background-position: center center !important;
            background-attachment: scroll !important; /* Pas fixed sur mobile */
            /* Alternative : si l'image est trop zoomée */
            /* background-size: 100% auto !important; */
        }
    }

    /* 2. CORRIGER LE SCROLL DANS LES MODALS (PROFIL JOUEUR) */
    .modal {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .modal-content {
        max-height: none !important; /* Enlever la limite de hauteur */
        overflow-y: visible !important;
        margin: 1rem auto !important;
    }

    @media (max-width: 768px) {
        .modal {
            overflow-y: auto !important;
            -webkit-overflow-scrolling: touch;
            padding: 1rem 0 !important;
        }
        
        .modal-content {
            max-height: none !important; /* Permettre de scroller */
            height: auto !important;
            overflow-y: visible !important;
            margin: 1rem auto 2rem auto !important; /* Espace en bas */
            padding-bottom: 2rem !important; /* Padding en bas */
        }
        
        /* S'assurer que l'historique des matchs est visible */
        #player-modal-content {
            max-height: none !important;
            overflow-y: visible !important;
        }
        
        /* Conteneur de l'historique des matchs */
        #player-modal-content > div[style*="max-height"] {
            max-height: none !important;
            overflow-y: visible !important;
        }
    }

    /* 3. CORRIGER LA PAGE CLASSEMENT */
    @media (max-width: 768px) {
        /* Page classement complète */
        #classement {
            overflow-y: auto !important;
            -webkit-overflow-scrolling: touch;
            min-height: 100vh;
            padding-bottom: 3rem !important;
        }
        
        /* Conteneur de la page classement */
        #classement .container {
            overflow: visible !important;
            padding-bottom: 3rem !important;
        }
        
        /* Tableau de classement */
        #classement-elo,
        .ranking-table {
            width: 100% !important;
            overflow-x: auto !important;
            -webkit-overflow-scrolling: touch;
            margin-bottom: 2rem !important;
        }
    }

    /* 4. CORRIGER LA PAGE JOUEURS */
    @media (max-width: 768px) {
        #joueurs {
            overflow-y: auto !important;
            -webkit-overflow-scrolling: touch;
            min-height: 100vh;
            padding-bottom: 3rem !important;
        }
        
        #joueurs .container {
            overflow: visible !important;
            padding-bottom: 3rem !important;
        }
        
        /* Grille des joueurs */
        #all-players {
            padding-bottom: 2rem !important;
        }
    }

    /* 5. TOUTES LES PAGES DOIVENT POUVOIR SCROLLER */
    @media (max-width: 768px) {
        .page {
            overflow-y: auto !important;
            -webkit-overflow-scrolling: touch;
            min-height: 100vh !important;
            padding-bottom: 3rem !important;
        }
        
        .page.active {
            display: block !important;
            overflow-y: auto !important;
        }
        
        .container {
            padding-bottom: 3rem !important;
        }
    }

    /* 6. FIX POUR L'OVERLAY DU MODAL */
    @media (max-width: 768px) {
        .modal {
            display: none; /* Caché par défaut */
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            z-index: 9999;
            overflow-y: scroll !important; /* Permettre le scroll */
            -webkit-overflow-scrolling: touch;
            padding: 0 !important;
        }
        
        .modal.active {
            display: flex !important;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start; /* Aligner en haut */
            padding-top: 2rem !important;
        }
        
        .modal-content {
            position: relative; /* Pas fixed */
            width: 95% !important;
            max-width: 95% !important;
            max-height: none !important;
            height: auto !important;
            margin: 0 auto 3rem auto !important;
            overflow: visible !important;
        }
    }

    /* 7. HISTORIQUE DES MATCHS DANS LE PROFIL */
    @media (max-width: 768px) {
        /* Conteneur de l'historique */
        .player-matches-history {
            max-height: none !important;
            overflow-y: visible !important;
        }
        
        /* Chaque match dans l'historique */
        .match-history-item {
            margin-bottom: 1rem !important;
            padding: 1rem !important;
        }
    }

    /* 8. ASSURER QUE LE BODY NE BLOQUE PAS LE SCROLL */
    @media (max-width: 768px) {
        body {
            overflow-y: auto !important;
            overflow-x: hidden !important;
            height: auto !important;
            min-height: 100vh !important;
        }
        
        html {
            overflow-y: auto !important;
            overflow-x: hidden !important;
        }
    }

    /* 9. ALTERNATIVE POUR L'IMAGE DE FOND (SI TOUJOURS ZOOMÉE) */
    @media (max-width: 768px) {
        /* Option 1 : Image contenue (pas de zoom) */
        body.bg-contain {
            background-size: contain !important;
            background-repeat: no-repeat !important;
            background-position: top center !important;
        }
        
        /* Option 2 : Image en largeur */
        body.bg-width {
            background-size: 100% auto !important;
            background-position: center top !important;
        }
        
        /* Option 3 : Pas d'image sur mobile (meilleure performance) */
        body.bg-none {
            background-image: 
                linear-gradient(
                    135deg, 
                    rgba(220, 20, 60, 0.3) 0%,
                    rgba(0, 0, 0, 0.9) 50%,
                    rgba(27, 94, 32, 0.3) 100%
                ) !important;
            background-color: #1a1a1a !important;
        }
    }

    /* 10. FIX GRAPHIQUE ELO DANS LE PROFIL */
    @media (max-width: 768px) {
        canvas {
            max-width: 100% !important;
            height: auto !important;
        }
        
        /* Conteneur du graphique */
        .chart-container {
            width: 100% !important;
            max-width: 100% !important;
            overflow: visible !important;
        }
    }

    /* ============================================
   STYLES POUR LE BADGE "NOUVEAU" ET MATCHS DU JOUR
   A ajouter dans styles.css
   ============================================ */

/* Badge NOUVEAU */
.badge-nouveau {
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    color: #000;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Animation pour les matchs nouveaux */
.live-match-card.match-nouveau {
    animation: glow-card 2s ease-in-out 3;
    border-left: 4px solid #00ff88;
}

@keyframes glow-card {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    50% {
        box-shadow: 0 4px 20px rgba(0, 255, 136, 0.4);
    }
}

/* Message "Aucun match aujourd'hui" plus visible */
.live-no-matchs {
    padding: 4rem 2rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    border: 2px dashed var(--gray);
}

.live-no-matchs i {
    font-size: 4rem;
    color: var(--gray);
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.live-no-matchs p {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.live-no-matchs small {
    color: var(--gray);
    font-size: 1rem;
}

/* Ajuster l'affichage de l'heure */
.live-match-date {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .badge-nouveau {
        font-size: 0.65rem;
        padding: 3px 8px;
    }
    
    .live-no-matchs {
        padding: 3rem 1.5rem;
    }
    
    .live-no-matchs i {
        font-size: 3rem;
    }
    
    .live-no-matchs p {
        font-size: 1.2rem;
    }
}

/* ============================================ */
/* CALCULATEUR AVANCE - STYLES */
/* A ajouter dans styles.css */
/* ============================================ */

/* Configuration de la partie */
.game-config {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
    padding: 2rem;
    background: var(--dark);
    border-radius: 16px;
}

.config-section label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

/* Sélecteurs de configuration */
.finish-type-selector,
.players-selector {
    display: flex;
    gap: 0.5rem;
}

.finish-btn,
.player-btn {
    flex: 1;
    padding: 1rem;
    background: var(--dark-light);
    border: 2px solid var(--gray);
    border-radius: 8px;
    color: var(--light);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.finish-btn:hover,
.player-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.finish-btn.active,
.player-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-color: var(--primary);
    color: var(--dark);
}

.finish-btn i {
    margin-right: 0.5rem;
}

#score-depart {
    width: 100%;
    padding: 1rem;
    background: var(--dark-light);
    border: 2px solid var(--gray);
    border-radius: 8px;
    color: var(--light);
    font-size: 1.1rem;
    font-weight: 600;
}

#score-depart:focus {
    outline: none;
    border-color: var(--primary);
}

/* Zone des joueurs */
.zone-joueurs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.joueur-card {
    background: var(--dark);
    border: 2px solid var(--dark-light);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.joueur-card.actif {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.3);
}

.joueur-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.joueur-nom {
    font-weight: 700;
    color: var(--light);
}

.badge-actif {
    background: var(--primary);
    color: var(--dark);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.joueur-score {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    color: var(--accent);
    text-align: center;
    margin: 1rem 0;
}

.joueur-stats-mini {
    display: flex;
    justify-content: space-around;
    font-size: 0.85rem;
    color: var(--gray);
}

/* Joueur actif */
.joueur-actif {
    background: var(--dark);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
}

.joueur-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.joueur-info .joueur-nom {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: var(--primary);
}

.joueur-score-restant {
    text-align: right;
}

.joueur-score-restant .label {
    display: block;
    font-size: 0.9rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.score-big {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 4rem;
    color: var(--accent);
    line-height: 1;
}

/* Suggestion de finish */
.suggestion-finish {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    animation: pulse 2s infinite;
}

.suggestion-header {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.finish-suggestion {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
    justify-content: center;
}

.finish-dart {
    background: var(--dark);
    color: var(--light);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.finish-suggestion i {
    color: var(--dark);
    font-size: 1.5rem;
}

.finish-info {
    text-align: center;
    font-size: 0.9rem;
    color: var(--dark);
    font-weight: 600;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4); }
    50% { box-shadow: 0 0 20px 10px rgba(46, 204, 113, 0); }
}

/* Zone de saisie */
.input-zone {
    background: var(--dark-light);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.fleche-actuelle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.fleche-numero {
    font-weight: 700;
    color: var(--primary);
    font-size: 1.2rem;
}

.fleche-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: var(--accent);
}

/* Multiplicateur */
.multiplicateur-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.mult-btn {
    padding: 1rem;
    background: var(--dark);
    border: 2px solid var(--gray);
    border-radius: 8px;
    color: var(--light);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.mult-btn:hover {
    border-color: var(--primary);
}

.mult-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--dark);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

/* Clavier de la cible */
.dartboard-keyboard {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.keyboard-row {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.key-btn {
    flex: 1;
    padding: 1.5rem 1rem;
    background: var(--dark);
    border: 2px solid var(--primary);
    border-radius: 8px;
    color: var(--light);
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Bebas Neue', sans-serif;
}

.key-btn:hover {
    background: var(--primary);
    color: var(--dark);
    transform: scale(1.05);
}

.key-btn.bull {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: var(--dark);
    border-color: #FFD700;
}

.key-btn.miss {
    background: var(--danger);
    border-color: var(--danger);
}

.key-btn.undo {
    background: var(--dark-light);
    border-color: var(--gray);
}

/* Volée courante */
.volee-courante {
    display: grid;
    grid-template-columns: repeat(3, 1fr) 150px;
    gap: 1rem;
    margin: 1.5rem 0;
    align-items: center;
}

.fleche-item {
    background: var(--dark);
    border: 2px solid var(--gray);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: var(--gray);
}

.fleche-item.filled {
    border-color: var(--primary);
    color: var(--light);
}

.volee-total {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--dark);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.volee-total span {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    margin-top: 0.5rem;
}

/* Actions */
.actions {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-valider {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--success) 0%, #27ae60 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-valider:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.btn-valider:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-passer {
    padding: 1.5rem;
    background: var(--dark);
    border: 2px solid var(--gray);
    border-radius: 8px;
    color: var(--light);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-passer:hover {
    border-color: var(--primary);
}

/* Historique du joueur actif */
.historique-joueur {
    margin-top: 2rem;
}

.historique-joueur h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.historique-item-calc {
    display: grid;
    grid-template-columns: 60px 1fr 150px;
    gap: 1rem;
    padding: 1rem;
    background: var(--dark);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    align-items: center;
}

.vol-num {
    font-weight: 700;
    color: var(--accent);
    font-size: 1.1rem;
}

.vol-detail {
    color: var(--light);
    font-weight: 600;
}

.vol-reste {
    text-align: right;
    color: var(--gray);
    font-size: 0.9rem;
}

/* Stats rapides */
.stats-rapides {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.stat-quick {
    background: var(--dark);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.stat-quick .label {
    display: block;
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.stat-quick .value {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: var(--primary);
}

/* Actions globales */
.actions-globales {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
}

.btn-nouvelle-partie,
.btn-stats {
    flex: 1;
    padding: 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-nouvelle-partie {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border: none;
    color: var(--dark);
}

.btn-nouvelle-partie:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.btn-stats {
    background: var(--dark);
    border: 2px solid var(--primary);
    color: var(--light);
}

.btn-stats:hover {
    border-color: var(--accent);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--dark);
    padding: 3rem;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.modal-content.victoire {
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--gray);
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--primary);
}

.victoire-animation {
    font-size: 5rem;
    margin: 2rem 0;
    animation: bounce 1s infinite;
}

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

.victoire-stat {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: var(--dark-light);
    border-radius: 8px;
    margin: 1rem 0;
}

.victoire-stat .label {
    color: var(--gray);
}

.victoire-stat .value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: var(--accent);
}

/* Stats détaillées */
.stats-joueur {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--dark-light);
    border-radius: 12px;
}

.stats-joueur h3 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-detail {
    background: var(--dark);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-detail .label {
    color: var(--gray);
    font-size: 0.9rem;
}

.stat-detail .value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--accent);
}

/* ============================================ */
/* CORRECTIONS MOBILE + DENSITÉ */
/* Remplacer le CSS responsive existant dans calculateur_avance.css */
/* ============================================ */

/* Réduire les espacements globaux sur mobile */
@media (max-width: 768px) {
    /* Page title plus compact */
    .page-title {
        font-size: 2rem !important;
        margin-bottom: 1rem !important;
    }
    
    .page-subtitle {
        font-size: 0.9rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* Configuration plus compacte */
    .game-config {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .config-section label {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .finish-btn,
    .player-btn {
        padding: 0.6rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .finish-btn i {
        font-size: 0.9rem;
    }
    
    #score-depart {
        padding: 0.75rem;
        font-size: 1rem;
    }
    
    /* Zone joueurs plus compacte */
    .zone-joueurs {
        gap: 0.5rem;
        margin: 1rem 0;
    }
    
    .joueur-card {
        padding: 1rem;
    }
    
    .joueur-score {
        font-size: 2rem;
        margin: 0.5rem 0;
    }
    
    .joueur-stats-mini {
        font-size: 0.75rem;
    }
    
    /* Joueur actif plus compact */
    .joueur-actif {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .joueur-info {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 1rem;
        gap: 0.5rem;
    }
    
    .joueur-info .joueur-nom {
        font-size: 1.8rem;
    }
    
    .joueur-score-restant {
        text-align: left;
    }
    
    .score-big {
        font-size: 2.5rem;
    }
    
    /* Suggestion de finish plus compacte */
    .suggestion-finish {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .suggestion-header {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .finish-dart {
        padding: 0.5rem 1rem;
        font-size: 1.3rem;
    }
    
    .finish-suggestion {
        gap: 0.5rem;
    }
    
    .finish-suggestion i {
        font-size: 1rem;
    }
    
    .finish-info {
        font-size: 0.8rem;
    }
    
    /* Zone de saisie très compacte */
    .input-zone {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .fleche-actuelle {
        margin-bottom: 1rem;
    }
    
    .fleche-numero {
        font-size: 1rem;
    }
    
    .fleche-value {
        font-size: 1.5rem;
    }
    
    /* Multiplicateurs compacts */
    .multiplicateur-selector {
        gap: 0.3rem;
        margin-bottom: 1rem;
    }
    
    .mult-btn {
        padding: 0.6rem;
        font-size: 0.85rem;
    }
    
    /* Clavier TRÈS compact */
    .dartboard-keyboard {
        gap: 0.3rem;
        margin: 1rem 0;
    }
    
    .keyboard-row {
        gap: 0.3rem;
    }
    
    .key-btn {
        padding: 0.8rem 0.4rem;
        font-size: 1.1rem;
        min-width: auto;
        border-width: 1px;
    }
    
    /* Volée courante compacte */
    .volee-courante {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
        margin: 1rem 0;
    }
    
    .fleche-item {
        padding: 0.8rem;
        font-size: 1.3rem;
    }
    
    .volee-total {
        grid-column: 1 / -1;
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .volee-total span {
        font-size: 1.5rem;
        margin-top: 0.3rem;
    }
    
    /* Actions compactes */
    .actions {
        grid-template-columns: 2fr 1fr;
        gap: 0.5rem;
        margin-top: 1rem;
    }
    
    .btn-valider,
    .btn-passer {
        padding: 1rem;
        font-size: 1rem;
    }
    
    /* Historique compact */
    .historique-joueur {
        margin-top: 1rem;
    }
    
    .historique-joueur h3 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .historique-list {
        max-height: 200px;
    }
    
    .historique-item-calc {
        grid-template-columns: 50px 1fr 100px;
        gap: 0.5rem;
        padding: 0.6rem;
        margin-bottom: 0.3rem;
        font-size: 0.85rem;
    }
    
    .vol-num {
        font-size: 0.9rem;
    }
    
    .vol-detail {
        font-size: 0.85rem;
    }
    
    .vol-reste {
        font-size: 0.75rem;
        text-align: right;
    }
    
    /* Stats rapides compactes */
    .stats-rapides {
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .stat-quick {
        padding: 0.6rem;
    }
    
    .stat-quick .label {
        font-size: 0.7rem;
        margin-bottom: 0.3rem;
    }
    
    .stat-quick .value {
        font-size: 1.3rem;
    }
    
    /* Actions globales */
    .actions-globales {
        flex-direction: column;
        gap: 0.5rem;
        margin: 1rem 0;
    }
    
    .btn-nouvelle-partie,
    .btn-stats {
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    /* Modal */
    .modal-content {
        padding: 1.5rem;
        width: 95%;
        max-height: 90vh;
    }
    
    .modal-content h2 {
        font-size: 1.8rem;
    }
    
    .victoire-animation {
        font-size: 3rem;
        margin: 1rem 0;
    }
    
    .victoire-stat {
        padding: 0.6rem;
        margin: 0.5rem 0;
        font-size: 0.9rem;
    }
    
    .victoire-stat .value {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .stat-detail {
        padding: 0.6rem;
        font-size: 0.85rem;
    }
    
    .stat-detail .value {
        font-size: 1.3rem;
    }
}

/* Très petits écrans (< 400px) */
@media (max-width: 400px) {
    .key-btn {
        padding: 0.6rem 0.3rem;
        font-size: 1rem;
    }
    
    .finish-dart {
        padding: 0.4rem 0.8rem;
        font-size: 1.1rem;
    }
    
    .fleche-item {
        padding: 0.6rem;
        font-size: 1.1rem;
    }
}

/* Image de fond pour le calculateur */
#calculateur {
    position: relative;
    min-height: 100vh;
}

#calculateur::before {

    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        /* Filtre avec dégradé Rouge/Noir/Vert */
        linear-gradient(
            135deg, 
            rgba(220, 20, 60, 0.4) 0%,   /* Rouge (--primary) */
            rgba(0, 0, 0, 0.6) 50%,      /* Noir pour le centre (lisibilité) */
            rgba(27, 94, 32, 0.4) 100%   /* Vert (--secondary) */
        ),
    url('cible.avif');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    opacity: 1;
    z-index: -1;
    pointer-events: none;
}


#calculateur .container {
    backdrop-filter: blur(5px);
    background: rgba(21, 25, 36, 0.3);
    border-radius: 16px;
}


@media (max-width: 768px) {
    
    /* ========== NAVIGATION ========== */
    .nav-container {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
    }
    
    .logo img {
        height: 50px !important;
    }
    
    .logo-main {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }
    
    .logo-sub {
        font-size: 0.65rem;
        letter-spacing: 1px;
    }
    
    .nav-links {
        gap: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .nav-link {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
        letter-spacing: 0.5px;
    }
    
    /* ========== PAGES ========== */
    .page {
        padding: 1rem 0.5rem;
    }
    
    .container {
        padding: 1rem;
    }
    
    /* ========== TITRES ========== */
    .page-title {
        font-size: 2rem !important;
        margin-bottom: 1rem !important;
    }
    
    .page-subtitle {
        font-size: 0.9rem !important;
        margin-bottom: 1rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    h3 {
        font-size: 1.2rem !important;
    }
    
    /* ========== HERO ========== */
    .hero {
        padding: 2rem 1rem;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin-top: 2rem;
    }
    
    .hero-stat-number {
        font-size: 2rem !important;
    }
    
    .hero-stat-label {
        font-size: 0.75rem !important;
    }
    
    /* ========== CARDS ========== */
    .card,
    .player-card,
    .match-card,
    .stat-card {
        padding: 1rem !important;
        margin-bottom: 1rem;
    }

}
/* ============================================
   BRACKET TABLEAU FINAL CNF 3
   ============================================ */

/* Container page d'accueil */
.bracket-accueil-container {
    margin-bottom: 3rem;
}

/* Wrapper scrollable horizontal pour bracket complet */
.bracket-wrapper {
    display: flex;
    gap: 0;
    overflow-x: auto;
    padding: 1.5rem 0.5rem 2rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary, #6c63ff) var(--card-bg, #1e1e2e);
    -webkit-overflow-scrolling: touch;
}

.bracket-wrapper::-webkit-scrollbar {
    height: 6px;
}
.bracket-wrapper::-webkit-scrollbar-track { background: var(--card-bg, #1e1e2e); }
.bracket-wrapper::-webkit-scrollbar-thumb { background: var(--primary, #6c63ff); border-radius: 3px; }

/* Colonne par round */
.bracket-round {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 200px;
    max-width: 220px;
    flex-shrink: 0;
    position: relative;
}

.bracket-round::after {
    content: '';
    position: absolute;
    right: -1px;
    top: 60px;
    bottom: 10px;
    width: 1px;
    background: rgba(255,255,255,0.06);
}

.bracket-round:last-child::after { display: none; }

.bracket-round-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary, #6c63ff);
    padding: 0.4rem 0.8rem;
    margin-bottom: 0.8rem;
    background: rgba(108, 99, 255, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(108, 99, 255, 0.25);
    white-space: nowrap;
    text-align: center;
}

.bracket-round-matches {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
    padding: 0 0.4rem;
}

/* Carte match */
.bracket-match {
    background: var(--card-bg, #1e1e2e);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
    cursor: default;
}

.bracket-match:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.bracket-match-played {
    border-color: rgba(108, 99, 255, 0.2);
}

.bracket-match-pending {
    opacity: 0.75;
}

.bracket-match-tbd {
    opacity: 0.4;
}

/* Ligne équipe dans le bracket */
.bracket-team {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.45rem 0.6rem;
    transition: background 0.15s;
    min-height: 32px;
}

.bt-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 0;
}

.bt-seed {
    font-size: 0.6rem;
    font-weight: 700;
    color: rgba(255,255,255,0.35);
    min-width: 18px;
    text-align: center;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    padding: 1px 3px;
    flex-shrink: 0;
}

.bt-name {
    flex: 1;
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bt-score {
    font-size: 0.8rem;
    font-weight: 800;
    min-width: 20px;
    text-align: center;
    color: rgba(255,255,255,0.5);
    flex-shrink: 0;
}

/* États gagnant / perdant */
.bt-winner {
    background: rgba(72, 199, 142, 0.12);
}
.bt-winner .bt-name { color: #48c78e; font-weight: 700; }
.bt-winner .bt-score { color: #48c78e; }
.bt-winner .bt-seed { color: #48c78e; background: rgba(72,199,142,0.2); }

.bt-loser .bt-name { color: rgba(255,255,255,0.35); text-decoration: line-through; text-decoration-color: rgba(255,255,255,0.15); }
.bt-loser .bt-score { color: rgba(255,100,100,0.6); }

.bracket-tbd .bt-name { color: rgba(255,255,255,0.2); font-style: italic; }

/* Champion dans le bracket */
.bracket-champion {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 3rem;
    min-width: 150px;
    padding-left: 1rem;
}

.champion-card-bracket {
    background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,165,0,0.08));
    border: 1px solid rgba(255,215,0,0.3);
    border-radius: 12px;
    padding: 1.2rem 1rem;
    text-align: center;
    min-width: 130px;
}

.champion-trophy-bracket { font-size: 2rem; margin-bottom: 0.5rem; }
.champion-name-bracket {
    font-size: 0.8rem;
    font-weight: 800;
    color: #ffd700;
    word-break: break-word;
    text-align: center;
    line-height: 1.3;
}

/* Stats header */
.bracket-header-stats {
    display: flex;
    gap: 1.5rem;
    padding: 0.8rem 1rem;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
.bracket-header-stats span {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.55);
}
.bracket-header-stats strong { color: rgba(255,255,255,0.85); }

/* Empty state */
.bracket-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: rgba(255,255,255,0.4);
}
.bracket-empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.bracket-empty h3 { color: rgba(255,255,255,0.6); margin-bottom: 0.5rem; font-size: 1.1rem; }
.bracket-empty p { font-size: 0.9rem; }

/* ---- VERSION ACCUEIL (compact) ---- */
.bracket-accueil-wrapper {
    display: flex;
    gap: 0;
    overflow-x: auto;
    padding: 1rem 0.25rem 1.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary, #6c63ff) transparent;
    -webkit-overflow-scrolling: touch;
}

.bracket-accueil-wrapper::-webkit-scrollbar { height: 4px; }
.bracket-accueil-wrapper::-webkit-scrollbar-thumb { background: var(--primary, #6c63ff); border-radius: 2px; }

.bracket-accueil-round {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 185px;
    max-width: 195px;
    flex-shrink: 0;
    position: relative;
    padding-right: 1rem;
}

.bracket-accueil-round::after {
    content: '→';
    position: absolute;
    right: -2px;
    top: 55px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.15);
}

.bracket-accueil-round:last-child::after { display: none; }

.bar-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--primary, #6c63ff);
    margin-bottom: 0.6rem;
    padding: 0.3rem 0.6rem;
    background: rgba(108, 99, 255, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(108, 99, 255, 0.2);
    white-space: nowrap;
    text-align: center;
}

.bar-matches {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
}

.bracket-accueil-champion {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 2rem;
    padding-left: 1rem;
    min-width: 130px;
}

.champion-mini {
    background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,165,0,0.08));
    border: 1px solid rgba(255,215,0,0.3);
    border-radius: 10px;
    padding: 0.8rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 800;
    color: #ffd700;
    text-align: center;
    word-break: break-word;
    line-height: 1.4;
}

.bracket-empty-home {
    text-align: center;
    padding: 1.5rem;
    color: rgba(255,255,255,0.3);
    font-size: 0.85rem;
    font-style: italic;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
}

.bracket-accueil-link {
    margin-top: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, rgba(220,20,60,0.15) 0%, rgba(220,20,60,0.05) 100%);
    border: 1px solid rgba(220,20,60,0.4);
    border-radius: 10px;
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary, #DC143C);
    cursor: pointer;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.bracket-accueil-link:hover {
    background: linear-gradient(135deg, rgba(220,20,60,0.28) 0%, rgba(220,20,60,0.12) 100%);
    border-color: var(--primary, #DC143C);
    transform: translateY(-1px);
}
.bracket-link-icon { font-size: 1.1rem; }
.bracket-link-arrow { font-size: 1.1rem; transition: transform 0.2s; }
.bracket-accueil-link:hover .bracket-link-arrow { transform: translateX(4px); }

/* Photos prédictions */
.pred-select-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.pred-photo {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary, #DC143C);
    flex-shrink: 0;
    transition: opacity 0.2s;
}
.pred-photo.hidden { display: none; }

/* Responsive mobile */
@media (max-width: 600px) {
    .bracket-round, .bracket-accueil-round { min-width: 160px; max-width: 170px; }
    .bt-name { font-size: 0.65rem; }
    .bt-score { font-size: 0.72rem; }
    .bracket-round-label, .bar-label { font-size: 0.6rem; }
}
/* Photos top joueurs + classement */
.top-player-photo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    display: block;
    margin: 0 auto 0.5rem;
}

.classement-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
    margin-right: 8px;
    border: 1.5px solid #3a3a3a;
}

/* ============================================
   DESIGN MIROIR PREMIUM (COUPE DU MONDE)
   ============================================ */

/* Fond ambiant du bracket */
#tableau-cnf3 {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}
#tableau-cnf3::-webkit-scrollbar { height: 6px; }
#tableau-cnf3::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); border-radius: 3px; }
#tableau-cnf3::-webkit-scrollbar-thumb { background: linear-gradient(90deg, var(--primary), #ff6b6b); border-radius: 3px; }

.wc-bracket-container {
    display: inline-flex;
    min-width: max-content;
    justify-content: center;
    align-items: stretch;
    padding: 2.5rem 1.5rem;
    gap: 0;
    position: relative;
    background: radial-gradient(ellipse at 50% 50%, rgba(220,20,60,0.05) 0%, transparent 65%);
    border-radius: 20px;
}

/* Les moitiés gauche et droite */
.wc-bracket-half {
    display: flex;
    gap: 0;
    flex: 1;
}
.wc-bracket-half.left-side  { flex-direction: row; }
.wc-bracket-half.right-side { flex-direction: row; }

/* Colonnes des phases */
.wc-round {
    display: flex;
    flex-direction: column;
    width: 220px;
    padding: 0 8px;
    position: relative;
}

.wc-matches-column {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    height: 100%;
    gap: 8px;
}

/* Étiquette de phase */
.bracket-round-label {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    padding: 0.3rem 0.8rem;
    margin-bottom: 1rem;
    background: rgba(255,255,255,0.04);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.08);
    text-align: center;
    white-space: nowrap;
}

.finale-label {
    background: linear-gradient(90deg, rgba(220,20,60,0.35), rgba(255,215,0,0.25)) !important;
    color: #FFD700 !important;
    border-color: rgba(255,215,0,0.4) !important;
    text-shadow: 0 0 12px rgba(255,215,0,0.5);
    box-shadow: 0 0 20px rgba(255,215,0,0.1);
}

/* ---- Carte match ---- */
.bracket-match {
    background: linear-gradient(160deg, rgba(38,38,58,0.9) 0%, rgba(25,25,42,0.9) 100%);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.07);
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.2s;
    position: relative;
    backdrop-filter: blur(4px);
}

/* Ligne lumineuse en haut de chaque carte */
.bracket-match::before {
    content: '';
    position: absolute;
    top: 0; left: 20%; right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
    border-radius: 999px;
}

.bracket-match:hover {
    border-color: rgba(220,20,60,0.45);
    box-shadow: 0 6px 28px rgba(0,0,0,0.45), 0 0 0 1px rgba(220,20,60,0.18);
    transform: translateY(-2px);
    z-index: 5;
}

.bracket-match-played {
    border-color: rgba(255,255,255,0.1);
}
.bracket-match-played::before {
    background: linear-gradient(90deg, transparent, rgba(220,20,60,0.3), transparent);
}

.bracket-match-pending { opacity: 0.72; }
.bracket-match-tbd { opacity: 0.32; }

/* Séparateur */
.bt-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 5%, rgba(255,255,255,0.07) 30%, rgba(255,255,255,0.07) 70%, transparent 95%);
}

/* Ligne équipe */
.bracket-team {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.52rem 0.75rem;
    position: relative;
    transition: background 0.15s;
}

/* Numéro tête de série */
.bt-seed {
    font-size: 0.58rem;
    font-weight: 700;
    color: rgba(255,255,255,0.28);
    min-width: 17px;
    height: 17px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

/* Nom joueur */
.bt-name {
    flex: 1;
    font-size: 0.76rem;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Score */
.bt-score {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    min-width: 24px;
    text-align: center;
    color: rgba(255,255,255,0.3);
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    padding: 1px 4px;
}

/* ---- GAGNANT ---- */
.bt-winner {
    background: linear-gradient(90deg, rgba(220,20,60,0.2) 0%, rgba(220,20,60,0.05) 80%, transparent 100%);
}

.bt-winner::after {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #FF4D6D, #DC143C);
    border-radius: 0 2px 2px 0;
}

.bt-winner .bt-name {
    color: #fff;
    font-weight: 700;
}

.bt-winner .bt-score {
    color: #fff;
    background: rgba(220,20,60,0.55);
    font-size: 1.25rem;
}

.bt-winner .bt-seed {
    color: rgba(255,80,80,0.9);
    background: rgba(220,20,60,0.18);
}

/* ---- PERDANT ---- */
.bt-loser .bt-name {
    color: rgba(255,255,255,0.22);
    text-decoration: line-through;
    text-decoration-color: rgba(255,255,255,0.1);
}
.bt-loser .bt-score {
    color: rgba(255,80,80,0.4);
    background: rgba(255,0,0,0.04);
}

/* ---- À DÉTERMINER ---- */
.bracket-tbd .bt-name {
    color: rgba(255,255,255,0.18);
    font-style: italic;
    font-size: 0.68rem;
}

/* ---- CONNEXIONS ENTRE MATCHS ---- */
.left-side .wc-round:not(:last-child) .bracket-match::after {
    content: '';
    position: absolute;
    right: -9px;
    top: 50%;
    width: 9px;
    border-bottom: 1px solid rgba(220,20,60,0.3);
    z-index: 2;
}

.right-side .wc-round:not(:last-child) .bracket-match::after {
    content: '';
    position: absolute;
    left: -9px; right: auto;
    top: 50%;
    width: 9px;
    border-bottom: 1px solid rgba(220,20,60,0.3);
    z-index: 2;
}

/* ---- CENTRE (Trophée & Finale) ---- */
.wc-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 260px;
    padding: 0 1.5rem;
    z-index: 10;
    position: relative;
}

.wc-center::before {
    content: '';
    position: absolute;
    left: 0; top: 8%; bottom: 8%;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(220,20,60,0.4) 40%, rgba(255,215,0,0.3) 60%, transparent);
}
.wc-center::after {
    content: '';
    position: absolute;
    right: 0; top: 8%; bottom: 8%;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(220,20,60,0.4) 40%, rgba(255,215,0,0.3) 60%, transparent);
}

.wc-trophy {
    font-size: 5rem;
    margin-bottom: 1.2rem;
    filter: drop-shadow(0 0 20px rgba(255,215,0,0.6)) drop-shadow(0 0 50px rgba(255,165,0,0.2));
    animation: trophy-pulse 3.5s ease-in-out infinite;
}

@keyframes trophy-pulse {
    0%,100% { transform: scale(1);    filter: drop-shadow(0 0 18px rgba(255,215,0,0.5)); }
    50%      { transform: scale(1.07); filter: drop-shadow(0 0 36px rgba(255,215,0,0.9)) drop-shadow(0 0 70px rgba(255,165,0,0.35)); }
}

/* Carte de la Finale dans le centre */
.wc-center .bracket-match {
    width: 100%;
    border-color: rgba(220,20,60,0.35);
    box-shadow: 0 0 35px rgba(220,20,60,0.12), inset 0 1px 0 rgba(255,255,255,0.06);
}
.wc-center .bracket-match .bt-name { font-size: 0.85rem; }
.wc-center .bracket-match .bt-score { font-size: 1.4rem; }

/* Carte champion */
.champion-card-bracket {
    background: linear-gradient(135deg, rgba(255,215,0,0.12) 0%, rgba(255,120,0,0.06) 100%);
    border: 1px solid rgba(255,215,0,0.35);
    border-radius: 14px;
    padding: 1.2rem 1.6rem;
    text-align: center;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 35px rgba(255,215,0,0.1);
}
.champion-card-bracket::before {
    content: '';
    position: absolute;
    top: 0; left: 15%; right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,215,0,0.6), transparent);
}
.champion-trophy-bracket { font-size: 2.2rem; margin-bottom: 0.5rem; display: block; }
.champion-name-bracket {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    color: #FFD700;
    letter-spacing: 0.12em;
    text-shadow: 0 0 15px rgba(255,215,0,0.5);
}

/* Highlight parcours */
.highlight-path {
    background: linear-gradient(90deg, rgba(220,20,60,0.35) 0%, rgba(220,20,60,0.1) 100%) !important;
}
.highlight-path .bt-name { color: #fff !important; font-weight: 700 !important; }
.highlight-path .bt-score { color: #fff !important; }

.wc-bracket-container:has(.highlight-path) .bracket-team:not(.highlight-path) {
    opacity: 0.3;
    filter: grayscale(0.85);
}

/* Ajustements mobile */
@media (max-width: 1024px) {
    .wc-bracket-container { justify-content: flex-start; }
}
@media (max-width: 600px) {
    .wc-round { width: 185px; }
    .wc-center { width: 220px; padding: 0 0.8rem; }
    .wc-trophy { font-size: 3.5rem; }
}

.mt-3 { margin-top: 1.5rem; }


/* Style pour les matchs à droite (Score à gauche du nom) */
.match-right .bracket-team {
    flex-direction: row; /* Score puis Nom */
    justify-content: flex-start;
    text-align: left;
}

.match-right .bt-score {
    border-right: 1px solid rgba(255,255,255,0.1);
    border-left: none;
    margin-right: 10px;
    margin-left: 0;
    padding-right: 8px;
    padding-left: 0;
}

.match-right .bt-name {
    order: 2;
}

/* --- Bouton CTA Accueil Ultra-Visible --- */
.bracket-cta-card {
    position: relative;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border: 1px solid rgba(220, 20, 60, 0.3);
    border-left: 5px solid var(--primary);
    border-radius: 15px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Effet de reflet qui passe sur le bouton */
.cta-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transform: skewX(-25deg);
    animation: shine 4s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    20% { left: 150%; }
    100% { left: 150%; }
}

.bracket-cta-card:hover {
    transform: scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 0 30px rgba(220, 20, 60, 0.4);
    background: linear-gradient(135deg, #222 0%, #333 100%);
}

.cta-icon-box {
    font-size: 3.5rem;
    color: var(--primary);
    filter: drop-shadow(0 0 10px rgba(220, 20, 60, 0.5));
    animation: pulse-gold 2s infinite;
}

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

.cta-btn {
    background: var(--primary);
    box-shadow: 0 4px 15px rgba(220, 20, 60, 0.4);
    transition: all 0.3s;
}

.bracket-cta-card:hover .cta-btn {
    padding: 0.7rem 2rem;
    background: var(--white);
    color: var(--primary);
}

/* --- Effet de surbrillance du parcours (Tableau) --- */
.bracket-team {
    transition: all 0.2s ease;
}

.highlight-path {
    background-color: var(--primary) !important;
    color: white !important;
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 0 15px var(--primary);
}

.highlight-path .bt-name, 
.highlight-path .bt-score {
    color: white !important;
    font-weight: bold;
}

/* Optionnel : assombrir les autres quand on survole */
.wc-bracket-container:has(.highlight-path) .bracket-team:not(.highlight-path) {
    opacity: 0.4;
    filter: grayscale(0.8);
}
/* ============================================
   PRÉDICTIONS TABLEAU FINAL - PAGE ACCUEIL
   ============================================ */
.home-predictions-section {
    margin: 3rem 0 2rem;
    background: rgba(26, 26, 26, 0.85);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(220, 20, 60, 0.25);
    backdrop-filter: blur(6px);
}
.pred-subtitle {
    text-align: center;
    color: var(--gray);
    font-size: 0.82rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    margin-top: -0.75rem;
}
.pred-phase-block { margin-bottom: 2rem; }
.pred-phase-block:last-of-type { margin-bottom: 0; }
.pred-phase-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(220, 20, 60, 0.2);
    padding-bottom: 0.5rem;
}
.pred-matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.pred-match-card {
    background: var(--dark);
    border-radius: 12px;
    padding: 1.1rem 1.1rem 0.9rem;
    border: 1px solid rgba(255,255,255,0.07);
    transition: border-color 0.25s ease, transform 0.25s ease;
}
.pred-match-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.pred-teams-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.9rem; }
.pred-team { flex: 1; text-align: center; min-width: 0; }
.pred-team-name { font-size: 0.87rem; font-weight: 700; color: var(--light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 0.2rem; }
.pred-team.pred-favori .pred-team-name { color: var(--accent); }
.pred-team-players { font-size: 0.69rem; color: var(--gray); line-height: 1.4; }
.pred-team-elo { font-size: 0.67rem; color: rgba(255,255,255,0.28); margin-top: 0.15rem; }
.pred-vs { font-size: 0.7rem; font-weight: 900; color: var(--primary); letter-spacing: 1px; flex-shrink: 0; }
.pred-bar-container { display: flex; align-items: center; gap: 0.5rem; }
.pred-bar { flex: 1; height: 7px; border-radius: 4px; overflow: hidden; display: flex; background: rgba(255,255,255,0.05); }
.pred-bar-fill { height: 100%; transition: width 0.7s ease; }
.pred-bar-eq1 { background: linear-gradient(90deg, var(--primary), #e8396b); }
.pred-bar-eq2 { background: linear-gradient(90deg, #3a7bd5, var(--secondary)); }
.pred-pct { font-size: 0.7rem; font-weight: 700; color: var(--gray); min-width: 36px; }
.pred-pct-left { text-align: right; }
.pred-pct-right { text-align: left; }
.pred-pct.pred-pct-favori { color: var(--accent); }
.pred-more-link { text-align: center; margin-top: 1.5rem; color: var(--primary); font-size: 0.87rem; font-weight: 600; cursor: pointer; letter-spacing: 0.5px; transition: color 0.2s; }
.pred-more-link:hover { color: var(--accent); text-decoration: underline; }

/* ============================================================
   MOBILE COMPACT — priorité max
   ============================================================ */
@media (max-width: 768px) {

  /* === NAVIGATION === */
  .nav-container { padding: 0.35rem 0.75rem !important; gap: 0.3rem !important; }
  .logo { margin-bottom: 0.2rem !important; }
  .logo img { height: 32px !important; }
  .logo-main { font-size: 1.4rem !important; letter-spacing: 1px !important; }
  .logo-sub { font-size: 0.55rem !important; letter-spacing: 0.8px !important; }
  .nav-links { gap: 0.2rem !important; padding-bottom: 4px !important; }
  .nav-link { font-size: 0.65rem !important; padding: 0.3rem 0.55rem !important; letter-spacing: 0.3px !important; }
  .live-indicator { font-size: 0.55rem !important; }

  /* === HERO === */
  .hero { padding: 1.25rem 0.75rem 1.5rem !important; min-height: auto !important; }
  .hero-content { margin-bottom: 1.25rem !important; }
  .hero-title { font-size: 1.6rem !important; gap: 0.3rem !important; flex-direction: column !important; margin-bottom: 0.5rem !important; }
  .hero-highlight { font-size: 1.8rem !important; }
  .hero-subtitle { font-size: 0.82rem !important; }
  .hero-stats { grid-template-columns: repeat(3, 1fr) !important; gap: 0.5rem !important; margin-top: 1rem !important; }
  .stat-card { padding: 0.65rem 0.4rem !important; flex-direction: column !important; align-items: center !important; text-align: center !important; }
  .stat-number { font-size: 1.5rem !important; margin-bottom: 0 !important; }
  .stat-label { font-size: 0.6rem !important; }

  /* === TITRES === */
  .section-title { font-size: 1.1rem !important; margin: 1.2rem 0 0.8rem !important; }
  .page-title { font-size: 1.5rem !important; margin-bottom: 0.8rem !important; }
  .page-subtitle { font-size: 0.8rem !important; margin-bottom: 0.75rem !important; }
  .container { padding: 0.75rem 0.5rem 2rem !important; }

  /* === TOP PLAYERS — 2 colonnes, vertical, stats lisibles === */
  .top-players-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.6rem !important;
    margin-bottom: 1.5rem !important;
  }
  .player-card {
    padding: 0.85rem 0.65rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 0 !important;
  }
  .player-card::before { display: none !important; }
  .player-card-top {
    flex-direction: column !important;
    align-items: center !important;
    margin-bottom: 0.5rem !important;
    gap: 0.25rem !important;
  }
  .player-photo-wrapper {
    width: 54px !important;
    height: 54px !important;
    margin-bottom: 0.25rem !important;
  }
  .player-photo-circle { width: 54px !important; height: 54px !important; }
  .player-medal { width: 18px !important; height: 18px !important; font-size: 0.6rem !important; }
  .player-rank { font-size: 1rem !important; }
  .player-name { font-size: 0.8rem !important; text-align: center !important; }
  /* Stats : 2x2 bien lisibles */
  .player-header { flex-direction: column !important; align-items: center !important; margin-bottom: 0.4rem !important; }
  .player-stats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.3rem !important;
    width: 100% !important;
  }
  .player-stat { padding: 0.3rem 0.25rem !important; }
  .player-stat-value { font-size: 1rem !important; }
  .player-stat-label { font-size: 0.55rem !important; }
  .player-record { font-size: 0.65rem !important; }
  .forme-recent { gap: 3px !important; margin-top: 3px !important; flex-wrap: nowrap !important; justify-content: center !important; }
  .forme-dot { width: 8px !important; height: 8px !important; }

  /* === CARTES JOUEURS page Joueurs === */
  .players-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 0.6rem !important; }
  .player-card-photo img { width: 50px !important; height: 50px !important; }

  /* === HOME DYNAMIC GRID === */
  .home-dynamic-grid { grid-template-columns: 1fr !important; gap: 0.7rem !important; margin: 1rem 0 !important; }
  .dynamic-card { padding: 1rem 0.9rem !important; }
  .dynamic-card h3 { font-size: 0.8rem !important; margin-bottom: 0.75rem !important; }
  .podium { gap: 0.5rem !important; }
  .podium-item { padding: 0.6rem 0.4rem !important; }
  .podium-trophy { font-size: 1.2rem !important; }
  .podium-rank { font-size: 0.7rem !important; }
  .podium-name { font-size: 0.75rem !important; }
  .podium-elo { font-size: 0.75rem !important; }
  .progression-player { font-size: 0.9rem !important; }
  .progression-value { font-size: 1.3rem !important; }
  .forme-player { font-size: 0.9rem !important; }
  .forme-stats { font-size: 0.75rem !important; }
  .match-players-home { gap: 0.4rem !important; }
  .match-player-home { font-size: 0.8rem !important; padding: 0.4rem !important; }
  .match-score-home { font-size: 1.1rem !important; }
  .match-vs-home { font-size: 0.7rem !important; }
  .match-info-home { font-size: 0.65rem !important; margin-top: 0.5rem !important; }

  /* === DERNIERS MATCHS === */
  .recent-matches { gap: 0.6rem !important; }
  .match-card { padding: 0.75rem !important; }
  .match-score { font-size: 1.4rem !important; padding: 0.4rem !important; }
  .score-number { font-size: 1.2rem !important; }
  .match-badge { font-size: 0.6rem !important; padding: 2px 7px !important; }
  .match-team-name { font-size: 0.82rem !important; }
  .match-players { font-size: 0.65rem !important; }
  .match-date { font-size: 0.6rem !important; }

  /* === CLASSEMENT === */
  .ranking-table th { padding: 0.5rem 0.35rem !important; font-size: 0.65rem !important; }
  .ranking-table td { padding: 0.5rem 0.35rem !important; font-size: 0.78rem !important; }
  .rank-cell { font-size: 1rem !important; }
  .classement-photo { width: 24px !important; height: 24px !important; }
  .classement-name-with-photo { gap: 0.35rem !important; }

  /* === CNF3 === */
  .cnf3-tabs { gap: 0.3rem !important; flex-wrap: wrap !important; }
  .cnf3-tab { font-size: 0.7rem !important; padding: 0.4rem 0.7rem !important; flex: 1 1 auto !important; }
  .poule-card { padding: 0.75rem !important; }
  .poule-header h3 { font-size: 0.9rem !important; }
  .poule-equipe-nom { font-size: 0.8rem !important; }
  .poule-equipe-joueurs { font-size: 0.65rem !important; }
  .team-card { padding: 0.75rem !important; }
  .team-name { font-size: 0.9rem !important; }

  /* === LIVE === */
  .live-match-card { padding: 0.75rem !important; }
  .filter-btn { font-size: 0.7rem !important; padding: 0.4rem 0.7rem !important; }

  /* === PRÉDICTIONS accueil === */
  .home-predictions-section { padding: 0.9rem !important; margin: 1rem 0 !important; }
  .pred-matches-grid { grid-template-columns: 1fr !important; gap: 0.6rem !important; }
  .pred-match-card { padding: 0.75rem 0.75rem 0.6rem !important; }
  .pred-phase-title { font-size: 0.72rem !important; }
  .pred-team-name { font-size: 0.8rem !important; }
  .pred-team-players { display: none !important; }
  .pred-team-elo { font-size: 0.62rem !important; }
  .pred-pct { font-size: 0.68rem !important; }
  .pred-bar { height: 6px !important; }

  /* === FOOTER === */
  .site-footer { padding: 1.25rem 0.75rem !important; }
  .footer-container { grid-template-columns: 1fr !important; text-align: center !important; gap: 1rem !important; }
  .footer-bottom { font-size: 0.65rem !important; padding: 0.75rem !important; }

  /* === BRACKET TABLEAU FINAL ===
     Colonnes plus étroites + espacement correct pour éviter l'enchevêtrement des demis */
  .wc-round {
    width: 145px !important;
    padding: 0 4px !important;
  }
  .wc-center {
    width: 160px !important;
    padding: 0 0.5rem !important;
  }
  .wc-trophy { font-size: 2.5rem !important; margin-bottom: 0.6rem !important; }
  .bracket-round-label { font-size: 0.62rem !important; padding: 0.2rem 0.5rem !important; margin-bottom: 0.5rem !important; }
  .bracket-match { border-radius: 7px !important; }
  .bracket-team { padding: 0.38rem 0.45rem !important; gap: 0.25rem !important; }
  .bt-name { font-size: 0.58rem !important; }
  .bt-score { font-size: 0.78rem !important; min-width: 18px !important; padding: 1px 3px !important; }
  .bt-seed { font-size: 0.5rem !important; min-width: 13px !important; height: 13px !important; }
  /* Forcer la hauteur du conteneur de matchs pour que space-around fonctionne bien */
  .wc-matches-column { gap: 5px !important; }
  .wc-bracket-container { padding: 1rem 0.5rem !important; gap: 0 !important; }
}

/* Très petits écrans */
@media (max-width: 380px) {
  .hero-stats { grid-template-columns: repeat(3, 1fr) !important; }
  .stat-number { font-size: 1.2rem !important; }
  .hero-title { font-size: 1.3rem !important; }
  .nav-link { font-size: 0.58rem !important; padding: 0.25rem 0.45rem !important; }
  .logo img { height: 26px !important; }
  .logo-main { font-size: 1.2rem !important; }
  .wc-round { width: 120px !important; }
  .wc-center { width: 130px !important; }
  .bt-name { font-size: 0.52rem !important; }
}