/* ==========================================================================
   FIDB — Feuille de style principale
   Convention : toutes les teintes passent par les variables ci-dessous.
   Pour changer la couleur de l'édition chaque année, il suffit de modifier
   --accent, --accent-dark et --accent-pale dans :root. Rien d'autre à toucher.
   ========================================================================== */

:root {
    /* --- Couleur de l'édition (à changer chaque année) --- */
    --accent: #2f7a52;        /* vert pelouse — couleur de l'édition 2026 */
    --accent-dernier: #F54927;        /* rouge — couleur de l'édition 2026 */
    --accent-dark: #1f5a3a;
    --accent-pale: #e7f2ec;

    /* --- Neutres (stables d'une année sur l'autre) --- */
    --ink: #1c2024;
    --ink-soft: #565c63;
    --ink-muted: #8b9096;
    --paper: #f3f1ea;
    --surface: #ffffff;
    --border: #e2ded2;
    --border-strong: #cfc9b8;

    /* --- États --- */
    --danger: #b5442e;
    --danger-pale: #f7e6e1;
    --success: #2f7a52;
    --success-pale: #e7f2ec;

    /* --- Distinction homme/femme (liseré d'avatar uniquement, pas d'aplat) --- */
    --gender-m: #3b6fa8;
    --gender-f: #b8497a;

    /* --- Points de pronostic ---
       Convention historique du site : vert = bon résultat (+1), rouge = score exact (+3).
       Conservée telle quelle, avec un badge texte en plus pour l'accessibilité. */
    --pt-good: #4f8c3f;
    --pt-good-pale: #eaf3e3;
    --pt-exact: #b5442e;
    --pt-exact-pale: #f7e6e1;
    --pt-cinq: #CE036C;
    --pt-cinq-pale: #FFE6F3;
    --pt-deux: #879E47;
    --pt-deux-pale: #E2E9CE;

    /* --- Typo --- */
    --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
    --font-body: "Inter", system-ui, -apple-system, sans-serif;

    /* --- Rythme --- */
    --radius: 10px;
    --radius-lg: 16px;
    --max-width: 1100px;

    /* --- Admins --- */
    --webmaster: #F57627;
    --mogwai: #a64d79;
    --president: #0D3D20;
}

/* ============ RESET MINIMAL ============ */
*, *::before, *::after {
    box-sizing: border-box;
}
body {
    margin: 0;
}
ul, ol {
    list-style: none;
    margin: 0;
    padding: 0;
}
a {
    color: inherit;
    text-decoration: none;
}
img {
    max-width: 100%;
    display: block;
}

body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.5;
}

.section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============ EN-TÊTE ============ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: auto;
}

.logo-badge {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
}

.logo-text {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 20px;
    letter-spacing: 0.5px;
}

.main-nav ul {
    display: flex;
    gap: 20px;
}

.main-nav a {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-soft);
    padding: 6px 2px;
    border-bottom: 2px solid transparent;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--ink);
    border-bottom-color: var(--accent);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--paper);
    border: 1px solid var(--border-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-soft);
}

/* ============ BANDEAU MATCHS ============ */
.matches-section {
    padding: 32px 0 28px;
    border-bottom: 1px solid var(--border);
}

.matches-section h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 30px;
    margin: 0 0 2px;
    letter-spacing: 0.3px;
}

.section-subtitle {
    color: var(--ink-soft);
    font-size: 14px;
    margin: 0 0 18px;
}

.matches-row {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 4px 4px 10px 0;
}

/* --- Le "billet de match", élément signature du design ---
   La découpe en haut/bas imite un ticket perforé, via un dégradé répété. */
.match-ticket {
    scroll-snap-align: start;
    flex: 0 0 200px;
}

.match-ticket article {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px 16px;
    position: relative;
    background-image:
        radial-gradient(circle at 0 0, transparent 6px, var(--surface) 6.5px),
        radial-gradient(circle at 100% 0, transparent 6px, var(--surface) 6.5px);
    background-size: 50% 100%;
    background-repeat: no-repeat;
    background-position: left top, right top;
}

