/* ============================================================
   CMC — Plomberie & Chauffage
   Feuille de style principale
   ============================================================ */

:root {
  --primary: #1c3b5c;
  --primary-dark: #142b44;
  --primary-light: #556f88;
  --accent: #e7ac35;
  --accent-dark: #a66f0e;
  --ink: #1e2a2f;
  --muted: #5b6b73;
  --bg: #ffffff;
  --bg-alt: #f2f7fa;
  --border: #dfe7ec;
  --danger: #c0392b;
  --shadow-sm: 0 2px 10px rgba(30, 42, 47, .08);
  --shadow-md: 0 10px 30px rgba(30, 42, 47, .12);
  --radius: 16px;
  --container: 1120px;
  --font: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.6;
  background: var(--bg);
  overflow-x: hidden;
  overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.2; }
p { margin: 0 0 1em; }

/* ---------- Icônes SVG (remplacent les emojis) ---------- */
.i {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -4px;
}
.i-sm { width: 16px; height: 16px; vertical-align: -3px; }
.i-lg { width: 30px; height: 30px; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 15px 30px; font-size: 1.05rem; }
.btn-small { padding: 8px 16px; font-size: .92rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: var(--shadow-md); }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.7); }
.btn-ghost:hover { background: rgba(255,255,255,.22); }
.btn-treat { background: var(--accent); color: #fff; }

/* ---------- Barre d'accueil (topbar) ---------- */
.topbar {
  background: var(--primary-dark);
  color: #eaf6f9;
  font-size: .92rem;
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
}
.topbar a { color: var(--accent); font-weight: 700; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar-item { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; }
.topbar-item .i { color: var(--accent); flex-shrink: 0; }
.topbar-item a { white-space: nowrap; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--border);
  box-shadow: 0 4px 20px rgba(28, 59, 92, .06);
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; }
.brand-logo {
  height: 72px;
  width: auto;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(28, 59, 92, .12);
  transition: transform .2s ease;
}
.brand:hover .brand-logo { transform: scale(1.04); }
.brand-text {
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--primary);
  letter-spacing: -.3px;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-text::before {
  content: "CMC";
  font-size: 1.5rem;
  color: var(--ink);
  letter-spacing: .5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a:not(.btn) {
  color: var(--ink);
  font-weight: 700;
  font-size: 1.02rem;
  padding: 8px 0;
  position: relative;
  transition: color .2s ease;
}
.nav-links a:not(.btn):hover { color: var(--primary); }
.nav-links a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width .25s ease;
}
.nav-links a:not(.btn):hover::after { width: 100%; }
.nav-link-accent { color: var(--accent) !important; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }

.nav-toggle {
  display: none;
  background: none; border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav-toggle span {
  width: 24px; height: 3px;
  background: var(--ink);
  border-radius: 3px;
  transition: .3s;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #142b44 0%, #1c3b5c 55%, #2c5178 100%);
  overflow: hidden;
}
.hero-overlay {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.14), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(231,172,53,.22), transparent 45%);
}
.hero-content { position: relative; text-align: center; max-width: 760px; padding: 60px 0; }
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.4);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: .85rem;
  letter-spacing: .6px;
  text-transform: uppercase;
  margin-bottom: 22px;
}
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
.hero-sub { font-size: 1.15rem; opacity: .95; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 34px; }
.hero-badges {
  list-style: none;
  display: flex;
  gap: 22px; justify-content: center; flex-wrap: wrap;
  margin: 0 0 26px; padding: 0;
  font-weight: 600;
}
/* ---------- Mascottes hero (de chaque côté du texte) ---------- */
.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 560px) minmax(0, 1.15fr);
  align-items: center;
  gap: 8px;
  padding: 48px 16px;
  max-width: 1600px;
  margin: 0 auto;
}
.hero-mascot { display: flex; align-items: center; justify-content: center; }
.hero-mascot img {
  width: 100%;
  max-width: 520px;
  height: auto;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .4));
  animation: mascot-float 3.4s ease-in-out infinite;
}
.hero-mascot-right img { animation-delay: 1.7s; }
@keyframes mascot-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}

