.diapo-container {
    max-width: 900px;
    margin: 40px auto;
    position: relative;
}

.diapo-frame {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.diapo-slide {
    display: none;
    position: relative;
}

.diapo-slide.active {
    display: block;
}

.diapo-slide img {
    width: 100%;
    height: 550px;
    object-fit: cover;
    display: block;
}

/* CAPTION */
.diapo-caption {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0,0,0,0.55);
    color: white;
    padding: 15px;
    display: flex;
    flex-direction: column;
    font-size: 14px;
    text-align: center;
    margin-top: 10px;
}

/* FULLSCREEN */
.diapo-frame.fullscreen .diapo-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);

    color: white;
    background: rgba(0,0,0,0.5);
    padding: 10px 15px;
    border-radius: 10px;

    text-align: center;
    max-width: 90%;
}


/* BOUTONS */

.diapo-prev:hover,
.diapo-next:hover {
    background: rgba(0,0,0,0.8);
}



/* RESPONSIVE */
@media (max-width: 768px) {
    .diapo-slide img {
        height: 350px;
    }
}


/* FULLSCREEN CONTENEUR */
.diapo-frame.fullscreen {
    position: fixed;
    inset: 0;
    background: black;
    z-index: 9999;
}

/* SLIDE ACTIVE PREND TOUT */
.diapo-frame.fullscreen .diapo-slide {
    display: none;
    width: 100%;
    height: 100%;
}

.diapo-frame.fullscreen .diapo-slide.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* IMAGE PLEIN ÉCRAN */
.diapo-frame.fullscreen .diapo-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: zoom-out;
}

/* IMAGE NORMALE */
.diapo-slide img {
    cursor: zoom-in;
}

.diapo-frame {
    transition: none;
}

.audio-btn {
    position: fixed;   /* 🔥 important */
    bottom: 20px;
    left: 20px;
    z-index: 9999;     /* 🔥 au-dessus de tout */
    
    font-size: 28px;
    background: rgba(0,0,0,0.6);
    border: none;
    color: white;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
}

.audio-btn:hover {
    background: rgba(0,0,0,0.8);
    transform: scale(1.1);
}

.diapo-frame.fullscreen ~ .audio-btn {
    bottom: 30px;
    left: 30px;
    font-size: 32px;
}

.diapo-media {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.diapo-frame.fullscreen .diapo-media {
    width: 100vw;
    height: 100vh;
}

.diapo-folio {
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 10000;   /* 🔥 AU-DESSUS DU FULLSCREEN */

    color: white;
    font-size: 14px;
    font-weight: 600;

    background: rgba(0,0,0,0.6);  /* 🔥 plus visible */
    padding: 6px 10px;
    border-radius: 8px;

    pointer-events: none;
}

.diapo-frame.fullscreen .diapo-folio {
    position: fixed;   /* 🔥 clé du problème */
    top: 20px;
    right: 25px;
}

.diapo-container {
    position: relative;
}

.diapo-prev,
.diapo-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3000;
    font-size: 32px;
    color: white;
    background: rgba(0,0,0,0.25);
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
}

.diapo-prev { left: 10px; }
.diapo-next { right: 10px; }

.fullscreen .diapo-prev,
.fullscreen .diapo-next {
    position: fixed;   /* 🔥 uniquement en zoom */
}

.diapo-media {
    width: 100%;
    height: 100%;
    object-fit: cover; /* ou contain selon ton besoin */
}

.diapo-slide .video-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    color: white;
    text-shadow: 0 0 6px black;
    pointer-events: none;
}



.diapo-slide .editToggle {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 1000;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
}

.firework {
    position: absolute;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    animation: explode 1s ease-out forwards;
}

@keyframes explode {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(8) translate(var(--x), var(--y));
        opacity: 0;
    }
}


#fireworksCanvas {
    position: fixed;      /* sort du flux */
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;          /* derrière TOUT */
    pointer-events: none; /* ne bloque pas les clics */
}

.diapo-container {
    position: relative;
    z-index: 1;           /* devant */
}
