/* ==========================================================
   Champions de la Coupe Stanley (ChampionsStanleyCup.php)
   ========================================================== */

.champions { display: grid; gap: 1.5rem; min-width: 0; }
.champions > .titre-section { justify-self: start; margin-bottom: 0; }

/* ---------- Champion en titre ---------- */
.en-titre {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--trait);
    border-left: 6px solid var(--or);
    border-radius: var(--rayon);
}
.en-titre__logo { width: 150px; height: 150px; flex: none; }
.en-titre__texte { display: grid; gap: .35rem; min-width: 0; }
.en-titre__etiquette {
    margin: 0;
    color: var(--or);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .9rem;
}
.en-titre__nom {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    text-transform: uppercase;
    line-height: 1;
}
.en-titre__nom span { color: var(--texte-2); }
.en-titre__details { margin: .35rem 0 0; color: var(--texte-2); }
.en-titre__details strong { color: var(--texte); }
.en-titre__compte { margin: 0; font-weight: 700; }

/* ---------- Palmarès ---------- */
.champions__grille {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}
.palmares { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.palmares li {
    display: grid;
    grid-template-columns: minmax(0, 13rem) minmax(0, 1fr) 2rem;
    align-items: center;
    gap: .75rem;
    padding: .3rem 0;
    border-bottom: 1px solid var(--trait);
}
.palmares li:last-child { border-bottom: 0; }
.palmares__barre { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.palmares__barre span { display: block; height: 100%; background: var(--or); border-radius: 4px; }
.palmares--dg .palmares__barre span { background: var(--bleu); }
.palmares__nombre {
    font-family: var(--police-titre);
    font-weight: 800;
    font-size: 1.3rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.palmares__dg { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Équipe (actuelle ou disparue) */
.equipe-histo { display: inline-flex; align-items: center; gap: .5rem; color: var(--texte); min-width: 0; }
.equipe-histo:hover { text-decoration: none; }
.equipe-histo:hover strong { color: var(--bleu); }
.equipe-histo img { width: 28px; height: 28px; flex: none; }
.equipe-histo__nom { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.equipe-histo__nom strong { font-weight: 700; }
.equipe-histo--disparue { color: var(--texte-2); font-style: italic; padding-left: calc(28px + .5rem); }

/* ---------- Tableau des finales ---------- */
.finales th, .finales td { text-align: left; }
.finales__saison { font-family: var(--police-titre); font-weight: 800; font-size: 1.05rem; white-space: nowrap; }
.finales__dg { color: var(--texte-2); font-size: .9rem; white-space: nowrap; }
.finales__matchs { text-align: center !important; font-variant-numeric: tabular-nums; }
.finales thead th:last-child { text-align: center; }

@media (max-width: 960px) {
    .champions__grille { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .en-titre { flex-direction: column; align-items: flex-start; gap: 1rem; padding: 1.25rem; }
    .en-titre__logo { width: 96px; height: 96px; }
    .palmares li { grid-template-columns: minmax(0, 1fr) 4rem 2rem; }
}

/* ---------- Le mur des champions ---------- */
.mur__aide { padding: 0 1rem; margin: 0 0 .9rem; font-size: .85rem; }
.mur__grille { list-style: none; margin: 0; padding: .4rem 1rem 1rem; display: grid; gap: .7rem .45rem; grid-template-columns: repeat(auto-fill, minmax(4.4rem, 1fr)); }
.mur__tuile > a, .mur__tuile > span {
    position: relative; display: grid; justify-items: center; align-content: center; gap: .2rem; height: 5.2rem; padding: .4rem .2rem;
    border-radius: 10px; background: var(--surface-2); border: 2px solid transparent; color: var(--texte); text-decoration: none;
    transition: transform .15s ease, opacity .15s ease, border-color .15s ease;
}
.mur__tuile > a:hover { transform: translateY(-3px); text-decoration: none; }
.mur__tuile img { width: 44px; height: 44px; object-fit: contain; }
.mur__saison { font-family: var(--police-titre); font-size: .95rem; font-weight: 800; line-height: 1; }
.mur__initiales { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--trait); font-weight: 800; font-size: .8rem; }
.mur__tuile--dynastie > a, .mur__tuile--dynastie > span { border-color: var(--or); background: color-mix(in srgb, var(--or) 14%, var(--surface-2)); }
.mur__serie { position: absolute; top: -.6rem; left: 50%; transform: translateX(-50%); padding: .05rem .4rem; border-radius: 999px;
    background: var(--or); color: #1C1D1F; font-size: .6rem; font-weight: 800; white-space: nowrap; text-transform: uppercase; letter-spacing: .03em; }
.mur__grille.est-filtre .mur__tuile:not(.est-allume) > * { opacity: .25; }
.mur__grille.est-filtre .mur__tuile.est-allume > * { border-color: var(--bleu); }
.mur__dynasties { padding: 0 1rem 1rem; }
.mur__sous-titre { margin: .5rem 0; font-size: .8rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--texte-2); }
.mur__dynasties ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.mur__dynasties li { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .75rem; padding: .45rem .6rem; border-radius: 8px; background: var(--surface-2); }
.mur__dynastie-detail { font-size: .85rem; color: var(--texte-2); }
.mur__dynastie-detail strong { color: var(--or); }
@media (max-width: 480px) {
    .mur__grille { grid-template-columns: repeat(auto-fill, minmax(3.6rem, 1fr)); }
    .mur__tuile img, .mur__initiales { width: 36px; height: 36px; }
    .mur__tuile > a, .mur__tuile > span { height: 4.4rem; }
}
