/* =======================================================
   1. VARIABLES & RESET (CHARTE ROUGE SEN ARCHI)
======================================================== */
:root {
    --primary-dark: #0f172a;    /* Bleu nuit profond */
    --accent: #ce1126;          /* ROUGE DU LOGO */
    --accent-hover: #a30e1e;
    --white: #ffffff;
    --bg-light: #f8fafc;
    --text-main: #334155;
    --text-light: #64748b;
    --border-radius: 8px;
    --shadow-soft: 0 5px 20px rgba(0,0,0,0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--bg-light);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary-dark);
    font-weight: 700;
}

a { text-decoration: none; transition: 0.3s ease; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* UTILITAIRES */
.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.section-padding { padding: 40px 0; } /* MARGES RÉDUITES */

.highlight { color: var(--accent); }
.text-white { color: var(--white); }
.bg-light { background: var(--bg-light); }
.bg-dark { background: var(--primary-dark); }
.text-center { text-align: center; }

/* NAVBAR */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 5%; background: var(--white);
    position: sticky; top: 0; z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.navbar .logo { font-size: 1.3rem; font-weight: 700; color: var(--primary-dark); }
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a { font-weight: 600; color: var(--primary-dark); font-size: 0.9rem; text-transform: uppercase; }
.nav-links a:hover { color: var(--accent); }
.btn-nav { background: var(--primary-dark); color: var(--white) !important; padding: 8px 20px; border-radius: 30px; }
.btn-nav:hover { background: var(--accent); }
.burger { display: none; cursor: pointer; }
.burger div { width: 25px; height: 3px; background-color: var(--primary-dark); margin: 5px; transition: 0.3s; }

/* HERO (IMAGE CORRIGÉE) */
.hero {
    height: 70vh; min-height: 500px; position: relative;
    display: flex; align-items: center;
}
.hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
    z-index: 0;
}
.hero-overlay-bg {
    position: absolute; top:0; left:0; width:100%; height:100%;
    background: linear-gradient(rgba(255, 255, 255, 0.8), rgba(15, 23, 42, 0.6));
    z-index: 1;
}
.hero-content {
    position: relative; z-index: 2; color: white;
    width: 90%; max-width: 1200px; margin: 0 auto;
}
.hero h1 { font-size: 3rem; margin-bottom: 20px; line-height: 1.2; }
.hero p { font-size: 1.2rem; margin-bottom: 30px; max-width: 600px; opacity: 0.9; }
.btn-cta {
    background: var(--accent); color: var(--white); padding: 15px 35px;
    border-radius: 5px; font-weight: 700; display: inline-block;
}
.btn-cta:hover { background: var(--accent-hover); }

/* SECTIONS */
.section-title { text-align: center; font-size: 2rem; margin-bottom: 30px; }
.intro-text { text-align: center; margin-bottom: 30px; color: var(--text-light); }

/* CARTES */
.cards-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px;
}
.card {
    background: var(--white); padding: 25px; border-radius: 8px;
    box-shadow: var(--shadow-soft); transition: 0.3s; border-bottom: 3px solid transparent;
}
.card:hover { transform: translateY(-5px); border-bottom: 3px solid var(--accent); }
.card-img-top { width: 100%; height: 200px; object-fit: cover; border-radius: 5px; margin-bottom: 15px; }
.icon-box { font-size: 2rem; color: var(--accent); margin-bottom: 15px; }
.card-text { font-size: 0.95rem; color: var(--text-light); }

/* PORTFOLIO (CARROUSEL) */
.portfolio-wrapper { position: relative; display: flex; align-items: center; }
.portfolio-container {
    display: flex; gap: 20px; overflow-x: auto; scroll-behavior: smooth;
    padding: 10px 5px; scrollbar-width: none;
}
.portfolio-container::-webkit-scrollbar { display: none; }
.portfolio-item {
    min-width: 300px; height: 350px; position: relative;
    border-radius: 10px; overflow: hidden; cursor: pointer; flex-shrink: 0;
    box-shadow: var(--shadow-soft);
}
/* Lien cliquable sur toute l'image */
.portfolio-link { display: block; width: 100%; height: 100%; }
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.portfolio-item:hover img { transform: scale(1.1); }
.portfolio-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    padding: 20px; color: var(--white); 
    transform: translateY(100px); transition: 0.3s;
}
.portfolio-item:hover .portfolio-overlay { transform: translateY(0); }
.portfolio-overlay h4 { color: var(--white); margin: 0; font-size: 1.1rem; }
.portfolio-overlay p { color: var(--accent); font-weight: 600; font-size: 0.9rem; margin: 0; }

