/* =========================================================
   VARIABLES GLOBALES
   ---------------------------------------------------------
   Tu peux modifier ici rapidement les couleurs et dimensions
   principales du site sans devoir chercher partout dans le CSS.

   - --surface-violet : fond principal des cards / modales
   - --surface-violet-strong : variante un peu plus marquée
   - --button-accent : couleur de bordure / hover des boutons
   - --text-on-surface : texte clair sur fonds sombres
   ========================================================= */
:root {
    --site-header-mobile-height: 88px;
    --site-header-desktop-height: 132px;

    --surface-violet: rgba(116, 0, 184, 0.72);
    --surface-violet-strong: rgba(116, 0, 184, 0.84);
    --surface-violet-soft: rgba(116, 0, 184, 0.18);
    --surface-border: rgba(107, 200, 249, 0.38);
    --button-accent: #6bc8f9;
    --button-accent-hover-text: #06111b;
    --text-on-surface: #ffffff;
    --text-on-surface-muted: rgba(255, 255, 255, 0.82);
}

/* =========================================================
   STRUCTURE GÉNÉRALE DU SITE
   ---------------------------------------------------------
   - Fond principal du site
   - Couleur de texte par défaut
   - Espace réservé au header fixe
   ========================================================= */
body {
    background-image: radial-gradient(ellipse at bottom, #1D0559 0%, #020112 50%);
    background-repeat: no-repeat;
    min-height: 100vh;
    padding-top: var(--site-header-mobile-height);
    color: #ffffff;
}

.nav-link {
    color: #F5A711;
}

.reseau {
    height: 200px;
    width: auto;
}

/* =========================================================
   HEADER FIXE
   ---------------------------------------------------------
   Le header reste collé en haut de la page. Le logo desktop
   et le logo mobile sont séparés pour éviter les conflits
   entre la version PC et le menu burger mobile.
   ========================================================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1020;
}

.site-navbar {
    position: relative;
    z-index: 1020;
    background: rgba(2, 1, 18, 0.92);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
}

.site-navbar-container {
    position: relative;
    min-height: var(--site-header-mobile-height);
}

.site-logo-desktop,
.site-logo-mobile {
    text-decoration: none;
}

.site-logo-desktop img,
.site-logo-mobile img {
    display: block;
    width: auto;
    animation: rotating 3s linear infinite;
}

.site-logo-mobile {
    display: inline-flex;
    align-items: center;
}

.site-logo-mobile img {
    height: 70px;
}

/*
   Lien Discord desktop distinct du logo :
   - il reste un simple lien icône, pas un bouton
   - il se place entre "Prochainement" et le logo sur grand écran
   - il est masqué sur mobile pour ne pas perturber le burger
*/
    .site-header-discord,
    .site-header-discord-inline {
        display: none !important;
    }

    .site-header-discord-inline {
        margin-left: -0.15rem;
    }
    .site-header-discord-inline-link img {
        height: 24px;
    }

.site-nav {
    gap: 0.35rem;
}

.site-nav .nav-item {
    display: flex;
    justify-content: center;
}

.site-nav .nav-link,
.site-nav .dropdown-toggle,
.site-nav .btn,
.site-nav .nav-item > button.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    white-space: nowrap;
    text-align: center;
}

/* =========================================================
   PAGE D'ACCUEIL
   ---------------------------------------------------------
   Styles dédiés au visuel de la home : réseaux, image,
   textes d'introduction et widgets.
   ========================================================= */
.home-socials,
.home-hero-visual {
    width: 100%;
}

.home-hero-visual {
    min-height: 140px;
}

.home-typo {
    display: block;
    width: 100%;
    max-width: 340px;
    height: auto;
    object-fit: contain;
}

.home-page {
    padding-bottom: 3rem;
}

.home-hero-section {
    padding-top: 1.25rem;
    padding-bottom: 2.25rem;
}

.home-widgets-section {
    padding-top: 0.75rem;
    padding-bottom: 2.5rem;
}

.home-widget-block {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
    height: 100%;
}

.home-widget-title {
    margin: 0;
    font-size: clamp(1.4rem, 1.1rem + 0.8vw, 2rem);
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
}

.widget-card {
    border: 0;
    border-radius: 1rem;
}

