body.theme-modern {
    --vf-primary: #57b8ff;
    --vf-primary-deep: #1d7fd1;
    --vf-primary-soft: #e4f4ff;
    --vf-accent: #0e2740;
    --vf-surface: rgba(255, 255, 255, 0.88);
    --vf-surface-strong: #ffffff;
    --vf-border: rgba(29, 127, 209, 0.14);
    --vf-shadow: 0 18px 40px rgba(15, 54, 92, 0.12);
    background:
        radial-gradient(circle at top left, rgba(87, 184, 255, 0.26), transparent 30%),
        radial-gradient(circle at top right, rgba(8, 49, 84, 0.12), transparent 24%),
        linear-gradient(180deg, #eef8ff 0%, #f8fbff 46%, #eef5fb 100%);
    color: #17324a;
}

.theme-modern .site-main {
    min-height: calc(100vh - 72px);
}

.theme-modern .site-shell {
    position: relative;
}

.theme-modern .site-shell::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 180px;
    height: 180px;
    border-radius: 999px;
    background: rgba(87, 184, 255, 0.15);
    filter: blur(12px);
    pointer-events: none;
}

.theme-modern .site-navbar {
    background: linear-gradient(135deg, rgba(17, 69, 112, 0.96), rgba(87, 184, 255, 0.92)) !important;
    backdrop-filter: blur(14px);
}

.theme-modern .site-brand {
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.theme-modern .navbar-nav .nav-link,
.theme-modern .navbar-nav .dropdown-toggle,
.theme-modern .menuName {
    color: rgba(255, 255, 255, 0.92) !important;
}

.theme-modern .container,
.theme-modern .container-fluid,
.theme-modern .content-panel,
.theme-modern .card,
.theme-modern .modal-content,
.theme-modern .dropdown-menu,
.theme-modern .table,
.theme-modern .list-group-item,
.theme-modern .accordion-item,
.theme-modern .ea,
.theme-modern .main-content,
.theme-modern .content-wrapper {
    border-color: var(--vf-border);
}

.theme-modern .card,
.theme-modern .modal-content,
.theme-modern .dropdown-menu,
.theme-modern .accordion-item,
.theme-modern .list-group-item,
.theme-modern .table,
.theme-modern .content-panel,
.theme-modern .ea .content,
.theme-modern .ea .main-content,
.theme-modern .ea .content-top,
.theme-modern .ea .sidebar,
.theme-modern .site-shell > .row > [class*='col-'] > .border,
.theme-modern .site-shell > .border {
    background: var(--vf-surface);
    box-shadow: var(--vf-shadow);
    border-radius: 20px;
}

/*
    `position: relative` suffit à faire passer le contenu au-dessus du cercle
    décoratif `.site-shell::before` : les deux sont positionnés sans `z-index`,
    ils sont donc peints dans l'ordre du DOM et le pseudo-élément vient en premier.

    Surtout, ne pas ajouter de `z-index` ici : ça créerait un contexte d'empilement
    autour du contenu de la page, dans lequel se retrouveraient enfermées les
    modales créées par `createModal()`. Le backdrop Bootstrap, lui, est ajouté au
    `<body>` avec `z-index: 1050` : il passerait devant la modale et bloquerait
    les clics, y compris sur le bouton de fermeture.
*/
.theme-modern .ea .sidebar,
.theme-modern .ea .content-top,
.theme-modern .ea .main-content,
.theme-modern .ea-content,
.theme-modern .site-shell > *:not(script):not(style) {
    position: relative;
}

.theme-modern .btn-primary,
.theme-modern .bg-primary {
    background-color: var(--vf-primary-deep) !important;
    border-color: var(--vf-primary-deep) !important;
}

.theme-modern .btn-outline-primary {
    color: var(--vf-primary-deep);
    border-color: rgba(29, 127, 209, 0.35);
}

.theme-modern .btn-outline-primary:hover,
.theme-modern .btn-outline-primary.active,
.theme-modern .btn-outline-primary:active {
    color: #fff;
    background-color: var(--vf-primary-deep);
    border-color: var(--vf-primary-deep);
}

.theme-modern .btn-light,
.theme-modern .btn-outline-light:hover,
.theme-modern .btn-outline-light.active {
    color: var(--vf-accent);
}

.theme-modern .btn,
.theme-modern .form-control,
.theme-modern .form-select,
.theme-modern .input-group-text,
.theme-modern .nav-tabs .nav-link,
.theme-modern .page-link {
    border-radius: 14px;
}

.theme-modern .form-control,
.theme-modern .form-select,
.theme-modern .input-group-text,
.theme-modern .dropdown-menu,
.theme-modern .table,
.theme-modern .list-group-item,
.theme-modern .accordion-item {
    border-color: var(--vf-border);
}

.theme-modern .form-control:focus,
.theme-modern .form-select:focus {
    border-color: rgba(87, 184, 255, 0.75);
    box-shadow: 0 0 0 0.25rem rgba(87, 184, 255, 0.18);
}

.theme-modern .table {
    overflow: hidden;
}

.theme-modern .table > :not(caption) > * > * {
    background-color: transparent;
    border-bottom-color: rgba(23, 50, 74, 0.08);
}

.theme-modern .table thead,
.theme-modern .table-light {
    background: linear-gradient(180deg, rgba(87, 184, 255, 0.16), rgba(87, 184, 255, 0.06));
}

.theme-modern .nav-tabs {
    gap: 0.35rem;
    border-bottom: 0;
}

.theme-modern .nav-tabs .nav-link {
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.6);
    color: #35526b;
}

.theme-modern .nav-tabs .nav-link.active,
.theme-modern .nav-tabs .nav-item.show .nav-link {
    background: var(--vf-surface-strong);
    border-color: rgba(87, 184, 255, 0.25);
    color: var(--vf-primary-deep);
}

.theme-modern .dropdown-menu {
    padding: 0.6rem;
}

.theme-modern .dropdown-item {
    border-radius: 12px;
    padding-block: 0.55rem;
}

.theme-modern .dropdown-item:hover,
.theme-modern .dropdown-item:focus {
    background: var(--vf-primary-soft);
    color: var(--vf-accent);
}

.theme-modern .notification--num,
.theme-modern .badge,
.theme-modern .bg-danger {
    box-shadow: 0 8px 18px rgba(190, 41, 72, 0.18);
}

.theme-modern .pagination {
    gap: 0.35rem;
}

.theme-modern .page-link {
    border: 0;
    color: #35526b;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 22px rgba(15, 54, 92, 0.08);
}

.theme-modern .page-item.active .page-link {
    background: linear-gradient(135deg, var(--vf-primary-deep), var(--vf-primary));
}

