/* -------------------------------------- */
/*   SUPERPOSITION AFFICHE (IMAGE POPUP)  */
/* -------------------------------------- */
#affiche-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    padding: 20px;
    box-sizing: border-box;
}

#affiche-overlay.visible {
    opacity: 1;
    visibility: visible;
}

#affiche-overlay.fadeout {
    opacity: 0;
    visibility: hidden;
}

/* Conteneur pour l'image */
.affiche-container {
    position: relative;
    max-width: 95vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Style de l'image */
.affiche-container img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.9);
}

/* Bouton de fermeture */
.close-btn {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.close-btn:hover {
    background: #ff4444;
    color: #fff;
}

/* Responsive pour smartphones */
@media (max-width: 768px) {
    #affiche-overlay {
        padding: 10px;
    }

    .affiche-container {
        max-width: 98vw;
        max-height: 85vh;
    }

    .affiche-container img {
        max-height: 75vh;
    }

    .close-btn {
        top: -10px;
        right: -10px;
        width: 30px;
        height: 30px;
        font-size: 18px;
    }
}

/* Pour les très petits écrans */
@media (max-width: 480px) {
    .affiche-container {
        max-height: 80vh;
    }

    .affiche-container img {
        max-height: 70vh;
    }

    .close-btn {
        top: -8px;
        right: -8px;
        width: 26px;
        height: 26px;
        font-size: 16px;
    }
}