.match-ticket::after {
    content: "";
    display: block;
    margin-top: -1px;
    border-top: 1px dashed var(--border-strong);
}

.ticket-status {
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    padding: 3px 9px;
    border-radius: 20px;
    margin-bottom: 10px;
    color: var(--ink-soft);
    background: var(--paper);
}

.is-urgent .ticket-status {
    color: var(--danger);
    background: var(--danger-pale);
}
.is-done .ticket-status {
    color: var(--success);
    background: var(--success-pale);
}

.ticket-teams {
    font-family: var(--font-display);
    font-size: 19px;
    font-weight: 600;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.ticket-teams .vs {
    color: var(--ink-muted);
    font-weight: 500;
}

.ticket-phase {
    font-size: 12px;
    color: var(--ink-muted);
    margin-top: 4px;
}

.ticket-action {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-dark);
}

.ticket-action:hover {
    text-decoration: underline;
}

.ticket-action--disabled {
    color: var(--ink-muted);
    font-weight: 500;
}

.is-closed article {
    opacity: 0.75;
}

/* ============ GRILLE ACTUS / CLASSEMENT ============ */
.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 28px;
    padding: 32px 20px 48px;
}

.news-section h2,
.leaderboard-section h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 20px;
    margin: 0 0 14px;
}

.news-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    margin-bottom: 12px;
}

.news-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px;
}
/*//////////////////////////////////////////////////////////*/
.news-card h3.bandeauNews1, h3.bandeauNews2, h3.bandeauNews3 {
    padding: 5px;
    margin-bottom: 5px;
    font-size: 80%;
}

.news-card h3.bandeauNews1{
    color: var(--mogwai);
    border-radius: 5px;
    border-bottom: var(--mogwai) 1px solid;
}

.news-card h3.bandeauNews2 {
    color: var(--president);
    border-radius: 5px;
    border-bottom: var(--president) 1px solid;
}

.news-card h3.bandeauNews3 {
    color: var(--webmaster);
    border-radius: 5px;
    border-bottom: var(--webmaster) 1px solid;
}

.news-card .chronique {
    text-transform: uppercase;
    text-align: left;
}

.news-card .publie {
    margin-left: 10px;
    color: #666;
    font-size: 75%;
}
/*/////////////////////////////////////////////////*/
.news-card p {
    font-size: 14px;
    color: var(--ink-soft);
    margin: 0 0 8px;
}

.news-card a {
    font-size: 13px;
    font-weight: 600;
    color: var(--pt-cinq);
}

.news-card a:hover {
    text-decoration: underline;
}

/* --- Classement, esprit "tableau d'affichage" : rang et score en capsules --- */
.leaderboard-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    align-self: start;
}

.leaderboard-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.leaderboard-list li:last-child {
    border-bottom: none;
}

.leaderboard-list .rank {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: var(--paper);
    color: var(--ink-soft);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.leaderboard-list li:first-child .rank {
    background: var(--accent);
    color: #fff;
}
.leaderboard-list li:last-child .rank {
    background: var(--accent-dernier);
    color: #fff;
}

.leaderboard-list .player {
    flex: 1;
    font-weight: 500;
}

.leaderboard-list .score {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
    background: var(--ink);
    color: #fff;
    padding: 2px 8px;
    border-radius: 6px;
    min-width: 34px;
    text-align: center;
}

.leaderboard-link {
    display: block;
    margin-top: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-dark);
    text-align: center;
}

.leaderboard-link:hover {
    text-decoration: underline;
}

/* ============ PIED DE PAGE ============ */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 20px 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
    color: var(--ink-soft);
}

.footer-inner nav {
    display: flex;
    gap: 16px;
}

.footer-inner nav a:hover {
    color: var(--ink);
}

/* ==========================================================================
   PAGE RÉSULTATS — tableau croisé matchs / pronostics
   ========================================================================== */

