html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
html {
    /*zoom: 0.9;*/ /* D�zoome � 90% */
/*    transform: scale(0.9);*/
    /* transform-origin: 0 0;*/
}
a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

/*.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMz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error-boundary::after {
        content: "An error has occurred."
    }*/

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
.blur-overlay {
    backdrop-filter: blur(10px);
    background-color: rgba(0, 0, 0, 0.5);
}
.full-height-datagrid > .mud-table-container {
    height: calc(100vh - 210px);
}

.mud-input-label-inputcontrol::after{
    color:red;
    margin-left: 3px
}

.menu-compact.mud-menu-item {
    padding-top: 2px !important;
    padding-bottom: 2px !important;
}

:root {
    --blazor-blue: #156fb4;
    --blazor-text-main: #2d3436;
    --blazor-text-sub: #636e72;
}

/* --- STYLE DU MODAL DE RECONNEXION --- */
#components-reconnect-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

    /* Classes reellement posees par Blazor Web (.NET 8+) : le prefixe complet est
       obligatoire. Cibler « .show » ne correspondait a rien, le voile ne s'affichait
       donc jamais et l'utilisateur voyait un ecran fige sans explication. */
    #components-reconnect-modal.components-reconnect-show,
    #components-reconnect-modal.components-reconnect-failed,
    #components-reconnect-modal.components-reconnect-rejected,
    #components-reconnect-modal.show {
        display: flex !important;
    }

    /* Deux messages selon l'etat : tentative en cours, ou circuit definitivement perdu. */
    #components-reconnect-modal .reconnect-lost {
        display: none;
    }

    #components-reconnect-modal.components-reconnect-failed .reconnect-trying,
    #components-reconnect-modal.components-reconnect-rejected .reconnect-trying {
        display: none;
    }

    #components-reconnect-modal.components-reconnect-failed .reconnect-lost,
    #components-reconnect-modal.components-reconnect-rejected .reconnect-lost {
        display: block;
    }

    #components-reconnect-modal.components-reconnect-failed .modern-spinner,
    #components-reconnect-modal.components-reconnect-rejected .modern-spinner {
        display: none;
    }

.modern-reconnect-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    max-width: 350px;
    border: 1px solid rgba(255,255,255,0.2);
}

.modern-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--blazor-blue);
    border-radius: 50%;
    animation: blazor-spin 1s linear infinite;
    margin: 0 auto 20px;
}

/* --- STYLE DE LA BANNI�RE D'ERREUR --- */
#blazor-error-ui {
    display: none;
    position: fixed !important;
    top: 24px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 10001 !important;
    width: auto !important;
    /* On force une largeur minimale pour �viter que les boutons se touchent */
    min-width: 550px !important;
    background: none !important;
}

.modern-toast {
    display: flex !important;
    flex-direction: row !important; /* Force l'alignement horizontal */
    align-items: center !important;
    justify-content: space-between !important;
    background-color: #ffffff !important;
    padding: 12px 24px !important;
    border-radius: 14px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25) !important;
    border: 1px solid #ddd !important;
}

.toast-body {
    flex: 1 !important; /* Prend tout l'espace disponible au milieu */
    padding: 0 25px !important;
    white-space: nowrap !important; /* Emp�che le texte de forcer le bouton vers la croix */
}

.toast-title {
    margin: 0 !important;
    font-weight: 800 !important;
    font-size: 1rem !important;
    color: #156fb4 !important; /* Titre en bleu */
}

.toast-desc {
    margin: 0 !important;
    font-size: 0.85rem !important;
    color: #636e72 !important; /* Sous-texte gris */
}

/* Boutons et Actions */
.toast-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    /* gap: 25px cr�e un espace vide de 25 pixels entre le bouton bleu et la croix */
    gap: 25px !important;
    flex-shrink: 0 !important; /* Emp�che cette zone de r�tr�cir */
}

#blazor-error-ui .reload {
    background-color: #156fb4 !important;
    color: #ffffff !important;
    padding: 8px 18px !important;
    border-radius: 8px !important;
    font-weight: bold !important;
    text-decoration: none !important;
}

