/* SIDEBAR LOGO AMÉLIORÉ - FOND BLANC - FORCER LA PRIORITÉ */

/* Header de sidebar avec logo agrandi - PRIORITÉ MAXIMALE */
.app-sidebar .main-sidebar-header,
[data-menu-styles="dark"] .app-sidebar .main-sidebar-header,
[data-menu-styles="light"] .app-sidebar .main-sidebar-header,
html .app-sidebar .main-sidebar-header {
    height: 4.5rem !important;
    width: 15rem !important;
    position: fixed !important;
    display: flex !important;
    background: #c5cce5 !important;
    background-color: #c5cce5 !important;
    z-index: 9999 !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 1rem 1.25rem !important;
    border-right: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

/* Override des variables CSS */
.app-sidebar .main-sidebar-header {
    --menu-bg: #c5cce5 !important;
    --menu-border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Logo amélioré */
.app-sidebar .main-sidebar-header .header-logo {
    padding: 0.5rem !important;
    border-radius: 0.5rem !important;
    transition: all 0.3s ease !important;
    background: #c5cce5 !important;
    display: inline-block !important;
}

.app-sidebar .main-sidebar-header .header-logo:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    background: #c5cce5 !important;
}

/* Images du logo agrandies */
.app-sidebar .main-sidebar-header .header-logo img {
    height: 3rem !important;
    line-height: 3rem !important;
    max-width: 180px !important;
    object-fit: contain !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1)) !important;
    transition: all 0.3s ease !important;
}

.app-sidebar .main-sidebar-header .header-logo:hover img {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15)) !important;
}

/* Gestion des différentes versions du logo */
.app-sidebar .main-sidebar-header .header-logo .desktop-logo {
    display: block !important;
}

.app-sidebar .main-sidebar-header .header-logo .desktop-dark,
.app-sidebar .main-sidebar-header .header-logo .toggle-logo,
.app-sidebar .main-sidebar-header .header-logo .toggle-dark,
.app-sidebar .main-sidebar-header .header-logo .desktop-white,
.app-sidebar .main-sidebar-header .header-logo .toggle-white {
    display: none !important;
}

/* Ajustement de la marge du main-sidebar seulement */
.main-sidebar {
    margin-top: 4.5rem !important;
}

/* Version réduite de la sidebar */
.toggled .app-sidebar .main-sidebar-header {
    padding: 1rem 0.5rem !important;
}

.toggled .app-sidebar .main-sidebar-header .header-logo img {
    height: 2.5rem !important;
    max-width: 40px !important;
}

.toggled .app-sidebar .main-sidebar-header .header-logo .desktop-logo {
    display: none !important;
}

.toggled .app-sidebar .main-sidebar-header .header-logo .toggle-logo {
    display: block !important;
    height: 2.5rem !important;
    max-width: 40px !important;
}

/* Responsive mobile */
@media (max-width: 991.98px) {
    .app-sidebar .main-sidebar-header {
        display: none !important;
    }
    
    .main-sidebar {
        margin-top: 0 !important;
    }
}

/* Animation du logo au chargement */
.app-sidebar .main-sidebar-header .header-logo {
    animation: logoFadeIn 0.6s ease-out;
}

@keyframes logoFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Effet brillant subtil */
.app-sidebar .main-sidebar-header .header-logo::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.6s ease;
}

.app-sidebar .main-sidebar-header .header-logo:hover::after {
    left: 100%;
}
