.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: 1000;
    animation: fadeIn 0.3s;       
}

.popup-content {
    position: relative;
    margin: 5% auto;
    width: 90%;
    max-width: 800px;
    text-align: center;
    animation: zoomIn 0.3s;
}

.image-container {
    position: relative;    
    background: rgba(76,81,76,0.9);
    border-radius: 10px;
    display: inline-block; 
    max-width: 100%;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #666;
    font-size: 18px;
}

.popup-content img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    display: block;    
}

.close {
    position: absolute;
    top: 20px;
    right: 33px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    z-index: 1;
}

.close:hover {
    background: rgba(255,0,0,0.8);
}

@keyframes zoomIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomOut {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(0.5); opacity: 0; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@media (max-width: 768px) {
    .close {
        top: -40px;
        right: 10px;
    }
}

@media (max-width: 768px) {
    .close {
        top: unset; /* ⭐ Désactive top */
        bottom: 10px; /* ⭐ Active bottom */
        right: 10px;
				z-index: 1;
    }
}
