/* Sticky Footer Menu - Mobile Navigation */

/* Masquer le sidebar sur mobile (hors de l'écran à gauche) */
aside.sidebar-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 300px;
    height: 100vh;
    background: #1a1a1a;
    z-index: 9999;
    transition: left 0.3s ease;
    overflow-y: auto;
    display: block;
    visibility: visible;
}

/* Afficher le sidebar quand il a la classe active */
aside.sidebar-menu.active {
    left: 0;
}

div.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    display: none;
}

/* Afficher l'overlay quand il a la classe active */
div.sidebar-overlay.active {
    display: block;
}

/* Styles pour le header du sidebar sur mobile */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--primary-color);
    border-bottom: 2px solid #ff8533;
}

.sidebar-title {
    color: white;
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
}

.sidebar-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Styles pour la navigation du sidebar sur mobile */
.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-nav a {
    display: block;
    padding: 1rem 1.5rem;
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sidebar-nav a:hover {
    background: rgba(255, 87, 0, 0.2);
    padding-left: 2rem;
    color: #ffed4e;
}

.sticky-footer-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-color), #ff8533);
    display: flex;
    justify-content: center; /* Centrer les icônes */
    align-items: center;
    padding: 0.3rem 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    border-top: 2px solid #ff6600;
    gap: 0.5rem; /* Espacement fixe entre les icônes */
}

.sticky-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--white);
    font-size: 0.6rem;
    transition: all 0.3s ease;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    flex: 0 0 auto; /* Ne pas étirer */
    max-width: 80px;
}

.sticky-menu-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.sticky-menu-icon {
    font-size: 1rem;
    margin-bottom: 0.1rem;
}

.sticky-menu-text {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.55rem;
}

/* Ajuster le padding du body pour éviter que le contenu soit caché */
body {
    padding-bottom: 42px;
}

/* Version Desktop - Afficher la barre aussi sur ordinateur */
@media (min-width: 768px) {
    .sticky-footer-menu {
        padding: 0.5rem 0;
        gap: 1rem; /* Espacement légèrement plus grand sur desktop */
    }

    .sticky-menu-item {
        font-size: 0.7rem;
        padding: 0.3rem 0.8rem;
        max-width: 120px;
    }

    .sticky-menu-icon {
        font-size: 1.4rem;
        margin-bottom: 0.2rem;
    }

    .sticky-menu-text {
        font-size: 0.65rem;
    }

    body {
        padding-bottom: 54px;
    }
}

/* Menu latéral fonctionnel sur desktop */
@media (min-width: 768px) {
    aside.sidebar-menu {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 300px !important;
        height: 100vh !important;
        background: #1a1a1a !important;
        z-index: 9999 !important;
        transition: left 0.3s ease !important;
        overflow-y: auto !important;
        display: block !important;
        visibility: visible !important;
    }
    
    aside.sidebar-menu.active {
        left: 0 !important;
        transform: none !important;
    }
    
    div.sidebar-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: rgba(0, 0, 0, 0.7) !important;
        z-index: 9998 !important;
        display: none !important;
    }
    
    div.sidebar-overlay.active {
        display: block !important;
    }

    /* Styles pour le header du sidebar */
    .sidebar-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 1.5rem !important;
        background: var(--primary-color) !important;
        border-bottom: 2px solid #ff8533 !important;
    }

    .sidebar-title {
        color: white !important;
        font-size: 1.5rem !important;
        margin: 0 !important;
        font-weight: 700 !important;
    }

    .sidebar-close {
        background: none !important;
        border: none !important;
        color: white !important;
        font-size: 2rem !important;
        cursor: pointer !important;
        width: 40px !important;
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important;
        transition: background 0.3s ease !important;
    }

    .sidebar-close:hover {
        background: rgba(255, 255, 255, 0.2) !important;
    }

    /* Styles pour la navigation du sidebar */
    .sidebar-nav {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .sidebar-nav li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    .sidebar-nav a {
        display: block !important;
        padding: 1rem 1.5rem !important;
        color: white !important;
        text-decoration: none !important;
        font-size: 1rem !important;
        font-weight: 500 !important;
        transition: all 0.3s ease !important;
    }

    .sidebar-nav a:hover {
        background: rgba(255, 87, 0, 0.2) !important;
        padding-left: 2rem !important;
        color: #ffed4e !important;
    }
}