/* Poly-Nation — styles partagés */
:root { --fond: #0e0f13; }

html, body {
  margin: 0; height: 100%; background: var(--fond);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #e8eaee;
}

#map { height: 100vh; height: 100dvh; width: 100%; background: var(--fond); }
.leaflet-container { background: var(--fond); }

/* Bandeau titre */
.titre {
  position: absolute; z-index: 1000; top: 16px; left: 16px;
  background: rgba(20,22,28,0.88); color: #f2f3f5; padding: 10px 14px;
  border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,0.5); max-width: 240px;
  backdrop-filter: blur(4px);
}
.titre h1 { margin: 0 0 2px; font-size: 17px; letter-spacing: .3px; }
.titre p  { margin: 0 0 8px; font-size: 12px; color: #aab1bd; line-height: 1.4; }

/* Bouton de langue FR / EN */
.lang-switch { display: inline-flex; gap: 0; border-radius: 8px; overflow: hidden; border: 1px solid rgba(255,255,255,0.14); }
.lang-switch button {
  background: transparent; color: #aab1bd; border: 0; padding: 4px 10px; font: inherit;
  font-size: 12px; font-weight: 600; cursor: pointer;
}
.lang-switch button.actif { background: rgba(255,255,255,0.16); color: #fff; }

/* Bouton flottant qui ouvre/ferme le menu des fleurs (toujours accessible) */
.filtre-toggle {
  position: fixed; z-index: 1100; top: 16px; right: 16px;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(20,22,28,0.92); color: #fff; border: 1px solid rgba(255,255,255,0.16);
  font-size: 20px; line-height: 1; cursor: pointer; box-shadow: 0 2px 12px rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px);
}

/* Panneau d'isolation des fleurs (replié par défaut, ouvert via le bouton) */
.filtre {
  position: fixed; z-index: 1090; top: 72px; right: 16px;
  background: rgba(20,22,28,0.92); padding: 8px; border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.5); display: none; flex-direction: column;
  gap: 4px; max-height: 68vh; overflow: auto; backdrop-filter: blur(4px);
  min-width: 170px; max-width: 72vw;
}
.filtre.ouvert { display: flex; }
.filtre button {
  display: flex; align-items: center; gap: 8px; text-align: left;
  background: transparent; color: #d7dbe2; border: 0; padding: 9px 10px;
  border-radius: 8px; font-size: 14px; cursor: pointer; width: 100%;
}
.filtre button:hover { background: rgba(255,255,255,0.07); }
.filtre button.actif { background: rgba(255,255,255,0.14); color: #fff; font-weight: 600; }
.filtre .dot { width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto; }

/* Bulles de message (sombres) */
.leaflet-popup-content-wrapper { background: #1b1e26; color: #e8eaee; border-radius: 10px; }
.leaflet-popup-tip { background: #1b1e26; }
.leaflet-popup-content { font-size: 13px; line-height: 1.5; margin: 12px 14px; }
.leaflet-popup-content strong { font-size: 14px; }
.leaflet-popup-content .lieu { color: #b9c0cc; font-style: italic; }
.leaflet-popup-content .date { color: #8a93a3; font-size: 12px; }
.leaflet-popup-close-button { color: #9aa1ad !important; }
.leaflet-control-attribution { background: rgba(20,22,28,0.8) !important; color: #8a93a3 !important; }
.leaflet-control-attribution a { color: #aab1bd !important; }

/* ---- Mobile : titre compact ; menu ouvert en feuille de bas d'écran ---- */
@media (max-width: 760px) {
  .titre { left: 8px; right: 66px; top: 8px; max-width: none; padding: 8px 12px; }
  .titre p { display: none; }
  .titre h1 { display: inline-block; margin: 0 10px 0 0; vertical-align: middle; }
  .titre .lang-switch { vertical-align: middle; }
  .filtre {
    top: auto; bottom: 0; left: 0; right: 0; min-width: 0; max-width: none;
    border-radius: 16px 16px 0 0; max-height: 55vh; padding: 10px 10px 16px;
  }
  .filtre button { font-size: 15px; padding: 11px 12px; }
}
