/* ============================================================
   Polaris Cartographie — styles scoped sous .polaris-carte-wrap
   Toutes les règles sont préfixées pour éviter tout conflit
   avec le thème WordPress actif.
   ============================================================ */

.polaris-carte-wrap {
  --pc-violet:      #27103E;
  --pc-violet-dark: #1a0a2e;
  --pc-cyan:        #4EC6E0;
  --pc-cyan-light:  #e8f8fc;
  --pc-bg:          #f8f8f8;
  --pc-white:       #ffffff;
  --pc-zinc-100:    #f4f4f5;
  --pc-zinc-200:    #e4e4e7;
  --pc-zinc-400:    #a1a1aa;
  --pc-zinc-600:    #52525b;
  --pc-zinc-800:    #27272a;
  --pc-radius:      10px;
  --pc-shadow:      0 1px 4px rgba(0,0,0,.07), 0 0 0 1px var(--pc-zinc-200);

  font-family: 'Nunito Sans', sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--pc-zinc-800);
  box-sizing: border-box;
}

.polaris-carte-wrap *,
.polaris-carte-wrap *::before,
.polaris-carte-wrap *::after {
  box-sizing: inherit;
}

/* ── LAYOUT ── */
.polaris-carte-wrap .pc-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
  align-items: start;
  padding: 24px 0;
}

/* ── CARTE ── */
.polaris-carte-wrap .pc-map-card {
  background: var(--pc-white);
  border-radius: var(--pc-radius);
  box-shadow: var(--pc-shadow);
  padding: 20px;
}

.polaris-carte-wrap .pc-map-card h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--pc-zinc-800);
  margin: 0 0 16px;
  padding: 0;
  border: none;
  background: none;
}

.polaris-carte-wrap .pc-svg-wrap {
  width: 100%;
}

.polaris-carte-wrap .pc-svg-wrap svg {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: auto !important;
}

/* ── RÉGIONS SVG ── */
.polaris-carte-wrap .pc-region {
  fill: #d1d5db;
  stroke: #fff;
  stroke-width: 1.5;
  stroke-linejoin: round;
  transition: filter .15s, stroke-width .1s;
  cursor: default;
  pointer-events: all !important;
}

.polaris-carte-wrap .pc-region.pc-has-data {
  cursor: pointer;
  pointer-events: all !important;
}

.polaris-carte-wrap .pc-region.pc-has-data:hover {
  filter: brightness(1.12);
  stroke-width: 3;
}

/* Cercle visible élargi autour de Dakar (parité avec la carte de [polaris_vue_nationale]). */
.polaris-carte-wrap .pc-dakar-hit {
  stroke: #4EC6E0;
  stroke-width: 2;
  cursor: pointer;
  transition: fill .15s, stroke-width .15s;
}
.polaris-carte-wrap .pc-dakar-hit:hover {
  stroke-width: 3;
}

.polaris-carte-wrap .pc-label {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  fill: rgba(255,255,255,.85);
  text-anchor: middle;
  pointer-events: none;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.polaris-carte-wrap .pc-label.pc-dark {
  fill: #52525b;
}

/* ── LÉGENDE ── */
.polaris-carte-wrap .pc-legend {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.polaris-carte-wrap .pc-legend-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--pc-zinc-600);
  margin-right: 2px;
}

.polaris-carte-wrap .pc-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--pc-zinc-600);
}

.polaris-carte-wrap .pc-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
  display: inline-block;
}

/* ── SIDEBAR ── */
.polaris-carte-wrap .pc-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.polaris-carte-wrap .pc-side-card {
  background: var(--pc-white);
  border-radius: var(--pc-radius);
  box-shadow: var(--pc-shadow);
  padding: 18px;
}

.polaris-carte-wrap .pc-side-card h3 {
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--pc-zinc-400);
  margin: 0 0 12px;
  padding: 0;
  border: none;
  background: none;
}

.polaris-carte-wrap .pc-region-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.polaris-carte-wrap .pc-region-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  text-decoration: none;
  background: var(--pc-zinc-100);
  border-left: 3px solid transparent;
  transition: background .12s;
  cursor: default;
  color: inherit;
}

.polaris-carte-wrap .pc-region-item.pc-has-data {
  cursor: pointer;
  border-left-color: var(--pc-cyan);
}

.polaris-carte-wrap .pc-region-item.pc-has-data:hover {
  background: var(--pc-cyan-light);
}

.polaris-carte-wrap .pc-item-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.polaris-carte-wrap .pc-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--pc-zinc-800);
  flex: 1;
}

.polaris-carte-wrap .pc-item-taux {
  font-size: 12px;
  font-weight: 700;
}

.polaris-carte-wrap .pc-item-badge {
  font-size: 10px;
  background: var(--pc-zinc-200);
  color: var(--pc-zinc-400);
  border-radius: 4px;
  padding: 2px 7px;
  font-weight: 600;
}

.polaris-carte-wrap .pc-about {
  font-size: 13px;
  color: var(--pc-zinc-600);
  line-height: 1.6;
  margin: 0;
}

.polaris-carte-wrap .pc-about strong {
  color: var(--pc-zinc-800);
}

/* ── TOOLTIP ── */
.polaris-carte-tooltip {
  position: fixed;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15), 0 0 0 1px #e4e4e7;
  padding: 14px 16px;
  pointer-events: auto;
  z-index: 99999;
  display: none;
  min-width: 210px;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 14px;
}

.polaris-carte-tooltip .pc-tt-region {
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #27103E;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.polaris-carte-tooltip .pc-tt-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.polaris-carte-tooltip .pc-tt-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #52525b;
  padding: 3px 0;
  gap: 16px;
}

.polaris-carte-tooltip .pc-tt-row strong {
  color: #27272a;
  font-weight: 600;
}

.polaris-carte-tooltip .pc-tt-taux {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.polaris-carte-tooltip .pc-tt-link {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #4EC6E0;
  text-decoration: none;
  border-top: 1px solid #e4e4e7;
  padding-top: 8px;
  width: 100%;
}

.polaris-carte-tooltip .pc-tt-link:hover {
  color: #27103E;
}

.polaris-carte-tooltip .pc-tt-no-data {
  font-size: 12px;
  color: #a1a1aa;
  font-style: italic;
  margin: 4px 0 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 780px) {
  .polaris-carte-wrap .pc-layout {
    grid-template-columns: 1fr;
  }
}
