/* ==========================================================
   BANANAGO — CARTE 2026
   Mobile first · Jour / nuit · Filtres = punaises
========================================================== */

:root {
  --navy: #07364f;
  --navy-deep: #031e34;
  --text: #12384d;
  --muted: #66818d;
  --white: #ffffff;
  --cream: #fff9e9;
  --yellow: #ffc62f;
  --turquoise: #25c1b5;
  --turquoise-dark: #058d88;
  --green: #63b934;
  --orange: #ff9d2f;
  --pink: #f4577b;
  --blue: #2f91e8;
  --red: #ee4b43;
  --glass-day: rgba(255, 255, 255, 0.88);
  --glass-night: rgba(4, 25, 55, 0.82);
  --shadow: 0 18px 42px rgba(3, 33, 54, 0.18);
  --shadow-strong: 0 24px 58px rgba(2, 24, 45, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: #082d47;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 10% 15%, rgba(37, 193, 181, .35), transparent 28%),
    radial-gradient(circle at 90% 85%, rgba(72, 69, 166, .32), transparent 30%),
    #082d47;
}

button,
a {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  text-decoration: none;
}

button:focus-visible,
a:focus-visible {
  outline: 4px solid rgba(255, 198, 47, .78);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

/* ==========================================================
   COQUE DE L'APPLICATION
========================================================== */

.map-app {
  position: relative;
  isolation: isolate;
  width: min(100%, 500px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding-bottom: 104px;
  overflow: hidden;
  background: #e8fbf7;
  box-shadow: 0 0 70px rgba(0, 18, 38, .48);
}

.territory-backdrop,
.territory-backdrop__veil {
  position: fixed;
  z-index: -3;
  top: 0;
  left: 50%;
  width: min(100%, 500px);
  min-height: 100vh;
  min-height: 100dvh;
  transform: translateX(-50%);
  pointer-events: none;
}

.territory-backdrop {
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
}

.territory-backdrop__veil {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.16) 42%, rgba(238,252,247,.86) 72%, #eef9f4 100%);
}

.map-app[data-territory="guadeloupe"][data-theme="day"] .territory-backdrop {
  background-image: url("image/guadeloupe_jour.png");
}
.map-app[data-territory="guadeloupe"][data-theme="night"] .territory-backdrop {
  background-image: url("image/guadeloupe_nuit.png");
}
.map-app[data-territory="martinique"][data-theme="day"] .territory-backdrop {
  background-image: url("image/martinique_jour.png");
}
.map-app[data-territory="martinique"][data-theme="night"] .territory-backdrop {
  background-image: url("image/martinique_nuit.png");
}
.map-app[data-territory="guyane"][data-theme="day"] .territory-backdrop {
  background-image: url("image/guyane_jour.png");
}
.map-app[data-territory="guyane"][data-theme="night"] .territory-backdrop {
  background-image: url("image/guyane_nuit.png");
}
.map-app[data-territory="reunion"][data-theme="day"] .territory-backdrop {
  background-image: url("image/reunion_jour.png");
}
.map-app[data-territory="reunion"][data-theme="night"] .territory-backdrop {
  background-image: url("image/reunion_nuit.png");
}

.map-app[data-theme="night"] {
  color: #eef8ff;
  background: #071a34;
}

.map-app[data-theme="night"] .territory-backdrop__veil {
  background:
    linear-gradient(180deg, rgba(2,12,35,.10) 0%, rgba(2,12,35,.23) 38%, rgba(3,20,48,.78) 72%, #071a34 100%);
}

/* ==========================================================
   TOP BAR
========================================================== */

.map-topbar {
  position: sticky;
  z-index: 1800;
  top: 0;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: max(8px, env(safe-area-inset-top)) 14px 8px;
  background: rgba(255,255,255,.86);
  border-bottom: 1px solid rgba(255,255,255,.48);
  box-shadow: 0 7px 25px rgba(3,39,59,.10);
  backdrop-filter: blur(16px) saturate(1.2);
}

.map-app[data-theme="night"] .map-topbar {
  background: rgba(4,19,46,.82);
  border-color: rgba(255,255,255,.11);
  box-shadow: 0 7px 26px rgba(0,0,0,.25);
}

.topbar-button {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(7,54,79,.09);
  border-radius: 16px;
  color: var(--navy);
  font-size: 22px;
  font-weight: 950;
  cursor: pointer;
  background: rgba(255,255,255,.88);
  box-shadow: 0 7px 18px rgba(7,54,79,.11);
  transition: transform .16s ease, box-shadow .16s ease;
}

.topbar-button:active {
  transform: scale(.92);
}

.map-app[data-theme="night"] .topbar-button {
  color: #fff;
  border-color: rgba(255,255,255,.12);
  background: rgba(12,35,70,.88);
  box-shadow: 0 8px 20px rgba(0,0,0,.24);
}

.theme-toggle {
  border: 3px solid var(--yellow);
}

.map-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 54px;
}

.map-brand__logo {
  display: block;
  width: min(195px, 100%);
  max-height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 4px 7px rgba(4,38,57,.16));
}

/* ==========================================================
   HERO CARTE — compact mais très BananaGo
========================================================== */

.map-hero-card {
  position: relative;
  z-index: 5;
  min-height: 178px;
  margin: 12px 12px 0;
  padding: 18px 164px 19px 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.68);
  border-radius: 28px 28px 18px 18px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,.62), transparent 38%),
    rgba(255,255,255,.78);
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(13px) saturate(1.12);
}

.map-hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(115deg, rgba(255,255,255,.18) 0 46%, transparent 68%),
    radial-gradient(circle at 100% 100%, rgba(255,198,47,.25), transparent 35%);
}

.map-app[data-theme="night"] .map-hero-card {
  color: #fff;
  border-color: rgba(255,255,255,.14);
  background:
    radial-gradient(circle at 10% 0%, rgba(71,137,215,.22), transparent 40%),
    rgba(4,23,53,.78);
  box-shadow: 0 22px 48px rgba(0,0,0,.34);
}

