/* Page Zones d'intervention — Halo Butler
   Styles propres à /zones-intervention/ (préfixe hbz-), en complément de main.css. */

:root {
  --hbz-primary: #344D42;
  --hbz-accent: #4F6D5F;
  --hbz-highlight: #A7C4B5;
  --hbz-mist: #EEF3F0;
  --hbz-ink: #22332B;
  --hbz-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --hbz-ease-out: cubic-bezier(0.05, 0.7, 0.1, 1);
  --hbz-settle: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hbz-wrap {
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) { .hbz-wrap { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .hbz-wrap { padding: 0 2rem; } }

/* ---------- Hero ---------- */
.hbz-hero {
  border-radius: 0 0 2.5rem 2.5rem;
  padding: 2rem 0 3.5rem;
  overflow: hidden;
}
@media (min-width: 1024px) { .hbz-hero { padding: 2.5rem 0 5rem; } }

.hbz-breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
}
.hbz-breadcrumb li + li::before {
  content: "/";
  margin-right: 0.5rem;
  color: rgba(255, 255, 255, 0.4);
}
.hbz-breadcrumb a { color: rgba(255, 255, 255, 0.85); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.35); }
.hbz-breadcrumb a:hover { color: #fff; }

.hbz-hero-grid {
  display: grid;
  gap: 2.5rem;
  margin-top: 2rem;
  align-items: center;
}
@media (min-width: 1024px) {
  .hbz-hero-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 3rem; }
}

.hbz-hero-copy h1 {
  font-size: clamp(2rem, 1.5rem + 1.6vw, 3.1rem);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.015em;
  max-width: 22ch;
  margin: 0;
}
.hbz-lead {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.86);
  max-width: 34rem;
}

.hbz-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.hbz-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  padding: 0.8rem 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  transition: transform 180ms var(--hbz-ease), background-color 180ms var(--hbz-ease), box-shadow 180ms var(--hbz-ease);
}
.hbz-btn:hover { transform: translateY(-2px); }
.hbz-btn:active { transform: translateY(0) scale(0.98); }
.hbz-btn:focus-visible { outline: 2px solid var(--hbz-highlight); outline-offset: 3px; }
.hbz-btn-light { background: #fff; color: var(--hbz-primary); }
.hbz-btn-light:hover { background: rgba(255, 255, 255, 0.92); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); }
.hbz-btn-ghost { border: 1px solid rgba(255, 255, 255, 0.35); color: #fff; font-weight: 500; }
.hbz-btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }
.hbz-btn-dark { background: var(--hbz-primary); color: #fff; margin-top: 1.5rem; }
.hbz-btn-dark:hover { background: var(--hbz-accent); }

/* ---------- Carte ---------- */
.hbz-map-card {
  position: relative;
  margin: 0;
  border-radius: 2rem;
  background:
    radial-gradient(120% 90% at 20% 10%, rgba(167, 196, 181, 0.10), transparent 60%),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.45);
  padding: 0.75rem 0.75rem 0;
}
.hbz-map { display: block; width: 100%; height: auto; overflow: hidden; border-radius: 1.5rem 1.5rem 0 0; }

