/* Corrections spécifiques pour mobile */
@media screen and (max-width: 768px) {
    /* Forcer le container à ne jamais déborder */
    body {
        overflow-x: hidden !important;
        width: 100vw;
    }
    
    .hero {
        min-height: 100vh;
        padding: 80px 0 40px;
        overflow: hidden; /* Empêcher tout débordement horizontal */
        width: 100%;
    }
    
    .hero-container {
        padding: 0 15px;
        max-width: 100%;
        overflow: hidden;
    }
    
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        width: 100%;
        overflow: hidden;
    }
    
    .hero-text {
        max-width: 100%;
        padding: 0 10px;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem) !important;
        line-height: 1.2;
        margin-bottom: 15px;
        word-wrap: break-word;
        hyphens: auto;
        width: 100%;
        overflow-wrap: break-word;
    }
    
    .hero-subtitle {
        font-size: clamp(1.1rem, 5vw, 1.5rem) !important;
        line-height: 1.3;
        margin-bottom: 15px;
        width: 100%;
        overflow-wrap: break-word;
    }
    
    .hero-description {
        font-size: clamp(0.95rem, 4vw, 1.1rem) !important;
        line-height: 1.5;
        margin-bottom: 25px;
        max-width: 100%;
        width: 100%;
        overflow-wrap: break-word;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        align-items: center;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        padding: 12px 20px;
        font-size: 1rem;
        box-sizing: border-box;
    }
    
    .hero-image {
        order: -1;
        margin-bottom: 20px;
        position: relative !important;
        width: 100%;
        height: auto;
        overflow: hidden;
    }
    
    /* Masquer complètement les floating cards sur mobile pour éviter le débordement */
    .floating-card {
        display: none !important;
    }
}

@media screen and (max-width: 480px) {
    /* Forcer le contrôle strict de la largeur */
    html, body {
        overflow-x: hidden !important;
        width: 100%;
        max-width: 100vw;
    }
    
    .hero {
        padding: 70px 0 30px;
        width: 100%;
        overflow: hidden;
    }
    
    .hero-container {
        padding: 0 10px;
        max-width: 100%;
        width: 100%;
    }
    
    .hero-text {
        padding: 0 5px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    
    .hero-title {
        font-size: clamp(1.8rem, 9vw, 2.5rem) !important;
        line-height: 1.1;
        width: 100%;
        overflow-wrap: break-word;
        word-break: break-word;
    }
    
    .hero-subtitle {
        font-size: clamp(1rem, 5.5vw, 1.3rem) !important;
        width: 100%;
        overflow-wrap: break-word;
    }
    
    .hero-description {
        font-size: clamp(0.9rem, 4.5vw, 1rem) !important;
        padding: 0 5px;
        width: 100%;
        overflow-wrap: break-word;
        word-break: break-word;
    }
    
    .hero-buttons {
        width: 100%;
        overflow: hidden;
    }
    
    .hero-buttons .btn {
        max-width: 250px;
        padding: 10px 16px;
        font-size: 0.95rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Assurer que le contenu ne déborde pas */
    .hero-text * {
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-wrap: break-word !important;
    }
    
    /* Container global pour éviter le scroll horizontal */
    .container {
        max-width: 100%;
        padding: 0 10px;
        overflow: hidden;
    }
}

/* Correction pour la navigation mobile */
@media screen and (max-width: 768px) {
    .navbar {
        padding: 0 15px;
    }
    
    .nav-container {
        max-width: 100%;
    }
}

/* Améliorer la lisibilité sur très petits écrans */
@media screen and (max-width: 360px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    .hero {
        width: 100%;
        overflow: hidden;
    }
    
    .hero-container {
        padding: 0 5px;
        width: 100%;
        max-width: 100%;
    }
    
    .hero-text {
        padding: 0;
        width: 100%;
    }
    
    .hero-title {
        font-size: clamp(1.6rem, 10vw, 2.2rem) !important;
        width: 100%;
        overflow-wrap: break-word;
        word-break: break-word;
        hyphens: auto;
    }
    
    .hero-subtitle {
        font-size: clamp(0.9rem, 6vw, 1.2rem) !important;
        width: 100%;
        overflow-wrap: break-word;
    }
    
    .hero-description {
        font-size: clamp(0.85rem, 5vw, 0.95rem) !important;
        line-height: 1.4;
        width: 100%;
        padding: 0;
        overflow-wrap: break-word;
        word-break: break-word;
    }
    
    .hero-buttons .btn {
        max-width: 220px;
        width: 100%;
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    /* Forcer tous les éléments à rester dans les limites */
    * {
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }
}
