#slideshow-app {
    position: relative;
    width: 100%;
    /*height: 40vh;*/
    aspect-ratio: 16 / 10;
    background: #111;
    display: flex;
    flex-direction: column;
    font-family: sans-serif;
    color: #fff;
}

#slideshow-app:fullscreen {
    height: 100vh;
    width: 100vw;
}

.slideshow-controls {
    padding: 10px;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.slideshow-viewport {
    position: relative;
    flex-grow: 1;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    background-color: #000; /* Assure un fond noir de base */
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out; /* Transition unique : fondu */
    object-fit: contain;
    background-color: #000; /* Évite qu'un fond vert/transparent ne transparaisse entre deux images */
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    border-radius: 4px;
    z-index: 20;
    max-width: 80%;
    text-align: center;
}

.filters label {
    margin-right: 10px;
    cursor: pointer;
}

/* Ajustement du conteneur pour positionner les flèches */
.slideshow-viewport {
    position: relative;
    flex-grow: 1;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer; /* Indique visuellement que l'image est cliquable (pause) */
}

/* Boutons de navigation (Précédent / Suivant) en superposition transparente */
.slide-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
    border: none;
    padding: 15px 20px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 30; /* Au-dessus des slides et de la légende */
    transition: background 0.3s ease;
    border-radius: 4px;
}

.slide-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.slide-prev {
    left: 15px;
}

.slide-next {
    right: 15px;
}

/* Indicateur visuel discret de pause (optionnel, apparaît au survol si en pause) */
.slideshow-viewport.is-paused::after {
    content: "PAUSE";
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 0, 0, 0.6);
    color: white;
    padding: 5px 10px;
    font-size: 0.8rem;
    border-radius: 3px;
    z-index: 30;
    pointer-events: none;
}
