/*
DÉBUT PERSONNALISATION
*/

/* ==========================================================
   VARIABLES PROJET
   ========================================================== */

:root {
  --lm-primary: rgb(71, 186, 223);
  --lm-panel-bg: rgba(255, 255, 255, 0.15);
  --lm-popup-bg: rgba(255, 255, 255, 0.92);
  --lm-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}


/* ==========================================================
   CENTRAGE DES TEXTES DE LA FENÊTRE D'ACCUEIL
   ========================================================== */

body.modal-accueil-active #lizmap-modal .modal-header,
body.modal-accueil-active #lizmap-modal .modal-body {
  text-align: center;
}

body.modal-accueil-active #lizmap-modal .modal-body p {
  float: none !important;
  text-align: center;
}

/* ==========================================================
   BARRE MENU GAUCHE
   ========================================================== */

#mapmenu {
  background: var(--lm-primary);
}

/* Cacher bouton home */
#mapmenu ul.nav.nav-list li.home {
  display: none !important;
}

/* Cacher bouton informations */
#mapmenu ul.nav.nav-list li.metadata.nav-dock {
  display: none !important;
}

/* Cacher bouton permalien */
#mapmenu ul.nav.nav-list li.permaLink.nav-minidock {
  display: none !important;
}

/* Cacher boutton popup */
#mapmenu ul.nav.nav-list li.popupcontent.nav-right-dock {
  display: none !important;
}

/* Cacher checkbox couches */
#switcher input[type=checkbox] {
  display: none !important;
}




/* ==========================================================
   DOCK LATÉRAL GAUCHE
   ========================================================== */

#dock {
  position: absolute;
  background: var(--lm-panel-bg) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: none !important;
  width: 290px !important;
  max-width: 300px !important;
}

#dock .dock-content,
#dock div.menu-content,
#dock .dock-tabs,
#dock .nav-tabs,
#dock .tab-pane,
#dock .tab-content {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  overflow: hidden;
}

/* Cacher actions de couches */
#switcher-layers-actions {
  display: none !important;
}

/* Cacher titre Couches */
#dock-tabs {
    display: none !important;
}

/*Cacher flèches de déroulement de groupes/couches*/
lizmap-treeview div.expandable.expanded {
  display: none;
}

/* Décale le bloc Fond de carte vers la droite + couleur titre noir*/
#switcher-baselayer {
    margin-left: 30px !important;
    width: calc(100% + 30px) !important;
    box-sizing: border-box;
}

#dock h3 {
  color: black !important;
}

#switcher {
    transform: translateX(-30px) !important;
}

/* Ajustement de la longueur des nom de couches dans le dock */
lizmap-treeview label {
  width: 200px !important;
}


  


/* Réduit la hauteur des lignes correspondant aux couches */
#switcher lizmap-treeview div.layer > div.node {
    height: 45px !important;
}
    


/* ==========================================================
   DOCK ATLAS / DOCK DROIT
   ========================================================== */

#right-dock {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

#right-dock .tabbable,
#right-dock .tab-content,
#right-dock .menu-content,
#right-dock-content,
#right-dock-content #atlas {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

#nav-tab-atlas > a,
#right-dock h3 {
  color: black !important;
}

/* Cacher boutons sélection communes atlas */
.liz-atlas-item,
.liz-atlas-run,
.liz-atlas-item + .liz-atlas-item {
  display: none !important;
}


/* ==========================================================
   POPUPS
   ========================================================== */

.lizmapPopupTitle {
  position: relative;
  margin-bottom: -8px !important;
}

h4.lizmapPopupTitle {
  color: black !important;
  font-weight: bold;
  font-size: 16px;
}

.feature-toolbar {
  position: relative;
  padding-bottom: 10px;
}

.ol-popup-closer {
  text-decoration: none;
  position: absolute;
  top: 2px;
  right: 8px;
  z-index: 9999 !important;
}

#liz_layer_popup_contentDiv {
  max-height: none;
  overflow: auto;
}

.ol-popup {
  position: absolute;
  background-color: var(--lm-popup-bg);
  box-shadow: var(--lm-shadow);
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.20);
  bottom: 12px;
  left: -50px;
  min-width: 280px;
}


/* ==========================================================
   ATTRIBUTION / COPYRIGHT
   ========================================================== */

#attribution-box {
  bottom: 0;
  right: 0;
  padding: 0 0.5em;
  position: absolute;
  z-index: 1000;
  border-top-left-radius: 1em;
  border-top-right-radius: 1em;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  background-color: rgba(255,255,255,0.75);
}

/* Cacher les logos uniquement dans le bloc attribution */
#attribution-box img {
  display: none !important;
}

/* Cacher le bouton information OpenLayers */
#attribution-ol {
  display: none !important;
}

/* Cacher la position souris */
lizmap-mouse-position {
  display: none !important;
}

#custom-copyright {
  margin: 0;
  line-height: 1.4;
  font-size: 11px;
}


/* ==========================================================
   MINI-DOCK
   ========================================================== */

#mini-dock {
  border-radius: 10px !important;
  overflow: hidden !important;
  background: #ffffff !important;
  box-shadow: var(--lm-shadow) !important;
}

#mini-dock h3 {
  background-color: var(--lm-primary) !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  border: none !important;
  border-radius: 10px 10px 0 0 !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
}

#mini-dock h3 .close {
  opacity: 0.9 !important;
  text-shadow: none !important;
}

#mini-dock h3 .close:hover {
  opacity: 1 !important;
}

#mini-dock #geolocation .geolocation .well,
#mini-dock #geolocation .geolocation .alert,
#mini-dock #geolocation .geolocation .form-horizontal {
  border-radius: 6px !important;
}



/* ==========================================================
   LOGO STRUCTURE
   ========================================================== */

#logo-structure {
  position: fixed !important;
  left: 60px !important;
  bottom: 25px !important;

  width: 200px !important;
  height: auto !important;

  z-index: 10000 !important;

  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;

  background-color: rgba(255, 255, 255, 0.80);
  padding: 6px;
  border-radius: 8px;
  box-shadow: var(--lm-shadow);

  pointer-events: auto;
  cursor: pointer;
}

#logo-structure a {
  display: block;
}

#logo-structure img {
  display: block !important;
  width: 100% !important;
  height: auto !important;

  visibility: visible !important;
  opacity: 1 !important;
}

/* Atténuer le logo fixe pendant l'affichage de la fenêtre d'accueil */
body.modal-accueil-active #logo-structure {
  opacity: 0.20 !important;
  filter: brightness(0.35);
  pointer-events: none;
}

/* Masquer le logo fixe pendant l'affichage de la fenêtre d'accueil */
body.modal-accueil-active #logo-structure {
  visibility: hidden !important;
  pointer-events: none;
}




/* Masquer le logo sur les écrans étroits */
@media (max-width: 600px) {
  #logo-structure {
    display: none !important;
  }
}
/*
FIN PERSONNALISATION
*/