.theme-modern .ea .sidebar {
    background: linear-gradient(180deg, #0f385d 0%, #114970 42%, #2f8fe4 100%);
    color: rgba(255, 255, 255, 0.92);
}

.theme-modern .ea .sidebar a,
.theme-modern .ea .sidebar-menu .menu-item > a {
    color: rgba(255, 255, 255, 0.88);
}

.theme-modern .ea .content-top {
    margin: 1rem;
    padding: 1rem 1.25rem;
}

.theme-modern .ea .main-content {
    margin: 1rem;
    padding: 1rem;
}

.theme-modern .ea .content-top,
.theme-modern .ea .main-content,
.theme-modern .ea .sidebar {
    box-shadow: var(--vf-shadow);
}

.theme-modern .ea .user-details,
.theme-modern .ea .dropdown-settings-button {
    border-radius: 999px;
}

@media (max-width: 991.98px) {
    .theme-modern .site-shell {
        padding-inline: 0.15rem;
    }

    /*
     * `.row` fixe lui-même `--bs-gutter-x` (1.5rem par défaut, quel que soit
     * `.g-*`), donc ce padding réduit ne compense plus la marge négative de
     * `calc(var(--bs-gutter-x) * -.5)` d'une ligne Bootstrap : la ligne (et ses
     * colonnes) dépassait alors le viewport de chaque côté et provoquait un
     * scroll horizontal sur toute la page. On réduit le gutter en proportion.
     */
    .theme-modern .site-shell .row {
        --bs-gutter-x: 0.3rem;
    }

    .theme-modern .ea .content-top,
    .theme-modern .ea .main-content {
        margin: 0.75rem;
    }
}

.theme-modern .vf-panel {
    background: var(--vf-surface);
    border: 1px solid var(--vf-border);
    border-radius: 24px;
    box-shadow: var(--vf-shadow);
    padding: 1.5rem;
}

/*
 * `position: relative` obligatoire : sans lui, le cercle décoratif ::after se positionne
 * par rapport à la section parente et échappe donc à l'`overflow: hidden` de ce bloc.
 * Son `right: -3rem` débordait alors du viewport et provoquait un scroll horizontal.
 */
.theme-modern .vf-hero-main {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(228, 244, 255, 0.95)),
        radial-gradient(circle at top right, rgba(87, 184, 255, 0.2), transparent 35%);
}

/*
    Cercle décoratif du bandeau. `pointer-events: none` est indispensable, pas
    cosmétique : positionné, il est peint après le contenu en flux normal, et sans
    cette règle il capte les clics sur les 180px de son coin bas-droit. En portrait,
    la barre d'onglets d'une équipe passe juste dessous et ses derniers boutons —
    Statistiques, Paramètres — devenaient inertes.

    Même précaution que sur `.site-shell::before`. Toute nouvelle décoration en
    `::before` / `::after` positionnée au-dessus du contenu doit la reprendre.
*/
.theme-modern .vf-hero-main::after {
    content: '';
    position: absolute;
    inset: auto -3rem -4rem auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(87, 184, 255, 0.18), rgba(29, 127, 209, 0.05));
    pointer-events: none;
}

.theme-modern .vf-eyebrow {
    display: inline-flex;
    margin-bottom: 0.9rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(87, 184, 255, 0.15);
    color: var(--vf-primary-deep);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.theme-modern .vf-hero-title,
.theme-modern .vf-section-title,
.theme-modern .vf-article-title {
    color: #10293e;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.theme-modern .vf-hero-title {
    font-size: clamp(2rem, 4vw, 3.3rem);
    line-height: 1;
    max-width: 14ch;
}

.theme-modern .vf-hero-text {
    max-width: 62ch;
    font-size: 1.03rem;
    color: #436076;
}

.theme-modern .vf-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.theme-modern .vf-side-panel {
    display: flex;
    flex-direction: column;
}

.theme-modern .vf-panel-header,
.theme-modern .vf-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.theme-modern .vf-panel-title,
.theme-modern .vf-section-title {
    margin: 0;
}

.theme-modern .vf-section-title {
    font-size: clamp(1.35rem, 2.4vw, 2rem);
}

.theme-modern .vf-badge-info,
.theme-modern .vf-badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.82rem;
}

.theme-modern .vf-badge-info {
    background: rgba(16, 41, 62, 0.08);
    color: #27465f;
}

.theme-modern .vf-badge-soft {
    background: rgba(87, 184, 255, 0.14);
    color: var(--vf-primary-deep);
}

.theme-modern .vf-badge-soft-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #b42333;
}

.theme-modern .vf-badge-soft-success {
    background: rgba(47, 163, 107, 0.12);
    color: #1f7a4d;
}

.theme-modern .vf-badge-soft-warning {
    background: rgba(255, 193, 7, 0.18);
    color: #7a5300;
}

/*
    `vf-badge-soft-danger` ne figurait pas dans la déclaration groupée du haut :
    employé seul (page des licences), il ne rendait qu'un texte rouge, sans la
    forme de pastille. Les trois variantes la reçoivent ici.
*/
.theme-modern .vf-badge-soft-danger,
.theme-modern .vf-badge-soft-success,
.theme-modern .vf-badge-soft-warning {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.82rem;
}

.theme-modern .vf-stack-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
}

.theme-modern .vf-stack-list-compact {
    gap: 0.55rem;
}

.theme-modern .vf-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(87, 184, 255, 0.1);
}

/*
 * Sans `min-width: 0`, un enfant flex refuse par défaut de rétrécir sous la
 * largeur de son contenu (ex: un titre d'annonce ou de sondage long) : la ligne
 * dépasse alors la carte, et donc le viewport en mobile.
 */
.theme-modern .vf-list-item > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.theme-modern .vf-list-item:hover {
    background: #fff;
    color: var(--vf-accent);
}

.theme-modern .vf-empty-state,
.theme-modern .vf-empty-panel {
    color: #64798c;
}

.theme-modern .vf-collapse-link {
    font-weight: 600;
    color: var(--vf-primary-deep);
    text-decoration: none;
}

/*
 * `minmax(0, 1fr)` explicite : sans lui, la piste de grille auto-implicite se
 * dimensionne sur le contenu (ex: une URL longue sans espace dans un article),
 * ce qui pouvait dépasser la largeur du viewport en mobile et provoquer un
 * scroll horizontal sur toute la page.
 */
/*
 * `align-items: start` : par défaut, une grille CSS étire chaque item à la
 * hauteur de la ligne (la carte la plus haute des deux colonnes), ce qui
 * laissait un grand vide blanc sous les cartes au contenu court. Chaque carte
 * garde ainsi sa hauteur naturelle.
 */
.theme-modern .vf-article-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 1.25rem;
}

.theme-modern .vf-article-card {
    padding: 1.35rem 1.35rem 1rem;
    min-width: 0;
}

.theme-modern .vf-article-title {
    font-size: 1.35rem;
    margin: 0.75rem 0 0;
}

.theme-modern .vf-article-content {
    color: #29465d;
    overflow-wrap: anywhere;
}

.theme-modern .vf-article-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(16, 41, 62, 0.08);
    color: #667d91;
    font-size: 0.9rem;
    font-style: italic;
    text-align: right;
}

.theme-modern .vf-article-icon {
    font-size: 1.1rem;
}

/*
 * `overflow: auto` et pas `hidden` : ce conteneur porte aussi `table-responsive-md`,
 * dont l'`overflow-x: auto` perdait le match de spécificité. Les tableaux larges
 * étaient donc tronqués en portrait au lieu de défiler.
 */
.theme-modern .vf-table-wrap {
    overflow: auto;
    border-radius: 22px;
    border: 1px solid var(--vf-border);
}

.theme-modern .vf-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    background: var(--vf-surface-strong);
    border: 1px solid var(--vf-border);
    font-size: 0.78rem;
    white-space: nowrap;
}

/*
 * Vue calendrier mensuel (league/show.calendar, thème modern) : mini-calendriers
 * façon Outlook/Teams, 2 par ligne en desktop (voir `row-cols-lg-2` côté template),
 * empilés en mobile.
 */
.theme-modern .vf-mini-month {
    padding: 1.25rem;
}

.theme-modern .vf-mini-month-header {
    font-weight: 700;
    margin-bottom: 0.85rem;
    color: var(--vf-accent);
}

.theme-modern .vf-mini-month-dow-row,
.theme-modern .vf-mini-month-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
}

