/**
 * CORRECTIONS RESPONSIVE MOBILE
 * Toutes les corrections pour mobile
 */

/* ========================================
   CORRECTIONS GLOBALES MOBILE
   ======================================== */

@media (max-width: 768px) {
    /* Réduire toutes les polices trop grosses */
    body {
        font-size: 14px !important;
    }
    
    h1 {
        font-size: 32px !important;
        line-height: 1.3 !important;
    }
    
    h2 {
        font-size: 28px !important;
        line-height: 1.3 !important;
    }
    
    h3 {
        font-size: 22px !important;
    }
    
    h4 {
        font-size: 18px !important;
    }
    
    p {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }
    
    /* Réduire espacements verticaux excessifs */
    section {
        padding: 40px 0 !important;
    }
    
    .container {
        padding: 0 20px !important;
    }
    
    /* Hero sections - Réduire hauteur et overlay rouge */
    .hero-section {
        min-height: 400px !important;
        padding: 60px 0 !important;
    }
    
    .hero-title {
        font-size: 28px !important;
        margin-bottom: 16px !important;
    }
    
    .hero-subtitle {
        font-size: 15px !important;
        margin-bottom: 24px !important;
    }
    
    /* Contact hero - Réduire rouge */
    .hero-section[style*="C3110D"] {
        background: linear-gradient(rgba(42, 42, 42, 0.7), rgba(42, 42, 42, 0.75)), 
                    url() center/cover no-repeat !important;
    }
}

/* ========================================
   STATS - 2x2 GRID SUR MOBILE
   ======================================== */

@media (max-width: 768px) {
    .stats-section {
        padding: 30px 0 !important;
    }
    
    .stats-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 20px !important;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .stat-item {
        padding: 20px 10px !important;
    }
    
    .stat-number {
        font-size: 36px !important;
        margin-bottom: 8px !important;
    }
    
    .stat-label {
        font-size: 12px !important;
    }
}

/* ========================================
   SERVICES HOME SECTION
   ======================================== */

@media (max-width: 768px) {
    .services-hero-section {
        padding: 40px 0 !important;
    }
    
    .services-hero-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    
    .services-hero-title {
        font-size: 28px !important;
        margin-bottom: 16px !important;
    }
    
    .services-hero-subtitle {
        font-size: 14px !important;
        margin-bottom: 24px !important;
    }
    
    .service-item {
        padding: 16px !important;
    }
    
    .service-item-title {
        font-size: 16px !important;
    }
    
    .service-item-desc {
        font-size: 13px !important;
    }
    
    /* Image services - rendre customisable */
    .services-hero-image {
        min-height: 300px !important;
        border-radius: 12px !important;
    }
}

/* ========================================
   CONTACT PAGE - RÉDUIRE ROUGE
   ======================================== */

@media (max-width: 768px) {
    /* Contact hero - overlay gris au lieu de rouge */
    section.hero-section[style*="linear-gradient(rgba(195, 17, 13"] {
        background: linear-gradient(rgba(42, 42, 42, 0.65), rgba(42, 42, 42, 0.75)), 
                    var(--bg-image) center/cover no-repeat !important;
    }
    
    .contact-block {
        margin-bottom: 24px !important;
    }
    
    .contact-block h3 {
        font-size: 16px !important;
    }
    
    .contact-block p {
        font-size: 14px !important;
    }
}

/* ========================================
   FOOTER - AJOUTER CONTENU
   ======================================== */

@media (max-width: 768px) {
    .footer-grid-enhanced {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }
    
    .footer-title {
        font-size: 16px !important;
        margin-bottom: 16px !important;
    }
    
    .footer-links li {
        margin-bottom: 10px !important;
    }
    
    .footer-links a {
        font-size: 14px !important;
    }
    
    .footer-tagline {
        font-size: 13px !important;
    }
}

/* ========================================
   BOUTONS - ESPACEMENT
   ======================================== */

@media (max-width: 768px) {
    .btn {
        padding: 12px 24px !important;
        font-size: 14px !important;
        margin-top: 20px !important;
        margin-bottom: 0 !important;
    }
    
    .hero-content .btn {
        margin-top: 24px !important;
    }
    
    /* Éviter boutons trop bas */
    .services-hero-cta {
        margin-top: 24px !important;
        padding-top: 0 !important;
    }
}

