/* --- RESET & VARIABLES --- */
:root {
    --primary-color: #0f172a;
    --accent-color: #f59e0b;
    --bg-light: #f8fafc;
    --text-dark: #334155;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Manrope', sans-serif; color: var(--text-dark); background: white; line-height: 1.6; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- NAV --- */
.navbar { 
position: fixed; top: 0; width: 100%; background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); z-index: 1000; padding: 1rem 0; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--primary-color); }
.logo span { color: var(--accent-color); }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { font-weight: 600; font-size: 0.95rem; transition: var(--transition); }
.nav-links a:hover { color: var(--accent-color); }

/* --- TOP CONTACT BAR --- */

.topbar{
background:#0f172a;
color:white;
font-size:0.85rem;
width:100%;
padding:6px 0;
margin-top:80px;
}

.topbar-content{
display:flex;
justify-content:space-between;
align-items:center;
}

.topbar-contact{
display:flex;
gap:20px;
}

.topbar-contact i{
color:#f59e0b;
margin-right:5px;
}

.topbar-socials{
display:flex;
gap:15px;
}

.topbar-socials a{
color:white;
font-size:1rem;
}

.topbar-socials a:hover{
color:#f59e0b;
}

body{
padding-top:70px;
}

/* --- BOUTONS --- */
.btn-primary { background: var(--primary-color); color: white !important; padding: 12px 25px; border-radius: 6px; font-weight: 700; border: 2px solid var(--primary-color); transition: var(--transition); cursor: pointer;}
.btn-primary:hover { background: transparent; color: var(--primary-color) !important; }
.btn-secondary { border: 2px solid white; color: white; padding: 12px 25px; border-radius: 6px; font-weight: 700; transition: var(--transition); }
.btn-secondary:hover { background: white; color: var(--primary-color); }

/* --- HERO --- */
.hero { height: 90vh; background: url('https://images.unsplash.com/photo-1621905251189-08b45d6a269e?q=80&w=1920&auto=format&fit=crop') center/cover no-repeat; display: flex; align-items: center; justify-content: center; text-align: center; position: relative; color: white; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(rgba(15,23,42,0.8), rgba(15,23,42,0.6)); }
.hero-content { position: relative; z-index: 2; max-width: 800px; padding: 20px; }
.badge { background: var(--accent-color); color: var(--primary-color); padding: 5px 15px; border-radius: 50px; font-weight: 800; display: inline-block; margin-bottom: 1rem; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; }
.hero h1 { font-size: 3.5rem; font-weight: 800; line-height: 1.1; margin-bottom: 1.5rem; }
.text-highlight { color: transparent; -webkit-text-stroke: 1px white; font-style: italic; }
.hero p { font-size: 1.2rem; margin-bottom: 2rem; opacity: 0.9; }
.hero-btns { display: flex; gap: 1rem; justify-content: center; }

/* --- SECTIONS GÉNÉRALES --- */
.section { padding: 5rem 0; }
.bg-light { background: var(--bg-light); }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 0.5rem; }
.underline { width: 50px; height: 4px; background: var(--accent-color); margin: 0 auto 1rem auto; }

/* --- GALERIE CHANTIERS (CORRIGÉ) --- */
/* --- CAROUSEL CHANTIERS --- */
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* La zone de défilement */
.carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto; /* Permet de scroller horizontalement */
    scroll-snap-type: x mandatory; /* Force l'arrêt net sur une image */
    padding-bottom: 20px; /* Espace pour la barre de scroll si visible */
    scrollbar-width: none; /* Cache la barre de scroll (Firefox) */
    scroll-behavior: smooth;
    width: 100%;
}

/* Cacher la barre de scroll (Chrome/Safari) */
.carousel-track::-webkit-scrollbar {
    display: none;
}

