/* PA Carrousel Photos — bande de vignettes + lightbox. Classes préfixées pacf- pour être indépendantes du thème. */

.pacf-carousel { margin: 30px 0; padding: 20px 0; border-top: 2px solid #e5e7eb; }
.pacf-title { font-size: 20px; color: #4a72b2; margin: 0 0 15px; }

.pacf-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
}

.pacf-thumb {
    flex: 0 0 40%;
    max-width: 40%;
    scroll-snap-align: start;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    display: block;
}
.pacf-thumb img {
    width: 100%;
    aspect-ratio: 4 / 3;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform .2s ease;
}
.pacf-thumb:hover img,
.pacf-thumb:focus-visible img { transform: scale(1.03); }
.pacf-thumb:focus-visible { outline: 3px solid #4a72b2; outline-offset: 2px; }

@media (max-width: 640px) {
    .pacf-thumb { flex-basis: 72%; max-width: 72%; }
}

/* Lightbox */
body.pacf-lb-open { overflow: hidden; }
.pacf-lb[hidden] { display: none; }
.pacf-lb {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pacf-lb-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .92); }
.pacf-lb-figure { position: relative; z-index: 1; margin: 0; }
.pacf-lb-img { max-width: 92vw; max-height: 86vh; border-radius: 8px; display: block; }

.pacf-lb button {
    position: absolute;
    z-index: 2;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    border: 0;
    cursor: pointer;
    line-height: 1;
}
.pacf-lb-close {
    top: 16px; right: 20px;
    font-size: 30px;
    width: 48px; height: 48px;
    border-radius: 50%;
}
.pacf-lb-prev,
.pacf-lb-next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 26px;
    width: 52px; height: 52px;
    border-radius: 50%;
}
.pacf-lb-prev { left: 16px; }
.pacf-lb-next { right: 16px; }
.pacf-lb-counter {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: #fff;
    font-size: 14px;
    background: rgba(0, 0, 0, .45);
    padding: 4px 12px;
    border-radius: 12px;
}
@media (max-width: 640px) {
    .pacf-lb-prev, .pacf-lb-next { width: 44px; height: 44px; font-size: 22px; }
}
