/* --- Overlay & Structure du Drawer --- */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    z-index: 2000;
    backdrop-filter: blur(2px);
}
.drawer-overlay.active { display: block; }

.custom-drawer {
    position: fixed;
    top: 0;
    left: -310px;
    width: 290px;
    height: 100%;
    background: var(--pure-white);
    z-index: 2001;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 10px 0 20px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}
.custom-drawer.active { left: 0; }

.drawer-header {
    background-color: var(--text-primary);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.drawer-body {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.drawer-link {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: var(--text-secondary);
    text-decoration: none !important;
    font-weight: 500;
    transition: all 0.2s;
    border-radius: 0 25px 25px 0;
    margin-right: 15px;
    margin-bottom: 2px;
}
.drawer-link i { width: 30px; font-size: 1.1rem; color: var(--text-secondary); }
.drawer-link:hover { background-color: var(--bg-fallback); color: var(--action-color); }
.drawer-link:hover i { color: var(--action-color); }

/* --- BARRE DE NAVIGATION MOBILE (Style Facebook) --- */
/* Container de l'icône pour le panier */
.mobile-nav-item.position-relative {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Style du badge rouge */
.mobile-nav-bar .badge {
    position: absolute;
    top: 2px;
    right: 15%; /* Ajustez selon le centrage */
    transform: translate(50%, -50%);
    font-size: 0.65rem;
    padding: 3px 6px;
    border: 2px solid var(--pure-white); /* Ajoute un contour blanc pour le détacher du fond */
}

.mobile-nav-item {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Centre verticalement icône + texte */
    transition: background 0.2s;
}

/* Feedback visuel au toucher */
.mobile-nav-item:active {
    background-color: rgba(0,0,0,0.05);
}
.mobile-nav-bar {
    height: 65px; /* Hauteur standard confortable */
    padding: 0 !important; /* On retire le padding pour que le lien prenne toute la place */
    display: none; /* Caché sur desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--pure-white);
    border-top: 1px solid var(--border-color);
    z-index: 1050;
    padding: 6px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    justify-content: space-around;
}

.mobile-nav-item {
    flex: 1;
    text-align: center;
    color: var(--text-muted);
    text-decoration: none !important;
    font-size: 0.65rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mobile-nav-item i {
    font-size: 1.2rem;
    margin-bottom: 4px;
    width: 24px; /* Force une largeur égale pour toutes les icônes */
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-item:active, .mobile-nav-item.active {
    color: var(--ios-blue);
}

/* Ajustements Responsive */
@media (max-width: 991.98px) {
    .mobile-nav-bar { display: flex; }
    /*body { padding-bottom: 70px !important; } /* Marge pour ne pas cacher le contenu */
}

/* Supprime les marges par défaut du navigateur */
html, body {
    margin: 0;
    padding: 0;
}

/* Force la navbar à être collée en haut */
.navbar {
    margin-top: 0 !important;
    top: 0;
}

/* Supprime l'espace sous le footer */
footer {
    margin-bottom: 0 !important;
    /*padding-bottom: 20px; /* Ajustez selon vos besoins */
}

/* S'assure que la barre mobile est parfaitement en bas sans décalage */
.mobile-nav-bar {
    bottom: 0 !important;
    margin-bottom: 0 !important;
}