.jpb-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin: 0;
    padding: 0;
    height: 600px;
    /* AJOUT – stabilité verticale */
    min-height: 500px;
    padding-top: 4rem;
    touch-action: pan-y;
}

.jpb-carousel-track {
    display: flex;
    align-items: center;
    gap: 5rem;
    transition: transform 0.5s ease;
    will-change: transform;
}

/* SLIDES */
.jpb-slide {
    flex-shrink: 0;
    width: 600px;
    opacity: 0.5;
    transform: scale(0.9);
    transition: transform 0.4s ease, opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-radius: .5rem;
    overflow: hidden;

    /* AJOUT – ancrage du zoom */
    transform-origin: center center;
}

.jpb-slide.prev,
.jpb-slide.next {
    transform: scale(0.9) translateY(10px); /* slide latérale plus petite */
    opacity: 0.6;
    z-index: 1;
}

.jpb-slide.active {
    transform: scale(1.15) translateY(0); /* slide centrale agrandie */
    opacity: 1;
    z-index: 2;
}

/* IMAGE */
.artwork-image {
    width: 100%;
    height: 320px;
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
    backdrop-filter: blur(14px);
    background-color: rgba(255,255,255,.25);
    border-radius: .45rem;
}

/* META */
.artwork-meta {
    padding: 1rem;
    backdrop-filter: blur(14px);
    background-color: rgba(255,255,255,.25);
    border-radius: .45rem;
    color: #fff;
    text-align: center;
}

.artwork-meta h3 {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.artwork-meta .subtitle,
.artwork-meta .dimensions {
    font-size: 0.85rem;
    margin: 2px 0;
}

/* FLÈCHES */
.jpb-prev,
.jpb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    color: #fff;
    border: none;
    font-size: 2.5rem;
    padding: .4rem .8rem;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
}


.jpb-prev { left: 10px; }
.jpb-next { right: 10px; }
@media (max-width: 1024px) {
    .jpb-carousel {
        min-height: 420px;
    }

    .jpb-carousel-track {
        gap: 3rem;
    }

    .jpb-slide {
        width: 380px;
    }

    .jpb-slide.active {
        transform: scale(1.1);
    }

    .artwork-image {
        height: 260px;
    }
}

@media (max-width: 768px) {
    .jpb-carousel {
        min-height: 340px;
    }

    .jpb-carousel-track {
        gap: 2rem;
    }

    .jpb-slide {
        width: 260px;
        transform: scale(0.95);
    }

    .jpb-slide.active {
        transform: scale(1.05);
    }

    .artwork-image {
        height: 200px;
    }

    .jpb-prev,
    .jpb-next {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .jpb-carousel {
        min-height: 300px;
    }

    .jpb-slide {
        width: 220px;
    }

    .artwork-image {
        height: 170px;
    }
}