#blazor-error-ui .dismiss {
    color: #b2bec3 !important;
    font-size: 1.5rem !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
}
.close-toast {
    position: static !important;
    background: none !important;
    border: none !important;
    color: #95a5a6 !important;
    font-size: 1.4rem !important;
    cursor: pointer !important;
    padding: 5px !important;
    line-height: 1 !important;
}
.btn-toast {
    background: #156fb4 !important;
    color: white !important;
    padding: 8px 20px !important;
    border-radius: 8px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    display: inline-block !important;
}
/* --- ANIMATIONS --- */
@keyframes blazor-spin {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes blazor-slideDown {
    from {
        transform: translate(-50%, -100%);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Espacement pour les flèches de menu quand le drawer est replié (mode mini) */
.mud-drawer--closed.mud-drawer-mini {
    width: 66px !important;
}

/* On cible le chip au survol */
.chip-hover-fill:hover {
    /* Utilise la couleur "Info" du thème MudBlazor pour le fond */
    background-color: var(--mud-palette-info) !important;
    border-color: var(--mud-palette-info) !important;
}

    /* On change la couleur du texte et du lien à l'intérieur au survol */
    .chip-hover-fill:hover * {
        color: var(--mud-palette-info-text) !important;
    }

/* Titre divider */
.title-divider {
    border-color: var(--mud-palette-primary) !important;
   /* opacity: 1;*/ /* important sinon Mud applique une transparence */
}

/* ===== PAGES AUTH (login, forgot, reset) ===== */
.auth-page .mud-card {
    border-radius: 14px !important;
    border: 1px solid #e8eaed;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 8px 24px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden;
}

/* Logo : bandeau bleu avec découpe arrondie en bas */
.auth-page .mud-card > .mud-card-header {
    margin: -16px -16px 0 !important;
    margin-right: -16px !important;
    padding: 0;
}

.auth-page .mud-card-header .mud-theme-primary {
    border-radius: 0 !important;
    padding: 24px 20px 36px !important;
    position: relative;
}

.auth-page .mud-card-header .mud-theme-primary::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -5%;
    width: 110%;
    height: 20px;
    background: #fff;
    border-radius: 50% 50% 0 0;
}

.auth-page .mud-input-outlined .mud-input-outlined-border {
    border-radius: 8px;
}

.auth-page .mud-input.mud-input-outlined {
    border-radius: 8px;
}

.auth-page .mud-button-filled.mud-button-filled-primary {
    border-radius: 8px;
    text-transform: none;
}

.auth-page .mud-alert-filled-error,
.auth-page .mud-alert-filled-success {
    border-radius: 8px;
}

/* ===== TITRES DES GROUPES DU MENU DE NAVIGATION =====
   (MonParc, Commandes, Apnf, Mon administration, Support…)
   On cible UNIQUEMENT l'en-tête de groupe (.mud-nav-group > .mud-nav-link),
   pas les sous-liens, pour les rendre bien lisibles et plus grands. */
.mud-navmenu .mud-nav-group > .mud-nav-link {
    /* Titre simplement coloré et en gras (pas de fond) */
    color: var(--mud-palette-primary) !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
}

.mud-navmenu .mud-nav-group > .mud-nav-link .mud-nav-link-text {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
}

/* Icône du groupe assortie à la couleur du titre */
.mud-navmenu .mud-nav-group > .mud-nav-link .mud-nav-link-icon {
    color: var(--mud-palette-primary) !important;
}

/* ===== SOUS-LIENS DES GROUPES (affichés sous chaque titre) =====
   On cible UNIQUEMENT les liens situés DANS un groupe (le collapse).
   La Déconnexion est un lien autonome hors groupe : elle n'est PAS touchée. */
.mud-navmenu .mud-nav-group .mud-collapse-container {
    position: relative;
}

/* Ligne verticale guide : en position absolue, elle n'élargit pas le menu
   (donc pas de barre de défilement horizontale). */
.mud-navmenu .mud-nav-group .mud-collapse-container::before {
    content: "";
    position: absolute;
    left: 0.85rem;
    top: 0.25rem;
    bottom: 0.25rem;
    width: 2px;
    border-radius: 2px;
    background-color: rgba(21, 111, 180, 0.2);
}

.mud-navmenu .mud-nav-group .mud-collapse-container .mud-nav-link {
    padding-left: 1.75rem !important;
    font-size: 0.9rem !important;
    font-weight: 400 !important;
}


/* Texte discret (dates, compteurs, commentaires) : gris du thème plutôt que la
   couleur Secondary de MudBlazor, restée au rose par défaut faute d'être définie. */
.ticket-muted {
    color: var(--mud-palette-text-secondary);
}