.theme-modern .vf-mini-month-dow-row {
    margin-bottom: 0.4rem;
}

.theme-modern .vf-mini-month-week {
    padding-bottom: 2px;
    margin-bottom: 2px;
}

.theme-modern .vf-mini-month-week:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.theme-modern .vf-mini-month-dow {
    text-align: center;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5b7489;
}

.theme-modern .vf-mini-month-cell {
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 4px;
    gap: 3px;
    border: 1px solid var(--vf-border);
    border-radius: 10px;
}

/* Jours du mois précédent/suivant qui complètent la première/dernière semaine. */
.theme-modern .vf-mini-month-cell-outside {
    background: rgba(91, 116, 137, 0.1);
}

.theme-modern .vf-mini-month-cell-outside .vf-mini-month-day {
    color: #8ea3b3;
}

/*
 * `position: relative` + `z-index` : le numéro doit rester lisible même quand la
 * pile de tubes de la semaine (`.vf-mini-month-tubes`) grandit assez pour
 * remonter jusqu'en haut de la case. Sans stacking context propre, ce descendant
 * non positionné peindrait avant les tubes (positionnés) et se ferait recouvrir.
 */
.theme-modern .vf-mini-month-day {
    position: relative;
    z-index: 2;
    font-size: 0.82rem;
}

/*
 * Un "tube" par étiquette active de la semaine, superposé aux cases du lundi au
 * vendredi (voir le commentaire dans le template) plutôt que placé en dessous :
 * `grid-row: 1` le fait chevaucher volontairement les 5 cases (et leur bordure),
 * `align-self: end` le colle en bas de la case et le fait grandir vers le haut.
 * `z-index: 1` : passe au-dessus des bordures de case (non positionnées) mais
 * reste sous le numéro du jour (`z-index: 2`).
 */
/*
 * `padding-top` : CSS Grid dimensionne la ligne de la semaine sur le MAX de la
 * hauteur propre de chaque item qui s'y superpose (la case du jour et ce bloc de
 * tubes), pas sur leur somme — faire grandir la ligne pour les tubes seuls ne
 * réserve donc aucune place pour le numéro au-dessus. Ce padding-top (hauteur du
 * numéro + sa marge) fait porter cette réserve par le bloc de tubes lui-même,
 * ce qui agrandit la ligne d'autant et laisse le numéro non recouvert.
 */
.theme-modern .vf-mini-month-tubes {
    display: flex;
    flex-direction: column-reverse;
    align-self: end;
    position: relative;
    z-index: 1;
    gap: 2px;
    padding: 30px 5px 4px;
}

/*
 * Bordure systématique : certaines étiquettes (ex: "Match poule 10", cyan) se
 * confondent sinon avec le fond clair du thème modern.
 */
.theme-modern .vf-mini-month-tube {
    height: 9px;
    border-radius: 999px;
    border: 1px solid var(--vf-accent);
}

/*
 * `aspect-ratio: 1 / 1` calcule la hauteur de la case à partir de la largeur de
 * colonne : sur un petit écran (~50px de colonne), une case carrée n'a pas la
 * place pour le numéro du jour ET plusieurs tubes empilés sans se chevaucher
 * (voir capture partagée). On retire la contrainte carrée pour laisser la
 * hauteur suivre le contenu, avec un plancher pour rester lisible.
 */
@media (max-width: 767.98px) {
    .theme-modern .vf-mini-month-cell {
        aspect-ratio: auto;
        min-height: 2.75rem;
    }
}

.theme-modern .vf-league-table,
.theme-modern .vf-week-table,
.theme-modern .vf-team-table {
    margin-bottom: 0;
}

.theme-modern .vf-league-table thead th,
.theme-modern .vf-week-table thead th,
.theme-modern .vf-team-table thead th {
    padding: 1rem 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.78rem;
    color: #476176;
}

.theme-modern .vf-league-table tbody td,
.theme-modern .vf-week-table tbody td,
.theme-modern .vf-team-table tbody td {
    padding: 1rem;
}

.theme-modern .vf-row-toggle {
    cursor: pointer;
}

.theme-modern .vf-inner-panel {
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(87, 184, 255, 0.12);
}

.theme-modern .vf-match-sheet {
    display: grid;
    gap: 1rem;
}

.theme-modern .vf-match-sheet-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.theme-modern .vf-match-sheet-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #10293e;
}

.theme-modern .vf-match-table thead th {
    background: rgba(87, 184, 255, 0.08);
}

.theme-modern .vf-match-table tbody td {
    background: rgba(255, 255, 255, 0.88);
}

.theme-modern .vf-day-pill,
.theme-modern .vf-team-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.6rem;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--vf-primary-deep), var(--vf-primary));
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
}

.theme-modern .vf-team-card-list {
    display: grid;
    gap: 1rem;
}

.theme-modern .vf-team-card {
    overflow: hidden;
    border: 1px solid rgba(87, 184, 255, 0.14);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 14px 32px rgba(15, 54, 92, 0.08);
}

.theme-modern .vf-team-card-toggle {
    width: 100%;
    border: 0;
    padding: 1rem;
    text-align: left;
    background: transparent;
}

