#btpmat-salesmap,
.btpmat-salesmap {
  --sm-card: rgba(255, 255, 255, 0.92);
  --sm-card-border: rgba(15, 23, 42, 0.08);
  --sm-text: #0f172a;
  --sm-text-soft: #475569;
  --sm-text-muted: #64748b;
  --sm-primary: #0f766e;
  --sm-primary-2: #14b8a6;
  --sm-accent: #f97316;
  --sm-shadow: 0 10px 35px rgba(15, 23, 42, 0.08);
  --sm-shadow-hover: 0 18px 45px rgba(15, 23, 42, 0.14);
  --sm-radius-xl: 24px;
  --sm-radius-md: 16px;
  --sm-map-bg: #ffffff;
  --sm-land-fill: #ffffff;
  --sm-land-stroke: rgba(15, 23, 42, 0.10);
  --sm-subdivision: rgba(15, 23, 42, 0.08);
  --sm-dot-1: #0f766e;
  --sm-dot-2: #14b8a6;
  --sm-dot-3: #f97316;
  --sm-danger-soft: rgba(239, 68, 68, 0.08);
  --sm-backdrop: rgba(255, 255, 255, 0.86);

  position: relative;
  padding: 20px 0;
  color: var(--sm-text);
}

.btpmat-salesmap * {
  box-sizing: border-box;
}

.btpmat-salesmap__inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 14px;
}

.btpmat-salesmap__header {
  margin-bottom: 18px;
}

.btpmat-salesmap__stats {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.btpmat-salesmap__stat {
  padding: 16px 18px;
  border: 1px solid var(--sm-card-border);
  border-radius: var(--sm-radius-md);
  background: var(--sm-backdrop);
  backdrop-filter: blur(10px);
  box-shadow: var(--sm-shadow);
}

.btpmat-salesmap__stat-value {
  display: block;
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--sm-text);
}

.btpmat-salesmap__stat-label {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--sm-text-muted);
}

.btpmat-salesmap__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.btpmat-salesmap__main {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.btpmat-salesmap__subgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.btpmat-salesmap__sidebar {
  display: block;
  min-width: 0;
}

.btpmat-salesmap__sidebar-stack {
  display: grid;
  gap: 18px;
}

.btpmat-salesmap__mapcard,
.btpmat-salesmap__panel {
  position: relative;
  border: 1px solid var(--sm-card-border);
  border-radius: var(--sm-radius-xl);
  background: var(--sm-card);
  backdrop-filter: blur(14px);
  box-shadow: var(--sm-shadow);
  overflow: hidden;
}

.btpmat-salesmap__mapcard::before,
.btpmat-salesmap__panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(20,184,166,0), rgba(20,184,166,.7), rgba(20,184,166,0));
  pointer-events: none;
}

.btpmat-salesmap__cardhead {
  padding: 18px 18px 0;
}

.btpmat-salesmap__cardtitle,
.btpmat-salesmap__panel-title {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--sm-text);
}

.btpmat-salesmap__cardtext,
.btpmat-salesmap__panel-text {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--sm-text-soft);
}

.btpmat-salesmap__map {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.btpmat-salesmap__map--france {
  min-height: 420px;
  margin-top: 12px;
  padding: 10px;
}

.btpmat-salesmap__map--corse {
  min-height: 280px;
  margin-top: 8px;
  padding: 10px;
}

.btpmat-salesmap__viewport {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  touch-action: none;
  cursor: grab;
  background: #ffffff;
}

.btpmat-salesmap__viewport:active {
  cursor: grabbing;
}

.btpmat-salesmap__zoomlayer {
  position: relative;
  transform-origin: 0 0;
  will-change: transform;
  background: #ffffff;
}

.btpmat-salesmap__svg,
.btpmat-salesmap__svg--mini {
  display: block;
  width: 100%;
  height: auto;
  background: #ffffff;
}

.btpmat-salesmap__map--france .btpmat-salesmap__svg {
  aspect-ratio: 1 / 1;
}

.btpmat-salesmap__map--corse .btpmat-salesmap__svg {
  aspect-ratio: 320 / 420;
}

.btpmat-salesmap__svg--mini {
  aspect-ratio: 220 / 140;
}

.btpmat-salesmap__land {
  fill: #ffffff;
  stroke: var(--sm-land-stroke);
  stroke-width: 2.1;
  vector-effect: non-scaling-stroke;
}

/* France uniquement : pas de contour */
.btpmat-salesmap__map--france .btpmat-salesmap__land {
  stroke: none;
}

.btpmat-salesmap__subdivision {
  fill: none;
  stroke-width: 1.1;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btpmat-salesmap__points {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.btpmat-salesmap__domgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 16px;
}

.btpmat-salesmap__domitem {
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
  padding: 12px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.btpmat-salesmap__domitem:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(15,23,42,.08);
  border-color: rgba(20,184,166,.25);
}

.btpmat-salesmap__domlabel {
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--sm-text-soft);
}

.btpmat-salesmap__miniwrap {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #ffffff;
}

.btpmat-salesmap__mini-bg {
  fill: #ffffff;
  stroke: rgba(15, 23, 42, 0.05);
  stroke-width: 1.5;
}

.btpmat-salesmap__mini-island {
  fill: #ffffff;
  stroke: rgba(15, 23, 42, 0.09);
  stroke-width: 1.4;
}

.btpmat-salesmap__panel {
  padding: 18px;
}

.btpmat-salesmap__panel--info {
  display: none;
  scroll-margin-top: 120px;
}

.btpmat-salesmap__info {
  position: relative;
  min-height: 200px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  padding: 14px;
}

.btpmat-salesmap__info-placeholder {
  color: var(--sm-text-muted);
  line-height: 1.6;
  font-size: 14px;
}

.btpmat-salesmap__info-content {
  display: none;
  gap: 10px;
}

.btpmat-salesmap__info:not(.is-empty) .btpmat-salesmap__info-placeholder {
  display: none;
}

.btpmat-salesmap__info:not(.is-empty) .btpmat-salesmap__info-content {
  display: grid;
}

.btpmat-salesmap__info-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
  align-items: start;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(15, 23, 42, 0.08);
}

