:root {
    --anthracite: #23252B;
    --orange-fonce: #FF6A00;
    --orange: #FF8F1F;
    --orange-clair: #FFC04D;
    --fond-page: #f1f3f8;
    --fond-carte: #ffffff;
    --texte-principal: #1f2937;
    --texte-secondaire: #64748b;
    --bordure: #d8dee9;
    --danger: #b00020;
    --succes: #15803d;
    --ombre: 0 4px 16px rgba(35, 37, 43, 0.12);
    --rayon: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--texte-principal);
    background: var(--fond-page);
}

button,
input,
select,
textarea {
    font: inherit;
}

/* =========================
   EN-TÊTE
========================= */

.header-principal {
    padding: 20px 20px;
    color: white;
    background: var(--anthracite);
    border-bottom: 5px solid transparent;
    border-image: linear-gradient(
        90deg,
        var(--orange-clair),
        var(--orange),
        var(--orange-fonce)
    ) 1;
}

.header-contenu {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}

.header-logo-image {
    height: 90px;
    width: auto;
    flex-shrink: 0;
}

/* =========================
   CONNEXION
========================= */

.conteneur-connexion {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
}

.carte-connexion {
    width: min(420px, 100%);
}

.carte-texte-legal {
    width: min(760px, 100%);
    line-height: 1.6;
}

.carte-texte-legal h3 {
    margin: 22px 0 6px;
    color: var(--anthracite);
}

.carte-texte-legal h3:first-of-type {
    margin-top: 14px;
}

.carte-texte-legal p {
    margin: 0 0 10px;
}

.carte-texte-legal ul {
    margin: 0 0 10px;
    padding-left: 22px;
}

.carte-texte-legal li {
    margin-bottom: 4px;
}

.carte-texte-legal a {
    color: var(--orange-fonce);
}

.carte-connexion .champ-formulaire {
    margin-bottom: 12px;
}

.carte-connexion input {
    width: 100%;
    margin: 0;
}

.message-erreur {
    padding: 10px 12px;
    color: var(--danger);
    background: #fef2f2;
    border-left: 4px solid var(--danger);
    border-radius: 6px;
}

.texte-bascule {
    margin-top: 16px;
}

/* =========================
   BARRE DE SESSION
========================= */

.barre-session {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    padding: 12px 20px;
    background: #eef2ff;
    border-bottom: 1px solid var(--bordure);
}

.barre-session-ancre-gauche {
    margin-right: auto;
}

.bouton-session-action {
    padding: 9px 14px;
    color: var(--texte-principal);
    font-weight: 600;
    font-size: 14px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease;
}

.bouton-session-action:hover {
    background: white;
    border-color: var(--bordure);
}

/* Commutateur de contexte (équipe / catégorie) */

.selecteur-contexte {
    position: relative;
}

.declencheur-contexte {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px 7px 7px;
    background: white;
    border: 0;
    border-radius: 11px;
    box-shadow: 0 1px 3px rgba(35, 37, 43, 0.15);
    cursor: pointer;
    transition:
        box-shadow 0.15s ease;
}

.declencheur-contexte:hover {
    box-shadow: 0 3px 8px rgba(35, 37, 43, 0.2);
}

.avatar-contexte {
    display: flex;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: var(--anthracite);
    border-radius: 8px;
}

.texte-contexte {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.25;
}

