/* ==========================================================
   Page Accueil d'une équipe (ProTeam-general.php)
   ========================================================== */

.equipe-accueil {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 2rem 1.75rem;
}
.equipe-accueil__principal { display: grid; gap: 2rem; align-content: start; min-width: 0; }
.equipe-accueil__cote      { display: grid; gap: 1rem; align-content: start; }

/* ---------- Dernier et prochain match ---------- */
.matchs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 1rem;
}
.match { display: grid; gap: .75rem; align-content: start; }
.match__entete {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
}
.match__titre { font-size: 1.2rem; }

.match__duel {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: .5rem;
}
.match__equipe {
    display: grid;
    justify-items: center;
    gap: .15rem;
    color: var(--texte-2);
    text-align: center;
    line-height: 1.2;
}
.match__equipe img { width: 56px; height: 56px; }
.match__equipe:hover { text-decoration: none; }
.match__equipe:hover .match__abbr { color: var(--bleu); }
.match__abbr {
    font-family: var(--police-titre);
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--texte);
}
.match__fiche { font-size: .85rem; font-variant-numeric: tabular-nums; }

.match__centre { display: grid; justify-items: center; gap: .15rem; text-align: center; }
.match__score {
    font-family: var(--police-titre);
    font-weight: 800;
    font-size: 2.6rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.match__score span[aria-hidden] { color: var(--texte-2); margin: 0 .2rem; }
.match__a {
    font-family: var(--police-titre);
    font-weight: 800;
    font-size: 1.8rem;
    color: var(--texte-2);
    line-height: 1;
}
.match__mention { color: var(--texte-2); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }

.match__pied {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: .6rem;
    border-top: 1px solid var(--trait);
    font-size: .9rem;
    font-weight: 600;
}

/* ---------- Face-à-face ---------- */
.face { margin-top: 1rem; padding: 1.25rem 1.5rem; }
.face__entete {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: .75rem;
    margin-bottom: .75rem;
}
.face__titre { font-family: var(--police-titre); font-weight: 700; font-size: 1.2rem; text-align: center; }
/* En-tête du bloc : « Prochain match », jour et aréna */
.face__prochain { padding-bottom: .75rem; margin-bottom: 1rem; border-bottom: 1px solid var(--trait); flex-wrap: wrap; }
.face__prochain .discret { text-align: right; }
.face__equipe {
    display: flex;
    align-items: center;
    gap: .6rem;
    min-width: 0;
    font-size: 1.05rem;
}
.face__equipe strong { font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.face__ville { color: var(--texte-2); }
.face__equipe--droite { justify-content: flex-end; text-align: right; }
.face__equipe img { flex: none; }

/* Une statistique : les deux valeurs en gros, le libellé au centre, la barre dessous */
.face__ligne {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: baseline;
    column-gap: .75rem;
    padding: .6rem 0;
}
.face__stat { color: var(--texte); font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; text-align: center; }
.face__valeur { font-family: var(--police-titre); font-variant-numeric: tabular-nums; font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.face__valeur--droite { text-align: right; }
.face__valeur.est-meilleur { color: var(--texte); }
.face__valeur:not(.est-meilleur) { color: var(--texte-2); }

/* Barre en deux morceaux arrondis : notre équipe (bleu), puis l'adversaire (sable) */
.face__barre {
    grid-column: 1 / -1;
    display: flex;
    gap: 6px;
    height: 8px;
    margin-top: .45rem;
}
.face__barre span { flex: none; min-width: 8px; max-width: calc(100% - 14px); border-radius: 4px; background: var(--bleu); }
.face__barre::after { content: ""; flex: 1; border-radius: 4px; background: var(--ligne); }
@media (max-width: 560px) {
    .face { padding: 1rem; }
    .face__ville { display: none; }
    .face__valeur { font-size: 1.35rem; }
    .face__stat { font-size: .74rem; }
}

/* ---------- Condition des joueurs (98 et moins) : jaune à surveiller, contour rouge à ménager, rouge plein blessé ---------- */
.condition { list-style: none; margin: 0; padding: 0; display: grid; }
.condition__joueur {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .75rem;
    padding: .55rem 0;
    border-bottom: 1px solid var(--trait);
}
.condition__joueur:last-child { border-bottom: 0; }
.condition__joueur img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.condition__texte { display: grid; gap: .1rem; line-height: 1.3; min-width: 0; }
.condition__texte a { font-weight: 700; color: var(--texte); }
.condition__texte a:hover { color: var(--bleu); }
.condition__detail { color: var(--texte-2); font-size: .85rem; }
.condition__etat { font-size: .85rem; font-weight: 700; color: var(--texte); }
.condition__joueur--blesse .condition__etat { color: var(--baisse); }
.condition__valeur {
    min-width: 2.6rem;
    padding: .15rem .4rem;
    border: 2px solid var(--or);
    border-radius: 999px;
    font-family: var(--police-titre);
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    color: var(--texte);
    font-variant-numeric: tabular-nums;
}
.condition__joueur--menager .condition__valeur { border-color: var(--baisse); }
.condition__joueur--blesse .condition__valeur { border-color: var(--baisse); background: var(--baisse); color: var(--surface); }

/* ---------- Meneurs de l'équipe ---------- */
.meneurs-equipe {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
    gap: 1.5rem 1.25rem;
}

/* ---------- Statistiques d'équipe ---------- */
.tuiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}
.tuile { display: grid; gap: .1rem; align-content: start; }
.tuile__titre { color: var(--texte-2); font-size: .85rem; font-weight: 600; line-height: 1.2; min-height: 2.1em; }
.tuile__valeur {
    font-family: var(--police-titre);
    font-weight: 800;
    font-size: 2.2rem;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.tuile__rang { font-size: .9rem; min-height: 1.35em; }
.tuile__rang strong { color: var(--bleu); }
.tuile__moyenne { color: var(--texte-2); font-size: .8rem; }

/* ---------- Colonne de côté ---------- */
.fiche-infos { margin: 0; display: grid; }
.fiche-infos div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: .45rem 0;
    border-bottom: 1px solid var(--trait);
}
.fiche-infos div:last-child { border-bottom: 0; }
.fiche-infos dt { color: var(--texte-2); font-size: .9rem; }
.fiche-infos dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.est-negatif { color: var(--baisse); }

.jauge {
    height: 10px;
    border-radius: 5px;
    background: var(--surface-2);
    overflow: hidden;
}
.jauge__rempli { display: block; height: 100%; background: var(--bleu); border-radius: 5px; }
.jauge__rempli.est-depasse { background: var(--baisse); }
.jauge__texte { margin: .4rem 0 .5rem; color: var(--texte-2); font-size: .9rem; }
.jauge__texte strong { color: var(--texte); }

.billets th[scope="row"] { text-align: left; font-weight: 600; }
.billets thead th:first-child { text-align: left; }
.billets td:last-child { width: 45%; }
.billets__pct { display: block; }
.billets__barre {
    display: block;
    height: 4px;
    margin-top: .2rem;
    border-radius: 2px;
    background: var(--surface-2);
    overflow: hidden;
}
.billets__barre span { display: block; height: 100%; background: var(--bleu); }

/* ---------- Adaptation aux écrans ---------- */
@media (max-width: 1180px) {
    .tuiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
    .equipe-accueil { grid-template-columns: minmax(0, 1fr); }
    .equipe-accueil__cote { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
}
@media (max-width: 420px) {
    .match__score { font-size: 2.1rem; }
    .tuile__valeur { font-size: 1.8rem; }
}

/* « Votre saison ressemble à… » (layout/sosies.php) */
.sosie { display: grid; gap: .6rem; padding: 1rem 1.1rem; border-left: 5px solid var(--bleu); }
.sosie--bon { border-left-color: var(--monte); }
.sosie--mauvais { border-left-color: var(--baisse); }
.sosie__sur { margin: 0; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--texte-2); }
.sosie__corps { display: flex; align-items: center; gap: 1rem; }
.sosie__corps img { flex: none; }
.sosie__corps p { margin: 0; }
.sosie__nom { font-family: var(--police-titre); font-size: 1.8rem; font-weight: 800; text-transform: uppercase; line-height: 1; }
.sosie__nom span { color: var(--texte-2); }
.sosie__detail { margin-top: .3rem !important; color: var(--texte-2); }
.sosie__detail strong { color: var(--texte); }
.sosie__fin { margin-top: .25rem !important; font-weight: 700; font-size: 1.05rem; }
.sosie__autres { margin: 0; font-size: .82rem; line-height: 1.45; }
