.miammap-map-frame {
    position: relative;
    width: 100%;
    isolation: isolate;
    margin-bottom: 1.35rem;
}

.miammap-map-source {
    position: absolute;
    top: calc(100% + 0.2rem);
    width: 100%;
    color: #40554e;
    font-size: 0.7rem;
    line-height: 1.1rem;
    text-align: center;
}

.miammap-map-source a { color: #176455; }
.miammap-map-source[hidden], .miammap-map-status[hidden] { display: none; }
.miammap-map-status {
    position: absolute;
    z-index: 801;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 80%;
    padding: 0.5rem 0.8rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.94);
    color: #174f43;
    font-size: 0.85rem;
    text-align: center;
    pointer-events: none;
}

.miammap-map-shape {
    position: relative;
    z-index: 1;
    overflow: hidden !important;
    clip-path: ellipse(50% 50% at 50% 50%);
    -webkit-clip-path: ellipse(50% 50% at 50% 50%);
    box-sizing: border-box;
    border: 2px solid #176455 !important;
    border-radius: 50% !important;
    background: #e9ede8;
}

/* Vue nationale : regions seules sur un fond simple. */
.miammap-france-overview-map {
    background-color: #ffffff !important;
}

/* Protection supplementaire : aucune couche detaillee ne peut transparaitre
   dans la vue nationale, meme pendant un chargement tardif. */
.miammap-france-overview-map .leaflet-gl-layer,
.miammap-france-overview-map .leaflet-tile-pane,
.miammap-france-overview-map .leaflet-gl-layer canvas,
.miammap-france-overview-map .maplibregl-map,
.miammap-france-overview-map .maplibregl-canvas-container,
.miammap-france-overview-map .leaflet-miammapLocalBasemapFallbackPane-pane {
    display: none !important;
}


/* Le fond vectoriel reste un fond : les gestes sont geres une seule fois par
   Leaflet, qui deplace alors le fond et les calques ensemble. */
.miammap-local-basemap .leaflet-gl-layer,
.miammap-local-basemap .leaflet-gl-layer canvas {
    pointer-events: none !important;
}
.miammap-map-stage-host {
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    border: 0 !important;
    border-radius: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    box-shadow: none !important;
}

.miammap-map-stage-host > .miammap-map-frame {
    height: auto;
    aspect-ratio: 16 / 10;
}

/* La vue France est carree et legerement arrondie. Apres un clic, le meme
   cadre devient un cercle qui se recadre sur la region choisie. */
.miammap-map-stage-host.miammap-home-map-stage {
    width: min(100%, 41.25rem) !important;
    height: auto !important;
    min-height: 0 !important;
    margin-right: auto !important;
    margin-left: auto !important;
    aspect-ratio: 1 / 1 !important;
    transition: width 220ms ease, height 220ms ease, aspect-ratio 220ms ease, margin 220ms ease;
}

.miammap-map-stage-host.miammap-home-map-stage > .miammap-map-frame.miammap-home-map-frame {
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 1 / 1 !important;
    transition: width 220ms ease, height 220ms ease, aspect-ratio 220ms ease, margin 220ms ease;
}

.miammap-home-map-frame .miammap-map-shape {
    cursor: default;
    clip-path: inset(0 round 5%);
    -webkit-clip-path: inset(0 round 5%);
    border-radius: 5% !important;
    transition: clip-path 220ms ease, -webkit-clip-path 220ms ease, border-radius 220ms ease;
}

.miammap-map-frame .pf-home-map-loading {
    border-radius: 5% !important;
}

.miammap-map-frame.miammap-home-map-frame .miammap-map-zoom-bubbles a:first-child {
    top: 1rem;
    left: 1rem;
    transform: none;
}

.miammap-map-frame.miammap-home-map-frame .miammap-map-zoom-bubbles a:last-child {
    top: 4rem;
    left: 1rem;
    transform: none;
}

.miammap-home-map-frame .miammap-map-zoom-bubbles a,
.miammap-home-map-frame .miammap-map-credit {
    transition: top 220ms ease, right 220ms ease, bottom 220ms ease, left 220ms ease, transform 220ms ease;
}

.miammap-home-map-frame .miammap-map-credit {
    bottom: 1rem;
    left: 1rem;
    transform: none;
}

.miammap-home-map-stage-detail .miammap-home-map-frame .miammap-map-shape {
    clip-path: inset(0 round 50%);
    -webkit-clip-path: inset(0 round 50%);
    border-radius: 50% !important;
}

.miammap-home-map-stage-detail .miammap-map-frame .pf-home-map-loading {
    border-radius: 50% !important;
}

