/**
 * Menu Mobile Amélioré - KFLIX
 */

/* Bouton toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background: #fff;
    border-radius: 10px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Menu mobile */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: #141414;
    z-index: 1000;
    transition: left 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow-y: auto;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5);
}

.mobile-menu.open {
    left: 0;
}

/* Header du menu */
.mobile-menu-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-logo {
    font-size: 24px;
    font-weight: 700;
    color: #e50914;
}

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

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

.mobile-menu-nav li {
    margin: 0;
}

.mobile-menu-nav a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.mobile-menu-nav a:hover,
.mobile-menu-nav a.active {
    background: rgba(229, 9, 20, 0.1);
    border-left-color: #e50914;
}

.mobile-menu-nav a i {
    margin-right: 15px;
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* Sous-menu */
.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
}

.mobile-submenu.open {
    max-height: 500px;
}

.mobile-submenu a {
    padding-left: 55px;
    font-size: 14px;
}

/* Toggle sous-menu */
.mobile-menu-toggle-submenu {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    transition: transform 0.3s ease;
}

.mobile-menu-toggle-submenu.open {
    transform: translateY(-50%) rotate(180deg);
}

/* Footer du menu */
.mobile-menu-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.mobile-menu-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.mobile-menu-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e50914;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
}

.mobile-menu-user-info {
    flex: 1;
}

.mobile-menu-user-name {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.mobile-menu-user-email {
    color: #999;
    font-size: 12px;
}

/* Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(2px);
}

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

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Cacher le menu desktop */
    .desktop-menu {
        display: none !important;
    }
}

/* Animations */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.mobile-menu.open {
    animation: slideInLeft 0.3s ease;
}

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

.mobile-menu::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.mobile-menu::-webkit-scrollbar-thumb {
    background: #e50914;
    border-radius: 10px;
}

.mobile-menu::-webkit-scrollbar-thumb:hover {
    background: #c40812;
}

/* Badge de notification */
.mobile-menu-badge {
    display: inline-block;
    padding: 2px 6px;
    background: #e50914;
    color: #fff;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    margin-left: auto;
}

/* Séparateur */
.mobile-menu-separator {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 10px 20px;
}

/* Section title */
.mobile-menu-section-title {
    padding: 15px 20px 10px;
    color: #999;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}
