
/* SIDEBAR */
.btn-toggle-sidebar {
    z-index: 1000;
    height: 35px;
    width: 100%;
    border: none;
    color: #FFFFFF !important;
    padding: 3px 8px 0 0;
    display: flex;
    justify-content: right;
    align-items: center;
    border-bottom: 1px solid rgba(62, 241, 255, 0.5);
    margin-top: 3px;
    margin-bottom: 10px;
}
.btn-toggle-sidebar svg {
    height: 100%;
    width: auto;
}
.btn-toggle-sidebar:hover {
    background-color: #1c3b4d !important;
}

/* En dessous de 768px, .sidebar est aussi un .offcanvas-md (voir _menu.html.twig) : Bootstrap gère
   seul le positionnement fixe/le tiroir/le backdrop dans cette plage — les règles ci-dessous
   (pensées pour le menu latéral statique) ne doivent s'appliquer qu'à partir du point de bascule
   md, sous peine d'entrer en conflit de cascade avec le mode offcanvas. */
@media (min-width: 768px) {
    .sidebar {
        position: fixed;
        width: 250px;
        top: 82px;
        left: 0;
        bottom: 0;
        padding: 0 0 20px 0;
        z-index: 100;
        transition: width 0.3s ease;
        box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    }

    .sidebar-sticky {
        position: relative;
        top: 0;
        height: calc(100vh - 117px);
        overflow-x: hidden;
        overflow-y: auto;
    }

    .sidebar.collapsed {
        width: 50px;
    }
}

@media (max-width: 767.98px) {
    .sidebar {
        --bs-offcanvas-width: 280px;
    }

    /* !important nécessaire pour passer devant .offcanvas-md.offcanvas-start (Bootstrap, même
       spécificité) : le tiroir démarre sous le header fixe plutôt que de le recouvrir. */
    .sidebar.offcanvas-start {
        top: 82px !important;
        height: calc(100vh - 82px) !important;
    }
}
/* END SIDEBAR */

/* NAV */
.nav-link {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem;
    padding: 0.5rem 1rem !important;
    color: #FFFFFF !important;
    text-decoration: none;
}

.nav-link svg {
    width: 20px;
    text-align: center;
}


.nav-link:hover,
.nav-link.active {
    background-color: rgba(62, 241, 255, 0.1);
    transition: background-color 0.3s, color 0.3s;
}

.nav-item {
    margin-bottom: 5px;
}

.nav {
    width: 100%;
}

.nav-item.separator {
    border-bottom: 1px solid rgba(62, 241, 255, 0.5);
    margin-bottom: 10px;
    padding-bottom: 10px;
}

.menu-text {
    transition: all 0.3s ease;
    white-space: nowrap;
}

.sidebar.collapsed .menu-text {
    opacity: 0;
    visibility: hidden;
    width: 0;
}

.sidebar.collapsed .nav-link {
    padding:  0.5rem 0 0.5rem 0.8rem !important;
}
/* END NAV */