/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue-dark:   #0A3D7A;
  --blue:        #1565C0;
  --blue-light:  #1E88E5;
  --blue-pale:   #E3F2FD;
  --white:       #FFFFFF;
  --gray-light:  #F5F7FA;
  --gray:        #6B7280;
  --gray-dark:   #1F2937;
  --shadow:      0 4px 20px rgba(10, 61, 122, 0.12);
  --shadow-lg:   0 8px 40px rgba(10, 61, 122, 0.2);
  --radius:      12px;
  --radius-sm:   8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--gray-dark);
  background: var(--white);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

/* Fix Leaflet map tiles – ne pas appliquer max-width aux tuiles */
.leaflet-container img { max-width: none !important; display: inline; }
a { text-decoration: none; color: inherit; }

/* ===== NAV ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--white);
  box-shadow: 0 2px 12px rgba(10, 61, 122, 0.1);
  padding: 0 2rem;
  height: 70px;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-logo {
  display: flex; align-items: center; gap: 0.75rem;
}
.nav-logo img { height: 44px; width: auto; }
.nav-logo span {
  font-size: 1.4rem; font-weight: 800;
  color: var(--blue-dark);
  letter-spacing: -0.5px;
}

.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  font-weight: 500; color: var(--gray-dark);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--blue); }

.nav-cta {
  background: var(--blue);
  color: var(--white) !important;
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  font-weight: 600 !important;
  transition: background 0.2s, transform 0.2s !important;
}
.nav-cta:hover { background: var(--blue-dark) !important; transform: translateY(-1px); }

.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.nav-toggle span { display: block; width: 25px; height: 2px; background: var(--blue-dark); transition: 0.3s; }

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 50%, var(--blue-light) 100%);
  display: flex; align-items: center;
  position: relative; overflow: hidden;
  padding-top: 70px;
}

/* Water drops deco */
.hero::before, .hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
}
.hero::before { width: 600px; height: 600px; top: -200px; right: -100px; }
.hero::after  { width: 400px; height: 400px; bottom: -150px; left: -100px; }

/* Spray lines */
.hero-spray {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 50%; opacity: 0.06;
  background: repeating-linear-gradient(
    -45deg,
    transparent, transparent 8px,
    rgba(255,255,255,1) 8px, rgba(255,255,255,1) 10px
  );
}

.hero-content {
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto; padding: 4rem 2rem;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  padding: 0.4rem 1rem; border-radius: 50px;
  font-size: 0.85rem; font-weight: 600;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(4px);
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 1.2rem;
  letter-spacing: -1px;
}
.hero-title span { color: #90CAF9; }

.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.85);
  margin-bottom: 2rem;
  max-width: 480px;
}

.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn-primary {
  background: var(--white);
  color: var(--blue-dark);
  padding: 0.9rem 2rem;
  border-radius: 50px;
  font-weight: 700; font-size: 1rem;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s, box-shadow 0.2s;
  border: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(0,0,0,0.2); }

.btn-outline {
  background: transparent;
  color: var(--white);
  padding: 0.9rem 2rem;
  border-radius: 50px;
  font-weight: 600; font-size: 1rem;
  border: 2px solid rgba(255,255,255,0.6);
  transition: background 0.2s, border-color 0.2s;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: var(--white); }

.hero-stats {
  display: flex; gap: 2rem; margin-top: 2.5rem;
}
.stat { text-align: center; }
.stat-num { font-size: 2rem; font-weight: 900; color: var(--white); line-height: 1; }
.stat-label { font-size: 0.8rem; color: rgba(255,255,255,0.7); margin-top: 0.2rem; }

.hero-image-wrap {
  position: relative;
}
.hero-image-wrap img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  aspect-ratio: 4/3; object-fit: cover;
}
.hero-image-placeholder {
  background: rgba(255,255,255,0.1);
  border: 2px dashed rgba(255,255,255,0.3);
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem; gap: 0.5rem;
}
.hero-image-placeholder svg { opacity: 0.4; }

/* ===== SECTION BASE ===== */
section { padding: 5rem 2rem; }
.section-inner { max-width: 1200px; margin: 0 auto; }

.section-tag {
  display: inline-block;
  background: var(--blue-pale);
  color: var(--blue);
  padding: 0.3rem 0.9rem; border-radius: 50px;
  font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800; color: var(--blue-dark);
  margin-bottom: 0.75rem; letter-spacing: -0.5px;
}
.section-subtitle {
  font-size: 1.05rem; color: var(--gray);
  max-width: 560px;
}