.scroll-btn {
    background: var(--primary-dark); color: var(--white); border: none;
    width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    position: absolute; z-index: 10;
}
.scroll-btn:hover { background: var(--accent); }
.scroll-left { left: -20px; }
.scroll-right { right: -20px; }

/* DARK CARDS (GÉOMATIQUE) */
.card-dark {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
    padding: 30px; border-radius: 8px; color: var(--white); transition: 0.3s;
}
.card-dark:hover { background: rgba(255,255,255,0.1); }
.card-dark h3 { color: var(--white); margin-bottom: 10px; }
.card-dark p { color: #cbd5e1; font-size: 0.95rem; }
.icon-big { font-size: 2.5rem; color: var(--accent); margin-bottom: 15px; display: block; }
.btn-outline {
    background: transparent; border: 2px solid var(--accent); color: var(--accent);
    padding: 8px 20px; border-radius: 5px; cursor: pointer; margin-top: 15px; font-weight: 600;
}
.btn-outline:hover { background: var(--accent); color: var(--white); }

/* DATA STORE & TÉMOIGNAGES */
.store-container { display: flex; gap: 40px; align-items: center; }
.store-text { flex: 1; }
.store-image { flex: 1; }
.store-real-img { border-radius: 10px; box-shadow: var(--shadow-soft); }

.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.testimonial-card {
    background: var(--white); padding: 30px; border-radius: 10px;
    box-shadow: var(--shadow-soft); border: 1px solid #eee;
}
.quote-icon { font-size: 2rem; color: var(--accent); opacity: 0.2; float: right; }
.client-name { color: var(--primary-dark); font-weight: 700; margin-top: 15px; display: block; }
.client-role { font-size: 0.85rem; color: var(--text-light); font-style: italic; }

/* CONTACT (AVEC CARTE) */
.contact-wrapper { display: flex; gap: 40px; align-items: stretch; }
.contact-map { flex: 1; min-height: 400px; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-soft); }
.contact-form-container { flex: 1; background: var(--white); padding: 30px; border-radius: 10px; box-shadow: var(--shadow-soft); }
.contact-form { display: flex; flex-direction: column; gap: 15px; }
.contact-form input, .contact-form select, .contact-form textarea {
    padding: 15px; border: 1px solid #cbd5e1; border-radius: 5px; font-family: inherit;
}
.alert-success { background: #dcfce7; color: #166534; padding: 15px; text-align: center; border-radius: 5px; margin-bottom: 20px; }

/* FOOTER */
footer { background: #0b1120; color: #94a3b8; padding: 50px 0 20px; font-size: 0.95rem; }
.footer-container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; margin-bottom: 30px; }
.footer-col h4 { color: var(--white); margin-bottom: 20px; }
.footer-contact li { margin-bottom: 10px; display: flex; align-items: flex-start; gap: 10px; }
.footer-contact i { color: var(--accent); margin-top: 5px; }
.socials a { color: var(--white); font-size: 1.4rem; margin-right: 15px; }
.socials a:hover { color: var(--accent); }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); }

/* MODALES (POSITION FIXE CENTRÉE) */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8); z-index: 9998;
    display: none; backdrop-filter: blur(5px);
}
.modal-overlay.active { display: block; }