.map-hero-card__copy {
  position: relative;
  z-index: 4;
}

.map-hero-card__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  color: #087e79;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .9px;
  text-transform: uppercase;
}

.map-app[data-theme="night"] .map-hero-card__eyebrow {
  color: #7ee7dc;
}

.map-hero-card h1 {
  max-width: 230px;
  margin: 0;
  color: var(--navy-deep);
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  font-size: clamp(27px, 7.3vw, 38px);
  line-height: .95;
  letter-spacing: -1.5px;
}

.map-app[data-theme="night"] .map-hero-card h1 {
  color: #fff;
  text-shadow: 0 4px 14px rgba(0,0,0,.25);
}

.map-territory-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 6px 9px 6px 7px;
  border-radius: 15px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 7px 16px rgba(5,49,69,.10);
}

.map-app[data-theme="night"] .map-territory-pill {
  background: rgba(255,255,255,.10);
  box-shadow: none;
}

.map-territory-pill__icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 10px;
  background: rgba(255,214,62,.78);
  font-size: 16px;
}

.map-territory-pill > div {
  display: flex;
  flex-direction: column;
}

.map-territory-pill small {
  color: var(--muted);
  font-size: 7px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .7px;
}

.map-territory-pill strong {
  margin-top: 1px;
  color: var(--navy);
  font-size: 12px;
  line-height: 1;
}

.map-app[data-theme="night"] .map-territory-pill small {
  color: #9fc1d8;
}
.map-app[data-theme="night"] .map-territory-pill strong {
  color: #fff;
}

.map-hero-card #mapStatus {
  max-width: 215px;
  margin: 10px 0 0;
  color: #527280;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.3;
}

.map-app[data-theme="night"] .map-hero-card #mapStatus {
  color: #b8d2e3;
}

.map-hero-card__mascot {
  position: absolute;
  z-index: 2;
  top: 0;
  right: -12px;
  width: 180px;
  height: 100%;
  pointer-events: none;
}

.map-hero-card__mascot::before {
  content: "";
  position: absolute;
  right: 10px;
  bottom: -25px;
  width: 145px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,210,58,.38), transparent 68%);
}

.map-mascot {
  position: absolute;
  right: -2px;
  bottom: -19px;
  width: 166px;
  height: auto;
  filter: drop-shadow(0 13px 15px rgba(3,31,48,.27));
  animation: mapMascotFloat 3.2s ease-in-out infinite;
}

.map-mascot--night {
  display: none;
  width: 174px;
  right: -5px;
  bottom: -24px;
}

.map-app[data-theme="night"] .map-mascot--day {
  display: none;
}

.map-app[data-theme="night"] .map-mascot--night {
  display: block;
}

.map-hero-card__bubble {
  position: absolute;
  z-index: 5;
  top: 11px;
  right: 76px;
  max-width: 92px;
  padding: 7px 9px;
  color: #17242b;
  text-align: center;
  font-family: "Comic Sans MS", "Trebuchet MS", cursive;
  font-size: 9px;
  font-weight: 900;
  line-height: 1.05;
  border: 2px solid #111;
  border-radius: 50%;
  background: #fff;
  transform: rotate(-3deg);
  box-shadow: 0 5px 9px rgba(0,0,0,.12);
}

.map-hero-card__bubble::after {
  content: "";
  position: absolute;
  right: 7px;
  bottom: -8px;
  width: 12px;
  height: 12px;
  border-right: 2px solid #111;
  border-bottom: 2px solid #111;
  background: #fff;
  transform: rotate(38deg) skew(-7deg,-7deg);
}

@keyframes mapMascotFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-5px) rotate(1deg); }
}

/* ==========================================================
   FILTRES = PUNAISES
========================================================== */

.filter-dock {
  position: relative;
  z-index: 12;
  margin: -3px 12px 13px;
  padding: 14px 12px 13px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 0 0 27px 27px;
  background: rgba(255,255,255,.91);
  box-shadow: 0 14px 30px rgba(4,40,58,.15);
  backdrop-filter: blur(15px) saturate(1.12);
}

.map-app[data-theme="night"] .filter-dock {
  border-color: rgba(255,255,255,.12);
  background: rgba(4,23,53,.88);
  box-shadow: 0 16px 32px rgba(0,0,0,.25);
}

.filter-dock__heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding: 0 4px 10px;
}

.filter-dock__heading strong {
  color: var(--navy);
  font-size: 15px;
}

.filter-dock__heading small {
  max-width: 150px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 750;
  line-height: 1.15;
  text-align: right;
}

.map-app[data-theme="night"] .filter-dock__heading strong {
  color: #fff;
}
.map-app[data-theme="night"] .filter-dock__heading small {
  color: #9cbdd0;
}