/* Les Cartes individuelles */
.card-slide {
    min-width: 320px; /* Largeur fixe de chaque carte */
    height: 400px;    /* Hauteur fixe */
    scroll-snap-align: start; /* S'aligne au début */
    flex-shrink: 0;   /* Empêche l'écrasement */
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* On garde ton style que tu aimes (Overlay) */
.card-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card-slide:hover img { transform: scale(1.1); }
.card-slide:hover .gallery-overlay { opacity: 1; transform: translateY(0); }

/* --- BOUTONS DE NAVIGATION --- */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 10;
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: var(--accent-color);
    color: white;
}

.prev-btn { left: -25px; } /* Décale un peu à gauche */
.next-btn { right: -25px; } /* Décale un peu à droite */

/* Mobile : On cache les boutons car on peut swiper au doigt */
@media screen and (max-width: 768px) {
    .carousel-btn {
        display: none;
    }

    .carousel-track {
        gap: 14px;
        padding-bottom: 10px;
        scroll-snap-type: x mandatory;
    }

    .card-slide {
        min-width: 88%;
        height: 240px;
        scroll-snap-align: center;
        border-radius: 15px;
        overflow: hidden;
        background: #fff;
    }

    .card-slide img {
        width: 100%;
        height: 100%;
        object-fit: contain; /* montre mieux l’image */
        background: #f8fafc; /* fond propre au lieu du noir */
        display: block;
    }

    .gallery-item {
        height: 240px;
    }

    .gallery-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(15, 23, 42, 0.65), transparent);
    }

    .gallery-overlay h3,
    .gallery-overlay p {
        transform: translateY(0);
    }
}

.gallery-item {
    position: relative;
    height: 350px; /* Hauteur fixe pour uniformiser */
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* L'image remplit tout sans être déformée */
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    opacity: 0; /* Caché par défaut */
    transition: opacity 0.4s ease;
}

.gallery-overlay h3 { color: white; margin-bottom: 5px; transform: translateY(20px); transition: 0.4s; }
.gallery-overlay p { color: var(--accent-color); font-weight: 700; transform: translateY(20px); transition: 0.4s 0.1s; }

/* Animation au survol */
.gallery-item:hover img { transform: scale(1.1); }
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-item:hover .gallery-overlay h3,
.gallery-item:hover .gallery-overlay p { transform: translateY(0); }


/* --- AVIS CLIENTS (SCROLL INFINI) --- */
.google-rating {
    margin-top: 10px;
    font-size: 1.1rem;
    color: #4285F4; /* Bleu Google */
}

/* Le Container qui cache ce qui dépasse */
.slider {
    height: auto;
    margin: auto;
    overflow: hidden;
    position: relative;
    width: 100%;
}

/* La piste qui bouge */
.slide-track {
    display: flex;
    width: calc(400px * 8); /* Largeur totale approximative */
    animation: scroll 40s linear infinite; /* Vitesse du défilement */
}

/* Pause au survol de la souris pour lire */
.slide-track:hover {
    animation-play-state: paused;
}

/* Une carte individuelle */
.slide {
    width: 400px; /* Largeur d'un avis */
    padding: 0 15px;
}

.review-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #eee;
}

.stars { color: #f59e0b; margin-bottom: 15px; font-size: 1.2rem; }
.review-card p { font-style: italic; color: #555; margin-bottom: 20px; font-size: 0.95rem; }

.author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.author img { width: 45px; height: 45px; border-radius: 50%; }
.author strong { display: block; color: var(--primary-color); }
.author span { font-size: 0.85rem; color: #888; }

/* L'animation pure CSS */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-400px * 4)); } /* Décale de la moitié */
}

/* RESPONSIVE MOBILE POUR LES AVIS */
@media screen and (max-width: 768px) {
    .slide { width: 300px; }
    .slide-track { width: calc(300px * 8); }
    @keyframes scroll {
        0% { transform: translateX(0); }
        100% { transform: translateX(calc(-300px * 4)); }
    }
}

/* --- STATS --- */
.stats-section { background: var(--primary-color); color: white; padding: 4rem 0; }
.stats-grid { display: flex; justify-content: space-around; text-align: center; flex-wrap: wrap; gap: 2rem; }
.stat-item .number { font-size: 3.5rem; font-weight: 800; color: var(--accent-color); display: block; line-height: 1; margin-bottom: 0.5rem; }