.theme-modern .vf-team-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.theme-modern .vf-team-identity {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.theme-modern .vf-team-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.theme-modern .vf-team-caret {
    color: var(--vf-primary-deep);
    transition: transform 0.18s ease;
}

.theme-modern .vf-team-card-toggle[aria-expanded='true'] .vf-team-caret {
    transform: rotate(90deg);
}

.theme-modern .vf-team-name {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #10293e;
    overflow-wrap: anywhere;
}

.theme-modern .vf-team-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.theme-modern .vf-team-stats > div {
    padding: 0.85rem;
    border-radius: 16px;
    background: rgba(87, 184, 255, 0.08);
}

.theme-modern .vf-team-stat-label {
    display: block;
    margin-bottom: 0.3rem;
    color: #577086;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.theme-modern .vf-team-card-body {
    padding: 0 1rem 1rem;
}

.theme-modern .vf-match-card-list {
    display: grid;
    gap: 0.85rem;
}

.theme-modern .vf-match-card {
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(87, 184, 255, 0.12);
}

.theme-modern .vf-match-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.theme-modern .vf-match-card-top > *:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.theme-modern .vf-match-card-actions {
    flex-shrink: 0;
}

/* championnat.css impose une largeur fixe de 300px, trop large pour un écran portrait. */
.theme-modern .cta-btn {
    max-width: 100%;
}

/* Le menu d'actions d'une carte de match s'élargit à son contenu (sinon il
   reste à la largeur minimale de Bootstrap et chaque libellé passe sur
   plusieurs lignes), sans dépasser l'écran sur mobile ; les boutons prennent
   tous la largeur du plus long. */
.theme-modern .vf-match-card-actions .dropdown-menu {
    width: max-content;
    max-width: calc(100vw - 2rem);
}

.theme-modern .vf-match-card-actions .cta-btn {
    width: 100%;
}

.theme-modern .vf-match-meta {
    display: grid;
    gap: 0.75rem;
    margin: 0;
}

.theme-modern .vf-match-meta > div {
    padding-top: 0.75rem;
    border-top: 1px solid rgba(16, 41, 62, 0.08);
}

.theme-modern .vf-match-meta dt {
    margin-bottom: 0.25rem;
    color: #5b7489;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.theme-modern .vf-match-meta dd {
    margin: 0;
    color: #1a3851;
}

.theme-modern .vf-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.theme-modern .vf-stat-card {
    padding: 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(87, 184, 255, 0.12);
    box-shadow: 0 10px 26px rgba(15, 54, 92, 0.08);
}

.theme-modern .vf-stat-label {
    display: block;
    margin-bottom: 0.25rem;
    color: #5b7489;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.theme-modern .vf-stat-value {
    display: block;
    font-size: 2rem;
    line-height: 1;
    color: #10293e;
}

.theme-modern .vf-stat-value-small {
    font-size: 1.1rem;
    line-height: 1.3;
}

/* --- Onglets des tours de coupe : rail horizontal scrollable --- */
.theme-modern .vf-tab-scroller {
    overflow-x: auto;
    margin-inline: -0.25rem;
    padding: 0.25rem;
}

.theme-modern .vf-round-tabs {
    flex-wrap: nowrap;
    gap: 0.4rem;
}

.theme-modern .vf-round-tabs .nav-link {
    white-space: nowrap;
    border-radius: 999px;
    font-weight: 600;
}

.theme-modern .vf-round-tabs .nav-link.active {
    background: linear-gradient(135deg, var(--vf-primary-deep), var(--vf-primary));
    border-color: transparent;
    color: #fff;
}

/*
    Variante icônes seules, réservée à la barre d'une équipe : les autres
    `.vf-round-tabs` (mon compte, calendriers Ginette et Moustard) n'ont pas
    d'icônes et doivent garder leur libellé à toutes les tailles.

    Sous `md`, les cinq libellés dépassent la largeur disponible et le dernier
    onglet ne se découvre qu'en faisant défiler la barre. On ne garde alors que
    les icônes, réparties à parts égales sur toute la largeur ; le nom accessible
    vient de l'`aria-label` du lien, le libellé masqué ne comptant plus.
*/
@media (max-width: 767.98px) {
    .theme-modern .vf-icon-tabs {
        width: 100%;
    }

    .theme-modern .vf-icon-tabs .nav-item {
        flex: 1 1 0;
    }

    .theme-modern .vf-icon-tabs .nav-link {
        padding-inline: 0.25rem;
        text-align: center;
        font-size: 1.2rem;
    }

    .theme-modern .vf-icon-tabs .vf-nav-label {
        display: none;
    }
}

/* --- Accordéon poule principale / consolante --- */
.theme-modern .vf-accordion {
    display: grid;
    gap: 0.75rem;
}

.theme-modern .vf-accordion .accordion-item {
    border: 1px solid var(--vf-border);
}

.theme-modern .vf-accordion .accordion-button {
    border-radius: 20px;
    background: transparent;
    font-weight: 700;
    color: #10293e;
}

.theme-modern .vf-accordion .accordion-button:not(.collapsed) {
    background: rgba(87, 184, 255, 0.12);
    box-shadow: none;
}

.theme-modern .vf-accordion .accordion-body {
    padding: 1rem;
}

.theme-modern .vf-notice {
    padding: 0.85rem 1rem;
    border-radius: 16px;
    font-weight: 600;
}

.theme-modern .vf-notice-warning {
    background: rgba(255, 193, 7, 0.16);
    border: 1px solid rgba(255, 193, 7, 0.35);
    color: #7a5300;
}

.theme-modern .vf-notice-info {
    background: var(--vf-primary-soft);
    border: 1px solid var(--vf-border);
    color: #1c3d59;
}

/* --- Page d'accueil d'une équipe : opposition et score --- */

/*
    Empilé partout : deux noms d'équipe côte à côte débordent en portrait, et la
    lecture verticale reste bonne en large. Le `VS` sert de séparateur.
*/
.theme-modern .vf-versus-block {
    display: grid;
    gap: 0.5rem;
}

.theme-modern .vf-versus-team {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(87, 184, 255, 0.12);
    font-weight: 700;
    overflow-wrap: anywhere;
}

/* L'équipe dont on consulte la page, pour se repérer d'un coup d'œil. */
.theme-modern .vf-versus-mine {
    border-color: var(--vf-primary);
    background: var(--vf-primary-soft);
}

.theme-modern .vf-versus-side {
    flex-shrink: 0;
    color: #5c7a94;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.theme-modern .vf-versus-sep {
    text-align: center;
    color: #5c7a94;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
}

.theme-modern .vf-score-list {
    display: grid;
    gap: 0.5rem;
}

.theme-modern .vf-score-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(87, 184, 255, 0.12);
    overflow-wrap: anywhere;
}

.theme-modern .vf-score-team {
    font-weight: 600;
}

.theme-modern .vf-score-value {
    flex-shrink: 0;
    min-width: 2.25rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    color: #5c7a94;
}

.theme-modern .vf-score-winner {
    border-color: var(--vf-primary);
    background: var(--vf-primary-soft);
}

.theme-modern .vf-score-winner .vf-score-team {
    font-weight: 800;
}

.theme-modern .vf-score-winner .vf-score-value {
    color: var(--vf-primary-deep);
}

/* --- Pages « Divers » : règlement et tutoriel --- */

/*
    Contenu riche saisi via l'éditeur de l'administration. Remplace
    `reglement.css`, que la version moderne ne charge pas.
*/
.theme-modern .vf-rich-text blockquote {
    padding-left: 2rem;
}

.theme-modern .vf-rich-text h2 {
    text-align: center;
}

/*
    Les ancres du tutoriel et du règlement visent des titres qui, sans marge de
    défilement, se retrouvent sous la barre de navigation collante.
*/
.theme-modern .vf-rich-text [id],
.theme-modern .vf-tuto [id] {
    scroll-margin-top: 5rem;
}

.theme-modern .vf-tuto-nav ul {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.92rem;
}

.theme-modern .vf-tuto-nav ul ul {
    padding-left: 0.9rem;
    font-size: 0.88rem;
}

/*
    Sélecteurs limités au sommaire : la version classique posait ces règles sur
    `ul li a` sans préfixe, depuis un `<style>` dans le corps de page — elles
    atteignaient donc aussi les liens du menu principal.
*/
.theme-modern .vf-tuto-nav a {
    color: var(--vf-primary-deep);
    text-decoration: none;
}

.theme-modern .vf-tuto-nav a:hover {
    text-decoration: underline;
}

.theme-modern .vf-tuto-section h3 {
    margin-top: 2rem;
    font-size: 1.3rem;
    font-weight: 800;
    color: #10293e;
}

.theme-modern .vf-tuto-section h4 {
    margin-top: 1.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #27465f;
}

.theme-modern .vf-tuto-img {
    display: block;
    max-width: 100%;
    height: auto;
    margin-bottom: 1rem;
    border-radius: 14px;
    border: 1px solid var(--vf-border);
}

/*
    Bouton de retour en haut. `position: sticky` suffit : il ne quitte jamais le
    flux, et n'a donc pas besoin du `z-index` que portait la version classique.
*/
.theme-modern .vf-tuto-top {
    position: sticky;
    bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    margin-left: auto;
    border-radius: 999px;
    background: var(--vf-surface-strong);
    border: 1px solid var(--vf-border);
    box-shadow: var(--vf-shadow);
    color: var(--vf-primary-deep);
    font-size: 1.3rem;
    text-decoration: none;
}

@media (min-width: 992px) {
    .theme-modern .vf-tuto-nav {
        position: sticky;
        top: 5rem;
        max-height: calc(100vh - 7rem);
        overflow-y: auto;
    }
}

/* --- Annuaire des contacts --- */

.theme-modern .vf-subtitle {
    margin-bottom: 0.75rem;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #476176;
}

.theme-modern .vf-contact-line {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    overflow-wrap: anywhere;
}

.theme-modern .vf-contact-line + .vf-contact-line {
    margin-top: 0.25rem;
}

