@charset "UTF-8";
/* =====================================================
   ECP SUD ENERGIE - CSS PRINCIPAL (complet)
   Base, en-tete (2 balisages), accueil, formulaire, pied de page
   ===================================================== */

:root {
  --blue: #12385a;
  --dark: #102334;
  --orange: #f28c28;
  --border: #e1e8ee;
  --light: #f4f7fa;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Roboto", "Segoe UI", Arial, sans-serif;
  color: var(--dark);
  background: #fff;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.25; }

.container, .page-container { width: min(1120px, calc(100% - 36px)); margin: 0 auto; }

/* ---------- EN-TETE ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(16, 35, 52, .06);
}

/* Balisage A (accueil) : .nav / #mainNav / .nav-submenu
   Balisage B (pages services) : .header-inner / .main-navigation / .nav-dropdown-menu */
.site-header .nav,
.header-inner {
  position: relative;
  min-height: 72px;
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: nowrap; gap: 20px;
}
.header-inner { width: min(1180px, calc(100% - 28px)); }

.site-header .logo, .logo-link {
  display: flex; align-items: center; flex: 0 1 auto; min-width: 0;
}
.site-logo { display: block; width: auto; height: 48px; max-width: 100%; object-fit: contain; }

/* Boutons burger */
.site-header .menu, .menu-toggle {
  display: none;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
  flex: 0 0 44px; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--border); border-radius: 10px;
  background: #fff; color: var(--blue);
  font-size: 25px; cursor: pointer;
}
.menu-toggle span { display: block; width: 22px; height: 3px; border-radius: 2px; background: var(--blue); }

/* Navigation (ordinateur) */
.site-header #mainNav, .main-navigation {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 20px; min-width: 0;
}
.site-header #mainNav > a, .main-navigation > a,
.nav-dropdown-toggle {
  color: var(--blue); font: inherit; font-weight: 700; text-decoration: none;
}
.site-header #mainNav > a:not(.phone):not(.nav-phone),
.main-navigation > a:not(.phone):not(.nav-phone) { padding: 8px 0; }

.site-header #mainNav a:hover, .main-navigation a:hover,
.nav-dropdown-toggle:hover { color: var(--orange); }

.nav-dropdown { position: relative; min-width: 0; }
.nav-dropdown-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 0; border: 0; background: transparent; cursor: pointer;
}

.nav-submenu, .nav-dropdown-menu {
  display: none;
  position: absolute; top: 100%; left: 0; z-index: 1200;
  min-width: 230px; padding: 8px;
  border: 1px solid var(--border); border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(10, 35, 60, .16);
}.nav-dropdown.open .nav-submenu,
.nav-dropdown.open .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
display: flex;
flex-direction: column;
}

.nav-submenu a, .nav-dropdown-menu a {
  display: block; padding: 11px 12px; border-radius: 8px;
  color: var(--blue); text-decoration: none; font-weight: 600;
}
.nav-submenu a:hover, .nav-dropdown-menu a:hover { background: var(--light); }

/* Bouton telephone */
.site-header #mainNav > a.phone, .main-navigation > a.nav-phone {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 14px; border-radius: 9px;
  background: var(--blue); color: #fff; white-space: nowrap; text-decoration: none;
}
.site-header #mainNav > a.phone:hover, .main-navigation > a.nav-phone:hover {
  background: var(--orange); color: #fff;
}

/* Page active */
.site-header a[aria-current="page"],
.site-header .nav-dropdown-toggle[aria-current="page"] { color: var(--orange); font-weight: 700; }

/* Menu mobile et tablette */
@media (max-width: 950px) {
  html, body { overflow-x: hidden; }

  .site-header .nav, .header-inner { gap: 12px; }
  .site-logo { height: 44px; }
  .site-header .menu, .menu-toggle { display: flex; margin-left: auto; }

  .site-header #mainNav, .main-navigation {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0; z-index: 1200;
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: 0; width: 100%; max-width: 100%;
    max-height: calc(100vh - 90px); max-height: calc(100dvh - 90px);
    overflow-x: hidden; overflow-y: auto;
    margin-top: 6px; padding: 12px;
    border: 1px solid var(--border); border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(10, 35, 60, .16);
  }
  .site-header #mainNav.mobile-open,
