/* ============================================
   OPTIMISATION MOBILE ULTRA MODERNE
   BlueDrive Academy
   ============================================ */

/* ========== HERO MOBILE ========== */
@media (max-width: 768px) {
    /* Hero App Card - Version mobile */
    .hero-app-card {
        background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
        padding: 2rem 1.25rem 3rem;
        margin-top: 0;
        position: relative;
        overflow: hidden;
        min-height: auto;
    }
    
    .hero-app-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: 
            radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
        pointer-events: none;
    }
    
    .hero-app-content {
        position: relative;
        z-index: 2;
        max-width: 100%;
    }
    
    .hero-app-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        background: rgba(255, 255, 255, 0.25);
        backdrop-filter: blur(10px);
        padding: 0.5rem 1rem;
        border-radius: 2rem;
        font-size: 0.75rem;
        font-weight: 600;
        color: white;
        margin-bottom: 1.25rem;
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
    
    .hero-app-badge i {
        font-size: 0.875rem;
    }
    
    .hero-app-title {
        font-size: 1.875rem;
        font-weight: 800;
        line-height: 1.2;
        color: white;
        margin-bottom: 1rem;
        letter-spacing: -0.5px;
    }
    
    .hero-app-highlight {
        background: linear-gradient(45deg, #fbbf24, #f59e0b);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        display: block;
        margin-top: 0.25rem;
    }
    
    .hero-app-desc {
        font-size: 0.95rem;
        line-height: 1.6;
        color: rgba(255, 255, 255, 0.9);
        margin-bottom: 1.5rem;
    }
    
    .hero-app-stats {
        display: flex;
        gap: 1.5rem;
        margin-bottom: 1.75rem;
        flex-wrap: wrap;
    }
    
    .hero-app-stat {
        text-align: center;
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(10px);
        padding: 0.75rem 1rem;
        border-radius: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.2);
        flex: 1;
        min-width: 100px;
    }
    
    .hero-app-stat-number {
        display: block;
        font-size: 1.5rem;
        font-weight: 800;
        color: #fbbf24;
        margin-bottom: 0.25rem;
    }
    
    .hero-app-stat-label {
        font-size: 0.7rem;
        color: rgba(255, 255, 255, 0.9);
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .hero-app-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
        max-width: 320px;
        padding: 1rem 1.5rem;
        background: white;
        color: #6366f1;
        font-weight: 700;
        font-size: 1rem;
        border-radius: 1rem;
        text-decoration: none;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border: none;
    }
    
    .hero-app-btn:hover,
    .hero-app-btn:active {
        transform: translateY(-2px);
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
        background: #f8fafc;
    }
    
    .hero-app-btn i {
        font-size: 1.125rem;
    }
    
    /* Illustration mobile */
    .hero-app-illu {
        display: none; /* Cachée sur mobile pour plus d'espace */
    }
}