/* --- Forums --- */

/* La liste défile dans son panneau : les deux colonnes gardent la même hauteur. */
.theme-modern .vf-forum-list {
    max-height: min(60vh, 32rem);
    overflow-y: auto;
}

/*
    Disposition de la discussion. Le panneau des membres n'est montré ou caché
    que par la classe `d-none`, que `toogleMember()` bascule : rien d'autre ici
    ne doit conditionner son affichage.
*/
.theme-modern .vf-chat {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.theme-modern .vf-chat-main {
    min-width: 0;
    flex: 1 1 auto;
}

.theme-modern .vf-chat-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.theme-modern .vf-chat-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.theme-modern .vf-chat-title {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: clamp(1.1rem, 2.4vw, 1.5rem);
    font-weight: 800;
    color: #10293e;
    overflow-wrap: anywhere;
}

.theme-modern .vf-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: clamp(18rem, 55vh, 40rem);
    padding: 0.75rem;
    border-radius: 18px;
    border: 1px solid var(--vf-border);
    background: rgba(255, 255, 255, 0.6);
    overflow-y: auto;
}

.theme-modern .vf-chat-composer {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
}

.theme-modern .vf-chat-composer textarea {
    resize: vertical;
}

.theme-modern .vf-chat-send {
    flex-shrink: 0;
    padding-inline: 1rem;
    font-size: 1.2rem;
}

/* --- Bulles de message --- */

.theme-modern .vf-msg {
    max-width: 85%;
    align-self: flex-start;
}

.theme-modern .vf-msg-mine {
    align-self: flex-end;
}

.theme-modern .vf-msg-bubble {
    padding: 0.75rem 1rem;
    border-radius: 18px;
    background: var(--vf-surface-strong);
    border: 1px solid var(--vf-border);
}

.theme-modern .vf-msg-mine .vf-msg-bubble {
    background: linear-gradient(135deg, var(--vf-primary-deep), var(--vf-primary));
    border-color: transparent;
    color: #fff;
}

.theme-modern .vf-msg-system .vf-msg-bubble {
    background: rgba(87, 184, 255, 0.08);
    border-style: dashed;
}

.theme-modern .vf-msg-author {
    margin-bottom: 0.25rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.75;
}

.theme-modern .vf-msg-body {
    overflow-wrap: anywhere;
}

.theme-modern .vf-msg-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.3rem;
    padding-inline: 0.35rem;
    color: #5c7a94;
    font-size: 0.72rem;
}

.theme-modern .vf-msg-seen {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.theme-modern .vf-msg-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 999px;
    background: var(--vf-primary-soft);
    border: 1px solid var(--vf-primary);
    color: var(--vf-primary-deep);
    font-weight: 700;
    cursor: default;
}

/* --- Membres de la discussion --- */

/*
    `addMember()` injecte ici des `<div class="px-2 ft-7">` : la mise en forme
    porte donc sur les enfants directs, pour valoir aussi bien pour les entrées
    rendues côté serveur que pour celles ajoutées sans rechargement.
*/
.theme-modern .vf-forum-members > div {
    padding: 0.4rem 0.6rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(87, 184, 255, 0.1);
    margin-bottom: 0.35rem;
}

.theme-modern .vf-member-results {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.theme-modern .vf-member-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--vf-border);
    border-radius: 14px;
    background: var(--vf-surface-strong);
    cursor: pointer;
}

.theme-modern .vf-member-option:hover {
    border-color: var(--vf-primary);
}

.theme-modern .vf-member-option:has(input:checked) {
    border-color: var(--vf-primary-deep);
    box-shadow: inset 0 0 0 1px var(--vf-primary-deep);
}

.theme-modern .vf-member-option .form-check-input {
    flex-shrink: 0;
    margin-top: 0.15rem;
}

@media (min-width: 992px) {
    .theme-modern .vf-chat {
        flex-direction: row;
        align-items: stretch;
    }

    .theme-modern .vf-chat-aside {
        flex: 0 0 20rem;
        max-width: 20rem;
    }
}

/* --- Paramètres d'une équipe : créneaux horaires --- */

/*
    L'état vide se masque de lui-même dès qu'une ligne apparaît dans le tableau,
    y compris celles que `addTimeSlot()` insère en JavaScript. Pas de message
    résiduel après un ajout, et sans toucher au contrôleur.
*/
.theme-modern .vf-timeslot-block:has(.vf-timeslot-body tr) .vf-timeslot-empty {
    display: none;
}

/*
    Le bouton de suppression garde les classes `fa-solid fa-trash btn btn-danger`
    que `addTimeSlot()` génère : on ne peut pas les changer côté template sans
    désaccorder les lignes ajoutées sans rechargement. On le rhabille donc ici
    pour qu'il ressemble aux autres actions du thème.
*/
.theme-modern .vf-timeslot-table .fa-trash.btn {
    padding: 0.3rem 0.55rem;
    background: transparent;
    border: 1px solid rgba(220, 53, 69, 0.4);
    color: #b42333;
}

.theme-modern .vf-timeslot-table .fa-trash.btn:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #b42333;
}

/* La colonne d'action est la dernière, dans les lignes rendues comme dans les autres. */
.theme-modern .vf-timeslot-table td:last-child,
.theme-modern .vf-timeslot-table th:last-child {
    text-align: right;
    white-space: nowrap;
}

/* --- Calendrier d'une équipe : résultat d'une rencontre --- */

.theme-modern .vf-result {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

/*
    Pastille V / D. La version classique colorait tout le bloc du score en vert
    ou en rouge : ici la couleur se limite à la pastille, ce qui laisse les noms
    d'équipe lisibles sur le fond de la carte.
*/
.theme-modern .vf-result-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.85rem;
}

.theme-modern .vf-result-win {
    background: rgba(47, 163, 107, 0.14);
    color: #1f7a4d;
}

.theme-modern .vf-result-loss {
    background: rgba(220, 53, 69, 0.12);
    color: #b42333;
}

.theme-modern .vf-result-teams {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-width: 0;
    overflow-wrap: anywhere;
}

.theme-modern .vf-result-score {
    flex-shrink: 0;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: rgba(16, 41, 62, 0.06);
    color: #35526b;
    font-weight: 700;
    font-size: 0.85rem;
}

/* --- Légende de qualification --- */
.theme-modern .vf-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    color: #476176;
    font-size: 0.88rem;
}

.theme-modern .vf-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.theme-modern .vf-legend-dot {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 999px;
    flex-shrink: 0;
}

.theme-modern .vf-legend-dot-main {
    background: #2fa36b;
}

.theme-modern .vf-legend-dot-conso {
    background: #e0a12b;
}

.theme-modern .vf-legend-dot-out {
    background: #d1495b;
}

/* --- Classement de coupe : teinte de ligne + pastille de rang --- */
.theme-modern .vf-rank-table tbody tr.vf-rank-row-main td {
    background-color: rgba(47, 163, 107, 0.08);
}

.theme-modern .vf-rank-table tbody tr.vf-rank-row-conso td {
    background-color: rgba(224, 161, 43, 0.1);
}

.theme-modern .vf-rank-table tbody tr.vf-rank-row-out td {
    background-color: rgba(209, 73, 91, 0.08);
}

.theme-modern .vf-rank-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 2rem;
    height: 2rem;
    border-radius: 999px;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
}