/* ===== SERVICES ===== */
#services { background: var(--gray-light); }

.services-header { text-align: center; margin-bottom: 3rem; }
.services-header .section-subtitle { margin: 0 auto; }

.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative; overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.service-icon {
  width: 64px; height: 64px;
  background: var(--blue-pale);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
  color: var(--blue);
}

.service-card h3 {
  font-size: 1.2rem; font-weight: 700;
  color: var(--blue-dark); margin-bottom: 0.5rem;
}
.service-card p { font-size: 0.95rem; color: var(--gray); line-height: 1.6; }

.service-features {
  margin-top: 1rem; padding-top: 1rem;
  border-top: 1px solid #EEF2F7;
  list-style: none;
}
.service-features li {
  font-size: 0.9rem; color: var(--gray-dark);
  padding: 0.25rem 0;
  display: flex; align-items: center; gap: 0.5rem;
}
.service-features li::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%; background: var(--blue-light);
  flex-shrink: 0;
}

/* ===== GALLERY ===== */
#galerie { background: var(--white); }

.gallery-header { text-align: center; margin-bottom: 3rem; }
.gallery-header .section-subtitle { margin: 0 auto; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 1rem;
}
.gallery-item {
  border-radius: var(--radius-sm); overflow: hidden;
  aspect-ratio: 4/3; position: relative;
  background: var(--blue-pale);
}
.gallery-item:first-child { grid-column: span 2; aspect-ratio: 16/9; }
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s;
}
.gallery-item:hover img { transform: scale(1.04); }

.gallery-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--blue); gap: 0.5rem; font-size: 0.85rem; opacity: 0.6;
}

.gallery-caption {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(10,61,122,0.75));
  color: var(--white);
  padding: 1.5rem 1rem 0.75rem;
  font-size: 0.85rem; font-weight: 600;
  opacity: 0; transition: opacity 0.3s;
}
.gallery-item:hover .gallery-caption { opacity: 1; }

.gallery-caption-before {
  background: linear-gradient(transparent, rgba(180,30,30,0.75));
  padding: 0.4rem 0.75rem;
  bottom: auto; top: 0; left: 0; right: auto;
  border-radius: 0 0 var(--radius-sm) 0;
  font-size: 0.8rem; opacity: 1;
}
.gallery-caption-after {
  background: linear-gradient(transparent, rgba(10,100,50,0.75));
  padding: 0.4rem 0.75rem;
  bottom: auto; top: 0; left: 0; right: auto;
  border-radius: 0 0 var(--radius-sm) 0;
  font-size: 0.8rem; opacity: 1;
}

/* ===== ZONE ===== */
#zone { background: var(--blue-dark); color: var(--white); }

.zone-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}

.zone-text .section-tag { background: rgba(255,255,255,0.15); color: rgba(255,255,255,0.9); }
.zone-text .section-title { color: var(--white); }
.zone-text .section-subtitle { color: rgba(255,255,255,0.75); max-width: 100%; }

.zone-cities {
  display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.5rem;
}
.city-tag {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.9);
  padding: 0.35rem 0.9rem; border-radius: 50px;
  font-size: 0.85rem; font-weight: 500;
  backdrop-filter: blur(4px);
}

.zone-map {
  border-radius: var(--radius);
  overflow: hidden;
}
.zone-map p { color: rgba(255,255,255,0.7); font-size: 0.85rem; margin-top: 0.75rem; text-align: center; }

/* ===== WHY US ===== */
#pourquoi { background: var(--gray-light); }

.why-header { text-align: center; margin-bottom: 3rem; }
.why-header .section-subtitle { margin: 0 auto; }

.why-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
}

