/* ========================================
   LIGHTBOX AMÉLIORÉ POUR GALERIES
   Style moderne avec navigation
======================================== */

.enhanced-lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s;
}

.enhanced-lightbox-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.enhanced-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.enhanced-lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: lightboxZoom 0.3s ease-out;
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Bouton de fermeture */
.enhanced-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(227, 6, 19, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10001;
}

.enhanced-lightbox-close:hover {
    background: #E30613;
    transform: rotate(90deg) scale(1.1);
}

/* Navigation */
.enhanced-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 10001;
}

.enhanced-lightbox-nav:hover {
    background: rgba(227, 6, 19, 0.9);
    border-color: #E30613;
    transform: translateY(-50%) scale(1.15);
}

.enhanced-lightbox-prev {
    left: 20px;
}

.enhanced-lightbox-next {
    right: 20px;
}

/* Légende */
.enhanced-lightbox-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: white;
    text-align: center;
}

.enhanced-lightbox-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Masquer le titre s'il est vide */
.enhanced-lightbox-title:empty,
.enhanced-lightbox-title[style*="display: none"] {
    display: none !important;
    margin: 0;
}

.enhanced-lightbox-description {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 0.5rem;
}

/* Masquer la description si elle est vide */
.enhanced-lightbox-description:empty,
.enhanced-lightbox-description[style*="display: none"] {
    display: none !important;
    margin: 0;
}

.enhanced-lightbox-counter {
    font-size: 0.85rem;
    opacity: 0.7;
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .enhanced-lightbox-content {
        max-width: 95%;
        max-height: 95%;
    }
    
    .enhanced-lightbox-image {
        max-height: 75vh;
    }
    
    .enhanced-lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .enhanced-lightbox-nav {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
    
    .enhanced-lightbox-prev {
        left: 10px;
    }
    
    .enhanced-lightbox-next {
        right: 10px;
    }
    
    .enhanced-lightbox-caption {
        padding: 1.5rem 1rem;
    }
    
    .enhanced-lightbox-title {
        font-size: 1.1rem;
    }
    
    .enhanced-lightbox-description {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .enhanced-lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .enhanced-lightbox-caption {
        padding: 1rem 0.75rem;
    }
    
    .enhanced-lightbox-title {
        font-size: 1rem;
    }
    
    .enhanced-lightbox-description {
        font-size: 0.85rem;
    }
    
    .enhanced-lightbox-counter {
        font-size: 0.75rem;
    }
}