/* --- CONTACT --- */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; background: white; padding: 3rem; border-radius: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.08); }
.info-item { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; font-weight: 600; font-size: 1.1rem; }
.info-item i { color: var(--accent-color); font-size: 1.3rem; }
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.9rem; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #e2e8f0; border-radius: 6px; font-family: inherit; background: #f8fafc; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent-color); background: white; }
.full-width { width: 100%; border: none; font-size: 1rem; }

/* --- FOOTER --- */
footer {
    width: 100%;
    background: #0f172a;
    color: #64748b;
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
}
/* --- MOBILE --- */
.burger { display: none; cursor: pointer; }
.burger div { width: 25px; height: 3px; background: var(--primary-color); margin: 5px; transition: 0.3s; }

@media screen and (max-width: 768px) {
    .nav-links { position: absolute; right: 0; height: 100vh; top: 0; background: white; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 80%; transform: translateX(100%); transition: 0.4s ease; box-shadow: -10px 0 30px rgba(0,0,0,0.1); }
    .nav-links.nav-active { transform: translateX(0%); }
    .burger { display: block; z-index: 2000; }
    .burger.toggle .line1 { transform: rotate(-45deg) translate(-5px, 6px); }
    .burger.toggle .line2 { opacity: 0; }
    .burger.toggle .line3 { transform: rotate(45deg) translate(-5px, -6px); }
    .contact-wrapper { grid-template-columns: 1fr; padding: 1.5rem; }
    .hero h1 { font-size: 2.5rem; }
}
/* --- PAGE MENTIONS LÉGALES --- */
.navbar-legal {
    background: white;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.btn-back {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-back:hover {
    color: var(--accent-color);
    padding-left: 5px; /* Petite animation sympa */
}

.legal-content {
    padding: 60px 0;
    background: #f8fafc;
    min-height: 80vh;
}

.legal-content h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.intro-legal {
    color: #64748b;
    margin-bottom: 40px;
    font-style: italic;
}

.legal-block {
    background: white;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    border-left: 4px solid var(--accent-color); /* Touche de couleur pro */
}

.legal-block h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.legal-block h3 {
    font-size: 1.1rem;
    color: #334155;
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: 700;
}

.legal-block p, .legal-block ul {
    color: #475569;
    font-size: 0.95rem;
    margin-bottom: 10px;
    line-height: 1.7;
}

.legal-block ul {
    padding-left: 20px;
    list-style: disc;
}



/* ================= MODAL ================= */

.project-modal{
  display:none;
  position:fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background:rgba(0,0,0,0.75);
  justify-content:center;
  align-items:center;
  z-index:9999;
  overflow-y:auto;
}

.modal-content{
  background:white;
  width:90%;
  max-width:1000px;
  height:80vh;
  border-radius:16px;
  display:flex;
  overflow:hidden;
  position:relative;
  margin:40px auto;
}

.modal-left{
  position:relative;
  width:65%;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
}

.modal-left img{
  display:block;
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  object-fit:contain;
}

.modal-right{
  width:35%;
  padding:40px;
  overflow-y:auto;
}

.modal-right a{
  color:#2563eb;
  text-decoration:underline;
  font-weight:600;
  transition:0.2s;
}

.modal-right a:hover{
  color:#1d4ed8;
}

.modal-right ul{
  list-style:disc;
  padding-left:20px;
  margin:10px 0 20px 0;
}

.modal-right li{
  margin-bottom:6px;
}

#modalLocation{
  color:#6b7280;
  font-weight:600;
  margin-bottom:15px;
}

.modal-close{
  position:absolute;
  top:12px;
  right:12px;
  width:38px;
  height:38px;
  background:white;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:20px;
  cursor:pointer;
  box-shadow:0 5px 15px rgba(0,0,0,0.2);
  z-index:10001;
}

.modal-close:hover{
  background:#f59e0b;
  color:white;
  transform:scale(1.1);
}

.modal-nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  background:white;
  border:none;
  width:45px;
  height:45px;
  border-radius:50%;
  cursor:pointer;
  font-size:20px;
  z-index:10000;
}

