/* ==========================================================
   EcoClimPro — Hero en bandeau de vignettes défilantes
   Défilement continu en pur CSS (aucun JS requis, performant).
   ========================================================== */

.hero-slider {
    position: relative;
    overflow: hidden;
    padding-top: 70px;
    padding-bottom: 18px;
    background: linear-gradient(135deg, var(--primary, #0B6CB8), var(--secondary, #27AE60));
}

.hero-slider__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg,
        rgba(10, 30, 55, 0.35) 0%,
        rgba(10, 30, 55, 0.05) 55%,
        rgba(10, 30, 55, 0) 100%);
    pointer-events: none;
}

.hero-slider__content {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-bottom: 24px;
}

.hero-slider__title {
    color: #fff;
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Bandeau de vignettes */
.hero-slider__marquee {
    position: relative;
    z-index: 2;
    width: 100%;
    overflow: hidden;
    /* fondu sur les bords gauche/droit */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}

.hero-slider__track {
    display: flex;
    align-items: center;
    gap: 14px;
    width: max-content;
    animation: hero-marquee 70s linear infinite;
}

.hero-slider:hover .hero-slider__track {
    animation-play-state: paused;
}

.hero-slider__thumb {
    flex: 0 0 auto;
    width: 150px;
    height: 112px;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.hero-slider__thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes hero-marquee {
    from {
        transform: translateX(0);
    }
    to {
        /* la liste est dupliquée : -50% = exactement un jeu d'images, boucle invisible */
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    .hero-slider {
        padding-top: 48px;
        padding-bottom: 14px;
    }

    .hero-slider__content {
        margin-bottom: 16px;
    }

    .hero-slider__thumb {
        width: 110px;
        height: 82px;
        border-radius: 8px;
    }

    .hero-slider__track {
        gap: 10px;
        animation-duration: 50s;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-slider__track {
        animation: none;
    }
}
