/* Overlay */
.offcanvas-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.offcanvas-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Menu Off-Canvas Container */
.offcanvas-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 380px;
    max-width: 90%;
    height: 100%;
    background: white;
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.offcanvas-menu.active {
    transform: translateX(0);
}

/* Wrapper pour les niveaux */
.offcanvas-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Niveaux du menu */
.offcanvas-level {
    position: absolute;
    width: 100%;
    height: 100%;
    background: white;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
}

.offcanvas-level.active {
    transform: translateX(0);
}

.offcanvas-level.left {
    transform: translateX(-100%);
}

.offcanvas-level.right {
    transform: translateX(100%);
}

/* Header du menu */
.offcanvas-header {
    background: white;
    padding: 20px;
    border-bottom: 1px solid #000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
    gap: 15px;
}

.offcanvas-title {
    font-size: 18px;
    font-weight: 600;
    color: #000;
}

/* Bouton de fermeture */
.offcanvas-close,
.icon-cross {
    background: none;
    border: none;
    color: #000;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    margin-left: auto;
    font-size: 24px;
    line-height: 1;
}

.offcanvas-close:hover,
.icon-cross:hover {
    opacity: 0.6;
}

/* Bouton retour */
.offcanvas-back {
    background: none;
    border: none;
    color: #000;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    transition: opacity 0.2s;
}

.offcanvas-back:hover {
    opacity: 0.7;
}

.back-icon {
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
}

/* Liste du menu */
.offcanvas-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.offcanvas-item {
    /* Bordures supprimées */
}

/* Liens du menu */
.offcanvas-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    color: #000;
    text-decoration: none;
    transition: background 0.2s;
    cursor: pointer;
}

.offcanvas-link:hover {
    background: #f5f5f5;
}

.offcanvas-link:active {
    background: #e5e5e5;
}

.offcanvas-link-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.offcanvas-icon {
    font-size: 22px;
    width: 28px;
    text-align: center;
}

.offcanvas-text {
    font-size: 16px;
    font-weight: 500;
    color: #000 !important;
}

.offcanvas-arrow {
    color: #000;
    font-size: 24px;
    font-weight: 300;
}

/* Style pour le lien Log out en ROUGE */

#offcanvasMenu > div > div.offcanvas-level.active > ul > li:nth-child(5) > a.offcanvas-logout > span{
    color: #942020 !important;
}

.offcanvas-logout:hover {
    background: #f5f5f5;
}

/* Scrollbar personnalisée */
.offcanvas-level::-webkit-scrollbar {
    width: 6px;
}

.offcanvas-level::-webkit-scrollbar-track {
    background: transparent;
}

.offcanvas-level::-webkit-scrollbar-thumb {
    background: #000;
    border-radius: 0;
}

.offcanvas-level::-webkit-scrollbar-thumb:hover {
    background: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .offcanvas-menu {
        width: 320px;
    }
}

@media (max-width: 480px) {
    .offcanvas-menu {
        width: 100%;
        max-width: 100%;
    }
}