/* ==========================================================
   Page Calendrier d'une équipe (ProTeam-calendrier.php)
   ========================================================== */

.calendrier-page { display: grid; gap: 1.25rem; }

/* ---------- Résumé : fiches et matchs restants ---------- */
.resume {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .75rem;
}
.resume__case { display: grid; align-content: start; gap: .1rem; }
.resume__case dt {
    color: var(--texte-2);
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.resume__case dd {
    margin: 0;
    font-family: var(--police-titre);
    font-weight: 800;
    font-size: 2rem;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}
.resume__case dd.resume__note {
    font-family: var(--police-texte);
    font-weight: 400;
    font-size: .85rem;
    color: var(--texte-2);
}

.filtres__prochain { margin-left: auto; font-weight: 600; font-size: .9rem; }

/* ---------- Liste des matchs ---------- */
.calendrier {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
}
.partie {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr) 11rem 5rem 6rem;
    align-items: center;
    gap: 1rem;
    padding: .6rem 1rem;
    border-bottom: 1px solid var(--trait);
    scroll-margin-top: 1rem;
}
.partie:last-child { border-bottom: 0; }
.partie[hidden], .calendrier__limite[hidden] { display: none; }
.partie:hover { background: var(--surface-2); }

.partie__jour {
    font-family: var(--police-titre);
    font-weight: 800;
    font-size: 1.15rem;
    font-variant-numeric: tabular-nums;
}
.partie__jour-mot {
    font-family: var(--police-texte);
    font-weight: 600;
    font-size: .8rem;
    color: var(--texte-2);
    text-transform: uppercase;
}

.partie__adversaire {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--texte);
    min-width: 0;
}
.partie__adversaire:hover { text-decoration: none; }
.partie__adversaire:hover strong { color: var(--bleu); }
.partie__adversaire img { width: 36px; height: 36px; flex: none; }
.partie__lieu {
    width: 1.6rem;
    flex: none;
    color: var(--texte-2);
    font-weight: 700;
    text-align: center;
}
.partie__nom { display: grid; min-width: 0; line-height: 1.2; }
.partie__nom strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.partie__abbr { color: var(--texte-2); font-size: .85rem; }

.partie__resultat {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-variant-numeric: tabular-nums;
}
.partie__score { font-weight: 700; font-size: 1.05rem; }
.partie__mention { color: var(--texte-2); font-size: .8rem; font-weight: 600; }
.partie__resultat--a-venir { display: grid; gap: .1rem; }
.partie__arena { color: var(--texte-2); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.partie__fiche { color: var(--texte-2); font-size: .9rem; font-variant-numeric: tabular-nums; }
.partie__lien { text-align: right; font-size: .9rem; font-weight: 600; }

/* Prochain match */
.partie.est-prochain {
    background: var(--surface-2);
    box-shadow: inset 4px 0 0 var(--bleu);
}
.partie__etiquette {
    color: var(--bleu);
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

/* Date limite des échanges */
.calendrier__limite {
    padding: .45rem 1rem;
    border-top: 2px solid var(--rouge);
    border-bottom: 1px solid var(--trait);
    color: var(--rouge);
    font-size: .8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.calendrier__vide { margin: 0; }

/* ---------- Adaptation aux écrans ---------- */
@media (max-width: 960px) {
    .resume { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .partie {
        grid-template-columns: 3.2rem minmax(0, 1fr) auto;
        grid-template-areas:
            "jour adv resultat"
            "jour adv lien";
        row-gap: .15rem;
        column-gap: .75rem;
        padding: .6rem .75rem;
    }
    .partie__jour { grid-area: jour; display: grid; line-height: 1.1; }
    .partie__adversaire { grid-area: adv; }
    .partie__resultat { grid-area: resultat; justify-self: end; }
    .partie__lien { grid-area: lien; }
    .partie__fiche { display: none; }
    .partie__adversaire img { width: 30px; height: 30px; }
    .partie__arena { display: none; }
    .filtres__prochain { margin-left: 0; }
}