.widget-card-body {
    padding: 1.15rem 1.2rem;
    gap: 0.95rem;
}

.widget-card-head {
    margin-bottom: 0;
}

.widget-meta-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.9rem;
}

.widget-meta-item {
    min-width: 0;
}

.widget-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.widget-action-btn {
    min-width: 148px;
}

.home-intro-section {
    padding-bottom: 1.5rem;
}

.home-intro-card {
    padding: 1.75rem 1.85rem;
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.16);
    text-align: center;
}

.home-intro-title {
    margin-bottom: 1.15rem;
    color: #ffffff;
    text-align: center;
}

.home-intro-text {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.75;
    color: #ffffff;
    text-align: center;
}

/* =========================================================
   BACK-OFFICE / GESTION DES BRACKETS
   ---------------------------------------------------------
   Mise en page compacte des sélecteurs BO et des lignes de
   saisie des scores d'un match.
   ========================================================= */
.admin-bo-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: nowrap;
    width: 100%;
}

.admin-bo-select {
    width: 30%;
    min-width: 84px;
    max-width: 96px;
}

.admin-bo-games {
    margin-top: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.admin-bo-row {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: nowrap;
    padding: 0.35rem 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.03);
    width: fit-content;
    max-width: 100%;
}

.admin-bo-label {
    min-width: 30px;
    font-weight: 700;
    margin-bottom: 0;
}

.admin-bo-score-form {
    margin: 0;
}

.admin-bo-score-input {
    width: 30%;
    min-width: 54px;
    max-width: 64px;
    text-align: center;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

.admin-bo-separator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 10px;
}

.admin-bo-save {
    padding: 0.2rem 0.55rem;
    line-height: 1.2;
}

/* =========================================================
   MODALES ET SUPERPOSITION AVEC LE HEADER
   ---------------------------------------------------------
   - Évite le décalage horizontal quand la scrollbar disparaît
   - Garantit que les modales passent au-dessus du header fixe
   - Laisse la modale de connexion (#conlog) dans son thème dédié
   - Toutes les autres modales prennent le nouveau fond violet
   ========================================================= */
html {
    scrollbar-gutter: stable;
}

body.modal-open {
    overflow: hidden;
    padding-right: 0 !important;
}

body.modal-open .site-header {
    padding-right: 0 !important;
}

.modal-backdrop {
    z-index: 1990 !important;
}

.modal {
    z-index: 2000 !important;
}

