/* ================================
   RESPONSIVE - PAGE D'ACCUEIL OPTIMISÉ
   ================================ */

/* ================================
   HERO SECTION - HAUTEUR RÉDUITE
   ================================ */
@media (max-width: 1200px) {
    .hero {
        min-height: 85vh !important;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 75vh !important;
        padding: 2rem 0 !important;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 70vh !important;
        padding: 1.5rem 0 !important;
    }
}

/* ================================
   TABLETTES (768px - 1024px)
   ================================ */
@media (max-width: 1024px) {
    /* Hero Section */
    .hero-content {
        grid-template-columns: 1fr 1fr !important;
        gap: 2.5rem !important;
        align-items: center !important;
    }
    
    .hero h1 {
        font-size: 2.8rem !important;
        line-height: 1.2 !important;
    }
    
    .hero-subtitle {
        font-size: 1.1rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .hero-stats {
        gap: 1.2rem !important;
        margin: 1.5rem 0 !important;
    }
    
    .stat-item {
        padding: 0.8rem 0.6rem !important;
        min-width: 110px !important;
    }
    
    .stat-number {
        font-size: 1.6rem !important;
    }
    
    .stat-label {
        font-size: 0.8rem !important;
    }
    
    .hero-buttons {
        gap: 0.8rem !important;
        margin-top: 1.5rem !important;
    }
    
    .cta-button {
        padding: 0.8rem 1.5rem !important;
        font-size: 1rem !important;
    }
    
    .network-animation {
        height: 450px !important;
    }
    
    /* Features Section */
    .features {
        padding: 4rem 0 !important;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
    
    .feature-card {
        padding: 1.8rem !important;
    }
    
    .feature-icon {
        width: 55px !important;
        height: 55px !important;
        font-size: 1.4rem !important;
    }
    
    .feature-card h3 {
        font-size: 1.2rem !important;
    }
    
    /* How it works */
    .how-it-works {
        padding: 4rem 0 !important;
    }
    
    .steps {
        gap: 1.2rem !important;
    }
    
    .step {
        min-width: 250px !important;
        padding: 1.5rem !important;
    }
    
    .step-number {
        width: 45px !important;
        height: 45px !important;
        font-size: 1.2rem !important;
    }
    
    /* Benefits Section */
    .benefits {
        padding: 4rem 0 !important;
    }
    
    .benefits-content {
        gap: 2rem !important;
    }
    
    .benefits-text h2 {
        font-size: 1.8rem !important;
    }
    
    .benefit-item {
        margin-bottom: 1rem !important;
    }
    
    /* Comparison Section - Style Amélioré */
    .comparison {
        padding: 4rem 0 !important;
    }
    
    .comparison-table {
        border-radius: 12px !important;
        overflow: hidden !important;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12) !important;
    }
    
    .comparison-cell {
        padding: 1rem 0.8rem !important;
        font-size: 0.9rem !important;
    }
    
    .comparison-feature {
        padding: 1rem 0.8rem !important;
        font-size: 0.9rem !important;
        font-weight: 600 !important;
    }
    
    /* Management Modes */
    .management-modes {
        padding: 4rem 0 !important;
    }
    
    .modes-container {
        gap: 1.5rem !important;
    }
    
    .mode-card {
        padding: 2rem !important;
    }
    
    .multi-router-feature {
        margin-top: 3rem !important;
        padding: 2rem !important;
        gap: 2rem !important;
    }
}

/* ================================
   MOBILES ET TABLETTES (≤768px)
   ================================ */
@media (max-width: 768px) {
    /* Hero Section - Mobile Optimisé */
    .hero-content {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
        text-align: center !important;
        padding: 0 1rem !important;
    }
    
    .hero h1 {
        font-size: 2.2rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        margin-bottom: 1.2rem !important;
        max-width: 90% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    .hero-stats {
        justify-content: space-between !important;
        gap: 0.5rem !important;
        margin: 1.2rem 0 !important;
        flex-wrap: nowrap !important;
    }
    
    .stat-item {
        flex: 1 !important;
        min-width: 80px !important;
        max-width: 100px !important;
        padding: 0.8rem 0.3rem !important;
    }
    
    .stat-number {
        font-size: 1.4rem !important;
    }
    
    .stat-label {
        font-size: 0.7rem !important;
        line-height: 1.2 !important;
    }
    
    .hero-buttons {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.8rem !important;
        margin-top: 1.2rem !important;
    }
    
    .cta-button {
        width: 100% !important;
        max-width: 260px !important;
        justify-content: center !important;
        padding: 0.9rem 1.2rem !important;
        font-size: 0.95rem !important;
    }
    
    .network-animation {
        height: 280px !important;
        order: -1 !important;
        margin-bottom: 1rem !important;
    }
    
    .shop-scene {
        position: relative !important;
        bottom: auto !important;
        right: auto !important;
        margin: 1.5rem auto 0 !important;
        display: flex !important;
        justify-content: center !important;
        transform: scale(0.8) !important;
    }
    
    /* Features Section - Cards Empilées */
    .features {
        padding: 3rem 0 !important;
    }
    
    .features .section-header h2 {
        font-size: 1.8rem !important;
    }
    
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 1.2rem !important;
        margin-top: 2rem !important;
    }
    
    .feature-card {
        padding: 1.5rem !important;
        margin: 0 0.5rem !important;
        transition: transform 0.2s ease !important;
    }
    
    .feature-card:hover {
        transform: translateY(-3px) !important;
    }
    
    .feature-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.2rem !important;
        margin-bottom: 1rem !important;
    }
    
    .feature-card h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .feature-card p {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }
    
    /* How it works - Steps Verticaux */
    .how-it-works {
        padding: 3rem 0 !important;
    }
    
    .how-it-works .section-header h2 {
        font-size: 1.8rem !important;
    }
    
    .steps {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1.5rem !important;
        margin-top: 2rem !important;
    }
    
    .step {
        width: 100% !important;
        max-width: 320px !important;
        padding: 1.5rem !important;
        text-align: center !important;
        position: relative !important;
        background: white !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
    }
    
    .step:not(:last-child):after {
        display: none !important;
    }
    
    .step-number {
        width: 45px !important;
        height: 45px !important;
        font-size: 1.2rem !important;
        margin: 0 auto 1rem !important;
    }
    
    .step h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .step p {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }
    
    /* Benefits Section - Layout Mobile */
    .benefits {
        padding: 3rem 0 !important;
    }
    
    .benefits-content {
        flex-direction: column !important;
        gap: 2rem !important;
    }
    
    .benefits-image {
        order: -1 !important;
        min-width: 100% !important;
        text-align: center !important;
    }
    
    .benefits-image img {
        max-width: 90% !important;
        height: auto !important;
    }
    
    .benefits-text {
        min-width: 100% !important;
        text-align: center !important;
    }
    
    .benefits-text h2 {
        font-size: 1.8rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .benefit-item {
        margin-bottom: 1.5rem !important;
        text-align: left !important;
        padding: 1rem !important;
        background: rgba(255, 255, 255, 0.8) !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
    }
    
    .benefit-item h3 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .benefit-item p {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }
    
    /* Comparison Section - Table Mobile Optimisée */
    .comparison {
        padding: 3rem 0 !important;
    }
    
    .comparison .section-header h2 {
        font-size: 1.8rem !important;
    }
    
    .comparison-table {
        margin-top: 2rem !important;
        border-radius: 8px !important;
        overflow: hidden !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
        background: white !important;
    }
    
    /* Style Carte pour Mobile */
    .comparison-header {
        display: none !important;
    }
    
    .comparison-row {
        display: block !important;
        margin-bottom: 1rem !important;
        background: white !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08) !important;
        overflow: hidden !important;
    }
    
    .comparison-feature {
        display: block !important;
        background: var(--primary-color) !important;
        color: white !important;
        padding: 1rem !important;
        font-weight: 600 !important;
        font-size: 1rem !important;
        text-align: center !important;
    }
    
    .comparison-cell {
        display: block !important;
        padding: 1rem !important;
        border-bottom: 1px solid #f0f0f0 !important;
        position: relative !important;
    }
    
    .comparison-cell:last-child {
        border-bottom: none !important;
    }
    
    .comparison-cell.without::before {
        content: "❌ Sans Mana Zone : " !important;
        font-weight: 600 !important;
        color: #dc3545 !important;
        display: block !important;
        margin-bottom: 0.5rem !important;
    }
    
    .comparison-cell.with::before {
        content: "✅ Avec Mana Zone : " !important;
        font-weight: 600 !important;
        color: #28a745 !important;
        display: block !important;
        margin-bottom: 0.5rem !important;
    }
    
    .comparison-cell i {
        display: none !important;
    }
    
    .comparison-cell p {
        margin: 0 !important;
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
        min-height: auto !important;
    }
    
    .empty-cell {
        display: none !important;
    }
    
    .recommended {
        position: static !important;
        display: inline-block !important;
        margin-top: 0.5rem !important;
        background: #ff9800 !important;
        color: white !important;
        padding: 4px 8px !important;
        border-radius: 12px !important;
        font-size: 0.7rem !important;
    }
    
    /* Management Modes - Cards Empilées */
    .management-modes {
        padding: 3rem 0 !important;
    }
    
    .management-modes .section-header h2 {
        font-size: 1.8rem !important;
    }
    
    .modes-container {
        flex-direction: column !important;
        gap: 1.5rem !important;
        margin-top: 2rem !important;
    }
    
    .mode-card {
        min-width: 100% !important;
        padding: 1.5rem !important;
        margin: 0 0.5rem !important;
    }
    
    .mode-badge {
        font-size: 0.7rem !important;
        padding: 4px 10px !important;
        top: -8px !important;
        right: 15px !important;
    }
    
    .mode-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.2rem !important;
        margin-bottom: 1rem !important;
    }
    
    .mode-card h3 {
        font-size: 1.2rem !important;
        margin-bottom: 1rem !important;
    }
    
    .mode-card p {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1rem !important;
    }
    
    .mode-features li {
        font-size: 0.85rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    /* Multi-router Feature */
    .multi-router-feature {
        flex-direction: column !important;
        text-align: center !important;
        gap: 1.5rem !important;
        margin-top: 2rem !important;
        padding: 1.5rem !important;
        border-radius: 12px !important;
    }
    
    .multi-router-icon {
        flex: none !important;
        width: 60px !important;
        height: 60px !important;
        margin: 0 auto !important;
    }
    
    .multi-router-icon i {
        font-size: 1.5rem !important;
    }
    
    .multi-router-content h3 {
        font-size: 1.3rem !important;
        margin-bottom: 1rem !important;
    }
    
    .multi-router-content p {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }
    
    .multi-router-benefits {
        flex-direction: column !important;
        gap: 0.8rem !important;
        margin-top: 1rem !important;
    }
    
    .multi-router-benefits li {
        flex: none !important;
        min-width: 100% !important;
        justify-content: center !important;
        font-size: 0.85rem !important;
    }
    
    /* CTA Section */
    .cta {
        padding: 3rem 0 !important;
    }
    
    .cta h2 {
        font-size: 1.8rem !important;
        margin-bottom: 1rem !important;
    }
    
    .cta p {
        font-size: 0.95rem !important;
        max-width: 90% !important;
        margin: 0 auto 1.5rem !important;
    }
    
    .cta-button-light {
        padding: 1rem 1.5rem !important;
        font-size: 0.95rem !important;
        max-width: 260px !important;
        display: inline-block !important;
    }
}