.miammap-home-map-stage-detail .miammap-home-map-frame .miammap-map-zoom-bubbles a:first-child {
    top: 14.65%;
    left: 14.65%;
    transform: translate(-50%, -50%);
}

.miammap-home-map-stage-detail .miammap-home-map-frame .miammap-map-zoom-bubbles a:last-child {
    top: 28%;
    left: 5%;
    transform: translate(-50%, -50%);
}

.miammap-home-map-stage-detail .miammap-home-map-frame .miammap-map-credit {
    bottom: 14.65%;
    left: 14.65%;
    transform: translate(-50%, 50%);
}

.miammap-map-has-frame {
    overflow: visible !important;
}

.pf-city-pizzerias-map-wrap.miammap-map-wrap-host,
.pf-nearby-map-wrap.miammap-map-wrap-host {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    overflow: visible !important;
}

.miammap-map-frame .miammap-map-zoom-bubbles {
    position: static;
    z-index: 1005;
    margin: 0;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.miammap-map-frame .miammap-map-zoom-bubbles a {
    position: absolute;
            z-index: 1005;
    display: grid;
    width: 2.55rem;
    height: 2.55rem;
    margin: 0 !important;
    place-items: center;
    border: 1px solid #176455 !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    color: #176455 !important;
    font-family: inherit;
    font-size: 1.32rem;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 3px 10px rgba(23, 100, 85, 0.2) !important;
}

.miammap-map-frame .miammap-map-zoom-bubbles a:first-child {
    top: 14.65%;
    left: 14.65%;
    transform: translate(-50%, -50%);
}

.miammap-map-frame .miammap-map-zoom-bubbles a:last-child {
    top: 28%;
    left: 5%;
    transform: translate(-50%, -50%);
}

.miammap-map-frame .miammap-map-zoom-bubbles a:hover,
.miammap-map-frame .miammap-map-zoom-bubbles a:focus-visible {
    background: #176455 !important;
    color: #ffffff !important;
    outline: 3px solid rgba(23, 100, 85, 0.24);
    outline-offset: 2px;
}

.miammap-map-credit {
    position: absolute;
    z-index: 1005;
    right: auto;
    bottom: 14.65%;
    left: 14.65%;
    transform: translate(-50%, 50%);
}

.miammap-map-credit-button {
    display: grid;
    width: 2.45rem;
    height: 2.45rem;
    padding: 0;
    place-items: center;
    border: 1px solid #176455;
    border-radius: 50% !important;
    background: #ffffff;
    color: #176455;
    font-family: Georgia, serif;
    font-size: 1.2rem;
    font-style: italic;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 3px 10px rgba(23, 100, 85, 0.2);
}

.miammap-map-credit-button:hover,
.miammap-map-credit-button:focus-visible {
    background: #176455;
    color: #ffffff;
    outline: 3px solid rgba(23, 100, 85, 0.24);
    outline-offset: 2px;
}

.miammap-map-credit-details {
    position: absolute;
    right: auto;
    bottom: calc(100% + 0.55rem);
    left: 0;
    width: max-content;
    max-width: min(18rem, calc(100vw - 2rem));
    padding: 0.45rem 0.6rem;
    border: 1px solid #176455;
    border-radius: 0.65rem;
    background: #ffffff;
    color: #234;
    font-size: 0.72rem;
    line-height: 1.35;
    box-shadow: 0 6px 18px rgba(23, 100, 85, 0.18);
}

.miammap-map-credit-details[hidden] {
    display: none;
}

.miammap-map-credit-details a {
    color: #176455;
}

@media (prefers-reduced-motion: reduce) {
    .miammap-map-stage-host.miammap-home-map-stage,
    .miammap-map-stage-host.miammap-home-map-stage > .miammap-map-frame.miammap-home-map-frame,
    .miammap-home-map-frame .miammap-map-shape,
    .miammap-home-map-frame .miammap-map-zoom-bubbles a,
    .miammap-home-map-frame .miammap-map-credit {
        transition: none !important;
    }
}

@media (max-width: 576px) {
    .miammap-map-stage-host > .miammap-map-frame {
        height: min(68svh, 660px);
        min-height: 520px;
        aspect-ratio: auto;
    }

    .miammap-map-stage-host.miammap-home-map-stage,
    .miammap-map-stage-host.miammap-home-map-stage > .miammap-map-frame.miammap-home-map-frame {
        width: min(100%, 41.25rem) !important;
        height: auto !important;
        min-height: 0 !important;
        aspect-ratio: 1 / 1 !important;
    }
    .miammap-map-frame .miammap-map-zoom-bubbles a {
        width: 2.75rem;
        height: 2.75rem;
    }

    .miammap-map-credit-button {
        width: 2.75rem;
        height: 2.75rem;
    }
}
