.wtk-map-wrap {
  width: 100%;
  position: relative;
}

.wtk-map {
  width: 100%;
  min-height: 320px;
  border-radius: var(--wtk-map-radius, 16px);
  overflow: hidden;
  position: relative;
  background: var(--wtk-map-background, #e7ecef);
  --wtk-marker-color: #111827;
  --wtk-map-background: #e7ecef;
  --wtk-map-accent-color: #E85611;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.wtk-map-dragging {
  cursor: grabbing;
}

.wtk-map-no-tiles,
.wtk-map-tiles-failed {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.32), transparent 28%),
    var(--wtk-map-background, #e7ecef);
}

.wtk-map-lite {
  position: relative;
  display: block;
}

.wtk-map-tiles,
.wtk-map-markers {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.wtk-map-tiles {
  z-index: 1;
  pointer-events: none;
  display: block !important;
  border: 0 !important;
  background: transparent !important;
}


.wtk-map-markers {
  z-index: 3;
  pointer-events: none;
}

.wtk-map-tile {
  position: absolute;
  width: 256px;
  height: 256px;
  max-width: none !important;
  min-width: 256px !important;
  object-fit: cover !important;
  display: block !important;
  user-select: none;
  pointer-events: none;
  border: 0 !important;
  background: transparent !important;
}

.wtk-map-marker,
.wtk-map-cluster {
  position: absolute;
  z-index: 3;
}

.wtk-map-marker {
  pointer-events: none;
}

.wtk-map-cluster {
  pointer-events: auto;
  cursor: pointer;
}

.wtk-map-marker {
  width: 34px;
  height: 44px;
  transform: translate(-50%, -100%) scale(var(--wtk-marker-scale, 1));
  transform-origin: 50% 100%;
}

.wtk-map-marker::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 3px;
  width: 24px;
  height: 24px;
  border: 2px solid #fff;
  border-radius: 999px 999px 999px 0;
  background: var(--wtk-marker-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  transform: rotate(-45deg);
}

.wtk-map-marker-logo {
  position: absolute;
  left: 17px;
  top: 15px;
  z-index: 2;
  width: var(--wtk-map-logo-size, 18px);
  height: var(--wtk-map-logo-size, 18px);
  object-fit: contain;
  background: transparent !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  box-sizing: border-box;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.wtk-map-marker-dot {
  position: absolute;
  left: 16px;
  top: 14px;
  z-index: 2;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #fff;
  transform: translate(-50%, -50%);
}

.wtk-map-cluster {
  appearance: none !important;
  -webkit-appearance: none !important;
  padding: 0 !important;
  border: 3px solid rgba(255, 255, 255, 0.92) !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: var(--wtk-map-cluster-size, 44px);
  height: var(--wtk-map-cluster-size, 44px);
  border-radius: 999px !important;
  background: var(--wtk-marker-color) !important;
  color: #fff !important;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.32);
  font-size: var(--wtk-map-cluster-font-size, 14px);
  font-weight: 700;
  font-family: inherit;
  line-height: 1;
  transform: translate(-50%, -50%);
}

.wtk-map-cluster:hover,
.wtk-map-cluster:focus-visible {
  background: var(--wtk-map-accent-color, #E85611) !important;
  color: #fff !important;
  transform: translate(-50%, -50%) scale(1.06);
}

.wtk-map-cluster:focus-visible {
  outline: 3px solid var(--wtk-map-accent-color, #E85611);
  outline-offset: 3px;
}

.wtk-map-controls {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
  cursor: default;
}

.wtk-map .wtk-map-controls button,
.wtk-map .wtk-map-controls button[type='button'] {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-bottom: 1px solid #dcdcde !important;
  border-radius: 0 !important;
  background: rgba(255, 255, 255, 0.96) !important;
  color: #111827 !important;
  cursor: pointer;
  font-size: 22px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  box-shadow: none !important;
  text-decoration: none !important;
}

.wtk-map .wtk-map-controls button:last-child {
  border-bottom: 0 !important;
}

.wtk-map .wtk-map-controls button:hover:not(:disabled),
.wtk-map .wtk-map-controls button:focus-visible:not(:disabled),
.wtk-map .wtk-map-controls button[type='button']:hover:not(:disabled),
.wtk-map .wtk-map-controls button[type='button']:focus-visible:not(:disabled) {
  background: var(--wtk-map-accent-color, #E85611) !important;
  color: #fff !important;
  border-color: var(--wtk-map-accent-color, #E85611) !important;
}

.wtk-map .wtk-map-controls button:disabled {
  cursor: default;
  opacity: 0.45;
}

.wtk-map .wtk-map-controls button:focus-visible {
  outline: 3px solid var(--wtk-map-accent-color, #E85611) !important;
  outline-offset: -3px;
}

.wtk-map-attribution {
  position: absolute;
  right: 8px;
  bottom: 6px;
  z-index: 5;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.88);
  color: #111827;
  font-size: 11px;
  line-height: 1.2;
  cursor: default;
}

.wtk-map-attribution a {
  color: #111827;
  text-decoration: underline;
}

.wtk-map-empty {
  opacity: 0.7;
}

.wtk-map-empty-message {
  margin-top: 12px;
  font-size: 14px;
}

.wtk-map-filters,
.wtk-map-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin: 0 0 14px;
  font-size: 14px;
  color: #111827;
}

.wtk-map-filters label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.wtk-map-filters input[type='checkbox'] {
  width: 16px;
  height: 16px;
  accent-color: var(--wtk-map-accent-color, #E85611);
}

.wtk-map-legend {
  margin: 12px 0 0;
  color: #4b5563;
}

.wtk-map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.wtk-map-legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  display: inline-block;
  box-sizing: border-box;
}

.wtk-map-legend-dot--sales {
  background: var(--wtk-marker-color, #111827);
  border: 2px solid var(--wtk-marker-color, #111827);
}

.wtk-map-legend-dot--public {
  background: #fff;
  border: 2px solid var(--wtk-marker-color, #111827);
}

.wtk-map-marker--public {
  pointer-events: auto;
  appearance: none !important;
  -webkit-appearance: none !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  cursor: pointer;
}

.wtk-map-marker--public::before {
  background: #fff;
  border-color: var(--wtk-marker-color, #111827);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.32);
}

.wtk-map-marker--public:hover::before,
.wtk-map-marker--public:focus-visible::before {
  background: #fff;
  border-color: var(--wtk-map-accent-color, #E85611);
}

.wtk-map-marker--public:focus-visible {
  outline: none !important;
}

.wtk-map-marker-logo-mask {
  position: absolute;
  left: 17px;
  top: 15px;
  z-index: 2;
  width: var(--wtk-map-logo-size, 18px);
  height: var(--wtk-map-logo-size, 18px);
  background: var(--wtk-marker-color, #111827);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.wtk-map-marker--public:hover .wtk-map-marker-logo-mask,
.wtk-map-marker--public:focus-visible .wtk-map-marker-logo-mask {
  background: var(--wtk-map-accent-color, #E85611);
}

.wtk-map-marker--public .wtk-map-marker-dot {
  background: var(--wtk-marker-color, #111827);
}

.wtk-map-popup {
  position: absolute;
  z-index: 6;
  width: min(260px, calc(100% - 24px));
  padding: 13px 38px 13px 14px;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.22);
  transform: translate(-50%, -100%);
  pointer-events: auto;
  font-size: 13px;
  line-height: 1.35;
}

.wtk-map-popup::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -7px;
  width: 14px;
  height: 14px;
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 4px 4px 12px rgba(15, 23, 42, 0.08);
}

.wtk-map-popup-title {
  display: block;
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
}

.wtk-map-popup-address {
  display: block;
  color: #4b5563;
}

.wtk-map-popup-close {
  position: absolute;
  right: 7px;
  top: 6px;
  width: 26px;
  height: 26px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #6b7280 !important;
  font-size: 20px !important;
  line-height: 1 !important;
  cursor: pointer;
  box-shadow: none !important;
}

.wtk-map-popup-close:hover,
.wtk-map-popup-close:focus-visible {
  background: var(--wtk-map-accent-color, #E85611) !important;
  color: #fff !important;
}

@media (max-width: 640px) {
  .wtk-map-filters,
  .wtk-map-legend {
    font-size: 13px;
    gap: 8px 12px;
  }
}

/* V16: les lieux publics doivent rester lisibles au-dessus des ventes anonymisées. */
.wtk-map-marker--public {
  z-index: 4;
}

.wtk-map-popup {
  z-index: 7;
}

/* V18: les ventes anonymisées ne s’affichent en pins unitaires qu’après zoom suffisant. */
.wtk-map-marker-logo-mask--sale {
  background: #fff;
}

.wtk-map-marker-logo-mask--public {
  background: var(--wtk-marker-color, #111827);
}

.wtk-map-marker-badge {
  position: absolute;
  right: -5px;
  top: -3px;
  z-index: 4;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 2px solid #fff;
  background: var(--wtk-marker-color, #111827);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.24);
  transform: translate(35%, -15%);
  pointer-events: none;
}

.wtk-map-marker--aggregate {
  z-index: 3;
}

.wtk-map-marker--public {
  z-index: 6;
}


/* V21 : les ventes d'une même ville sont dispersées en nuage stable et les pins se réduisent légèrement dans les zones très denses. */
.wtk-map-marker--sale {
  will-change: transform;
}

.wtk-map-zoom-notice {
  position: absolute;
  left: 50%;
  bottom: 44px;
  transform: translateX(-50%);
  z-index: 14;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: #1f2937;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(15,23,42,.14);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
}

/* V23 : les clients équipés s'affichent progressivement selon le zoom. */
.wtk-map-marker--sale {
  will-change: transform;
}

.wtk-map-sales-waiting-zoom .wtk-map-zoom-notice {
  opacity: 1;
  visibility: visible;
}

/* V24 : habillage front de la carte + recherche. */
.wtk-map-wrap--modern {
  padding: clamp(18px, 2.2vw, 28px);
  border-radius: clamp(22px, 3vw, 34px);
  background: #fff;
  box-shadow: 0 18px 56px rgba(15, 23, 42, 0.10);
  font-family: inherit;
}

.wtk-map-wrap--modern .wtk-map-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 14px 18px;
  margin: 0 0 18px;
}

.wtk-map-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.wtk-map-search-icon {
  position: absolute;
  left: 19px;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  color: #8a93a2;
  font-size: 18px;
  line-height: 1;
  pointer-events: none;
}

.wtk-map-search-input,
.wtk-map-search input[type='search'].wtk-map-search-input {
  width: 100%;
  min-height: 56px;
  padding: 0 24px 0 48px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #f1f1f3 !important;
  color: #1f2937 !important;
  font-size: clamp(15px, 1.2vw, 18px) !important;
  line-height: 1.2 !important;
  box-shadow: none !important;
  outline: none !important;
}

.wtk-map-search-input::placeholder {
  color: #70717a;
  opacity: 1;
}

.wtk-map-search-input:focus {
  box-shadow: 0 0 0 3px rgba(232, 86, 17, 0.16) !important;
}

.wtk-map-search-submit {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.wtk-map-search--loading .wtk-map-search-input {
  opacity: 0.75;
}

.wtk-map-wrap--modern .wtk-map-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  margin: 0;
  align-items: center;
  justify-content: flex-end;
}

.wtk-map-wrap--modern .wtk-map-filter-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 26px;
  border: 1px solid #dedee4;
  border-radius: 999px;
  background: #fff;
  color: #3f3f46;
  font-size: clamp(15px, 1.15vw, 18px);
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.wtk-map-wrap--modern .wtk-map-filter-pill:hover {
  border-color: rgba(232, 86, 17, 0.55);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.wtk-map-wrap--modern .wtk-map-filter-pill input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 3px solid var(--wtk-map-accent-color, #E85611);
  border-radius: 999px;
  background: #fff;
  box-sizing: border-box;
  flex: none;
  display: inline-block;
  position: relative;
  cursor: pointer;
}

.wtk-map-wrap--modern .wtk-map-filter-pill input[type='checkbox']::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 999px;
  background: var(--wtk-map-accent-color, #E85611);
  opacity: 0;
  transform: scale(.55);
  transition: opacity .14s ease, transform .14s ease;
}

.wtk-map-wrap--modern .wtk-map-filter-pill input[type='checkbox']:checked::after {
  opacity: 1;
  transform: scale(1);
}

.wtk-map-wrap--modern .wtk-map-filter-pill input[type='checkbox']:focus-visible {
  outline: 3px solid rgba(232, 86, 17, .28);
  outline-offset: 3px;
}

.wtk-map-stage {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--wtk-map-radius, 16px) + 10px);
  background: #cfeff5;
}

.wtk-map-wrap--modern .wtk-map {
  border-radius: calc(var(--wtk-map-radius, 16px) + 10px);
}

.wtk-map-caption {
  position: absolute;
  left: 22px;
  top: 8px;
  z-index: 6;
  max-width: calc(100% - 44px);
  color: rgba(31, 41, 55, 0.92);
  font-size: clamp(15px, 1.25vw, 19px);
  font-weight: 500;
  line-height: 1.25;
  pointer-events: none;
}

.wtk-map-privacy-card {
  position: absolute;
  left: clamp(18px, 2.4vw, 36px);
  bottom: clamp(18px, 2.4vw, 36px);
  z-index: 6;
  width: min(380px, calc(100% - 36px));
  padding: 22px 24px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  color: #73737b;
  box-shadow: 0 18px 46px rgba(15, 23, 42, 0.12);
  pointer-events: none;
}

.wtk-map-privacy-card strong,
.wtk-map-privacy-card span {
  display: block;
}

.wtk-map-privacy-card strong {
  margin: 0 0 8px;
  color: #1f2937;
  font-size: clamp(16px, 1.25vw, 19px);
  font-weight: 800;
  line-height: 1.15;
}

.wtk-map-privacy-card span {
  font-size: clamp(13px, 1.05vw, 16px);
  line-height: 1.45;
}

.wtk-map-wrap--modern .wtk-map-controls {
  left: 16px;
  top: 54px;
  border-radius: 12px;
}

.wtk-map-search-status {
  min-height: 20px;
  margin: 9px 0 0;
  color: #4b5563;
  font-size: 13px;
  font-weight: 600;
}

.wtk-map-search-status:empty {
  display: none;
}

.wtk-map-search-status--error {
  color: #b91c1c;
}

.wtk-map-wrap--modern .wtk-map-legend {
  display: none;
}

@media (max-width: 980px) {
  .wtk-map-wrap--modern .wtk-map-toolbar {
    grid-template-columns: 1fr;
  }

  .wtk-map-wrap--modern .wtk-map-filters {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }
}

@media (max-width: 640px) {
  .wtk-map-wrap--modern {
    padding: 14px;
    border-radius: 22px;
  }

  .wtk-map-search-input,
  .wtk-map-search input[type='search'].wtk-map-search-input,
  .wtk-map-wrap--modern .wtk-map-filter-pill {
    min-height: 48px;
    font-size: 14px !important;
  }

  .wtk-map-wrap--modern .wtk-map-filter-pill {
    padding: 0 16px;
  }

  .wtk-map-caption {
    left: 16px;
    top: 10px;
    font-size: 14px;
  }

  .wtk-map-privacy-card {
    padding: 16px 18px;
    border-radius: 16px;
  }
}

/* V25 : carte plus légère visuellement, sans caption ni bloc confidentialité. */
.wtk-map-caption,
.wtk-map-privacy-card {
  display: none !important;
}

.wtk-map-wrap--modern .wtk-map-controls {
  top: 16px;
}

.wtk-map-search-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8a93a2;
}

.wtk-map-search-icon-svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.wtk-map-gesture-hint {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 18;
  transform: translate(-50%, -50%) scale(.98);
  max-width: min(420px, calc(100% - 48px));
  padding: 14px 18px;
  border-radius: 14px;
  background: rgba(31, 41, 55, .86);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 16px 46px rgba(15, 23, 42, .28);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
}

.wtk-map-gesture-hint--visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 640px) {
  .wtk-map-wrap--modern .wtk-map-controls {
    top: 14px;
  }
}

/* V26 : filtres lisibles sur mobile, sans scroll horizontal caché. */
@media (max-width: 980px) {
  .wtk-map-wrap--modern .wtk-map-filters {
    justify-content: flex-start;
    flex-wrap: wrap;
    overflow: visible;
  }
}

@media (max-width: 640px) {
  .wtk-map-wrap--modern .wtk-map-toolbar {
    gap: 12px;
  }

  .wtk-map-wrap--modern .wtk-map-filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
  }

  .wtk-map-wrap--modern .wtk-map-filter-pill {
    width: 100%;
    min-height: 48px;
    justify-content: flex-start;
    white-space: normal;
    line-height: 1.18;
    padding: 0 18px;
  }

  .wtk-map-search-input,
  .wtk-map-search input[type='search'].wtk-map-search-input {
    padding-left: 44px !important;
  }
}