.btpmat-salesmap__info-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.btpmat-salesmap__info-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sm-text-muted);
}

.btpmat-salesmap__info-value {
  font-size: 14px;
  line-height: 1.55;
  color: var(--sm-text);
  word-break: break-word;
}

.btpmat-salesmap__point {
  --point-size: 12px;
  position: absolute;
  left: 0;
  top: 0;
  width: var(--point-size);
  height: var(--point-size);
  margin-left: calc(var(--point-size) * -0.5);
  margin-top: calc(var(--point-size) * -0.5);
  border: 0;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
  z-index: 2;
  background: linear-gradient(135deg, var(--sm-dot-1), var(--sm-dot-2));
  box-shadow:
    0 0 0 4px rgba(15, 118, 110, 0.08),
    0 4px 14px rgba(15, 118, 110, 0.22);
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background .18s ease,
    left .18s ease,
    top .18s ease;
}

.btpmat-salesmap__point::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(15, 118, 110, 0.10);
  opacity: 0;
}

.btpmat-salesmap__point:hover,
.btpmat-salesmap__point:focus-visible {
  transform: scale(1.14);
  box-shadow:
    0 0 0 6px rgba(15, 118, 110, 0.10),
    0 10px 24px rgba(15, 118, 110, 0.24);
  outline: none;
}

.btpmat-salesmap__point.is-active {
  z-index: 4;
  background: linear-gradient(135deg, var(--sm-dot-1), var(--sm-dot-3));
  box-shadow:
    0 0 0 8px rgba(249, 115, 22, 0.12),
    0 14px 32px rgba(249, 115, 22, 0.24);
  transform: scale(1.14);
}

.btpmat-salesmap__point.is-active::before {
  opacity: 1;
}

.btpmat-salesmap__point--size-1 { --point-size: 11px; }
.btpmat-salesmap__point--size-2 { --point-size: 14px; }
.btpmat-salesmap__point--size-3 { --point-size: 18px; }
.btpmat-salesmap__point--size-4 { --point-size: 22px; }

.btpmat-salesmap__tooltip {
  position: fixed;
  z-index: 9999;
  min-width: 180px;
  max-width: 300px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.94);
  color: #fff;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.28);
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 6px, 0);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  pointer-events: none;
}

.btpmat-salesmap__tooltip.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate3d(0, 0, 0);
}

.btpmat-salesmap__tooltip-zone {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
  margin-bottom: 6px;
}

.btpmat-salesmap__tooltip-title {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.btpmat-salesmap__tooltip-meta {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: rgba(255,255,255,0.82);
  line-height: 1.5;
}

.btpmat-salesmap__resetzoom {
  margin: 10px 10px 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  background: #fff;
  color: var(--sm-text-soft);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btpmat-salesmap__resetzoom:hover {
  border-color: rgba(20, 184, 166, 0.35);
  color: var(--sm-primary);
}

.btpmat-salesmap__panel--info.is-highlighted {
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18), 0 18px 45px rgba(15, 23, 42, 0.14);
  transition: box-shadow .25s ease;
}

.btpmat-salesmap__empty {
  padding: 18px;
  border-radius: 18px;
  background: var(--sm-danger-soft);
  border: 1px solid rgba(239, 68, 68, 0.12);
  color: #991b1b;
}

.btpmat-salesmap__mapcard,
.btpmat-salesmap__panel,
.btpmat-salesmap__stat,
.btpmat-salesmap__domitem {
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.btpmat-salesmap__mapcard:hover,
.btpmat-salesmap__panel:hover,
.btpmat-salesmap__stat:hover {
  box-shadow: var(--sm-shadow-hover);
}

@media (min-width: 768px) {
  .btpmat-salesmap__inner {
    padding: 0 18px;
  }

  .btpmat-salesmap__stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .btpmat-salesmap__subgrid {
    grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
    align-items: start;
  }

  .btpmat-salesmap__map--france {
    min-height: 560px;
    padding: 14px;
  }

  .btpmat-salesmap__map--corse {
    min-height: 360px;
    padding: 12px;
  }

  .btpmat-salesmap__domgrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .btpmat-salesmap {
    padding: 28px 0 36px;
  }

  .btpmat-salesmap__layout {
    grid-template-columns: minmax(0, 1.65fr) minmax(320px, 420px);
    align-items: start;
  }

  .btpmat-salesmap__panel--info {
    display: block;
  }

  .btpmat-salesmap__cardhead,
  .btpmat-salesmap__panel {
    padding-left: 22px;
    padding-right: 22px;
  }

  .btpmat-salesmap__domgrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1440px) {
  .btpmat-salesmap__map--france {
    min-height: 640px;
  }

  .btpmat-salesmap__domgrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .btpmat-salesmap__point,
  .btpmat-salesmap__mapcard,
  .btpmat-salesmap__panel,
  .btpmat-salesmap__stat,
  .btpmat-salesmap__domitem {
    transition: none !important;
  }
}