.modal-nav.prev{
  left:20px;
}

.modal-nav.next{
  right:20px;
}

body.modal-open{
  overflow:hidden;
}

/* ================= MOBILE HEADER ================= */

@media (max-width:768px){

  .navbar{
    background:#fff !important;
    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;
    overflow:hidden;
  }

  .nav-container{
    overflow:hidden;
  }

  .logo{
    display:flex;
    align-items:center;
    position:relative;
  }

  .logo img{
    height:90px;
    width:auto;
    display:block;
  }

  .topbar-contact span:nth-child(2){
    display:none;
  }
}

/* ================= MOBILE CAROUSEL ================= */

@media screen and (max-width: 768px) {
  .carousel-wrapper{
    position: relative;
    padding: 0;
  }

  .carousel-track{
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
  }

  .card-slide,
  .gallery-item.card-slide{
    min-width: 100%;
    width: 100%;
    height: 340px;
    scroll-snap-align: start;
    border-radius: 15px;
    overflow: hidden;
    background: #f8fafc;
    flex-shrink: 0;
    position: relative;
  }

  .gallery-item{
    height: 340px;
  }

  .gallery-item.card-slide img,
  .card-slide img,
  .gallery-item img{
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center;
    display: block;
    background: #f8fafc;
  }

  .gallery-overlay{
    opacity: 1;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.65), transparent);
  }

  .gallery-overlay h3,
  .gallery-overlay p{
    transform: translateY(0);
  }

  .carousel-btn{
    display: flex !important;
    width: 38px;
    height: 38px;
    font-size: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
  }

  .prev-btn{
    left: 8px;
  }

  .next-btn{
    right: 8px;
  }
}

/* ================= MOBILE MODAL ================= */

@media (max-width:768px){

  .project-modal{
    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.75);
    justify-content:center;
    align-items:flex-start;
    padding-top:70px;
    overflow-y:auto;
    z-index:9999;
  }

  .modal-content{
    width:95%;
    max-width:none;
    height:auto;
    max-height:88vh;
    margin:0 auto 20px auto;
    background:white;
    border-radius:18px;
    display:flex;
    flex-direction:column;
    overflow-y:auto;
    overflow-x:hidden;
    position:relative;
  }

  .modal-left{
    width:100%;
    height:auto;
    background:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:16px 16px 0 16px;
  }

  .modal-left img{
    display:block;
    width:100%;
    height:auto;
    max-height:320px;
    object-fit:contain;
    background:#fff;
    border-radius:12px;
  }

  .modal-right{
    width:100%;
    padding:18px 20px 24px 20px;
    overflow-y:visible;
  }

  .modal-close{
    position:absolute;
    top:12px;
    right:12px;
    width:38px;
    height:38px;
    background:white;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:20px;
    z-index:10001;
  }

  .modal-nav{
    width:42px;
    height:42px;
    font-size:18px;
    top:34%;
  }

  .modal-nav.prev{
    left:10px;
  }

  .modal-nav.next{
    right:10px;
  }
}

/* ===== FIX LOGO PC ===== */

.navbar .logo{
  display:flex;
  align-items:center;
  max-width:220px;
}

.navbar .logo img{
  height:70px !important;
  width:auto !important;
  max-width:100%;
  object-fit:contain;
}

/* ===== POPUP SUCCÈS ===== */

.success-popup{
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.success-popup.active{
    display: flex;
}

.success-popup-content{
    background: white;
    width: 100%;
    max-width: 460px;
    border-radius: 18px;
    padding: 35px 30px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.18);
    animation: popupFade 0.25s ease;
}

.success-icon{
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.12);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    font-size: 1.8rem;
}

.success-popup-content h3{
    color: var(--primary-color);
    font-size: 1.7rem;
    margin-bottom: 10px;
}

.success-popup-content p{
    color: var(--text-dark);
    margin-bottom: 25px;
    line-height: 1.7;
}

@keyframes popupFade{
    from{
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }
    to{
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}