/* ===== MENU HAMBURGER MODERNE ===== */

/* Navbar avec hamburger */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 20px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e6343;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo i {
    font-size: 1.8rem;
}

/* Cacher les nav-links classiques et l'ancien burger */
.nav-links,
.burger {
    display: none !important;
}

/* Bouton Hamburger */
.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.hamburger-btn:hover {
    transform: scale(1.1);
}

.hamburger-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background: #1e6343;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Animation hamburger vers X */
.hamburger-btn.active span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.hamburger-btn.active span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* Overlay (fond sombre) */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    backdrop-filter: blur(2px);
}

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

/* Menu latéral (Sidebar) */
.sidebar-menu {
    position: fixed;
    top: 0;
    right: -350px;
    width: 350px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-menu.active {
    right: 0;
}

/* Header du menu */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 25px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(135deg, #1a5f3f 0%, #2ecc71 100%);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
}

.sidebar-logo i {
    font-size: 1.8rem;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Navigation du menu */
.sidebar-nav {
    padding: 20px 0;
}

.menu-section {
    margin-bottom: 30px;
}

.menu-section-title {
    padding: 15px 25px;
    color: #7f8c8d;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin: 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 25px;
    color: #2c3e50;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.sidebar-nav a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(135deg, #1a5f3f 0%, #2ecc71 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.sidebar-nav a:hover {
    background: #f8f9fa;
    color: #1e6343;
    padding-left: 35px;
}

.sidebar-nav a:hover::before {
    transform: scaleY(1);
}

.sidebar-nav a i {
    font-size: 1.3rem;
    width: 25px;
    text-align: center;
    color: #1e6343;
}

.sidebar-nav a.active {
    background: linear-gradient(90deg, rgba(30, 99, 67, 0.1) 0%, transparent 100%);
    color: #1e6343;
    font-weight: 600;
}

/* Badge du panier dans le menu */
.menu-cart-badge {
    margin-left: auto;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    min-width: 25px;
    text-align: center;
}

/* Footer du menu */
.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px;
    border-top: 2px solid #f0f0f0;
    background: #f8f9fa;
}

.sidebar-footer p {
    margin: 0;
    font-size: 0.85rem;
    color: #7f8c8d;
    text-align: center;
}

.sidebar-footer .social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.sidebar-footer .social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    color: #1e6343;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sidebar-footer .social-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(30, 99, 67, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar-menu {
        width: 100%;
        right: -100%;
    }
}

/* Scroll lock quand menu ouvert */
body.menu-open {
    overflow: hidden;
}

/* Animation d'entrée des items du menu */
.sidebar-menu.active .sidebar-nav a {
    animation: slideInRight 0.3s ease forwards;
    opacity: 0;
}

.sidebar-menu.active .sidebar-nav li:nth-child(1) a { animation-delay: 0.1s; }
.sidebar-menu.active .sidebar-nav li:nth-child(2) a { animation-delay: 0.15s; }
.sidebar-menu.active .sidebar-nav li:nth-child(3) a { animation-delay: 0.2s; }
.sidebar-menu.active .sidebar-nav li:nth-child(4) a { animation-delay: 0.25s; }
.sidebar-menu.active .sidebar-nav li:nth-child(5) a { animation-delay: 0.3s; }
.sidebar-menu.active .sidebar-nav li:nth-child(6) a { animation-delay: 0.35s; }

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