/* ========================================
   MENU MOBILE
   ======================================== */

@media (max-width: 768px) {
    .nav-menu li a {
        font-size: 16px !important;
        padding: 12px 20px !important;
    }
    
    .language-switcher {
        font-size: 14px !important;
    }
}

/* ========================================
   SECTIONS SPACING RÉDUIT
   ======================================== */

@media (max-width: 768px) {
    /* Réduire tous les paddings verticaux excessifs */
    .section-header {
        margin-bottom: 30px !important;
    }
    
    .section-title {
        font-size: 26px !important;
        margin-bottom: 12px !important;
    }
    
    .section-subtitle {
        font-size: 11px !important;
        margin-bottom: 10px !important;
    }
    
    .section-description {
        font-size: 14px !important;
    }
    
    /* Marges entre sections */
    section + section {
        margin-top: 0 !important;
    }
    
    /* Products section - Grid 3 colonnes → 2 mobile */
    .products-section {
        padding: 40px 0 !important;
        min-height: auto !important;
    }
    
    .products-grid,
    .products-grid-full {
        grid-template-columns: 1fr 1fr !important;
        gap: 20px !important;
        margin-bottom: 30px !important;
    }
    
    /* Product cards mobile */
    .product-card {
        padding: 24px 20px !important;
    }
    
    .card-icon-wrapper {
        width: 70px !important;
        height: 70px !important;
        margin: 0 auto 20px !important;
    }
    
    .card-icon-wrapper i {
        font-size: 36px !important;
    }
    
    .product-card .card-title {
        font-size: 16px !important;
        margin-bottom: 12px !important;
    }
    
    .product-card .card-description {
        font-size: 13px !important;
        min-height: auto !important;
        margin-bottom: 20px !important;
        line-height: 1.5 !important;
    }
    
    .product-card .btn-sm {
        font-size: 13px !important;
        padding: 10px 20px !important;
        width: 100% !important;
    }
    
    /* Si images manquantes, card icon plus petit */
    .card-icon {
        font-size: 40px !important;
        margin-bottom: 16px !important;
    }
    
    /* Card images responsive */
    .card-image {
        height: 160px !important;
        margin-bottom: 16px !important;
    }
}

/* ========================================
   PARALLAX - DÉSACTIVER SUR MOBILE
   ======================================== */

@media (max-width: 768px) {
    /* Désactiver parallax (background-attachment: fixed cause problèmes) */
    .hero-parallax,
    [style*="background-attachment: fixed"] {
        background-attachment: scroll !important;
    }
    
    /* Hero backgrounds fixes sur mobile */
    .hero-section {
        background-attachment: scroll !important;
    }
}

/* ========================================
   ANIMATIONS AOS - OPTIMISER MOBILE
   ======================================== */

@media (max-width: 768px) {
    /* Réduire durée animations */
    [data-aos] {
        transition-duration: 0.4s !important;
    }
    
    /* Réduire offset pour déclencher plus tôt */
    [data-aos][data-aos-offset] {
        --aos-offset: 30px !important;
    }
    
    /* Animations plus subtiles */
    [data-aos="fade-up"] {
        transform: translate3d(0, 20px, 0) !important;
    }
    
    [data-aos="fade-up"].aos-animate {
        transform: translate3d(0, 0, 0) !important;
    }
}

/* ========================================
   IMAGES CUSTOMISABLES
   ======================================== */

@media (max-width: 768px) {
    /* Images hero services */
    .services-hero-image img,
    .services-hero-image {
        width: 100% !important;
        height: auto !important;
        min-height: 250px !important;
        object-fit: cover !important;
        border-radius: 8px !important;
    }
    
    /* Images produits */
    .product-card img {
        height: 180px !important;
    }
    
    /* Images services */
    .service-image {
        height: 200px !important;
    }
}

/* ========================================
   OVERLAY ROUGE - CORRECTION GLOBALE
   ======================================== */

/* Remplacer tous les overlays rouges par gris sur mobile */
@media (max-width: 768px) {
    .hero-section::before {
        background: linear-gradient(
            rgba(42, 42, 42, 0.65),
            rgba(42, 42, 42, 0.75)
        ) !important;
    }
}
