[data-bs-theme="dark"] .fm-card{
    background: #222;
    color: white;
}

[data-bs-theme="dark"] .table{
    --bs-table-bg: #222;
}

[data-bs-theme="dark"] .match-card{
    background-color: #25140a;
    color: white;
}

[data-bs-theme="dark"] .stat-item{
    background-color: #25140a;
}

[data-bs-theme="dark"] .stat-name{
    color: white;
}

[data-bs-theme="dark"] .stat-item:hover .stat-name{
    color: black;
}

[data-bs-theme="dark"] .carousel-btn{
    background: #25140a;
    color: white;
}

[data-bs-theme="dark"] .round-title{
    color: white;
}

[data-bs-theme="dark"] .match-link{
    color: white !important;
} 



.qual-bar{
    width:4px;
    height:18px;
    display:flex;
    margin-right:8px;
    vertical-align:middle;
    border-radius:2px;
}

.match-link{
    text-decoration: none !important; 
    color: black !important;
} 

.stat-name{
    font-weight: 400;
}

.equipe-header { 
    background: var(--primary-gradient); 
    padding: 2.5rem 0; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
}
.fm-card { 
    background: white; 
    border-radius: 12px; 
    padding: 1.5rem; 
    margin-bottom: 1.5rem; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
    border: 1px solid #eee; 
}
.nav-pills .nav-link { 
    color: #64748b; 
    font-weight: 600; 
    transition: 0.3s; 
}
.nav-pills .nav-link.active { 
    background-color: #D0662A; 
    color: white !important; 
}
.match-row { 
    border-bottom: 1px solid #f1f5f9; 
    padding: 0.8rem 0; 
}
.score-badge { 
    min-width: 45px; 
    font-weight: bold; 
}
.bracket-match { 
    border: 2px solid #e2e8f0; 
    border-radius: 8px; 
    padding: 1rem; 
    background: #fff; 
}

[data-bs-theme="dark"] .bracket-match { 
    background: #25140a; 
}

#fixtures {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden; /* Coupe tout ce qui dépasse horizontalement */
}

.active{
    color: black !important;
}

/* Carousel */
.fixtures-carousel {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    border-radius: 12px;
    background-color: rgba(208, 102, 42, 0.3)
;
}

.carousel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 2px solid #ddd;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    transition: 0.3s;
    color: #D0662A;
    flex-shrink: 0;
}

.carousel-btn:hover {
    background-color: #D0662A ;
    border-color: transparent;
    color: white;
    transform: scale(1.1);
}

.carousel-wrapper {
    flex: 1;
    overflow: hidden;
    border-radius: 8px;
}

.carousel-track {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #D0662A #f0f0f0;
}

/* Matchs */
.match-card {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem;
    background: white;
    transition: 0.3s;
}

.match-card:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
    border-color: #D0662A;
}

.match-content {
    display: grid;
    grid-template-columns: 1fr 120px 1fr;
    align-items: center;
    gap: 1rem;
}

.match-home, .match-away {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.match-away {
    justify-content: flex-end;
}

.match-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.score-display {
    font-size: 1.5rem;
    color: #D0662A;
    min-width: 60px;
    text-align: center;
}

.match-datetime {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
    min-width: 70px;
    text-align: center;
    white-space: nowrap;
}

.round-title {
    border-bottom: 3px solid #D0662A;
    padding-bottom: 0.5rem;
    margin: 2rem 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
}

/* Stats */
.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 3px solid #D0662A;
    transition: 0.3s;
}

.stat-item:hover {
    transform: translateX(4px);
}

