/* =========================================================
   MAD'EAU FORAGE & SERVICES — style.css
   Palette : bleu profond (identité), bleu eau (accent),
   vert feuille (accent secondaire), argile (accent rare CTA)
   ========================================================= */

:root {
  --ink:        #10242B;
  --deep-blue:  #0A3D5C;
  --deep-blue-2:#082E45;
  --sky-blue:   #1D8FC4;
  --leaf-green: #3E8E41;
  --clay:       #C97A4A;
  --paper:      #F5F7F6;
  --paper-2:    #EAEFEF;
  --white:      #FFFFFF;
  --line:       #DCE3E2;

  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body:    "Inter", sans-serif;
  --font-mono:    "IBM Plex Mono", monospace;

  --container: 1180px;
  --radius: 6px;
  --shadow: 0 10px 30px -12px rgba(10, 61, 92, 0.25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--deep-blue);
  margin: 0;
  line-height: 1.15;
  font-weight: 700;
}

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12.5px;
  color: var(--sky-blue);
  font-weight: 600;
  display: inline-block;
  margin-bottom: 10px;
}

.section-head {
  max-width: 640px;
  margin-bottom: 44px;
}
.section-head h2 { font-size: clamp(26px, 3.4vw, 36px); }
.section-head p { color: #3A4E54; font-size: 16.5px; margin-top: 12px; }

section { padding: 88px 0; }
.section-alt { background: var(--white); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  font-family: var(--font-body);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn-primary {
  background: var(--clay);
  color: var(--white);
}
.btn-primary:hover { background: #B56638; transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  border-color: rgba(255,255,255,0.55);
  color: var(--white);
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); }
.btn-outline {
  background: transparent;
  border-color: var(--deep-blue);
  color: var(--deep-blue);
}
.btn-outline:hover { background: var(--deep-blue); color: var(--white); }

/* ============ NAV ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
}
.nav-logo img { height: 46px; width: auto; }
.nav-links {
  display: flex;
  gap: 30px;
}
.nav-links a {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
  position: relative;
  padding: 6px 0;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 2px; width: 0;
  background: var(--sky-blue);
  transition: width 0.2s ease;
}
.nav-links a:hover::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-phone {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--deep-blue);
  white-space: nowrap;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 24px; height: 2px;
  background: var(--deep-blue);
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,46,69,0.35) 0%, rgba(8,46,69,0.55) 55%, rgba(6,32,48,0.92) 100%);
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 60px 24px 90px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}
.hero-content .eyebrow { color: #9FD3EC; }
.hero h1 {
  color: var(--white);
  font-size: clamp(36px, 5.6vw, 60px);
  letter-spacing: -0.01em;
}
.hero h1 em {
  font-style: normal;
  color: #7FD68A;
}
.hero-sub {
  margin-top: 18px;
  font-size: 18px;
  color: #E4EEF0;
  max-width: 560px;
}
.hero-actions {
  margin-top: 34px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-badges {
  margin-top: 46px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #C9DCE2;
  border-top: 1px solid rgba(255,255,255,0.22);
  padding-top: 22px;
}
.hero-badges strong {
  display: block;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
}

/* ============ DEPTH SCALE (signature element) ============ */
.depth {
  background: var(--deep-blue);
  color: var(--white);
  padding: 64px 0 54px;
  position: relative;
}
.depth-head { text-align: center; margin-bottom: 46px; }
.depth-head .eyebrow { color: #7FD1E8; }
.depth-head h2 { color: var(--white); font-size: clamp(24px, 3vw, 32px); }
.depth-head p { color: #C9DCE2; margin-top: 10px; max-width: 560px; margin-left: auto; margin-right: auto; }

.depth-scale {
  position: relative;
  padding: 0 24px;
}
.depth-line {
  position: relative;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255,255,255,0.4) 0px, rgba(255,255,255,0.4) 1px,
    transparent 1px, transparent 20px
  );
  margin: 0 auto;
  max-width: var(--container);
}
.depth-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  max-width: var(--container);
  margin: 0 auto;
}
.depth-step {
  position: relative;
  padding-top: 30px;
  text-align: left;
}
.depth-step::before {
  content: "";
  position: absolute;
  top: -1px; left: 0;
  width: 2px; height: 26px;
  background: var(--sky-blue);
}
.depth-step .depth-m {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #7FD1E8;
  display: block;
  margin-bottom: 8px;
}
.depth-step h4 {
  color: var(--white);
  font-size: 16px;
  margin-bottom: 6px;
}
.depth-step p {
  color: #B9CDD3;
  font-size: 13.5px;
  margin: 0;
}