/* ---------- Sections communes ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }
.section-contact { background: linear-gradient(180deg, var(--bg-alt), var(--bg)); }

.eyebrow {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
  font-size: .82rem;
  margin-bottom: 8px;
  text-align: center;
}
.section-title { text-align: center; font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.section-intro { text-align: center; max-width: 620px; margin: 6px auto 44px; color: var(--muted); }

/* ---------- Services ---------- */
.grid-services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: rgba(28, 59, 92, .08);
  color: var(--primary);
  margin-bottom: 16px;
}
.card-icon .i { width: 26px; height: 26px; }
.card h3 { font-size: 1.15rem; }
.card p { color: var(--muted); font-size: .96rem; margin: 0; }

/* ---------- Pourquoi CMC ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.why-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 26px 22px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease;
}
.why-item:hover { transform: translateY(-4px); }
.w-icon {
  width: 50px; height: 50px;
  display: grid; place-items: center;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: rgba(231, 172, 53, .14);
  color: var(--accent-dark);
}
.w-icon .i { width: 24px; height: 24px; }
.why-item h3 { font-size: 1.05rem; }
.why-item p { color: var(--muted); font-size: .92rem; margin: 0; }

/* ---------- Galerie photos dynamique ---------- */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.gallery-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--muted);
  font-weight: 600;
}
.gallery-item {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid rgba(28, 59, 92, .08);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(28, 59, 92, .18);
  border-color: rgba(28, 59, 92, .2);
}
.gallery-item:focus-visible {
  outline: 3px solid rgba(231, 172, 53, .75);
  outline-offset: 4px;
}
.gallery-item-empty {
  cursor: default;
}
.gallery-item-empty:hover {
  transform: none;
  box-shadow: var(--shadow-md);
  border-color: rgba(28, 59, 92, .08);
}
.gallery-item-media {
  position: relative;
  overflow: hidden;
}
.gallery-item-img {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  display: block;
  background: #e2e8f0;
}
.gallery-item-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 18px 20px;
}
.gallery-item-body h3 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  color: var(--ink);
}
.gallery-item-body p {
  margin: 0 0 16px;
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.4;
}
.gallery-item-description {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.gallery-item-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  color: var(--primary);
  font-size: .86rem;
  font-weight: 800;
}
.gallery-item-empty .gallery-item-action { color: var(--muted); }
.gallery-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--primary-light);
  color: #fff;
  margin-bottom: 8px;
}

.gallery-count-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(10, 24, 39, .82);
  color: #fff;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 700;
  pointer-events: none;
  backdrop-filter: blur(6px);
}
.gallery-count-badge .i { width: 14px; height: 14px; }

