/* Compléments à Tabler, strictement limités à ce que l'application ajoute. */

/* Marqueur visuel des identifiants pseudonymisés : un UUID tronqué doit se
   lire comme un code technique, pas comme un nom. */
.uuid-court {
    font-family: var(--tblr-font-monospace, ui-monospace, monospace);
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
}

/* Bandeau de révélation d'identité : volontairement voyant. Une identité
   affichée est un état d'exception, pas l'état normal de l'écran. */
.bandeau-revelation {
    border-left: 0.25rem solid var(--tblr-warning, #f76707);
}

.compte-a-rebours {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

/* Saisie en série : le formulaire reste à l'écran après validation, le champ
   montant reprend le focus. Le rappel des dernières lignes évite de ressaisir
   deux fois le même don sans avoir à quitter la page. */
.derniers-dons {
    max-height: 22rem;
    overflow-y: auto;
}

.montant {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.filtres-form {
    display: grid;
    gap: 1rem;
}

.filtres-grille,
.filtres-form:not(:has(.filtres-grille)) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 0.75rem 1rem;
    align-items: start;
}

.filtres-form > [class*="col-"] {
    width: auto;
    max-width: none;
    padding: 0;
}

.filtres-form > .col-md-6,
.champ-filtre-large {
    grid-column: span 2;
}

.filtres-form > .col-12,
.filtres-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.25rem;
    border-top: 1px solid var(--tblr-border-color, #dadfe5);
}

.filtres-form > .col-12:empty,
.filtres-form > [class*="col-"]:empty {
    display: none;
}

.filtres-form .btn-list,
.filtres-form > .col-12,
.filtres-actions .btn-list {
    gap: 0.5rem;
}

.graphique-conteneur {
    position: relative;
    height: var(--graphique-hauteur, 220px);
    min-height: 12rem;
}

.graphique-conteneur > canvas.graphique {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.serie-actions {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: 0.35rem;
    min-width: 6.5rem;
}

.serie-actions .btn {
    justify-content: center;
}

.connexion-page {
    min-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding-block: 2rem;
}

.connexion-page > .row {
    width: 100%;
}

.connexion-footer {
    display: flex;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

.connexion-footer-note {
    flex-basis: 100%;
    text-align: center;
}

.connexion-footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

.affichage-mot-de-passe-bouton {
    display: inline-flex;
    align-items: center;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 1.25;
    cursor: pointer;
}

.affichage-mot-de-passe-bouton:hover {
    text-decoration: underline;
}

.navbar-account {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-shrink: 0;
    gap: 0.5rem;
    min-width: 0;
    white-space: nowrap;
}

.navbar-account-name {
    max-width: 9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dons-rattaches {
    transition: opacity 0.15s ease;
}

.dons-rattaches-chargement {
    opacity: 0.65;
    pointer-events: none;
}

.profil-dons-barre {
    appearance: none;
    border: 0;
    border-radius: 1rem;
    overflow: hidden;
    background: var(--tblr-border-color);
    accent-color: var(--tblr-primary);
}

.profil-dons-barre::-webkit-progress-bar { background: var(--tblr-border-color); }
.profil-dons-barre::-webkit-progress-value { background: var(--tblr-primary); border-radius: 1rem; }
.profil-dons-barre::-moz-progress-bar { background: var(--tblr-primary); border-radius: 1rem; }

[data-graphiques-repliables] > summary { cursor: pointer; }
[data-graphiques-repliables] > summary:focus-visible { outline: 2px solid var(--tblr-primary); outline-offset: 2px; }

@media (max-width: 991.98px) {
    .navbar .container-xl {
        justify-content: flex-start;
    }

    .navbar .navbar-toggler {
        margin-right: 0.75rem;
    }

    .navbar .navbar-collapse {
        flex-basis: 100%;
    }
}

@media (max-width: 575.98px) {
    .filtres-form > .col-md-6,
    .champ-filtre-large {
        grid-column: 1 / -1;
    }

    .filtres-form > .col-12,
    .filtres-actions {
        align-items: stretch;
    }
}

@media print {
    .d-print-none-force,
    .navbar,
    .btn {
        display: none !important;
    }
}