.stat-rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: #D0662A;
    color: white;
    border-radius: 50%;
    font-weight: 700;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-name {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stat-team {
    font-size: 0.8rem;
    color: #999;
    margin-top: 2px;
}

.stat-value {
    color: #D0662A;
    font-size: 1.1rem;
    flex-shrink: 0;
    min-width: 45px;
    text-align: right;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.badge{
    background-color: #D0662A;
}

/*---------------------------------------------------------------------------------*/

.face-badge { 
    width: 160px; 
    height: 160px; 
    background: white; 
    border-radius: 24px; 
    padding: 20px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}
.face-badge:hover { transform: translateY(-5px) scale(1.05); }
.face-badge img { max-width: 100%; filter: drop-shadow(0 5px 15px rgba(0,0,0,0.2)); }

.container {
    display: flex;
}

.stat-box {
    text-align-last: center;
    background: #f8f9fa;
    border-radius: 10px;
}
@media (max-width: 360px) {
    .stat-label{
        font-size: 0.6rem;
    }
}

@media (max-width: 600px) {
    .stat-item {
        display: block;
    }

    .face-badge {
        width: 80px;
        height: 80px;
        align-self: center;

    }

    .header-info{
        padding: 0 0 !important;
    }
}

/* Activer les container queries */
.table-responsive {
    container-type: inline-size;
    container-name: rankingTable;
}

/* ========= PAR DÉFAUT : PETIT ========= */
/* qual, #, logo, pts */
.tb2 th:nth-child(3),
.tb2 td:nth-child(3),
.tb2 th:nth-child(4),
.tb2 td:nth-child(4),
.tb2 th:nth-child(5),
.tb2 td:nth-child(5) {
    display: none;
}

.tb2 th:nth-child(5),
.tb2 td:nth-child(5) {
    display: table-cell;
}

/* cacher le NOM (span) */
.tb2 th:nth-child(2) small,
.tb2 td:nth-child(2) small, 
.tb th:nth-child(2) small,
.tb td:nth-child(2) small {
    display: none;
}

/* ========= MOYEN (>= 400px) ========= */
/* qual,#, logo, MJ, V, N, D, pts */
@container rankingTable (min-width: 400px) {
    .tb2 th:nth-child(5),
    .tb2 td:nth-child(5){
        display: table-cell;
    }
}

/* ========= GRAND (>= 600px) ========= */
/* ajouter NOM */
@container rankingTable (min-width: 600px) {
    .tb2 th:nth-child(4),
    .tb2 td:nth-child(4){
        display: table-cell;
    }

    .tb2 th:nth-child(2) small,
    .tb2 td:nth-child(2) small, 
    .tb th:nth-child(2) small,
    .tb td:nth-child(2) small {
        display: inline;
    }
}

/* ========= PLUS GRAND (>= 750px) ========= */
/* ajouter + / - */
@container rankingTable (min-width: 750px) {
    .tb2 th:nth-child(3),
    .tb2 td:nth-child(3) {
        display: table-cell;
    }
}

@supports not (container-type: inline-size) {

    /* 1. ÉTAT PAR DÉFAUT (Mobile < 400px) */
    .tb2 th:nth-child(n+4), 
    .tb2 td:nth-child(n+4),
    .tb2 th:nth-child(2) small,
    .tb2 td:nth-child(2) small, 
    .tb th:nth-child(2) small,
    .tb td:nth-child(2) small {
        display: none;
    }

    /* 2. MOYEN (400px à 599px) : Affiche MJ, V, N, D */
    @media (min-width: 400px) {
        .tb2 th:nth-child(4), .tb2 td:nth-child(4),
        .tb2 th:nth-child(5), .tb2 td:nth-child(5),
        .tb2 th:nth-child(6), .tb2 td:nth-child(6),
        .tb2 th:nth-child(7), .tb2 td:nth-child(7) {
            display: table-cell;
        }
    }

    /* 3. GRAND (600px à 749px) : Affiche le texte complet (span) */
    @media (min-width: 600px) {
        .tb2 th:nth-child(2) small,
        .tb2 td:nth-child(2) small, 
        .tb th:nth-child(2) small,
        .tb td:nth-child(2) small {
            display: inline;
        }
    }

    /* 4. TRÈS GRAND (750px à 899px) : Affiche la colonne 8 (ex: Buts) */
    @media (min-width: 750px) {
        .tb2 th:nth-child(8),
        .tb2 td:nth-child(8) {
            display: table-cell;
        }
    }

    /* 5. LARGE (>= 900px) : Affiche la colonne 9 (ex: Points) */
    @media (min-width: 900px) {
        .tb2 th:nth-child(9),
        .tb2 td:nth-child(9) {
            display: table-cell;
        }
    }
}

.player-header { 
    background: var(--primary-gradient); 
    padding: 2.5rem 0; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); 
}

.player-avatar { 
    width: 150px; 
    height: 150px; 
    border-radius: 50%; 
    background: #f0f0f0; 
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.info-section { background: white; padding: 20px; margin-bottom: 20px; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.info-item { padding: 12px 0; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; }
.info-item:last-child { border-bottom: none; }
.stat-box { background: white; padding: 20px; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); text-align: center; margin-bottom: 15px; text-align: center; }
.stat-value { font-size: 2rem; font-weight: bold; color: #333; }
.stat-label { font-size: 0.75rem; color: #6c757d; text-transform: uppercase; margin-top: 5px; }
.match-row { background: white; padding: 15px; margin-bottom: 10px; border-radius: 6px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.position-badge { 
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    margin: 3px;
}
.position-primary { background: #D0662A; color: white; }
.position-secondary { background: #f0f0f0; color: #333; }
.trophy-item {padding: 12px;}
.progress-bar-custom { height: 8px; background: #e9ecef; border-radius: 10px; overflow: hidden; }
.progress-fill { height: 100%; background: linear-gradient(90deg, #D0662A, #ff8c42); transition: width 0.6s ease; }
.table-stats { background: white; }
.table-stats thead { background: #f8f9fa; }
.rating-badge { background: #28a745; color: white; padding: 4px 10px; border-radius: 12px; font-size: 0.875rem; font-weight: 600; }
.section-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid #D0662A; }

.injury-alert{
    background: #fff5f5; 
    border-left: 4px solid #e53e3e; 
    padding: 15px; 
    border-radius: 8px; 
    margin-bottom: 20px;
}

[data-bs-theme="dark"] .injury-alert{
    background: #4d1515; 
}