/* ==========================================================
   Page Lignes d'une équipe (ProTeam-ligne.php)
   ========================================================== */

.lignes { display: grid; gap: 2rem; min-width: 0; }
.lignes__section { display: grid; gap: 1rem; scroll-margin-top: 1rem; min-width: 0; }
.lignes__section > .titre-section { justify-self: start; margin-bottom: 0; }
.lignes__sous-titre {
    font-size: 1rem;
    font-family: var(--police-texte);
    font-weight: 700;
    color: var(--texte-2);
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-top: .5rem;
}


/* Grilles de cartes */
.lignes__grille { display: grid; gap: 1rem; align-items: start; }
.lignes__grille--trios  { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
/* Défenseurs, gardiens, situations : trois cartes par rangée */
.lignes__grille--trois  { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lignes__grille--unites { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }

/* ---------- Une ligne ---------- */
.ligne { display: grid; gap: .9rem; }
.ligne__entete {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}
.ligne__titre { font-size: 1.2rem; }
.ligne__temps {
    font-family: var(--police-titre);
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--bleu);
    font-variant-numeric: tabular-nums;
}

.ligne__joueurs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: .75rem;
}
.ligne--compacte .ligne__joueurs { grid-auto-flow: row; grid-auto-columns: auto; gap: .4rem; }

.ligne__pied {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .4rem 1rem;
    padding-top: .65rem;
    border-top: 1px solid var(--trait);
    color: var(--texte-2);
    font-size: .85rem;
}
.ligne__pied strong { color: var(--texte); font-variant-numeric: tabular-nums; }
.ligne__strategie { display: inline-flex; flex-wrap: wrap; gap: .35rem; }
.ligne__strategie span {
    padding: 0 .4rem;
    border: 1px solid var(--trait);
    border-radius: 3px;
    font-size: .75rem;
    font-weight: 700;
}

/* ---------- Un joueur ---------- */
.joueur {
    display: grid;
    justify-items: center;
    gap: .4rem;
    text-align: center;
    color: var(--texte);
    min-width: 0;
}
.joueur:hover { text-decoration: none; }
.joueur:hover .joueur__nom { color: var(--bleu); }
.joueur__photo {
    width: 88px; height: 88px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-2);
    border: 2px solid var(--trait);
}
.joueur__texte { display: grid; gap: .05rem; min-width: 0; line-height: 1.2; }
.joueur__role {
    color: var(--bleu);
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.joueur__nom { font-size: .95rem; overflow-wrap: anywhere; }
.joueur__salaire { color: var(--texte-2); font-size: .8rem; font-variant-numeric: tabular-nums; }

/* Version compacte : photo à gauche, sur une ligne */
.joueur--compact {
    grid-template-columns: 40px minmax(0, 1fr);
    justify-items: start;
    align-items: center;
    text-align: left;
    gap: .6rem;
}
.joueur--compact .joueur__photo { width: 40px; height: 40px; border-width: 1px; }
.joueur--compact .joueur__texte { grid-auto-flow: column; justify-content: start; align-items: baseline; gap: .5rem; }
.joueur--compact .joueur__role { min-width: 1.7rem; }
.joueur--compact .joueur__nom { font-size: .92rem; }

/* Listes ordonnées : fusillade, prolongation */
.ordre { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; counter-reset: ordre; }
.ordre li {
    display: grid;
    grid-template-columns: 1.4rem minmax(0, 1fr);
    align-items: center;
    gap: .4rem;
    counter-increment: ordre;
}
.ordre li::before {
    content: counter(ordre);
    color: var(--texte-2);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

@media (max-width: 640px) {
    .joueur__photo { width: 64px; height: 64px; }
    .joueur__nom { font-size: .85rem; }
    .ligne__joueurs { gap: .5rem; }
}
@media (max-width: 960px) {
    .lignes__grille--trois { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .lignes__grille--trois { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Forces égales : feuille de match (colonnes AG / C / AD, une rangée par ligne) ---------- */
.feuille {
    display: grid;
    background: var(--surface);
    border: 1px solid var(--trait);
    border-radius: var(--rayon);
    overflow: hidden;
}
.feuille__colonnes {
    display: grid;
    grid-template-columns: repeat(var(--colonnes), minmax(0, 1fr));
    padding: .75rem 1rem;
    border-bottom: 2px solid var(--texte);
    color: var(--texte);
    font-weight: 800;
    font-size: .8rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-align: center;
}
.rangee { display: grid; gap: .6rem; padding: .9rem 1rem 1rem; border-bottom: 1px solid var(--trait); }
.rangee:last-child { border-bottom: 0; }
.rangee__bande { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.rangee__titre {
    padding: .3rem .8rem;
    border-radius: var(--rayon);
    background: var(--orange-brule);
    color: var(--fond); /* fond de page sur orange brûlé : 5,5:1 en sombre, 5,2:1 en crème */
    font-weight: 800;
    font-size: .9rem;
}
.rangee__pastille {
    padding: .3rem .75rem;
    border-radius: var(--rayon);
    background: var(--surface-2);
    color: var(--texte-2);
    font-size: .88rem;
    font-variant-numeric: tabular-nums;
}
.rangee__pastille strong { color: var(--texte); }
.rangee__sep { opacity: .5; margin: 0 .2rem; }
.rangee__joueurs { display: grid; grid-template-columns: repeat(var(--colonnes), minmax(0, 1fr)); gap: 1rem; }

/* Un joueur : photo, nom, positions, stats simulées */
.joueur-large {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    align-items: center;
    gap: .85rem;
    color: var(--texte);
    min-width: 0;
}
a.joueur-large:hover { text-decoration: none; }
a.joueur-large:hover .joueur-large__nom { color: var(--bleu); }
.joueur-large__photo {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--surface-2);
}
.joueur-large__texte { display: grid; gap: .1rem; line-height: 1.25; min-width: 0; }
.joueur-large__role { color: var(--bleu); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.joueur-large__nom { font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.joueur-large__pos { color: var(--texte-2); font-size: .85rem; font-weight: 600; }
.joueur-large__stats { font-size: .85rem; font-variant-numeric: tabular-nums; }
.joueur-large--vide { opacity: .55; }
.joueur-large--vide .joueur-large__photo { border: 2px dashed var(--trait); background: none; }

/* ---------- Haut de page : pastilles et lien vers l'éditeur ---------- */
.lignes__haut { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.lien-editeur {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    padding: .5rem .9rem;
    border: 1px solid var(--accent-fond);
    border-radius: var(--rayon);
    background: var(--surface);
    color: var(--texte);
}
.lien-editeur:hover { background: var(--surface-2); text-decoration: none; }
.lien-editeur__icone {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--accent-fond);
    color: var(--accent-texte);
    font-weight: 800;
    flex: none;
}
.lien-editeur__texte { display: grid; line-height: 1.25; }
.lien-editeur__texte span { color: var(--texte-2); font-size: .78rem; }

@media (max-width: 960px) {
    .joueur-large { grid-template-columns: 56px minmax(0, 1fr); gap: .6rem; }
    .joueur-large__photo { width: 56px; height: 56px; }
    .joueur-large__nom { font-size: 1rem; white-space: normal; }
}
@media (max-width: 640px) {
    /* Cellulaire : les joueurs d'une ligne s'empilent, l'en-tête des colonnes disparaît */
    .feuille__colonnes { display: none; }
    .rangee__joueurs { grid-template-columns: minmax(0, 1fr); gap: .6rem; }
    .lien-editeur { width: 100%; }
}
