/* =========================
GALERIE
========================= */

.gallery {
    width: 100%;
    height: 100vh;

    display: flex;
    align-items: flex-start;

    overflow-x: auto;
    overflow-y: hidden;

    padding:
        150px
        0
        110px;


    scroll-behavior: smooth;
}

/* CACHE SCROLLBAR */

.gallery::-webkit-scrollbar {
    display: none;
}

/* =========================
PROJETS
========================= */

.project {
    position: relative;
    overflow: hidden;

    flex: 0 0 20vw;

    display: flex;
    flex-direction: column;

    text-decoration: none;
    color: black;

    transition:
        flex 0.7s cubic-bezier(0.77, 0, 0.175, 1),
        opacity 0.4s ease;
}

/* =========================
INFOS
========================= */

.project-info {
    padding:
        0 18px 14px;

    min-height: 60px;
}

.project-info h2 {
    font-size: 18px;
    line-height: 0.95;
    font-weight: 590;
    letter-spacing: -0.03em;
    margin-bottom: 6px;
    max-width: 80%;
}

.project-info p {
    font-size: 11px;
    font-weight: 500;
    opacity: 0.45;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.project-number {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 5;
    font-size: 11px;
    font-weight: 500;
    opacity: 0.35;
    letter-spacing: 0.08em;
}

/* =========================
IMAGE
========================= */

.project img {
    width: 100%;

    aspect-ratio: 4 / 5;

    object-fit: cover;
    display: block;

    transition:
        transform 0.8s ease,
        filter 0.8s ease;
}

/* =========================
HOVER
========================= */

/* tous deviennent plus petits */

.gallery:hover .project {
    flex: 0 0 16vw;
}

/* celui hover grossit */

.gallery .project:hover {
    flex: 0 0 30vw;
}

/* zoom image */

.gallery .project:hover img {
    transform: scale(1.03);
}

/* =========================
RESPONSIVE
========================= */

@media (max-width: 768px) {

    .gallery {
        flex-direction: column;

        height: auto;

        overflow: visible;

        padding:
            100px
            20px
            140px;
    }

    .project {
        flex: none;
        width: 100%;
    }

    .gallery:hover .project,
    .gallery .project:hover {
        flex: none;
        width: 100%;
    }

}