.main-navigation.mobile-open,
.main-navigation.is-open {
display: flex;
 }

  .site-header #mainNav > a:not(.phone),
  .main-navigation > a:not(.nav-phone),
  .nav-dropdown-toggle {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; min-height: 46px; padding: 12px 10px;
    text-align: left; white-space: normal; overflow-wrap: anywhere;
  }
  .nav-dropdown { display: block; width: 100%; }

  .nav-submenu, .nav-dropdown-menu {
    position: static; width: 100%; min-width: 0; margin: 0;
    padding: 4px 0 8px 12px;
    border: 0; border-left: 2px solid var(--orange); border-radius: 0;
    background: var(--light); box-shadow: none;
  }
  .nav-submenu a, .nav-dropdown-menu a {
    width: 100%; padding: 12px 10px; white-space: normal; overflow-wrap: anywhere;
  }

  .site-header #mainNav > a.phone, .main-navigation > a.nav-phone {
    display: flex; width: 100%; min-height: 46px; margin-top: 8px; white-space: normal;
  }
}
@media (max-width: 380px) {
  .site-logo { height: 36px; }
  .site-header .menu, .menu-toggle { flex-basis: 40px; width: 40px; height: 40px; }
}

/* ---------- BOUTONS ---------- */
.btn {
  display: inline-block; padding: 13px 22px;
  border: 2px solid transparent; border-radius: 9px;
  font: inherit; font-weight: 700; text-decoration: none; text-align: center;
  cursor: pointer;
}
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: #d97a1c; }
.btn-secondary { background: #fff; color: var(--blue); }
.btn-secondary:hover { background: var(--light); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- ACCUEIL : HERO ---------- */
.hero {
  padding: 80px 0;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(16,35,52,.92), rgba(18,56,90,.8)),
    url("../images/Hero.jpg") center/cover no-repeat;
}
.hero-inner { max-width: 760px; }
.hero .eyebrow {
  display: inline-block; margin-bottom: 14px; padding: 6px 12px;
  border-radius: 999px; background: rgba(255,255,255,.14);
  font-size: 14px; font-weight: 700;
}
.hero h1 { margin: 0 0 16px; color: #fff; font-size: clamp(30px, 5vw, 48px); }
.hero p { margin: 0 0 24px; font-size: 18px; line-height: 1.7; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- ACCUEIL : BANDEAU DE CONFIANCE ---------- */
.trust-wrap { margin-top: -28px; position: relative; z-index: 2; }
.trust {
  padding: 18px; border: 1px solid var(--border); border-radius: 14px;
  background: #fff; box-shadow: 0 8px 24px rgba(16,35,52,.08);
}
.trust-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.trust-item { font-weight: 700; color: var(--blue); }
.trust-item span { display: block; margin-top: 2px; color: var(--dark); font-size: 14px; font-weight: 400; }

/* ---------- SECTIONS ---------- */
main section { padding: 56px 0; }
.section-head { max-width: 780px; margin: 0 auto 30px; text-align: center; }
.section-head h2 { margin: 0 0 10px; color: var(--blue); font-size: clamp(25px, 4vw, 34px); }
.section-head p { margin: 0; line-height: 1.8; }

/* Cartes services */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.card {
  overflow: hidden; border: 1px solid var(--border); border-radius: 14px;
  background: #fff; box-shadow: 0 5px 18px rgba(16,35,52,.06);
}
.card-img { display: block; width: 100%; height: 180px; object-fit: cover; }
.card-body { padding: 20px; }
.card-body h3 { margin: 0 0 8px; color: var(--blue); font-size: 20px; }
.card-body p { margin: 0 0 12px; line-height: 1.7; }
.link { color: var(--orange); font-weight: 700; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* A propos */
.about { background: var(--light); }
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; }
.about h2 { margin-top: 0; color: var(--blue); }
.check { display: flex; gap: 10px; margin: 10px 0; }
.check b { color: var(--orange); }
.about-img {
  min-height: 300px; border-radius: 14px;
  background: linear-gradient(rgba(16,35,52,.25), rgba(16,35,52,.25)), url("../images/Hero.jpg") center/cover no-repeat;
}

/* Domaines */
.domains { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.domain {
  padding: 22px 12px; border: 1px solid var(--border); border-radius: 12px;
  background: #fff; text-align: center; font-weight: 700; color: var(--blue);
}

/* Zone d'intervention */
.service-area { background: var(--light); }
.zone { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; padding: 0; list-style: none; }
.zone li {
  padding: 8px 16px; border: 1px solid var(--border); border-radius: 999px;
  background: #fff; font-weight: 600; color: var(--blue);
}
.zone a { text-decoration: none; }
.zone a:hover { color: var(--orange); }

/* ---------- CONTACT ET FORMULAIRE ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 28px; align-items: start; }
.contact-box, #devisForm {
  padding: 24px; border: 1px solid var(--border); border-radius: 14px; background: #fff;
}
.contact-box h3 { margin-top: 0; color: var(--blue); }
.contact-line { margin-bottom: 14px; }
.contact-line b { display: block; color: var(--blue); }

#devisForm label { display: block; margin: 14px 0 6px; font-weight: 700; color: var(--blue); }
#devisForm input[type="text"], #devisForm input[type="tel"], #devisForm input[type="email"],
#devisForm select, #devisForm textarea {
  width: 100%; padding: 12px; border: 1px solid #c9d4de; border-radius: 8px;
  font: inherit; color: var(--dark); background: #fff;
}
#devisForm input:focus, #devisForm select:focus, #devisForm textarea:focus,
.btn:focus-visible, .site-header button:focus-visible {
  outline: 3px solid rgba(242,140,40,.5); outline-offset: 2px;
}
.captcha-wrap { margin: 16px 0; overflow-x: auto; }
#devisForm .consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--dark); }
#devisForm .consent input { margin-top: 5px; flex: 0 0 auto; }
#devisForm .btn { width: 100%; margin-top: 8px; }
.form-status { margin: 14px 0 0; padding: 0; font-weight: 700; }
.form-status.success { padding: 12px; border-radius: 8px; background: #e7f6ec; color: #17653a; }
.form-status.error { padding: 12px; border-radius: 8px; background: #fdecea; color: #a12622; }
.form-note { margin: 14px 0 0; font-size: 14px; }


/* ---------- PIED DE PAGE ECP SUD ÉNERGIE ---------- */
footer,
.site-footer {
  display: block;
  width: 100%;
  margin: 0;
  padding: 38px 0 20px;
  color: #ffffff;
  background: #102334;
  border-top: 4px solid #f28c28;
}

footer p,
.site-footer p {
  color: #ffffff;
}

footer a,
.site-footer a {
  color: #ffffff;
}

.site-footer {
  text-align: center;
}

.site-footer p {
  margin: 6px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 28px;
}

.footer-title {
  margin-bottom: 10px;
  font-weight: 700;
}

.footer-grid a {
  display: block;
  margin: 6px 0;
  text-decoration: none;
  opacity: .9;
}

.footer-grid a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-grid p {
  margin: 8px 0;
  line-height: 1.7;
}

.copyright {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.18);
  text-align: center;
  font-size: 14px;
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}


/* ---------- BOUTON WHATSAPP FLOTTANT ---------- */
.whatsapp {
  position: fixed; right: 16px; bottom: 16px; z-index: 900;
  padding: 12px 18px; border-radius: 999px;
  background: #25d366; color: #fff; font-weight: 700; text-decoration: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .trust-grid, .domains { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .hero { padding: 56px 0; }
  .trust-grid, .domains, .footer-grid { grid-template-columns: 1fr; }
  main section { padding: 40px 0; }
  .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }


/* ---------- BANDEAU COMMUN DES PAGES ECP ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0;
  color: #ffffff;
  background-color: #12385a;
  background-image:
    linear-gradient(
      135deg,
      rgba(16, 35, 52, 0.55),
      rgba(18, 56, 90, 0.40)
    ),
    url("/images/Hero.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.page-hero h1,
.page-hero p {
  color: #ffffff;
}

.page-hero h1 {
  margin: 0 0 14px;
}

.page-hero p {
  margin: 0;
  max-width: 800px;
  line-height: 1.8;
}

@media (max-width: 600px) {
  .page-hero {
    padding: 48px 0;
  }
}



/* Photo de fond du bandeau Climatisation */
body:has(.main-navigation a[aria-current="page"][href="climatisation.html"]) .page-hero {
  position: relative;
  overflow: hidden;
  padding: 90px 0;
  color: #ffffff;
  background-color: #12385a;
  background-image:
    linear-gradient(
      rgba(10, 25, 40, 0.45),
      rgba(10, 25, 40, 0.45)
    ),
    url("/images/service-clim.jpg?v=7");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

body:has(.main-navigation a[aria-current="page"][href="climatisation.html"]) .page-hero h1,
body:has(.main-navigation a[aria-current="page"][href="climatisation.html"]) .page-hero p {
  color: #ffffff;
}

@media (max-width: 600px) {
  body:has(.main-navigation a[aria-current="page"][href="climatisation.html"]) .page-hero {
    padding: 55px 0;
  }
}

/* Photo de fond du bandeau Plomberie */
.plomberie-page .page-hero {
  padding: 90px 0;
  background-color: #12385a;
  background-image:
    linear-gradient(
      rgba(10, 25, 40, 0.45),
      rgba(10, 25, 40, 0.45)
    ),
    url("/images/service-plomberie.jpg?v=1");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.plomberie-page .page-hero h1,
.plomberie-page .page-hero p {
  color: #ffffff;
}

@media (max-width: 600px) {
  .plomberie-page .page-hero {
    padding: 55px 0;
  }
}

/* Photo de fond du bandeau Électricité */
.electricite-page .page-hero {
  padding: 90px 0;
  background-color: #12385a;
  background-image:
    linear-gradient(
      rgba(10, 25, 40, 0.45),
      rgba(10, 25, 40, 0.45)
    ),
    url("/images/service-electricite.jpg?v=3");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.electricite-page .page-hero h1,
.electricite-page .page-hero p {
  color: #ffffff;
}

@media (max-width: 600px) {
  .electricite-page .page-hero {
    padding: 55px 0;
  }
}
/* Correction forcée du bandeau Électricité */
body.electricite-page section.page-hero {
  background-image:
    linear-gradient(rgba(10, 25, 40, 0.45), rgba(10, 25, 40, 0.45)),
    url("../images/service-electricite.jpg?v=4") !important;
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}


/* Bandeau spécifique à la page Chauffage */
body.chauffage-page section.page-hero {
  background-color: #12385a !important;
  background-image:
    linear-gradient(rgba(10, 25, 40, 0.45), rgba(10, 25, 40, 0.45)),
    url("../images/service-chauffage.jpg?v=5") !important;
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}

/* Bandeau spécifique à la page Entretien et maintenance */
body.entretien-maintenance-page section.page-hero {
  background-color: #12385a !important;
  background-image:
    linear-gradient(rgba(10, 25, 40, 0.45), rgba(10, 25, 40, 0.45)),
    url("/images/service-maintenance.jpg?v=1") !important;
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}

/* Bandeau spécifique à Entretien et maintenance */
body.maintenance-page section.page-hero {
  background-color: #12385a !important;
  background-image:
    linear-gradient(rgba(10, 25, 40, 0.45), rgba(10, 25, 40, 0.45)),
    url("/images/service-maintenance.jpg?v=1") !important;
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}

/* ---------- PAGE RÉALISATIONS ---------- */
.gallery,
.chantiers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.gallery-item,
.chantiers figure {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 18px rgba(16,35,52,.06);
  font-weight: 700;
  color: var(--blue);
}
.gallery-photo {
  height: 200px;
  background-size: cover;
  background-position: center;
}
.gallery-item > div:last-child,
.chantiers figcaption { padding: 12px 16px; }
.chantiers img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.cta {
  text-align: center;
  color: #fff;
  background: var(--blue);
}
.cta h2, .cta p { color: #fff; }

/* Triangle du menu plus visible */
.nav-dropdown-toggle span { font-size: 20px; transition: transform .2s; }
.nav-dropdown.is-open .nav-dropdown-toggle span { transform: rotate(180deg); }
.nav-dropdown.open .nav-dropdown-toggle span { transform: rotate(180deg); }
/* Pied de page : le bouton WhatsApp ne cache plus le copyright */
footer, .site-footer { padding-bottom: 90px !important; }
  