/**
 * photo-viewer.css - Styles pour le visualiseur de photos
 */

.photo-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.photo-viewer-modal.active {
    opacity: 1;
}

.photo-viewer-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.photo-viewer-image-container {
    max-width: 90%;
    max-height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#photo-viewer-image {
    max-width: 100%;
    max-height: calc(100vh - 100px);
    object-fit: contain;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.photo-viewer-close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 35px;
    color: white;
    cursor: pointer;
    background: transparent;
    border: none;
    opacity: 0.8;
    transition: opacity 0.2s;
    z-index: 10001;
}

.photo-viewer-close:hover {
    opacity: 1;
}

.photo-viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 35px;
    font-weight: bold;
    color: white;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s, background-color 0.2s;
}

.photo-viewer-nav:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.8);
}

.photo-viewer-prev {
    left: 20px;
}

.photo-viewer-next {
    right: 20px;
}

.photo-viewer-counter {
    position: absolute;
    bottom: 20px;
    color: white;
    font-size: 16px;
    padding: 5px 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
}

/* Animation pour le chargement des images */
@keyframes photoFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#photo-viewer-image {
    animation: photoFadeIn 0.3s ease;
}

/* Styles pour les images dans les posts */
.post-image {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.post-image:hover {
    transform: scale(1.02);
}

/* Responsive */
@media (max-width: 768px) {
    .photo-viewer-nav {
        font-size: 24px;
        width: 40px;
        height: 40px;
    }
    
    .photo-viewer-close {
        font-size: 30px;
        top: 15px;
        right: 15px;
    }
}