.subfilter-scroller {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.map-subfilters {
  display: flex;
  min-width: 0;
  gap: 8px;
  padding: 4px 3px 6px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.map-subfilters::-webkit-scrollbar {
  display: none;
}

/*
  Smartphone : le doigt pilote directement toute la largeur.
  Pas de snap forcé : la rangée glisse librement et garde son inertie native.
*/
@media (max-width: 720px) {
  .subfilter-scroller {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 4px;
  }

  .subfilter-scroll-button {
    display: grid;
    width: 34px;
    height: 48px;
    font-size: 26px;
    border-radius: 14px;
  }

  .map-subfilters {
    width: 100%;
    padding-inline: 2px;
    -webkit-overflow-scrolling: touch;
  }
}

.subfilter-scroll-button {
  position: relative;
  z-index: 4;
  display: grid;
  width: 30px;
  height: 54px;
  place-items: center;
  padding: 0 0 4px;
  color: var(--navy);
  font: 900 30px/1 system-ui, sans-serif;
  cursor: pointer;
  border: 1px solid rgba(7,54,79,.10);
  border-radius: 15px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 6px 14px rgba(7,54,79,.10);
  transition: opacity .16s ease, transform .16s ease, background .16s ease;
}

.subfilter-scroll-button:active:not(:disabled) {
  transform: scale(.92);
}

.subfilter-scroll-button:disabled {
  opacity: .18;
  cursor: default;
  box-shadow: none;
}

.map-app[data-theme="night"] .subfilter-scroll-button {
  color: #fff;
  border-color: rgba(255,255,255,.10);
  background: rgba(255,255,255,.09);
  box-shadow: 0 6px 14px rgba(0,0,0,.16);
}

.map-app[data-theme="night"] .subfilter-scroll-button:disabled {
  opacity: .16;
}

.map-filter {
  --filter-color: var(--turquoise);
  --filter-soft: #daf8f5;
  position: relative;
  display: flex;
  flex: 0 0 auto;
  min-width: 82px;
  min-height: 84px;
  padding: 8px 7px 7px;
  align-items: center;
  justify-content: flex-start;
  flex-direction: column;
  gap: 5px;
  color: var(--navy);
  cursor: pointer;
  border: 0;
  border-radius: 20px;
  background: transparent;
  transition: transform .16s ease, background .16s ease;
}

.map-filter:active {
  transform: scale(.94);
}

.map-filter::before {
  content: "";
  position: absolute;
  inset: 1px 4px 3px;
  z-index: -1;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255,255,255,.92), var(--filter-soft));
  box-shadow: 0 7px 15px rgba(7,54,79,.09);
}

.map-app[data-theme="night"] .map-filter {
  color: #eaf7ff;
}

.map-app[data-theme="night"] .map-filter::before {
  background: rgba(255,255,255,.07);
  box-shadow: 0 7px 16px rgba(0,0,0,.17);
}

.map-filter span {
  position: relative;
  display: grid;
  width: 43px;
  height: 43px;
  margin-top: 1px;
  place-items: center;
  color: #fff;
  font-size: 20px;
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 12px;
  background: var(--filter-color);
  box-shadow: 0 7px 13px rgba(7,54,79,.22);
  transform: rotate(-45deg);
}

.map-filter span::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 3px;
  width: 10px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,.65);
  transform: rotate(35deg);
}

.map-filter span > * {
  transform: rotate(45deg);
}

.map-filter span i {
  display: block;
  font-style: normal;
  line-height: 1;
  transform: rotate(45deg);
}

/* Logos illustrés BananaGo pour les sous-catégories Pratique */
.map-filter span img {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 50%;
  transform: rotate(45deg) scale(1.16);
  filter: drop-shadow(0 2px 2px rgba(0, 44, 64, .16));
}

.map-filter--pratique span {
  overflow: hidden;
  border-color: rgba(255,255,255,.96);
  background: #fff7cf;
}

.map-filter strong {
  display: block;
  max-width: 76px;
  overflow: hidden;
  text-align: center;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: normal;
}

/* Pour redresser le contenu emoji malgré la punaise tournée */
.map-filter span {
  transform: rotate(-45deg);
}
.map-filter span {
  font-style: normal;
}
.map-filter span::first-letter {
  transform: rotate(45deg);
}


.map-filter[data-icon-type="pharmacy"] span {
  color: #19a844;
  border-color: #19a844;
  background: #fff;
  box-shadow: 0 7px 13px rgba(25,168,68,.24);
}
.map-filter[data-icon-type="pharmacy"] span i {
  color: #19a844;
  font-size: 24px;
  font-weight: 1000;
}
.map-filter.active {
  transform: translateY(-2px);
}

.map-filter.active::before {
  background: var(--filter-soft);
  box-shadow:
    0 0 0 2px var(--filter-color),
    0 11px 20px rgba(7,54,79,.15);
}

.map-app[data-theme="night"] .map-filter.active::before {
  background: rgba(255,255,255,.12);
  box-shadow:
    0 0 0 2px var(--filter-color),
    0 10px 22px rgba(0,0,0,.25);
}

.map-filter--all {
  --filter-color: #16aaa7;
  --filter-soft: #d9f7f4;
}
.map-filter--nature {
  --filter-color: #67b932;
  --filter-soft: #e7f6da;
}
.map-filter--manger {
  --filter-color: #ff9b28;
  --filter-soft: #fff0d9;
}
.map-filter--aventure {
  --filter-color: #ee4e7d;
  --filter-soft: #ffe2eb;
}
.map-filter--pmr {
  --filter-color: #08b6b2;
  --filter-soft: #dbf8f6;
}
.map-filter--pratique {
  --filter-color: #2f91e8;
  --filter-soft: #dfedff;
}
.map-filter--urgence {
  --filter-color: #ee4b43;
  --filter-soft: #ffe2df;
}

/* ==========================================================
   CARTE + VRAIS CADRES PNG BANANAGO
========================================================== */

