/* Styles pour le menu mobile et les ajustements responsives globaux */

/* Bouton Hamburger */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #050505;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10000;
}

/* Overlay du menu mobile */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    transform: translateY(-20px);
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-nav-close {
    position: absolute;
    top: 30px;
    right: 5%;
    background: none;
    border: none;
    font-size: 2.5rem;
    color: #050505;
    cursor: pointer;
    transition: 0.3s;
}

.mobile-nav-links ul {
    list-style: none;
    text-align: center;
    padding: 0;
}

.mobile-nav-links li {
    margin: 25px 0;
}

.mobile-nav-links a {
    text-decoration: none;
    color: #050505;
    font-size: 1.4rem;
    font-weight: 800;
    text-transform: uppercase;
    transition: 0.3s;
    font-family: 'Montserrat', sans-serif;
}

.mobile-nav-links a:hover {
    color: #0059ab;
}

/* Styles pour le bouton Call-to-action dans le menu mobile */
.mobile-nav-links a.nav-cta,
.mobile-nav-links a.btn-devis,
.mobile-nav-links a.btn-primary {
    display: inline-block;
    margin-top: 15px;
    background: #050505;
    color: #ffffff !important;
    padding: 15px 35px;
    border-radius: 50px;
    font-size: 1.1rem;
    border: none;
}

.mobile-nav-links a.nav-cta:hover,
.mobile-nav-links a.btn-devis:hover {
    background: #0059ab;
}

/* -------------------------------------------------------------
   MÉDIA QUERIES GLOBALES (Ajustements pour toutes les pages)
   ------------------------------------------------------------- */
@media (max-width: 1024px) {
    /* Cacher le menu principal et afficher le bouton hamburger */
    .main-nav {
        display: none !important;
    }
    .mobile-menu-btn {
        display: block;
    }
}

@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        width: 100%;
        position: relative;
    }
    
    #content-wrapper {
        overflow-x: hidden !important;
        width: 100%;
    }

    /* Shrink logo and text on very small screens to prevent header overflow */
    .logo-img { height: 45px !important; margin-right: 5px !important; }
    .text-clean { font-size: 1.2rem !important; }
    
    /* Fix about.html flex items min-width */
    .zone-text, .radar-container {
        min-width: 100% !important;
    }
    
    /* Réduction globale des marges/paddings sur mobile */
    .section, .devis-layout, .about-section, .contact-section {
        padding: 60px 5% !important;
    }
    
    .hero {
        padding: 120px 5% 60px !important;
    }

    /* Ajustement de la taille des titres pour éviter qu'ils ne débordent */
    .section-title, .hero h1, .devis-hero h1, .about-hero h1, .contact-hero h1, 
    .story-content h1, .founder-text h2, .nemesis-title h2, .zone-text h2, 
    .tech-title h2, .guarantee-title, .eco-title {
        font-size: clamp(2rem, 8vw, 2.5rem) !important;
        line-height: 1.2 !important;
    }

    /* Le pied de page doit s'afficher en colonne et être centré */
    .footer-container {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
        text-align: center;
    }

    /* Sécurité globale pour les images */
    img, video {
        max-width: 100% !important;
        height: auto;
    }

    .social-links {
        justify-content: center !important;
    }
    
    /* Boutons CTA plus petits sur mobile */
    .cta-box h2 {
        font-size: clamp(1.5rem, 6vw, 2rem) !important;
    }
    .cta-buttons {
        flex-direction: column;
    }
    
    .btn-submit, .btn-whatsapp, .btn-primary {
        width: 100% !important;
        text-align: center;
        justify-content: center;
    }

    /* Limiter la taille des canvas 3D/interactifs sur mobile */
    canvas {
        max-width: 100% !important;
    }

    /* Fix pour les cartes d'avis qui debordaient (Index) */
    .review-card {
        width: 85vw !important;
        max-width: 380px !important;
        padding: 25px 20px !important;
        margin: 0 10px !important;
    }

    /* Fix pour la carte de comparaison (Index) */
    .comparison-card {
        width: 100% !important;
        max-width: 480px !important;
        height: auto !important;
        aspect-ratio: 480/350;
    }

    /* Fix pour les grilles avec minmax (A Propos / Contact / Devis) */
    .flip-grid, .spotlight-grid {
        grid-template-columns: 1fr !important;
    }

    /* Fix pour les cartes de prix trop larges */
    .forfait-card, .price-card {
        padding: 30px 20px !important;
    }

    /* Fix pour le radar dans a propos */
    .radar {
        width: 100% !important;
        max-width: 350px !important;
        height: auto !important;
        aspect-ratio: 1/1 !important;
    }
}

/* Fix pour la section avant/apres horizontale (Prestations) */
@media (max-width: 1200px) {
    .h-scroll-section {
        overflow: visible !important;
        height: auto !important;
    }
    .h-scroll-container {
        width: 100% !important;
        height: auto !important;
        flex-direction: column !important;
        display: flex !important;
    }
    .h-panel {
        width: 100% !important;
        height: auto !important;
        padding: 60px 5% !important;
        margin-bottom: 30px !important;
    }
}
