/* ========================================
   LAZY LOADING OPTIMIZATIONS
   ======================================== */

/* Skeleton/Placeholder pour images en chargement */
.lazy-image {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.lazy-image[loading="lazy"]:not([src]) {
    min-height: 200px;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Image chargée - transition smooth */
.lazy-image.loaded {
    animation: fadeIn 0.3s ease-in;
}

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

/* Optimisation pour les cards */
.lazy-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.lazy-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Performance: désactiver animations si reduce-motion */
@media (prefers-reduced-motion: reduce) {
    .lazy-image,
    .lazy-section {
        animation: none !important;
        transition: none !important;
    }
}

/* Optimisation carrousel */
.carousel-optimized {
    will-change: transform;
    contain: layout style paint;
}

/* Optimisation images hors viewport */
img[loading="lazy"] {
    content-visibility: auto;
}

/* Placeholder spécifique pour avatars circulaires */
.lazy-avatar {
    background: radial-gradient(circle, #f0f0f0 0%, #e0e0e0 100%);
}

/* Placeholder pour images casting */
.lazy-casting {
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
}

/* Amélioration performance scroll */
.scroll-optimized {
    overflow-anchor: none;
    -webkit-overflow-scrolling: touch;
}