.map-stage {
  position: relative;
  z-index: 10;
  margin: 0 10px;
  padding: 0 0 14px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.map-stage::before,
.map-stage::after {
  content: none !important;
  display: none !important;
}

.map-app[data-theme="night"] .map-stage {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.map-stage__heading {
  position: relative;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 4px 8px;
  padding: 8px 10px;
}

.map-stage__title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.map-stage__title-icon { font-size: 25px; }
.map-stage__title > div { display: flex; flex-direction: column; }
.map-stage__title small {
  color: var(--turquoise-dark);
  font-size: 7px;
  font-weight: 950;
  letter-spacing: .9px;
}
.map-stage__title strong { margin-top: 1px; color: var(--navy); font-size: 15px; }
.map-app[data-theme="night"] .map-stage__title small { color: #67ddd3; }
.map-app[data-theme="night"] .map-stage__title strong { color: #fff; }

.map-stage__live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 9px;
  color: #8d3b00;
  font-size: 8px;
  font-weight: 950;
  border-radius: 999px;
  background: #ffe18b;
}
.map-stage__live i {
  width: 7px; height: 7px; border-radius: 50%;
  background: #ff5f48;
  box-shadow: 0 0 0 4px rgba(255,95,72,.16);
  animation: livePulse 1.5s ease-in-out infinite;
}
@keyframes livePulse { 50% { opacity: .45; transform: scale(.72); } }

.map-frame {
  --viewport-top: 12.45%;
  --viewport-left: 11.65%;
  --viewport-width: 76.70%;
  --viewport-height: 71.30%;
  --fab-right: 13.8%;
  --fab-top: 18.2%;
  position: relative;
  width: min(100%, 620px);
  margin: 0 auto;
  aspect-ratio: 2 / 3;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}


/* Fenêtre de carte calée sur la vraie ouverture transparente de chaque PNG.
   On déborde volontairement d'environ 1 % sous le cadre pour qu'aucun jour
   ou rectangle de fond ne puisse apparaître entre Leaflet et l'illustration. */
.map-frame[data-frame-category="all"] {
  --viewport-top: 8.1%;
  --viewport-left: 5.3%;
  --viewport-width: 89.5%;
  --viewport-height: 85.8%;
}

.map-frame[data-frame-category="nature"] {
  --viewport-top: 9.8%;
  --viewport-left: 12.0%;
  --viewport-width: 76.2%;
  --viewport-height: 78.0%;
}

.map-frame[data-frame-category="manger"] {
  --viewport-top: 11.0%;
  --viewport-left: 11.2%;
  --viewport-width: 77.5%;
  --viewport-height: 75.5%;
}

.map-frame[data-frame-category="aventure"] {
  --viewport-top: 9.3%;
  --viewport-left: 8.6%;
  --viewport-width: 83.0%;
  --viewport-height: 76.0%;
}

.map-frame[data-frame-category="pmr"] {
  --viewport-top: 12.2%;
  --viewport-left: 12.1%;
  --viewport-width: 75.5%;
  --viewport-height: 76.0%;
}

.map-frame[data-frame-category="pratique"] {
  --viewport-top: 11.0%;
  --viewport-left: 11.3%;
  --viewport-width: 77.5%;
  --viewport-height: 78.0%;
}

.map-frame[data-frame-category="urgence"] {
  --viewport-top: 11.8%;
  --viewport-left: 11.4%;
  --viewport-width: 76.4%;
  --viewport-height: 72.6%;
}

.map-frame-overlay {
  position: absolute;
  inset: 0;
  z-index: 650;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  filter: none;
  transition: filter .22s ease;
}

.map-app[data-theme="night"] .map-frame-overlay {
  filter: brightness(.68) saturate(.90) contrast(1.02);
}

.map-viewport {
  position: absolute;
  z-index: 1;
  top: var(--viewport-top);
  left: var(--viewport-left);
  width: var(--viewport-width);
  height: var(--viewport-height);
  overflow: hidden;
  border-radius: 24px;
  background: #c9e5e8;
}

.map-app[data-theme="night"] .map-viewport {
  background: #10233d;
}

#map {
  position: absolute;
  z-index: 1;
  top: -8%;
  left: -5%;
  width: 110%;
  height: 116%;
  overflow: hidden;
  border-radius: 0;
  background: #c9e5e8;
}

.map-app[data-theme="night"] #map {
  background: #10233d;
}

#map .leaflet-tile-pane { transition: filter .28s ease; }
.map-app[data-theme="night"] #map .leaflet-tile-pane {
  filter: brightness(.76) saturate(1.38) contrast(1.07);
}

.map-location-fab {
  position: absolute;
  z-index: 720;
  right: var(--fab-right, 13.8%);
  top: var(--fab-top, 18.2%);
  bottom: auto;
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  gap: 0;
  color: var(--navy);
  cursor: pointer;
  border: 3px solid white;
  border-radius: 17px;
  background: linear-gradient(145deg, #fff, #dff8f5);
  box-shadow: 0 10px 25px rgba(4,39,59,.27);
}
.map-location-fab span { font-size: 19px; line-height: 1; }
.map-location-fab small { margin-top: -4px; font-size: 7px; font-weight: 950; text-transform: uppercase; }
.map-location-fab:active { transform: scale(.92); }
.map-app[data-theme="night"] .map-location-fab {
  color: #fff;
  border-color: rgba(255,255,255,.72);
  background: #123b63;
}

/* Leaflet */
.leaflet-control-zoom {
  overflow: hidden;
  border: 0 !important;
  border-radius: 15px !important;
  box-shadow: 0 9px 23px rgba(7,54,79,.23) !important;
}

.leaflet-control-zoom a {
  display: grid !important;
  width: 41px !important;
  height: 41px !important;
  place-items: center;
  color: var(--navy) !important;
  font-size: 20px !important;
  font-weight: 950 !important;
  border: 0 !important;
  background: rgba(255,255,255,.95) !important;
}

.map-app[data-theme="night"] .leaflet-control-zoom a {
  color: #fff !important;
  background: rgba(8,32,64,.94) !important;
}

.leaflet-control-attribution {
  padding: 2px 5px !important;
  font-size: 7px !important;
  border-radius: 8px 0 0 0;
  background: rgba(255,255,255,.78) !important;
}

/* ==========================================================
   CONSEIL BANANA
========================================================== */

.banana-tip {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 11px 3px 0;
  padding: 10px 12px;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff0a1, #ffd03f);
  box-shadow: 0 7px 16px rgba(134,91,0,.12);
}

.banana-tip__icon {
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  font-size: 23px;
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  transform: rotate(-6deg);
}

.banana-tip p {
  margin: 0;
  color: #654800;
  font-size: 10px;
  line-height: 1.35;
}

.banana-tip strong {
  display: block;
  margin-bottom: 2px;
  color: #493300;
  font-size: 11px;
}

/* ==========================================================
   PUNAISES BANANAGO
========================================================== */

.banana-marker-wrapper {
  background: transparent;
  border: 0;
}

.banana-marker {
  --marker-color: var(--turquoise);
  position: relative;
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  color: white;
  font-size: 17px;
  border: 3px solid white;
  border-radius: 50% 50% 50% 12px;
  background: var(--marker-color);
  box-shadow: 0 8px 16px rgba(7,54,79,.28);
  transform: rotate(-45deg);
}

.banana-marker span {
  position: relative;
  z-index: 2;
  display: block;
  transform: rotate(45deg);
}

.banana-marker::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 3px;
  width: 9px;
  height: 5px;
  opacity: .72;
  border-radius: 50%;
  background: rgba(255,255,255,.78);
  transform: rotate(35deg);
}

