/* ===== Galerie d'images à défilement horizontal automatique ===== */

.gallery-marquee {
    overflow: hidden;
    /* Fondu doux sur les bords */
    -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
            mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}

.gallery-track {
    display: flex;
    width: max-content;
    animation: gallery-scroll var(--marquee-duration, 40s) linear infinite;
}

/* Pause quand on survole la galerie */
.gallery-marquee:hover .gallery-track {
    animation-play-state: paused;
}

.gallery-item {
    flex: 0 0 auto;
    width: 280px;
    height: 224px;
    /* margin (et non gap) : la largeur totale = 2 × un lot, donc -50% boucle sans saut */
    margin-right: 24px;
    overflow: hidden;
    border-radius: 1.5rem;
    border: 4px solid #fff;
    background: #e9edff;
    box-shadow: 0 12px 32px -8px rgba(19, 45, 92, 0.15);
}

.gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (min-width: 768px) {
    .gallery-item {
        width: 360px;
        height: 288px;
    }
}

@keyframes gallery-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Accessibilité : pas d'animation automatique, défilement manuel à la place */
@media (prefers-reduced-motion: reduce) {
    .gallery-marquee {
        overflow-x: auto;
        -webkit-mask-image: none;
                mask-image: none;
    }
    .gallery-track {
        animation: none;
    }
}