/**
 * Styles pour le modal d'affichage des photos d'animaux en grand
 */

/* ===== MODAL DE PHOTO SIMPLIFIÉ ===== */
.photo-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.photo-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-modal-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    background: transparent;
    border-radius: 10px;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
}

.photo-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.photo-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.photo-modal-body {
    padding: 0;
    position: relative;
}

.photo-modal-image {
    width: 100%;
    height: auto;
    max-height: 95vh;
    object-fit: contain;
    display: block;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.photo-modal-placeholder {
    width: 100%;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    border-radius: 10px;
}

.photo-modal-placeholder i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.5);
}

/* ===== PHOTOS CLIQUABLES ===== */
.animal-photo-clickable {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.animal-photo-clickable:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.animal-photo-clickable::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.animal-photo-clickable:hover::after {
    opacity: 1;
}

.animal-photo-clickable::before {
    content: '\f065';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.animal-photo-clickable:hover::before {
    opacity: 1;
}

.animal-photo-clickable img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.animal-photo-clickable:hover img {
    transform: scale(1.05);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: scale(0.8) translateY(-50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .photo-modal-content {
        max-width: 95vw;
        max-height: 95vh;
        margin: 20px;
    }
    
    .photo-modal-header {
        padding: 15px 20px;
    }
    
    .photo-modal-title {
        font-size: 1.3rem;
    }
    
    .photo-modal-close {
        font-size: 1.5rem;
        width: 35px;
        height: 35px;
    }
    
    .photo-modal-image {
        max-height: 60vh;
    }
    
    .photo-modal-placeholder {
        height: 300px;
    }
    
    .photo-modal-footer {
        padding: 15px 20px;
        flex-direction: column;
        align-items: stretch;
    }
    
    .photo-modal-actions {
        justify-content: center;
    }
    
    .photo-modal-btn {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .photo-modal-content {
        margin: 10px;
        border-radius: 10px;
    }
    
    .photo-modal-header {
        padding: 12px 15px;
    }
    
    .photo-modal-title {
        font-size: 1.1rem;
    }
    
    .photo-modal-image {
        max-height: 50vh;
    }
    
    .photo-modal-placeholder {
        height: 250px;
    }
    
    .photo-modal-placeholder i {
        font-size: 3rem;
    }
    
    .photo-modal-footer {
        padding: 12px 15px;
    }
}

/* ===== TOUCH OPTIMIZATION ===== */
.photo-modal-close,
.photo-modal-btn {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
}

.photo-modal-close:active,
.photo-modal-btn:active {
    transform: scale(0.95);
}

.animal-photo-clickable {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.animal-photo-clickable:active {
    transform: scale(0.98);
}