.theme-modern .vf-rank-pill-main {
    background: linear-gradient(135deg, #1f8a56, #2fa36b);
}

.theme-modern .vf-rank-pill-conso {
    background: linear-gradient(135deg, #c8871a, #e0a12b);
}

.theme-modern .vf-rank-pill-out {
    background: linear-gradient(135deg, #b03445, #d1495b);
}

.theme-modern .vf-rank-card {
    border-left: 5px solid transparent;
}

.theme-modern .vf-rank-card-main {
    border-left-color: #2fa36b;
}

.theme-modern .vf-rank-card-conso {
    border-left-color: #e0a12b;
}

.theme-modern .vf-rank-card-out {
    border-left-color: #d1495b;
}

.theme-modern .vf-form-panel .form-label {
    font-weight: 600;
    color: #35526b;
}

/*
    Liste de boutons radio présentée en cartes cliquables. Le retrait à gauche
    remplace le `padding-left: 1.5em` de `.form-check` : la puce reste alignée
    sur la marge intérieure de la carte.
*/
.theme-modern .vf-choice-list {
    display: grid;
    gap: 0.6rem;
}

.theme-modern .vf-choice-list .form-check {
    margin: 0;
    padding: 0.8rem 1rem 0.8rem 2.6rem;
    border: 1px solid var(--vf-border);
    border-radius: 14px;
    background: var(--vf-surface-strong);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.theme-modern .vf-choice-list .form-check:hover {
    border-color: var(--vf-primary);
}

/* `:has()` : la carte du choix sélectionné se démarque sans JavaScript. */
.theme-modern .vf-choice-list .form-check:has(.form-check-input:checked) {
    border-color: var(--vf-primary-deep);
    box-shadow: inset 0 0 0 1px var(--vf-primary-deep);
}

.theme-modern .vf-choice-list .form-check-label {
    font-weight: 600;
    color: var(--vf-accent);
    cursor: pointer;
}

/*
    Contrôles injectés par DataTables autour d'un tableau (membres, gymnases).
    Sa feuille de style est importée par le contrôleur Stimulus, donc insérée
    après celle-ci : les sélecteurs sont préfixés par `.theme-modern` pour
    l'emporter par spécificité.
*/
.theme-modern .dt-container .dt-input {
    padding: 0.3rem 0.8rem;
    border: 1px solid var(--vf-border);
    border-radius: 999px;
    background: var(--vf-surface-strong);
}

.theme-modern .dt-container .dt-info {
    color: #5c7a94;
    font-size: 0.85rem;
}

/*
    DataTables construit son `.dt-container` à l'intérieur de l'élément sur
    lequel il est initialisé : le cadre de `.vf-table-wrap` engloberait donc
    aussi le champ de recherche et la pagination, emboîté dans celui du
    `.vf-panel`. On le retire ici et on le repose plus bas sur la seule rangée
    qui porte le tableau. Les `.vf-table-wrap` sans DataTables gardent le leur.
*/
.theme-modern .vf-table-wrap:has(.dt-container) {
    overflow: visible;
    border: 0;
    border-radius: 0;
}

/*
    `.dt-layout-table` est la rangée de la grille DataTables qui contient le
    `<table>` : c'est son enfant qui reçoit le cadre et le défilement horizontal
    que `.vf-table-wrap` assurait. On vise `> div` et non `> .dt-layout-cell` :
    dans `ext.classes`, la cellule de cette rangée a `tableCell: ""`, elle ne
    porte donc pas forcément la classe (c'est aussi ce que fait la feuille de
    DataTables elle-même).
*/
.theme-modern .dt-container .dt-layout-table > div {
    overflow-x: auto;
    border: 1px solid var(--vf-border);
    border-radius: 22px;
}

/* Sinon le filet de la dernière ligne vient doubler le bas du cadre. */
.theme-modern .dt-container .dataTable > tbody > tr:last-child > * {
    border-bottom-width: 0;
}

/*
    Boutons de pagination. `datatables.css` leur applique des dégradés gris → noir
    codés en dur sur `:hover`, `:active` et `.current:hover`, avec un
    `color: white !important` qui rendrait le libellé illisible sur un fond clair.
    Les quatre états sont donc redéfinis, y compris la couleur en `!important`,
    seul moyen de reprendre la main sur la leur.
*/
.theme-modern .dt-container .dt-paging .dt-paging-button {
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--vf-primary-deep) !important;
    box-shadow: none;
}

.theme-modern .dt-container .dt-paging .dt-paging-button:hover,
.theme-modern .dt-container .dt-paging .dt-paging-button:active {
    background: var(--vf-primary-soft);
    border-color: var(--vf-border);
    color: var(--vf-primary-deep) !important;
    box-shadow: none;
}

/* Page courante : aplat plein, sans dégradé, pour trancher avec le survol. */
.theme-modern .dt-container .dt-paging .dt-paging-button.current,
.theme-modern .dt-container .dt-paging .dt-paging-button.current:hover {
    background: var(--vf-primary-deep);
    border-color: transparent;
    color: #fff !important;
}

.theme-modern .dt-container .dt-paging .dt-paging-button.disabled,
.theme-modern .dt-container .dt-paging .dt-paging-button.disabled:hover,
.theme-modern .dt-container .dt-paging .dt-paging-button.disabled:active {
    background: transparent;
    border-color: transparent;
    color: #9bb0c2 !important;
}

/*
    Créneaux d'un gymnase, en lecture (liste) et en saisie (formulaire).
    Le formulaire moderne ne charge pas `gymnase.css` : les règles ci-dessous
    remplacent `.time_field` et `.time_block`.
*/
.theme-modern .vf-slot-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.35rem;
}

.theme-modern .vf-slot-line:last-child {
    margin-bottom: 0;
}

.theme-modern .vf-horaire-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/*
    `gymnase.js` crée ses lignes avec les classes `row pb-2` : on neutralise la
    grille Bootstrap (display flex et marges négatives) pour que la mise en page
    vienne de `.vf-horaire-fields`, identique pour les lignes existantes et les
    nouvelles.
*/
.theme-modern .vf-horaire-list > .horaire-row {
    display: block;
    margin-left: 0;
    margin-right: 0;
}

.theme-modern .vf-horaire-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--vf-border);
    border-radius: 16px;
    background: var(--vf-surface-strong);
}

.theme-modern .vf-horaire-fields .vf-horaire-day {
    width: auto;
    min-width: 8.5rem;
}