/* ================================
   TRÈS PETITS ÉCRANS (≤480px)
   ================================ */
@media (max-width: 480px) {
    /* Hero Section - Très compact */
    .hero h1 {
        font-size: 1.9rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.95rem !important;
    }
    
    .hero-stats {
        flex-direction: column !important;
        gap: 0.8rem !important;
        margin: 1rem 0 !important;
    }
    
    .stat-item {
        width: 100% !important;
        max-width: 200px !important;
        margin: 0 auto !important;
        padding: 1rem !important;
    }
    
    .stat-number {
        font-size: 1.6rem !important;
    }
    
    .stat-label {
        font-size: 0.8rem !important;
    }
    
    .cta-button {
        padding: 0.8rem 1rem !important;
        font-size: 0.9rem !important;
        max-width: 240px !important;
    }
    
    .network-animation {
        height: 250px !important;
    }
    
    /* Sections générales */
    .features,
    .how-it-works,
    .benefits,
    .comparison,
    .management-modes,
    .cta {
        padding: 2.5rem 0 !important;
    }
    
    /* Headers de sections */
    .section-header h2 {
        font-size: 1.6rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .section-header p {
        font-size: 0.9rem !important;
    }
    
    /* Feature cards */
    .feature-card {
        padding: 1.2rem !important;
        margin: 0 0.2rem !important;
    }
    
    /* Steps */
    .step {
        padding: 1.2rem !important;
        max-width: 300px !important;
    }
    
    .step-number {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.1rem !important;
    }
    
    /* Benefits */
    .benefits-text h2 {
        font-size: 1.6rem !important;
    }
    
    .benefit-item {
        padding: 0.8rem !important;
    }
    
    /* Mode cards */
    .mode-card {
        padding: 1.2rem !important;
        margin: 0 0.2rem !important;
    }
    
    .mode-card h3 {
        font-size: 1.1rem !important;
    }
    
    .multi-router-feature {
        padding: 1.2rem !important;
        margin: 0 0.2rem !important;
    }
    
    .multi-router-content h3 {
        font-size: 1.2rem !important;
    }
    
    /* CTA */
    .cta h2 {
        font-size: 1.6rem !important;
    }
    
    .cta p {
        font-size: 0.9rem !important;
    }
    
    .cta-button-light {
        padding: 0.9rem 1.2rem !important;
        font-size: 0.9rem !important;
        max-width: 240px !important;
    }
}

/* ================================
   ANIMATIONS RESPONSIVE
   ================================ */
@media (max-width: 768px) {
    /* Simplifier les animations sur mobile */
    .network-connection {
        display: none !important;
    }
    
    .particle {
        animation-duration: 4s !important;
        opacity: 0.6 !important;
    }
    
    /* Réduire les effets hover sur mobile */
    .feature-card:hover,
    .mode-card:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1) !important;
    }
    
    /* Animations plus douces */
    .router-icon {
        animation-duration: 3s !important;
    }
    
    .connected-user {
        animation-duration: 0.4s !important;
    }
    
    .shop-scene {
        animation-delay: 2s !important;
    }
}

