/* ==========================================================================
   Styles responsives pour toutes les sections
   ========================================================================== */

/* Animation desktop - visible par défaut sur tous les appareils */
.desktop-animation {
    display: block;
}

/* Animation mobile - affichée uniquement sur mobile si nécessaire */
.mobile-animation {
    display: block;
    margin-top: 1rem;
}

.mobile-title {
    display: none;
}

/* Ajuster les affichages d'animation uniquement sur les très petits écrans si nécessaire */
@media screen and (max-width: 480px) {
    /* Décommenter cette ligne uniquement si besoin d'une version spécifique pour mobile
    .desktop-animation {
        display: none;
    }
    */
}

/* Tablettes (992px et moins) */
@media screen and (max-width: 992px) {
    :root {
        --h1-size: 3rem;
        --h2-size: 2.2rem;
        --h3-size: 1.5rem;
    }

    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
    }

    .hero-layout {
        grid-template-columns: 1fr;
        gap: 10px; /* Espace réduit entre les div sur mobile */
    }
    
    .hero-content {
        max-width: 100%;
        text-align: center;
        order: 1;
    }
    
    /* Placer le conteneur IA en dessous du texte et du bouton */
    .ia-simple-container {
        order: 2;
        margin-top: 10px; /* Réduction de l'espace au-dessus du conteneur IA */
    }
    
    .hero-animation {
        order: 3; /* Changé pour éviter les conflits d'ordre avec .ia-simple-container */
        height: 400px;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }

    .hero {
        padding: 40px 0 80px; /* Applique un padding de 40px en haut, 80px en bas */
    }
}

/* Navigation mobile (1024px et moins) */
@media screen and (max-width: 1024px) {
    /* Styles de base de la navigation mobile */
    .navbar {
        padding: 0 1.5rem;
    }
    
    .nav-items {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 400px;
        height: 100vh;
        background: var(--nav-bg);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        justify-content: flex-start;
        padding: 6rem 2rem 2rem;
        transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
        z-index: 999;
        overflow-y: auto;
    }
    
    .nav-items.active {
        transform: translateX(-100%);
    }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
        margin-bottom: 2rem;
        display: flex !important;
    }
    
    .nav-link {
        padding: 0.8rem 1rem;
        margin: 0.25rem 0;
        border-radius: 8px;
        transition: all 0.3s ease;
        color: var(--text-color);
    }
    
    .nav-link:hover {
        background: rgba(124, 137, 255, 0.05);
        transform: translateX(5px);
    }
    
    .nav-cta {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
        margin-top: auto;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .btn-outline,
    .btn-primary {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: flex-end;
        z-index: 1000;
    }
    
    .hamburger-line {
        background-color: var(--text-color);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-nav-toggle {
        display: block;
        font-size: 1.5rem;
        color: var(--text-color);
        background: none;
        border: none;
        cursor: pointer;
    }
}

/* Téléphones en mode paysage (768px et moins) */
@media screen and (max-width: 768px) {
    :root {
        --h1-size: 2.5rem;
        --h2-size: 1.8rem;
        --h3-size: 1.3rem;
    }
    
    .nav-items {
        width: 100%;
        max-width: 100%;
        padding: 5rem 1.5rem 2rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content {
        padding-top: 0;
    }
}

/* Petits téléphones (480px et moins) */
@media screen and (max-width: 480px) {
    :root {
        --h1-size: 2rem;
        --h2-size: 1.5rem;
        --h3-size: 1.2rem;
        --body-size: 0.9rem;
    }
    
    .container {
        width: 95%;
        padding: var(--spacing-xs);
    }
    
    .hero {
        height: auto;
        min-height: 100vh;
    }
    
    .navbar {
        padding: 0 1rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .logo-tagline {
        font-size: 0.7rem;
    }
    
    .hero-content {
        padding-top: 0;
        padding-bottom: var(--spacing-sm);
    }
    
    .title-section {
        margin-top: 0;
        margin-bottom: 0.25rem;
    }
    
    .hero-animation {
        height: 380px;
        margin-top: 20px;
    }
    
    .title-section .title {
        font-size: 1.8rem;
        line-height: 1.1;
        margin: 0;
        padding: 0;
    }
    
    .modern-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
        margin-bottom: 0.25rem;
    }
    
    .ultra-button {
        width: 100%;
        max-width: 280px;
    }
    
    .text-link {
        margin-top: 0.5rem;
        margin-bottom: 0; /* Suppression de la marge en dessous sur mobile */
    }
    
    .btn {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.9rem;
    }
    
    .section-title:after {
        width: 60px;
        height: 3px;
    }
    
    /* Meta Ad conteneur responsive */
    .exemple_meta-container {
        transform: scale(0.8);
        transform-origin: center top;
    }
    
    /* Logos section responsiveness */
    .logos-slider-container {
        padding: 20px 0;
    }
    
    /* Ajustement des particules pour mobile */
    .particle {
        opacity: 0.5;
    }
    .feature-item {
        padding: var(--spacing-sm);
    }

    .logo-item {
        flex: 0 0 100px;
        height: 50px;
    }

    .y-axis-left {
        padding-right: 0;
    }

    .y-axis-right {
        padding-left: 0;
    }

    .line-chart-area {
        gap: 0 !important;
    }

    .line-chart-plot {
        border-left: none !important;
    }

    .cpa-impact-card {
        display: none !important;
    }

    .calendly-popup-header .header-content {
        display: none;
    }

    .community-features {
        display: none !important;
    }

    .desktop-title {
        display: none;
    }

    .mobile-title {
        display: inline;
    }

    .calendly-popup-content {
        margin-top: 20px;
        margin-bottom: 20px;
    }

    @keyframes scrollX {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-100px * 16));
        }
    }
}