.theme-modern .vf-horaire-times {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.theme-modern .vf-horaire-sep {
    color: #5c7a94;
    font-size: 0.9rem;
}

/* Deux chiffres suffisent : on évite un champ pleine largeur. */
.theme-modern .vf-horaire-fields .vf-time-field {
    width: 4rem;
    text-align: center;
}

/*
    Le thème de formulaire Bootstrap 4 enveloppe la case à cocher dans un
    `.form-group` qui pousse une marge basse : elle désaligne la ligne.
*/
.theme-modern .vf-horaire-flag .form-group {
    margin-bottom: 0;
}

/* La corbeille est repoussée à droite, quel que soit le retour à la ligne. */
.theme-modern .vf-horaire-fields .delete-horaire {
    margin-left: auto;
}

/* --- Tunnel de feuille de match --- */

/*
    Détail des cinq sets, en lecture. Une ligne par set, l'équipe qui reçoit à
    gauche : la version classique employait un tableau à trois colonnes dont les
    en-têtes (les deux noms d'équipe) sortaient de l'écran en portrait.
*/
.theme-modern .vf-set-line {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.85rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(87, 184, 255, 0.12);
}

/* Set non joué : la ligne s'efface au lieu d'afficher un trompeur « 0 - 0 ». */
.theme-modern .vf-set-line-empty {
    background: transparent;
    border-style: dashed;
    opacity: 0.55;
}

.theme-modern .vf-set-label {
    flex-shrink: 0;
    min-width: 3.2rem;
    color: #5b7489;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.theme-modern .vf-set-side {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    min-width: 0;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
}

/* Le second côté est en miroir : les deux scores se rejoignent au centre. */
.theme-modern .vf-set-side:last-child {
    justify-content: flex-end;
}

.theme-modern .vf-set-team {
    min-width: 0;
    color: #5c7a94;
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.theme-modern .vf-set-value {
    flex-shrink: 0;
    min-width: 1.75rem;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
    color: #5c7a94;
}

.theme-modern .vf-set-winner {
    background: var(--vf-primary-soft);
}

.theme-modern .vf-set-winner .vf-set-value {
    color: var(--vf-primary-deep);
}

.theme-modern .vf-set-winner .vf-set-team {
    color: var(--vf-accent);
    font-weight: 600;
}

/*
    Saisie du score. Même gabarit de colonnes que la lecture, les noms d'équipe
    n'étant posés qu'une fois en tête : les répéter sur chaque ligne doublait la
    hauteur de l'écran.
*/
.theme-modern .vf-score-form {
    display: grid;
    gap: 0.5rem;
}

.theme-modern .vf-score-form-head,
.theme-modern .vf-score-form-row {
    display: grid;
    grid-template-columns: 3.2rem minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 0.5rem;
}

.theme-modern .vf-score-form-head > span {
    color: #5b7489;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- Compositions d'équipe --- */

.theme-modern .vf-player-list {
    display: grid;
    gap: 0.4rem;
}

.theme-modern .vf-player-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    background: var(--vf-surface-strong);
    border: 1px solid rgba(87, 184, 255, 0.1);
}

.theme-modern .vf-player-name {
    min-width: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.theme-modern .vf-player-meta {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 0.4rem;
}

.theme-modern .vf-player-licence {
    color: #5c7a94;
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
}

/* --- Convocation : les trois colonnes de disponibilité --- */

.theme-modern .vf-convoc-board {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.theme-modern .vf-convoc-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border-radius: 18px;
    border: 1px solid rgba(87, 184, 255, 0.12);
    background: rgba(255, 255, 255, 0.6);
    overflow: hidden;
}

.theme-modern .vf-convoc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    padding: 0.6rem;
}

.theme-modern .vf-convoc-count {
    color: #5c7a94;
    font-size: 0.8rem;
    font-weight: 700;
}

/*
    `game_controller.js` crée ses lignes de remplissage avec les classes
    `border-bottom border-light p-2` et déplace les `.playerDiv` d'une colonne à
    l'autre. La mise en forme porte donc sur les enfants directs de la zone de
    dépôt, pour valoir aussi bien pour les lignes rendues côté serveur que pour
    celles ajoutées sans rechargement.
*/
.theme-modern .vf-convoc-list {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.theme-modern .vf-convoc-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    min-height: 2.5rem;
    padding: 0.35rem 0.6rem;
    border-top: 1px solid rgba(87, 184, 255, 0.1);
}

/*
    `app.css` plafonne `.playerDiv` à 41px, hauteur qui ne tient pas compte du
    bouton de changement de disponibilité. On rend la main à `min-height`.
*/
.theme-modern .playerDiv {
    max-height: none;
}

.theme-modern .vf-convoc-list > div[draggable='true'] {
    cursor: grab;
}

.theme-modern .vf-convoc-list .dragging {
    opacity: 0.5;
}

.theme-modern .vf-convoc-name {
    min-width: 0;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.theme-modern .vf-convoc-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 0.3rem;
}

/*
    Voile posé sur la convocation une fois la composition verrouillée.
    Volontairement sans `z-index` : en créer un ici piégerait les modales
    Bootstrap derrière leur fond (voir le commentaire de `.site-shell::before`).
    L'ordre de peinture suffit, ces deux blocs venant après le contenu.
*/
.theme-modern .vf-convoc-lock {
    top: 0;
    left: 0;
    background-color: rgba(16, 41, 62, 0.55);
}

.theme-modern .vf-penality-delete {
    cursor: pointer;
}

/* --- Opposition des deux équipes, en tête de la page d'un match --- */

.theme-modern .vf-scoreboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
}

.theme-modern .vf-scoreboard-team {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    padding: 0.75rem 1rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(87, 184, 255, 0.12);
}

/* La seconde équipe est alignée à droite, de part et d'autre du score. */
.theme-modern .vf-scoreboard-team:last-child {
    text-align: right;
}

.theme-modern .vf-scoreboard-name {
    font-size: clamp(1rem, 2.6vw, 1.6rem);
    font-weight: 800;
    color: #10293e;
    overflow-wrap: anywhere;
}

.theme-modern .vf-scoreboard-center {
    flex-shrink: 0;
    padding: 0.5rem 0.85rem;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--vf-primary-deep), var(--vf-primary));
    color: #fff;
    font-size: clamp(1.1rem, 3vw, 1.75rem);
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    .theme-modern .vf-panel {
        padding: 1.1rem;
        border-radius: 20px;
    }

    .theme-modern .vf-hero-title {
        max-width: none;
    }
}

/*
 * Portrait mobile : on garde les grilles multi-colonnes (les valeurs affichées sont
 * courtes) et on compacte plutôt les espacements. Les passer en une seule colonne
 * étirait chaque page sur plusieurs écrans de haut.
 */
@media (max-width: 575.98px) {
    .theme-modern .vf-list-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .theme-modern .vf-panel {
        padding: 1rem;
        border-radius: 18px;
    }

    .theme-modern .vf-eyebrow {
        margin-bottom: 0.6rem;
        padding: 0.25rem 0.6rem;
        font-size: 0.7rem;
    }

    .theme-modern .vf-hero-title {
        font-size: 1.9rem;
    }

    .theme-modern .vf-hero-text {
        font-size: 0.95rem;
    }

    .theme-modern .vf-stat-card {
        padding: 0.7rem 0.75rem;
        border-radius: 16px;
    }

    .theme-modern .vf-stat-value {
        font-size: 1.6rem;
    }

    .theme-modern .vf-table-wrap {
        border-radius: 16px;
    }

    .theme-modern .vf-team-card-toggle,
    .theme-modern .vf-team-card-body {
        padding-inline: 0.75rem;
    }

    .theme-modern .vf-team-name {
        font-size: 1.05rem;
    }

    .theme-modern .vf-team-stats {
        gap: 0.5rem;
        margin-top: 0.85rem;
    }

    .theme-modern .vf-team-stats > div {
        padding: 0.6rem 0.5rem;
        border-radius: 12px;
    }

    .theme-modern .vf-team-stat-label {
        font-size: 0.68rem;
        letter-spacing: 0.02em;
    }

    .theme-modern .vf-match-card {
        padding: 0.85rem;
    }

    .theme-modern .vf-match-card-top {
        gap: 0.5rem;
        margin-bottom: 0.7rem;
    }

    /*
        `w-xs-50` (app.css) limite le détail du score à la moitié de la largeur,
        ce qui a du sens dans une cellule de tableau mais pas dans une carte
        empilée, où la ligne « Score » occupe déjà toute la largeur.
    */
    .theme-modern .vf-match-meta .w-xs-50 {
        width: 100%;
    }

    /*
        Les lignes de set sont en `justify-content-between` (utilitaire Bootstrap,
        donc `!important`) : une fois la carte pleine largeur, le libellé et le
        score se retrouvent aux deux extrémités. On les recentre en gardant un
        écart lisible entre les deux.
    */
    .theme-modern .vf-match-meta .w-xs-50 > .d-flex {
        justify-content: center !important;
        gap: 0.5rem;
    }

    /*
        Convocation : les trois colonnes restent côte à côte, comme les autres
        grilles du thème. Les empiler éloignerait les zones de dépôt les unes
        des autres, et c'est de toute façon le bouton de changement de
        disponibilité — et non le glisser-déposer, indisponible sur mobile — qui
        sert ici. On compacte donc plutôt les espacements.
    */
    .theme-modern .vf-convoc-board {
        gap: 0.4rem;
    }

    .theme-modern .vf-convoc-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
        padding: 0.4rem;
    }

    .theme-modern .vf-convoc-list > div {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
        padding: 0.3rem 0.4rem;
    }

    .theme-modern .vf-convoc-name {
        font-size: 0.8rem;
    }

    /* Le libellé du set passe au-dessus des deux scores, faute de largeur. */
    .theme-modern .vf-set-line {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        padding: 0.5rem 0.6rem;
    }

    .theme-modern .vf-set-line .vf-set-label {
        grid-column: 1 / -1;
    }

    .theme-modern .vf-score-form-head,
    .theme-modern .vf-score-form-row {
        grid-template-columns: 2.6rem minmax(0, 1fr) minmax(0, 1fr);
    }

    .theme-modern .vf-scoreboard {
        gap: 0.4rem;
    }

    .theme-modern .vf-scoreboard-team {
        padding: 0.5rem 0.6rem;
    }

    .theme-modern .vf-scoreboard-center {
        padding: 0.4rem 0.5rem;
    }
}

