/* ============================================================
   AxessPharma — Carte Leaflet des pharmacies
   ============================================================ */

.ax-map-wrap {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 0;
  background: #fff;
  border: 1px solid #DBE4DC;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,84,113, .08);
}
@media (max-width: 900px) {
  .ax-map-wrap { grid-template-columns: 1fr; }
  .ax-map { height: 380px !important; }
  .ax-map-sidebar { max-height: 480px; }
}
.ax-map {
  position: relative;
  background: #F6F8F5;
  z-index: 1;
}

/* Sidebar */
.ax-map-sidebar {
  display: flex;
  flex-direction: column;
  background: #FAFCFA;
  border-left: 1px solid #DBE4DC;
  max-height: 560px;
}
.ax-map-search {
  padding: 14px;
  background: #fff;
  border-bottom: 1px solid #E8EFE9;
  position: sticky;
  top: 0;
  z-index: 2;
}
.ax-map-search input {
  width: 100%;
  padding: 11px 16px 11px 38px;
  background: #F6F8F5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235C6B5E' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") 12px center / 16px no-repeat;
  border: 1px solid #DBE4DC;
  border-radius: 999px;
  font-family: "Roboto", sans-serif;
  font-size: 0.92rem;
  color: #353535;
  outline: none;
  transition: border-color .2s;
}
.ax-map-search input:focus {
  border-color: #006E96;
  background-color: #fff;
}

.ax-map-results {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: #BCC8BD transparent;
}
.ax-map-results::-webkit-scrollbar { width: 6px; }
.ax-map-results::-webkit-scrollbar-thumb { background: #BCC8BD; border-radius: 3px; }

.ax-map-item {
  display: flex;
  width: 100%;
  text-align: left;
  padding: 14px 14px;
  margin-bottom: 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all .15s ease;
  font-family: "Roboto", sans-serif;
  gap: 12px;
  align-items: flex-start;
}
.ax-map-item__logo {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  margin-top: 0;
  opacity: .92;
  align-self: flex-start;
}
.ax-map-item__body {
  flex: 1;
  min-width: 0;
}
.ax-map-item__addr {
  display: block;
}
.ax-map-item__phone {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  font-size: 0.8rem !important;
  color: #006E96 !important;
  font-weight: 600;
  font-family: "Lato", sans-serif;
}
.ax-map-item:hover {
  background: rgba(0,110,150, .06);
  border-color: rgba(0,110,150, .15);
}
.ax-map-item.is-active {
  background: rgba(0,110,150, .12);
  border-color: #006E96;
}
.ax-map-item strong {
  display: block;
  font-family: "Lato", sans-serif;
  font-size: 0.94rem;
  font-weight: 700;
  color: #181818;
  margin-bottom: 4px;
  letter-spacing: -0.005em;
}
.ax-map-item span {
  display: block;
  font-size: 0.82rem;
  color: #5C6B5E;
  line-height: 1.4;
}
.ax-map-item em {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  background: rgba(0,110,150, .1);
  color: #005471;
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 4px;
}

.ax-map-empty {
  padding: 30px 18px;
  text-align: center;
  color: #8B9A8D;
  font-size: 0.9rem;
}

/* Custom marker pin (vert AxessPharma) */
.ax-map-pin {
  background: transparent;
  border: none;
}
.ax-map-pin__circle {
  position: relative;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #006E96, #005471);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 3px solid #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .2s;
}
.ax-map-pin__circle svg {
  transform: rotate(45deg);
}
.ax-map-pin:hover .ax-map-pin__circle {
  transform: rotate(-45deg) scale(1.15);
}

/* Popup */
.leaflet-popup-content-wrapper {
  border-radius: 12px !important;
  padding: 4px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .15) !important;
}
.leaflet-popup-content {
  margin: 14px 18px !important;
  font-family: "Roboto", sans-serif;
}
.ax-map-popup strong {
  display: block;
  font-family: "Lato", sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #181818;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.ax-map-popup__addr {
  font-size: 0.84rem;
  color: #5C6B5E;
  line-height: 1.5;
  margin-bottom: 6px;
}
.ax-map-popup__region {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(0,110,150, .1);
  color: #005471;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 4px;
  margin-bottom: 8px;
}
.ax-map-popup__hours {
  font-size: 0.8rem;
  color: #5C6B5E;
  margin-bottom: 8px;
}
.ax-map-popup__phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #006E96;
  color: #fff !important;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background .2s;
}
.ax-map-popup__phone:hover {
  background: #005471;
}

/* Override leaflet z-index when in iframe */
.leaflet-pane,
.leaflet-control { z-index: 1 !important; }
.leaflet-top { z-index: 2 !important; }

