/* Message fallback si aucune image */
.jbphb-hero-container.jbphb-no-image {
    background-color: #eee;
    color: #555;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-family: system-ui, sans-serif;
    text-align: center;
    padding: 1rem;
}

/* Conteneur principal du hero */
.jbphb-hero-container {
    overflow: hidden;
    position: absolute;
    inset: 0;
    background-color: #000; /* Fallback en cas de chargement lent */
}

/* Slides (images) */
.jbphb-hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    z-index: 0;
    transition: opacity 800ms ease-in-out;
    pointer-events: none;
    user-select: none;
}

.jbphb-hero-slide {
    animation: jbphb-scale-up 2800ms ease-in-out forwards;
}

/* Slide en cours de transition */
.jbphb-hero-slide.jbphb-next {
    opacity: 0;
}

/* Slide active visible */
.jbphb-hero-slide.jbphb-active {
    opacity: 1;
    z-index: 1;
}

@keyframes jbphb-scale-up {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.05);
    }
}

/* Boutons de navigation */
.jbphb-nav {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: none;
    font-size: 2rem;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease;
    border-radius: 0.3rem;
    line-height: 1;
    user-select: none;
}

/* Flèches gauche/droite */
.jbphb-prev {
    left: 10px;
}
.jbphb-next {
    right: 10px;
}

/* Masquer les flèches s’il y a moins de 2 images */
.jbphb-nav.hidden {
    display: none;
}

/* Hover effet */
.jbphb-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}

/* Amélioration accessibilité mobile : éviter le tap-through */
.jbphb-nav:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Responsiveness en option (si besoin) */
@media (max-width: 768px) {
    .jbphb-nav {
        font-size: 1.5rem;
        padding: 0.4rem 1rem;
    }
}
