/* =========================================
   SHOWCASE HORIZONTAL
========================================= */

.showcase {
    width: 100%;
    overflow: hidden;

    padding: 40px 0;

    position: relative;
	left: 10px;
    background: #f5f5f5;
}


/* =========================================
   DÉGRADÉS SUR LES CÔTÉS
========================================= */

.showcase::before,
.showcase::after {
    content: "";

    position: absolute;
    z-index: 5;

    top: 0;
    bottom: 0;

    width: 20px;

    pointer-events: none;
}

.showcase::before {
    left: 0;

    background:
        linear-gradient(
            to right,
            #f5f5f5,
            transparent
        );
}

.showcase::after {
    right: 0;

    background:
        linear-gradient(
            to left,
            #f5f5f5,
            transparent
        );
}


/* =========================================
   PISTE
========================================= */

.showcase-track {
    display: flex;
    align-items: center;

    width: max-content;

    gap: 2px;

    animation:
        showcase-scroll 30s linear infinite;
}


/* =========================================
   PHOTOS
========================================= */

.showcase-item {
    flex: 0 0 1;

    height: 260px;

    overflow: hidden;

    border-radius: 16px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.15);

    transition:
        transform 0.4s ease,
        opacity 0.4s ease;
}


.showcase-item img {
    display: block;
    height: 100%;
    object-fit: cover;
}


/* =========================================
   EFFET AU SURVOL
========================================= */

.showcase-item:hover {
    transform: scale(1.05);

    z-index: 10;
}


/* =========================================
   ANIMATION INFINIE
========================================= */

@keyframes showcase-scroll {

    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(
            calc(-50% - 10px)
        );
    }

}


/* =========================================
   PAUSE AU SURVOL
========================================= */

.showcase:hover .showcase-track {
    animation-play-state: paused;
}


/* =========================================
   TABLETTE
========================================= */

@media (max-width: 800px) {

    .showcase {
        padding: 30px 0;
    }

    .showcase-item {
        flex-basis: 250px;
        height: 175px;
    }

    .showcase-track {
        gap: 15px;
        animation-duration: 30s;
    }
}


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

@media (max-width: 500px) {

    .showcase {
        padding: 25px 0;
    }

    .showcase-item {
        flex-basis: 220px;
        height: 150px;

        border-radius: 12px;
    }

    .showcase-track {
        gap: 12px;
        animation-duration: 25s;
    }

    .showcase::before,
    .showcase::after {
        width: 50px;
    }
}