/**
 * XTRANUMERIK MOBILE-ENHANCED CSS
 * Composants mobiles avancés et interactions tactiles premium
 * Date: 2 septembre 2025
 * 
 * ✅ Navigation slide-out premium
 * ✅ Carrousels tactiles optimisés  
 * ✅ Overlays et modales mobiles
 * ✅ Feedback haptique visuel
 */

/* ========================================
   NAVIGATION MOBILE PREMIUM
   ======================================== */

/* Overlay de fond pour navigation mobile */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    backdrop-filter: blur(10px);
}

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

/* Menu navigation slide-out */
.mobile-nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(320px, 85vw);
    height: 100vh;
    background: linear-gradient(145deg, #190544 0%, #2a0845 100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow-y: auto;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    border-left: 1px solid rgba(255, 169, 26, 0.2);
}

.mobile-nav-menu.active {
    right: 0;
}

/* Header du menu mobile */
.mobile-nav-header {
    padding: 2rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 169, 26, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-nav-logo {
    width: 60px;
    height: 34px;
    object-fit: contain;
}

.mobile-nav-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-nav-close:hover {
    background: rgba(255, 169, 26, 0.1);
    color: #ffa91a;
}

/* Items de navigation mobile */
.mobile-nav-items {
    padding: 1rem 0;
}

.mobile-nav-item {
    width: 100%;
    border-bottom: 1px solid rgba(255, 169, 26, 0.1);
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    min-height: 48px;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
    background: rgba(255, 169, 26, 0.1);
    color: #ffa91a;
    padding-left: 2rem;
}

/* Sous-menu accordéon mobile */
.mobile-dropdown {
    overflow: hidden;
}

.mobile-dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 169, 26, 0.05);
}

.mobile-dropdown.active .mobile-dropdown-content {
    max-height: 500px;
}

.mobile-dropdown-link {
    display: block;
    padding: 0.75rem 3rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.mobile-dropdown-link:hover,
.mobile-dropdown-link:active {
    background: rgba(255, 169, 26, 0.1);
    color: #ffa91a;
    border-left-color: #ffa91a;
    padding-left: 3.5rem;
}

.mobile-dropdown-arrow {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.mobile-dropdown.active .mobile-dropdown-arrow {
    transform: rotate(180deg);
}

/* Footer du menu mobile */
.mobile-nav-footer {
    position: sticky;
    bottom: 0;
    padding: 1.5rem;
    background: rgba(25, 5, 68, 0.95);
    border-top: 1px solid rgba(255, 169, 26, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-nav-cta {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #ffa91a 0%, #e69500 100%);
    color: #190544;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 169, 26, 0.4);
}

.mobile-lang-switch {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(255, 169, 26, 0.3);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-lang-switch:hover {
    background: rgba(255, 169, 26, 0.2);
    border-color: #ffa91a;
    color: #ffa91a;
}

/* ========================================
   CARROUSELS TACTILES AVANCÉS
   ======================================== */

.mobile-carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
}

.mobile-carousel {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    touch-action: pan-x;
}

.mobile-carousel.dragging {
    transition: none;
    cursor: grabbing;
}

.mobile-carousel-slide {
    flex: 0 0 100%;
    position: relative;
}

.mobile-carousel-slide img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
}

/* Indicateurs de carrousel tactiles */
.mobile-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0;
    margin-top: 1rem;
}

.mobile-carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 44px; /* Zone tactile élargie */
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.mobile-carousel-dot::after {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: currentColor;
    transition: all 0.3s ease;
}

.mobile-carousel-dot.active {
    color: #ffa91a;
}

.mobile-carousel-dot.active::after {
    transform: scale(1.2);
}

/* Navigation carrousel tactile */
.mobile-carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.mobile-carousel-nav.prev {
    left: 1rem;
}

.mobile-carousel-nav.next {
    right: 1rem;
}

.mobile-carousel-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(25, 5, 68, 0.8);
    border: 1px solid rgba(255, 169, 26, 0.3);
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.mobile-carousel-btn:hover {
    background: rgba(255, 169, 26, 0.8);
    color: #190544;
    transform: scale(1.1);
}

.mobile-carousel-btn:active {
    transform: scale(0.95);
}

/* Progress bar pour carrousel */
.mobile-carousel-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 169, 26, 0.3);
    width: 100%;
}

