/* ==========================================================
   Page Statistiques d'une équipe (ProTeam-statistique.php)
   Les tableaux utilisent .tableau--equipe (css/equipe2026.css)
   ========================================================== */

.stats { display: grid; gap: 1.5rem; min-width: 0; }

.tableau--equipe .col-forte { color: var(--texte); font-weight: 800; }
.tableau--equipe .col-pos { color: var(--texte-2); }

/* ---------- Profil de l'équipe ---------- */
.profil { display: grid; gap: 1rem; margin-top: .5rem; }
.profil__entete {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .5rem 1.5rem;
}
.profil__entete .titre-section { margin-bottom: 0; }
.profil__legende { margin: 0; display: flex; gap: 1.25rem; font-size: .9rem; color: var(--texte-2); }

.legende { display: inline-flex; align-items: center; gap: .4rem; }
.legende::before {
    content: "";
    width: .9rem; height: .55rem;
    border-radius: 2px;
    background: currentColor;
}
.legende--equipe::before { background: var(--bleu); }
.legende--ligue::before  { background: var(--texte-2); }
.legende--off::before { background: var(--bleu); }
.legende--neu::before { background: var(--texte-2); }
.legende--def::before { background: var(--ligne); }

.profil__grille {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
    gap: 1rem;
    align-items: start;
}
.carte-stat { display: grid; gap: .85rem; }
.carte-stat__titre { font-size: 1.2rem; }

/* Une mesure : libellé, valeur de l'équipe, moyenne de la ligue, deux barres */
.mesure { display: grid; gap: .3rem; }
.mesure__texte {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 4.5rem;
    align-items: baseline;
    gap: .75rem;
    font-variant-numeric: tabular-nums;
}
.mesure__libelle { font-size: .9rem; }
.mesure__valeur { font-weight: 800; font-size: 1.05rem; text-align: right; }
.mesure__valeur.est-mieux::after { content: " ▲"; color: var(--monte); font-size: .7em; }
.mesure__valeur.est-pire::after  { content: " ▼"; color: var(--baisse); font-size: .7em; }
.mesure__ligue { color: var(--texte-2); font-size: .85rem; text-align: right; }

.mesure__barres { display: grid; gap: 3px; }
.mesure__barre { display: block; height: 6px; border-radius: 3px; min-width: 2px; }
.mesure__barre--equipe { background: var(--bleu); }
.mesure__barre--ligue  { background: var(--texte-2); height: 3px; }

/* Répartition par zone : barres empilées */
.repartition { display: grid; gap: .35rem; }
.repartition__titre { margin: 0; font-size: .9rem; font-weight: 600; }
.repartition__ligne {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    align-items: center;
    gap: .5rem;
}
.repartition__qui { color: var(--texte-2); font-size: .8rem; font-weight: 700; }
.repartition__barre {
    display: flex;
    height: 1.35rem;
    border-radius: 4px;
    overflow: hidden;
    background: var(--surface-2);
}
.repartition__part {
    display: grid;
    place-items: center;
    font-size: .72rem;
    font-weight: 700;
    color: var(--accent-texte);
    white-space: nowrap;
    overflow: hidden;
}
.repartition__part--off { background: var(--bleu); }
.repartition__part--neu { background: var(--texte-2); color: var(--fond); }
.repartition__part--def { background: var(--ligne); }
.repartition__legende { margin: 0; display: flex; flex-wrap: wrap; gap: 1rem; color: var(--texte-2); font-size: .8rem; }
.mesure--possession { padding-top: .6rem; border-top: 1px solid var(--trait); }

/* Domicile et étranger */
.domext th, .domext td { text-align: center; }
.domext tbody th { text-align: left; font-weight: 600; font-size: .9rem; }
.domext td { font-weight: 700; font-variant-numeric: tabular-nums; }