.hbz-sea { fill: rgba(167, 196, 181, 0.16); }
.hbz-lagoon { fill: rgba(167, 196, 181, 0.10); stroke: rgba(167, 196, 181, 0.35); stroke-width: 1.2; stroke-dasharray: 3 5; }
.hbz-coast { fill: none; stroke: var(--hbz-highlight); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.hbz-river { fill: none; stroke: rgba(167, 196, 181, 0.5); stroke-width: 2.2; stroke-linecap: round; }
.hbz-road { fill: none; stroke: rgba(255, 255, 255, 0.3); stroke-width: 2.6; stroke-dasharray: 2 11; stroke-linecap: round; }

.hbz-tag { fill: rgba(255, 255, 255, 0.5); font-size: 21px; font-weight: 600; letter-spacing: 0.04em; }
.hbz-tag-river { fill: rgba(167, 196, 181, 0.7); font-weight: 500; font-style: italic; letter-spacing: 0.02em; }
.hbz-region { fill: rgba(255, 255, 255, 0.16); font-family: Montserrat, sans-serif; font-size: 46px; font-weight: 600; letter-spacing: 0.02em; }
.hbz-region-sea { fill: rgba(167, 196, 181, 0.4); font-size: 34px; font-style: italic; font-weight: 500; }

/* Points des communes */
.hbz-pin { cursor: pointer; outline: none; }
.hbz-pin-hit { fill: transparent; }
.hbz-pin-halo {
  fill: rgba(167, 196, 181, 0.16);
  stroke: rgba(167, 196, 181, 0.6);
  stroke-width: 1.8;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 260ms var(--hbz-ease), fill 200ms var(--hbz-ease), stroke 200ms var(--hbz-ease);
}
.hbz-pin-dot {
  fill: #fff;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 200ms var(--hbz-ease);
}
.hbz-pin-label {
  fill: rgba(255, 255, 255, 0.92);
  font-family: "Red Hat Display", sans-serif;
  font-size: 25px;
  font-weight: 600;
  paint-order: stroke;
  stroke: var(--hbz-primary);
  stroke-width: 7px;
  stroke-linejoin: round;
  transition: fill 200ms var(--hbz-ease), opacity 200ms var(--hbz-ease);
}
.hbz-pin.is-ondemand .hbz-pin-dot { fill: var(--hbz-primary); stroke: var(--hbz-highlight); stroke-width: 2; }
.hbz-pin.is-ondemand .hbz-pin-halo { fill: transparent; stroke: rgba(167, 196, 181, 0.0); }
.hbz-pin.is-ondemand .hbz-pin-label { opacity: 0; font-size: 22px; font-weight: 500; }

/* Survol, focus, mise en avant */
.hbz-map-card.has-active .hbz-pin:not(.is-active):not(.is-ondemand) .hbz-pin-label { opacity: 0.45; }
.hbz-pin.is-active .hbz-pin-halo,
.hbz-pin.is-echo .hbz-pin-halo { transform: scale(1.45); fill: rgba(167, 196, 181, 0.28); stroke: #fff; }
.hbz-pin.is-active .hbz-pin-dot,
.hbz-pin.is-echo .hbz-pin-dot { transform: scale(1.2); }
.hbz-pin.is-active .hbz-pin-label { fill: #fff; opacity: 1; }
.hbz-pin.is-ondemand.is-active .hbz-pin-label { opacity: 1; }
.hbz-pin:focus-visible .hbz-pin-halo { stroke: #fff; stroke-width: 2.5; }
.hbz-pin.is-active .hbz-pin-halo { animation: hbz-breathe 2.4s var(--hbz-ease) 300ms infinite; }

@keyframes hbz-breathe {
  0%, 100% { transform: scale(1.45); opacity: 1; }
  50% { transform: scale(1.7); opacity: 0.55; }
}

/* Panneau d'information sous la carte */
.hbz-panel {
  min-height: 7.25rem;
  margin: 0 -0.75rem;
  padding: 1.1rem 1.5rem 1.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.10);
  border-radius: 0 0 2rem 2rem;
}
.hbz-panel-hint { margin: 0.6rem 0 0; color: rgba(255, 255, 255, 0.7); font-size: 0.95rem; }
.hbz-panel-name { margin: 0; font-size: 1.25rem; font-weight: 600; color: #fff; }
.hbz-panel-dist { margin: 0.25rem 0 0; font-size: 0.95rem; color: rgba(255, 255, 255, 0.72); }
.hbz-panel-link {
  display: inline-block;
  margin-top: 0.6rem;
  font-weight: 600;
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: rgba(167, 196, 181, 0.7);
}
.hbz-panel-link:hover { text-decoration-color: #fff; }
.hbz-panel.is-swapping .hbz-panel-item:not([hidden]) { animation: hbz-panel-in 280ms var(--hbz-ease-out); }
@keyframes hbz-panel-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.hbz-dept {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  font-family: "Red Hat Display", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  vertical-align: 0.2em;
  background: rgba(167, 196, 181, 0.25);
  color: inherit;
}

/* ---------- Chorégraphie d'arrivée (uniquement si JS actif) ---------- */
.hbz-js .hbz-draw { stroke-dasharray: 1; stroke-dashoffset: 1; }
.hbz-js .hbz-sea,
.hbz-js .hbz-lagoon,
.hbz-js .hbz-road,
.hbz-js .hbz-tag,
.hbz-js .hbz-region { opacity: 0; }
.hbz-js .hbz-pin-halo,
.hbz-js .hbz-pin-dot { transform: scale(0); }
.hbz-js .hbz-pin:not(.is-ondemand) .hbz-pin-label { opacity: 0; }

.hbz-js .is-drawn .hbz-coast { stroke-dashoffset: 0; transition: stroke-dashoffset 1500ms var(--hbz-ease); }
.hbz-js .is-drawn .hbz-river { stroke-dashoffset: 0; transition: stroke-dashoffset 1100ms var(--hbz-ease) 450ms; }
.hbz-js .is-drawn .hbz-sea { opacity: 1; transition: opacity 900ms var(--hbz-ease) 250ms; }
.hbz-js .is-drawn .hbz-lagoon { opacity: 1; transition: opacity 700ms var(--hbz-ease) 600ms; }
.hbz-js .is-drawn .hbz-road,
.hbz-js .is-drawn .hbz-tag,
.hbz-js .is-drawn .hbz-region { opacity: 1; transition: opacity 700ms var(--hbz-ease) 800ms; }
.hbz-js .is-drawn .hbz-pin-halo {
  transform: scale(1);
  transition: transform 520ms var(--hbz-ease-out) calc(1000ms + var(--i) * 40ms), fill 200ms var(--hbz-ease), stroke 200ms var(--hbz-ease);
}
.hbz-js .is-drawn .hbz-pin-dot {
  transform: scale(1);
  transition: transform 420ms var(--hbz-settle) calc(940ms + var(--i) * 40ms);
}
.hbz-js .is-drawn .hbz-pin:not(.is-ondemand) .hbz-pin-label {
  opacity: 1;
  transition: opacity 400ms var(--hbz-ease) calc(1150ms + var(--i) * 40ms), fill 200ms var(--hbz-ease);
}
/* Une fois arrivés, les points réagissent vite au survol. */
.hbz-js .is-drawn.is-settled .hbz-pin-halo { transition: transform 260ms var(--hbz-ease), fill 200ms var(--hbz-ease), stroke 200ms var(--hbz-ease); }
.hbz-js .is-drawn.is-settled .hbz-pin-dot { transition: transform 200ms var(--hbz-ease); }
.hbz-js .is-drawn.is-settled .hbz-pin-label { transition: fill 200ms var(--hbz-ease), opacity 200ms var(--hbz-ease); }
.hbz-js .is-drawn.has-active .hbz-pin:not(.is-active):not(.is-ondemand) .hbz-pin-label { opacity: 0.45; }
.hbz-js .is-drawn .hbz-pin.is-ondemand.is-active .hbz-pin-label { opacity: 1; }
.hbz-js .is-drawn .hbz-pin.is-active .hbz-pin-halo,
.hbz-js .is-drawn .hbz-pin.is-echo .hbz-pin-halo { transform: scale(1.45); }
.hbz-js .is-drawn .hbz-pin.is-active .hbz-pin-dot,
.hbz-js .is-drawn .hbz-pin.is-echo .hbz-pin-dot { transform: scale(1.2); }

/* ---------- Sections ---------- */
.hbz-section { padding: 4.5rem 0; }
@media (min-width: 1024px) { .hbz-section { padding: 6rem 0; } }
.hbz-section-tint { background: var(--hbz-mist); border-radius: 2.5rem; }

.hbz-section-head { max-width: 42rem; }
.hbz-section-head h2,
.hbz-demande h2,
.hbz-faq-wrap h2 {
  margin: 0;
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.4rem);
  line-height: 1.15;
  font-weight: 600;
  color: var(--hbz-primary);
}
.hbz-section-head p { margin-top: 1rem; font-size: 1.1rem; line-height: 1.6; color: rgba(52, 77, 66, 0.75); }
.hbz-section-head.is-light h2 { color: #fff; }
.hbz-section-head.is-light p { color: rgba(255, 255, 255, 0.8); }

/* Groupes de communes */
.hbz-groups { margin-top: 3.5rem; display: grid; gap: 3.5rem; }
.hbz-group { display: grid; gap: 1.5rem; }
@media (min-width: 1024px) {
  .hbz-group { grid-template-columns: minmax(0, 0.38fr) minmax(0, 1fr); gap: 3rem; align-items: start; }
  .hbz-group-head { position: sticky; top: 7rem; }
}
.hbz-group-head h3 { margin: 0; font-size: 1.35rem; font-weight: 600; color: var(--hbz-primary); }
.hbz-group-head p { margin-top: 0.6rem; line-height: 1.6; color: rgba(52, 77, 66, 0.7); }

.hbz-rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(52, 77, 66, 0.15); }
.hbz-row {
  display: grid;
  gap: 1rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid rgba(52, 77, 66, 0.15);
}
@media (min-width: 768px) {
  .hbz-row { grid-template-columns: minmax(0, 1fr) auto; gap: 2rem; align-items: center; }
}
.hbz-row-name { margin: 0; font-size: 1.3rem; font-weight: 600; color: var(--hbz-primary); }
.hbz-row-name .hbz-dept { background: rgba(52, 77, 66, 0.08); color: var(--hbz-accent); }
.hbz-row-desc { margin-top: 0.5rem; line-height: 1.6; color: rgba(52, 77, 66, 0.82); max-width: 38rem; }
.hbz-row-dist { margin-top: 0.4rem; font-size: 0.9rem; color: rgba(52, 77, 66, 0.6); }
.hbz-row-link {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(52, 77, 66, 0.25);
  padding: 0.6rem 1.15rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--hbz-primary);
  transition: background-color 180ms var(--hbz-ease), color 180ms var(--hbz-ease), border-color 180ms var(--hbz-ease);
}
.hbz-row-link:hover,
.hbz-row-link:focus-visible { background: var(--hbz-primary); border-color: var(--hbz-primary); color: #fff; }
.hbz-row-link:focus-visible { outline: 2px solid var(--hbz-highlight); outline-offset: 3px; }

/* Sur demande */
.hbz-demande { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .hbz-demande { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 4rem; align-items: start; } }
.hbz-demande > div > p { margin-top: 1rem; font-size: 1.05rem; line-height: 1.65; color: rgba(52, 77, 66, 0.8); }
.hbz-demande-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 1px; background: rgba(52, 77, 66, 0.12); border-radius: 1.5rem; overflow: hidden; }
@media (min-width: 640px) { .hbz-demande-list { grid-template-columns: 1fr 1fr; } }
.hbz-demande-list li { background: #fff; padding: 1.4rem 1.5rem; }
.hbz-demande-list .hbz-row-name { font-size: 1.1rem; }
.hbz-demande-list li p:last-child { margin-top: 0.4rem; color: rgba(52, 77, 66, 0.75); line-height: 1.55; }

/* Déroulé */
.hbz-steps-section { border-radius: 2.5rem; padding: 4.5rem 0; }
@media (min-width: 1024px) { .hbz-steps-section { padding: 6rem 0; } }
.hbz-steps {
  counter-reset: hbz-step;
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
}
@media (min-width: 768px) { .hbz-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .hbz-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.hbz-steps li {
  counter-increment: hbz-step;
  position: relative;
  padding: 1.75rem 1.5rem 1.75rem;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.10);
}
.hbz-steps li::before {
  content: counter(hbz-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem; height: 2.25rem;
  border-radius: 999px;
  background: #fff;
  color: var(--hbz-primary);
  font-family: Montserrat, sans-serif;
  font-weight: 700;
}
.hbz-steps h3 { margin: 1.1rem 0 0; font-size: 1.15rem; font-weight: 600; }
.hbz-steps p { margin-top: 0.5rem; line-height: 1.6; color: rgba(255, 255, 255, 0.8); }
.hbz-steps-more { margin-top: 2rem; color: rgba(255, 255, 255, 0.8); }
.hbz-steps-more a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(167, 196, 181, 0.7); }

/* FAQ */
.hbz-faq-wrap { max-width: 56rem; }
.hbz-faq { margin-top: 2rem; border-top: 1px solid rgba(52, 77, 66, 0.15); }
.hbz-faq details { border-bottom: 1px solid rgba(52, 77, 66, 0.15); }
.hbz-faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.35rem 0;
  cursor: pointer;
  list-style: none;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--hbz-primary);
}
.hbz-faq summary::-webkit-details-marker { display: none; }
.hbz-faq summary:focus-visible { outline: 2px solid var(--hbz-accent); outline-offset: 4px; border-radius: 0.5rem; }
.hbz-faq-icon {
  position: relative;
  flex: none;
  width: 1.75rem; height: 1.75rem;
  border-radius: 999px;
  background: rgba(52, 77, 66, 0.08);
}
.hbz-faq-icon::before,
.hbz-faq-icon::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 0.7rem; height: 2px;
  background: var(--hbz-primary);
  transform: translate(-50%, -50%);
  transition: transform 240ms var(--hbz-ease);
}
.hbz-faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.hbz-faq details[open] .hbz-faq-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.hbz-faq details p { margin: 0 0 1.4rem; max-width: 46rem; line-height: 1.65; color: rgba(52, 77, 66, 0.8); }
.hbz-faq details[open] p { animation: hbz-panel-in 280ms var(--hbz-ease-out); }
.hbz-faq-more { margin-top: 1.5rem; color: rgba(52, 77, 66, 0.75); }
.hbz-faq-more a { color: var(--hbz-primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* CTA final */
.hbz-cta { padding: 0 0 5rem; }
.hbz-cta-card {
  border-radius: 2.5rem;
  padding: 3rem 1.5rem;
  text-align: center;
  background-image: radial-gradient(90% 120% at 50% 0%, rgba(167, 196, 181, 0.16), transparent 70%);
}
@media (min-width: 768px) { .hbz-cta-card { padding: 4rem 3rem; } }
.hbz-cta-card h2 { margin: 0 auto; max-width: 30ch; font-size: clamp(1.6rem, 1.3rem + 1vw, 2.2rem); line-height: 1.2; font-weight: 600; }
.hbz-cta-card p { margin: 1rem auto 0; max-width: 38rem; line-height: 1.6; color: rgba(255, 255, 255, 0.82); }
.hbz-cta-card .hbz-actions { justify-content: center; }

/* ---------- Mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
  .hbz-js .hbz-draw { stroke-dasharray: none; stroke-dashoffset: 0; }
  .hbz-js .hbz-sea, .hbz-js .hbz-lagoon, .hbz-js .hbz-road, .hbz-js .hbz-tag, .hbz-js .hbz-region { opacity: 1; }
  .hbz-js .hbz-pin-halo, .hbz-js .hbz-pin-dot { transform: none; }
  .hbz-js .hbz-pin:not(.is-ondemand) .hbz-pin-label { opacity: 1; }
  .hbz-pin.is-active .hbz-pin-halo { animation: none; }
  .hbz-map *, .hbz-panel *, .hbz-faq *, .hbz-btn { transition: none !important; animation: none !important; }
}
@media (min-width: 640px) { .hbz-demande-list li:last-child:nth-child(odd) { grid-column: 1 / -1; } }
