/* ==========================================================
   Directeurs généraux et finances (Directeurs.php)
   Remplace CapCentral.php, Finance.php et TeamsAndGMInfo.php
   ========================================================== */

.directeurs { display: grid; gap: 1.25rem; min-width: 0; }
.directeurs__entete { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.directeurs__entete .titre-section { margin-bottom: 0; }
.directeurs__tri { display: flex; align-items: center; gap: .5rem; font-weight: 600; color: var(--texte-2); }
.directeurs__tri select {
    font: inherit;
    font-weight: 600;
    color: var(--texte);
    background: var(--surface);
    border: 1px solid var(--trait);
    border-radius: var(--rayon);
    padding: .45rem .6rem;
}
.directeurs__note { margin: 0; font-size: .85rem; }

/* ---------- Sommaire de la ligue ---------- */
.sommaire-ligue {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: .75rem;
    margin: 0;
}
.sommaire-ligue > div {
    padding: .75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--trait);
    border-radius: var(--rayon);
}
.sommaire-ligue dt { color: var(--texte-2); font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.sommaire-ligue dd { margin: .15rem 0 0; font-family: var(--police-titre); font-size: 1.6rem; font-weight: 800; }
.sommaire-ligue .est-alerte { border-color: var(--baisse); }
.sommaire-ligue .est-alerte dd { color: var(--baisse); }

/* ---------- Grille des équipes ---------- */
.directeurs__grille {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 30rem), 1fr));
    gap: 1.25rem;
}
.bloc-dg {
    display: grid;
    gap: 1rem;
    align-content: start;
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--trait);
    border-radius: var(--rayon);
    min-width: 0;
}

.bloc-dg__entete { display: flex; align-items: center; gap: .9rem; }
.bloc-dg__logo img { width: 56px; height: 56px; display: block; }
.bloc-dg__titre { min-width: 0; }
.bloc-dg__titre h2 { font-size: 1.6rem; line-height: 1.05; text-transform: uppercase; }
.bloc-dg__titre h2 a { color: var(--texte); }
.bloc-dg__titre h2 a:hover { color: var(--bleu); text-decoration: none; }
.bloc-dg__titre h2 span { color: var(--texte-2); }
.bloc-dg__titre p { margin: .15rem 0 0; font-size: .85rem; }

/* Direction */
.bloc-dg__direction {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem 1rem;
    margin: 0;
    padding: .75rem 0;
    border-top: 1px solid var(--trait);
    border-bottom: 1px solid var(--trait);
}
.bloc-dg__direction dt, .chiffres dt, .masse-ligne__titre {
    color: var(--texte-2);
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.bloc-dg__direction dd { margin: .1rem 0 0; overflow-wrap: anywhere; }
.bloc-dg__courriel { margin-left: .4rem; font-size: .85rem; font-weight: 600; }

/* Masse salariale */
.bloc-dg__masse { display: grid; gap: .45rem; }
.masse-ligne { display: flex; justify-content: space-between; align-items: baseline; gap: .75rem; }
.masse-ligne strong { font-family: var(--police-titre); font-size: 1.6rem; font-weight: 800; }
.masse-ligne--note { font-size: .85rem; color: var(--texte-2); }
.masse-ligne--note .est-positif { color: var(--monte); font-weight: 700; }
.masse-ligne--note .est-negatif { color: var(--baisse); font-weight: 700; }

.jauge { position: relative; height: 10px; border-radius: 5px; background: var(--surface-2); }
.jauge__remplie { position: absolute; inset: 0 auto 0 0; border-radius: 5px; background: var(--bleu); }
.jauge__remplie.est-depasse { background: var(--baisse); }
.jauge__plancher { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--texte-2); }

/* Chiffres (masse et finances) */
.chiffres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem 1rem; margin: 0; }
.chiffres dd { margin: .1rem 0 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.chiffres dd small { color: var(--texte-2); font-weight: 600; }
.chiffres__fort dd { font-family: var(--police-titre); font-size: 1.35rem; font-weight: 800; }
.chiffres .est-negatif { color: var(--baisse); }
.bloc-dg__finances { padding-top: .75rem; border-top: 1px solid var(--trait); }

/* Pied : chargement des lignes */
.bloc-dg__pied {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: .5rem 1rem;
    font-size: .85rem;
}
.bloc-dg__pied a { font-weight: 700; }
.charge { display: inline-flex; align-items: center; gap: .4rem; color: var(--texte-2); }
.charge::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; background: var(--texte-2); flex: none; }
.charge--ok::before { background: var(--monte); }
.charge--attention::before { background: var(--or); }
.charge--retard { color: var(--baisse); font-weight: 700; }
.charge--retard::before { background: var(--baisse); }

@media (max-width: 640px) {
    .bloc-dg { padding: 1rem; }
    .bloc-dg__titre h2 { font-size: 1.35rem; }
    .directeurs__tri, .directeurs__tri select { width: 100%; }
}
@media (max-width: 640px) {
    .directeurs__tri { display: grid; gap: .25rem; }
}