.results-page {
    padding: 28px 20px 48px;
}

.legend-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--ink-soft);
    margin-bottom: 6px;
}

.legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    flex-shrink: 0;
}

.legend-swatch--good {
    background: var(--pt-good-pale);
    border: 1px solid var(--pt-good);
}
.legend-swatch--exact {
    background: var(--pt-exact-pale);
    border: 1px solid var(--pt-exact);
}
.legend-swatch--cinq {
    background: var(--pt-cinq-pale);
    border: 1px solid var(--pt-cinq);
}
.legend-swatch--deux {
    background: var(--pt-deux-pale);
    border: 1px solid var(--pt-deux);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* --- Barre d'outils au-dessus du tableau : groupe + phase à gauche, légende à droite --- */
.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.toolbar-controls {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.legend-list--inline {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.legend-list--inline li {
    margin-bottom: 0;
}

.table-toolbar select {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--ink);
}

.phase-tabs {
    display: flex;
    gap: 2px;
    background: var(--paper);
    border-radius: 8px;
    padding: 3px;
}

.phase-tabs a {
    font-size: 13px;
    padding: 5px 12px;
    border-radius: 6px;
    color: var(--ink-soft);
}

.phase-tabs a:hover {
    color: var(--ink);
}

.phase-tabs a.active {
    background: var(--surface);
    color: var(--accent-dark);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

/* --- Le tableau croisé lui-même --- */
.results-table-section {
    min-width: 0;
}

.table-scroll {
    overflow: auto;
    max-height: 72vh;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.results-table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    width: 100%;
}

.results-table th,
.results-table td {
    padding: 8px 10px;
    text-align: center;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
}

/* Ligne des joueurs : fixée en haut */
.results-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--surface);
    border-bottom: 2px solid var(--border-strong);
}

/* Colonne "match" : fixée à gauche */
.results-table .col-match {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--surface);
    text-align: center;
    font-weight: 500;
    min-width: 50px;
}

/* Colonne "résultat réel" : fixée à droite */
.results-table .col-real {
    position: sticky;
    right: 0;
    z-index: 1;
    background: var(--accent-pale);
    color: var(--accent-dark);
    font-weight: 600;
    border-left: 2px solid var(--accent);
    border-right: none;
}

/* Coins : intersections des deux fixations, doivent passer au-dessus de tout */
.corner-left {
    left: 0;
    z-index: 3 !important;
}

.corner-right {
    right: 0;
    z-index: 3 !important;
    background: var(--accent-pale);
    color: var(--accent-dark);
}

.results-table tbody th.col-match {
    background: var(--surface);
}

/* --- Carte joueur dans l'en-tête (remplace les 3 lignes séparées) --- */
.player-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 84px;
    padding: 4px 0;
}

.player-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--paper);
    background-size: cover;
    background-position: center;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
    color: var(--ink-soft);
    overflow: hidden;
}

.player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.player-avatar--m {
    border-color: var(--gender-m);
}
.player-avatar--f {
    border-color: var(--gender-f);
}

.player-name {
    font-weight: 500;
    font-size: 13px;
    white-space: normal;
}

.player-points {
    font-size: 11px;
    font-weight: 600;
    color: var(--ink-soft);
    background: var(--paper);
    padding: 1px 8px;
    border-radius: 20px;
}

/* --- Cellules de score : couleur + badge texte (convention conservée) --- */
.cell-good {
    background: var(--pt-good-pale);
    color: var(--pt-good);
    font-weight: 500;
}

.cell-exact {
    background: var(--pt-exact-pale);
    color: var(--pt-exact);
    font-weight: 600;
}

.cell-cinq {
    background: var(--pt-cinq-pale);
    color: var(--pt-cinq);
    font-weight: 600;
}

.cell-deux {
    background: var(--pt-deux-pale);
    color: var(--pt-deux);
    font-weight: 600;
}