.label-contexte {
    color: var(--texte-secondaire);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.valeur-contexte {
    max-width: 160px;
    overflow: hidden;
    color: var(--texte-principal);
    font-weight: 700;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chevron-contexte {
    color: var(--texte-secondaire);
    font-size: 11px;
    transition: transform 0.15s ease;
}

.declencheur-contexte[aria-expanded="true"]
    .chevron-contexte {
    transform: rotate(180deg);
}

.panneau-contexte {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 30;
    display: flex;
    width: max-content;
    min-width: 240px;
    max-width: 320px;
    flex-direction: column;
    gap: 2px;
    padding: 8px;
    background: white;
    border: 1px solid var(--bordure);
    border-radius: 12px;
    box-shadow: var(--ombre);
    animation: apparition 0.15s ease;
}

.panneau-contexte[hidden] {
    display: none;
}

.ligne-contexte {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 10px;
    color: var(--texte-principal);
    font: inherit;
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.ligne-contexte:hover {
    background: #fff7ed;
}

.ligne-contexte.actif {
    color: var(--anthracite);
    font-weight: 700;
    background: #fff1e0;
}

.ligne-contexte-texte {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    white-space: nowrap;
}

.ligne-contexte-texte small {
    color: var(--texte-secondaire);
    font-weight: 500;
}

.coche-contexte {
    flex-shrink: 0;
    color: var(--orange-fonce);
    font-weight: 700;
}

.action-supprimer-ligne {
    display: flex;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    color: var(--texte-secondaire);
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

.action-supprimer-ligne:hover {
    color: white;
    background: var(--danger);
}

.ligne-contexte-ajout {
    margin-top: 4px;
    padding-top: 10px;
    color: var(--orange-fonce);
    font-weight: 700;
    border-top: 1px solid var(--bordure);
}

.ligne-contexte-ajout:hover {
    background: #fff7ed;
}

/* =========================
   CATÉGORIE
========================= */

.carte-equipe-categorie {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    margin-bottom: 10px;
    background: #f8fafc;
    border: 1px solid var(--bordure);
    border-radius: 10px;
}

.stats-equipe-categorie {
    display: flex;
    gap: 14px;
    color: var(--texte-secondaire);
    font-size: 14px;
}

.carte-equipe-categorie > button {
    margin-left: auto;
}

/* =========================
   MODALES
========================= */

.modale-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(35, 37, 43, 0.55);
    animation: apparition 0.15s ease;
}

.modale-boite {
    width: min(440px, 100%);
    padding: 22px;
    background: var(--fond-carte);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
}

.modale-message {
    margin: 0 0 20px;
    color: var(--texte-principal);
    white-space: pre-line;
}

.champ-prompt-modale {
    width: 100%;
    margin: 0 0 20px;
}

.modale-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* =========================
   NAVIGATION
========================= */

.navigation-principale {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 14px 20px;
    background: white;
    box-shadow: 0 2px 10px rgba(35, 37, 43, 0.1);
}

.bouton-menu-mobile {
    display: none;
}

.liste-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.bouton-navigation {
    padding: 11px 17px;
    color: white;
    font-weight: bold;
    background: var(--anthracite);
    border: 0;
    border-radius: 9px;
    cursor: pointer;
    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        color 0.2s ease;
}

.bouton-navigation:hover {
    color: #111827;
    background: linear-gradient(
        135deg,
        var(--orange-clair),
        var(--orange-fonce)
    );
    transform: translateY(-1px);
}

.bouton-navigation.actif {
    color: #111827;
    background: linear-gradient(
        135deg,
        var(--orange-clair),
        var(--orange-fonce)
    );
}

.menu-navigation-groupe {
    position: relative;
}

.menu-deroulant-matchs[hidden] {
    display: none;
}

.menu-deroulant-matchs {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    z-index: 30;
    display: flex;
    min-width: 220px;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    background: white;
    border: 1px solid var(--bordure);
    border-radius: 12px;
    box-shadow: var(--ombre);
    transform: translateX(-50%);
    animation: apparition 0.15s ease;
}

.option-menu-deroulant {
    padding: 10px 12px;
    color: var(--texte-principal);
    font-weight: bold;
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.option-menu-deroulant:hover {
    background: #eef2ff;
}

.option-menu-deroulant.actif {
    color: var(--anthracite);
    background: #eef2ff;
}

/* =========================
   CONTENU
========================= */

.conteneur-principal {
    width: min(1200px, calc(100% - 32px));
    min-height: calc(100vh - 300px);
    margin: 26px auto;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: apparition 0.25s ease;
}

@keyframes apparition {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.carte {
    padding: 22px;
    margin-bottom: 22px;
    background: var(--fond-carte);
    border: 1px solid rgba(216, 222, 233, 0.8);
    border-radius: var(--rayon);
    box-shadow: var(--ombre);
}

.carte h2,
.carte h3 {
    color: var(--anthracite);
}

.entete-section {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.entete-section h2 {
    margin: 3px 0 0;
    font-size: 28px;
}

.sur-titre {
    margin: 0;
    color: var(--texte-secondaire);
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-version {
    padding: 8px 12px;
    color: var(--anthracite);
    font-size: 13px;
    font-weight: bold;
    background: #fff8dc;
    border: 1px solid var(--orange-clair);
    border-radius: 999px;
}

/* =========================
   TABLEAU DE BORD
========================= */

.grille-statistiques {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.boite-statistique {
    display: flex;
    min-height: 155px;
    padding: 20px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    text-align: center;
    background: linear-gradient(
        145deg,
        var(--anthracite),
        var(--orange-fonce)
    );
    border-radius: 12px;
}

.icone-statistique {
    margin-bottom: 8px;
    font-size: 28px;
}

.libelle-statistique {
    color: #dbeafe;
    font-size: 14px;
}

.boite-statistique strong {
    display: block;
    margin-top: 7px;
    font-size: 36px;
}

.message-information {
    padding: 12px 14px;
    color: #1e3a8a;
    background: #eff6ff;
    border-left: 4px solid var(--orange-fonce);
    border-radius: 6px;
}

.ligne-source-fff {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    margin-bottom: 8px;
    background: #f8fafc;
    border: 1px solid var(--bordure);
    border-radius: 8px;
}

.ligne-source-fff .texte-secondaire {
    display: block;
}

.statut-sync-fff {
    margin-top: 4px;
    color: var(--texte-secondaire);
    font-size: 12px;
}

.statut-sync-ok {
    color: #15803d;
}

.statut-sync-echec {
    color: var(--danger);
    font-weight: 600;
}

/* =========================
   FORMULAIRES
========================= */

input,
select,
textarea {
    max-width: 100%;
    padding: 10px 12px;
    margin: 5px;
    color: var(--texte-principal);
    background: white;
    border: 1px solid var(--bordure);
    border-radius: 7px;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--orange-fonce);
    box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.12);
}

button.action,
.bouton-principal {
    padding: 10px 15px;
    color: white;
    background: linear-gradient(
        135deg,
        var(--orange),
        var(--orange-fonce)
    );
    border: 0;
    border-radius: 7px;
    cursor: pointer;
}

button.action:hover,
.bouton-principal:hover {
    background: var(--anthracite);
}

button.delete {
    padding: 10px;
    color: white;
    background: var(--danger);
    border: 0;
    border-radius: 7px;
    cursor: pointer;
}

/* =========================
   TABLEAUX
========================= */

table {
    width: 100%;
    margin-top: 15px;
    border-collapse: collapse;
    background: white;
}

th {
    color: white;
    background: var(--anthracite);
}

td,
th {
    padding: 10px;
    text-align: center;
    border: 1px solid var(--bordure);
}

tbody tr:nth-child(even) {
    background: #f8fafc;
}

/* =========================
   PIED DE PAGE
========================= */

.pied-page {
    padding: 18px;
    color: #cbd5e1;
    text-align: center;
    background: var(--anthracite);
}

.pied-page p {
    margin: 0;
}

.pied-page p.liens-pied-page {
    margin-top: 6px;
    font-size: 13px;
}

.liens-pied-page a {
    color: var(--orange-clair);
    text-decoration: none;
}

.liens-pied-page a:hover {
    text-decoration: underline;
}

/* =========================
   MODULE EFFECTIF
========================= */

.bloc-module {
    margin-bottom: 20px;
}

.entete-module {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 18px;
}

.entete-module h3 {
    margin-top: 0;
    margin-bottom: 5px;
}

.texte-secondaire {
    margin: 0;
    color: var(--texte-secondaire);
    font-size: 14px;
}

.compteur-resultats {
    padding: 8px 12px;
    color: var(--anthracite);
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
    background: #eef2ff;
    border-radius: 999px;
}

.formulaire-joueur {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 18px;
    background: #f8fafc;
    border: 1px solid var(--bordure);
    border-radius: 12px;
}

.import-effectif {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--bordure);
}

.import-effectif .texte-secondaire {
    margin: 6px 0 0;
}

.champ-formulaire[hidden] {
    display: none;
}

.champ-formulaire {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.champ-formulaire label {
    margin-bottom: 5px;
    color: var(--anthracite);
    font-size: 14px;
    font-weight: bold;
}

.champ-formulaire input,
.champ-formulaire select {
    width: 100%;
    margin: 0;
}

.champ-large {
    grid-column: 1 / -1;
}

.actions-formulaire {
    display: flex;
    gap: 10px;
    align-items: center;
}

.bouton-secondaire,
.bouton-modifier {
    padding: 10px 14px;
    color: var(--anthracite);
    font-weight: bold;
    background: white;
    border: 1px solid var(--anthracite);
    border-radius: 7px;
    cursor: pointer;
}

.bouton-secondaire:hover,
.bouton-modifier:hover {
    color: white;
    background: var(--anthracite);
}

.masque {
    display: none;
}

.separateur {
    margin: 25px 0;
    border: 0;
    border-top: 1px solid var(--bordure);
}

.barre-outils-effectif {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.champ-recherche {
    flex: 1;
}

.champ-recherche input {
    width: 100%;
    margin: 0;
}

.label-invisible {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    white-space: nowrap;
    border: 0;
    clip: rect(0, 0, 0, 0);
}

.tableau-responsive {
    width: 100%;
    overflow-x: auto;
}

.information-joueur {
    display: block;
    margin-top: 5px;
    color: var(--texte-secondaire);
    font-weight: normal;
}

.badge-poste {
    display: inline-block;
    padding: 5px 9px;
    color: var(--anthracite);
    font-size: 13px;
    font-weight: bold;
    background: #eef2ff;
    border-radius: 999px;
}

.actions-tableau {
    display: flex;
    gap: 7px;
    justify-content: center;
}

.actions-tableau button {
    white-space: nowrap;
}

.etat-vide {
    padding: 35px 20px;
    color: var(--texte-secondaire);
    text-align: center;
    background: #f8fafc;
    border: 2px dashed var(--bordure);
    border-radius: 12px;
}

.etat-vide span {
    display: block;
    margin-bottom: 8px;
    font-size: 42px;
}

.etat-vide h3 {
    margin: 0 0 7px;
}

.etat-vide p {
    margin: 0;
}

/* =========================
   PRÉSENCE DANS L'EFFECTIF
========================= */

.badge-presence {
    display: inline-block;
    min-width: 58px;
    padding: 6px 10px;
    color: var(--anthracite);
    font-weight: bold;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
}

.pourcentage-presence {
    display: block;
    margin-top: 5px;
    color: var(--texte-secondaire);
    font-size: 12px;
}

/* =========================
   MODULE PRÉSENCES
========================= */

.formulaire-seance {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 18px;
    background: #f8fafc;
    border: 1px solid var(--bordure);
    border-radius: 12px;
}

.entete-liste-presence {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    margin: 10px 0 15px;
}

.entete-liste-presence h4 {
    margin: 0 0 5px;
    color: var(--anthracite);
}

.actions-selection {
    display: flex;
    gap: 8px;
}

.actions-selection button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.grille-presences {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.carte-presence-joueur {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 13px;
    background: white;
    border: 1px solid var(--bordure);
    border-radius: 9px;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease;
}

.carte-presence-joueur:hover {
    background: #f8fafc;
    border-color: var(--orange-fonce);
    transform: translateY(-1px);
}

.carte-presence-joueur:has(
    .case-presence:checked
) {
    background: #ecfdf5;
    border-color: var(--succes);
}

.case-presence {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    accent-color: var(--succes);
}

.contenu-presence-joueur {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.contenu-presence-joueur strong {
    color: var(--anthracite);
}

.contenu-presence-joueur small {
    margin-top: 3px;
    color: var(--texte-secondaire);
}

.liste-seances {
    display: flex;
    gap: 12px;
    flex-direction: column;
}

.carte-seance {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid var(--bordure);
    border-radius: 11px;
}

.informations-seance {
    display: flex;
    gap: 15px;
    align-items: center;
}

.informations-seance h4,
.informations-seance p {
    margin: 0;
}

.informations-seance p {
    margin-top: 5px;
    color: var(--texte-secondaire);
}

.date-seance {
    min-width: 135px;
    padding: 10px;
    color: white;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    background: var(--anthracite);
    border-radius: 8px;
}

.resume-seance {
    display: flex;
    gap: 15px;
    align-items: center;
}

.badge-seance-realisee,
.badge-seance-annulee {
    display: inline-block;
    padding: 7px 11px;
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
    border-radius: 999px;
}

.badge-seance-realisee {
    color: #166534;
    background: #dcfce7;
    border: 1px solid #86efac;
}

.badge-seance-annulee {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fca5a5;
}

/* =========================
   DOCUMENT ET COMMENTAIRE
   DES SÉANCES
========================= */

.champ-formulaire textarea {
    width: 100%;
    padding: 10px;
    color: var(--texte-principal);
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    background: white;
    border: 1px solid var(--bordure);
    border-radius: 7px;
}

.champ-formulaire textarea:focus {
    border-color: var(--orange-fonce);
    outline: none;
}

.aide-fichier {
    display: block;
    margin-top: 6px;
    color: var(--texte-secondaire);
    font-size: 12px;
}

.fichier-seance-actuel {
    padding: 10px;
    margin-top: 10px;
    color: var(--anthracite);
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 8px;
}

.commentaire-staff {
    max-width: 650px;
    white-space: pre-line;
}

.bouton-document-seance {
    display: inline-block;
    padding: 7px 11px;
    margin-top: 9px;
    color: var(--anthracite);
    font-family: inherit;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    background: white;
    border: 1px solid var(--anthracite);
    border-radius: 7px;
}

.bouton-document-seance:hover {
    color: white;
    background: var(--anthracite);
}

/* =========================
   THÈMES ET CARTES MODERNES
========================= */

.ligne-theme-couleur {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px;
    gap: 14px;
}

.champ-couleur-theme input[type="color"] {
    width: 100%;
    height: 42px;
    padding: 4px;
    cursor: pointer;
    background: white;
    border: 1px solid var(--bordure);
    border-radius: 7px;
}

.entete-historique-seances {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 18px;
}

.entete-historique-seances h3 {
    margin: 0 0 5px;
}

.filtre-theme-seance {
    display: flex;
    min-width: 220px;
    flex-direction: column;
}

.filtre-theme-seance label {
    margin-bottom: 5px;
    color: var(--anthracite);
    font-size: 13px;
    font-weight: bold;
}

.filtre-theme-seance select {
    width: 100%;
    margin: 0;
}

.carte-seance-moderne {
    position: relative;
    overflow: hidden;
    background: white;
    border: 1px solid var(--bordure);
    border-left: 7px solid var(--couleur-theme);
    box-shadow:
        0 5px 15px rgba(15, 23, 42, 0.06);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.carte-seance-moderne:hover {
    box-shadow:
        0 10px 24px rgba(15, 23, 42, 0.11);
    transform: translateY(-2px);
}

.carte-seance-moderne .date-seance {
    background: var(--couleur-theme);
}

.theme-seance {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 6px 10px;
    margin-top: 8px;
    color: var(--couleur-theme);
    font-size: 13px;
    font-weight: bold;
    background: color-mix(
        in srgb,
        var(--couleur-theme) 12%,
        white
    );
    border-radius: 999px;
}

.pastille-theme {
    width: 10px;
    height: 10px;
    flex-shrink: 0;
    background: var(--couleur-theme);
    border-radius: 50%;
}

/* =========================================
   MODULE MATCHS
========================================= */

.formulaire-match,
.historique-matchs {
    margin-bottom: 24px;
}

.grille-formulaire-match {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr)
        110px;
    gap: 16px;
}

.grille-formulaire-match .champ-large {
    grid-column: 1 / -1;
}

.champ-couleur-match input[type="color"] {
    width: 100%;
    height: 42px;
    padding: 4px;
    cursor: pointer;
    background: white;
    border: 1px solid var(--bordure);
    border-radius: 7px;
}

.grille-score {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        30px
        minmax(0, 1fr);
    gap: 12px;
    align-items: flex-end;
}

.separateur-score {
    padding-bottom: 10px;
    color: var(--texte-principal);
    font-size: 22px;
    font-weight: bold;
    text-align: center;
}

.grille-score input {
    text-align: center;
}

.entete-historique-matchs {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 18px;
}

.entete-historique-matchs h3 {
    margin: 0 0 5px;
}

.filtre-competition-match {
    display: flex;
    min-width: 220px;
    flex-direction: column;
}

.filtre-competition-match label {
    margin-bottom: 5px;
    color: var(--anthracite);
    font-size: 13px;
    font-weight: bold;
}

.etat-vide {
    padding: 40px 20px;
    color: var(--texte-secondaire);
    text-align: center;
    background: #f8fafc;
    border: 1px dashed var(--bordure);
    border-radius: 10px;
}

.icone-etat-vide {
    margin-bottom: 10px;
    font-size: 38px;
}

.etat-vide h4 {
    margin: 0 0 6px;
    color: var(--texte-principal);
}

.etat-vide p {
    margin: 0;
}
.ligne-competition-couleur {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px;
    gap: 16px;
    align-items: end;
}

/* =========================================
   FEUILLE DE MATCH
========================================= */

.bloc-feuille-match {
    padding: 20px;
    background: #f8fafc;
    border: 1px solid var(--bordure);
    border-radius: 12px;
    margin-top: 25px;
    margin-bottom: 25px;
}

.entete-feuille-match {
    margin-bottom: 16px;
}

.entete-feuille-match h3 {
    margin: 0 0 5px;
}

.entete-feuille-match p {
    margin: 0;
    color: var(--texte-secondaire);
}

.conteneur-tableau-feuille-match {
    width: 100%;
    overflow-x: auto;
    background: white;
    border: 1px solid var(--bordure);
    border-radius: 10px;
}

.tableau-feuille-match {
    width: 100%;
    min-width: 850px;
    border-collapse: collapse;
}

.tableau-feuille-match th,
.tableau-feuille-match td {
    padding: 9px;
    text-align: center;
    border-bottom: 1px solid var(--bordure);
}

.tableau-feuille-match th {
    color: white;
    background: var(--anthracite);
    font-size: 13px;
}

.tableau-feuille-match tbody tr:last-child td {
    border-bottom: 0;
}

.tableau-feuille-match tbody tr:hover {
    background: #f8fafc;
}

.tableau-feuille-match th:nth-child(2),
.tableau-feuille-match td:nth-child(2) {
    min-width: 230px;
    text-align: left;
}

.selection-joueur-match {
    width: 100%;
    min-width: 220px;
}

.statistique-joueur-match {
    width: 58px;
    padding: 7px 4px;
    text-align: center;
}

.badge-role-match {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-height: 30px;
    color: white;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
}

.badge-titulaire {
    background: var(--anthracite);
}

.badge-remplacant {
    background: #64748b;
}

.colonne-capitaine input,
.colonne-carton-rouge input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.colonne-capitaine input:disabled {
    cursor: not-allowed;
    opacity: 0.35;
}

.message-erreur-feuille-match {
    margin: 14px 0 0;
    padding: 11px 14px;
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    font-weight: 600;
}

.colonne-role {
    text-align: center;
    width: 70px;
}

.badge-titulaire,
.badge-remplacant {
    display: inline-block;
    min-width: 40px;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
}

.badge-titulaire {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-remplacant {
    background: #dcfce7;
    color: #15803d;
}

.historique-matchs {
    margin-top: 24px;
}

.entete-historique-matchs {
    margin-bottom: 16px;
}

.ligne-historique-match {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 20px;
    align-items: center;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
}

.infos-historique-match {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.infos-historique-match span {
    color: #6b7280;
    font-size: 14px;
}

.score-historique-match {
    min-width: 90px;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
}

.actions-historique-match {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.message-vide {
    padding: 24px;
    color: #6b7280;
    text-align: center;
}

@media (max-width: 800px) {
    .ligne-historique-match {
        grid-template-columns: 1fr;
    }

    .score-historique-match {
        text-align: left;
    }
}

.actions-historique-match {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.bouton-secondaire,
.bouton-danger {
    padding: 8px 12px;
    border: none;
    border-radius: 7px;
    font-weight: 600;
    cursor: pointer;
}

.bouton-secondaire {
    background: #e5e7eb;
    color: #1f2937;
}

.bouton-secondaire:hover {
    background: #d1d5db;
}

.bouton-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.bouton-danger:hover {
    background: #fecaca;
}

/* =====================================================
   MODULE STATISTIQUES
   ===================================================== */

.module-statistiques {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.entete-module h1 {
    margin: 0;
    font-size: 2rem;
}

.entete-module p {
    margin: 6px 0 0;
    color: #64748b;
}

.cartes-statistiques {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(170px, 1fr));
    gap: 16px;
}

.carte-statistique {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow:
        0 4px 12px rgba(15, 23, 42, 0.06);
}

.icone-statistique {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    background: #eff6ff;
    border-radius: 12px;
    font-size: 1.4rem;
}

.carte-statistique div {
    display: flex;
    flex-direction: column;
}

.carte-statistique strong {
    font-size: 1.5rem;
    color: #0f172a;
}

.carte-statistique span:last-child {
    color: #64748b;
    font-size: 0.9rem;
}

.grille-statistiques {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.bloc-classement {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow:
        0 4px 12px rgba(15, 23, 42, 0.06);
}

.titre-classement {
    padding: 18px 20px;
    border-bottom: 1px solid #e2e8f0;
}

.titre-classement h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 1.1rem;
}

.tableau-statistiques {
    display: flex;
    flex-direction: column;
}

.ligne-statistique {
    display: grid;
    grid-template-columns:
        38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 13px 20px;
    border-bottom: 1px solid #f1f5f9;
}

.ligne-statistique:last-child {
    border-bottom: none;
}

.position-statistique {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    background: #f1f5f9;
    border-radius: 50%;
    font-weight: 700;
}

.identite-statistique {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.identite-statistique strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.identite-statistique small {
    color: #64748b;
}

.valeur-statistique {
    font-weight: 700;
    color: #1d4ed8;
    white-space: nowrap;
}

.cartons-statistique {
    display: flex;
    gap: 10px;
}

.aucune-statistique {
    margin: 0;
    padding: 30px 20px;
    color: #64748b;
    text-align: center;
}

.cartons-joueur {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.lien-joueur-statistique {
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

.lien-joueur-statistique:hover strong {
    text-decoration: underline;
}

.lien-joueur-statistique:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
    border-radius: 4px;
}

.filtre-periode-statistiques {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0 20px;
}

.filtre-periode-statistiques select {
    min-width: 190px;
}

.rapport-match-rapide {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 12px;
    padding: 16px;
    border-top: 1px solid #d6d6d6;
}

.rapport-match-contenu {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rapport-match-entete {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.rapport-match-entete h3 {
    margin: 0;
}

.grille-rapport-match {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(180px, 1fr)
        );
    gap: 12px;
}

.grille-rapport-match > div {
    padding: 12px;
    border: 1px solid #dddddd;
    border-radius: 8px;
}

.grille-rapport-match h4,
.commentaire-rapport-match h4 {
    margin: 0 0 8px;
}

.liste-rapport-match {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.liste-rapport-match li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.commentaire-rapport-match {
    padding: 12px;
    border-left: 4px solid currentColor;
    background: rgba(0, 0, 0, 0.03);
}

.commentaire-rapport-match p {
    margin: 0;
    white-space: pre-wrap;
}

.information-rapport-vide {
    margin: 0;
    opacity: 0.7;
}

.entete-page-calendrier {
    margin-bottom: 20px;
}

.entete-page-calendrier h2 {
    margin-bottom: 5px;
}

.entete-page-calendrier p {
    margin: 0;
}

.barre-calendrier {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.titre-mois-calendrier {
    margin: 0 0 15px;
    text-align: center;
    text-transform: capitalize;
}

.legende-calendrier {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
}

.legende-evenement {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.pastille-calendrier {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.pastille-calendrier.match {
    background: #2563eb;
}

.pastille-calendrier.entrainement {
    background: #16a34a;
}

.grille-calendrier {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border-top: 1px solid #d7dce3;
    border-left: 1px solid #d7dce3;
}

.jour-semaine-calendrier {
    padding: 10px 5px;
    border-right: 1px solid #d7dce3;
    border-bottom: 1px solid #d7dce3;
    background: #eef1f5;
    font-weight: bold;
    text-align: center;
}

.case-calendrier {
    min-height: 115px;
    padding: 7px;
    border-right: 1px solid #d7dce3;
    border-bottom: 1px solid #d7dce3;
    background: #ffffff;
    overflow: hidden;
}

.case-calendrier-vide {
    background: #f5f6f8;
}

.jour-calendrier-actuel {
    background: #fff8dc;
    box-shadow: inset 0 0 0 2px #e6b800;
}

.numero-jour-calendrier {
    width: 27px;
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    border-radius: 50%;
    font-weight: bold;
}

.jour-calendrier-actuel
.numero-jour-calendrier {
    background: #e6b800;
    color: #ffffff;
}

.evenements-jour-calendrier {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.evenement-calendrier {
    width: 100%;
    padding: 5px 6px;
    border: 0;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    font-size: 11px;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.evenement-match {
    background: #dbeafe;
    color: #1e3a8a;
}

.evenement-entrainement {
    background: #dcfce7;
    color: #166534;
}

.evenement-calendrier:hover {
    filter: brightness(0.96);
}

@media (max-width: 800px) {
    .grille-calendrier {
        min-width: 760px;
    }

    #calendrier {
        overflow-x: auto;
    }

    .case-calendrier {
        min-height: 100px;
    }
}

.fenetre-calendrier {
    width: min(520px, calc(100% - 32px));
    max-height: 85vh;
    padding: 0;
    border: 0;
    border-radius: 14px;
    overflow: auto;
}

.fenetre-calendrier::backdrop {
    background: rgba(15, 23, 42, 0.65);
}

.entete-fenetre-calendrier {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.entete-fenetre-calendrier h3 {
    margin: 0;
}

.bouton-fermer-calendrier {
    border: 0;
    background: transparent;
    font-size: 1.2rem;
    cursor: pointer;
}

#contenuFenetreCalendrier {
    padding: 20px;
}

.actions-fenetre-calendrier {
    display: flex;
    gap: 10px;
    padding: 0 20px 20px;
}

.details-calendrier {
    display: grid;
    gap: 12px;
    margin: 0;
}

.details-calendrier div {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
}

.details-calendrier dt {
    font-weight: 700;
}

.details-calendrier dd {
    margin: 0;
}

.case-calendrier[data-date] {
    cursor: pointer;
}

@media (max-width: 800px) {
    #zoneCalendrier {
        overflow-x: auto;
    }

    .barre-calendrier {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .barre-calendrier button {
        width: 100%;
    }

    .grille-calendrier {
        min-width: 760px;
    }

    .titre-mois-calendrier {
        position: sticky;
        left: 0;
    }
}

@media (max-width: 520px) {
    .actions-fenetre-calendrier {
        flex-direction: column;
    }

    .actions-fenetre-calendrier button {
        width: 100%;
    }

    .details-calendrier div {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .fenetre-calendrier {
        width: calc(100% - 20px);
    }
}

.dashboard-manager {
    display: grid;
    gap: 24px;
}

.bloc-dashboard {
    display: grid;
    gap: 18px;
}

.entete-bloc-dashboard {
    padding-bottom: 10px;
    border-bottom: 1px solid;
}

.entete-bloc-dashboard h3 {
    margin: 0;
}

.grille-resume-dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.carte-resume-dashboard,
.carte-activite-dashboard {
    padding: 20px;
    border: 1px solid;
    border-radius: 12px;
}

.carte-resume-dashboard {
    display: flex;
    align-items: center;
    gap: 14px;

    background: var(--anthracite);
    color: #ffffff;

    border: none;
    border-radius: 12px;
    padding: 20px;
}

.carte-resume-dashboard .libelle-dashboard {
    color: rgba(255, 255, 255, 0.85);
}

.carte-resume-dashboard .valeur-dashboard {
    color: #ffffff;
}

.carte-resume-dashboard .icone-dashboard {
    font-size: 2rem;
}

.icone-dashboard {
    font-size: 1.8rem;
}

.carte-resume-dashboard div {
    display: grid;
    gap: 3px;
}

.valeur-dashboard {
    font-size: 1.7rem;
}

.libelle-dashboard {
    font-size: 0.95rem;
}

.zone-prochain-match-dashboard {
    display: grid;
}

.grille-activites-dashboard {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.carte-activite-dashboard {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.titre-activite-dashboard {
    display: flex;
    align-items: center;
    gap: 10px;
}

.titre-activite-dashboard h4 {
    margin: 0;
    font-size: 1.1rem;
}

.carte-activite-dashboard p {
    margin: 0;
}

.adversaire-dashboard {
    font-size: 1.1rem;
}

.score-dashboard {
    font-size: 1.7rem;
    font-weight: 700;
}

.commentaire-dashboard {
    display: grid;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid;
}

.commentaire-dashboard p {
    white-space: pre-line;
}

.indication-clic-dashboard {
    display: block;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid;
    font-size: 0.9rem;
    font-style: italic;
}

.carte-dashboard-cliquable {
    cursor: pointer;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.carte-dashboard-cliquable:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgb(0 0 0 / 12%);
}

.carte-dashboard-cliquable:focus-visible {
    outline: 2px solid;
    outline-offset: 3px;
}

.message-dashboard-vide {
    margin: 0;
    font-style: italic;
}

@media (max-width: 850px) {
    .grille-resume-dashboard {
        grid-template-columns: 1fr;
    }

    .grille-activites-dashboard {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .carte-resume-dashboard,
    .carte-activite-dashboard {
        padding: 16px;
    }

    .valeur-dashboard {
        font-size: 1.4rem;
    }

    .score-dashboard {
        font-size: 1.4rem;
    }
}

.entete-bloc-dashboard {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.derniere-synchronisation-dashboard {
    font-size: 0.85rem;
    opacity: 0.75;
}

@media (max-width: 600px) {
    .entete-bloc-dashboard {
        align-items: flex-start;
        flex-direction: column;
    }
}