/* ================================
   CSS RESPONSIVE FOXAUTO - MOBILE
   ================================ */

/* === VARIABLES === */
:root {
    --mobile-padding: 1rem;
    --tablet-padding: 2rem;
    --mobile-gap: 1rem;
}

/* === MENU MOBILE === */
@media (max-width: 992px) {
    /* Navigation responsive */
    .nav {
        padding: 1rem 2rem !important;
        position: relative !important;
    }
    
    /* Masquer le menu desktop */
    .nav-menu {
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        left: auto !important;
        bottom: 0 !important;
        width: 280px !important;
        max-width: 85vw !important;
        height: 100vh !important;
        background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98)) !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
        flex-direction: column !important;
        padding: 6rem 2rem 2rem !important;
        margin: 0 !important;
        gap: 0.5rem !important;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5) !important;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 9999 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        display: flex !important;
        list-style: none !important;
    }
    
    .nav-menu.active {
        right: 0 !important;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.8) !important;
    }
    
    .nav-menu li {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .nav-link {
        display: block;
        padding: 1rem 1.5rem;
        border-radius: 8px;
        transition: all 0.3s ease;
    }
    
    .nav-link:hover {
        background: rgba(251, 146, 60, 0.1);
        transform: translateX(5px);
    }
    
    .mobile-menu-toggle {
        display: flex !important;
        z-index: 1000;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    /* Overlay pour fermer le menu */
    .mobile-menu-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        background: rgba(0, 0, 0, 0.7) !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transition: opacity 0.3s ease !important;
        z-index: 9998 !important;
        display: block !important;
    }
    
    .mobile-menu-overlay.active {
        opacity: 1 !important;
        pointer-events: all !important;
    }
    
    /* S'assurer que le body ne déborde pas */
    body.menu-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
    }
}

/* === TABLETTES (768px - 992px) === */
@media (max-width: 992px) {
    .container {
        padding: 0 2rem;
    }
    
    .hero-title {
        font-size: 3rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === MOBILE (max 768px) === */
@media (max-width: 768px) {
    /* Container & Padding */
    .container {
        padding: 0 var(--mobile-padding);
    }
    
    section {
        padding: 3rem 0 !important;
    }
    
    /* Header Hero */
    .hero {
        padding: 4rem 0 !important;
        min-height: auto;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    
    .hero-title br {
        display: none;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem 2rem;
    }
    
    /* Section Headers */
    .section-header {
        text-align: center;
        margin-bottom: 2rem !important;
    }
    
    .section-title {
        font-size: 1.75rem !important;
    }
    
    .section-subtitle {
        font-size: 0.9375rem !important;
    }
    
    /* Services Grid */
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem !important;
    }
    
    /* Process Steps */
    .process-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }
    
    .process-card {
        padding: 1.5rem !important;
    }
    
    /* About Section */
    .about-content {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }
    
    .about-image {
        max-width: 100%;
        height: 300px;
        object-fit: cover;
    }
    
    .about-stats {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1.5rem !important;
    }
    
    /* Formulaires */
    .form-grid {
        grid-template-columns: 1fr !important;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    input,
    select,
    textarea {
        font-size: 16px !important; /* Évite le zoom sur iOS */
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr !important;
        text-align: center;
        gap: 2rem;
    }
    
    .footer-section {
        align-items: center;
    }
    
    .footer-section ul {
        align-items: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    /* Cards & Grids */
    .card {
        padding: 1.5rem !important;
    }
    
    /* Images */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Typography */
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    p {
        font-size: 0.9375rem !important;
    }
}

/* === TRÈS PETIT MOBILE (max 480px) === */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .nav {
        padding: 1rem !important;
    }
    
    .logo-image {
        width: 45px !important;
        height: 45px !important;
    }
    
    .logo-text {
        font-size: 1.25rem !important;
    }
    
    .hero-title {
        font-size: 1.75rem !important;
    }
    
    .section-title {
        font-size: 1.5rem !important;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }
    
    .nav-menu {
        width: 100%;
    }
}

/* === LANDSCAPE MOBILE === */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 2rem 0 !important;
    }
    
    .nav-menu {
        padding: 4rem 2rem 2rem;
    }
}

/* === AMÉLIORATIONS TACTILES === */
@media (hover: none) {
    /* Meilleure expérience tactile */
    .btn,
    .nav-link,
    .service-card,
    .process-card {
        -webkit-tap-highlight-color: rgba(251, 146, 60, 0.2);
    }
    
    /* Désactiver les effets hover sur mobile */
    .btn:hover,
    .service-card:hover,
    .process-card:hover {
        transform: none;
    }
    
    /* Augmenter la zone tactile */
    .btn,
    .nav-link {
        min-height: 44px;
        min-width: 44px;
    }
}

/* === ACCESSIBILITÉ === */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === DARK MODE === */
@media (prefers-color-scheme: dark) {
    /* Déjà sombre par défaut */
}

/* === IMPRESSION === */
@media print {
    .nav,
    .mobile-menu-toggle,
    .hero-cta,
    .footer {
        display: none !important;
    }
    
    section {
        page-break-inside: avoid;
    }
}
