/* =========================
   Tableau (Compétition par Équipe)
   ========================= */
.titre_Tableau {
    font-size: 2em;
    font-family: 'Montserrat', sans-serif;
    margin-bottom: 10px;
    color: #062449;
    text-align: center;
}

/* Onglets */
.tabs-equipes {
    margin: 0;
    border-bottom: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    overflow: visible;
    padding-left: 10px;
}

.tabs-equipes [role="tab"] {
    font: 600 0.95rem/1 "Montserrat", system-ui, sans-serif;
    padding: 10px 16px;
    border: none;
    background: #f5f6f8;
    color: #111827;
    position: relative;
    top: 2px;
    cursor: pointer;
    text-align: center;
}

.tabs-equipes [role="tab"]:hover {
    background: #eef0f3;
}

.tabs-equipes [role="tab"]:focus-visible {
    outline: 2px solid #4c9ffe;
    outline-offset: 2px;
}

.tabs-equipes [role="tab"][aria-selected="true"] {
    background: #1d94e9;
    color: #fff;
    z-index: 2;
}

/* Cadre contenu */
.tab-pane {
    margin: 0;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Table de base */
.tableau table {
    width: 100%;
    min-width: 700px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    padding-left: 10px;
}

.tableau th {
    font-family: "Montserrat", sans-serif;
}

.tableau td {
    font-family: "Open Sans", sans-serif;
}

.tableau tr {
    border-bottom: 1px solid #efefef;
}

/* En-tête collant */
.tab-pane thead th {
    position: sticky;
    top: 0;
    background: #1d94e9;
    color: #fff;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    font-size: .85rem;
    z-index: 1;
}

/* Corps */
.tab-pane th,
.tab-pane td {
    padding: 12px 14px;
    text-align: center;
}

.tab-pane tbody tr:nth-child(odd) {
    background: #fff;
}

.tab-pane tbody tr:nth-child(even) {
    background: #f3f3f3;
}

.row-ours {
    background: #fdf8e0 !important;
}

/* Colonnes & styles spéciaux */
.col-team {
    min-width: 200px;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-badge {
    display: inline-block;
    line-height: 28px;
    padding: 0 8px;
    border-radius: 50%;
    background: #eef2ff;
    color: #1e3a8a;
    font-weight: 700;
}

.status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-weight: 800;
    font-size: .95rem;
    border: 1px solid transparent;
}

.status-yes {
    color: #0f5132;
    background: #d1fae5;
    border-color: #a7f3d0;
}

.status-no {
    color: #842029;
    background: #fee2e2;
    border-color: #fecaca;
}

/* Responsive */
@media (max-width: 640px) {
    .tabs-equipes {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 8px 16px 0;
    }

    .tabs-equipes [role="tab"] {
        flex: 0 0 auto;
        font-size: .92rem;
    }

    .tableau table {
        font-size: .9rem;
        min-width: 640px;
    }

    .tab-pane th,
    .tab-pane td {
        padding: 8px 10px;
    }
}

@media (min-width: 641px) and (max-width: 979.98px) {
    .tableau table {
        min-width: 700px;
    }
}