.modal {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: var(--white); width: 90%; max-width: 600px; padding: 40px;
    border-radius: 15px; z-index: 9999; display: none;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5); max-height: 90vh; overflow-y: auto;
    border: 1px solid var(--accent);
}
.modal.active { display: block; animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

.close-modal {
    position: absolute; top: 15px; right: 20px; background: transparent;
    border: none; font-size: 2rem; color: var(--text-light); cursor: pointer;
}
.close-modal:hover { color: var(--accent); }
.modal h3 { color: var(--accent); margin-bottom: 20px; border-bottom: 2px solid #f1f1f1; padding-bottom: 10px; }
.modal h4 { color: var(--primary-dark); margin-top: 20px; font-size: 1.1rem; }
.modal p { font-size: 0.95rem; color: #555; margin-bottom: 10px; }
.modal hr { border: 0; border-top: 1px solid #eee; margin: 15px 0; }

@keyframes popIn { from { opacity: 0; transform: translate(-50%, -45%) scale(0.9); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav-links {
        position: absolute; right: 0; top: 70px; background: var(--white);
        flex-direction: column; width: 100%; padding: 30px;
        transform: translateX(100%); transition: 0.3s;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }
    .nav-links.nav-active { transform: translateX(0%); }
    .burger { display: block; }
    .hero h1 { font-size: 2.2rem; }
    .store-container, .footer-container, .contact-wrapper { flex-direction: column; }
    .contact-map { height: 300px; }
    .scroll-btn { display: none; }
}
/* ... (Le début du CSS reste identique jusqu'à la section HERO) ... */

/* --- NOUVEAU STYLE : SECTION À PROPOS --- */
.about-container {
    display: flex; gap: 50px; align-items: center;
}
.about-image {
    flex: 1; position: relative;
}
.about-image img {
    border-radius: 10px; box-shadow: var(--shadow-hover);
}
.experience-badge {
    position: absolute; bottom: -20px; left: -20px;
    background: var(--accent); color: var(--white);
    padding: 20px 30px; border-radius: 10px;
    text-align: center; box-shadow: 0 10px 20px rgba(206, 17, 38, 0.3);
}
.experience-badge .years {
    display: block; font-size: 2.5rem; font-weight: 800; line-height: 1;
}
.experience-badge .text { font-size: 0.9rem; }

.about-text { flex: 1; }
.small-title {
    color: var(--accent); font-weight: 700; letter-spacing: 2px;
    font-size: 0.9rem; margin-bottom: 10px;
}
.section-title-left {
    font-size: 2.5rem; margin-bottom: 20px; line-height: 1.2;
}
.about-text p { margin-bottom: 20px; color: var(--text-light); }

.about-stats {
    display: flex; gap: 30px; margin: 30px 0; border-top: 1px solid #eee; padding-top: 20px;
}
.stat-item { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--primary-dark); }
.stat-item i { color: var(--accent); font-size: 1.2rem; }

.btn-outline-red {
    border: 2px solid var(--accent); color: var(--accent);
    padding: 10px 25px; border-radius: 5px; font-weight: 600;
    display: inline-block;
}
.btn-outline-red:hover { background: var(--accent); color: var(--white); }

/* Responsive À Propos */
@media (max-width: 768px) {
    .about-container { flex-direction: column; }
    .experience-badge { right: 20px; left: auto; }
}

/* ... (Le reste du CSS : Architecture, Réalisations, etc. reste identique) ... */


/* =======================================================
   STYLES ADDITIONNELS POUR LA PAGE GALERIE (galerie.php)
======================================================== */

/* Ajustement du logo dans la navbar */
.logo-img {
    height: 45px; /* Hauteur fixe pour ne pas casser le menu */
    width: auto;
    margin-right: 15px;
    display: block;
}

/* En-tête de page spécifique (plus petit que le Hero de l'accueil) */
.page-header {
    height: 40vh; min-height: 300px;
    position: relative;
    background: url('https://images.unsplash.com/photo-1487958449943-2429e8be8625?auto=format&fit=crop&w=1920&q=80') center/cover;
    display: flex; align-items: center; justify-content: center;
}
.header-content { position: relative; z-index: 2; }
.header-content h1 { font-size: 3.5rem; color: var(--white); margin-bottom: 10px; }
.header-content p { font-size: 1.2rem; opacity: 0.9; }

/* Grille de la page galerie */
.gallery-grid-page {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); /* Grille responsive auto */
    gap: 30px;
}

/* Style des cartes de la galerie */
.gallery-item {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s ease;
    border: 1px solid #eee;
}
.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent);
}

.gallery-img-holder {
    position: relative;
    height: 250px;
    overflow: hidden;
}
.gallery-img-holder img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.gallery-item:hover .gallery-img-holder img {
    transform: scale(1.05);
}

/* Petit tag sur l'image (ex: Résidentiel) */
.category-tag {
    position: absolute; top: 15px; right: 15px;
    background: var(--accent); color: var(--white);
    padding: 5px 15px; font-size: 0.8rem; font-weight: 600;
    border-radius: 30px; text-transform: uppercase;
}
.category-tag.tag-geo { background: var(--primary-dark); } /* Couleur différente pour Géo */

/* Partie texte sous l'image */
.gallery-caption { padding: 25px; }
.gallery-caption h3 { font-size: 1.4rem; margin-bottom: 10px; }
.location {
    font-size: 0.9rem; color: var(--text-light); font-weight: 600;
    margin-bottom: 15px; display: flex; align-items: center; gap: 8px;
}
.gallery-caption .desc {
    font-size: 0.95rem; color: var(--text-main); line-height: 1.5;
}

/* Responsive Galerie */
@media (max-width: 768px) {
    .page-header h1 { font-size: 2.5rem; }
    .gallery-grid-page { grid-template-columns: 1fr; } /* 1 colonne sur mobile */
}


/* =======================================================
   STYLE MODALE GALERIE (DIAPORAMA)
======================================================== */
.gallery-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95); /* Fond très noir pour le focus */
    z-index: 10000;
    display: none; justify-content: center; align-items: center;
    flex-direction: column;
}
.gallery-modal-overlay.active { display: flex; animation: fadeIn 0.3s; }

