﻿.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

/* ===============================
   PC / Desktop
   (>= 769px)
=================================*/
@media (min-width: 769px) {

    /* Navbar */
    .bg-primary {
        background: #6c7ae0;
    }

    .nav-link {
        text-decoration: none;
        color: #333;
        padding: .5rem;
        border-radius: 4px;
    }

        .nav-link:hover {
            background-color: #e0e0e0;
        }

    .active {
        font-weight: bold;
        background-color: #c0c0ff;
    }

    .home-link {
        text-decoration: none;
        color: inherit;
    }

        .home-link:hover h3 {
            text-decoration: underline;
        }

    /* Fond global */
    html, body {
        height: 100%;
        margin: 0;
        background: #c4d3f6; /* violet clair */
        font-family: Poppins, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    }

    /* Conteneurs de centrage */
    .limiter {
        width: 100%;
        margin: 0 auto;
    }

    .container-table100 {
        width: 100%;
        min-height: 100vh;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding: 60px 24px;
        background: transparent;
    }

    .wrap-table100 {
        width: 1400px;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 10px 20px rgba(0,0,0,.08);
        background: #fff;
    }

    .table100 {
        overflow-x: auto;
    }

    /* TABLEAU calendrier */
    .calendar-table {
        width: 100%;
        border-collapse: collapse;
        margin: 0;
        background: #fff;
    }

        .calendar-table thead th {
            background: #6c7ae0;
            color: #fff;
            font-weight: 600;
            font-size: 16px;
            padding: 14px 12px;
            border: 0;
            text-align: left;
        }

        /* Général (sans vertical-align global) */
        .calendar-table th,
        .calendar-table td {
            border-bottom: 1px solid #f2f2f2;
            color: #666;
            font-size: 15px;
            padding: 0px 10px;
        }

        /* Hover ligne */
        .calendar-table tbody tr:hover {
            background: #ececff;
        }

        /* Bordure gauche plus large sur la 1re colonne */
        .calendar-table td:first-child,
        .calendar-table th:first-child {
            padding-left: 16px;
        }

        /* Bordures plus visibles (corps uniquement) */
        .calendar-table tbody tr {
            border-bottom: 2px solid #e0e0e0;
        }

        .calendar-table thead tr {
            border-bottom: none !important;
        }

        .calendar-table tbody td {
            border-right: 1px solid #f0f0f0;
        }

            .calendar-table tbody td:last-child {
                border-right: none;
            }

    /* Cellules & événements */
    .calendar-cell {
        text-align: center;
        vertical-align: middle;
        min-height: 1cm; /* hauteur mini */
        overflow: visible;
        padding: 0 !important; /* évite le vide autour de l'event */
    }

    /* ⚠️ IMPORTANT: cibler les 7 DERNIÈRES colonnes = les jours (robuste avec/sans "Dupliquer") */
    .calendar-table thead th:nth-last-child(-n+7) {
        text-align: center;
    }

    .calendar-table tbody td:nth-last-child(-n+7) {
        padding: 0 !important; /* aucune marge autour de l'événement */
        vertical-align: top; /* alignement en haut pour les événements */
        border-right: 1px solid #f0f0f0;
    }

    .calendar-table tbody td:nth-last-child(1) {
        border-right: none;
    }

    /* Conteneur des événements dans les cellules */
    .calendar-cell .events-container {
        display: flex;
        flex-direction: column;
        align-items: stretch; /* tous les events prennent toute la largeur */
        gap: 0; /* pas d'espace vertical ajouté */
        min-height: 1cm;
        padding: 0;
        margin: 0;
    }

    /* Bloc événement */
    .event-box {
        min-height: 0.6cm;
        height: auto;
        line-height: 1.1;
        padding: 2px 6px;
        border-radius: 5px;
        font-size: .9rem;
        white-space: normal;
        margin: 0; /* colle à la cellule */
        width: 100%; /* s’étire pour égaler les autres */
        box-sizing: border-box;
    }

    /* Boutons + (inchangés) */
    .btn.btn-sm.btn-light {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        width: 100px;
        height: 10px;
        padding: 0;
        margin: 2px auto;
        border-radius: 6px;
        border: none;
        color: #fff;
        font-size: 10px;
        font-weight: bold;
        box-shadow: none;
        transition: background-color .2s;
    }



    /* Colonne "Dupliquer" (3e) — activée seulement si la table a la classe .has-dup */
    .calendar-table.has-dup tbody td:nth-child(3) {
        text-align: center;
        /*vertical-align: middle;*/
    }

        .calendar-table.has-dup tbody td:nth-child(3) .btn {
            display: inline-flex;
            justify-content: center;
            align-items: center;
        }



    /* Centrer les + dans les cellules jour */
    .calendar-cell .btn {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        margin: 0;
    }

    /* Centrer Agent/Groupe (les 2 premières colonnes) */
    .calendar-table tbody td:nth-child(1),
    .calendar-table tbody td:nth-child(2) {
        text-align: center;
        /*vertical-align: middle;*/
    }

    /* Lignes avec une 1re cellule colspan=3 (Commentaires / Résumé) */
    .calendar-table tbody tr > td:first-child[colspan="3"] ~ td {
        padding: 0 !important;
        vertical-align: top;
        border-right: 1px solid #f0f0f0;
    }

        .calendar-table tbody tr > td:first-child[colspan="3"] ~ td:last-child {
            border-right: none;
        }

    /* Lignes avec une 1re cellule colspan=2 (Commentaires / Résumé) */
    .calendar-table tbody tr > td:first-child[colspan="2"] ~ td {
        padding: 0 !important;
        vertical-align: top;
        border-right: 1px solid #f0f0f0;
    }

        .calendar-table tbody tr > td:first-child[colspan="2"] ~ td:last-child {
            border-right: none;
        }

    /* Centrer la colonne "Dupliquer" sans toucher au style Bootstrap du bouton */
    .calendar-table td.dup-cell {
        text-align: center;
        vertical-align: middle;
    }



    /* Ombre pop modif */
    .popup-overlay {
        position: fixed; /* recouvre tout l’écran */
        inset: 0; /* équivaut à top:0; right:0; bottom:0; left:0 */
        background: rgba(0,0,0,.25); /* optionnel : fond semi-transparent */
        display: flex; /* pour centrer aussi via flex si tu préfères */
        align-items: center;
        justify-content: center;
        z-index: 1000; /* par-dessus le reste */
    }

    .popup-content {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%); /* centrage parfait */
        background: #fff;
        padding: 1rem 1.25rem;
        border-radius: 10px;
        box-shadow: 0 10px 30px rgba(0,0,0,.25);
        max-width: 310px;
        width: min(92vw, 310px);
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Résumé */
    .badge-container {
        display: flex;
        flex-wrap: wrap;
        gap: 4px 0;
    }

        .badge-container .badge {
            flex: 0 0 100%;
            margin: 0;
        }

    /* =====================================
   MODE COMPACT (réduction visuelle)
===================================== */
    .calendar-root.compact {
        font-size: 11px !important;
        line-height: 1.1;
    }

        .calendar-root.compact .calendar-table th,
        .calendar-root.compact .calendar-table td {
            padding: 0 !important; /* enlève tous les padding */
            margin: 0 !important;
            border-spacing: 0;
        }

        .calendar-root.compact .calendar-table thead th {
            font-size: 12px;
            padding: 2px 3px !important;
        }

        /* Réduction des blocs d'événements */
        .calendar-root.compact .event-box {
            font-size: 10px !important;
            padding: 1px 2px !important;
            border-radius: 3px;
            margin: 0 !important;
            line-height: 1.05;
        }

        /* Réduction des cellules */
        .calendar-root.compact .calendar-cell,
        .calendar-root.compact .calendar-cell .events-container {
            min-height: 0 !important;
        }



        /* Centrage des colonnes agent/groupe encore plus serré */
        .calendar-root.compact .calendar-table td:nth-child(1),
        .calendar-root.compact .calendar-table td:nth-child(2),
        .calendar-root.compact .calendar-table td:nth-child(3) {
            padding: 0 !important;
        }

        /* Réduction en-tête globale */
        .calendar-root.compact .calendar-table thead th {
            background-color: #6c7ae0;
            font-weight: 600;
        }

        /* (optionnel) suppression de l’ombre et arrondi pour gagner de l’espace */
        .calendar-root.compact .wrap-table100 {
            box-shadow: none;
            border-radius: 4px;
        }

        /* ===== Compact ++ : densité horizontale ===== */
        .calendar-root.compact .calendar-table {
            table-layout: fixed; /* maîtrise la largeur */
        }

            /* 1) Rétrécir Agent / Groupe / Dupliquer */
            .calendar-root.compact .calendar-table thead th:nth-child(1),
            .calendar-root.compact .calendar-table tbody td:nth-child(1) {
                width: 110px;
            }

            .calendar-root.compact .calendar-table thead th:nth-child(2),
            .calendar-root.compact .calendar-table tbody td:nth-child(2) {
                width: 90px;
            }

            .calendar-root.compact .calendar-table thead th:nth-child(3),
            .calendar-root.compact .calendar-table tbody td:nth-child(3) {
                width: 46px;
            }
            /* le + est déjà masqué */

            /* Texte serré + ellipses dans ces 3 colonnes */
            .calendar-root.compact .calendar-table td:nth-child(-n+3) {
                padding: 0 !important;
                overflow: hidden;
                text-overflow: ellipsis;
                white-space: nowrap;
                text-align: center;
            }

        /* 2) Dans les cellules de jours : events côte à côte (2 par ligne) */
        .calendar-root.compact .calendar-cell .events-container {
            display: flex;
            flex-wrap: wrap; /* passe à la ligne quand manque de place */
            gap: 1px; /* micro espace entre events */
            padding: 0;
        }

        /* 2 par ligne : largeur = 50% - gap */
        .calendar-root.compact .calendar-cell .event-box {
            box-sizing: border-box;
            width: calc(50% - 1px);
            margin: 0 !important;
            white-space: normal; /* le texte peut retourner à la ligne */
            min-height: auto;
            line-height: 1.05;
            padding: 1px 2px !important;
        }

        /* (Option) passer à 3 par ligne : remplace par width: calc(33.333% - 1px); */

        /* 3) Colonnes jours : enlever tout padding (déjà fait) et garder lignes fines */
        .calendar-root.compact .calendar-table tbody td:nth-last-child(-n+7) {
            padding: 0 !important;
        }

        /* 4) Garde un scroll horizontal propre si besoin */
        .calendar-root.compact .table100,
        .calendar-root.compact .wrap-table100 {
            overflow-x: auto;
        }


        /* ===== Compact : masquer week-end (samedi & dimanche) ===== */
        .calendar-root.compact.no-weekend .calendar-table thead th:nth-last-child(-n+2),
        .calendar-root.compact.no-weekend .calendar-table tbody td:nth-last-child(-n+2) {
            display: none; /* sont supprimées visuellement */
        }




        /* === Compact : forcer l'horizontal === */
        .calendar-root.compact .calendar-cell .events-container {
            display: flex !important;
            flex-direction: row !important; /* <- casse la colonne */
            flex-wrap: wrap !important; /* retour à la ligne */
            gap: 1px;
            align-content: flex-start;
            min-height: 0 !important;
            padding: 0 !important;
            margin: 0 !important;
        }

        /* 2 par ligne */
        .calendar-root.compact .calendar-cell .event-box {
            /* écrase width:100% du style normal */
            width: auto !important;
            flex: 0 0 calc(50% - 1px) !important; /* 50% par carte */
            margin: 0 !important;
            white-space: normal;
            line-height: 1.05;
            padding: 1px 2px !important;
            border-radius: 3px;
            box-sizing: border-box;
        }

    /* (option) 3 par ligne : décommente cette règle */
    /* .calendar-root.compact .calendar-cell .event-box{ flex-basis: calc(33.333% - 1px) !important; } */

    /* ===== Compact : lignes VERTICALES plus épaisses sur les jours ===== */
    .calendar-root.compact {
        --day-vline-color: #bfc7ff; /* couleur des séparateurs verticaux */
        --day-vline-w: 2px; /* épaisseur verticale (mets 3px si tu veux plus) */
        --row-hline-color: #eceef7; /* horizontales (lignes de lignes) */
        --row-hline-w: 1px; /* épaisseur horizontale */
    }

        /* 0) On neutralise les bordures par défaut pour repartir propre */
        .calendar-root.compact .calendar-table thead th,
        .calendar-root.compact .calendar-table tbody td {
            border-right: 0 !important; /* pas de vertical par défaut */
            border-bottom: var(--row-hline-w) solid var(--row-hline-color) !important; /* horizontales fines */
        }

            /* 1) On remet des VERTICALES épaisses sur les 7 dernières colonnes (jours) */
            .calendar-root.compact .calendar-table thead th:nth-last-child(-n+7),
            .calendar-root.compact .calendar-table tbody td:nth-last-child(-n+7) {
                border-right: var(--day-vline-w) solid var(--day-vline-color) !important;
            }

            /* 2) Pas de trait à l’extrême droite (dimanche) */
            .calendar-root.compact .calendar-table thead th:last-child,
            .calendar-root.compact .calendar-table tbody td:last-child {
                border-right: none !important;
            }

        /* === Colonne Dupliquer: élargissement dynamique en mode compact === */
        .calendar-root.compact .calendar-table.dup-wide {
            table-layout: fixed; /* on reste en fixed pour garder le layout compact */
        }

            /* Largeur par défaut en compact (tu as déjà 46px) — inchangé */

            /* Quand la popup est ouverte, on élargit la 3e colonne pour laisser respirer la carte */
            .calendar-root.compact .calendar-table.dup-wide thead th:nth-child(3),
            .calendar-root.compact .calendar-table.dup-wide tbody td:nth-child(3) {
                width: 200px !important; /* ajuste 320–420px selon la largeur de ta carte */
            }

            /* Et on arrête de rogner dans cette colonne pendant l'ouverture */
            .calendar-root.compact .calendar-table.dup-wide tbody td:nth-child(3) {
                overflow: visible !important;
                white-space: normal !important;
            }

        /* Optionnel : petite transition visuelle pour l'élargissement */
        .calendar-root.compact .calendar-table thead th:nth-child(3),
        .calendar-root.compact .calendar-table tbody td:nth-child(3) {
            transition: width .18s ease-in-out;
        }

        /* Si ta popup a une classe, aide-la à rester visible sans overlay */
        .calendar-root.compact .calendar-table.dup-wide .dup-cell .card {
            position: relative; /* reste dans le flux de la cellule élargie */
            z-index: 2;
        }

        .calendar-root.compact .calendar-table.dup-wide .dup-cell .card {
            margin: 8px auto 0; /* au lieu du mt-2 par défaut */
            max-width: 360px;
        }

        /* ====== COMPACT : forcer 2 colonnes même quand le week-end est affiché ====== */

        /* 1) Le conteneur d'événements doit rester une grille flex WRAP horizontale */
        .calendar-root.compact .calendar-cell [class*="events-container"] {
            display: flex !important;
            flex-wrap: wrap !important;
            align-content: flex-start;
            gap: 1px; /* micro-espacement entre cartes */
            margin: 0 !important;
            padding: 0 !important;
            min-height: 0 !important;
            overflow: visible !important;
        }

            /* 2) Chaque carte prend la moitié de la largeur (=> 2 par ligne) */
            .calendar-root.compact .calendar-cell [class*="events-container"] > .event-box {
                width: auto !important; /* annule width:100% du mode normal */
                flex: 0 0 calc(50% - 1px) !important; /* 2 par ligne */
                max-width: calc(50% - 1px) !important;
                box-sizing: border-box;
            }

            /* 3) Cas 1 seule carte => pleine largeur (optionnel) */
            .calendar-root.compact .calendar-cell [class*="events-container"].single > .event-box {
                flex-basis: 100% !important;
                max-width: 100% !important;
            }

            /* 4) Cas nombre impair => la dernière s'étire (optionnel) */
            .calendar-root.compact .calendar-cell [class*="events-container"].odd > .event-box:last-child {
                flex-basis: 100% !important;
                max-width: 100% !important;
            }
}

