/*
 * Site public et espace membre (`plan-site-lot-1-matchs.md`, partie 2) : base sobre, d'abord pour le téléphone,
 * distincte de l'administration. Couleurs et rayons par variables Bootstrap ; aucune couleur en dur dans les gabarits.
 */
:root {
    --bs-primary: #0b5c6b;
    --bs-primary-rgb: 11, 92, 107;
    --bs-link-color: #0b5c6b;
    --bs-link-color-rgb: 11, 92, 107;
    --bs-link-hover-color: #08434e;
    --bs-link-hover-color-rgb: 8, 67, 78;
    --bs-body-bg: #f3f5f6;
    --bs-border-radius: .5rem;
    --bs-border-color: #dde2e5;
    --site-barre-basse: 3.75rem;
    --site-domicile: #0b5c6b;
    --site-nul: #66747c;
    --site-exterieur: #b5532a;
}

.btn-primary {
    --bs-btn-bg: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-bg: #08434e;
    --bs-btn-hover-border-color: #08434e;
    --bs-btn-active-bg: #08434e;
}

.btn-outline-primary {
    --bs-btn-color: var(--bs-primary);
    --bs-btn-border-color: var(--bs-primary);
    --bs-btn-hover-bg: var(--bs-primary);
    --bs-btn-hover-border-color: var(--bs-primary);
    --bs-btn-active-bg: #08434e;
}

.nav-pills {
    --bs-nav-pills-link-active-bg: var(--bs-primary);
}

/* En-tête et barre basse */
.site-entete {
    background: var(--bs-primary);
}

.site-entete .navbar-brand,
.site-entete .nav-link {
    color: #fff;
}

.site-entete .nav-link.disabled {
    color: rgba(255, 255, 255, .6);
}

.site-entete .nav-link.active {
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: .35rem;
}

.site-barre-basse {
    height: var(--site-barre-basse);
    background: var(--bs-body-bg);
}

.site-barre-basse a,
.site-barre-basse span {
    font-size: .75rem;
    color: var(--bs-secondary-color);
    text-decoration: none;
}

.site-barre-basse a.active {
    color: var(--bs-primary);
    font-weight: 600;
}

@media (max-width: 767.98px) {
    body.site-membre {
        padding-bottom: var(--site-barre-basse);
    }
}

/* Logos (équipes, compétitions) */
.logo {
    object-fit: contain;
    flex-shrink: 0;
}

.logo-absent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--bs-secondary-bg);
    color: var(--bs-secondary-color);
    font-size: .7rem;
    font-weight: 600;
}

.logo-22 { width: 22px; height: 22px; }
.logo-28 { width: 28px; height: 28px; }
.logo-56 { width: 56px; height: 56px; font-size: 1.25rem; }

/* Ligne d'un match dans une liste */
.ligne-match {
    display: grid;
    grid-template-columns: 3.5rem 1fr auto;
    align-items: center;
    gap: .75rem;
    color: inherit;
    text-decoration: none;
}

.ligne-match:hover,
.ligne-match:focus-visible {
    background: var(--bs-tertiary-bg);
}

.ligne-match-equipes {
    min-width: 0;
}

.ligne-match .equipe {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
}

.ligne-match .equipe span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ligne-match .buts {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    min-width: 1.25rem;
    text-align: end;
}

/* En-tête de la fiche d'un match */
.score-match {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.score-match .score {
    font-size: 2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Barre des chances 1 / N / 2 : chaque segment a son texte à côté, la couleur n'est jamais seule. */
.barre-chances {
    display: flex;
    height: .75rem;
    border-radius: var(--bs-border-radius);
    overflow: hidden;
    background: var(--bs-secondary-bg);
}

.barre-chances svg { display: block; width: 100%; height: 100%; }
.barre-chances .segment-1 { fill: var(--site-domicile); }
.barre-chances .segment-N { fill: var(--site-nul); }
.barre-chances .segment-2 { fill: var(--site-exterieur); }

.pastille {
    display: inline-block;
    width: .65rem;
    height: .65rem;
    border-radius: 50%;
}

.pastille-1 { background: var(--site-domicile); }
.pastille-N { background: var(--site-nul); }
.pastille-2 { background: var(--site-exterieur); }

/* Onglets de la fiche : défilement horizontal sur téléphone */
.onglets-match {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}

.onglets-match .nav-link {
    white-space: nowrap;
}

.table > :not(caption) > * > :first-child { padding-inline-start: 1rem; }
.table > :not(caption) > * > :last-child { padding-inline-end: 1rem; }

.table-stats td:first-child,
.table-stats td:last-child {
    width: 25%;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

/* Ligne d'une compétition dans la liste */
.ligne-competition {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: inherit;
    text-decoration: none;
}

.ligne-competition:hover,
.ligne-competition:focus-visible {
    background: var(--bs-tertiary-bg);
}

/* Forme des 5 derniers matchs (V, N, D) : lettre toujours écrite */
.forme {
    display: inline-flex;
    gap: .15rem;
}

.forme span {
    display: inline-block;
    width: 1.1rem;
    border-radius: .2rem;
    font-size: .7rem;
    font-weight: 600;
    line-height: 1.1rem;
    text-align: center;
    color: #fff;
}

.forme .forme-V { background: var(--site-domicile); }
.forme .forme-N { background: var(--site-nul); }
.forme .forme-D { background: var(--site-exterieur); }

/* Navigation entre journées : sur téléphone, précédente et suivante sur une ligne, le choix dessous */
.navigation-etape form {
    flex: 1 0 100%;
}

@media (min-width: 768px) {
    .navigation-etape form {
        flex: 0 0 auto;
    }
}

.min-w-0 {
    min-width: 0;
}

/* Site public qui vend (`plan-site-vitrine.md`) : chiffres mis en avant. */
.vitrine-taux {
    font-size: 1.75rem;
    line-height: 1.2;
    color: var(--bs-primary);
}
