/* ═══════════════════════════════════════════
   ZONE D'INTERVENTION — Carte interactive
   Toggle Touraine / Sarthe · 2 camions · Loire inversée
   ═══════════════════════════════════════════ */

.page-zone { background: var(--blue-dark); }

.zone-main {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 8rem 2rem 3rem;
}
.zone-header { text-align: center; margin-bottom: 1.8rem; }
.zone-overline {
  font-family: var(--font-body); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--blue-mid);
  margin-bottom: 1rem; opacity: 0; animation: zFadeUp 1s var(--ease-out) 0.1s forwards;
}
.zone-title {
  font-family: var(--font-display); font-size: clamp(1.9rem, 3.6vw, 3rem);
  font-weight: 300; color: var(--white); line-height: 1.15;
  opacity: 0; animation: zFadeUp 1.2s var(--ease-out) 0.2s forwards;
}
.zone-title em { font-style: italic; color: var(--blue-light); }
@keyframes zFadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* TOGGLE */
.zone-switch {
  position: relative; display: inline-flex; align-items: center; padding: 5px;
  margin-bottom: 1.4rem; border: 1px solid rgba(168,216,234,0.15); border-radius: 100px;
  background: rgba(7,30,45,0.45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity: 0; animation: zFadeUp 1.2s var(--ease-out) 0.35s forwards;
}
.zone-switch-btn {
  position: relative; z-index: 2; border: none; background: none; cursor: pointer;
  font-family: var(--font-body); font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.45);
  padding: 0.7rem 1.8rem; border-radius: 100px; transition: color 0.4s var(--ease-out);
}
.zone-switch-btn.active { color: var(--blue-dark); }
.zone-switch-thumb {
  position: absolute; z-index: 1; top: 5px; left: 5px; height: calc(100% - 10px);
  border-radius: 100px; background: var(--blue-light); box-shadow: 0 0 18px rgba(168,216,234,0.35);
  transition: transform 0.5s var(--ease-out), width 0.5s var(--ease-out);
}

/* VUES */
.zone-view { display: none; width: 100%; }
.zone-view.active { display: block; animation: zMapIn 0.7s var(--ease-out) forwards; }
@keyframes zMapIn { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: scale(1); } }

/* CARTE */
.zone-map-wrap { position: relative; width: 100%; max-width: 940px; margin: 0 auto; }
.zone-carte { position: relative; width: 100%; }
#view-touraine.zone-carte { animation: zFadeUp 1.4s var(--ease-out) 0.45s forwards; }
.carte-svg { width: 100%; height: auto; display: block; }

/* Communes — TOUTES même couleur, pas de hover */
.commune {
  fill: rgba(12,61,87,0.4);
  stroke: rgba(168,216,234,0.08);
  stroke-width: 0.8;
}

/* Loire */
.loire-flow { animation: loireFlow 3s linear infinite; }
.loire-reverse { animation: loireFlowReverse 3s linear infinite; }
@keyframes loireFlow { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -32; } }
@keyframes loireFlowReverse { from { stroke-dashoffset: 0; } to { stroke-dashoffset: 32; } }

/* HQ */
.hq-halo { fill: rgba(91,184,212,0.08); }
.hq-pulse { fill: none; stroke: var(--blue-mid); stroke-width: 1; opacity: 0.4; animation: hqPulse 2.5s ease-out infinite; }
@keyframes hqPulse { 0% { r: 8; opacity: 0.6; } 100% { r: 28; opacity: 0; } }
.hq-dot { fill: var(--blue-mid); filter: drop-shadow(0 0 6px rgba(91,184,212,0.5)); }
.hq-label {
  font-family: 'DM Sans', sans-serif; font-size: 6.5px; font-weight: 600;
  letter-spacing: 0.12em; fill: var(--blue-light); text-anchor: middle; opacity: 0.85;
}