/* ================================
   AMÉLIORATION TOUCH MOBILE
   ================================ */
@media (max-width: 768px) {
    /* Zones de touch optimisées */
    .cta-button {
        min-height: 44px !important;
        touch-action: manipulation !important;
    }
    
    .feature-card,
    .mode-card,
    .step,
    .benefit-item {
        touch-action: manipulation !important;
    }
    
    /* Améliorer le scroll */
    .comparison-table {
        scroll-behavior: smooth !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    /* Désactiver le zoom sur certains éléments */
    .hero-stats,
    .hero-buttons,
    .features-grid,
    .steps {
        touch-action: manipulation !important;
    }
}

/* ================================
   HERO SECTION - HAUTEUR TRÈS RÉDUITE
   ================================ */

/* Desktop - Hauteur réduite */
.hero {
    min-height: 80vh !important; /* Réduit de 100vh à 80vh */
}

/* Large tablets et petits laptops */
@media (max-width: 1200px) {
    .hero {
        min-height: 70vh !important; /* Réduit de 85vh à 70vh */
        padding: 1.5rem 0 !important;
    }
    
    .hero-content {
        gap: 2rem !important; /* Réduit l'espace entre les colonnes */
    }
}

/* Tablettes */
@media (max-width: 1024px) {
    .hero {
        min-height: 65vh !important;
        padding: 1.5rem 0 !important;
    }
    
    .hero h1 {
        font-size: 2.5rem !important; /* Réduction de la taille du titre */
        margin-bottom: 1rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        margin-bottom: 1.2rem !important;
    }
    
    .hero-stats {
        margin: 1.2rem 0 !important; /* Réduction des marges */
    }
    
    .network-animation {
        height: 350px !important; /* Réduction de l'animation */
    }
}

/* Mobile large */
@media (max-width: 768px) {
    .hero {
        min-height: 60vh !important; /* Réduit de 75vh à 60vh */
        padding: 1.2rem 0 !important;
    }
    
    .hero h1 {
        font-size: 2rem !important; /* Titre encore plus petit */
        margin-bottom: 0.8rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.95rem !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-stats {
        margin: 1rem 0 !important;
        gap: 0.5rem !important;
    }
    
    .stat-item {
        padding: 0.6rem 0.3rem !important; /* Réduction du padding */
    }
    
    .stat-number {
        font-size: 1.3rem !important;
    }
    
    .stat-label {
        font-size: 0.7rem !important;
    }
    
    .hero-buttons {
        margin-top: 1rem !important; /* Réduction de la marge */
    }
    
    .cta-button {
        padding: 0.8rem 1rem !important; /* Boutons plus compacts */
        font-size: 0.9rem !important;
    }
    
    .network-animation {
        height: 250px !important; /* Animation plus petite */
        margin-bottom: 0.5rem !important;
    }
}

/* Mobile standard */
@media (max-width: 480px) {
    .hero {
        min-height: 55vh !important; /* Réduit de 70vh à 55vh */
        padding: 1rem 0 !important;
        margin-top: 50px !important; /* Ajustement pour éviter le header */
    }
    
    .hero h1 {
        font-size: 1.8rem !important;
        margin-bottom: 0.6rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.9rem !important;
        margin-bottom: 0.8rem !important;
        line-height: 1.4 !important;
    }
    
    .hero-stats {
        margin: 0.8rem 0 !important;
    }
    
    .hero-buttons {
        margin-top: 0.8rem !important;
    }
    
    .network-animation {
        height: 200px !important;
    }
    
    .shop-scene {
        transform: scale(0.7) !important; /* Scène plus petite */
    }
}

/* Très petits écrans */
@media (max-width: 360px) {
    .hero {
        min-height: 50vh !important; /* Hauteur minimale pour très petits écrans */
        padding: 0.8rem 0 !important;
    }
    
    .hero h1 {
        font-size: 1.6rem !important;
    }
    
    .hero-subtitle {
        font-size: 0.85rem !important;
    }
    
    .network-animation {
        height: 180px !important;
    }
}

/* ================================
   OPTIMISATIONS COMPLÉMENTAIRES
   ================================ */

/* Réduction de l'espace vertical des particules */
@media (max-width: 768px) {
    .tech-particles {
        height: 60% !important; /* Moins de particules visibles */
    }
    
    .particle {
        animation-duration: 3s !important; /* Animation plus rapide */
    }
}

/* Compactage du contenu hero */
@media (max-width: 1024px) {
    .hero::before {
        opacity: 0.6 !important; /* Réduction de l'intensité du background */
    }
    
    .hero-content {
        align-items: flex-start !important; /* Alignement en haut */
        padding-top: 2rem !important;
    }
}

@media (max-width: 768px) {
    .hero-content {
        padding-top: 1rem !important;
        gap: 1rem !important;
    }
    
    .hero-text {
        animation-duration: 0.8s !important; /* Animation plus rapide */
    }
}

/* Ajustement de la section suivante pour éviter les espaces */
@media (max-width: 768px) {
    .features {
        margin-top: -1rem !important; /* Rapproche la section suivante */
    }
}

/* Version alternative pour héros très compact (optionnel) */
@media (max-width: 768px) {
    .hero.compact {
        min-height: 45vh !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .hero.compact .network-animation {
        display: none !important; /* Cache l'animation pour plus de compacité */
    }
    
    .hero.compact .hero-content {
        grid-template-columns: 1fr !important;
        text-align: center !important;
        gap: 0.5rem !important;
    }
}