html, body, #map {
  height: 100%;
  margin: 0;
  padding: 0;
}

/* --- BOUTONS ZOOM VERTICAUX --- */
.bottom-controls {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1001;
}

.zoom-buttons-vertical {
  display: flex;
  flex-direction: column;
  border-radius: 999px;
  overflow: hidden;
  background-color: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.zoom-buttons-vertical button {
  width: 44px;
  height: 44px;
  border: none;
  background-color: white;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.zoom-buttons-vertical button:hover {
  background-color: #f0f0f0;
}

.leaflet-control-zoom {
  display: none !important;
}

/* --- BOUTON MAP TOGGLE --- */
.map-toggle {
  width: 44px;
  height: 44px;
  border: none;
  background-color: white;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  user-select: none;
  transition: background-color 0.3s ease;
}

.map-toggle:hover {
  background-color: #f0f0f0;
}

.map-style-menu {
  position: absolute;
  bottom: 120px;
  right: 10px;
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1002;
}

.map-style-menu button {
  background-color: white;
  border: 1px solid #ccc;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}

.map-style-menu button:hover {
  background-color: #f0f0f0;
}


/* --- MENU DES COUCHES LEAFLET --- */
.leaflet-control-layers {
  position: absolute !important;
  bottom: 70px !important;
  right: 10px !important;
  background-color: white;
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  width: 180px;
  display: none;
  z-index: 1002;
}

.leaflet-control-layers.leaflet-control-layers-expanded {
  display: block;
}

.leaflet-control-layers label {
  display: flex;
  align-items: center;
  padding: 6px 0;
  font-size: 14px;
  color: #333;
}

.leaflet-control-layers input[type="radio"] {
  margin-right: 8px;
  accent-color: #007bff;
}

.leaflet-control-layers-separator {
  border-top: 1px solid #ccc;
  margin: 8px 0;
}

/* --- TOP BAR (logo + titre + recherche) EN HAUT À GAUCHE --- */
.top-bar-left {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 390px; /* même largeur que la sidebar */
  background-color: white;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  padding: 0 16px;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1002;
}

.top-bar-logo {
  height: 28px;
  width: 28px;
  object-fit: contain;
}

.top-bar-title {
  font-weight: 600;
  font-size: 16px;
  color: #333;
  white-space: nowrap;
  user-select: none;
}

.top-bar-search {
  border: 1px solid #ccc;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
  flex: 1;
  min-width: 120px;
  max-width: 180px; /* limite pour garder place au logo et titre */
}

/* --- MENU FILTRES JUSTE EN DESSOUS --- */
.filter-buttons-left {
  position: absolute;
  top: 60px; /* juste sous .top-bar-left (44px + 10px margin) */
  left: 10px;
  width: 395px; 
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 12px;
  z-index: 1002;
}

.filter-btn {
  flex: 1;
  padding: 6px 10px;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
  text-align: center;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.filter-btn.active {
  background-color: #007bff;
  color: white;
  border-color: #007bff;
}

.filter-btn:hover:not(.active) {
  background-color: #e6f0ff;
}

.merchant-list {
  overflow-y: auto;
  flex-grow: 1;
  max-height: 400px; /* ou calc(100% - hauteur des boutons) */
  padding-right: 4px;
}

.merchant-cell {
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background 0.2s;
}

.merchant-cell:hover {
  background-color: #f9f9f9;
}

/* --- SIDEBAR GAUCHE (liste) --- */
.sidebar {
  position: absolute;
  top: 100px; /* sous les deux menus (44 + 10 + 44 + 10) */
  left: 10px;
  width: 280px;
  max-height: calc(100% - 110px);
  background-color: white;
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  overflow: hidden;
  z-index: 900;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 10px;
  background-color: #f9f9f9;
  border-bottom: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-search {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #ccc;
  width: 100%;
  font-size: 14px;
}

.sidebar-list {
  overflow-y: auto;
  padding: 10px;
  flex-grow: 1;
}

.sidebar-item {
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background 0.2s;
}

.sidebar-item:hover {
  background-color: #f2f2f2;
}

/* --- MENU UTILISATEUR EN HAUT À DROITE --- */
.top-menu {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1003;
}

.menu-toggle {
  background-color: white;
  border: none;
  border-radius: 999px;
  width: 44px;
  height: 44px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-menu {
  margin-top: 8px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  padding: 8px 0;
  display: flex;
  flex-direction: column;
  position: absolute;
  right: 0;
  min-width: 140px;
}

.user-menu a {
  padding: 8px 12px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
}

.user-menu a:hover {
  background-color: #f0f0f0;
}

.hidden {
  display: none;
}

@media (max-width: 480px) {
  .sidebar,
  .top-bar-left,
  .filter-buttons-left {
    width: calc(100% - 20px);
    left: 10px;
    right: 10px;
  }

  .sidebar {
    top: calc(10px + 44px + 10px + 44px + 10px); /* ajuster selon empilement */
    max-height: calc(100% - 118px);
  }

  .top-bar-left {
    height: auto;
    padding: 10px;
    border-radius: 12px;
    flex-wrap: wrap;
  }

  .top-bar-search {
    width: 100%;
    max-width: none;
    margin-top: 8px;
  }

  .filter-buttons-left {
    position: static;
    margin-top: 10px;
    padding: 6px 0;
    border-radius: 12px;
    box-shadow: none;
    justify-content: space-between;
  }

  .filter-btn {
    flex: none;
    min-width: 30%;
    padding: 12px 16px;        
    font-size: 16px;           
    border-radius: 999px;
  }

  .merchant-cell {
    font-size: 15px;
    padding: 12px 14px;
  }
}

