/* Carte des concessionnaires – Esprit Camping-Car
   Recherche en haut, liste + carte côte à côte (empilées sur mobile avec bascule Liste/Carte). */
.eccc {
  --eccc-red: #B3121F;
  --eccc-red-dark: #8E0E18;
  --eccc-ink: #1E1E1C;
  --eccc-muted: #5E5A53;
  --eccc-line: #E2DED6;
  --eccc-line-strong: #C9C3B8;
  --eccc-card: #FFFFFF;
  --eccc-ground: #F4F2EE;
  --eccc-sea: #D6E6EC;
  --eccc-land: #F7F4EC;
  --eccc-dot: #8C867C;
  --eccc-me: #1E5FA8;
  --eccc-teal: #17695F;
  --eccc-focus: #1E5FA8;
  --eccc-on-dark: #FFFFFF;
  --eccc-chip-bg: #F1EEE8;
  --eccc-font: inherit;
  --eccc-display: inherit;
  font-family: var(--eccc-font);
  color: var(--eccc-ink);
  font-size: 16px;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-variant-numeric: tabular-nums;
}
.eccc *, .eccc *::before, .eccc *::after { box-sizing: border-box; }
.eccc [hidden] { display: none !important; }
.eccc button, .eccc input, .eccc select { font: inherit; color: inherit; }
.eccc :focus-visible { outline: 3px solid var(--eccc-focus); outline-offset: 2px; }

/* --- barre de recherche --- */
.eccc-search {
  background: var(--eccc-card);
  border: 1px solid var(--eccc-line);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
}
.eccc-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.eccc-field--where { flex: 3 1 300px; position: relative; }
.eccc-field--brand { flex: 2 1 200px; }
.eccc-field--radius { flex: 1 1 130px; }
.eccc-field--type { flex: 1.5 1 190px; }
.eccc-select:disabled { opacity: .55; cursor: not-allowed; }
.eccc-label {
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--eccc-muted);
}
.eccc-where-row { display: flex; gap: 8px; }
.eccc-input, .eccc-select {
  height: 48px; width: 100%; min-width: 0;
  border: 1px solid var(--eccc-line-strong); border-radius: 8px; background: var(--eccc-card);
  padding: 0 12px; font-size: 16px;
}
.eccc-input { border: 2px solid var(--eccc-ink); }
.eccc-btn {
  height: 48px; border-radius: 8px; padding: 0 16px; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700;
  border: 1px solid var(--eccc-line-strong); background: var(--eccc-card);
}
.eccc-btn:hover { border-color: var(--eccc-ink); }
.eccc-btn--primary { background: var(--eccc-red); border-color: var(--eccc-red); color: var(--eccc-on-dark); }
.eccc-btn--primary:hover { background: var(--eccc-red-dark); border-color: var(--eccc-red-dark); }
.eccc-btn svg { flex: none; }
.eccc-suggest {
  position: absolute; z-index: 1000; top: 100%; left: 0; right: 0; margin: 4px 0 0; padding: 4px;
  list-style: none; background: var(--eccc-card); border: 1px solid var(--eccc-line-strong); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(30, 30, 28, .12); max-height: 320px; overflow-y: auto;
}
.eccc-suggest li {
  padding: 10px 12px; border-radius: 6px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px;
}
.eccc-suggest li[aria-selected="true"], .eccc-suggest li:hover { background: var(--eccc-chip-bg); }
.eccc-suggest small { color: var(--eccc-muted); white-space: nowrap; }
.eccc-msg { margin: 0; font-size: 14px; color: var(--eccc-red); }

/* --- en-tête des résultats --- */
.eccc-summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.eccc-summary p { margin: 0; font-size: 19px; }
.eccc-summary .eccc-reset { background: none; border: 0; padding: 4px 0; color: var(--eccc-red); font-weight: 700; cursor: pointer; text-decoration: underline; }
.eccc-view-toggle { display: none; border: 1px solid var(--eccc-ink); border-radius: 8px; overflow: hidden; }
.eccc-view-toggle button { height: 44px; padding: 0 18px; border: 0; background: var(--eccc-card); cursor: pointer; font-weight: 600; }
.eccc-view-toggle button[aria-pressed="true"] { background: var(--eccc-ink); color: var(--eccc-on-dark); font-weight: 700; }

/* --- corps : liste + carte --- */
.eccc-body { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.eccc-list-wrap { flex: 1 1 380px; max-width: 470px; min-width: 0; }
.eccc-list {
  list-style: none; margin: 0; padding: 0 4px 0 0; display: flex; flex-direction: column; gap: 10px;
  max-height: 640px; overflow-y: auto;
}
.eccc-map-wrap { flex: 999 1 480px; min-width: 0; position: sticky; top: 16px; }
.eccc-map {
  height: 640px; border-radius: 12px; border: 1px solid var(--eccc-line); overflow: hidden; background: var(--eccc-sea);
}
.eccc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 13px; color: var(--eccc-muted); }
.eccc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.eccc-legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }

/* --- fiches --- */
.eccc-card {
  background: var(--eccc-card); border: 1px solid var(--eccc-line); border-radius: 12px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px; transition: border-color .15s;
}
.eccc-card.is-active { border-color: var(--eccc-ink); box-shadow: inset 0 0 0 1px var(--eccc-ink); }
.eccc-card-head { display: flex; gap: 12px; align-items: flex-start; }
.eccc-num {
  flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--eccc-red); color: var(--eccc-on-dark);
  font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center;
}
.eccc-card-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.eccc-card-title h3 {
  margin: 0; font-size: 17px; line-height: 1.25; font-weight: 700; font-family: var(--eccc-font);
  text-transform: none; letter-spacing: 0; color: var(--eccc-ink);
}
.eccc-card-title h3 button { all: unset; cursor: pointer; }
.eccc-card-title h3 button:hover { text-decoration: underline; }
.eccc-card-title h3 button:focus-visible { outline: 3px solid var(--eccc-focus); outline-offset: 2px; }
.eccc-km { flex: none; font-weight: 700; font-size: 14px; color: var(--eccc-muted); }
.eccc-addr { font-size: 15px; color: var(--eccc-muted); }
.eccc-network { font-size: 13px; color: var(--eccc-muted); }
.eccc-brands { display: flex; flex-wrap: wrap; gap: 4px; }
.eccc-brands span { font-size: 12.5px; padding: 2px 8px; border-radius: 999px; background: var(--eccc-chip-bg); }
.eccc-brands span.is-match { background: var(--eccc-ink); color: var(--eccc-on-dark); font-weight: 700; }
.eccc-brands .eccc-more { background: none; color: var(--eccc-muted); padding-left: 2px; }
.eccc-services { font-size: 13px; color: var(--eccc-muted); }
.eccc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.eccc-actions a {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 8px;
  text-decoration: none; font-weight: 600; font-size: 14.5px; color: var(--eccc-ink); border: 1px solid var(--eccc-line-strong);
}
.eccc-actions a:hover { border-color: var(--eccc-ink); }
.eccc-actions a.eccc-call { background: var(--eccc-ink); border-color: var(--eccc-ink); color: var(--eccc-on-dark); }
.eccc-empty { background: var(--eccc-card); border: 1px dashed var(--eccc-line-strong); border-radius: 12px; padding: 16px; }
.eccc-empty p { margin: 0 0 8px; }

/* --- parcourir par région (état initial) --- */
.eccc-regions { display: flex; flex-direction: column; gap: 10px; }
.eccc-regions h3 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--eccc-muted); font-family: var(--eccc-font); }
.eccc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.eccc-chips button {
  border: 1px solid var(--eccc-line-strong); background: var(--eccc-card); border-radius: 999px; padding: 7px 12px;
  cursor: pointer; font-size: 14px; display: inline-flex; gap: 6px; align-items: baseline;
}
.eccc-chips button:hover { border-color: var(--eccc-ink); }
.eccc-chips small { color: var(--eccc-muted); }

/* --- marqueurs Leaflet --- */
.eccc-pin {
  width: 28px; height: 28px; border-radius: 50%; background: var(--eccc-red); color: #fff; border: 3px solid #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35); font-family: var(--eccc-font);
}
.eccc-pin.is-active { background: var(--eccc-ink); transform: scale(1.18); }
.eccc-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--eccc-red); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.eccc-dot.is-far { background: var(--eccc-dot); }
.eccc-me { width: 16px; height: 16px; border-radius: 50%; background: var(--eccc-me); border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(30, 95, 168, .25); }
.eccc .marker-cluster-small, .eccc .marker-cluster-medium, .eccc .marker-cluster-large { background: rgba(179, 18, 31, .25); }
.eccc .marker-cluster-small div, .eccc .marker-cluster-medium div, .eccc .marker-cluster-large div {
  background: var(--eccc-red); color: #fff; font-weight: 700; font-family: var(--eccc-font);
}
.eccc .leaflet-popup-content { margin: 12px 14px; font-size: 14px; line-height: 1.4; }
.eccc .leaflet-popup-content strong { display: block; font-size: 15px; margin-bottom: 2px; }
.eccc .leaflet-container { font-family: var(--eccc-font); }

/* --- liste SEO rendue côté serveur (visible sans JavaScript, masquée ensuite) --- */
.eccc-static { columns: 2 320px; column-gap: 32px; font-size: 14px; }
.eccc-static h3 { break-after: avoid; font-size: 16px; margin: 16px 0 6px; }
.eccc-static ul { margin: 0 0 8px; padding: 0; list-style: none; }
.eccc-static li { margin: 0 0 6px; break-inside: avoid; }
.eccc.is-ready .eccc-static { display: none; }

/* --- mobile : bascule liste / carte --- */
@media (max-width: 760px) {
  .eccc-view-toggle { display: inline-flex; }
  .eccc-list-wrap { max-width: none; flex-basis: 100%; }
  .eccc-list { max-height: none; overflow: visible; padding: 0; }
  .eccc-map-wrap { position: static; flex-basis: 100%; }
  .eccc-map { height: 70vh; min-height: 360px; }
  .eccc[data-view="list"] .eccc-map-wrap { display: none; }
  .eccc[data-view="map"] .eccc-list-wrap { display: none; }
  .eccc-actions a { flex: 1 1 auto; justify-content: center; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .eccc-card, .eccc-pin { transition: none; }
}

/* --- aménageurs de vans --- */
.eccc-kind { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--eccc-teal); }
.eccc-card.is-amen .eccc-num { background: var(--eccc-teal); }
.eccc-dot.is-amen, .eccc-pin.is-amen { background: var(--eccc-teal); }
.eccc-pin.is-amen.is-active { background: var(--eccc-ink); }
.eccc .marker-cluster-small, .eccc .marker-cluster-medium, .eccc .marker-cluster-large { background: rgba(30, 30, 28, .2); }
.eccc .marker-cluster-small div, .eccc .marker-cluster-medium div, .eccc .marker-cluster-large div { background: #3A3733; }
.eccc .leaflet-popup-content em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--eccc-teal); }