.gallery-modal-content {
    position: relative; width: 90%; max-width: 1000px; text-align: center;
}

/* Image principale */
.slideshow-container {
    position: relative; height: 70vh; display: flex; align-items: center; justify-content: center;
}
.slideshow-container img {
    max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 5px;
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
}

/* Boutons Navigation (Flèches) */
.nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.1); color: white; border: none;
    font-size: 2rem; padding: 20px; cursor: pointer; border-radius: 50%;
    transition: 0.3s;
}
.nav-btn:hover { background: var(--accent); }
.prev-slide { left: -60px; }
.next-slide { right: -60px; }

/* Texte Description en bas */
.modal-info { color: white; margin-top: 20px; text-align: left; background: #1a1a1a; padding: 20px; border-radius: 10px; }
.modal-info h2 { color: var(--accent); margin-bottom: 10px; font-size: 1.5rem; }
.modal-info p { font-size: 1rem; color: #ccc; }
.img-counter { float: right; color: #666; font-size: 0.9rem; margin-top: -30px; }

/* Bouton Fermer */
.close-gallery {
    position: absolute; top: -40px; right: 0; font-size: 3rem; color: white; cursor: pointer;
}
.close-gallery:hover { color: var(--accent); }

/* Responsive Mobile */
@media (max-width: 768px) {
    .prev-slide { left: 0; }
    .next-slide { right: 0; }
    .nav-btn { font-size: 1.5rem; padding: 10px; background: rgba(0,0,0,0.5); }
    .slideshow-container { height: 50vh; }
}


/* AJOUT POUR GALERIE.PHP */
.gallery-grid-page {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}
.gallery-item {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: 0.3s;
    border: 1px solid #eee;
    cursor: pointer;
}
.gallery-item:hover { transform: translateY(-5px); border-color: var(--accent); }
.gallery-img-holder { height: 250px; overflow: hidden; position: relative; }
.gallery-img-holder img { width: 100%; height: 100%; object-fit: cover; }
.category-tag {
    position: absolute; top: 15px; right: 15px;
    background: var(--accent); color: white;
    padding: 5px 15px; border-radius: 20px; font-size: 0.8rem; font-weight: bold;
}
.gallery-caption { padding: 20px; }
.gallery-caption h3 { font-size: 1.3rem; margin-bottom: 5px; }