* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html {
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: #0f111a;
  font-family: system-ui, -apple-system, sans-serif;
}

/* Carte et conteneur Leaflet en fond noir */
#map, .leaflet-container {
  height: 100vh;
  width: 100vw;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  background: #0f111a !important;
}

/* Viseur central fixe */
.crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 26px;
  pointer-events: none;
  z-index: 2000;
}
.crosshair::before, .crosshair::after {
  content: '';
  position: absolute;
  background: #ff2d55;
  border-radius: 2px;
}
.crosshair::before {
  top: 12px;
  left: 0;
  width: 26px;
  height: 2px;
}
.crosshair::after {
  top: 0;
  left: 12px;
  width: 2px;
  height: 26px;
}

/* Bouton principal en bas */
.action-bar {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
}
.btn-pin {
  background: linear-gradient(135deg, #d946ef 0%, #06b6d4 100%);
  color: #ffffff;
  border: none;
  padding: 14px 24px;
  border-radius: 30px;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.35);
  transition: transform 0.1s ease, box-shadow 0.2s ease;
  pointer-events: auto;
}
.btn-pin:hover {
  box-shadow: 0 4px 25px rgba(217, 70, 239, 0.55);
}
.btn-pin:active {
  transform: scale(0.96);
}

/* Marqueurs ronds personnalisés */
.custom-marker {
  display: flex;
  align-items: center;
  justify-content: center;
}
.marker-pin {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2.5px solid #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #ffffff;
  font-weight: bold;
}

/* Popups Leaflet en thème sombre */
.leaflet-popup-content-wrapper {
  background: #181a20;
  color: #f1f1f1;
  border-radius: 10px;
  padding: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  border: 1px solid #2d3139;
}
.leaflet-popup-tip {
  background: #181a20;
}
.popup-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  margin-bottom: 6px;
}

/* Fenêtre Modale (Formulaire d'ajout) */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 3000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.active {
  display: flex !important;
}
.modal-box {
  background: #181a20;
  border: 1px solid rgba(217, 70, 239, 0.25);
  width: 100%;
  max-width: 420px;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8), 0 0 20px rgba(6, 182, 212, 0.15);
  color: #ffffff;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}
.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}
.btn-close {
  background: transparent;
  border: none;
  color: #888;
  font-size: 20px;
  cursor: pointer;
  transition: color 0.2s ease;
}
.btn-close:hover {
  color: #06b6d4;
}
.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #a0a5b5;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  background: #161922;
  border: 1px solid #2d3139;
  border-radius: 8px;
  padding: 10px 12px;
  color: #ffffff;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.form-group input[readonly] {
  color: #888888;
  background: #12141c;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: #06b6d4;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
  outline: none;
}
.form-row {
  display: flex;
  gap: 12px;
}
.form-row .form-group {
  flex: 1;
}
.btn-submit {
  width: 100%;
  background: linear-gradient(135deg, #d946ef 0%, #06b6d4 100%);
  color: #ffffff;
  border: none;
  padding: 13px;
  border-radius: 10px;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  margin-top: 6px;
  box-shadow: 0 4px 15px rgba(217, 70, 239, 0.35);
  transition: all 0.2s ease;
}
.btn-submit:hover {
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.5);
  transform: translateY(-1px);
}

/* Panneau de filtrage par catégorie */
.filter-panel {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 2000;
  background: #181a20;
  border: 1px solid #2d3139;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 150px;
}

.filter-title {
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #a0a5b5;
  border-bottom: 1px solid #2d3139;
  padding-bottom: 8px;
}

/* Barre de recherche dans le panneau latéral */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 10px;
  color: #a0a5b5;
  pointer-events: none;
  transition: color 0.2s ease;
}

#searchInput {
  width: 100%;
  padding: 8px 12px 8px 32px;
  background: rgba(15, 17, 26, 0.75);
  border: 1px solid #2d3139;
  border-radius: 8px;
  color: #ffffff;
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
  box-sizing: border-box;
  font-family: inherit;
}

#searchInput::placeholder {
  color: #707585;
}

#searchInput:focus {
  background: rgba(15, 17, 26, 0.95);
  border-color: #ff2d55;
  box-shadow: 0 0 10px rgba(255, 45, 85, 0.4), 0 0 15px rgba(0, 240, 255, 0.25);
}

.search-box:focus-within .search-icon {
  color: #ff2d55;
}

.filter-buttons {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-btn {
  background: #0f111a;
  border: 1px solid #2d3139;
  color: #a0a5b5;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: #ff2d55;
  color: #ffffff;
}

.filter-btn.active {
  background: linear-gradient(135deg, #d946ef 0%, #06b6d4 100%);
  color: #ffffff;
  border: none;
  box-shadow: 0 0 15px rgba(217, 70, 239, 0.45);
}

/* Bouton d'annulation du formulaire */
.btn-cancel {
  background: #161922;
  color: #a0a5b5;
  border: 1px solid #2d3139;
  padding: 13px;
  border-radius: 10px;
  font-weight: bold;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
}
.btn-cancel:hover {
  border-color: #06b6d4;
  color: #06b6d4;
  background: rgba(6, 182, 212, 0.08);
}

/* Boutons d'action de la popup */
.popup-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.btn-edit, .btn-delete {
  flex: 1;
  border: none;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
  color: #ffffff;
  text-align: center;
}

.btn-edit {
  background-color: #457B9D; /* bleu discret */
}

.btn-edit:hover {
  background-color: #355E78;
}

.btn-delete {
  background-color: #e63946; /* couleur d'alerte rouge */
}

.btn-delete:hover {
  background-color: #c92c3a;
}

.btn-edit:active, .btn-delete:active {
  transform: scale(0.95);
}

/* Bouton de retour accueil */
.back-home-btn {
  background: #0f111a;
  border: 1px solid #2d3139;
  color: #a0a5b5;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.back-home-btn svg {
  transition: transform 0.2s ease;
}

.back-home-btn:hover {
  border-color: #06b6d4;
  color: #06b6d4;
  background: rgba(6, 182, 212, 0.1);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.back-home-btn:hover svg {
  transform: translateX(-3px);
}

/* Mobile Filter Overrides */
.mobile-filter-toggle {
  display: none;
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1000;
}
.mobile-filter-toggle button {
  background: #181a20;
  color: white;
  border: 1px solid #2d3139;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: bold;
}

.filter-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 2500;
}

.filter-header-mobile {
  display: none;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.btn-close-filter {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
}

@media (max-width: 768px) {
  .filter-panel {
    position: fixed;
    top: 0;
    left: -280px;
    height: 100%;
    width: 280px;
    z-index: 2600;
    background: #181a20;
    transition: transform 0.3s ease-in-out;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.5);
  }
  .filter-panel.open {
    transform: translateX(280px);
  }
  .mobile-filter-toggle {
    display: block;
  }
  .filter-overlay.open {
    display: block;
  }
  .filter-header-mobile {
    display: flex;
  }
 
}