/* ---------- Visionneur « fiche chantier » ---------- */
body.gallery-open {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
}
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(7, 17, 28, .84);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease, visibility .22s ease;
}
.gallery-lightbox.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.lightbox-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(310px, .85fr);
  width: min(1180px, 100%);
  height: min(820px, calc(100dvh - 48px));
  min-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 24px;
  background: #0d1b2a;
  box-shadow: 0 30px 90px rgba(0,0,0,.46);
  transform: translateY(14px) scale(.985);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.gallery-lightbox.open .lightbox-shell {
  transform: translateY(0) scale(1);
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 5;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(28,59,92,.12);
  border-radius: 50%;
  background: rgba(255,255,255,.94);
  color: var(--primary-dark);
  box-shadow: 0 8px 24px rgba(0,0,0,.16);
  cursor: pointer;
  transition: transform .18s ease, background .18s ease;
}
.lightbox-close:hover {
  background: #fff;
  transform: rotate(4deg) scale(1.05);
}
.lightbox-close:focus-visible,
.lightbox-arrow:focus-visible,
.lightbox-dot:focus-visible,
.lightbox-thumbnail:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
.lightbox-media {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  background:
    radial-gradient(circle at 50% 35%, rgba(85,111,136,.25), transparent 44%),
    #0b1724;
}
.lightbox-image-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  touch-action: pan-y;
}
.lightbox-image {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  background: rgba(6, 17, 29, .62);
  color: #fff;
  cursor: pointer;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
  transition: background .18s ease, transform .18s ease;
}
.lightbox-arrow:hover {
  background: var(--primary);
  transform: translateY(-50%) scale(1.06);
}
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }
.lightbox-arrow[hidden] { display: none; }
.lightbox-progress {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  color: #fff;
}
.lightbox-counter {
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .45px;
  white-space: nowrap;
}
.lightbox-dots {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}
.lightbox-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.35);
  cursor: pointer;
  transition: width .18s ease, background .18s ease;
}
.lightbox-dot.active {
  width: 24px;
  background: var(--accent);
}
.lightbox-details {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}
.lightbox-details-content {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 78px 34px 18px;
}
.lightbox-kicker {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
}
.lightbox-details-content .gallery-badge { margin-bottom: 16px; }
.lightbox-details-content h2 {
  margin: 0 0 16px;
  color: var(--ink);
  font-size: clamp(1.55rem, 2.4vw, 2.15rem);
  letter-spacing: -.5px;
}
.lightbox-details-content > p:not(.lightbox-kicker) {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.7;
}
.lightbox-thumbnails {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 24px;
}
.lightbox-thumbnail {
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #e8eef2;
  opacity: .72;
  cursor: pointer;
  transition: opacity .18s ease, border-color .18s ease, transform .18s ease;
}
.lightbox-thumbnail:hover { opacity: 1; transform: translateY(-2px); }
.lightbox-thumbnail.active {
  border-color: var(--accent);
  opacity: 1;
}
.lightbox-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lightbox-cta {
  width: auto;
  flex: none;
  margin: 18px 34px 32px;
}

@media (max-width: 760px) {
  .gallery-lightbox {
    padding: 0;
    background: #07111c;
  }
  .lightbox-shell {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    display: flex;
    flex-direction: column;
    border: 0;
    border-radius: 0;
    transform: translateY(18px);
  }
  .lightbox-close {
    top: max(14px, env(safe-area-inset-top));
    right: 14px;
    width: 44px;
    height: 44px;
    border-color: rgba(255,255,255,.16);
    background: rgba(7,17,28,.72);
    color: #fff;
    backdrop-filter: blur(8px);
  }
  .lightbox-media {
    flex: 0 0 min(56dvh, 540px);
    min-height: 320px;
  }
  .lightbox-progress {
    min-height: 52px;
    padding: 9px 18px;
  }
  .lightbox-arrow {
    width: 44px;
    height: 44px;
  }
  .lightbox-prev { left: 12px; }
  .lightbox-next { right: 12px; }
  .lightbox-details {
    flex: 1 1 auto;
    min-height: 0;
    border-radius: 22px 22px 0 0;
    margin-top: -1px;
  }
  .lightbox-details-content {
    padding: 22px 20px 0;
  }
  .lightbox-kicker { margin-bottom: 8px; }
  .lightbox-details-content .gallery-badge { margin-bottom: 11px; }
  .lightbox-details-content h2 {
    margin-bottom: 10px;
    font-size: 1.38rem;
  }
  .lightbox-details-content > p:not(.lightbox-kicker) {
    margin-bottom: 18px;
    font-size: .94rem;
    line-height: 1.55;
  }
  .lightbox-thumbnails { display: none; }
  .lightbox-cta {
    margin: 18px 20px calc(24px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 760px) and (max-height: 720px) {
  .lightbox-media {
    flex-basis: min(50dvh, 430px);
    min-height: 270px;
  }
  .lightbox-details-content { padding-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-lightbox,
  .lightbox-shell,
  .lightbox-arrow,
  .lightbox-close,
  .lightbox-thumbnail {
    transition: none;
  }
}

.ba-img-label {
  position: absolute;
  top: 14px;
  z-index: 4;
  background: rgba(0,0,0,.55);
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .4px;
  pointer-events: none;
}
.ba-label-before { left: 14px; background: rgba(90,70,40,.8); }
.ba-label-after { right: 14px; background: var(--primary); }

/* ---------- Avis ---------- */
.rating-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  margin-bottom: 36px;
}
.rating-stars { color: var(--accent); font-size: 1.6rem; letter-spacing: 2px; }
.rating-num { font-weight: 800; font-size: 1.2rem; }

.carousel { position: relative; max-width: 780px; margin: 0 auto; }
.carousel-track-wrapper { overflow: hidden; border-radius: var(--radius); }
.carousel-track {
  display: flex;
  transition: transform .45s cubic-bezier(.25, 1, .5, 1);
}
.review {
  flex: 0 0 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 40px;
  box-shadow: var(--shadow-sm);
  margin: 0;
}
.review-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.review-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--primary-light);
  color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 1.2rem;
}
.review h4 { margin: 0; font-size: 1.15rem; }
.review-stars { color: var(--accent); font-size: 1.1rem; }
.review-text { font-size: 1.08rem; line-height: 1.6; color: var(--ink); margin-bottom: 16px; }
.review-date { color: var(--muted); font-size: .88rem; font-weight: 600; }

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 24px;
}
.carousel-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--primary);
  font-size: 1.6rem;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all .2s ease;
}
.carousel-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: scale(1.08);
}
.carousel-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.carousel-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  transition: all .25s ease;
  padding: 0;
}
.carousel-dot.active { background: var(--primary); width: 26px; border-radius: 999px; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  padding: 18px 22px;
  font: inherit;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.faq-q::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--primary);
  transition: transform .25s ease;
  flex-shrink: 0;
}
.faq-q[aria-expanded="true"]::after { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.faq-a p { padding: 0 22px 18px; margin: 0; color: var(--muted); }

/* ---------- Bouton d'appel flottant ---------- */
.float-call {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  padding: 14px 20px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(30, 42, 47, .3);
  transition: background .15s ease, transform .15s ease;
}
.float-call:hover { background: var(--primary-dark); transform: translateY(-2px); }
.float-call span { font-size: .95rem; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: start;
}
.contact-info .section-title { text-align: left; }
.contact-info .section-intro, .contact-info h2 { text-align: left; }
.contact-info > p { color: var(--muted); }
.contact-list { list-style: none; margin: 24px 0 0; padding: 0; }
.contact-list li {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 0;
  font-weight: 600;
  color: var(--ink);
}
.contact-list a { color: var(--ink); }
.contact-list a:hover { color: var(--primary); }
.c-icon {
  width: 42px; height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--primary-light);
  display: grid; place-items: center;
  color: #fff;
}
.c-icon .i { width: 20px; height: 20px; }