/* Villes principales (label permanent) */
.ville-dot { fill: rgba(168,216,234,0.75); }
.ville-label {
  font-family: 'DM Sans', sans-serif; font-size: 5.6px; font-weight: 600;
  letter-spacing: 0.1em; fill: rgba(255,255,255,0.85); text-anchor: middle;
  paint-order: stroke; stroke: var(--blue-dark); stroke-width: 1.6px; stroke-linejoin: round;
  pointer-events: none;
}
.ville-point { cursor: pointer; }

/* Communes desservies (point + tooltip latéral) */
.commune-dot { fill: rgba(168,216,234,0.5); transition: fill 0.25s, r 0.25s; }
.commune-point { cursor: pointer; }

/* Hitbox invisible (élargie pour faciliter le hover, sans agrandir le pin) */
.point-hit { fill: transparent; pointer-events: all; }
.commune-point:hover .commune-dot {
  fill: var(--blue-mid);
  filter: drop-shadow(0 0 4px rgba(91,184,212,0.6));
}

/* Fourgon */
.van-group { opacity: 0.95; }
.van-trail { animation: vanTrailPulse 1.6s ease-in-out infinite; }
@keyframes vanTrailPulse { 0%, 100% { opacity: 0.12; r: 8; } 50% { opacity: 0.22; r: 13; } }
.van-body { filter: drop-shadow(0 1px 2px rgba(0,0,0,0.35)); }

/* ═══ ENCART INFO LATÉRAL (gauche de la carte, centré vertical) ═══ */
.zone-info {
  position: absolute;
  /* left calculé dynamiquement via right-anchor pour rester collé à la carte */
  right: calc(100% + 1.2rem);
  top: 50%;
  transform: translateY(-50%);
  /* Largeur adaptive au contenu, avec un plancher et un plafond */
  width: max-content;
  min-width: 160px;
  max-width: 260px;
  display: flex; flex-direction: column; gap: 0.3rem;
  padding: 1rem 1.1rem;
  background: rgba(7,30,45,0.7);
  border: 1px solid rgba(168,216,234,0.18);
  border-radius: 12px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.35s var(--ease-out);
  pointer-events: none;
}
.zone-info.visible { opacity: 1; }
.zone-info-overline {
  font-family: var(--font-body); font-size: 0.62rem; font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue-mid);
  white-space: nowrap;
}
.zone-info-name {
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 400;
  color: var(--white); line-height: 1.2;
  white-space: nowrap;
}

/* Légende */
.zone-legende { display: flex; justify-content: center; gap: 2rem; margin-top: 1.4rem; flex-wrap: wrap; }
.legende-item { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-body); font-size: 0.72rem; color: rgba(255,255,255,0.35); letter-spacing: 0.03em; }
.legende-dot { width: 8px; height: 8px; border-radius: 50%; }
.legende-dot--hq { background: var(--blue-mid); box-shadow: 0 0 6px rgba(91,184,212,0.4); }
.legende-dot--ville { background: rgba(168,216,234,0.6); }
.legende-line { width: 18px; height: 2px; background: rgba(168,216,234,0.4); border-radius: 1px; }
body.view-sarthe .legende-loire { display: none; }
body.view-sarthe .legende-item:first-child { display: none; }

/* Baseline */
.zone-baseline { text-align: center; margin-top: 1.4rem; opacity: 0; animation: zFadeUp 1s var(--ease-out) 0.8s forwards; }
.zone-baseline p { font-family: var(--font-body); font-size: 0.92rem; color: rgba(255,255,255,0.5); line-height: 1.7; }
.zone-baseline strong { color: var(--white); }
.zone-hors { margin-top: 0.5rem; font-size: 0.82rem; }
.zone-hors a { color: var(--blue-mid); text-decoration: underline; text-underline-offset: 2px; transition: color 0.3s; }
.zone-hors a:hover { color: var(--blue-light); }

/* AVANTAGES */
.zone-avantages { padding: 5rem 0; background: var(--blue-ink); }
.zone-avantages-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.zone-avantage { text-align: center; padding: 2.5rem 2rem; }
.zone-avantage-icon { width: 56px; height: 56px; border-radius: 50%; background: rgba(168,216,234,0.06); display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; color: var(--blue-light); }
.zone-avantage-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 400; color: var(--white); margin-bottom: 0.8rem; }
.zone-avantage-desc { font-family: var(--font-body); font-size: 0.88rem; color: rgba(168,216,234,0.45); line-height: 1.8; }

