/* Lightbox réutilisable */

.project-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-loading{
    display: none !important;
}

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

.lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 25px 50px rgba(255, 205, 224, 0.5);
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.project-lightbox.active .lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #FFCDE0;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Lora', serif;
    z-index: 10000;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 205, 224, 0.1);
    border: 2px solid rgba(255, 205, 224, 0.3);
    backdrop-filter: blur(10px);
}

.lightbox-close:hover {
    color: #ffffff;
    background: rgba(255, 205, 224, 0.2);
    border-color: rgba(255, 205, 224, 0.5);
    transform: scale(1.1);
    text-shadow: 0 0 20px rgba(255, 205, 224, 0.8);
}


.lightbox-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 205, 224, 0.1);
    color: #FFCDE0;
    border: 2px solid rgba(255, 205, 224, 0.3);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    font-family: 'Lora', serif;
}

.lightbox-navigation:hover {
    background: rgba(255, 205, 224, 0.2);
    border-color: rgba(255, 205, 224, 0.5);
    color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #FFCDE0;
    font-size: 1.2rem;
    font-family: 'Lora', serif;
}

/* Animation de chargement */
.lightbox-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 205, 224, 0.3);
    border-top: 4px solid #FFCDE0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media screen and (max-width: 768px) {
    .lightbox-close {
        top: 15px;
        right: 15px;
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
    
    .lightbox-navigation {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .lightbox-prev {
        left: 15px;
    }
    
    .lightbox-next {
        right: 15px;
    }
    
    .lightbox-caption {
        bottom: 20px;
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        max-width: 90%;
    }
    
    .lightbox-content {
        max-width: 95%;
        max-height: 85%;
    }
}

@media screen and (max-width: 480px) {
    .lightbox-close {
        top: 10px;
        right: 10px;
        font-size: 24px;
        width: 35px;
        height: 35px;
    }
    
    .lightbox-navigation {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-caption {
        bottom: 15px;
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
        border-radius: 15px;
    }
}