.contact-form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 34px 30px;
  position: relative;
}
.form-header-badge {
  display: inline-block;
  background: rgba(231, 172, 53, .14);
  color: #9c6c0e;
  border: 1px solid rgba(231, 172, 53, .4);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.contact-form h3 { margin-bottom: 18px; font-size: 1.4rem; color: var(--primary); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-field { min-width: 0; margin-bottom: 16px; }
.form-field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: .92rem; color: var(--ink); }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: #fbfdfe;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(28,59,92,.18);
  background: #fff;
}
.form-field input.invalid,
.form-field select.invalid,
.form-field textarea.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(192,57,43,.15); }
.form-address-hint {
  margin: -5px 0 17px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: #f7fafc;
  color: #526579;
  font-size: .8rem;
  line-height: 1.45;
}

/* Puces urgence */
.urgency-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chip {
  cursor: pointer;
  margin: 0;
  display: inline-flex;
}
.chip input { display: none; }
.chip span {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #f8fafc;
  font-size: .86rem;
  font-weight: 600;
  color: var(--muted);
  transition: all .15s ease;
}
.chip input:checked + span {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(28, 59, 92, .25);
}

/* Zone d'upload photos */
.photo-dropzone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  background: #f8fbfe;
  cursor: pointer;
  transition: all .2s ease;
  position: relative;
}
.photo-dropzone:hover, .photo-dropzone.dragover {
  border-color: var(--primary);
  background: #edf5fb;
}
.file-input-hidden {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.dropzone-icon { display: block; margin: 0 auto 8px; color: #94a3b8; }
.dropzone-content p { margin: 0 0 4px; font-size: .92rem; color: var(--ink); }
.dropzone-hint { font-size: .78rem; color: var(--muted); display: block; }

.photo-previews {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  justify-content: center;
}
.preview-item {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.preview-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0,0,0,.7);
  color: #fff;
  border: none;
  font-size: 11px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* Feedback & Devis instantané */
.form-feedback {
  margin: 16px 0;
  padding: 16px 18px;
  border-radius: 12px;
  font-size: .95rem;
  line-height: 1.5;
}
.form-feedback.success {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  color: #166534;
}
.form-feedback.error {
  background: #fef2f2;
  border: 1.5px solid #fca5a5;
  color: #991b1b;
}
.form-feedback-title { font-weight: 800; font-size: 1.05rem; margin-bottom: 6px; }
.form-feedback-diag { font-size: .9rem; color: #1e293b; margin-bottom: 8px; }
.form-feedback-price {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--primary);
  background: rgba(28, 59, 92, .08);
  padding: 6px 12px;
  border-radius: 8px;
  display: inline-block;
}

.admin-link {
  font-weight: 700 !important;
  color: var(--accent) !important;
}
.admin-link:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: #101f33; color: #cfe0e6; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding: 48px 20px;
}
.footer-brand { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.footer-logo { height: 64px; width: auto; border-radius: 8px; }
.site-footer .brand-text { color: #fff; }
.site-footer .brand-text::before { color: #fff; }
.site-footer p { color: #a9c4cc; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer ul li { padding: 4px 0; }
.site-footer a { color: #cfe0e6; }
.site-footer a:hover { color: #fff; }
.footer-contact { display: flex; flex-direction: column; }
.footer-contact a { font-weight: 600; padding: 4px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 20px; text-align: center; }
.footer-bottom p { margin: 0; font-size: .9rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-layout { grid-template-columns: 1fr; gap: 8px; padding: 32px 20px; }
  .hero-mascot img { max-width: 320px; }
  .photo-gallery { grid-template-columns: 1fr 1fr; }
  .grid-services { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .ba-gallery { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .topbar-inner { font-size: .82rem; }
}

@media (max-width: 640px) {
  .section { padding: 64px 0; }

  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 92px;
    right: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: min(280px, calc(100vw - 24px));
    background: #fff;
    box-shadow: var(--shadow-md);
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius) var(--radius);
    transform: translate3d(0, -10px, 0) scale(.985);
    transform-origin: top right;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform .22s ease, opacity .22s ease, visibility .22s ease;
  }
  .nav-links.open {
    transform: translate3d(0, 0, 0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .nav-links li { margin: 4px 0; }
  .nav-links .btn { text-align: center; }

  .photo-gallery { grid-template-columns: 1fr; }
  .grid-services { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .topbar-inner { flex-direction: column; gap: 4px; text-align: center; }
  .float-call { padding: 12px 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-badges { gap: 12px; }
}

/* ============================================================
   NOTIFICATIONS TOAST MODERNES (ZÉRO ALERT POPUP)
   ============================================================ */
.cmc-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.cmc-toast {
  pointer-events: auto;
  min-width: 280px;
  max-width: 420px;
  padding: 12px 18px;
  border-radius: 12px;
  background: #fff;
  color: #1e293b;
  font-size: .9rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,.15), 0 2px 6px rgba(0,0,0,.08);
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 5px solid #1c3b5c;
  animation: toastSlideIn .25s ease-out forwards;
  transition: opacity .25s ease, transform .25s ease;
}
.cmc-toast.success { border-left-color: #10b981; background: #f0fdf4; color: #166534; }
.cmc-toast.error { border-left-color: #ef4444; background: #fff5f5; color: #991b1b; }
.cmc-toast.warning { border-left-color: #f59e0b; background: #fffbeb; color: #92400e; }
.cmc-toast.info { border-left-color: #3b82f6; background: #eff6ff; color: #1e40af; }
@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.cmc-toast.fade-out {
  opacity: 0;
  transform: translateY(10px) scale(.95);
}

/* Appel à l'action avis clients */
.review-cta {
  margin-top: 28px;
  text-align: center;
  padding: 22px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}
.review-cta p {
  margin: 0 0 12px;
  color: #475569;
  font-size: .95rem;
}

/* ============================================================
   SECTION CONTACT — BANDE COORDONNEES + FORMULAIRE PLEINE LARGEUR
   ============================================================ */
.contact-heading { text-align: center; margin-bottom: 26px; }

.contact-strip {
  list-style: none;
  margin: 0 0 28px;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  background: var(--primary);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(28, 59, 92, .18);
}
.contact-strip li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.contact-strip li + li { border-left: 1px solid rgba(255,255,255,.16); padding-left: 18px; }
.contact-strip .c-icon {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255,255,255,.14) !important;
  font-size: 1.1rem;
}
.contact-strip div { display: flex; flex-direction: column; min-width: 0; }
.contact-strip .c-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255,255,255,.62);
  font-weight: 700;
}
.contact-strip a, .contact-strip span:not(.c-icon):not(.c-label) {
  color: #fff;
  font-weight: 600;
  font-size: .92rem;
  text-decoration: none;
  line-height: 1.35;
}
.contact-strip a:hover { color: var(--gold, #e7ac35); }

/* Pastille Instagram : dégradé officiel au survol */
.contact-strip .c-icon-ig svg { display: block; }
.contact-strip li:hover .c-icon-ig {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) !important;
}
.contact-strip .c-icon-ig { transition: background .2s ease; }

/* Lien Instagram du pied de page */
.footer-ig {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.footer-ig svg { flex: none; }

/* Formulaire pleine largeur */
.section-contact .contact-form { max-width: 100%; }

/* ============================================================
   SELECTEUR PERSONNALISE (remplace le menu natif)
   ============================================================ */
.fancy-select { position: relative; min-width: 0; }
.fancy-select select { display: none; }

.fancy-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font: inherit;
  font-size: .95rem;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.fancy-trigger:hover { border-color: #94a3b8; }
.fancy-select.open .fancy-trigger {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(28, 59, 92, .12);
}
.fancy-trigger .ft-icon { display: inline-flex; line-height: 1; color: var(--primary); }
.fancy-trigger.is-placeholder .ft-icon { color: #94a3b8; }
.fancy-trigger .ft-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fancy-trigger.is-placeholder .ft-label { color: #94a3b8; }
.fancy-trigger .ft-arrow {
  flex: none;
  color: #64748b;
  font-size: .7rem;
  transition: transform .2s ease;
}
.fancy-select.open .ft-arrow { transform: rotate(180deg); }

.fancy-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 50;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .16);
  padding: 6px;
  max-height: 300px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.fancy-select.open .fancy-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.fancy-option {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: .92rem;
  color: var(--ink);
  transition: background .12s ease;
}
.fancy-option > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}
.fancy-option:hover, .fancy-option.active { background: #f1f5f9; }
.fancy-option[aria-selected="true"] {
  background: rgba(28, 59, 92, .07);
  font-weight: 700;
  color: var(--primary);
}
.fancy-option .fo-icon {
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--primary);
}
.fancy-option .fo-icon .i { width: 17px; height: 17px; }
.fancy-option[aria-selected="true"] .fo-icon { background: #fff; }

@media (max-width: 900px) {
  .contact-strip { grid-template-columns: 1fr 1fr; }
  .contact-strip li + li { border-left: none; padding-left: 0; }
}
@media (max-width: 560px) {
  .contact-strip { grid-template-columns: 1fr; gap: 14px; }
}

/* ============================================================
   GÉNÉRATION DE DEVIS — FICHE CHANTIER ANIMÉE
   ============================================================ */
.quote-progress {
  --progress-stage: 12%;
  position: relative;
  margin: 0 0 14px;
  padding: clamp(16px, 2.5vw, 22px);
  overflow: hidden;
  border: 1px solid #cbdce8;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(231, 172, 53, .1), transparent 42%),
    #f8fbfd;
  color: #193754;
  box-shadow: inset 0 1px 0 #fff, 0 10px 24px rgba(25, 55, 84, .08);
}
.quote-progress[hidden] { display: none; }
.quote-progress[data-stage="2"] { --progress-stage: 38%; }
.quote-progress[data-stage="3"] { --progress-stage: 66%; }
.quote-progress[data-stage="4"] { --progress-stage: 90%; }
.quote-progress[data-stage="complete"] { --progress-stage: 100%; }

.quote-progress-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.quote-progress-heading > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.quote-progress-title { font-size: 1rem; line-height: 1.25; }
.quote-progress-time { margin-top: 2px; color: #60768a; font-size: .75rem; line-height: 1.35; }
.quote-progress-tool {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 13px;
  background: #193754;
  color: #fff;
}
.quote-progress-tool .i {
  width: 23px;
  height: 23px;
  animation: quoteToolTurn 1.4s ease-in-out infinite;
}

.quote-progress-pipe {
  position: relative;
  height: 10px;
  margin: 0 5px 18px;
  overflow: visible;
  border: 2px solid #b9cbd8;
  border-radius: 999px;
  background: #e6eef3;
  box-shadow: inset 0 1px 2px rgba(25, 55, 84, .12);
}
.quote-progress-flow {
  display: block;
  width: var(--progress-stage);
  height: 100%;
  border-radius: inherit;
  background: repeating-linear-gradient(
    115deg,
    #2f779f 0 10px,
    #3d8db5 10px 20px
  );
  transition: width .7s cubic-bezier(.22, .8, .25, 1);
  animation: quoteWaterFlow .8s linear infinite;
}
.quote-progress-valve {
  position: absolute;
  top: 50%;
  left: var(--progress-stage);
  width: 16px;
  height: 16px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #e7ac35;
  box-shadow: 0 1px 5px rgba(25, 55, 84, .3);
  transform: translate(-50%, -50%);
  transition: left .7s cubic-bezier(.22, .8, .25, 1);
}

.quote-progress-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.quote-progress-step {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 9px;
  color: #718395;
  transition: color .25s ease;
}
.quote-progress-step > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.quote-progress-step strong { font-size: .78rem; line-height: 1.3; }
.quote-progress-step small { margin-top: 2px; font-size: .69rem; line-height: 1.35; }
.quote-progress-step-icon {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border: 1px solid #c8d5de;
  border-radius: 8px;
  background: #fff;
  font-size: .68rem;
  font-weight: 800;
}
.quote-progress-step-check { display: none; width: 14px; height: 14px; }
.quote-progress-step.is-active { color: #193754; }
.quote-progress-step.is-active .quote-progress-step-icon {
  border-color: #e7ac35;
  background: #fff8e8;
  color: #855d0d;
  box-shadow: 0 0 0 3px rgba(231, 172, 53, .16);
}
.quote-progress-step.is-done { color: #32644f; }
.quote-progress-step.is-done .quote-progress-step-icon {
  border-color: #84b49f;
  background: #eaf7f1;
  color: #176544;
}
.quote-progress-step.is-done .quote-progress-step-number { display: none; }
.quote-progress-step.is-done .quote-progress-step-check { display: block; }
.quote-progress-note {
  margin: 14px 0 0;
  padding-top: 11px;
  border-top: 1px dashed #cad8e2;
  color: #50697d;
  font-size: .76rem;
  font-style: italic;
  line-height: 1.4;
  text-align: center;
}
.quote-progress.is-complete {
  border-color: #9ac9b4;
  background: #f1fbf6;
}
.quote-progress.is-complete .quote-progress-tool { background: #176544; }
.quote-progress.is-error {
  border-color: #e5b6b6;
  background: #fff7f7;
}
.quote-progress.is-error .quote-progress-tool { background: #9f3030; }
.quote-progress.is-error .quote-progress-flow { background: #bd5555; animation: none; }

@keyframes quoteToolTurn {
  0%, 100% { transform: rotate(-9deg); }
  50% { transform: rotate(11deg); }
}
@keyframes quoteWaterFlow {
  to { background-position: 20px 0; }
}

@media (max-width: 560px) {
  .quote-progress { padding: 15px 13px; border-radius: 14px; }
  .quote-progress-steps { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .quote-progress-step small { font-size: .72rem; }
}

@media (prefers-reduced-motion: reduce) {
  .quote-progress-tool .i,
  .quote-progress-flow { animation: none; }
  .quote-progress-flow,
  .quote-progress-valve { transition: none; }
}
