/* Console cartographique dockable (page Cartographie, dash_app/pages/
   geo_dashboard.py) — panneaux ancrés par défaut, détachables en flottant
   par glisser-déposer sur leur en-tête, repliables en 2 temps (masqués via
   le rail d'icônes / réduits à leur barre de titre). Chargé sur TOUTES les
   pages (dossier assets/, comme polish.css) mais sans effet ailleurs : tous
   les sélecteurs sont préfixés `geo-dock-`, propres à cette page. */

.geo-dock-rail {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 10px;
  padding: 5px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
  width: fit-content;
}

.geo-dock-rail-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #364331;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.geo-dock-rail-btn:hover {
  background: rgba(21, 128, 61, 0.12);
}

.geo-dock-rail-btn--active {
  background: var(--mantine-color-cibelGreen-6, #197627);
  color: #fff;
}

.geo-dock-rail-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  border-radius: 999px;
  background: #878a13;
  color: #fff;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
  border: 1.5px solid #fff;
}

.geo-dock-panels {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.geo-dock-panel {
  display: none;
  flex-direction: column;
  width: 290px;
  max-width: calc(100% - 8px);
  background: #fff;
  border-radius: 11px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.18);
}

.geo-dock-panel--open {
  display: flex;
}

.geo-dock-panel--floating {
  position: absolute;
  z-index: 40;
}

.geo-dock-panel-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 6px 9px 11px;
  background: #f3f6ee;
  border-bottom: 1px solid #dde6d8;
  cursor: grab;
  user-select: none;
}

.geo-dock-panel--floating .geo-dock-panel-head {
  cursor: grabbing;
}

.geo-dock-panel-head-title {
  flex: 1;
  font-weight: 700;
  font-size: 13px;
  color: #172017;
}

.geo-dock-panel-btn {
  border: none;
  background: none;
  color: #6b756d;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}

.geo-dock-panel-btn:hover {
  background: #dde6d8;
  color: #172017;
}

.geo-dock-panel-body {
  padding: 12px;
  max-height: min(48vh, 420px);
  overflow-y: auto;
}

.geo-dock-panel--collapsed .geo-dock-panel-body {
  display: none;
}

/* Hiérarchie territoriale Pays -> Paysage (voir Territoire & couches) :
   indentation + liseré visuel pour lire le rattachement au premier coup
   d'oeil, plutôt que 2 champs de formulaire sans lien apparent. */
.geo-dock-hierarchy-child {
  margin-left: 14px;
  padding-left: 10px;
  border-left: 2px solid #dde6d8;
}

/* --- Carte : infobulle de survol, barre d'outils, mesure (assets/geo_map.js) --- */
.geo-map-tooltip {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
    padding: 7px 10px;
    font-size: 12px;
    line-height: 1.35;
    max-width: 240px;
    pointer-events: none;
    white-space: normal;
}
.geo-map-tooltip-sub { color: #64748b; font-size: 11px; }
.geo-map-tooltip-metric { color: #0f172a; font-weight: 600; margin-top: 2px; }

.geo-map-toolbar {
    /* En bas à droite : le haut de la carte est occupé par les rails de panneaux. */
    top: auto;
    bottom: 6.5em;
    right: 0.5em;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.geo-map-toolbar button { font-size: 15px; }
.geo-map-toolbar button.geo-map-toolbar--active { background: #15803d; color: #fff; }
.geo-map-toolbar button.geo-map-toolbar--done { background: #16a34a; color: #fff; }

.geo-map-measure {
    background: #0f172a;
    color: #fff;
    border-radius: 6px;
    padding: 3px 7px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.geo-map-error { padding: 16px; font-size: 13px; color: #b45309; }

#geo-cart-ol-map .ol-scale-bar { left: 12px; bottom: 12px; }
#geo-cart-ol-map .ol-overviewmap { left: auto; right: 0.5em; bottom: 2.6em; }
