/* Styles pour la modale */
.custom-modal {
    display: none;
    position: fixed !important;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 0;
    width: 100%;
    max-width: 1400px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-images {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 60px 20px 20px 20px;
    width: 100%;
    max-width: 100%;
    overflow-x: visible;
    overflow-y: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.modal-images::-webkit-scrollbar {
    display: none;
}

.modal-image {
    height: auto;
    width: 100%;
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    flex-shrink: 0;
}

.close {
    position: fixed;
    right: 25px;
    top: 10px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100000;
}

.close:hover,
.close:focus {
    color: #999;
    text-decoration: none;
    cursor: pointer;
}

/* Style pour l'image déclencheur */
.gallery-trigger {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.gallery-trigger:hover {
    opacity: 0.8;
}

/* Responsive pour mobile */
@media (max-width: 768px) {
    .modal-images {
        padding: 60px 10px 20px 10px;
        gap: 20px;
    }
    
    .modal-image {
        max-height: 70vh;
    }
    
    .close {
        right: 15px;
        top: 10px;
        font-size: 35px;
    }
}

