/**
 * Sidebar Dark - Style Premium
 */

/* Container principal avec sidebar */
body.has-sidebar {
    margin: 0;
    padding: 0;
}

/* Sidebar fixe */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: #1a1d29;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Scrollbar personnalisée pour le sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #252836;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #4a4f63;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #5a5f73;
}

/* Logo/Brand */
.sidebar-brand {
    padding: 1.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-brand-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.sidebar-brand-logo {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.sidebar-brand-logo .hotel-logo {
    width: 45px !important;
    height: 45px !important;
    max-width: 45px !important;
    max-height: 45px !important;
    object-fit: contain;
    border-radius: 8px;
    background: white;
    padding: 4px;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.sidebar-brand-logo .sidebar-brand-icon-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 45px;
    height: 45px;
}

/* Menu de navigation */
.sidebar-menu {
    padding: 1rem 0 6rem 0; /* Padding en bas pour profil/déconnexion */
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Scrollbar personnalisée pour le menu */
.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: #252836;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: #4a4f63;
    border-radius: 3px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: #5a5f73;
}

.sidebar-menu-item {
    margin: 0.3rem 0.8rem;
}

.sidebar-menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.85rem 1rem;
    color: #a0aec0;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 500;
}

.sidebar-menu-link:hover {
    background: #252836;
    color: white;
}

.sidebar-menu-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    font-weight: 600;
}

.sidebar-menu-link.active i {
    color: white;
}

.sidebar-menu-link i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

/* Sous-menu */
.sidebar-submenu {
    padding-left: 2.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sidebar-submenu.show {
    max-height: 500px;
}

.sidebar-submenu-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 1rem;
    color: #718096;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    font-size: 0.9rem;
    margin: 0.2rem 0;
}

.sidebar-submenu-link:hover {
    background: rgba(255,255,255,0.03);
    color: #a0aec0;
    padding-left: 1.5rem;
}

/* Badge de notification */
.sidebar-badge {
    margin-left: auto;
    background: #ef233c;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Séparateur */
.sidebar-divider {
    margin: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* Section titre */
.sidebar-heading {
    padding: 1rem 1.5rem 0.5rem;
    color: #4a5568;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Sidebar Footer - Profil & Déconnexion */
.sidebar-footer {
    margin-top: auto;
    padding: 0.8rem;
    background: #0f1117;
    border-top: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}

.sidebar-footer-item {
    margin: 0.4rem 0;
}

.sidebar-footer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.75rem 0.8rem;
    color: #a0aec0;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.sidebar-footer-link:hover {
    background: #1a1d29;
    color: white;
}

.sidebar-footer-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Avatar dans footer */
.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    flex-shrink: 0;
}

/* Info utilisateur */
.user-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    line-height: 1.3;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: inherit;
}

.user-role {
    font-size: 0.73rem;
    color: #718096;
    margin-top: 1px;
}

.sidebar-footer-link:hover .user-role {
    color: #a0aec0;
}

.sidebar-footer-link.active .user-name,
.sidebar-footer-link.active .user-role {
    color: white;
}

/* Déconnexion rouge */
.sidebar-footer-link.logout-link {
    color: #ef4444;
}

.sidebar-footer-link.logout-link:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.sidebar-footer-link.logout-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

/* Main content avec sidebar */
.main-content-with-sidebar {
    margin-left: 260px;
    padding: 2rem;
    min-height: 100vh;
    background: #f0f2f5;
}

/* Supprimer les anciens styles user (maintenant dans le menu) */

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content-with-sidebar {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1001;
        background: var(--primary-color);
        color: white;
        border: none;
        padding: 0.8rem 1rem;
        border-radius: 10px;
        cursor: pointer;
    }
}

@media (min-width: 769px) {
    .sidebar-toggle {
        display: none;
    }
}


