/* ==========================================================================
   phsstoremap.css – Styles de la carte des magasins PHS
   ========================================================================== */

/* ---- Section globale ---- */
.phs-store-map-section {
  padding: 40px 0 50px;
  background: #4a372f;
}

.phs-map-title {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  color: #f0f0f0;
  margin-bottom: 6px;
}

.phs-map-subtitle {
  text-align: center;
  font-size: 0.95rem;
  color: #f0f0f0;
  margin-bottom: 24px;
}

/* ---- Conteneur de la carte ---- */
#phs-store-map {
  height: 520px;
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  z-index: 0;
}

/* ---- Marqueur image personnalisé ---- */
.phs-map-marker-image {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}

/* ---- Popup Leaflet ---- */
.phs-leaflet-popup .leaflet-popup-content-wrapper {
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  padding: 0;
  overflow: hidden;
}

.phs-leaflet-popup .leaflet-popup-content {
  margin: 0;
  width: auto !important;
}

.phs-leaflet-popup .leaflet-popup-tip-container {
  margin-top: -1px;
}

/* ---- Contenu interne du popup ---- */
.phs-popup {
  width: 300px;
  min-width: 300px;
  max-width: 300px;
  height: 200px;
  font-family: inherit;
  font-size: 14px;
  overflow: hidden;
}

.phs-popup-media {
  width: 100%;
  height: 100px;
  min-height: 100px;
  max-height: 100px;
  overflow: hidden;
  background: #f5f5f5;
}

.phs-popup-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.phs-popup-name {
  margin: 0 0 3px;
  font-size: 0.98rem;
  font-weight: 700;
  color: #1a2744;
  line-height: 1.1;
}

.phs-popup-sponsored {
  color: #6b7280;
  font-size: 0.68rem;
  font-weight: 600;
}

.phs-popup-trigramme {
  display: inline-block;
  background: #e9eef8;
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #1a2744;
  margin-bottom: 0;
}

.phs-popup-body {
  padding: 7px 9px;
  background: #fff;
  height: 100px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3px;
}

.phs-popup-body-home {
  justify-content: flex-start;
}

.phs-popup-top {
  display: flex;
  justify-content: space-between;
}

.phs-popup-head {
  min-width: 0;
}

.phs-popup-actions {
  display: flex;
  gap: 5px;
  align-items: flex-start;
}

.phs-popup-action {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e8f5fb;
  color: #0f5f7a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 11px;
}

.leaflet-popup-content p {
  margin: 0;
}

.phs-popup-address {
  margin: 0;
  color: #4a5568;
  line-height: 1.2;
  font-size: 0.62rem;
  max-height: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  flex: 0 0 auto;
}

.phs-popup-stock-line {
  margin: 0;
  font-size: 0.68rem;
  flex: 0 0 auto;
}

.phs-popup-stock-ok {
  color: #4a372f;
  font-weight: 600;
  background: #cbe10f;
  border: 1px solid #cbe10f;
  border-radius: 4px;
  padding: 1px 5px;
  display: inline-block;
}

.phs-popup-stock-empty {
  color: #744210;
  font-weight: 600;
  background: #fffbeb;
  border: 1px solid #feebc8;
  border-radius: 4px;
  padding: 1px 5px;
  display: inline-block;
}

.phs-popup-code {
  margin: 0;
  font-size: 0.56rem;
  color: #a0aec0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phs-popup-bottom {
  padding: 3px 6px;
  display: flex;
}

.phs-popup-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  background: #bde9f6;
  color: #0c4a6e;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.6rem;
  padding: 3px 7px;
  white-space: nowrap;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  #phs-store-map {
    height: 380px;
  }

  .phs-map-title {
    font-size: 1.4rem;
  }
}