/* ===============================
   Smartphone
   (<= 768px)
=================================*/
@media (max-width: 768px) {

    /* Navbar */
    .bg-primary {
        background: #6c7ae0;
    }

    .nav-link {
        text-decoration: none;
        color: #333;
        padding: .5rem;
        border-radius: 4px;
    }

        .nav-link:hover {
            background-color: #e0e0e0;
        }

    .active {
        font-weight: bold;
        background-color: #c0c0ff;
    }

    .home-link {
        text-decoration: none;
        color: #000;
        font-size: 1.2rem;
    }
    /* bouton menu */
    .home-link {
        text-decoration: none;
        color: inherit;
    }

        .home-link:hover h3 {
            text-decoration: underline;
        }

    /* Tableau simple */
    .table-zebra {
        width: 100%;
        border-collapse: collapse;
    }

        .table-zebra th, .table-zebra td {
            padding: 8px;
            border: 1px solid #ddd;
        }

        .table-zebra tr:nth-child(even) {
            background-color: #f0f8ff;
        }

        .table-zebra tr:hover {
            background-color: #dbeeff;
        }

    /* Tableau Calendrier (version mobile) */
    .calendar-table {
        width: 100%;
        max-width: 100%;
        table-layout: auto;
        border-collapse: collapse;
        margin-top: 1rem;
        font-size: .9rem;
        text-align: center;
        table-layout: fixed;
    }

        .calendar-table thead {
            background-color: #f5f5f5;
        }

        .calendar-table th, .calendar-table td {
            border: 1px solid #ccc;
            padding: 4px 6px;
            white-space: normal;
            word-break: break-word;
        }

        .calendar-table th {
            font-weight: bold;
            background-color: #e0e0e0;
        }

        .calendar-table tbody tr:nth-child(even) {
            background-color: #fafafa;
        }

        .calendar-table td:first-child, .calendar-table th:first-child {
            text-align: left;
        }

    /* Affichage Calendrier */
    .calendar-cell {
        width: 150px;
        height: 100px;
        vertical-align: top;
        overflow-y: auto;
    }

    .events-container {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .event-block {
        padding: 4px;
        border-radius: 5px;
        color: black;
        font-size: .9em;
        overflow-wrap: break-word;
    }

    .event-time {
        font-weight: bold;
    }

    .event-title {
        margin-top: 2px;
    }

    .event-description {
        font-style: normal;
    }

    /* message center rouge pour les formulaires */
    .text-danger {
        color: red;
        font-size: .95rem;
        margin-top: 2px;
    }

    /* jours fériés */
    .holiday-label {
        font-size: .75em;
        font-weight: bold;
        background-color: #aaf0d1;
    }

    /* Ombre pop modif */
    .popup-overlay {
        position: fixed; /* recouvre tout l’écran */
        inset: 0; /* équivaut à top:0; right:0; bottom:0; left:0 */
        background: rgba(0,0,0,.25); /* optionnel : fond semi-transparent */
        display: flex; /* pour centrer aussi via flex si tu préfères */
        align-items: center;
        justify-content: center;
        z-index: 1000; /* par-dessus le reste */
    }

    .popup-content {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%); /* centrage parfait */
        background: #fff;
        padding: 1rem 1.25rem;
        border-radius: 10px;
        box-shadow: 0 10px 30px rgba(0,0,0,.25);
        max-width: 310px;
        width: min(92vw, 310px);
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Résumé */
    .badge-container {
        display: flex;
        flex-wrap: wrap;
        gap: 4px 0;
    }

        .badge-container .badge {
            flex: 0 0 100%;
            margin: 0;
        }
}
