/* PROPRIO237 — page carte dédiée (réutilise les tokens .site-body-search) */
body.site-body-map .map-page {
  display: flex;
  flex-direction: column;
  min-height: min(100dvh, 1200px);
}

.map-page__shell {
  width: 100%;
  max-width: min(1380px, 100%);
  margin: 0 auto;
  padding-left: max(clamp(0.85rem, 4.2vw, 2rem), env(safe-area-inset-left, 0));
  padding-right: max(clamp(0.85rem, 4.2vw, 2rem), env(safe-area-inset-right, 0));
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 0));
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.map-page__intro {
  padding-top: clamp(0.75rem, 2vw, 1.25rem);
}

.map-page__intro h1 {
  margin: 0 0 0.45rem;
  font-family: var(--srch-display);
  font-size: clamp(1.65rem, 2vw + 1.1rem, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--srch-ink);
  line-height: 1.12;
}

.map-page__lead {
  margin: 0 0 0.85rem;
  max-width: 42rem;
  font-size: clamp(0.88rem, 0.25vw + 0.82rem, 0.98rem);
  color: var(--srch-muted);
  line-height: 1.55;
}

.map-page__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.map-page__link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-family: var(--srch-font);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--srch-bronze-light);
  border: 1px solid rgba(194, 65, 12, 0.35);
  background: rgba(255, 255, 255, 0.9);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.map-page__link:hover {
  border-color: rgba(194, 65, 12, 0.55);
  background: #fff;
  box-shadow: 0 6px 22px rgba(194, 65, 12, 0.12);
}

.map-page__link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--srch-accent-glow);
}

.map-page__count {
  margin: 0;
  font-size: clamp(0.84rem, 0.2vw + 0.8rem, 0.92rem);
  color: var(--srch-muted);
  font-weight: 500;
}

.map-page__cap {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  color: var(--srch-muted);
  line-height: 1.45;
}

.map-page__map-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: min(72dvh, 760px);
  padding: clamp(1rem, 2.5vw, 1.35rem);
  border-radius: var(--srch-radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.97) 0%, rgba(255, 253, 249, 0.93) 100%);
  box-shadow: var(--srch-shadow), 0 0 0 1px rgba(255, 255, 255, 0.55) inset;
}

.map-page__map-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1;
  min-height: 0;
}

.map-page__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}

.map-page__toolbar-meta {
  margin: 0;
  font-size: clamp(0.82rem, 0.2vw + 0.78rem, 0.9rem);
  color: var(--srch-muted);
  line-height: 1.45;
  max-width: min(100%, 36rem);
}

.map-page__toolbar-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.map-page__btn {
  min-height: 42px;
  padding: 0 1rem;
  border-radius: 12px;
  border: 1px solid var(--srch-line-strong);
  background: rgba(255, 255, 255, 0.95);
  font-family: var(--srch-font);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--srch-ink);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.map-page__btn:hover {
  border-color: rgba(194, 65, 12, 0.35);
}

.map-page__btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--srch-accent-glow);
}

.map-page__btn--icon {
  width: 42px;
  min-width: 42px;
  padding: 0;
  font-size: 1.2rem;
  line-height: 1;
  font-weight: 500;
}

.map-page__frame {
  flex: 1;
  min-height: min(58dvh, 560px);
  border-radius: calc(var(--srch-radius) + 2px);
  overflow: hidden;
  border: 1px solid rgba(28, 25, 23, 0.1);
  box-shadow: 0 12px 40px rgba(28, 25, 23, 0.08);
  background: linear-gradient(165deg, #ece9e6 0%, #d9d5d0 100%);
}

.map-page__frame #mapPageMap {
  height: 100%;
  min-height: min(56dvh, 520px);
  width: 100%;
}

.map-page__frame .search-map--empty #mapPageMap {
  height: auto;
  min-height: 0;
}

.map-page__error-host {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.map-page__error {
  margin: 0;
  padding: 1rem 1.15rem;
  border-radius: var(--srch-radius-sm);
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 0.9rem;
}

@media (max-width: 480px) {
  .map-page__map-card {
    min-height: min(70dvh, 680px);
    padding: 0.85rem 0.75rem 1rem;
    border-radius: 22px;
  }

  .map-page__frame #mapPageMap {
    min-height: min(52dvh, 440px);
  }
}
