/* Commandes de la carte : tactile, clavier et modes clair/sombre. */
#myMap .map-control-button {
    box-sizing: border-box;
    width: 56px;
    height: 56px;
    margin: 6px 10px 0;
    padding: 0;
    border: 1px solid #d8e0e9;
    border-radius: 12px;
    background-color: #fff;
    background-size: 26px 26px;
    box-shadow: 0 3px 12px rgba(15, 23, 42, .16);
    touch-action: manipulation;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

@media (hover: hover) {
    #myMap .map-control-button:hover {
        background-color: #edf4fb;
        border-color: #a7bdd5;
    }
}

#myMap .map-control-button[aria-pressed="true"] {
    background-color: #e4f1ff;
    border-color: #2879c5;
    box-shadow: inset 3px 0 0 #2879c5, 0 3px 12px rgba(15, 23, 42, .16);
}

#myMap .map-control-button:active {
    background-color: #d5e7f9;
}

#myMap .map-control-button:focus-visible {
    outline: 3px solid #4094e6;
    outline-offset: 2px;
}

body.dark-mode #myMap .map-control-button {
    background-color: #20262e;
    border-color: #495666;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .4);
}

@media (hover: hover) {
    body.dark-mode #myMap .map-control-button:hover {
        background-color: #303e4e;
        border-color: #819bb6;
    }
}

body.dark-mode #myMap .map-control-button[aria-pressed="true"] {
    background-color: #244566;
    border-color: #79b9f4;
    box-shadow: inset 3px 0 0 #79b9f4, 0 3px 12px rgba(0, 0, 0, .4);
}

body.dark-mode #myMap .map-control-button:active {
    background-color: #365879;
}

@media (max-width: 480px), (max-height: 600px) {
    #myMap .map-control-button {
        width: 52px;
        height: 52px;
        margin: 4px 8px 0;
        border-radius: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #myMap .map-control-button { transition: none; }
}

html.map-fullscreen-active,
html.map-fullscreen-active body { overflow: hidden !important; }

.fullscreen-map {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    z-index: 2147483000 !important;
}

/* Un iframe doit rester en place pour ne pas recharger la carte. */
.map-fullscreen-host {
    z-index: auto !important;
    isolation: auto !important;
    transform: none !important;
    filter: none !important;
    perspective: none !important;
    contain: none !important;
    will-change: auto !important;
    overflow: visible !important;
}