/* --- Espace commission : gestion des matchs d'une poule --- */
.theme-modern .vf-kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.theme-modern .vf-kpi-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    padding: 1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(87, 184, 255, 0.12);
    box-shadow: 0 10px 26px rgba(15, 54, 92, 0.08);
}

.theme-modern .vf-kpi-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    font-size: 1.05rem;
}

.theme-modern .vf-kpi-value {
    font-size: 1.8rem;
    line-height: 1;
    color: #10293e;
}

.theme-modern .vf-kpi-label {
    color: #5b7489;
    font-size: 0.82rem;
}

.theme-modern .vf-kpi-detail {
    width: 100%;
    margin-top: 0.2rem;
}

.theme-modern .vf-kpi-detail summary {
    color: var(--vf-primary-deep);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.theme-modern .vf-kpi-detail summary::-webkit-details-marker {
    display: none;
}

.theme-modern .vf-kpi-detail summary::before {
    content: '▸ ';
}

.theme-modern .vf-kpi-detail[open] summary::before {
    content: '▾ ';
}

.theme-modern .vf-kpi-detail ul {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    font-size: 0.8rem;
}

.theme-modern .vf-kpi-detail li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.15rem 0;
    color: #29465d;
}

.theme-modern .vf-kpi-detail li strong {
    margin-left: auto;
    color: #10293e;
}

.theme-modern .vf-kpi-card-late .vf-kpi-icon {
    background: rgba(220, 53, 69, 0.12);
    color: #b42333;
}

.theme-modern .vf-kpi-card-warning .vf-kpi-icon {
    background: rgba(255, 193, 7, 0.2);
    color: #7a5300;
}

.theme-modern .vf-kpi-card-info .vf-kpi-icon {
    background: rgba(87, 184, 255, 0.16);
    color: var(--vf-primary-deep);
}

.theme-modern .vf-kpi-card-dark .vf-kpi-icon {
    background: rgba(91, 116, 137, 0.16);
    color: #3c5064;
}

.theme-modern .vf-kpi-card-purple .vf-kpi-icon {
    background: rgba(147, 51, 234, 0.14);
    color: #6b21a8;
}

.theme-modern .vf-kpi-card-teal .vf-kpi-icon {
    background: rgba(13, 148, 136, 0.14);
    color: #0f6b62;
}

.theme-modern .vf-match-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.theme-modern .vf-match-alert-icons {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.theme-modern .vf-match-alert-icon {
    font-size: 0.85rem;
    cursor: help;
}

.theme-modern .vf-match-alert-icon-late {
    color: #b42333;
}

.theme-modern .vf-match-alert-icon-teal {
    color: #0f6b62;
}

.theme-modern .vf-match-alert-icon-dark {
    color: #3c5064;
}

.theme-modern .vf-match-alert-icon-warning {
    color: #7a5300;
}

.theme-modern .vf-match-alert-icon-info {
    color: var(--vf-primary-deep);
}

.theme-modern .vf-match-alert-icon-purple {
    color: #6b21a8;
}

.theme-modern .vf-week-list {
    display: grid;
    gap: 0.85rem;
}

.theme-modern .vf-week-card {
    overflow: hidden;
    border: 1px solid rgba(87, 184, 255, 0.14);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 14px 32px rgba(15, 54, 92, 0.08);
}

.theme-modern .vf-week-card-toggle {
    width: 100%;
    border: 0;
    padding: 1rem;
    text-align: left;
    background: transparent;
}

.theme-modern .vf-week-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-weight: 700;
    color: #10293e;
}

.theme-modern .vf-week-caret {
    color: var(--vf-primary-deep);
    transition: transform 0.18s ease;
}

.theme-modern .vf-week-card-toggle[aria-expanded='true'] .vf-week-caret {
    transform: rotate(90deg);
}

.theme-modern .vf-week-card-body {
    padding: 0 1rem 1rem;
}

@media (max-width: 991.98px) {
    .theme-modern .vf-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .theme-modern .vf-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .theme-modern .vf-kpi-card {
        padding: 0.75rem;
        border-radius: 16px;
    }

    .theme-modern .vf-kpi-value {
        font-size: 1.5rem;
    }

    .theme-modern .vf-week-card-toggle,
    .theme-modern .vf-week-card-body {
        padding-inline: 0.75rem;
    }
}

/* --- Espace commission : messagerie --- */
.theme-modern .vf-poule-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.theme-modern .vf-poule-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(87, 184, 255, 0.18);
    background: rgba(255, 255, 255, 0.85);
    color: #10293e;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.theme-modern .vf-poule-chip::before {
    content: '';
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: var(--poule-accent, #adb5bd);
    flex-shrink: 0;
}

.theme-modern .vf-poule-chip:hover,
.theme-modern .vf-poule-chip:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(15, 54, 92, 0.12);
    border-color: var(--poule-accent, rgba(87, 184, 255, 0.4));
}

.theme-modern .vf-poule-chip-count {
    color: #5b7489;
    font-weight: 500;
    font-size: 0.78rem;
}

.theme-modern .vf-recipient-table-wrap {
    max-height: 320px;
    overflow-y: auto;
}

.theme-modern .vf-recipient-table thead th {
    position: sticky;
    top: 0;
    background: rgba(87, 184, 255, 0.1);
    z-index: 1;
}

.theme-modern .vf-recipient-table tbody td {
    background: rgba(255, 255, 255, 0.88);
    font-size: 0.85rem;
    overflow-wrap: anywhere;
}

.theme-modern .vf-recipient-table .vf-empty-state {
    text-align: center;
}

.theme-modern .vf-quill-editor .ql-toolbar.ql-snow {
    border-color: var(--vf-border);
    border-radius: 16px 16px 0 0;
    background: rgba(87, 184, 255, 0.06);
}

.theme-modern .vf-quill-editor .ql-container.ql-snow {
    border-color: var(--vf-border);
    border-radius: 0 0 16px 16px;
    font-size: 1rem;
}