.mobile-carousel-progress-bar {
    height: 100%;
    background: #ffa91a;
    width: 0%;
    transition: width 0.3s ease;
}

/* ========================================
   MODALES ET OVERLAYS MOBILES
   ======================================== */

.mobile-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1001;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-modal.active {
    opacity: 1;
    visibility: visible;
}

.mobile-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.mobile-modal-content {
    position: relative;
    width: 100%;
    max-height: 90vh;
    background: linear-gradient(145deg, #190544 0%, #2a0845 100%);
    border-radius: 20px 20px 0 0;
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.mobile-modal.active .mobile-modal-content {
    transform: translateY(0);
}

.mobile-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 169, 26, 0.2);
}

.mobile-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.mobile-modal-close {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-modal-close:hover {
    background: rgba(255, 169, 26, 0.2);
    color: #ffa91a;
}

/* ========================================
   FEEDBACK TACTILE VISUEL
   ======================================== */

.mobile-touch-feedback {
    position: relative;
    overflow: hidden;
}

.mobile-touch-feedback::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 169, 26, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.mobile-touch-feedback:active::after {
    width: 200px;
    height: 200px;
    opacity: 1;
}

/* Ripple effect pour boutons */
.mobile-ripple {
    position: relative;
    overflow: hidden;
    transform: translate3d(0, 0, 0);
}

.mobile-ripple::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 169, 26, 0.3) 0%, transparent 70%);
    transform: scale(0);
    transition: transform 0.3s ease;
    border-radius: inherit;
}

.mobile-ripple:active::before {
    transform: scale(1);
}

/* ========================================
   LOADING ET ÉTATS MOBILES
   ======================================== */

.mobile-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
}

.mobile-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 169, 26, 0.3);
    border-top: 2px solid #ffa91a;
    border-radius: 50%;
    animation: mobileSpinnerRotate 1s linear infinite;
}

@keyframes mobileSpinnerRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.mobile-loading-dots {
    display: flex;
    gap: 0.25rem;
}

.mobile-loading-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffa91a;
    animation: mobileDotsAnimation 1.4s ease-in-out infinite both;
}

.mobile-loading-dot:nth-child(1) { animation-delay: -0.32s; }
.mobile-loading-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes mobileDotsAnimation {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ========================================
   TOAST ET NOTIFICATIONS MOBILES
   ======================================== */

.mobile-toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ffa91a 0%, #e69500 100%);
    color: #190544;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1002;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-toast.active {
    transform: translateY(0);
    opacity: 1;
}

.mobile-toast-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    padding: 4px;
    margin-left: 1rem;
    cursor: pointer;
}

/* ========================================
   OPTIMISATIONS PERFORMANCE MOBILE
   ======================================== */

/* Force GPU acceleration pour éléments critiques */
.mobile-gpu-layer {
    will-change: transform;
    transform: translateZ(0);
}

/* Optimisation scroll mobile */
.mobile-scroll-container {
    -webkit-overflow-scrolling: touch;
    overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* Optimisation images mobiles */
.mobile-image {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    loading: lazy;
    decoding: async;
}

/* Container avec optimisations containment */
.mobile-contain {
    contain: layout style paint;
}

/* ========================================
   RESPONSIVE MOBILE ENHANCED
   ======================================== */

/* Large Mobile (480px+) */
@media (min-width: 480px) {
    .mobile-nav-menu {
        width: 360px;
    }
    
    .mobile-carousel-btn {
        width: 52px;
        height: 52px;
        font-size: 20px;
    }
}

/* Paysage Mobile */
@media (orientation: landscape) and (max-height: 600px) {
    .mobile-nav-menu {
        width: min(400px, 50vw);
    }
    
    .mobile-modal-content {
        max-height: 95vh;
        border-radius: 16px;
    }
    
    .mobile-nav-header {
        padding: 1rem 1.5rem;
    }
    
    .mobile-nav-footer {
        padding: 1rem 1.5rem;
    }
}

/* Très petits écrans (320px-) */
@media (max-width: 320px) {
    .mobile-nav-menu {
        width: 100vw;
    }
    
    .mobile-carousel-nav {
        display: none;
    }
    
    .mobile-carousel-dots {
        gap: 0.25rem;
    }
}