/* CTA */
.zone-cta { padding: 6rem 0; background: var(--cream); }
.zone-cta-inner { text-align: center; max-width: 550px; margin: 0 auto; }
.zone-cta-title { font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 300; color: var(--blue-ink); margin-bottom: 1rem; line-height: 1.2; }
.zone-cta-title em { font-style: italic; color: var(--blue-deep); }
.zone-cta-text { font-size: 0.92rem; color: var(--grey-text); line-height: 1.85; margin-bottom: 2rem; }

/* RESPONSIVE */
@media (max-width: 1560px) {
  /* Encart en HAUT de la carte, centré, largeur adaptive au contenu */
  .zone-map-wrap { padding-top: 56px; }
  .zone-info {
    position: absolute;
    right: auto; left: 50%; top: 0;
    transform: translateX(-50%);
    width: max-content;
    min-width: 200px; max-width: 90vw;
    flex-direction: row; align-items: center; gap: 0.8rem;
    padding: 0.65rem 1.1rem;
  }
  .zone-info-name { font-size: 1rem; }
  .zone-info:not(.visible) { visibility: hidden; }
}
@media (max-width: 768px) {
  .zone-main { padding: 7rem 1.5rem 2rem; }
  .zone-title { font-size: clamp(1.6rem, 6.2vw, 2.3rem); }
  .zone-switch-btn { padding: 0.6rem 1.3rem; font-size: 0.68rem; }
  .zone-legende { gap: 1.2rem; }
  .zone-avantages-grid { grid-template-columns: 1fr; gap: 1rem; }
  .zone-avantage { padding: 2rem 1.5rem; }
  .ville-label { font-size: 5px; }
  .hq-label { font-size: 5.5px; }
}
@media (max-width: 480px) { .zone-main { padding: 6rem 1rem 2rem; } }

/* ═══════════════════════════════════════════
   ACCORDÉONS COMMUNES — mobile uniquement
   Liste repliable des villes desservies (fallback tactile + SEO)
   ═══════════════════════════════════════════ */
.zone-villes { display: none; }

@media (max-width: 768px) {
  .zone-villes {
    display: block;
    width: 100%;
    max-width: 520px;
    margin: 2.2rem auto 0;
  }
  .villes-acc { border-top: 1px solid rgba(168,216,234,0.14); }
  .villes-acc:last-child { border-bottom: 1px solid rgba(168,216,234,0.14); }

  .villes-acc-head {
    width: 100%;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 1.15rem 0.25rem;
    background: none; border: none; cursor: pointer; text-align: left;
    font-family: var(--font-body); font-size: 0.76rem; font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.9);
  }
  .villes-acc-icon {
    position: relative; width: 16px; height: 16px; flex-shrink: 0;
    transition: transform 0.35s var(--ease-out);
  }
  .villes-acc-icon::before,
  .villes-acc-icon::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    background: var(--blue-light); transform: translate(-50%, -50%);
  }
  .villes-acc-icon::before { width: 14px; height: 1.5px; }
  .villes-acc-icon::after  { width: 1.5px; height: 14px; }
  .villes-acc-head[aria-expanded="true"] .villes-acc-icon { transform: rotate(45deg); }

  .villes-acc-panel {
    max-height: 0; overflow: hidden;
    transition: max-height 0.4s var(--ease-out);
  }
  .villes-list {
    list-style: none; margin: 0; padding: 0 0.25rem 1.3rem;
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem 1.1rem;
  }
  .villes-list li {
    position: relative; padding-left: 0.9rem;
    font-family: var(--font-body); font-size: 0.85rem; line-height: 1.3;
    color: rgba(255,255,255,0.6);
  }
  .villes-list li::before {
    content: ''; position: absolute; left: 0; top: 0.5em;
    width: 4px; height: 4px; border-radius: 50%; background: rgba(168,216,234,0.5);
  }
}
