.popup {
    padding: 0px;
    margin: 0px;
    line-height: 0;
    width: 100%;
    height: auto;
    display: block;
    position: static;
    cursor: pointer;
    opacity: 1;
}

.popup img {
    max-width: 100%;
    height: auto;
    display: inline;
}

.popup_rect {
    max-width: 500px;
    height: auto;
    margin: 0px auto;
    position: relative;
    background-color: transparent;
    box-shadow: rgba(0, 0, 0, 0.3) 4px 4px 30px;
    pointer-events: all;
    transition: 0.3s ease-in-out;
}

.popup_container {
    position: relative;
    display: flex;
    height: 100%;
    background: transparent;
    pointer-events: none;
    padding: 0px;
    -webkit-box-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    align-items: center;
}

#popup_overlay {
    z-index: 999999;
    position: fixed;
    inset: 0px;
    background: rgba(0, 0, 0, 0.3);
    opacity: 1;
    display: none; /* Désactive l'apparition du pop up de base (paramétrer l'apparition via js) */
    margin-right: 0px;
    pointer-events: auto;
}

.popup_wrapper {
    position: relative;
    max-width: 100%;
    margin: 0px;
    padding: 0px;
    line-height: 0;
}

/* La croix est un <button> depuis la 1.1.0 (accessibilité clavier) : on neutralise
   le style natif du bouton pour conserver l'apparence des versions précédentes. */
#close_cross {
    -webkit-appearance: none;
    appearance: none;
    border: 0;
    margin: 0;
    font: inherit;
    color: inherit;
    line-height: 0;
    position: absolute;
    inset: 0px 0px auto auto;
    width: 30px;
    height: 30px;
    border-radius: 20px;
    padding: 3px;
    box-shadow: rgba(0, 0, 0, 0.3) 2px 2px 5px;
    opacity: 1;
    display: flex;
    transform: translate(50%, -50%);
    place-content: center;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: center;
    cursor: pointer;
    background: rgb(252, 252, 252);
    pointer-events: all;
}

/* Focus visible au clavier, sans altérer l'apparence à la souris */
#close_cross:focus-visible {
    outline: 2px solid rgb(0, 0, 0);
    outline-offset: 2px;
}

/* Lien optionnel autour de l'image : évite l'espace résiduel sous l'image inline */
.popup_link {
    display: block;
    line-height: 0;
}

.cross_svg {
    color: rgb(0, 0, 0);
    width: 75%;
    height: 75%;
    max-width: 100%;
    max-height: 100%;
    inset: 0px;
    margin: auto;
    opacity: 1;
    transition: opacity 0.2s ease-in-out;
    pointer-events: all;
    display: block;
}

@media (max-width: 767px){
    #close_cross {
        inset: 20px 20px auto auto;
        width: 40px;
        height: 40px;
        border-radius: 0 0 0 20px;
    }
}