/* Modal des photos */
.photo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.photo-modal-content {
    position: relative;
    max-width: 80%;
    max-height: 80%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.photo-modal-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.photo-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.photo-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.photo-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.photo-modal-prev,
.photo-modal-next {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    pointer-events: auto;
    margin: 0 20px;
}

.photo-modal-prev:hover,
.photo-modal-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Animation d'entrée */
.photo-modal {
    animation: fadeIn 0.3s ease;
}

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

/* Responsive */
@media (max-width: 768px) {
    .photo-modal-content {
        max-width: 85%;
        max-height: 85%;
    }
    
    .photo-modal-close {
        top: -40px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    .photo-modal-prev,
    .photo-modal-next {
        width: 40px;
        height: 40px;
        font-size: 16px;
        margin: 0 10px;
    }
}

/* Amélioration de l'affichage des photos dans la grille */
.annonce-detail-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.annonce-detail-photo-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    aspect-ratio: 1;
}

.annonce-detail-photo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.annonce-detail-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.annonce-detail-photo-item:hover img {
    transform: scale(1.05);
}

/* Indicateur de clic */
.annonce-detail-photo-item::after {
    content: '🔍';
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.annonce-detail-photo-item:hover::after {
    opacity: 1;
}
