/* ═════════════════════════════════════════════════════════════
   📱 OPTIMISATIONS MOBILE & TABLETTE SUPPLÉMENTAIRES
   Novilisya Solution - Garantir une expérience parfaite
   ═════════════════════════════════════════════════════════════ */

/* ═════════════════════════════════════════════════════════════
   TABLETTES (768px - 1024px)
   ═════════════════════════════════════════════════════════════ */
@media screen and (max-width: 1024px) and (min-width: 769px) {
    /* Hero */
    .hero-quantum {
        padding: 8rem 2rem 4rem;
    }
    
    .hero-title-quantum {
        font-size: clamp(3rem, 6vw, 4.5rem);
    }
    
    .hero-subtitle-quantum {
        font-size: 1.2rem !important;
        padding: 0 1.5rem !important;
    }
    
    .hero-cta-spaced {
        gap: 2rem !important;
    }
    
    /* Bouton GLISSER DANS LA MATRICE */
    .hero-scroll-indicator-below-title {
        padding: 1.2rem 2.5rem;
    }
    
    .hero-scroll-indicator-below-title .scroll-text {
        font-size: 0.9rem;
        letter-spacing: 2.5px;
    }
    
    /* Icônes Matrix */
    .matrix-icon .icon-svg {
        width: 70px;
        height: 70px;
    }
    
    /* Modal */
    .modal-photo-section {
        margin-bottom: 2rem;
    }
    
    .solutions-grid {
        gap: 18px;
    }
    
    .solution-icon {
        font-size: 2.2rem;
    }
}

/* ═════════════════════════════════════════════════════════════
   MOBILE PAYSAGE & TABLETTES PORTRAIT (768px et moins)
   ═════════════════════════════════════════════════════════════ */
