@charset "utf-8";

/* Variables héritées */
:root {
    --primary-color: #000;
    --secondary-color: #c52f28;
    --accent-color: #3498DB;
    --text-dark: #000;
    --text-light: #7F8C8D;
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --shadow: 0 4px 20px rgba(44, 62, 80, 0.1);
    --shadow-hover: 0 8px 30px rgba(44, 62, 80, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    text-align: justify;
    hyphens: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Boutons */
.btn-primary, .btn-secondary {
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #c52f28, #8B1538);
    color: white;
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* Breadcrumb */
.breadcrumb {
    background: var(--bg-light);
    padding: 1rem 0;
}

.breadcrumb ol {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.breadcrumb ol li {
    color: var(--text-light);
}

.breadcrumb ol li:not(:last-child)::after {
    content: ">";
    margin-left: 0.5rem;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--secondary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

/* Hero Réalisations */
.hero-realisations {
    padding: 4rem 0;
    background: var(--bg-light);
    text-align: center;
}

.hero-realisations h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
    text-align: justify;
    hyphens: auto;
    text-align-last: center;
    word-spacing: normal;
    letter-spacing: normal;
}

/* Filtres */
.filtres {
    padding: 3rem 0;
    background: var(--bg-white);
}

.filtres h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.filtres-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.filtre-btn {
    padding: 0.8rem 1.5rem;
    background: var(--bg-light);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
}

.filtre-btn:hover,
.filtre-btn.active {
    background: linear-gradient(135deg, #c52f28, #8B1538);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Galerie */
.galerie {
    padding: 5rem 0;
    background: var(--bg-light);
}

.realisations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    max-width: 1200px;
    margin: 0 auto 3rem;
    gap: 2rem;
}

.realisation-card {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    max-width: 400px;
    width: 100%;
}

.realisation-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content img {
    max-width: calc(100vw - 200px);
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
}

.modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--secondary-color);
}

.modal-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2001;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-nav img {
    width: 40px;
    height: 40px;
    filter: brightness(0) invert(1);
    transition: var(--transition);
}

.modal-nav:hover {
    transform: translateY(-50%) scale(1.1);
}

.modal-nav:hover img {
    filter: brightness(0) saturate(100%) invert(35%) sepia(91%) saturate(1583%) hue-rotate(354deg) brightness(101%) contrast(99%);
}

.modal-prev {
    left: 50px;
}

.modal-next {
    right: 50px;
}

.modal-info {
    position: absolute;
    bottom: -60px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
}

.modal-info h3 {
    font-size: 1.5rem;
    margin: 0;
}

.card-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(44, 62, 80, 0.9) 100%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: var(--transition);
}

.realisation-card:hover .card-overlay {
    opacity: 1;
}

.card-info {
    color: white;
}

.card-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.card-info p {
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.4;
    text-align: justify;
    hyphens: auto;
    text-align-last: left;
    word-spacing: normal;
    letter-spacing: normal;
}

.no-results {
    text-align: center;
    padding: 3rem;
    grid-column: 1 / -1;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.no-results p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin: 0;
    font-style: italic;
}

/* CTA Réalisations */
.cta-realisations {
    padding: 5rem 0;
    background: var(--bg-white);
    text-align: center;
}

.cta-realisations h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.cta-realisations p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-align: justify;
    hyphens: auto;
    text-align-last: center;
    word-spacing: normal;
    letter-spacing: normal;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-realisations h1 {
        font-size: 2rem;
    }
    
    .filtres h2 {
        font-size: 1.8rem;
    }
    
    .filtres-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .filtre-btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    .realisations-grid {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    
    .cta-realisations h2 {
        font-size: 1.8rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .hero-realisations h1 {
        font-size: 1.8rem;
    }
    
    .card-overlay {
        opacity: 1;
        background: linear-gradient(to bottom, transparent 0%, rgba(44, 62, 80, 0.8) 70%);
    }
    
    .card-info h3 {
        font-size: 1.1rem;
    }
    
    .card-info p {
        font-size: 0.85rem;
        text-align: left;
    }
    
    .hero-subtitle,
    .cta-realisations p {
        text-align: left;
    }
    
    /* Modal responsive */
    .modal-content {
        max-width: 95vw;
        padding: 0 20px;
    }
    
    .modal-close {
        top: -40px;
        font-size: 2rem;
    }
    
    .modal-nav {
        width: 50px;
        height: 50px;
    }
    
    .modal-nav img {
        width: 35px;
        height: 35px;
    }
    
    .modal-content img {
        max-width: calc(100vw - 140px);
    }
    
    .modal-prev {
        left: 30px;
    }
    
    .modal-next {
        right: 30px;
    }
    
    .modal-info {
        bottom: -50px;
    }
    
    .modal-info h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 320px) {
    .modal-content img {
        max-width: calc(100vw - 120px);
    }
    
    .modal-prev {
        left: 20px;
    }
    
    .modal-next {
        right: 20px;
    }
    
    .modal-nav img {
        width: 30px;
        height: 30px;
    }
}