/* Styles pour la fonctionnalité lightbox */

/* Indicateur visuel que l'élément est cliquable */
.lightbox-trigger {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.lightbox-trigger:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

/* Ajout d'une icône de zoom au survol */
.lightbox-trigger::after {
    content: '\f00e'; /* icône loupe Font Awesome */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

.lightbox-trigger:hover::after {
    opacity: 1;
}

/* Overlay de lightbox - couvre tout l'écran */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex !important;
    opacity: 1;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 30px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    outline: none;
    border: none;
    background: transparent;
    font-family: inherit;
    z-index: 10000;
}

.lightbox-close:hover {
    color: var(--primary-orange);
    transform: rotate(90deg);
}

.lightbox-caption {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    color: white;
    text-align: center;
    font-size: 16px;
    padding: 12px 15px;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 6px;
    backdrop-filter: blur(5px);
}

/* Adaptation mobile */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .lightbox-image {
        max-height: 80vh;
    }
    
    .lightbox-close {
        top: -30px;
        right: 0;
        font-size: 28px;
        width: 35px;
        height: 35px;
    }
    
    .lightbox-caption {
        font-size: 14px;
        bottom: -40px;
        padding: 10px 12px;
    }
    
    .lightbox-trigger::after {
        font-size: 20px;
    }
}

@media (max-width: 576px) {
    .lightbox-content {
        max-width: 98vw;
        max-height: 98vh;
    }
    
    .lightbox-image {
        max-height: 75vh;
    }
    
    .lightbox-close {
        top: -25px;
        right: 0;
        font-size: 26px;
        width: 30px;
        height: 30px;
    }
    
    .lightbox-caption {
        font-size: 12px;
        bottom: -35px;
        padding: 8px 10px;
    }
    
    .lightbox-trigger::after {
        font-size: 18px;
    }
}

/* Animation d'entrée */
@keyframes lightboxFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox.active .lightbox-image {
    animation: lightboxFadeIn 0.3s ease-out;
} 