/* ==========================================================
   Blocs de la ligue partagés (layout/blocs-ligue.php) : tendances, trois étoiles, listes de joueurs
   Accueil, Meneurs (IndividualLeaders.php), DG et finances (Directeurs.php)
   ========================================================== */

/* ---------- Tendances ---------- */
.tendances {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}
.tendance {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: .35rem;
    color: var(--texte);
    padding: 1rem .75rem 1.1rem;
    border-top: 3px solid var(--trait);
}
.tendance:hover { text-decoration: none; border-color: var(--bleu); }
.tendance--chaud { border-top-color: var(--ligne); }
.tendance--froid { border-top-color: var(--bleu); }

.tendance__titre {
    font-family: var(--police-titre);
    font-weight: 800;
    font-size: 1.35rem;
}
.tendance--chaud .tendance__titre { color: var(--rouge); }
.tendance--froid .tendance__titre { color: var(--bleu); }

.tendance__photo {
    width: 104px; height: 104px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-2);
    margin: .35rem 0;
}
.tendance__joueur {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-weight: 600;
    line-height: 1.2;
}
.tendance:hover .tendance__joueur { color: var(--bleu); }
.tendance__valeur {
    font-family: var(--police-titre);
    font-weight: 800;
    font-size: 3.2rem;
    line-height: 1;
    margin-top: .4rem;
}
.tendance__stat { color: var(--texte-2); font-size: .9rem; line-height: 1.2; }

.bloc__note { margin: -.5rem 0 .5rem; }

/* ---------- Trois étoiles ---------- */
.etoiles__periode {
    font-family: var(--police-texte);
    font-size: .85rem;
    font-weight: 700;
    color: var(--texte-2);
    margin: 1rem 0 .3rem;
}
.titre-bloc + .etoiles__periode { margin-top: 0; }
.etoiles { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.etoiles li { display: flex; align-items: center; gap: .6rem; }
.etoiles__pos {
    width: 1.6rem; height: 1.6rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--trait);
    font-weight: 700;
    font-size: .85rem;
    flex-shrink: 0;
}
.etoiles li:first-child .etoiles__pos { background: var(--or); border-color: var(--or); color: #2A221D; }
.etoiles__photo {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-2);
}
.etoiles__texte { display: grid; line-height: 1.25; min-width: 0; }
.etoiles__texte a,
.etoiles__texte strong { color: var(--texte); font-weight: 600; }
.etoiles__texte span { color: var(--texte-2); font-size: .85rem; }

/* ---------- Agents libres et anniversaires ---------- */
.liste-joueurs { list-style: none; margin: 0; padding: 0; }
.liste-joueurs li {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem 0;
    border-bottom: 1px solid var(--trait);
}
.liste-joueurs li:last-child { border-bottom: 0; }
.liste-joueurs__photo {
    width: 52px; height: 52px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-2);
    flex-shrink: 0;
}
.liste-joueurs__texte { display: grid; flex: 1; min-width: 0; line-height: 1.3; }
.liste-joueurs__texte a { color: var(--texte); font-weight: 600; }
.liste-joueurs__meta {
    display: flex;
    align-items: center;
    gap: .35rem;
    color: var(--texte-2);
    font-size: .9rem;
}
.liste-joueurs__salaire {
    font-family: var(--police-titre);
    font-weight: 800;
    font-size: 1.2rem;
    white-space: nowrap;
}

@media (max-width: 1180px) {
    .tendances { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Page Meneurs : les trois périodes d'étoiles côte à côte */
.etoiles-periodes { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); align-items: start; }
.etoiles-periodes .etoiles__periode:first-child { margin-top: 0; }
/* DG et finances : agents libres à venir, repliable */
.directeurs__agents { margin-bottom: 1rem; }
.directeurs__agents summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .7rem; }
.directeurs__agents summary .titre-bloc { margin: 0; }
.directeurs__agents[open] summary { margin-bottom: .6rem; }
.titre-avec-lien + .etoiles__periode { margin-top: 0; }
