/* =============================================
   IMAGES STYLES
   ============================================= */

/* Hero avec image de fond */
.hero-with-image {
    position: relative;
    overflow: hidden;
    min-height: 500px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.5;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-with-image .container {
    position: relative;
    z-index: 1;
}

/* Presentation Image */
.presentation-grid {
    grid-template-columns: 1fr 1fr;
}

.presentation-image {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg);
}

.presentation-image img {
    max-width: 100%;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

/* Credentials List - après l'image */
.credentials-list {
    grid-column: 1 / -1;
    margin-top: var(--spacing-lg);
}

/* Card Images dans expertise */
.card-image {
    width: 100%;
    height: 200px;
    margin-bottom: var(--spacing-md);
    background: var(--color-bg-lighter);
    border-radius: 2px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.expertise-card:hover .card-image img {
    transform: scale(1.05);
}

/* Remove old icon styles when using images */
.expertise-card .card-image + .expertise-icon {
    display: none;
}

/* Images dans les autres pages */
.page-image {
    width: 100%;
    max-width: 600px;
    margin: 0 auto var(--spacing-lg);
    border-radius: 2px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.page-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Gallery Grid (pour futures photos) */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 2px;
    aspect-ratio: 4/3;
    background: var(--color-bg-light);
}

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

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    padding: var(--spacing-md);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

/* Cabinet Images */
.cabinet-image {
    width: 100%;
    height: 300px;
    background: var(--color-bg-light);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: var(--spacing-md);
}

.cabinet-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Treatment Card Images */
.treatment-image {
    width: 100%;
    height: 180px;
    background: var(--color-bg-lighter);
    border-radius: 2px 2px 0 0;
    overflow: hidden;
}

.treatment-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive Images */
@media (max-width: 768px) {
    .presentation-grid {
        grid-template-columns: 1fr;
    }
    
    .presentation-image {
        order: -1;
        padding: var(--spacing-md);
    }
    
    .card-image {
        height: 160px;
    }
    
    .hero-with-image {
        min-height: 400px;
    }
    
    .cabinet-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .card-image {
        height: 140px;
    }
    
    .treatment-image {
        height: 140px;
    }
}

/* Image Lazy Loading Animation */
img {
    opacity: 0;
    animation: fadeIn 0.5s ease-in forwards;
}

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

/* Placeholder pour images en chargement */
.img-placeholder {
    background: linear-gradient(
        90deg,
        var(--color-bg-light) 0%,
        var(--color-bg-lighter) 50%,
        var(--color-bg-light) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

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