/* =========================================================
   GBACAR — Glassmorphism shared theme
   Loaded once per app (non-scoped). Aligns MudBlazor
   components with the glass design tokens below.
   ========================================================= */

:root {
    --gb-blue: #0d6efd;
    --gb-blue-dark: #011A46;
    --gb-yellow: #DEA738;
    --gb-bg: #f7faff;
    --gb-glass: rgba(255, 255, 255, 0.72);
    --gb-border: rgba(255, 255, 255, 0.85);
    --gb-shadow: 0 18px 45px rgba(1, 26, 70, 0.10);
}

/* ---- Global typography ---- */
body {
    font-family: "Poppins", "Inter", "Segoe UI", Arial, sans-serif;
}

/* ---- Entry animation utility ---- */
.fade-up {
    animation: gb-fadeUp .45s ease both;
}

@keyframes gb-fadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   Buttons
   ========================================================= */

/* Primary filled -> glass gradient */
.mud-button-root.mud-button-filled.mud-button-filled-primary {
    background: linear-gradient(135deg, #0d6efd, #075bd8);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 10px;
    min-height: 44px;
    padding-top: 8px;
    padding-bottom: 8px;
    font-weight: 600;
    box-shadow: 0 10px 24px rgba(13, 110, 253, .32);
    transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}

.mud-button-root.mud-button-filled.mud-button-filled-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 35px rgba(13, 110, 253, .42);
    filter: brightness(1.05);
    background: linear-gradient(135deg, #0d6efd, #075bd8);
}

/* Secondary / outlined -> glass surface */
.mud-button-root.mud-button-outlined {
    background: rgba(255, 255, 255, .72);
    color: var(--gb-blue-dark);
    border: 1px solid rgba(1, 26, 70, .10);
    border-radius: 10px;
    min-height: 44px;
    padding-top: 8px;
    padding-bottom: 8px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background .25s ease, color .25s ease, transform .25s ease, box-shadow .25s ease;
}

.mud-button-root.mud-button-outlined:hover {
    background: rgba(13, 110, 253, .08);
    color: var(--gb-blue);
    border-color: rgba(13, 110, 253, .28);
    transform: translateY(-1px);
}

/* Outlined error keeps its danger tint */
.mud-button-root.mud-button-outlined.mud-button-outlined-error {
    color: #c0392b;
    border-color: rgba(226, 75, 74, .35);
}

.mud-button-root.mud-button-outlined.mud-button-outlined-error:hover {
    background: rgba(226, 75, 74, .10);
    color: #c0392b;
    border-color: rgba(226, 75, 74, .5);
}

/* Text buttons: subtle rounding */
.mud-button-root.mud-button-text {
    border-radius: 12px;
}

/* =========================================================
   Inputs (outlined text fields & selects)
   ========================================================= */

.mud-input.mud-input-outlined {
    border-radius: 10px;
    min-height: 48px;
    background: rgba(255, 255, 255, .65);
    transition: box-shadow .25s ease, border-color .25s ease;
}

.mud-input.mud-input-outlined .mud-input-outlined-border {
    border-radius: 10px;
    border-color: rgba(1, 26, 70, .14);
    transition: border-color .25s ease;
}

.mud-input.mud-input-outlined.mud-focused .mud-input-outlined-border {
    border-color: rgba(13, 110, 253, .55) !important;
    border-width: 1px;
}

.mud-input.mud-input-outlined.mud-focused {
    box-shadow: 0 0 0 4px rgba(13, 110, 253, .10);
}

/* Error state: red border + soft red glow */
.mud-input.mud-input-outlined.mud-error .mud-input-outlined-border {
    border-color: rgba(226, 75, 74, .65) !important;
    border-width: 1px;
}

.mud-input.mud-input-outlined.mud-error {
    box-shadow: 0 0 0 4px rgba(226, 75, 74, .10);
}

/* =========================================================
   Cards / paper used as content surfaces.
   Scoped to elevated cards only so popovers, menus and
   dialogs (also .mud-paper) keep their solid background.
   ========================================================= */

.mud-card {
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, .9);
    box-shadow: 0 14px 34px rgba(1, 26, 70, .08);
    background: rgba(255, 255, 255, .80);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.mud-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px rgba(1, 26, 70, .14);
    border-color: rgba(13, 110, 253, .28);
}

/* Chips / badges */
.mud-chip.mud-chip-filled.mud-chip-color-success {
    background: rgba(16, 185, 129, .14);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, .20);
    font-weight: 600;
}

/* =========================================================
   Sidebar navigation (global — NOT scoped)
   Targets the .gbaka-nav class rendered by <MudNavMenu>.
   These rules cannot live in the component's .razor.css
   because CSS-isolation ::deep cannot reach a child
   component's root element.
   ========================================================= */

.gbaka-nav .mud-nav-link.gbaka-nav-link {
    min-height: 50px;
    margin: 7px 14px;
    border-radius: 14px;
    color: rgba(1, 26, 70, .68);
    font-size: .94rem;
    font-weight: 600;
    padding-left: 18px;
    transition: background .25s ease, color .25s ease, transform .25s ease, box-shadow .25s ease;
}

.gbaka-nav .mud-nav-link.gbaka-nav-link:hover {
    background: rgba(13, 110, 253, .08);
    color: #0d6efd;
    transform: translateX(4px);
}

.gbaka-nav .mud-nav-link.gbaka-nav-link.active:not(.mud-nav-link-disabled) {
    background: linear-gradient(135deg, rgba(13, 110, 253, .16), rgba(255, 255, 255, .8));
    color: #0d6efd;
    box-shadow: inset 0 0 0 1px rgba(13, 110, 253, .18);
}

.gbaka-nav .mud-nav-link.gbaka-nav-link.active:not(.mud-nav-link-disabled) .mud-nav-link-icon {
    color: #0d6efd;
}

.gbaka-nav .mud-nav-link.gbaka-nav-link-featured {
    color: #011a46;
    font-size: 1rem;
}

/* Bouton de deconnexion : espace en bas pour qu'il ne soit pas colle au
   bord. Regle non scopee car .gbaka-logout est porte par un MudButton
   (composant enfant) que l'attribut de scope de GbakaMainLayout n'atteint pas. */
.gbaka-sidebar .mud-button-root.gbaka-logout {
    margin: 0 14px 28px;
    border-radius: 9px;
    font-weight: 700;
}