/* ============================================================
   Chips de filtre régions (sidebar carte + modal shop-locator)
   Reset explicite pour neutraliser le style bouton du thème/Elementor.
   ============================================================ */
.ax-map-regions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid #E8EFE9;
}
.ax-map-regions .ax-map-chip {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 7px 15px;
  border: 1px solid #DBE4DC;
  border-radius: 999px;
  background: #FFFFFF;
  color: #41524C;
  font-family: "Lato", "Segoe UI", sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: none;
  cursor: pointer;
  box-shadow: none;
  transition: all .2s ease;
  white-space: nowrap;
}
.ax-map-regions .ax-map-chip:hover {
  border-color: #006E96;
  color: #006E96;
  background: #F1F8FB;
}
.ax-map-regions .ax-map-chip:focus-visible {
  outline: 2px solid rgba(0,110,150,.4);
  outline-offset: 2px;
}
.ax-map-regions .ax-map-chip.is-active {
  background: #006E96;
  border-color: #006E96;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0,110,150,.25);
}
/* Variante "de garde" — accent vert logo */
.ax-map-regions .ax-map-chip--oncall .ax-map-chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #009E60;
  box-shadow: 0 0 0 3px rgba(0,158,96,.18);
}
.ax-map-regions .ax-map-chip--oncall:hover {
  border-color: #009E60;
  color: #009E60;
  background: #F0FAF5;
}
.ax-map-regions .ax-map-chip--oncall.is-active {
  background: #009E60;
  border-color: #009E60;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0,158,96,.28);
}
.ax-map-regions .ax-map-chip--oncall.is-active .ax-map-chip__dot {
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(255,255,255,.3);
}
.ax-map-regions .ax-map-chip__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(0,0,0,.08);
  font-size: 0.72rem;
  font-weight: 700;
}
.ax-map-regions .ax-map-chip.is-active .ax-map-chip__badge {
  background: rgba(255,255,255,.25);
}
@media (max-width: 600px) {
  .ax-map-regions { padding: 12px; gap: 7px; }
  .ax-map-regions .ax-map-chip { padding: 6px 13px; font-size: 0.8rem; }
}

/* ============================================================
   AjustementsAxessPharma — photo façade, bouton minisite,
   filtres, et hauteur allongée (5 officines sans scroll).
   ============================================================ */
/* Hauteur : on allonge pour afficher les 5 pharmacies sans scroller */
.ax-map { height: 720px !important; }
.ax-map-sidebar { max-height: 720px; }
@media (max-width: 900px) {
  .ax-map { height: 340px !important; }
  .ax-map-sidebar { max-height: none; }
}

/* Item : photo de façade en vignette à gauche */
.ax-map-item { align-items: center; gap: 11px; padding: 9px 10px !important; }
.ax-map-item__photo {
  flex: 0 0 48px; width: 48px; height: 48px; border-radius: 9px;
  background-size: cover; background-position: center; background-color: #EEF3F1;
  align-self: flex-start; margin-top: 2px;
}
.ax-map-item__body { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.ax-map-item__body strong { font-size: .92rem; line-height: 1.2; }
.ax-map-item__addr { font-size: .8rem; line-height: 1.25; }
.ax-map-item em { font-size: .74rem; }

/* Bouton "Voir la pharmacie" dans l'item */
.ax-map-item__cta {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 3px;
  align-self: flex-start;
  color: #006E96; font-family: "Lato", sans-serif; font-weight: 700; font-size: .8rem;
}
.ax-map-item__cta svg { transition: transform .15s; }
.ax-map-item:hover .ax-map-item__cta svg { transform: translateX(3px); }

/* Chips filtres — état actif net */
.ax-map-chip { cursor: pointer; }
.ax-map-chip.is-active { background: #006E96 !important; color: #fff !important; border-color: #006E96 !important; }

/* Popup : photo + bouton minisite */
.ax-map-popup__photo {
  display: block; width: 100%; height: 110px; border-radius: 8px; margin-bottom: 8px;
  background-size: cover; background-position: center; background-color: #EEF3F1;
}
.ax-map-popup__cta {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  background: #006E96; color: #fff !important; text-decoration: none;
  padding: 8px 16px; border-radius: 999px; font-family: "Lato", sans-serif; font-weight: 700; font-size: .85rem;
  transition: background .15s;
}
.ax-map-popup__cta:hover { background: #005471; }


/* Compactage supplémentaire de la liste (éviter le scroll pour 5 officines) */
.ax-map-item em { display: none; }            /* région redondante avec l'adresse */
.ax-map-item__phone { font-size: .78rem !important; margin-top: 1px; }
.ax-map-results { padding: 6px !important; }
.ax-map-item { margin-bottom: 4px; }
