/* ============================================
   CARTE INTERACTIVE - Sidebar personnalisée
   ============================================ */
/* Cache le bouton d'ajout (y compris pour les admins) */
.open-add-location-overlay {
  display: none !important;
}
/* Layout principal */
.open-user-map .box-wrap .map-wrap {
  display: flex;
  flex-direction: row;
  height: calc(100vh - 100px);
  width: 100%;
  aspect-ratio: unset;
  position: relative;
}
/* Cache l'ancien wrapper filtres */
.oum-map-filter-wrapper {
  display: none !important;
}
/* Cache le bouton search resté dans le conteneur Leaflet (déplacé dans la sidebar) */
.leaflet-map .leaflet-control-search {
  display: none !important;
}
/* Contrôles Leaflet : taille carrée harmonisée */
.leaflet-control-container .leaflet-bar a,
.leaflet-control-container .leaflet-bar-part {
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
/* La carte prend tout l'espace restant */
.open-user-map .box-wrap .map-wrap .leaflet-map {
  position: relative !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: 100% !important;
  flex: 1;
}
/* ============================================
   SIDEBAR
   ============================================ */
#custom-sidebar {
  width: 300px;
  flex-shrink: 0;
  overflow: hidden;
  transition: width 0.3s ease, opacity 0.15s ease;
}
#custom-sidebar:not(.open) {
  width: 0;
  opacity: 0;
}
#custom-sidebar.open {
  opacity: 1;
}
#custom-sidebar-inner {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 30px;
  background: white;
  border-right: 1px solid #e0e0e0;
  overflow-y: auto;
  box-sizing: border-box;
  height: 100%;
}
#custom-sidebar .oum-filter-controls {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}
/* ============================================
   RECHERCHE
   ============================================ */
#custom-sidebar #oum_search_marker {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  z-index: auto !important;
  width: 100%;
  transform: none !important;
}
#custom-sidebar #oum_search_marker .leaflet-control-search {
  width: 100% !important;
  height: 40px;
  display: flex;
  align-items: center;
}
#custom-sidebar #oum_search_marker .leaflet-control-search .search-input {
  width: 100%;
  padding: 7px;
  margin: 0;
}
#custom-sidebar #oum_search_marker .leaflet-control-search .search-button {
  background: url("../../uploads/2026/04/ico_search_marker.svg") center / 20px no-repeat #fff;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
/* ============================================
   CATÉGORIES
   ============================================ */
#custom-sidebar .sidebar-cat-title {
  font-weight: bold;
  font-size: 14px;
  margin: 0;
}
#custom-sidebar .oum-filter-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  column-count: unset !important;
  width: 100% !important;
  overflow: visible !important;
}
#custom-sidebar .oum-filter-list .close-filter-list {
  display: none !important;
}
#custom-sidebar .oum-filter-list label {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  cursor: pointer;
  min-height: 30px;
}
#custom-sidebar .oum-filter-list label input[type=checkbox] {
  accent-color: #243f2e !important;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  align-self: center;
  margin: 0;
  top: 0;
}
.open-user-map .box-wrap .map-wrap .oum-filter-controls .oum-filter-list .oum-toggle-all-wrapper {
  border-bottom: 0;
}
.open-user-map .box-wrap .map-wrap .oum-filter-controls .oum-filter-list .oum-toggle-all-wrapper label {
  border-bottom: 0;
  margin-bottom: 0;
  padding: 10px;
  background-color: #eef0f2;
}
#custom-sidebar .oum-filter-list label span {
  font-size: 14px;
  margin: 0;
}
#custom-sidebar .oum-filter-list label {
  min-height: 40px;
  border-bottom: 1px solid #e8e8e8;
}
/* ============================================
   MOBILE
   ============================================ */
@media (max-width: 768px) {
  #custom-sidebar {
    display: none;
    position: absolute;
    z-index: 1000;
    top: 0;
    left: 0;
    height: 100%;
    width: 280px;
  }
  #custom-sidebar.open {
    display: flex;
  }
  #custom-sidebar-inner {
    width: 280px;
    padding: 20px;
    padding-bottom: 60px;
  }
  .oum-filter-toggle-btn {
    display: flex !important;
    position: absolute;
    z-index: 1001;
    top: 20px;
    left: auto;
    right: 10px;
    width: 40px;
    height: 40px;
    background: #243E2E;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 18px;
    border-radius: 4px;
    align-items: center;
    justify-content: center;
  }
  /* Contrôles carte à droite et en dessous du toggle sur mobile */
  .leaflet-map .leaflet-top.leaflet-left {
    top: 60px !important;
    left: auto !important;
    right: 10px !important;
    z-index: 999;
  }
  /* Quand la sidebar est ouverte, les contrôles passent derrière */
  /*.map-wrap.sidebar-open .leaflet-map .leaflet-control-container {
        z-index: 500 !important;
    }*/
  .open-user-map .box-wrap .map-wrap .leaflet-map {
    left: 0 !important;
    width: 100% !important;
  }
}
@media (min-width: 769px) {
  .oum-filter-toggle-btn {
    display: flex !important;
    position: absolute;
    z-index: 1001;
    top: 10px;
    left: 10px;
    width: 40px;
    height: 40px;
    background: var(--vert-profond, #243E2E);
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    align-items: center;
    justify-content: center;
    transition: left 0.3s ease;
  }
  .map-wrap.sidebar-open .oum-filter-toggle-btn {
    left: 310px;
  }
  /* Contrôles carte en dessous du bouton toggle */
  .leaflet-map .leaflet-top.leaflet-left {
    top: 60px !important;
  }
}
/* Hauteur plein viewport moins le header */
@media (max-width: 768px) {
  .open-user-map .box-wrap .map-wrap {
    position: relative;
    height: calc(100vh - 100px) !important;
  }
}
.open-user-map .box-wrap .map-wrap #oum_search_marker .leaflet-control-search.search-exp {
  max-width: 70vw;
}