@media screen and (max-width: 768px) {
    /* Touch-friendly: augmenter la taille des zones cliquables */
    .btn-quantum-primary,
    .btn-quantum-secondary {
        min-height: 48px; /* Taille minimale recommandée par Apple/Google */
        padding: 1.1rem 2rem;
        font-size: 1rem;
    }
    
    /* Bouton GLISSER DANS LA MATRICE */
    .hero-scroll-indicator-below-title {
        padding: 1.2rem 2rem;
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-scroll-indicator-below-title .scroll-line {
        height: 35px;
    }
    
    .hero-scroll-indicator-below-title .scroll-text {
        font-size: 0.85rem;
        letter-spacing: 2px;
    }
    
    /* Hero CTA */
    .hero-cta-quantum {
        width: 100%;
        padding: 0 1rem;
    }
    
    .hero-cta-spaced {
        gap: 1.5rem !important;
        flex-direction: column;
    }
    
    .hero-cta-spaced .btn-quantum-primary,
    .hero-cta-spaced .btn-quantum-secondary {
        width: 100%;
        max-width: 350px;
    }
    
    /* Titre épique */
    .hero-title-quantum .word-quantum {
        display: inline-block;
        margin: 0 0.2rem;
    }
    
    /* Sous-titre */
    .hero-subtitle-quantum {
        padding: 0 1.5rem !important;
        margin-bottom: 2rem !important;
    }
    
    .subtitle-highlight {
        margin-top: 0.6rem !important;
    }
    
    /* Navigation mobile - amélioration */
    .menu-toggle-quantum {
        min-width: 44px; /* Touch-friendly */
        min-height: 44px;
        padding: 10px;
    }
    
    .nav-quantum-links {
        overflow-y: auto; /* Scroll si trop de liens */
        -webkit-overflow-scrolling: touch; /* Smooth scroll iOS */
    }
    
    /* Icônes Matrix - réduire légèrement sur mobile */
    .matrix-icon .icon-svg {
        width: 65px;
        height: 65px;
    }
    
    /* Icônes Modal */
    .solution-icon .icon-svg-solution {
        width: 70px;
        height: 70px;
    }
    
    /* Grille solutions - 1 colonne sur mobile */
    .solutions-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    /* Cards - padding réduit */
    .matrix-card,
    .solution-card {
        padding: 20px;
    }
    
    /* Modal - optimisations */
    .founder-modal-content {
        max-width: 95vw;
    }
    
    .modal-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    /* Photo founder dans modal */
    .founder-image-container-modal {
        width: 200px !important;
        height: 200px !important;
    }
    
    /* Désactiver certains effets lourds sur mobile pour performance */
    .hero-quantum-orbs,
    .hero-quantum-grid {
        opacity: 0.3; /* Réduire l'intensité */
    }
    
    /* Simplifier les animations sur mobile */
    * {
        animation-duration: 0.6s !important; /* Animations plus rapides */
    }
}

/* ═════════════════════════════════════════════════════════════
   PETITS MOBILES (480px et moins)
   ═════════════════════════════════════════════════════════════ */
@media screen and (max-width: 480px) {
    /* Hero */
    .hero-quantum {
        padding: 6rem 1rem 3rem;
    }
    
    .hero-badge-quantum {
        font-size: 0.7rem;
        padding: 0.5rem 1rem;
    }
    
    /* Bouton GLISSER DANS LA MATRICE */
    .hero-scroll-indicator-below-title {
        padding: 1rem 1.5rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
    
    .hero-scroll-indicator-below-title .scroll-line {
        height: 30px;
        width: 2px;
    }
    
    .hero-scroll-indicator-below-title .scroll-text {
        font-size: 0.75rem;
        letter-spacing: 1.5px;
    }
    
    /* Boutons CTA */
    .hero-cta-spaced .btn-quantum-primary,
    .hero-cta-spaced .btn-quantum-secondary {
        max-width: 100%;
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
    }
    
    /* Icônes - encore plus petites */
    .matrix-icon .icon-svg {
        width: 55px;
        height: 55px;
    }
    
    .solution-icon .icon-svg-solution {
        width: 60px;
        height: 60px;
    }
    
    /* Modal */
    .modal-grid {
        padding: 20px 15px !important;
    }
    
    .founder-image-container-modal {
        width: 180px !important;
        height: 180px !important;
    }
    
    .modal-title-gradient {
        font-size: 1.8rem !important;
    }
    
    .solution-card {
        padding: 18px !important;
    }
    
    .solution-title {
        font-size: 1rem !important;
    }
    
    .solution-desc {
        font-size: 0.9rem !important;
    }
    
    /* Réduire les marges globales */
    section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ═════════════════════════════════════════════════════════════
   TRÈS PETITS MOBILES (360px et moins) - iPhone SE, etc.
   ═════════════════════════════════════════════════════════════ */
@media screen and (max-width: 360px) {
    html {
        font-size: 12px;
    }
    
    .hero-title-quantum {
        font-size: clamp(1.6rem, 14vw, 2.2rem) !important;
    }
    
    .hero-subtitle-quantum {
        font-size: 0.95rem !important;
        line-height: 1.5 !important;
    }
    
    .subtitle-highlight {
        font-size: 0.8rem !important;
        letter-spacing: 1px !important;
    }
    
    .hero-scroll-indicator-below-title {
        padding: 0.8rem 1.2rem;
    }
    
    .hero-scroll-indicator-below-title .scroll-text {
        font-size: 0.7rem;
        letter-spacing: 1px;
    }
    
    .btn-quantum-primary,
    .btn-quantum-secondary {
        padding: 0.9rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .matrix-icon .icon-svg {
        width: 50px;
        height: 50px;
    }
    
    .solution-icon .icon-svg-solution {
        width: 55px;
        height: 55px;
    }
}

/* ═════════════════════════════════════════════════════════════
   ORIENTATION PAYSAGE SUR MOBILE
   ═════════════════════════════════════════════════════════════ */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero-quantum {
        padding: 4rem 1.5rem 2rem;
        min-height: auto;
    }
    
    .hero-title-quantum {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        margin-bottom: 1rem;
    }
    
    .hero-subtitle-quantum {
        margin-bottom: 1.5rem !important;
    }
    
    .hero-scroll-indicator-below-title {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
    
    .hero-cta-quantum {
        flex-direction: row;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-cta-spaced .btn-quantum-primary,
    .hero-cta-spaced .btn-quantum-secondary {
        width: auto;
        padding: 0.8rem 1.5rem;
    }
    
    /* Modal en mode paysage */
    .founder-modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-grid {
        gap: 20px;
    }
}

/* ═════════════════════════════════════════════════════════════
   PERFORMANCE: Réduire les animations sur appareils faibles
   ═════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ═════════════════════════════════════════════════════════════
   TOUCH DEVICES: Améliorer l'expérience tactile
   ═════════════════════════════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) {
    /* Supprimer les effets hover sur touch devices */
    .hero-scroll-indicator-below-title:hover,
    .btn-quantum-primary:hover,
    .btn-quantum-secondary:hover,
    .solution-card:hover,
    .matrix-card:hover {
        transform: none;
    }
    
    /* Ajouter des états :active au lieu de :hover */
    .hero-scroll-indicator-below-title:active {
        transform: scale(0.98);
    }
    
    .btn-quantum-primary:active,
    .btn-quantum-secondary:active {
        transform: scale(0.97);
    }
    
    /* Désactiver le curseur custom sur touch */
    .custom-cursor {
        display: none !important;
    }
}

/* ═════════════════════════════════════════════════════════════
   ACCESSIBILITÉ: Améliorer le contraste pour mobile
   ═════════════════════════════════════════════════════════════ */
@media screen and (max-width: 768px) {
    /* Augmenter légèrement le contraste du texte */
    .hero-subtitle-quantum {
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    }
    
    .subtitle-highlight {
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    }
    
    /* Améliorer la visibilité des boutons */
    .btn-quantum-primary,
    .btn-quantum-secondary {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
}
