/* Menu Mobile - Visible uniquement < 1024px */
@media (max-width: 1023px) {
    .nav-mobile {
        display: block;
    }
    
    /* Bouton hamburger */
    .hamburger-btn {
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        width: 35px;
        height: 30px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1002;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    .hamburger-btn span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: #fff;
        transition: all 0.3s ease;
        border-radius: 2px;
    }
    
    .hamburger-btn:hover span {
        background-color: rgba(255, 255, 255, 0.8);
    }
    
    /* Overlay de fond */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1003;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .mobile-menu-overlay.active {
        display: block;
        opacity: 1;
    }
    
    /* Menu mobile */
    .mobile-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100%;
        background-color: #fff;
        z-index: 1004;
        transition: right 0.3s ease;
        box-shadow: -4px 0 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
    }
    
    .mobile-menu.active {
        right: 0;
    }
    
    /* Header du menu mobile */
    .mobile-menu-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1.5rem;
        background-color: #0056b3;
        color: #fff;
    }
    
    .mobile-menu-title {
        margin: 0;
        font-size: 1.2rem;
        font-weight: bold;
    }
    
    .close-btn {
        background: none;
        border: none;
        color: #fff;
        font-size: 2rem;
        cursor: pointer;
        padding: 0;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: opacity 0.3s ease;
    }
    
    .close-btn:hover {
        opacity: 0.8;
    }
    
    /* Liste du menu mobile */
    .mobile-menu-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .mobile-menu-list > li {
        border-bottom: 1px solid #eee;
    }
    
    .mobile-menu-list > li > a {
        display: block;
        padding: 1rem 1.5rem;
        color: #333;
        text-decoration: none;
        font-weight: 500;
        transition: background-color 0.3s ease;
    }
    
    .mobile-menu-list > li > a:hover {
        background-color: #f8f9fa;
    }
    
    /* Section compte pour non-connectés */
    .mobile-account-section {
        background-color: #f8f9fa;
    }
    
    .mobile-account-title {
        display: block;
        padding: 1rem 1.5rem;
        color: #333;
        font-weight: 600;
        border-bottom: 1px solid #dee2e6;
    }
    
    .mobile-account-submenu {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .mobile-account-submenu li {
        border-bottom: 1px solid #dee2e6;
    }
    
    .mobile-account-submenu li:last-child {
        border-bottom: none;
    }
    
    .mobile-account-submenu li a {
        display: block;
        padding: 0.8rem 2rem;
        color: #0056b3;
        text-decoration: none;
        font-weight: 500;
        transition: background-color 0.3s ease;
    }
    
    .mobile-account-submenu li a:hover {
        background-color: #e9ecef;
    }
    
    /* Ajustement du header principal */
    header .content {
        position: relative;
        padding: 1rem;
        overflow: hidden;
    }
    
    header .logo h1 {
        font-size: 1.5rem;
    }
}

/* Cache le menu mobile sur desktop */
@media (min-width: 1024px) {
    .nav-mobile {
        display: none;
    }
}

/* Ajustements pour très petits écrans */
@media (max-width: 480px) {
    .hamburger-btn {
        right: 0.5rem;
    }
    
    header .content {
        padding: 0.75rem;
    }
    
    header .logo h1 {
        font-size: 1.2rem;
    }
    
    .mobile-menu {
        width: 85%;
        max-width: 280px;
    }
}

/* Animation pour l'ouverture du menu */
@keyframes slideIn {
    from {
        right: -100%;
    }
    to {
        right: 0;
    }
}

/* Animation pour la fermeture du menu */
@keyframes slideOut {
    from {
        right: 0;
    }
    to {
        right: -100%;
    }
}
