/**
 * Zoom photo "maison" pour la galerie (remplace prettyPhoto, peu fiable sur iOS récent).
 * Boutons précédent/suivant/fermer volontairement grands (44px min) pour rester
 * faciles à toucher sur mobile, identiques sur desktop.
 */

#photo-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#photo-lightbox[hidden] {
    display: none;
}

#photo-lightbox .photo-lightbox-content {
    max-width: 92%;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#photo-lightbox .photo-lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    display: block;
}

#photo-lightbox button {
    position: fixed;
    width: 44px;
    height: 44px;
    line-height: 44px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 20px;
    text-align: center;
    cursor: pointer;
    z-index: 1000000;
}

#photo-lightbox button:disabled {
    display: none;
}

#photo-lightbox .photo-lightbox-close {
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
}

#photo-lightbox .photo-lightbox-prev,
#photo-lightbox .photo-lightbox-next {
    top: 50%;
    margin-top: -22px;
    font-size: 24px;
}

#photo-lightbox .photo-lightbox-prev {
    left: max(12px, env(safe-area-inset-left));
}

#photo-lightbox .photo-lightbox-next {
    right: max(12px, env(safe-area-inset-right));
}

#photo-lightbox .photo-lightbox-counter {
    position: fixed;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 12px;
    border-radius: 12px;
    z-index: 1000000;
}
