* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #121212;
  color: #f0f0f0;
}

#map {
  width: 100%;
  height: 100%;
  z-index: 1;
  background: #121212;
}

/* Filtre Dark Mode natif et élégant sur OpenStreetMap pour un rendu sombre sans API key */
.dark-osm-tiles {
  filter: brightness(0.85) invert(1) contrast(1.2) hue-rotate(200deg);
}

.barde-header {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 420px;
}

.brand {
  background: rgba(20, 20, 22, 0.88);
  backdrop-filter: blur(12px);
  padding: 8px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: inline-block;
  align-self: flex-start;
}

.brand h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: #ffffff;
  line-height: 1;
}

.brand .subtitle {
  font-size: 0.72rem;
  color: #999999;
}

.search-container {
  position: relative;
  width: 100%;
}

.search-container .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  opacity: 0.6;
}

.search-container input {
  width: 100%;
  padding: 11px 75px 11px 40px;
  background: rgba(26, 26, 28, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  color: #fff;
  font-size: 0.92rem;
  outline: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.search-container input:focus {
  border-color: #f39c12;
  background: rgba(32, 32, 36, 0.95);
}

.places-count {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: #a0a0a0;
  background: rgba(255, 255, 255, 0.1);
  padding: 3px 8px;
  border-radius: 8px;
  pointer-events: none;
  font-weight: 600;
}

.filters-bar {
  position: absolute;
  top: 115px;
  left: 14px;
  right: 14px;
  z-index: 1000;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.filters-bar::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  white-space: nowrap;
  background: rgba(26, 26, 28, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e0e0e0;
  padding: 7px 15px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.filter-btn:hover {
  background: rgba(40, 40, 44, 0.95);
}

.filter-btn.active {
  background: #f39c12;
  color: #111;
  font-weight: 700;
  border-color: #f39c12;
}

.btn-locate {
  position: absolute;
  bottom: 30px;
  right: 20px;
  z-index: 1000;
  width: 50px;
  height: 50px;
  background: rgba(26, 26, 28, 0.9);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: #fff;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
}

.btn-locate:hover {
  border-color: #f39c12;
  transform: scale(1.06);
}

/* Map Markers (44px) */
.barde-marker {
  background: rgba(20, 20, 24, 0.95);
  border: 2.5px solid #f39c12;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.barde-marker:hover {
  transform: scale(1.15);
}

.barde-marker.marker-intimate {
  border-color: #3498db;
}

.barde-marker.marker-ephemeral {
  border-color: #e74c3c;
  border-radius: 10px;
}

/* Panel Sheet */
.place-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(24, 24, 28, 0.97);
  backdrop-filter: blur(24px);
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 16px 20px 24px 20px;
  z-index: 1100;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.6);
  touch-action: pan-y;
  will-change: transform;
  max-height: 80vh;
  overflow-y: auto;
}

.place-panel.dragging {
  transition: none !important;
}

.place-panel.active {
  transform: translateY(0);
}

.sheet-handle {
  width: 42px;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  margin: 0 auto 14px auto;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.panel-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel-header h2 {
  font-size: 1.35rem;
  color: #fff;
}

.btn-fav {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.btn-fav:hover {
  transform: scale(1.2);
}

.btn-close {
  background: none;
  border: none;
  color: #8e8e93;
  font-size: 1.3rem;
  cursor: pointer;
}

.neighborhood {
  color: #999;
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.distance-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(52, 152, 219, 0.2);
  color: #54a0ff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.badge {
  background: rgba(255, 255, 255, 0.1);
  color: #d1d1d6;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
}

.badge-warning { background: rgba(231, 76, 60, 0.25); color: #ff6b6b; }
.badge-info { background: rgba(52, 152, 219, 0.25); color: #54a0ff; }

.description {
  font-size: 0.92rem;
  line-height: 1.45;
  margin-bottom: 12px;
  color: #e0e0e0;
}

.capacity {
  font-size: 0.88rem;
  color: #aaa;
  margin-bottom: 16px;
}

.panel-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.btn {
  flex: 1;
  min-width: 90px;
  padding: 10px 8px;
  border-radius: 12px;
  text-align: center;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: opacity 0.2s;
}

.btn-primary { background: #f39c12; color: #111; }
.btn-secondary { background: #8e44ad; color: #fff; }
.btn-nav { background: #27ae60; color: #fff; }
.btn-share { background: #2980b9; color: #fff; }
.btn-outline { border: 1px solid rgba(255,255,255,0.25); color: #fff; }

.panel-footer {
  font-size: 0.72rem;
  color: #777;
  text-align: right;
}

.user-gps-marker { background: transparent; }

.user-gps-dot {
  width: 16px;
  height: 16px;
  background-color: #3498db;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(52, 152, 219, 0.9);
  animation: pulse-gps 2s infinite;
}

@keyframes pulse-gps {
  0% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.7); }
  70% { box-shadow: 0 0 0 12px rgba(52, 152, 219, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0); }
}

@media (min-width: 768px) {
  .place-panel {
    top: 20px;
    right: 20px;
    left: auto;
    bottom: auto;
    width: 380px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transform: translateX(120%);
    max-height: calc(100vh - 40px);
  }

  .place-panel.active {
    transform: translateX(0);
  }
}