.banana-marker--nature { --marker-color: var(--green); }
.banana-marker--manger { --marker-color: var(--orange); }
.banana-marker--aventure { --marker-color: var(--pink); }
.banana-marker--pmr { --marker-color: var(--turquoise); }
.banana-marker--pratique { --marker-color: var(--blue); }
.banana-marker--urgence { --marker-color: var(--red); }

/* Police municipale : volontairement distincte de Police/Gendarmerie. */
.banana-marker--municipale {
  --marker-color: #f59e0b;
  box-shadow: 0 7px 14px rgba(120, 72, 0, .28);
}

.banana-marker--pharmacy {
  --marker-color: #ffffff;
  color: #19a844;
  border-color: #19a844;
  box-shadow: 0 7px 14px rgba(25,168,68,.22);
}
.banana-marker--pharmacy::after { background: rgba(25,168,68,.16); }
.banana-marker--pharmacy span { color: #19a844; font-size: 21px; font-weight: 1000; }

.banana-marker--bananago {
  box-shadow:
    0 0 0 2px rgba(255, 214, 10, .95),
    0 8px 17px rgba(7,54,79,.24);
}

.banana-marker--bananago::before {
  content: "🍌";
  position: absolute;
  z-index: 1;
  right: -4px;
  bottom: -6px;
  display: grid;
  width: 14px;
  height: 14px;
  place-items: center;
  font-size: 10px;
  line-height: 1;
  border: 2px solid white;
  border-radius: 999px;
  background: #ffd84a;
  box-shadow: 0 4px 9px rgba(73, 51, 0, .18);
  transform: rotate(45deg);
}

.banana-marker--urgence-style {
  box-shadow: 0 8px 16px rgba(7,54,79,.28);
}

.user-marker {
  position: relative;
  width: 25px;
  height: 25px;
  border: 5px solid white;
  border-radius: 50%;
  background: #248cff;
  box-shadow: 0 0 0 5px rgba(36,140,255,.23), 0 7px 16px rgba(7,54,79,.25);
}

.user-marker::after {
  content: "";
  position: absolute;
  inset: -11px;
  border: 2px solid rgba(36,140,255,.35);
  border-radius: 50%;
  animation: userPulse 1.9s ease-out infinite;
}

@keyframes userPulse {
  from { opacity: .9; transform: scale(.55); }
  to { opacity: 0; transform: scale(1.45); }
}

/* ==========================================================
   FICHES LIEU BANANAGO — MINI + DÉTAILLÉE
   Mobile first : bottom sheets au-dessus de la carte.
========================================================== */

.place-sheet-backdrop {
  position: fixed;
  z-index: 2250;
  inset: 0;
  width: min(100%, 500px);
  margin: auto;
  opacity: 0;
  background: rgba(2, 24, 41, .42);
  backdrop-filter: blur(2px);
  transition: opacity .22s ease;
}

.place-sheet-backdrop.is-open {
  opacity: 1;
}

.place-sheet {
  position: fixed;
  z-index: 2300;
  right: 0;
  bottom: 0;
  left: 0;
  width: min(100%, 500px);
  margin: auto;
  overflow: hidden;
  color: var(--text);
  background: rgba(255,255,255,.98);
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -22px 58px rgba(2, 27, 48, .28);
  transform: translateY(105%);
  transition: transform .24s cubic-bezier(.2,.8,.2,1);
}

.place-sheet.is-open {
  transform: translateY(0);
}

.map-app[data-theme="night"] .place-sheet {
  color: #eef8ff;
  border-color: rgba(255,255,255,.12);
  background: rgba(5, 25, 52, .98);
  box-shadow: 0 -22px 58px rgba(0, 0, 0, .48);
}

.place-sheet__handle {
  position: absolute;
  z-index: 3;
  top: 8px;
  left: 50%;
  width: 48px;
  height: 5px;
  border-radius: 999px;
  background: rgba(50, 83, 98, .22);
  transform: translateX(-50%);
}

.map-app[data-theme="night"] .place-sheet__handle {
  background: rgba(255,255,255,.25);
}

.place-sheet__close {
  position: absolute;
  z-index: 8;
  top: 14px;
  right: 14px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  padding: 0 0 3px;
  color: var(--navy);
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  box-shadow: 0 6px 18px rgba(5,45,67,.15);
}

.map-app[data-theme="night"] .place-sheet__close {
  color: #fff;
  background: rgba(8,34,66,.92);
}

.place-sheet--mini {
  max-height: min(78dvh, 690px);
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

.place-mini {
  cursor: pointer;
}

.place-mini__photo {
  position: relative;
  height: clamp(155px, 28dvh, 230px);
  overflow: hidden;
  background: linear-gradient(135deg, #dff7e3, #fff0ad);
}

.place-mini__photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 55px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(2,35,48,.16));
}

.place-mini__photo img,
.place-detail__hero > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.place-sheet__fallback {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  color: var(--navy);
  background:
    radial-gradient(circle at 25% 15%, rgba(255,255,255,.8), transparent 30%),
    linear-gradient(135deg, #d8f5e8, #fff0ad);
}

.place-sheet__fallback span {
  font-size: 58px;
}

.place-sheet__fallback b {
  font-size: 12px;
  letter-spacing: .8px;
}

.place-mini__body {
  padding: 15px 17px 7px;
}

.place-mini__chips {
  display: flex;
  align-items: center;
  gap: 6px;
}

.place-mini__chips .place-mini__category {
  flex: 1 1 auto;
}

.place-access-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .35px;
  white-space: nowrap;
  border-radius: 999px;
}

.place-access-badge--free {
  color: #176d42;
  background: #dff7e8;
}

.place-access-badge--premium {
  color: #6f4800;
  background: linear-gradient(135deg, #fff3a5, #ffd453);
  box-shadow: inset 0 0 0 1px rgba(139, 91, 0, .10);
}

.map-app[data-theme="night"] .place-access-badge--free {
  color: #99f0bd;
  background: rgba(45, 174, 98, .18);
}

.map-app[data-theme="night"] .place-access-badge--premium {
  color: #ffe37d;
  background: rgba(255, 198, 47, .16);
  box-shadow: inset 0 0 0 1px rgba(255, 226, 115, .15);
}

.place-mini__chips > span {
  display: inline-flex;
  min-width: 0;
  padding: 5px 8px;
  overflow: hidden;
  color: var(--turquoise-dark);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .45px;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-transform: uppercase;
  border-radius: 999px;
  background: #ddf7f4;
}

.place-mini__chips .place-mini__distance {
  flex: 0 0 auto;
  margin-left: auto;
  color: #8b5a00;
  background: #fff0b9;
}

.map-app[data-theme="night"] .place-mini__chips > span {
  color: #7ee7dc;
  background: rgba(37,193,181,.12);
}

.map-app[data-theme="night"] .place-mini__chips .place-mini__distance {
  color: #ffe37d;
  background: rgba(255,198,47,.12);
}

.place-mini__chips .place-access-badge--free {
  color: #176d42;
  background: #dff7e8;
}

.place-mini__chips .place-access-badge--premium {
  color: #6f4800;
  background: linear-gradient(135deg, #fff3a5, #ffd453);
}

.map-app[data-theme="night"] .place-mini__chips .place-access-badge--free {
  color: #99f0bd;
  background: rgba(45,174,98,.18);
}

.map-app[data-theme="night"] .place-mini__chips .place-access-badge--premium {
  color: #ffe37d;
  background: rgba(255,198,47,.16);
}

.place-mini h2 {
  margin: 9px 0 3px;
  color: var(--navy-deep);
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  font-size: clamp(22px, 6.2vw, 29px);
  line-height: 1;
  letter-spacing: -.7px;
}

.map-app[data-theme="night"] .place-mini h2 {
  color: #fff;
}

.place-mini__commune {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.map-app[data-theme="night"] .place-mini__commune {
  color: #9eb9ca;
}

.place-mini__summary {
  display: -webkit-box;
  margin: 9px 0 0;
  overflow: hidden;
  color: #496570;
  font-size: 12px;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.map-app[data-theme="night"] .place-mini__summary,
.map-app[data-theme="night"] .place-mini__hours {
  color: #c1d6e3;
}

.place-mini__hours {
  display: flex;
  margin: 8px 0 0;
  align-items: flex-start;
  gap: 6px;
  color: #5c7682;
  font-size: 10px;
  font-weight: 750;
  line-height: 1.35;
}

.place-mini__actions {
  display: grid;
  margin-top: 13px;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: 8px;
}

.place-action {
  min-height: 48px;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 950;
  cursor: pointer;
  border: 0;
  border-radius: 15px;
  transition: transform .15s ease, box-shadow .15s ease;
}

.place-action:active {
  transform: scale(.97);
}

.place-action--details {
  color: var(--navy);
  background: #edf7f7;
}

.map-app[data-theme="night"] .place-action--details {
  color: #eaf9ff;
  background: #153856;
}

.place-action--go {
  color: #062d35;
  background: linear-gradient(135deg, #ffd74e, #ffb22d);
  box-shadow: 0 9px 22px rgba(220,145,22,.24);
}

/* Grande fiche */
.place-sheet--detail {
  top: max(12px, env(safe-area-inset-top));
  height: calc(100dvh - max(12px, env(safe-area-inset-top)));
  max-height: 900px;
  border-radius: 28px 28px 0 0;
}

.place-detail__topbar {
  position: absolute;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  height: 62px;
  padding: 9px 12px;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 8px;
  color: white;
  background: linear-gradient(180deg, rgba(2,25,43,.72), transparent);
  pointer-events: none;
}

.place-detail__topbar strong {
  text-align: center;
  font-size: 11px;
  letter-spacing: .8px;
  text-transform: uppercase;
  text-shadow: 0 2px 7px rgba(0,0,0,.45);
}

.place-detail__back,
.place-detail__close {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  padding: 0;
  color: white;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 14px;
  background: rgba(3,36,55,.64);
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.place-detail__scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.place-detail {
  min-height: 100%;
  padding-bottom: calc(90px + env(safe-area-inset-bottom));
}

.place-detail__hero {
  position: relative;
  height: clamp(250px, 40dvh, 370px);
  overflow: hidden;
  background: linear-gradient(135deg, #dff7e3, #fff0ad);
}

.place-detail__hero .place-sheet__fallback {
  min-height: 100%;
}

.place-detail__hero-overlay {
  position: absolute;
  right: 15px;
  bottom: 15px;
  left: 15px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

.place-detail__hero-overlay span {
  display: inline-flex;
  max-width: 70%;
  padding: 7px 10px;
  overflow: hidden;
  color: #fff;
  font-size: 9px;
  font-weight: 950;
  white-space: nowrap;
  text-overflow: ellipsis;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(3,36,55,.72);
  box-shadow: 0 5px 15px rgba(0,0,0,.18);
  backdrop-filter: blur(8px);
}

.place-detail__content {
  padding: 20px 17px 28px;
}

.place-detail__eyebrow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.place-detail__eyebrow-row .place-access-badge--detail {
  font-size: 9px;
}

.place-detail__eyebrow {
  margin: 0;
  color: var(--turquoise-dark);
  font-size: 8px;
  font-weight: 950;
  letter-spacing: .9px;
}

.map-app[data-theme="night"] .place-detail__eyebrow {
  color: #73e2da;
}

.place-detail h2 {
  margin: 0;
  color: var(--navy-deep);
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  font-size: clamp(29px, 8vw, 39px);
  line-height: .98;
  letter-spacing: -1.2px;
}

.map-app[data-theme="night"] .place-detail h2 {
  color: #fff;
}

.place-detail__commune {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.map-app[data-theme="night"] .place-detail__commune {
  color: #a9c4d4;
}

.place-detail__description,
.place-detail__information {
  margin-top: 23px;
}

.place-detail__description h3,
.place-detail__information h3 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 14px;
}

.map-app[data-theme="night"] .place-detail__description h3,
.map-app[data-theme="night"] .place-detail__information h3 {
  color: #fff;
}

.place-detail__description p {
  margin: 0;
  color: #496570;
  font-size: 13px;
  line-height: 1.62;
}

.map-app[data-theme="night"] .place-detail__description p {
  color: #c6d9e5;
}

.place-detail__information {
  display: grid;
  gap: 9px;
}

.place-detail__information h3 {
  margin-bottom: 1px;
}

.place-info {
  display: grid;
  min-height: 62px;
  padding: 11px 12px;
  grid-template-columns: 39px 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(8,69,91,.08);
  border-radius: 17px;
  background: #f5fbfa;
}

.map-app[data-theme="night"] .place-info {
  border-color: rgba(255,255,255,.08);
  background: rgba(255,255,255,.055);
}

.place-info__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: #e3f6f1;
  font-size: 19px;
}

.map-app[data-theme="night"] .place-info__icon {
  background: rgba(37,193,181,.12);
}

.place-info > div {
  min-width: 0;
}

.place-info small {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .6px;
  text-transform: uppercase;
}

.map-app[data-theme="night"] .place-info small {
  color: #91adbf;
}

.place-info span,
.place-info a {
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.map-app[data-theme="night"] .place-info span,
.map-app[data-theme="night"] .place-info a {
  color: #edf9ff;
}

.place-info a {
  text-decoration: underline;
  text-decoration-color: rgba(37,193,181,.55);
  text-underline-offset: 3px;
}

.place-detail__cta {
  position: absolute;
  z-index: 15;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 10px 14px max(11px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent 0, rgba(255,255,255,.96) 28%);
  pointer-events: none;
}

.map-app[data-theme="night"] .place-detail__cta {
  background: linear-gradient(180deg, transparent 0, rgba(5,25,52,.97) 28%);
}

.place-action--go-large {
  width: 100%;
  min-height: 57px;
  font-size: 15px;
  border-radius: 18px;
  box-shadow: 0 11px 25px rgba(220,145,22,.27);
  pointer-events: auto;
}

/* ==========================================================
   MESSAGE FLOTTANT
========================================================== */

.map-message {
  position: fixed;
  z-index: 2600;
  right: 16px;
  bottom: 105px;
  left: 16px;
  width: min(calc(100% - 32px), 455px);
  margin: auto;
  padding: 13px 15px;
  color: white;
  text-align: center;
  font-size: 12px;
  font-weight: 850;
  border-radius: 17px;
  background: rgba(6,53,79,.95);
  box-shadow: 0 14px 32px rgba(3,39,59,.30);
  backdrop-filter: blur(12px);
}

/* ==========================================================
   NAVIGATION BASSE
========================================================== */

.bottom-nav {
  position: fixed;
  z-index: 2100;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  width: min(100%, 500px);
  min-height: 78px;
  margin: auto;
  padding: 8px 10px max(8px, env(safe-area-inset-bottom));
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  background: rgba(255,255,255,.95);
  border-top: 1px solid rgba(7,54,79,.08);
  box-shadow: 0 -9px 28px rgba(7,54,79,.13);
  backdrop-filter: blur(15px);
}

.map-app[data-theme="night"] .bottom-nav {
  background: rgba(3,18,42,.95);
  border-color: rgba(255,255,255,.10);
  box-shadow: 0 -9px 28px rgba(0,0,0,.25);
}

.bottom-nav > a,
.bottom-nav > button {
  display: flex;
  min-width: 0;
  min-height: 54px;
  padding: 5px 2px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  color: #718995;
  cursor: pointer;
  border: 0;
  border-radius: 15px;
  background: transparent;
}

.bottom-nav > a span,
.bottom-nav > button span {
  font-size: 21px;
  line-height: 1;
}

.bottom-nav small {
  font-size: 8px;
  font-weight: 850;
}

.bottom-nav .active {
  color: var(--turquoise-dark);
  background: #ddf7f4;
}

.map-app[data-theme="night"] .bottom-nav > a,
.map-app[data-theme="night"] .bottom-nav > button {
  color: #95afc1;
}

.map-app[data-theme="night"] .bottom-nav .active {
  color: #6ee2da;
  background: rgba(37,193,181,.12);
}

.bottom-nav__banana {
  position: relative;
  transform: translateY(-10px);
}

.bottom-nav__banana img {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 8px 8px rgba(7,54,79,.18));
}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 390px) {
  .map-brand__logo {
    width: 167px;
  }

  .map-hero-card {
    min-height: 168px;
    padding-right: 143px;
    padding-left: 15px;
  }

  .map-hero-card h1 {
    font-size: 28px;
  }

  .map-hero-card__mascot {
    width: 155px;
  }

  .map-mascot {
    width: 148px;
  }

  .map-mascot--night {
    width: 154px;
  }

  .map-hero-card__bubble {
    right: 60px;
    max-width: 82px;
    font-size: 8px;
  }

  .map-filter {
    min-width: 76px;
  }
}

@media (min-width: 501px) {
  body {
    padding: 18px 0;
  }

  .map-app {
    border-radius: 34px;
  }

  .territory-backdrop,
  .territory-backdrop__veil {
    top: 18px;
    border-radius: 34px;
  }

  .map-topbar {
    border-radius: 34px 34px 0 0;
  }

  .bottom-nav {
    bottom: 18px;
    border-radius: 0 0 34px 34px;
  }

  .place-sheet,
  .place-sheet-backdrop {
    bottom: 18px;
  }

  .place-sheet--detail {
    top: 18px;
    height: calc(100dvh - 36px);
    border-radius: 34px;
  }

  .place-sheet--mini {
    border-radius: 28px 28px 34px 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}


@media (max-width: 680px) {
  .map-stage { margin: 0 4px; }

  .map-frame {
    width: 100%;
    --fab-right: 14%;
    --fab-top: 18.5%;
  }

  .map-viewport {
    border-radius: 18px;
  }

  #map {
    top: -9%;
    left: -5%;
    width: 110%;
    height: 118%;
  }

  .map-location-fab {
    width: 46px;
    height: 46px;
    bottom: auto;
  }
}

/* ==========================================================
   BANANAGO — CARTE ÉPURÉE v32
   Fond + retour + jour/nuit + filtres + grande carte.
   Les styles métier existants restent en place : fiches,
   punaises, filtres, logos Pratique, Leaflet et Supabase.
========================================================== */

.map-app {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: 0;
}

.map-status-sr {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Plus de logo ni de grand header : deux boutons flottants seulement. */
.map-topbar {
  position: relative;
  z-index: 1800;
  top: auto;
  display: flex;
  min-height: 64px;
  padding: max(9px, env(safe-area-inset-top)) 14px 4px;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.map-app[data-theme="night"] .map-topbar {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.topbar-button {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(255,255,255,.91);
  box-shadow: 0 8px 22px rgba(4,39,59,.18);
  backdrop-filter: blur(10px);
}

.map-app[data-theme="night"] .topbar-button {
  background: rgba(10,31,61,.88);
}

/* La rangée de filtres reste complète et défile horizontalement. */
.filter-dock {
  position: relative;
  z-index: 20;
  margin: 0 8px 2px;
  padding: 3px 0 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.map-app[data-theme="night"] .filter-dock {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.subfilter-scroller {
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  gap: 3px;
}

.subfilter-scroll-button {
  width: 34px;
  height: 50px;
  border-radius: 14px;
  background: rgba(255,255,255,.90);
  backdrop-filter: blur(8px);
}

.map-subfilters {
  padding: 1px 2px 4px;
  gap: 7px;
}

/* Garde les cartes de filtre suffisamment larges pour les logos Pratique. */
.map-filter {
  min-width: 82px;
}

/* Carte immédiatement sous les filtres et occupant l'essentiel de l'écran. */
.map-stage {
  position: relative;
  z-index: 10;
  margin: -2px 2px 0;
  padding: 0;
}

.map-frame {
  width: min(100%, calc((100dvh - 145px) * 0.6666667));
  max-width: 500px;
  margin: 0 auto;
  aspect-ratio: 2 / 3;
}

.map-message {
  bottom: max(18px, env(safe-area-inset-bottom));
}

@media (max-width: 390px) {
  .map-topbar {
    min-height: 60px;
    padding-inline: 10px;
  }

  .topbar-button {
    width: 44px;
    height: 44px;
  }

  .filter-dock {
    margin-inline: 5px;
  }

  .map-filter {
    min-width: 76px;
  }

  .map-frame {
    width: min(100%, calc((100dvh - 137px) * 0.6666667));
  }
}

@media (min-width: 501px) {
  .map-topbar {
    border-radius: 34px 34px 0 0;
  }
}

/* =========================================================
   CONTRIBUTION COMMUNAUTAIRE — SOUS le cadre de carte
========================================================= */
.map-contribute-row {
  position: relative;
  z-index: 20;
  display: flex;
  width: 100%;
  min-height: 42px;
  margin: 4px auto 8px;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.map-contribute-fab {
  position: relative;
  display: inline-flex;
  min-height: 36px;
  max-width: calc(100% - 32px);
  padding: 0 12px 0 8px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 2px solid rgba(255,255,255,.96);
  border-radius: 999px;
  color: #073b58;
  text-decoration: none;
  background: linear-gradient(135deg,#ffe86a 0%,#ffc436 62%,#ffad25 100%);
  box-shadow: 0 5px 13px rgba(4,39,59,.18), inset 0 1px 0 rgba(255,255,255,.78);
  font-weight: 950;
  white-space: nowrap;
  pointer-events: auto;
  transition: transform .15s ease, box-shadow .15s ease;
}

.map-contribute-fab:active {
  transform: scale(.96);
  box-shadow: 0 3px 8px rgba(4,39,59,.15);
}

.map-contribute-fab span {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg,#12bdb7,#078bd9);
  box-shadow: 0 3px 7px rgba(7,139,217,.22);
  font-size: 16px;
  font-weight: 950;
  line-height: 1;
}

.map-contribute-fab small {
  font-size: 10.5px;
  font-weight: 950;
  letter-spacing: -.1px;
}

.map-app[data-theme="night"] .map-contribute-fab {
  color: #fff;
  border-color: rgba(255,255,255,.22);
  background: linear-gradient(135deg,#0f506c,#0a3558);
}

.map-app[data-theme="night"] .map-contribute-fab span {
  color: #073b58;
  background: linear-gradient(145deg,#ffe86a,#ffbd2d);
}

@media (max-width: 390px) {
  .map-contribute-row {
    min-height: 39px;
    margin-top: 3px;
    margin-bottom: 7px;
  }

  .map-contribute-fab {
    min-height: 34px;
    padding-inline: 7px 10px;
  }

  .map-contribute-fab span {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
    font-size: 15px;
  }

  .map-contribute-fab small {
    font-size: 9.8px;
  }
}

