/* Injouables — carte en plein écran (22/10/2026). */

/* Bouton « plein écran » : dans la barre +/− (même style), sinon en haut à droite de la carte. */
.m-zoom-controls .m-fullscreen-toggle { color:#f8e8c1; }
.m-zoom-controls .m-fullscreen-toggle svg { width:18px;height:18px; }
.m-map > .m-fullscreen-toggle,
.m-map .m-fullscreen-close {
  position:absolute;top:12px;right:12px;z-index:30;
  display:grid;place-items:center;
  width:52px;height:52px;margin:0;padding:0;
  border:1px solid rgba(236,213,153,.43);border-radius:12px;
  background:rgba(0,0,0,.95);color:#f8e8c1;
  box-shadow:0 6px 22px rgba(0,0,0,.34);
  cursor:pointer;-webkit-tap-highlight-color:transparent;
  transition:border-color .18s ease,color .18s ease,transform .18s ease;
}
.m-map > .m-fullscreen-toggle svg,
.m-map .m-fullscreen-close svg { display:block;width:20px;height:20px;pointer-events:none; }
.m-map > .m-fullscreen-toggle:hover,
.m-map > .m-fullscreen-toggle:focus-visible { border-color:#ecd599;color:#fff; }
.m-map > .m-fullscreen-toggle:focus-visible,
.m-map .m-fullscreen-close:focus-visible { outline:2px solid #fff;outline-offset:2px; }
.m-map .m-fullscreen-toggle[hidden],
.m-map .m-fullscreen-close[hidden] { display:none!important; }
/* La croix de fermeture : noir et or, comme les commandes de navigation de la carte. */
.m-map .m-fullscreen-close {
  width:48px;height:48px;border-radius:12px;
  background:rgba(0,0,0,.95);border:1px solid rgba(236,213,153,.7);color:#ecd599;
  box-shadow:0 8px 26px rgba(0,0,0,.45);
  -webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);
}
.m-map .m-fullscreen-close:hover,
.m-map .m-fullscreen-close:focus-visible { background:#000;border-color:#f3d999;color:#f8e8c1;transform:scale(1.05); }
@media (max-width:650px) {
  .m-map > .m-fullscreen-toggle { top:8px;right:8px;width:42px;height:42px;border-radius:10px; }
  .m-zoom-controls .m-fullscreen-toggle svg { width:16px;height:16px; }
}

/* ---------- Mode plein écran ---------- */
html.m-is-fullscreen,
html.m-is-fullscreen body {
  width:100%!important;height:100%!important;margin:0!important;
  overflow:hidden!important;background:#050505!important;
}
html.m-is-fullscreen .m-app {
  display:flex!important;flex-direction:column;
  width:100%!important;max-width:none!important;
  height:100vh;height:100dvh;margin:0!important;
  padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))!important;
  overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;
  background:#050505!important;
}
html.m-is-fullscreen .m-title,
html.m-is-fullscreen .m-hint,
html.m-is-fullscreen .m-status:empty { display:none!important; }
html.m-is-fullscreen .m-map { flex:1 1 auto;min-height:0;width:100%; }
html.m-is-fullscreen .m-map #m-svg {
  width:100%!important;height:100%!important;
  min-height:0!important;max-height:none!important;aspect-ratio:auto!important;
}
html.m-is-fullscreen .m-map .m-fullscreen-close {
  top:max(12px,env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));
}
/* La fiche du quartier laisse la croix libre en haut à droite. */
@media (min-width:651px) {
  html.m-is-fullscreen .m-map #m-info.m-info { top:70px!important;max-height:calc(100% - 82px)!important; }
}
/* Téléphone : la carte occupe l'écran, le sélecteur et la fiche restent accessibles en dessous. */
@media (max-width:650px) {
  html.m-is-fullscreen .m-map { flex:0 0 auto; }
  html.m-is-fullscreen .m-map #m-svg {
    height:calc(100vh - 92px)!important;
    height:calc(100dvh - 92px - env(safe-area-inset-top) - env(safe-area-inset-bottom))!important;
  }
}
@media (prefers-reduced-motion:reduce) {
  .m-map .m-fullscreen-toggle,
  .m-map .m-fullscreen-close { transition:none; }
}
