/* Styles pour la section Impact */
.feature-display {
    padding: 12rem 0 12rem;
    position: relative;
    overflow: hidden; /* Changé de visible à hidden */
    margin-top: -110px;
    z-index: 7;
    min-height: 1000px;
    width: 100%; /* Ajouté */
    max-width: 100vw; /* Ajouté pour forcer la largeur maximale */
}

.device-showcase {      
    margin: 230px auto 0;
    max-width: 700px;
    z-index: 21;
    position: relative;
}

.device-showcase img {
    width: 100%;
    transform: scale(1.15);
}

/* Lignes de connexion */
.link-wire {
    position: absolute;
    background-color: #ffffff;
}

.animate-laptop {
    opacity: 0;
    animation: fadeInUp 1.5s forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(1.15);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1.15);
    }
}

/* Animation des lignes */
.animate-line-left-vertical {
    height: 0;
    width: 5px;
    background-color: #1D1832;
    top: 100%;
    left: 50%;
    animation: growVertical 1s forwards;
    animation-delay: 1s;
}

.animate-line-left-horizontal {
    height: 5px;
    width: 0;
    background-color: #1D1832;
    top: calc(100% + 120px);
    left: 50%;
    animation: growHorizontal 1s forwards;
    animation-delay: 2s;
}

.animate-line-bottom {
    height: 0;
    width: 5px;
    background-color: #5A9BD4;
    bottom: 100%;
    left: 50%;
    animation: growVerticalUp 1s forwards;
    animation-delay: 0.6s;
}

.animate-line-right-vertical {
    height: 0;
    width: 5px;
    background-color: #454F9D;
    bottom: 100%;
    left: 51%;
    animation: growVerticalUp 1s forwards;
    animation-delay: 1s;
}

.animate-line-right-horizontal {
    height: 5px;
    width: 0;
    background-color: #454F9D;
    right: 48%;
    bottom: 336px;
    animation: growHorizontalRight 1s forwards;
    animation-delay: 2s;
}

@keyframes growVertical {
    from { height: 0; }
    to { height: 120px; }
}

@keyframes growVerticalUp {
    from { height: 0; }
    to { height: 141px; }
}

@keyframes growHorizontal {
    from { width: 0; }
    to { width: 350px; }
}

@keyframes growHorizontalRight {
    from { width: 0; }
    to { width: 400px; }
}

.feature-card {
    transition: transform 0.3s ease;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.feature-wrapper {
    width: 400px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 20;
}

/* Position spécifique pour chaque box */
.feature-left {
    position: absolute;
    left: 5%;
    top: 130px;
}

.feature-bottom {
    position: absolute;
    left: 30%;
    transform: translateX(-50%);
    bottom: 30px;
}

.feature-right {
    position: absolute;
    right: 2%;
    top: 400px;
}

/* Icônes dans les boîtes */
.icon-box {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

/* Ajustements pour les écrans supérieurs à 1900px */
@media (min-width: 2000px) {
    .feature-display {
        padding: 15rem 0 20rem;
        min-height: 1200px;
    }

    .device-showcase {
        max-width: 900px;
    }

    .feature-wrapper {
        width: 500px;
    }

    .feature-left {
        left: 10%;
        top: 150px;
    }

    .feature-bottom {
        left: 40%;
        bottom: 60px;
    }

    .feature-right {
        right: 10%;
        top: 450px;
    }

    .animate-line-left-horizontal {
        animation-name: growHorizontalWide;
    }

    .animate-line-right-horizontal {
        animation-name: growHorizontalWideRight;
    }

    @keyframes growHorizontalWide {
        from { width: 0; }
        to { width: 650px; }
    }

    @keyframes growHorizontalWideRight {
        from { width: 0; }
        to { width: 500px; }
    }
}

/* Ajustements pour les tablettes (entre 762px et 1400px) */
@media (min-width: 762px) and (max-width: 1400px) {
    .feature-display {
        padding: 10rem 0 15rem;
        min-height: 1100px;
    }

    .device-showcase {
        max-width: 600px;
    }

    .feature-wrapper {
        width: 350px;
    }

    .feature-left {
        left: 5%;
        top: 450px;
    }

    .feature-bottom {
        left: 45%;
        bottom: 150px;
    }

    .feature-right {
        right: 5%;
        top: 550px;
    }

    @keyframes growHorizontalRight {
        from { width: 0; }
        to { width: 350px; }
    }
}

/* Ajustements pour les écrans mobiles - CORRECTION PRINCIPALE */
@media (max-width: 1000px) {
    .feature-display {
        padding: 2rem 1rem 0rem; /* Ajout de padding horizontal */
        min-height: 1120px;
        overflow: hidden; /* Force le contenu à rester dans les limites */
    }

    .feature-wrapper {
        position: static;
        margin: 2rem auto;
        width: 90%;
        max-width: 400px;
    }

    .feature-left, .feature-bottom, .feature-right {
        position: static;
        transform: none;
        margin-bottom: 2rem;
    }

    .link-wire, .crossbar {
        display: none;
    }
}

/* Ajustements spécifiques pour les petits écrans */
@media (max-width: 768px) {
    .feature-display {
        padding: 10rem 1rem 0rem; /* Réduction du padding */
        min-height: 900px;
    }

    .device-showcase {
        max-width: 350px;
    }

    .device-showcase img {
        transform: scale(1.05); /* Réduction légère de l'échelle */
    }

    .feature-wrapper {
        width: 95%;
        max-width: 350px;
        margin: 1.5rem auto;
    }

    .feature-card {
        min-height: 150px;
        padding: 15px;
    }
}

/* Ajustements pour les très petits écrans */
@media (max-width: 480px) {
    .feature-display {
        padding: 8rem 0.5rem 0rem;
        min-height: 800px;
    }

    .device-showcase {
        max-width: 400px;
        margin: 100px auto 0;
    }

    .device-showcase img {
        transform: scale(1);
    }

    .feature-wrapper {
        width: 98%;
        max-width: 300px;
        margin: 1rem auto;
    }

    .feature-card {
        min-height: 130px;
        padding: 12px;
        font-size: 0.9rem;
    }

    .icon-box {
        width: 50px;
        height: 50px;
    }

    .icon-box img {
        width: 30px;
        height: 30px;
    }
}

/* Ajustements pour les écrans ultra-petits (300px) */
@media (max-width: 320px) {
    .feature-display {
        padding: 6rem 0.25rem 0rem;
        min-height: 700px;
    }

    .device-showcase {
        max-width: 280px;
        margin: 80px auto 0;
    }

    .device-showcase img {
        transform: scale(0.9);
    }

    .feature-wrapper {
        width: 100%;
        max-width: 280px;
        margin: 0.8rem auto;
    }

    .feature-card {
        min-height: 120px;
        padding: 10px;
        font-size: 0.8rem;
    }

    .feature-card h3 {
        font-size: 1.1rem;
    }

    .icon-box {
        width: 45px;
        height: 45px;
    }

    .icon-box img {
        width: 25px;
        height: 25px;
    }
}