/* Images agrandissables (lightbox partagée) */

.enlargeable-image {
    cursor: zoom-in;
}

.enlargeable-image:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.75);
    outline-offset: 3px;
}

body.enlargeable-image-open {
    overflow: hidden;
}

.enlargeable-image-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(4px);
}

.enlargeable-image-overlay[hidden] {
    display: none;
}

.enlargeable-image-frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(95vw, 1400px);
    height: 90vh;
    margin: 0;
}

.enlargeable-image-full {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

.enlargeable-image-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.enlargeable-image-close:hover,
.enlargeable-image-close:focus-visible {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    outline: none;
}

@media (max-width: 768px) {
    .enlargeable-image-overlay {
        padding: 16px;
    }

    .enlargeable-image-close {
        top: 6px;
        right: 6px;
        width: 32px;
        height: 32px;
        font-size: 1.25rem;
    }
}