/* Modales classiques : fond violet translucide + texte clair */
.modal:not(#conlog) .modal-content {
    background: var(--surface-violet);
    color: var(--text-on-surface);
    border: 1px solid var(--surface-border);
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.modal:not(#conlog) .modal-header,
.modal:not(#conlog) .modal-footer {
    border-color: rgba(255, 255, 255, 0.14);
}

.modal:not(#conlog) .modal-title,
.modal:not(#conlog) .modal-body,
.modal:not(#conlog) .modal-body p,
.modal:not(#conlog) .modal-body li,
.modal:not(#conlog) .modal-body span,
.modal:not(#conlog) .modal-body strong,
.modal:not(#conlog) .modal-body label,
.modal:not(#conlog) .modal-body td,
.modal:not(#conlog) .modal-body th,
.modal:not(#conlog) .modal-body h1,
.modal:not(#conlog) .modal-body h2,
.modal:not(#conlog) .modal-body h3,
.modal:not(#conlog) .modal-body h4,
.modal:not(#conlog) .modal-body h5,
.modal:not(#conlog) .modal-body h6,
.modal:not(#conlog) .modal-footer,
.modal:not(#conlog) .modal-footer small,
.modal:not(#conlog) .modal-footer a {
    color: var(--text-on-surface) !important;
}

.modal:not(#conlog) .text-muted,
.modal:not(#conlog) .text-secondary,
.modal:not(#conlog) small.text-muted {
    color: var(--text-on-surface-muted) !important;
}

.modal:not(#conlog) .btn-close {
    filter: invert(1) grayscale(100%);
}

/* Modale de connexion : thème sombre volontaire à conserver */
#conlog .modal-content {
    background: rgba(8, 9, 28, 0.96);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

#conlog .modal-header,
#conlog .modal-footer {
    border-color: rgba(255, 255, 255, 0.1);
}

#conlog .modal-title,
#conlog .form-label,
#conlog .form-check-label,
#conlog small,
#conlog a {
    color: #ffffff;
}

#conlog .btn-close {
    filter: invert(1) grayscale(100%);
}

#conlog .form-control {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(255, 255, 255, 0.2);
    color: #212529;
}

/* =========================================================
   CARDS ET CONTENUS EN SURFACE VIOLETTE
   ---------------------------------------------------------
   Toutes les cards du site adoptent maintenant le fond violet
   translucide. Le texte repasse en clair pour rester lisible.
   ========================================================= */
.card {
    background: var(--surface-violet);
    color: var(--text-on-surface);
    border: 1px solid var(--surface-border);
    backdrop-filter: blur(8px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
    border-block-width: 5px;
}

.card shadow-sm widget-card h-100 {
    border: 5px;
}

.card-header,
.card-footer {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.card .text-muted,
.card .text-secondary,
.card small.text-muted {
    color: var(--text-on-surface-muted) !important;
}

.card a:not(.btn),
.card h1,
.card h2,
.card h3,
.card h4,
.card h5,
.card h6,
.card p,
.card li,
.card label,
.card small,
.card span:not(.badge):not(.btn),
.card td,
.card th,
.card strong,
.card div {
    color: inherit;
}

/* =========================================================
   BOUTONS GLOBAUX
   ---------------------------------------------------------
   Tous les boutons prennent un style homogène inspiré de ceux
   du header, avec une bordure bleu clair facile à retoucher.
   ========================================================= */
.btn:not(.btn-close),
a.btn,
button.btn,
input.btn {
    border-color: var(--button-accent) !important;
    color: var(--text-on-surface) !important;
    background: rgba(107, 200, 249, 0.08) !important;
    box-shadow: 0 0 0 0 rgba(107, 200, 249, 0);
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn:not(.btn-close):hover,
.btn:not(.btn-close):focus,
.btn:not(.btn-close):active {
    background: rgba(107, 200, 249, 0.92) !important;
    border-color: var(--button-accent) !important;
    color: var(--button-accent-hover-text) !important;
    box-shadow: 0 0 0 0.2rem rgba(107, 200, 249, 0.18) !important;
}

.btn-check:checked + .btn,
.btn.active,
.btn.show,
.btn:first-child:active,
:not(.btn-check) + .btn:active {
    background: rgba(107, 200, 249, 0.92) !important;
    border-color: var(--button-accent) !important;
    color: var(--button-accent-hover-text) !important;
}

/* Petits ajustements pour les boutons dans le header */
.site-nav .nav-link.btn,
.site-nav button.nav-link.btn,
.site-nav form .btn {
    background: rgba(107, 200, 249, 0.08) !important;
}

/*
   Survol des boutons du header : on force explicitement le bleu
   pour les liens et boutons de navigation afin d'uniformiser le rendu.
*/
.site-nav .nav-link.btn:hover,
.site-nav .nav-link.btn:focus,
.site-nav button.nav-link.btn:hover,
.site-nav button.nav-link.btn:focus,
.site-nav form .btn:hover,
.site-nav form .btn:focus {
    background: rgba(107, 200, 249, 0.92) !important;
    border-color: var(--button-accent) !important;
    color: var(--button-accent-hover-text) !important;
}

/* Tables admin sur surface violette */
.admin-panel-card {
    background: var(--surface-violet);
    border: 1px solid var(--surface-border);
    color: var(--text-on-surface);
    border-radius: 1rem;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.admin-panel-card .card-header {
    background: rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-panel-card .card-body,
.admin-panel-card .card-title,
.admin-panel-card .card-text,
.admin-panel-card p,
.admin-panel-card small,
.admin-panel-card span,
.admin-panel-card div,
.admin-panel-card label,
.admin-panel-card th,
.admin-panel-card td,
.admin-panel-card a:not(.btn) {
    color: var(--text-on-surface);
}

.admin-pending-table thead th {
    background: rgba(255, 255, 255, 0.10);
    color: var(--text-on-surface);
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    white-space: nowrap;
}

.admin-pending-table tbody td {
    color: var(--text-on-surface);
    vertical-align: middle;
}

.admin-pending-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.06);
}


/* =========================================================
   LIENS / PAGINATION / LISTES SUR SURFACE VIOLETTE
   ---------------------------------------------------------
   Cette section corrige les éléments Bootstrap qui gardent
   un fond clair ou un texte peu lisible par défaut :
   - pagination adminManageUsers
   - liens du plan du site
   - boutons/liens "détails" dans les modales
   ========================================================= */
.page-link {
    background: rgba(107, 200, 249, 0.10) !important;
    border-color: var(--button-accent) !important;
    color: var(--button-accent) !important;
}

.page-link:hover,
.page-link:focus {
    background: rgba(107, 200, 249, 0.92) !important;
    border-color: var(--button-accent) !important;
    color: var(--button-accent-hover-text) !important;
    box-shadow: 0 0 0 0.2rem rgba(107, 200, 249, 0.18) !important;
}

.page-item.disabled .page-link {
    background: rgba(107, 200, 249, 0.08) !important;
    border-color: rgba(107, 200, 249, 0.35) !important;
    color: rgba(107, 200, 249, 0.72) !important;
}

.list-group-item {
    background: rgba(116, 0, 184, 0.22) !important;
    border-color: rgba(107, 200, 249, 0.20) !important;
    color: var(--text-on-surface) !important;
}

.list-group-item.list-group-item-action:hover,
.list-group-item.list-group-item-action:focus {
    background: rgba(107, 200, 249, 0.18) !important;
    color: var(--text-on-surface) !important;
}

.list-group-item.disabled,
.list-group-item:disabled {
    background: rgba(116, 0, 184, 0.14) !important;
    color: rgba(255, 255, 255, 0.55) !important;
}

.modal:not(#conlog) .btn-link,
.modal:not(#conlog) a:not(.btn) {
    color: var(--button-accent) !important;
}

.modal:not(#conlog) .btn-link:hover,
.modal:not(#conlog) .btn-link:focus,
.modal:not(#conlog) a:not(.btn):hover,
.modal:not(#conlog) a:not(.btn):focus {
    color: #b9e8ff !important;
}

/*
   Lignes "Round 1 / Round 2 / ..." dans previousTournament :
   on remplace le gris clair Bootstrap par une version lisible
   sur le thème violet du site.
*/
.modal:not(#conlog) .table-light,
.modal:not(#conlog) .table-light > th,
.modal:not(#conlog) .table-light > td,
.modal:not(#conlog) tr.table-light > td,
.modal:not(#conlog) tr.table-light > th {
    background: rgba(107, 200, 249, 0.18) !important;
    color: var(--button-accent) !important;
}

.modal:not(#conlog) .table,
.modal:not(#conlog) .table > :not(caption) > * > * {
    color: var(--text-on-surface) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

/* =========================================================
   FOOTER
   ---------------------------------------------------------
   Les liens du footer restent en blanc pour rester lisibles
   sur le fond sombre du site.
   ========================================================= */
footer a,
footer a.link-dark,
footer .link-dark {
    color: #ffffff !important;
}

footer a:hover,
footer a:focus {
    color: #F5A711 !important;
}

footer .text-muted {
    color: rgba(255, 255, 255, 0.75) !important;
}



/* =========================================================
   FLASHS / ALERTES
   ---------------------------------------------------------
   Tous les messages flash prennent la même teinte bleue que
   les boutons pour garder une identité visuelle cohérente.
   ========================================================= */
.alert {
    background: rgba(107, 200, 249, 0.16) !important;
    border: 1px solid rgba(107, 200, 249, 0.48) !important;
    color: #e8f8ff !important;
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
}

.alert a {
    color: #ffffff !important;
    text-decoration: underline;
}

.alert-success,
.alert-danger,
.alert-warning,
.alert-info {
    background: rgba(107, 200, 249, 0.16) !important;
    border-color: rgba(107, 200, 249, 0.48) !important;
    color: #e8f8ff !important;
}

/* =========================================================
   RESPONSIVE DESKTOP
   ---------------------------------------------------------
   Réglages desktop : header plus haut, logo centré, répartition
   des menus gauche / droite, et léger décalage des réseaux.
   ========================================================= */
@media screen and (min-width: 992px) {
    body {
        padding-top: var(--site-header-desktop-height);
    }

    .site-navbar-container {
        min-height: var(--site-header-desktop-height);
        display: flex;
        align-items: center;
    }

    .site-logo-desktop {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 3;
    }

    .site-logo-desktop img {
        height: 150px;
    }

    .site-header-discord {
        position: absolute;
        /*
           Variante historique conservée si un élément dédié
           `.site-header-discord` est réintroduit plus tard.
        */
        left: calc(50% - 230px);
        top: 50%;
        transform: translate(-50%, -50%);
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        z-index: 3;
    }

    /*
       Version réellement utilisée dans le header actuel :
       l'icône Discord est un item de navigation placé juste
       après "Prochainement" sur desktop.
    */
    .site-header-discord-inline {
        display: inline-flex !important;
        align-items: center;
        margin-left: -0.15rem;
    }

    .site-header-discord-inline-link {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        padding: 0.25rem 0.35rem !important;
    }

    .site-header-discord-inline-link img {
        display: block;
        height: 24px;
        width: auto;
    }

    .site-logo-mobile {
        display: none !important;
    }

    #mainNavbar {
        display: flex !important;
        width: 100%;
        align-items: center;
        justify-content: space-between;
    }

    .site-nav-left,
    .site-nav-right {
        flex: 1 1 0;
        display: flex;
        align-items: center;
        gap: 0.35rem;
    }

    .site-nav-left {
        justify-content: flex-start;
        padding-right: 11.5rem;
    }

    .site-nav-right {
        justify-content: flex-end;
        padding-left: 7.5rem;
        padding-right: 2.75rem;
    }

    .home-socials {
        transform: none;
        width: 100%;
        align-items: flex-end !important;
    }

    .home-socials > .d-flex {
        width: 100%;
        justify-content: flex-end !important;
    }

    .home-widgets-section .row {
        row-gap: 1.5rem;
    }

    .widget-card-body {
        min-height: 205px;
    }
}

/* =========================================================
   RESPONSIVE MOBILE / TABLETTE
   ---------------------------------------------------------
   Réglages du menu burger, des widgets et des modales sur
   petits écrans.
   ========================================================= */
@media screen and (max-width: 991.98px) {
    body {
        padding-top: var(--site-header-mobile-height);
    }

    .site-navbar-container {
        min-height: var(--site-header-mobile-height);
    }

    .navbar-toggler {
        order: 3;
        margin-left: auto;
    }

    .site-logo-desktop {
        display: none !important;
    }

    .site-header-discord {
        display: none !important;
    }

    #mainNavbar {
        width: 100%;
        padding: 0.6rem 0 1rem;
    }

    .site-nav {
        width: 100%;
        align-items: center;
    }

    .site-nav .nav-item,
    .site-nav .dropdown {
        width: 60%;
        margin-left: auto;
        margin-right: auto;
    }

    .site-nav .nav-link,
    .site-nav .dropdown-toggle,
    .site-nav .btn,
    .site-nav .nav-item > button.nav-link {
        width: 100%;
        margin: 0.2rem auto;
        justify-content: center;
    }

    .site-nav .dropdown-menu {
        width: 100%;
        text-align: center;
    }

    .home-hero-visual {
        min-height: 0;
    }

    .home-typo {
        max-width: 240px;
    }

    .admin-bo-toolbar {
        width: auto;
    }

    .admin-bo-select {
        min-width: 76px;
        max-width: 84px;
    }

    .admin-bo-row {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
    }

    .admin-bo-score-input {
        min-width: 48px;
        max-width: 56px;
    }

    .home-hero-section {
        padding-top: 0.75rem;
        padding-bottom: 1.6rem;
    }

    .home-widgets-section {
        padding-top: 0.25rem;
        padding-bottom: 1.75rem;
    }

    .home-widget-title {
        text-align: center;
    }

    .widget-card-body {
        padding: 1rem;
    }

    .widget-actions {
        flex-direction: column;
    }

    .widget-action-btn {
        width: 100%;
    }

    .home-intro-card {
        padding: 1.35rem 1rem;
    }

    .home-intro-text {
        font-size: 1rem;
        line-height: 1.65;
    }

    /*
       Sur mobile, on décale les modales vers le bas pour que
       leur en-tête reste visible malgré le header fixe.
    */
    .modal .modal-dialog {
        margin-top: calc(var(--site-header-mobile-height) + 0.75rem);
        margin-bottom: 0.75rem;
    }

    .modal .modal-dialog.modal-fullscreen-md-down {
        margin-top: var(--site-header-mobile-height);
        height: calc(100% - var(--site-header-mobile-height));
    }

    .modal .modal-dialog.modal-fullscreen-md-down .modal-content {
        min-height: calc(100vh - var(--site-header-mobile-height));
        border-radius: 0;
    }
}

/* ==============================
   Administration — dashboard / pending registrations
   ============================== */
.admin-dashboard-page {
    color: #ffffff;
}

.admin-dashboard-page .text-light-emphasis {
    color: rgba(255, 255, 255, 0.8) !important;
}

@media (max-width: 767.98px) {
    .admin-pending-table .btn {
        width: 100%;
    }

    .admin-pending-table .d-inline-flex {
        width: 100%;
    }
}


/* ==============================
   Image Typo Index.tpl
   ============================== */

.home-hero-visual d-flex align-items-center justify-content-center {
     perspective: 1000px;
    display: inline-block;
}
   
.home-typo {
     display: inline-block;
    transition: transform 1s ease;
    transform-style: preserve-3d;
}

.home-typo:hover {
       transform: rotateY(180deg);
}

/* =========================================================
   PREVIOUS TOURNAMENT : DÉTAILS DE BRACKET
   ---------------------------------------------------------
   Affichage plus épuré des résultats détaillés dans la modal
   de previousTournament :
   - résumé en haut
   - rounds sous forme de blocs
   - matchs lisibles sans gros tableau dense
   - détail des games en panneau repliable
   ========================================================= */
.previous-bracket-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.previous-bracket-summary-item {
    padding: 0.9rem 1rem;
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(107, 200, 249, 0.24);
}

.previous-bracket-summary-item--winner {
    background: rgba(107, 200, 249, 0.14);
    border-color: rgba(107, 200, 249, 0.42);
}

.previous-bracket-summary-label {
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-on-surface-muted);
}

.previous-bracket-summary-value {
    display: block;
    margin-top: 0.2rem;
    font-weight: 700;
    color: var(--text-on-surface);
}

.bracket-results-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bracket-section-card {
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(107, 200, 249, 0.2);
}

.bracket-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
}

.bracket-rounds-stack {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.bracket-round-card {
    padding: 0.9rem;
    border-radius: 0.95rem;
    background: rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(107, 200, 249, 0.16);
}

.bracket-round-title {
    margin-bottom: 0.8rem;
    padding-bottom: 0.55rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(107, 200, 249, 0.18);
}

.bracket-match-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.bracket-match-card {
    padding: 0.9rem;
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(107, 200, 249, 0.16);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.bracket-match-card--final {
    background: rgba(107, 200, 249, 0.08);
    border-color: rgba(107, 200, 249, 0.28);
}

.bracket-match-top,
.bracket-match-footer-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.bracket-match-code {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.bracket-opponents-grid {
    display: grid;
    gap: 0.55rem;
}

.bracket-opponent-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.8rem;
    border-radius: 0.8rem;
    background: rgba(255, 255, 255, 0.05);
}

.bracket-opponent-name {
    min-width: 0;
    font-weight: 600;
}

.bracket-opponent-score {
    min-width: 2.5rem;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    text-align: center;
    font-weight: 700;
    background: rgba(107, 200, 249, 0.16);
    border: 1px solid rgba(107, 200, 249, 0.34);
}

.bracket-games-panel {
    margin-top: 0.25rem;
    padding-top: 0.85rem;
    border-top: 1px dashed rgba(107, 200, 249, 0.24);
}

.bracket-games-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.bracket-game-row {
    display: grid;
    grid-template-columns: 80px 120px minmax(0, 1fr) 120px;
    gap: 0.7rem;
    padding: 0.65rem 0.8rem;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 767.98px) {
    .previous-bracket-summary {
        grid-template-columns: 1fr;
    }

    .bracket-match-top,
    .bracket-match-footer-line {
        align-items: flex-start;
        flex-direction: column;
    }

    .bracket-game-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