/* ============ PAGE BANNER (sous-pages) ============ */
.page-banner {
  position: relative;
  min-height: 42vh;
  display: flex;
  align-items: flex-end;
  color: var(--white);
  overflow: hidden;
}
.page-banner .hero-media img { object-position: center 40%; }
.page-banner-content {
  position: relative;
  z-index: 1;
  padding: 40px 24px 46px;
  max-width: var(--container);
  margin: 0 auto;
  width: 100%;
}
.page-banner h1 {
  color: var(--white);
  font-size: clamp(30px, 4.4vw, 46px);
}
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #B9D8E4;
  margin-bottom: 12px;
  display: block;
}
.breadcrumb a:hover { color: var(--white); }

/* Active nav link */
.nav-links a.is-active { color: var(--sky-blue); }
.nav-links a.is-active::after { width: 100%; }

/* ============ ABOUT ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  gap: 64px;
  align-items: center;
}
.about-photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.about-photo img { height: 100%; object-fit: cover; }
.about-photo-tag {
  position: absolute;
  left: 18px; bottom: 18px;
  background: rgba(10,61,92,0.85);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 7px 12px;
  border-radius: 4px;
}
.about-text p { color: #3A4E54; margin-top: 16px; font-size: 16px; }
.about-facts {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}
.about-fact dt {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sky-blue);
  margin-bottom: 4px;
}
.about-fact dd {
  margin: 0;
  font-weight: 700;
  color: var(--deep-blue);
  font-size: 15px;
}

/* ============ SERVICES ============ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.service-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 260px;
  display: flex;
  align-items: flex-end;
  box-shadow: var(--shadow);
}
.service-card img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.service-card:hover img { transform: scale(1.06); }
.service-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,61,92,0) 35%, rgba(8,36,54,0.92) 100%);
}
.service-card-body {
  position: relative;
  z-index: 1;
  padding: 20px;
  color: var(--white);
}
.service-card-body h3 { color: var(--white); font-size: 17px; }
.service-card-body p { font-size: 13.5px; color: #D8E6E9; margin: 6px 0 0; }

.service-card.is-icon {
  background: var(--deep-blue);
  align-items: flex-start;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
}
.service-card.is-icon svg { width: 34px; height: 34px; color: #7FD1E8; }
.service-card.is-icon .service-card-body { padding: 0; margin-top: 18px; }

/* ============ ENGAGEMENTS ============ */
.engagements {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}
.engagement {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 18px;
  background: var(--paper);
}
.engagement svg { width: 26px; height: 26px; color: var(--leaf-green); margin-bottom: 14px; }
.engagement h4 { font-size: 15px; color: var(--deep-blue); margin-bottom: 6px; }
.engagement p { font-size: 13px; color: #4E6469; margin: 0; }

/* ============ GALLERY ============ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3/4;
  box-shadow: var(--shadow);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.gallery-item:hover img { transform: scale(1.07); }
.gallery-cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px 14px 12px;
  background: linear-gradient(180deg, rgba(8,36,54,0) 0%, rgba(8,36,54,0.88) 100%);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
}

/* ============ CONTACT ============ */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
}
.contact-info h3 { font-size: 18px; margin-bottom: 18px; }
.contact-list li {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.contact-list svg { width: 20px; height: 20px; color: var(--sky-blue); flex-shrink: 0; margin-top: 2px; }
.contact-list a:hover { color: var(--sky-blue); }
.map-frame {
  margin-top: 24px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  height: 220px;
}
.map-frame iframe { width: 100%; height: 100%; border: 0; }

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--deep-blue);
  margin-bottom: 7px;
}
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--ink);
  background: var(--paper);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: 2px solid var(--sky-blue);
  outline-offset: 1px;
  border-color: var(--sky-blue);
}
.form-field textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: 12.5px; color: #6C8085; margin-top: 14px; }

/* ============ FOOTER ============ */
.footer {
  background: var(--deep-blue-2);
  color: #C9DCE2;
  padding: 60px 0 26px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-logo img {
  height: 52px;
  margin-bottom: 14px;
  background: var(--white);
  padding: 8px 12px;
  border-radius: 4px;
}
.footer-tagline { font-size: 13.5px; color: #9CB8BF; max-width: 280px; }
.footer h5 {
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.footer-links li { margin-bottom: 10px; font-size: 14px; }
.footer-links a:hover { color: var(--white); }
.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social a {
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.footer-social svg { width: 15px; height: 15px; }
.footer-social a:hover { background: var(--sky-blue); border-color: var(--sky-blue); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 24px;
  font-size: 12.5px;
  color: #7E9AA1;
  font-family: var(--font-mono);
}

/* ============ REVEAL ANIMATION ============ */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .about-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .engagements { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .depth-steps { grid-template-columns: repeat(2, 1fr); row-gap: 26px; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-links, .nav-phone { display: none; }
  .nav-toggle { display: flex; }
  .nav.is-open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    padding: 20px 24px 28px;
    gap: 16px;
    border-bottom: 1px solid var(--line);
  }
  section { padding: 60px 0; }
  .hero { min-height: 100vh; }
  .services-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}