/* Grands écrans (1440px et plus) */
@media screen and (min-width: 1440px) {
    .container {
        max-width: 1440px;
        padding: 0 3rem;
    }
}

/* Pour les écrans plus larges que 992px (desktop) */
@media screen and (min-width: 993px) {
    .desktop-animation {
        display: block;
    }
    
    .mobile-animation {
        display: none;
    }
}

/* Très grands écrans (1920px et plus) */
@media screen and (min-width: 1920px) {
    html {
        font-size: 18px;
    }
    
    .container {
        max-width: 1600px;
    }
}

/* Mode sombre (préférences système) */
@media (prefers-color-scheme: dark) {
    :root {
        --nav-bg: rgba(26, 26, 26, 0.96);
        --nav-scrolled-bg: rgba(18, 18, 18, 0.98);
        --nav-border: rgba(124, 137, 255, 0.1);
        --text-color: #ffffff;
        --nav-text-hover: #9b89ff;
        --nav-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    }
    
    .notification {
        background-color: #2e7d32;
        color: #ffffff;
    }
    
    .notification.error {
        background-color: #c62828;
    }
    
    .notification.warning {
        background-color: #ef6c00;
    }
}

/* Réduction du mouvement (préférences utilisateur) */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Styles pour la section des solutions */
.solutions-section {
    padding: 80px 0;
}

@media screen and (max-width: 767px) {
    .solutions-section {
        padding: 40px 0;
    }
    
    .solutions-container {
        padding: 0 15px;
    }
}

/* Téléphones à petits écrans (320px et moins) */
@media screen and (max-width: 320px) {
    .btn {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.9rem;
    }

    .section-title:after {
        width: 60px;
        height: 3px;
    }

    .feature-item {
        padding: var(--spacing-sm);
    }
    :root {
        --h1-size: 1.8rem;
        --h2-size: 1.4rem;
        --h3-size: 1.1rem;
        --body-size: 0.85rem;
    }

    .hero-content p {
        font-size: 1rem;
    }
}
