/* ============================================================
   roadtrip-poi.css v1 - POI le long d'un road trip
   ============================================================
   Styles :
   - Markers Leaflet (divIcon par categorie avec icone SVG)
   - Popup Leaflet (override des styles Leaflet par defaut
     pour coller au glass morphism navy/orange/Outfit)
   - Toggle POI (control custom Leaflet top-right)
   ============================================================ */

/* ------------------------------------------------------------
   Marker POI sur la carte
   ------------------------------------------------------------ */
.rtv-poi-marker {
  background: transparent !important;
  border: none !important;
}
.rtv-poi-marker-inner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  transition: transform 0.15s ease;
}
.rtv-poi-marker-inner:hover {
  transform: scale(1.15);
}
.rtv-poi-marker-inner svg {
  width: 14px;
  height: 14px;
}

/* ------------------------------------------------------------
   Override Leaflet popup pour les popups POI uniquement
   (className custom "rtv-poi-popup-wrap" passe a bindPopup)
   ------------------------------------------------------------ */
.rtv-poi-popup-wrap .leaflet-popup-content-wrapper {
  background: rgba(11, 22, 40, 0.95);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  padding: 0;
  overflow: hidden;
}
.rtv-poi-popup-wrap .leaflet-popup-content {
  margin: 0;
  padding: 0;
  font-family: 'Outfit', system-ui, sans-serif;
  line-height: 1.45;
  width: 260px !important;
}
.rtv-poi-popup-wrap .leaflet-popup-tip {
  background: rgba(11, 22, 40, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.rtv-poi-popup-wrap .leaflet-popup-close-button {
  color: rgba(255, 255, 255, 0.7);
  font-size: 22px;
  padding: 6px 8px 0 0;
  width: 28px;
  height: 28px;
}
.rtv-poi-popup-wrap .leaflet-popup-close-button:hover {
  color: #f47920;
  background: transparent;
}

/* ------------------------------------------------------------
   Contenu du popup
   ------------------------------------------------------------ */
.rtv-poi-popup {
  display: flex;
  flex-direction: column;
}
.rtv-poi-popup-img {
  width: 100%;
  height: 130px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}
.rtv-poi-popup-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.rtv-poi-popup-body {
  padding: 12px 14px 14px;
}
.rtv-poi-popup-type {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.rtv-poi-popup-typeicon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.rtv-poi-popup-typeicon svg {
  width: 14px;
  height: 14px;
}
.rtv-poi-popup-name {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 2px;
}
.rtv-poi-popup-dist {
  font-size: 11px;
  color: #9aa8bf;
  margin-bottom: 8px;
}
.rtv-poi-popup-extract {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
  margin-bottom: 10px;
  max-height: 90px;
  overflow: hidden;
}
.rtv-poi-popup-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  color: #f47920;
  text-decoration: none;
  padding: 5px 10px;
  border: 1px solid rgba(244, 121, 32, 0.35);
  border-radius: 20px;
  transition: background 0.15s, border-color 0.15s;
}
.rtv-poi-popup-link:hover {
  background: rgba(244, 121, 32, 0.12);
  border-color: rgba(244, 121, 32, 0.6);
}

/* ------------------------------------------------------------
   Toggle POI (control Leaflet custom top-right)
   ------------------------------------------------------------ */
.rtv-poi-toggle {
  background: rgba(11, 22, 40, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: border-color 0.15s, color 0.15s;
  user-select: none;
}
.rtv-poi-toggle:hover {
  border-color: rgba(244, 121, 32, 0.5);
}
.rtv-poi-toggle svg {
  width: 14px;
  height: 14px;
}
.rtv-poi-toggle.active {
  color: #f47920;
  border-color: rgba(244, 121, 32, 0.5);
}
.rtv-poi-toggle.active::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f47920;
  box-shadow: 0 0 6px #f47920;
}
.rtv-poi-toggle.loading {
  opacity: 0.7;
  pointer-events: none;
}
.rtv-poi-toggle-count {
  font-size: 10px;
  color: #9aa8bf;
  margin-left: 2px;
}
.rtv-poi-toggle.active .rtv-poi-toggle-count {
  color: rgba(244, 121, 32, 0.75);
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 480px) {
  .rtv-poi-popup-wrap .leaflet-popup-content {
    width: 230px !important;
  }
  .rtv-poi-popup-img {
    height: 110px;
  }
  .rtv-poi-popup-body {
    padding: 10px 12px 12px;
  }
  .rtv-poi-popup-name {
    font-size: 14px;
  }
  .rtv-poi-toggle {
    padding: 5px 8px;
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rtv-poi-marker-inner {
    transition: none;
  }
}
