/* Style pour maximiser l'utilisation de l'espace */
body {
    overflow-x: hidden;
}

/* Style pour la barre supérieure */
.top-bar {
    position: fixed;
    top: 0;
    right: 0;
    left: 300px; /* Largeur exacte de la barre latérale */
    z-index: 1030;
    transition: all 0.3s ease;
    height: 42px; /* Hauteur fixe pour correspondre à l'en-tête latéral */
    padding: 0; /* Suppression du padding */
}

.top-bar-expanded {
    left: 0;
}

/* Style pour le contenu de la barre supérieure */
.top-bar .container-fluid {
    height: 100%;
    padding-top: 0;
    padding-bottom: 0;
}

.top-bar .d-flex {
    height: 100%;
    align-items: center;
}

/* Style pour la barre latérale */
#sidebarContainer {
    width: 300px;
    position: fixed;
    left: 0;
    top: 0; /* Maintenant au sommet de la page */
    bottom: 0;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    overflow-y: auto;
    z-index: 1040; /* Z-index plus élevé que la top-bar */
    padding: 0; /* Pas de padding pour le conteneur */
    border-right: 1px solid #dee2e6;
}

/* Style pour l'en-tête de la barre latérale */
.sidebar-header {
    background-color: #0d6efd; /* Même couleur que la top bar */
    color: white;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 42px; /* Même hauteur que la top bar */
}

/* Style pour le contenu principal */
#mainContent {
    margin-left: 300px;
    margin-top: 42px; /* Hauteur de la top bar */
    transition: all 0.3s ease;
    width: calc(100% - 300px);
}

/* Styles pour l'état caché de la barre latérale */
.sidebar-hidden {
    transform: translateX(-100%);
    width: 0 !important;
}

.content-expanded {
    margin-left: 0 !important;
    width: 100% !important;
}

/* Styles pour les boutons dans la top-bar */
.top-bar .btn {
    height: 32px;
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
}

/* Ajustements pour le responsive */
@media (max-width: 768px) {
    #sidebarContainer {
        width: 100%;
    }
    
    .top-bar {
        left: 0;
    }
    
    #mainContent {
        margin-left: 0;
        width: 100%;
    }
} 

/* Styles pour le menu déroulant du profil */
#profileDropdown {
    position: relative !important;
    z-index: 1050 !important;
}

#profileDropdownMenu {
    position: absolute !important;
    right: 0 !important;
    top: 100% !important;
    z-index: 1050 !important;
    min-width: 12rem !important;
    padding: 0.5rem 0 !important;
    margin: 0.25rem 0 0 !important;
    background-color: #fff !important;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15) !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    border-radius: 0.375rem !important;
    visibility: visible !important;
    opacity: 1 !important;
    transition: all 0.2s ease !important;
}

/* Version corrigée des règles pour afficher/masquer le menu */
#profileDropdownMenu.d-none {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

#profileDropdownMenu:not(.d-none) {
    display: block !important;
}

#profileMenuButton {
    background-color: transparent !important;
    border: none !important;
    padding: 0.5rem 1rem !important;
    display: flex !important;
    align-items: center !important;
    cursor: pointer !important;
}

#profileMenuButton:hover {
    background-color: rgba(255,255,255,0.1) !important;
}

.dropdown-item {
    padding: 0.5rem 1rem !important;
    display: flex !important;
    align-items: center !important;
}

.dropdown-item:hover {
    background-color: #f8f9fa !important;
}

.dropdown-menu-end {
    right: 0 !important;
    left: auto !important;
} 