/* ========== SECTIONS MOBILE ========== */
@media (max-width: 768px) {
    /* Section Features/Avantages */
    .features-section {
        padding: 3rem 1rem;
        background: white;
    }
    
    .section-subtitle {
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: #6366f1;
        font-weight: 700;
        margin-bottom: 0.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
        font-weight: 800;
        color: #1f2937;
        margin-bottom: 0.75rem;
        line-height: 1.2;
    }
    
    .section-description {
        font-size: 0.95rem;
        color: #6b7280;
        line-height: 1.6;
        margin-bottom: 2rem;
    }
    
    /* Feature Cards */
    .feature-card {
        background: white;
        border-radius: 1.25rem;
        padding: 1.75rem 1.25rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        border: 1px solid #f3f4f6;
        margin-bottom: 1.5rem;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
    }
    
    .feature-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
        transform: scaleY(0);
        transition: transform 0.3s ease;
    }
    
    .feature-card:hover::before,
    .feature-card:active::before {
        transform: scaleY(1);
    }
    
    .feature-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
        border-radius: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 1.25rem;
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    }
    
    .feature-icon i {
        font-size: 1.75rem;
        color: white;
    }
    
    .feature-title {
        font-size: 1.125rem;
        font-weight: 700;
        color: #1f2937;
        margin-bottom: 0.75rem;
    }
    
    .feature-description {
        font-size: 0.875rem;
        color: #6b7280;
        line-height: 1.6;
        margin-bottom: 1rem;
    }
    
    .feature-tags {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .feature-tag {
        padding: 0.375rem 0.75rem;
        border-radius: 0.5rem;
        font-size: 0.7rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .feature-tag.primary {
        background: rgba(99, 102, 241, 0.1);
        color: #6366f1;
    }
    
    .feature-tag.success {
        background: rgba(16, 185, 129, 0.1);
        color: #10b981;
    }
    
    .feature-tag.warning {
        background: rgba(251, 191, 36, 0.1);
        color: #f59e0b;
    }
}

/* ========== AUTO-ÉCOLES MOBILE ========== */
@media (max-width: 768px) {
    .autoecoles-section {
        padding: 3rem 1rem;
        background: #f8fafc;
    }
    
    /* Search Bar */
    .search-bar-container {
        margin-bottom: 2rem;
    }
    
    .search-bar {
        width: 100%;
        padding: 1rem 1.25rem;
        background: white;
        border: 2px solid #e5e7eb;
        border-radius: 1rem;
        font-size: 0.95rem;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }
    
    .search-bar:focus {
        outline: none;
        border-color: #6366f1;
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    }
    
    /* Auto-école Cards */
    .autoecoles-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 0;
    }
    
    .autoecole-item {
        background: white;
        border-radius: 1.25rem;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        border: 1px solid #f3f4f6;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
    }
    
    .autoecole-item:hover,
    .autoecole-item:active {
        transform: translateY(-4px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    }
    
    .autoecole-header {
        height: 120px;
        background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        overflow: hidden;
    }
    
    .autoecole-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: 
            radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    }
    
    .autoecole-icon {
        font-size: 3rem;
        color: white;
        z-index: 1;
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    }
    
    .autoecole-badge {
        position: absolute;
        top: 0.75rem;
        left: 0.75rem;
        padding: 0.375rem 0.75rem;
        border-radius: 0.5rem;
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        z-index: 2;
    }
    
    .autoecole-badge.certified {
        background: rgba(16, 185, 129, 0.9);
        color: white;
    }
    
    .autoecole-badge.new {
        background: rgba(251, 191, 36, 0.9);
        color: white;
    }
    
    .autoecole-body {
        padding: 1.25rem;
    }
    
    .autoecole-title {
        font-size: 1.125rem;
        font-weight: 700;
        color: #1f2937;
        margin-bottom: 0.5rem;
    }
    
    .autoecole-description {
        font-size: 0.8rem;
        color: #6b7280;
        line-height: 1.5;
        margin-bottom: 1rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .autoecole-actions {
        display: flex;
        gap: 0.75rem;
        margin-top: 1rem;
    }
    
    .autoecole-actions .btn {
        flex: 1;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        font-weight: 600;
        border-radius: 0.75rem;
        text-align: center;
        transition: all 0.3s ease;
    }
    
    .autoecole-actions .btn-primary {
        background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
        color: white;
        border: none;
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    }
    
    .autoecole-actions .btn-primary:hover,
    .autoecole-actions .btn-primary:active {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
    }
    
    .autoecole-actions .btn-outline {
        background: white;
        border: 2px solid #e5e7eb;
        color: #6b7280;
    }
    
    .autoecole-actions .btn-outline:hover,
    .autoecole-actions .btn-outline:active {
        border-color: #6366f1;
        color: #6366f1;
        background: rgba(99, 102, 241, 0.05);
    }
}

/* ========== VIDEO SECTION MOBILE ========== */
@media (max-width: 768px) {
    .video-section {
        padding: 3rem 1rem;
        background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
        position: relative;
        overflow: hidden;
    }
    
    .video-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: 
            radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
            radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    }
    
    .video-section-title {
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: rgba(255, 255, 255, 0.9);
        font-weight: 700;
        margin-bottom: 0.5rem;
        text-align: center;
    }
    
    .video-section-description {
        font-size: 1.125rem;
        color: white;
        text-align: center;
        margin-bottom: 2rem;
        line-height: 1.6;
    }
    
    .video-container {
        border-radius: 1.25rem;
        overflow: hidden;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
        background: #000;
    }
}

/* ========== ESPACEMENTS GLOBAUX MOBILE ========== */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    section {
        padding: 2.5rem 0;
    }
    
    /* Espacement entre sections */
    .features-section + .autoecoles-section,
    .autoecoles-section + .video-section,
    .video-section + .footer {
        margin-top: 0;
    }
}

/* ========== ANIMATIONS MOBILE ========== */
@media (max-width: 768px) {
    .hero-app-card,
    .feature-card,
    .autoecole-item {
        animation: fadeInUp 0.6s ease-out;
    }
    
    .hero-app-card {
        animation-delay: 0s;
    }
    
    .feature-card:nth-child(1) {
        animation-delay: 0.1s;
    }
    
    .feature-card:nth-child(2) {
        animation-delay: 0.2s;
    }
    
    .feature-card:nth-child(3) {
        animation-delay: 0.3s;
    }
    
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* ========== TOUCH OPTIMIZATIONS ========== */
@media (max-width: 768px) {
    /* Augmenter les zones de touch */
    .btn,
    .hero-app-btn,
    .autoecole-actions .btn {
        min-height: 44px; /* Taille minimale recommandée pour touch */
    }
    
    /* Feedback visuel au touch */
    .btn:active,
    .hero-app-btn:active,
    .autoecole-item:active {
        transform: scale(0.98);
    }
    
    /* Désactiver hover sur mobile */
    @media (hover: none) {
        .feature-card:hover,
        .autoecole-item:hover {
            transform: none;
        }
    }
}

/* ========== TRÈS PETITS ÉCRANS ========== */
@media (max-width: 576px) {
    .hero-app-title {
        font-size: 1.625rem;
    }
    
    .hero-app-desc {
        font-size: 0.875rem;
    }
    
    .hero-app-stat {
        min-width: 80px;
        padding: 0.625rem 0.75rem;
    }
    
    .hero-app-stat-number {
        font-size: 1.25rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .feature-card,
    .autoecole-item {
        border-radius: 1rem;
    }
}
