/*
===========================================
MAISONS CTL - STYLES SECTION GALLERY V1.0
Fichier: /public_html/css/components/gallery.css
Description: Styles spécifiques à la section Réalisations (galerie).
             Gère la grille de photos, les overlays avec informations,
             et les animations au survol.
Version: 1.0 - Galerie responsive avec overlays
Date: Janvier 2025
===========================================
*/

/* ====== SECTION RÉALISATIONS ====== */
#realisations {
    padding-top: 120px;
    padding-bottom: 80px;
}

/* ====== GRILLE DE GALERIE ====== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* ====== ITEM DE GALERIE ====== */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-ease);
    height: 230px;
    background: var(--color-grey-light);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

/* ====== IMAGE DE GALERIE ====== */
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all var(--transition-speed) var(--transition-ease);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* ====== OVERLAY DE GALERIE ====== */
.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 30px 20px 20px;
    transform: translateY(100px);
    transition: all var(--transition-speed) var(--transition-ease);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* ====== CONTENU OVERLAY ====== */
.gallery-overlay h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: white;
    font-weight: 600;
}

.gallery-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
    color: white;
    margin: 0;
}

/* ====== CTA DE LA GALERIE ====== */
.gallery-cta {
    text-align: center;
    margin-top: 40px;
}

/* ====== ÉTAT ERREUR IMAGE ====== */
.gallery-item.image-error {
    background-color: var(--color-grey-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item.image-error::before {
    content: '\f03e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 3rem;
    color: var(--color-grey);
    opacity: 0.3;
}

.gallery-item.image-error img {
    display: none;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    #realisations {
        padding-top: 80px;
        padding-bottom: 60px;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
    }
    
    .gallery-item {
        height: 200px;
    }
    
    /* Sur mobile, overlay toujours visible */
    .gallery-overlay {
        transform: translateY(0);
        background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.4));
        padding: 20px 15px 15px;
    }
    
    .gallery-overlay h3 {
        font-size: 1.1rem;
        margin-bottom: 3px;
    }
    
    .gallery-overlay p {
        font-size: 0.85rem;
    }
    
    .gallery-cta {
        margin-top: 30px;
    }
}

@media (max-width: 480px) {
    .gallery-item {
        height: 180px;
    }
    
    .gallery-item:hover {
        transform: translateY(-3px);
    }
}