/* =========================================================================
   Eau Secours — Feuille de style principale
   Palette : bleu profond #0A3D62 · cyan #00A8CC · orange #FF6B35
   Typo    : Poppins (titres) + Inter (corps)
   ========================================================================= */

:root {
  --bleu: #0A3D62;
  --bleu-nuit: #06283D;
  --cyan: #00A8CC;
  --orange: #FF6B35;
  --orange-fonce: #e85a28;
  --ardoise: #2C3E50;
  --gris: #5b6b7a;
  --creme: #F7F9FB;
  --bord: #e4eaf0;
  --blanc: #ffffff;

  --r: 14px;
  --r-sm: 10px;
  --shadow: 0 10px 30px rgba(10, 61, 98, .10);
  --shadow-sm: 0 4px 14px rgba(10, 61, 98, .08);
  --max: 1140px;
  --max-narrow: 760px;
  --font-titre: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --font-corps: 'Inter', 'Segoe UI', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

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

h1, h2, h3 { font-family: var(--font-titre); color: var(--bleu); line-height: 1.15; margin: 0 0 .5em; }

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.container--narrow { max-width: var(--max-narrow); }

.is-placeholder { opacity: .65; font-style: italic; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  font-family: var(--font-titre); font-weight: 600; font-size: .95rem;
  padding: .7em 1.4em; border-radius: 999px; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--lg { font-size: 1.05rem; padding: .85em 1.7em; }
.btn--primary { background: var(--orange); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--orange-fonce); color: #fff; }
.btn--phone { background: var(--orange); color: #fff; box-shadow: var(--shadow-sm); }
.btn--phone:hover { background: var(--orange-fonce); color: #fff; }
.btn--ghost { background: transparent; color: var(--bleu); border-color: var(--bleu); }
.btn--ghost:hover { background: var(--bleu); color: #fff; }
/* Ghost sur fond sombre (hero, sections dark) : contour blanc lisible */
.hero .btn--ghost,
.section--dark .btn--ghost { color: #fff; border-color: #fff; }
.hero .btn--ghost:hover,
.section--dark .btn--ghost:hover { background: #fff; color: var(--bleu); }

/* ---------- Topbar urgence ---------- */
.topbar { background: var(--bleu-nuit); color: #fff; font-size: .9rem; }
.topbar__inner { display: flex; align-items: center; justify-content: center; gap: 1.2rem; padding: .5rem 20px; flex-wrap: wrap; }
.topbar__phone { color: #fff; font-weight: 700; }
.topbar__phone:hover { color: var(--cyan); text-decoration: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: #fff;
  border-bottom: 1px solid var(--bord); transition: box-shadow .2s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 70px; }
.site-header__logo img { height: 40px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav__list { display: flex; align-items: center; gap: 1.4rem; list-style: none; margin: 0; padding: 0; }
.site-nav__list a { color: var(--ardoise); font-weight: 600; font-family: var(--font-titre); font-size: .95rem; }
.site-nav__list a:hover { color: var(--cyan); text-decoration: none; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 3px; background: var(--bleu); border-radius: 2px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; color: #fff;
  background: linear-gradient(135deg, var(--bleu-nuit) 0%, var(--bleu) 60%, #0d4f7a 100%);
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(5rem, 10vw, 8rem);
  overflow: hidden;
}
.hero__content { max-width: 720px; }
.hero__eyebrow { text-transform: uppercase; letter-spacing: 2px; font-size: .85rem; font-weight: 600; color: var(--cyan); margin: 0 0 1rem; }
.hero__title { color: #fff; font-size: clamp(2.1rem, 5.5vw, 3.4rem); font-weight: 800; margin-bottom: 1rem; }
.hero__title span { color: var(--cyan); }
.hero__lead { font-size: clamp(1.05rem, 2.5vw, 1.25rem); color: #d7e3ee; max-width: 620px; margin: 0 0 2rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; }
.hero__badges { display: flex; flex-wrap: wrap; gap: 1rem 1.5rem; list-style: none; margin: 0; padding: 0; font-weight: 600; color: #eaf3fa; }
.hero__badges li { font-size: .95rem; }
.hero__wave {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 60px;
  background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath d='M0 60 V30 Q300 0 600 30 T1200 30 V60 Z'/%3E%3C/svg%3E") bottom/100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 60' preserveAspectRatio='none'%3E%3Cpath d='M0 60 V30 Q300 0 600 30 T1200 30 V60 Z'/%3E%3C/svg%3E") bottom/100% 100% no-repeat;
}

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section--alt { background: var(--creme); }
.section--dark { background: linear-gradient(135deg, var(--bleu-nuit), var(--bleu)); color: #fff; }
.section--dark .section__title { color: #fff; }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 2.5rem; }
.section__eyebrow { text-transform: uppercase; letter-spacing: 2px; font-size: .8rem; font-weight: 700; color: var(--orange); margin: 0 0 .6rem; }
.section__eyebrow--light { color: var(--cyan); }
.section__title { font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 700; }
.section__sub { color: var(--gris); font-size: 1.05rem; }
.section--dark .section__sub { color: #cdd9e5; }
.section__cta { text-align: center; margin-top: 2.5rem; }

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

.card { background: #fff; border: 1px solid var(--bord); border-radius: var(--r); box-shadow: var(--shadow-sm); }

/* ---------- Services ---------- */
.service { padding: 1.8rem; transition: transform .2s ease, box-shadow .2s ease; }
.service:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.service__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 14px; margin-bottom: 1rem;
  background: rgba(0, 168, 204, .12); color: var(--bleu);
}
.service__title { font-size: 1.2rem; margin-bottom: .4rem; }
.service__desc { color: var(--gris); margin: 0; }

/* ---------- Zone ---------- */
.zone { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2.5rem; align-items: center; }
.zone__text p { color: var(--gris); margin-bottom: 1.5rem; }
.zone__card { background: #fff; border: 1px solid var(--bord); border-radius: var(--r); box-shadow: var(--shadow); padding: 2rem; text-align: center; }
.zone__pin { font-size: 2.4rem; }
.zone__city { font-family: var(--font-titre); font-weight: 700; font-size: 1.4rem; color: var(--bleu); margin: .4rem 0; }
.zone__hours { color: var(--gris); margin: 0; }

/* ---------- Atouts ---------- */
.atout { text-align: center; padding: 1rem; }
.atout__check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%; margin-bottom: .8rem;
  background: var(--orange); color: #fff; font-weight: 700; font-size: 1.2rem;
}
.atout h3 { font-size: 1.1rem; margin-bottom: .3rem; }
.atout p { color: var(--gris); margin: 0; font-size: .95rem; }

/* ---------- Process ---------- */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; list-style: none; margin: 0; padding: 0; counter-reset: step; }
.process__step { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--r); padding: 1.8rem 1.4rem; }
.process__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; margin-bottom: 1rem;
  background: var(--orange); color: #fff; font-family: var(--font-titre); font-weight: 700; font-size: 1.2rem;
}
.process__step h3 { color: #fff; font-size: 1.15rem; margin-bottom: .3rem; }
.process__step p { color: #cdd9e5; margin: 0; font-size: .95rem; }

/* ---------- Réalisations ---------- */
.realisation { display: flex; flex-direction: column; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.realisation:hover { transform: translateY(-4px); box-shadow: var(--shadow); text-decoration: none; }
.realisation__media { display: block; aspect-ratio: 3 / 2; background: var(--creme); overflow: hidden; }
.realisation__media img { width: 100%; height: 100%; object-fit: cover; }
.realisation__placeholder { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 2.5rem; }
.realisation__body { padding: 1.1rem 1.3rem 1.4rem; }
.realisation__title { display: block; color: var(--bleu); font-family: var(--font-titre); font-size: 1.1rem; }
.realisation__meta { display: block; color: var(--gris); font-size: .9rem; margin-top: .3rem; }

/* ---------- Témoignages ---------- */
.testimonial { background: #fff; border: 1px solid var(--bord); border-left: 4px solid var(--orange); border-radius: var(--r-sm); padding: 1.6rem; margin: 0; box-shadow: var(--shadow-sm); }
.testimonial p { font-style: italic; color: var(--ardoise); margin: 0 0 .8rem; }
.testimonial cite { color: var(--gris); font-style: normal; font-weight: 600; font-size: .9rem; }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: .8rem; }
.faq__item { background: #fff; border: 1px solid var(--bord); border-radius: var(--r-sm); padding: 0 1.2rem; box-shadow: var(--shadow-sm); }
.faq__item summary { cursor: pointer; font-family: var(--font-titre); font-weight: 600; color: var(--bleu); padding: 1rem 0; list-style: none; }
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: '+'; float: right; color: var(--orange); font-size: 1.3rem; line-height: 1; }
.faq__item[open] summary::after { content: '–'; }
.faq__item p { color: var(--gris); margin: 0 0 1rem; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.1fr; gap: 2.5rem; align-items: start; }
.contact--page .contact__intro { color: var(--ardoise); }
.section--dark .contact__intro p { color: #cdd9e5; }
.contact__coords { list-style: none; margin: 1.5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; font-size: 1.05rem; }
.section--dark .contact__coords { color: #eaf3fa; }
.section--dark .contact__coords a, .contact__phone { color: inherit; font-weight: 600; }

.contact-form { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 1.8rem; color: var(--ardoise); }
.contact-form__row { margin-bottom: 1rem; }
.contact-form__row--split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-form label { display: block; font-weight: 600; font-size: .9rem; color: var(--ardoise); }
.contact-form input, .contact-form textarea {
  width: 100%; margin-top: .35rem; padding: .7rem .9rem; font: inherit;
  border: 1px solid var(--bord); border-radius: var(--r-sm); background: #fff; color: var(--ardoise);
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--cyan); border-color: var(--cyan); }
.contact-form__hp { position: absolute; left: -9999px; }
.contact-form__submit { width: 100%; margin-top: .5rem; }
.contact-form__feedback { margin: 1rem 0 0; font-weight: 600; min-height: 1.2em; }
.contact-form__feedback.is-ok { color: #1a8a4a; }
.contact-form__feedback.is-error { color: #c0392b; }
.contact-form__legal { font-size: .8rem; color: var(--gris); margin: 1rem 0 0; }

/* ---------- Barre d'appel mobile ---------- */
.mobile-callbar { display: none; }

/* ---------- Pages internes ---------- */
.page-hero { background: linear-gradient(135deg, var(--bleu-nuit), var(--bleu)); color: #fff; padding: clamp(2.5rem, 7vw, 4rem) 0; }
.page-hero__title { color: #fff; font-size: clamp(1.8rem, 4.5vw, 2.8rem); }
.page-hero__lead { color: #d7e3ee; max-width: 640px; font-size: 1.1rem; }
.page-title { font-size: clamp(1.7rem, 4vw, 2.4rem); margin-bottom: 1.2rem; }

.rte { font-size: 1.05rem; color: var(--ardoise); }
.rte h2 { margin-top: 2rem; font-size: 1.4rem; }
.rte ul { padding-left: 1.2rem; }
.rte a { color: var(--cyan); }

.services-list { display: flex; flex-direction: column; gap: 1.2rem; }
.services-list__item { display: flex; gap: 1.2rem; align-items: flex-start; background: #fff; border: 1px solid var(--bord); border-radius: var(--r); box-shadow: var(--shadow-sm); padding: 1.6rem; }
.services-list__icon { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 14px; background: rgba(0, 168, 204, .12); color: var(--bleu); }
.services-list__item h2 { font-size: 1.25rem; margin-bottom: .3rem; }
.services-list__item p { color: var(--gris); margin: 0; }

.realisation-single__hero { max-height: 460px; overflow: hidden; }
.realisation-single__hero img { width: 100%; object-fit: cover; }
.realisation-single .container { padding-top: 2.5rem; padding-bottom: 3rem; }
.realisation-single__back { margin-bottom: 1rem; }
.realisation-single__meta { list-style: none; display: flex; flex-wrap: wrap; gap: 1rem; padding: 0; margin: 0 0 1.5rem; color: var(--gris); font-weight: 600; }
.realisation-single__cta { margin-top: 2.5rem; padding: 2rem; background: var(--creme); border-radius: var(--r); text-align: center; }
.realisation-single__cta .btn { margin: .3rem; }

/* Galerie de chantier (shortcode [gallery] classique ou bloc Galerie) */
.rte .gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 1.5rem 0; }
.rte .gallery-item { width: auto !important; margin: 0 !important; }
.rte .gallery-item img { width: 100%; height: 200px; object-fit: cover; border: 1px solid var(--bord); border-radius: var(--r-sm); transition: transform .2s ease; }
.rte .gallery-item img:hover { transform: scale(1.03); }
.rte .gallery .gallery-caption { display: none; }
.rte .wp-block-gallery img { border-radius: var(--r-sm); }
@media (max-width: 560px) { .rte .gallery { grid-template-columns: repeat(2, 1fr); } .rte .gallery-item img { height: 150px; } }

/* Lightbox galerie */
.es-lightbox { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; padding: 2rem; background: rgba(6, 40, 61, .94); }
.es-lightbox.is-open { display: flex; }
.es-lightbox__stage { margin: 0; display: flex; flex-direction: column; align-items: center; gap: .7rem; max-width: 92vw; max-height: 88vh; }
.es-lightbox__img { max-width: 92vw; max-height: 82vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.es-lightbox__count { color: #cdd9e5; font-size: .9rem; }
.es-lightbox__close { position: absolute; top: 16px; right: 24px; background: none; border: 0; color: #fff; font-size: 2.6rem; line-height: 1; cursor: pointer; }
.es-lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 54px; height: 54px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 2.4rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s ease; }
.es-lightbox__nav:hover { background: rgba(255, 255, 255, .28); }
.es-lightbox__prev { left: 20px; }
.es-lightbox__next { right: 20px; }
@media (max-width: 560px) { .es-lightbox__nav { width: 44px; height: 44px; font-size: 2rem; } .es-lightbox__prev { left: 8px; } .es-lightbox__next { right: 8px; } }

.empty-state { text-align: center; color: var(--gris); font-size: 1.1rem; }
.pagination { margin-top: 2.5rem; text-align: center; }
.pagination .page-numbers { display: inline-block; padding: .5rem .9rem; margin: 0 .2rem; border-radius: var(--r-sm); border: 1px solid var(--bord); color: var(--bleu); }
.pagination .current { background: var(--bleu); color: #fff; border-color: var(--bleu); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bleu-nuit); color: #cdd9e5; }
.site-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; padding: 3rem 20px; }
.site-footer__logo { height: 44px; width: auto; margin-bottom: 1rem; }
.site-footer__tagline { color: #9fb3c4; }
.site-footer h3 { color: #fff; font-size: 1.05rem; margin-bottom: 1rem; }
.site-footer__list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.site-footer__list a, .site-footer__list { color: #cdd9e5; }
.site-footer__list a:hover { color: var(--cyan); }
.site-footer__social { display: flex; gap: 1rem; margin-top: 1rem; }
.site-footer__social a { color: var(--cyan); font-weight: 600; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .1); font-size: .85rem; }
.site-footer__bottom p { padding: 1.2rem 0; margin: 0; color: #9fb3c4; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 960px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 1rem;
    background: #fff; border-bottom: 1px solid var(--bord); box-shadow: var(--shadow);
    padding: 1.2rem 20px; transform: translateY(-12px); opacity: 0; pointer-events: none; transition: .2s;
  }
  .site-nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .site-nav__list { flex-direction: column; align-items: stretch; gap: .2rem; }
  .site-nav__list a { display: block; padding: .6rem 0; border-bottom: 1px solid var(--bord); }
  .site-nav__cta { justify-content: center; }

  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .zone { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }

  /* Barre d'appel mobile fixe */
  .mobile-callbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    box-shadow: 0 -4px 14px rgba(10, 61, 98, .15);
  }
  .mobile-callbar a { flex: 1; text-align: center; padding: .9rem; font-family: var(--font-titre); font-weight: 700; }
  .mobile-callbar a:hover { text-decoration: none; }
  .mobile-callbar__call { background: var(--orange); color: #fff; }
  .mobile-callbar__quote { background: var(--bleu); color: #fff; }
  body { padding-bottom: 56px; }
}

@media (max-width: 560px) {
  .grid--3, .grid--4, .process { grid-template-columns: 1fr; }
  .contact-form__row--split { grid-template-columns: 1fr; }
  .hero__cta .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