.why-card {
  text-align: center; padding: 2rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.why-icon {
  font-size: 2.5rem; margin-bottom: 1rem;
  display: flex; justify-content: center;
}
.why-card h4 { font-size: 1rem; font-weight: 700; color: var(--blue-dark); margin-bottom: 0.4rem; }
.why-card p  { font-size: 0.9rem; color: var(--gray); }

/* ===== CTA BANNER ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-light) 100%);
  padding: 4rem 2rem; text-align: center;
}
.cta-banner h2 { font-size: 2rem; font-weight: 800; color: var(--white); margin-bottom: 0.75rem; }
.cta-banner p  { color: rgba(255,255,255,0.85); margin-bottom: 2rem; font-size: 1.1rem; }

/* ===== FOOTER ===== */
footer {
  background: var(--gray-dark);
  color: rgba(255,255,255,0.7);
  padding: 3rem 2rem 1.5rem;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand p { margin-top: 0.75rem; font-size: 0.9rem; line-height: 1.7; }
.footer-brand .nav-logo span { color: white; }

.footer-col h5 { font-size: 0.85rem; font-weight: 700; color: var(--white); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 1rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a { font-size: 0.9rem; color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--white); }

.footer-bottom {
  max-width: 1200px; margin: 1.5rem auto 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.85rem;
}

/* ===== A PROPOS ===== */
.apropos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "text image";
  gap: 4rem;
  align-items: center;
}
.apropos-text  { grid-area: text; }
.apropos-image { grid-area: image; }
.apropos-image img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

@media (max-width: 900px) {
  .apropos-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "text" "image";
    gap: 2rem;
  }
  .apropos-image img {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
  }
}

/* ===== DEVIS PAGE ===== */
.devis-hero {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue));
  padding: 8rem 2rem 4rem;
  text-align: center; color: var(--white);
}
.devis-hero h1 { font-size: 2.5rem; font-weight: 900; margin-bottom: 0.75rem; }
.devis-hero p  { font-size: 1.1rem; color: rgba(255,255,255,0.8); }

.devis-section { padding: 4rem 2rem; background: var(--gray-light); }
.devis-inner {
  max-width: 720px; margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
}

/* Form */
.form-group { margin-bottom: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label { display: block; font-size: 0.9rem; font-weight: 600; color: var(--gray-dark); margin-bottom: 0.4rem; }
label span { color: var(--blue); }

input, select, textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid #D1D5DB;
  border-radius: var(--radius-sm);
  font-size: 0.95rem; font-family: inherit;
  color: var(--gray-dark);
  background: var(--white);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(21,101,192,0.12);
}
input.error, select.error, textarea.error { border-color: #EF4444; }
.error-msg { font-size: 0.8rem; color: #EF4444; margin-top: 0.25rem; display: none; }
.error-msg.show { display: block; }

textarea { resize: vertical; min-height: 120px; }

.form-submit {
  margin-top: 1.5rem; text-align: center;
}
.btn-submit {
  background: var(--blue);
  color: var(--white);
  border: none; cursor: pointer;
  padding: 1rem 3rem;
  border-radius: 50px;
  font-size: 1rem; font-weight: 700;
  box-shadow: var(--shadow);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  display: inline-flex; align-items: center; gap: 0.6rem;
}
.btn-submit:hover { background: var(--blue-dark); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.form-notice {
  text-align: center; margin-top: 1rem;
  font-size: 0.85rem; color: var(--gray);
}

/* Success & Error messages */
.form-success, .form-error {
  display: none;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-weight: 500;
}
.form-success { background: #D1FAE5; color: #065F46; border: 1px solid #6EE7B7; }
.form-error   { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }
.form-success.show, .form-error.show { display: block; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero-content   { grid-template-columns: 1fr; text-align: center; }
  .hero-image-wrap { display: none; }
  .hero-stats     { justify-content: center; }
  .hero-actions   { justify-content: center; }
  .hero-subtitle  { margin: 0 auto 2rem; }
  .services-grid  { grid-template-columns: 1fr; }
  .gallery-grid   { grid-template-columns: 1fr 1fr; }
  .gallery-item:first-child { grid-column: span 2; }
  .zone-inner     { grid-template-columns: 1fr; }
  .why-grid       { grid-template-columns: 1fr 1fr; }
  .footer-inner   { grid-template-columns: 1fr 1fr; }
  /* Center hero text on mobile */
  .hero-text { margin: 0 auto; text-align: center; }
}

@media (max-width: 600px) {
  .nav-links { display: none; flex-direction: column; position: fixed; top: 70px; left: 0; right: 0; background: var(--white); padding: 1.5rem 2rem; box-shadow: var(--shadow); gap: 1rem; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .gallery-grid   { grid-template-columns: 1fr; }
  .gallery-item:first-child { grid-column: span 1; }
  .why-grid       { grid-template-columns: 1fr; }
  .footer-inner   { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom  { flex-direction: column; gap: 0.5rem; text-align: center; }
  .form-row       { grid-template-columns: 1fr; }
  .devis-inner    { padding: 1.5rem; }
}