.pt-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    margin-left: 3px;
    opacity: 0.85;
}

.table-hint {
    font-size: 12px;
    color: var(--ink-muted);
    margin: 8px 2px 0;
}

/* --- Ligne "qualifiés" : fixée en bas, comme les joueurs sont fixés en haut ---
   Les cellules joueurs (z-index 1) doivent rester SOUS les deux colonnes fixes
   (match à gauche, résultat réel à droite), qui passent en z-index 3. */
.results-table tfoot th,
.results-table tfoot td {
    position: sticky;
    bottom: 0;
    z-index: 1;
    border-bottom: none;
    border-top: 2px solid var(--border-strong);
}

.results-table tfoot .col-match,
.results-table tfoot .col-real {
    z-index: 3;
}

.results-table tfoot .col-match {
    background: var(--surface);
}

.qualif-cell {
    background: var(--paper);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}

.results-table tfoot .col-real.qualif-cell {
    background: var(--accent-pale);
    color: var(--accent-dark);
    font-weight: 600;
}

.qualif-cell--pending {
    color: var(--ink-muted);
    font-weight: 400;
    font-style: italic;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 720px) {
    .header-inner {
        flex-wrap: wrap;
    }
    .main-nav ul {
        gap: 14px;
        flex-wrap: wrap;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .matches-section h1 {
        font-size: 24px;
    }

    .table-toolbar {
        align-items: flex-start;
    }

    .table-scroll {
        max-height: 60vh;
    }
}

/* ============ ACCESSIBILITÉ ============ */
a:focus-visible,
.ticket-action:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   PAGE ARTICLE — détail d'une actualité
   ========================================================================== */

.article-page {
    padding: 28px 20px 48px;
}

.back-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
    margin-bottom: 18px;
}

.back-link:hover {
    color: var(--accent-dark);
}

.back-link--bottom {
    margin-top: 28px;
    margin-bottom: 0;
}

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

/* --- Le corps de l'article --- */
.article-full {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 32px 32px;
}

/* Réutilise le principe du bandeau de couleur des news-card,
   mais comme badge autonome au-dessus du H1 plutôt que sur le titre lui-même */
.article-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin: 0 0 12px;
    border-bottom: none !important;
    background: color-mix(in srgb, var(--mogwai) 35%, white);
    /*background-color: var(--mogwai);*/
}

.article-full h1 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 28px;
    line-height: 1.2;
    margin: 0 0 10px;
}

.article-full .chronique {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.article-body p {
    font-size: 15px;
    color: var(--ink);
    margin: 0 0 16px;
    line-height: 1.65;
}

.article-body p:last-child {
    margin-bottom: 0;
}

/* --- Colonne "à lire aussi" --- */
.article-aside {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
}

.article-aside h2 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 18px;
    margin: 0 0 12px;
}

.aside-news-item {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.aside-news-item:last-child {
    border-bottom: none;
}

.aside-news-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    margin: 0 0 6px;
    border-bottom: none !important;
}

/* VOIR AVEC CLAUDE SI JE LAISSE CAR JE L AI AJOUTE */
.aside-news-badge.bandeauNews1, .article-badge.bandeauNews1 {   
    background: color-mix(in srgb, var(--mogwai) 35%, white);
}

.aside-news-badge.bandeauNews2, .article-badge.bandeauNews2 {   
    background: color-mix(in srgb, var(--president) 35%, white);
}

.aside-news-badge.bandeauNews3, .article-badge.bandeauNews3 {   
    background: color-mix(in srgb, var(--webmaster) 35%, white);
}

.aside-news-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    margin: 0 0 4px;
    line-height: 1.35;
}

.aside-news-item:hover .aside-news-title {
    color: var(--accent-dark);
}

.aside-news-date {
    font-size: 11px;
    color: var(--ink-muted);
    margin: 0;
}

@media (max-width: 720px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-full {
        padding: 20px;
    }

    .article-full h1 {
        font-size: 22px;
    }
}
