:root {
    --rouge-colmar: #850632;
    --bleu-fonce: #79172F;
    --gris-fond: #f8f9fa;
    --texte-sombre: #2c3e50;
    --font-ui: 'Montserrat', sans-serif;
    --font-texte: 'Montserrat', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

html,
body,
button,
input,
select,
textarea {
    font-synthesis: none;
}

button {
    font: inherit;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bleu-fonce);
}

.fira-black {
    font-family: var(--font-ui);
    font-weight: 900;
    text-transform: uppercase;
}

.montserrat {
    font-family: var(--font-texte);
    font-weight: 500;
    line-height: 1.5;
}

/* =====================================================
   EN-TÊTE
===================================================== */
.en-tete-app {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(90px + env(safe-area-inset-top, 0px));
    min-height: calc(90px + env(safe-area-inset-top, 0px));
    padding:
        calc(env(safe-area-inset-top, 0px) + 10px) 14px 12px;
    background: var(--bleu-fonce);
    z-index: 1000;
    display: grid;
    grid-template-columns:
        minmax(0, 1fr) clamp(110px, 34vw, 180px) minmax(0, 1fr);
    align-items: center;
    column-gap: 8px;
}

/* =====================================================
   PARTIE GAUCHE DU HEADER
===================================================== */
.en-tete-gauche {
    position: relative;
    z-index: 3;
    min-width: 0;
    justify-self: stretch;
    /*
     * Visible afin de ne pas couper
     * l’animation du point d’affluence.
     */
    overflow: visible;
}

#widget-affluence {
    width: 100%;
    min-width: 0;
    overflow: visible;
}

#etiquette-affluence {
    display: block;
    color: #ffffff !important;
    font-size: clamp(13px, 3.8vw, 18px);
    line-height: 1.05;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html[lang="de"] #etiquette-affluence {
    font-size: 12px;
    letter-spacing: -0.2px;
    overflow: visible;
    text-overflow: clip;
}

#conteneur-statut-affluence {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 5px;
    /*
     * Espace supplémentaire autour du point
     * pour permettre l’animation circulaire.
     */
    padding: 10px 0 10px 10px;
    margin: -10px 0 -10px -10px;
    overflow: visible;
}

#point-affluence {
    position: relative;
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    border-radius: 50%;
    background-color: var(--couleur-point, #f39c12);
    box-shadow: 0 0 0 0 var(--couleur-point);
}

#texte-affluence {
    display: block;
    min-width: 0;
    max-width: 100%;
    color: white;
    font-size: clamp(14px, 4.2vw, 18px);
    font-weight: 800;
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#texte-affluence.texte-affluence-allemand {
    font-size: clamp(13px, 3.8vw, 17px);
}

.animation-pulsation {
    animation:
        pulsation-point 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes pulsation-point {
    to {
        box-shadow: 0 0 0 10px transparent;
    }
}

/* =====================================================
   LOGO CENTRAL
===================================================== */
.logo {
    position: absolute;
    left: 50%;
    top: calc(env(safe-area-inset-top, 0px) + 45px);
    transform: translate(-50%, -50%);
    display: block;
    width: clamp(110px, 34vw, 180px);
    height: auto;
    max-width: none;
    max-height: 76px;
    object-fit: contain;
    z-index: 2;
}

/* =====================================================
   PARTIE DROITE DU HEADER
===================================================== */
.en-tete-droite {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 45px);
    right: 14px;
    left: auto;
    width: auto;
    min-width: 0;
    transform: translateY(-50%);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.bouton-langue {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 5px;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}

.icone-drapeau {
    font-size: 20px;
    line-height: 1;
}

.drapeau-svg {
    display: block;
    width: 26px !important;
    height: 26px !important;
    object-fit: contain;
    flex-shrink: 0;
}

/* =====================================================
   MENU DES LANGUES
===================================================== */
.menu-langue {
    position: absolute;
    top: calc(env(safe-area-inset-top, 40px) + 40px);
    right: 20px;
    min-width: 130px;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    z-index: 9999 !important;
}

.menu-langue.masque {
    display: none;
}

.menu-langue button {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start;
    width: 100%;
    gap: 15px;
    padding: 12px 20px;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    background: white;
    font-family: var(--font-texte);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

/* =====================================================
   BANDEAU D’ALERTE
===================================================== */
#bandeau-alerte {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: #f39c12;
    color: #ffffff;
    font-family: var(--font-texte);
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

#bandeau-alerte.masque {
    display: none !important;
}

.icone-alerte {
    font-size: 20px;
}

body.theme-nuit #bandeau-alerte {
    background-color: #d35400;
}

/* =====================================================
   CARTE
===================================================== */
#carte {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--gris-fond);
    z-index: 1;
}

.leaflet-control-zoom {
    display: none;
}

.leaflet-tile-pane {
    transition: filter 0.4s ease-in-out;
}

/* =====================================================
   EFFET DE FLOU
===================================================== */
.blur {
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    color: var(--bleu-fonce);
}

body.theme-nuit .blur {
    background: rgba(10, 32, 64, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

/* =====================================================
   SUPERPOSITIONS SUR LA CARTE
===================================================== */
.superpositions-carte {
    position: fixed;
    bottom: calc(105px + env(safe-area-inset-bottom, 0px));
    left: 0;
    width: 100%;
    padding: 0 15px;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    pointer-events: none;
    z-index: 1000;
}

.superpositions-carte>* {
    pointer-events: auto;
}

/* =====================================================
   BOUTON DE LOCALISATION
===================================================== */
.bouton-localiser {
    width: 52px;
    height: 52px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
}

#icone-localisation {
    width: 28px;
    height: 28px;
    object-fit: contain;
    transition: all 0.2s ease;
}

.marqueur-position-utilisateur {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
}

/* =====================================================
   NAVIGATION INFÉRIEURE
===================================================== */
.navigation-bas {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(95px + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: stretch;
    background: var(--bleu-fonce);
    z-index: 3000;
}

.element-nav {
    width: 25%;
    min-width: 0;
    flex: 1 1 25%;
    padding:
        7px 3px calc(7px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: transparent;
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    opacity: 0.6;
    overflow: hidden;
    cursor: pointer;
    transition:
        opacity 0.2s ease,
        background-color 0.2s ease;
}

.element-nav:last-child {
    border-right: none;
}

.element-nav.actif {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.15);
}

.emplacement-icone {
    width: 100%;
    height: 36px;
    flex: 0 0 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icone-svg-nav {
    display: block;
    width: clamp(28px, 8vw, 34px);
    height: clamp(28px, 8vw, 34px);
    object-fit: contain;
    flex-shrink: 0;
}

.element-nav.actif .icone-svg-nav {
    width: 32px;
    height: 32px;
}

.element-nav span {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 34px;
    margin-top: 5px;
    padding: 0 2px;
    font-family: var(--font-ui);
    font-size: clamp(11px, 3.1vw, 14px);
    font-weight: 600;
    line-height: 1.05;
    text-align: center;
    white-space: normal;
    overflow: hidden;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: auto;
}

/* =====================================================
   PANNEAU DE DÉTAIL
===================================================== */
.panneau-bas {
    position: fixed;
    bottom: calc(85px + env(safe-area-inset-bottom, 0px));
    left: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 25px 25px 30px;
    background: white;
    border-radius: 25px 25px 0 0;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(150%);
    transition:
        transform 0.35s cubic-bezier(0.1, 0.8, 0.3, 1);
    z-index: 2000;
}

.panneau-bas.visible {
    transform: translateY(0);
}

.bouton-fermer-fiche {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    border: 1px solid #00000014;
    color: var(--rouge-colmar);
    font-size: 22px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    box-shadow: 0 1px 6px #00000026;
}

.contenu-panneau {
    max-height: 55vh;
    margin-bottom: 10px;
    overflow-y: auto;
    color: var(--texte-sombre);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.contenu-panneau::-webkit-scrollbar {
    display: none;
}

.titre-panneau {
    margin-bottom: 15px;
    padding-right: 30px;
    color: #000;
    font-family: var(--font-ui);
    font-size: 28px;
    font-weight: 900;
    line-height: 1.1;
}

.image-panneau {
    width: 100%;
    height: 180px;
    margin-bottom: 15px;
    object-fit: cover;
    border-radius: 16px;
}

.horaires-panneau {
    margin-bottom: 15px;
    color: #000;
    font-family: var(--font-texte);
    font-size: 18px;
    font-weight: 600;
}

.description-panneau {
    margin-bottom: 20px;
    color: #555;
    font-family: var(--font-texte);
    font-size: 14px;
    line-height: 1.4;
}

.pied-panneau {
    display: flex;
    justify-content: center;
}

.bouton-itineraire {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    background: white;
    color: var(--rouge-colmar);
    border: none;
    border-radius: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    font-family: var(--font-texte);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.bouton-itineraire:active {
    transform: scale(0.95);
}

/* =====================================================
   ÉCRAN DE CHARGEMENT PWA
===================================================== */
#ecran-chargement-pwa {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--bleu-fonce);
    transition: opacity 0.5s ease-out;
    z-index: 9999;
}

.logo-chargement-haut {
    position: absolute;
    top: 18%;
    width: 240px;
    height: auto;
    animation: pulsation-chargement 2s infinite;
}

.logo-chargement-bas {
    position: absolute;
    bottom: 8%;
    width: 140px;
    height: auto;
    opacity: 0.9;
}

.chargeur {
    width: 55px;
    padding: 6px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #ffffff;
    --_m:
        conic-gradient(#0000 10%, #000),
        linear-gradient(#000 0 0) content-box;
    -webkit-mask: var(--_m);
    mask: var(--_m);
    -webkit-mask-composite: source-out;
    mask-composite: subtract;
    animation: rotation-chargeur 1s infinite linear;
}

@keyframes rotation-chargeur {
    to {
        transform: rotate(1turn);
    }
}

@keyframes pulsation-chargement {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

/* =====================================================
   OVERLAY MOBILE UNIQUEMENT
===================================================== */
#overlay-mobile {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background-color: var(--fond-app);
    text-align: center;
    box-sizing: border-box;
    z-index: 10000;
}

#overlay-mobile.masque {
    display: none !important;
}

.contenu-overlay-mobile {
    max-width: 500px;
    padding: 2.5rem;
    background-color: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.theme-nuit .contenu-overlay-mobile {
    background-color: var(--fond-carte-nuit, #222);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.icone-mobile {
    display: block;
    margin-bottom: 1rem;
    font-size: 4rem;
}

#titre-mobile-seulement {
    margin-bottom: 1rem;
    color: var(--rouge-colmar, #850632);
    font-family: var(--font-ui);
    font-size: 1.5rem;
    font-weight: 700;
}

#texte-mobile-seulement {
    color: var(--texte-sombre, #333);
    font-family: var(--font-texte);
    font-size: 1.1rem;
    line-height: 1.5;
}

.theme-nuit #texte-mobile-seulement {
    color: var(--texte-clair, #eee);
}

/* =====================================================
   ÉCRANS ANDROID ET MOBILES ÉTROITS
===================================================== */
@media screen and (max-width: 400px) {
    .en-tete-app {
        padding-left: 10px;
        padding-right: 10px;
        grid-template-columns:
            minmax(0, 1fr) clamp(110px, 34vw, 180px) minmax(0, 1fr);
        column-gap: 5px;
    }

    html[lang="de"] #etiquette-affluence {
        font-size: 11px;
        letter-spacing: -0.3px;
    }

    .logo {
        width: clamp(110px, 34vw, 180px);
        height: auto;
        max-width: none;
        max-height: 72px;
    }

    #etiquette-affluence {
        font-size: 14px;
    }

    #texte-affluence {
        font-size: 16px;
    }

    #texte-affluence.texte-affluence-allemand {
        font-size: 13px;
    }

    .bouton-langue {
        padding: 3px;
    }

    .element-nav {
        padding-left: 1px;
        padding-right: 1px;
    }

    .en-tete-droite {
        right: 10px;
    }



    .element-nav span {
        min-height: 30px;
        font-size: 11px;
        font-weight: 600;
        line-height: 1.05;
        letter-spacing: -0.1px;
    }

    .icone-svg-nav {
        width: 27px;
        height: 27px;
    }

    .element-nav.actif .icone-svg-nav {
        width: 29px;
        height: 29px;
    }
}

/* =====================================================
   TRÈS PETITS ÉCRANS
===================================================== */
@media screen and (max-width: 350px) {
    .en-tete-app {
        grid-template-columns:
            minmax(0, 1fr) clamp(110px, 34vw, 180px) minmax(0, 1fr);
    }

    html[lang="de"] #etiquette-affluence {
        font-size: 10px;
        letter-spacing: -0.3px;
    }

    .logo {
        width: clamp(110px, 34vw, 180px);
        height: auto;
        max-width: none;
        max-height: 68px;
    }

    #etiquette-affluence {
        font-size: 12px;
    }

    #texte-affluence {
        font-size: 14px;
    }

    #texte-affluence.texte-affluence-allemand {
        font-size: 13px;
    }

    .element-nav span {
        font-size: 9px;
        font-weight: 600;
    }
}
/* Lien séjour compact sous l'affluence, dans la hauteur du bandeau. */
.lien-mon-sejour {
    display: flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    max-width: 100%;
    margin-top: 6px;
    color: #fff;
    font-family: var(--font-texte);
    font-size: clamp(12px, 3.3vw, 14px);
    font-weight: 600;
    line-height: 1.3;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.lien-mon-sejour img {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    object-fit: contain;
}

.lien-mon-sejour span {
    min-width: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.bulle-circuit {
    position: absolute;
    padding: 6px 12px;
    background-color: #a22080;
    color: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 20px;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
    font-family: var(--font-texte);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

/* Le départ reste centré sur le bout de la ligne */
.bulle-depart {
    transform: translate(-50%, -50%);
}

/* L’arrivée remonte au-dessus de l’étoile */
.bulle-arrivee {
    transform: translate(-50%, calc(-100% - 25px));
}

/* Disparition progressive lors du dézoom */
.masquer-bulles .bulle-circuit {
    opacity: 0;
    visibility: hidden;
}


.navigation-bas .element-nav span { font-size: clamp(10px, 2.8vw, 14px); }
#message-carte {
    position: fixed; top: calc(105px + env(safe-area-inset-top, 0px));
    left: 50%; transform: translateX(-50%); z-index: 1100;
    max-width: calc(100% - 32px); padding: 10px 16px;
    border-radius: 12px; background: white; color: #79172F;
    font: 500 14px/1.4 var(--font-texte); text-align: center;
    box-shadow: 0 2px 12px #0002; pointer-events: none;
}
#message-carte[hidden] { display: none; }

.pilule-circuit {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    border: 2px solid transparent;
    border-radius: 30px;
    cursor: pointer;
    transition: border-color 0.25s ease;
}

.pilule-circuit span {
    font-size: 16px;
}

.pilule-circuit.actif {
    border-color: #a22080 !important;
}

body.theme-nuit .pilule-circuit.actif {
    border-color: #a22080 !important;
}

.ligne-rouge {
    width: 30px;
    height: 4px;
    background-color: var(--rouge-colmar);
    border-radius: 2px;
}


.superpositions-carte { justify-content: space-between; gap: 10px; }
.pilule-circuit {
    min-width: 0; max-width: calc(100% - 62px); color: #a22080;
    font: inherit; text-align: left;
}
.pilule-circuit span.montserrat { font-size: clamp(11px, 3.2vw, 16px); line-height: 1.2; }
.ligne-rouge { flex: 0 0 24px; background-color: #a22080; }
.bouton-localiser { flex: 0 0 52px; }
a.element-nav { text-decoration: none; }

#carte.circuit-vue-ensemble .bulle-depart {
    opacity: 0; visibility: hidden; pointer-events: none;
}

.pied-panneau { flex-direction: column; align-items: center; flex-shrink: 0; }
.contacts-musee {
    display: flex; flex-direction: column; align-items: stretch; gap: 8px;
    width: 100%; margin-top: 12px; text-align: left;
    font: 500 14px/1.4 var(--font-texte);
}
.contacts-musee[hidden] { display: none; }
.contacts-musee a { max-width: 100%; color: var(--rouge-colmar); overflow-wrap: anywhere; text-decoration: underline; }
.panneau-bas.avec-contacts {
    max-height: calc(100vh - 190px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    max-height: calc(100dvh - 190px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
}
.panneau-bas.avec-contacts .contenu-panneau { min-height: 0; flex: 1 1 auto; }

.contacts-musee a { display: flex; align-items: flex-start; gap: 8px; }
.contacts-musee a img { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 1px; object-fit: contain; }
.contacts-musee a span { min-width: 0; overflow-wrap: anywhere; }

.choix-musees {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px; margin-bottom: 14px; padding-right: 26px;
}
.choix-musees[hidden] { display: none; }
.choix-musee {
    min-width: 0; min-height: 42px; padding: 8px 6px;
    border: 1px solid #79172F; border-radius: 10px;
    background: #fff; color: #850632;
    font: 600 12px/1.25 var(--font-texte);
    overflow-wrap: anywhere; cursor: pointer;
}
.choix-musee.actif { background: #79172F; color: #fff; }
.choix-musee:focus-visible { outline: 2px solid #850632; outline-offset: 2px; }

html, body, button, input, select, textarea, .leaflet-container, .leaflet-popup-content, .leaflet-tooltip {
    font-family: var(--font-texte);
}

.icone-etape-circuit { background: none; border: 0; }
.repere-etape-circuit { position: relative; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }
.cercle-etape-circuit { width: 32px; height: 32px; border: 2px solid #fff; border-radius: 50%; background: #a22080; box-shadow: 0 1px 5px #0005; }
.numero-etape-circuit {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: #fff; font: 800 12px/1 var(--font-texte); text-align: center; white-space: nowrap;
}
.numero-etape-circuit.numero-etape-long { font-size: 8px; }

.icone-regroupement-circuit { background: none; border: 0; }
.repere-regroupement-circuit {
    width: 48px; height: 48px; box-sizing: border-box; border: 2px solid #fff; border-radius: 50%;
    background: #a22080; color: #fff; box-shadow: 0 2px 8px #0004;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    font-family: var(--font-texte); text-align: center;
}
.repere-regroupement-circuit strong { font-size: 22px; line-height: 1; font-weight: 800; text-shadow: 0 1px 3px #0005; }
.repere-regroupement-circuit span { display: none; }
.navigation-itineraire { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.bouton-navigation-fiche {
    width: 40px; height: 40px; flex: 0 0 40px; padding: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #850632; background: #fff; border: 1px solid #850632; border-radius: 50%; cursor: pointer;
}
.bouton-navigation-fiche[hidden] { display: none; }
.bouton-navigation-fiche:disabled { opacity: .3; cursor: default; }
.bouton-navigation-fiche:focus-visible { outline: 2px solid #850632; outline-offset: 2px; }
.navigation-itineraire .bouton-itineraire { min-width: 0; padding: 12px 14px; font-size: clamp(13px, 3.8vw, 18px); }
.navigation-itineraire .bouton-itineraire svg { flex: 0 0 24px; }
#etiquette-itineraire { min-width: 0; overflow-wrap: anywhere; }

.choix-musees { flex-shrink: 0; }

.nom-rue-centre { background: none; border: none; pointer-events: none; }
.nom-rue-centre-texte {
    position: absolute; left: 0; top: 0; white-space: nowrap; color: #59636d;
    font: 500 11px/1.2 var(--font-texte);
    text-shadow: -1px -1px 1px #fff, 1px -1px 1px #fff, -1px 1px 1px #fff, 1px 1px 1px #fff;
    pointer-events: none;
}
.credit-carte {
    position: absolute; right: 3px; bottom: calc(97px + env(safe-area-inset-bottom, 0px));
    z-index: 700; padding: 1px 3px; background: #ffffffd9; color: #53606a;
    font: 9px/1.2 var(--font-texte);
}
.credit-carte a { color: inherit; text-decoration: none; }
#carte.focus-fleches .leaflet-nomsRuesCentre-pane { visibility: hidden; }

.en-tete-app:has(.menu-langue:not(.masque)) { z-index: 4000; }

:root { --hauteur-entete: 64px; --hauteur-menu: 70px; --ecran: 100vh; }
@supports (height: 100dvh) { :root { --ecran: 100dvh; } }
.en-tete-app { height: calc(var(--hauteur-entete) + env(safe-area-inset-top,0px)); min-height: 0; padding: calc(env(safe-area-inset-top,0px) + 6px) 12px 6px; }
.logo, .en-tete-droite { top: calc(env(safe-area-inset-top,0px) + var(--hauteur-entete) / 2); }
.logo { max-height: 48px; }
.bouton-langue { min-height: 44px; min-width: 44px; }
.menu-langue { top: 100%; right: 0; max-height: calc(var(--ecran) - var(--hauteur-entete) - env(safe-area-inset-top,0px)); overflow-y: auto; }
.navigation-bas { height: calc(var(--hauteur-menu) + env(safe-area-inset-bottom,0px)); }
.element-nav { padding: 4px 3px calc(4px + env(safe-area-inset-bottom,0px)); }
.element-nav span { min-height: 0; margin-top: 2px; }
.emplacement-icone { height: 32px; flex-basis: 32px; }
#carte { height: var(--ecran); }
.superpositions-carte { bottom: calc(var(--hauteur-menu) + env(safe-area-inset-bottom,0px) + 16px); }
.commandes-circuit { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; max-width: calc(100% - 62px); }
.commandes-circuit .pilule-circuit { max-width: 100%; min-height: 44px; }
#vue-circuit { font-size: 12px; padding: 8px 14px; }
#vue-circuit[hidden] { display: none; }
.credit-carte { bottom: calc(var(--hauteur-menu) + env(safe-area-inset-bottom,0px) + 2px); }
#message-carte { top: calc(var(--hauteur-entete) + env(safe-area-inset-top,0px) + 10px); }
 .panneau-bas, .panneau-bas.avec-contacts {
    bottom: calc(var(--hauteur-menu) + env(safe-area-inset-bottom,0px));
    height: calc(var(--ecran) - var(--hauteur-entete) - var(--hauteur-menu) - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 8px);
    max-height: calc(var(--ecran) - var(--hauteur-entete) - var(--hauteur-menu) - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px) - 8px);
    padding: 22px 20px 10px; overflow: hidden; visibility: hidden; pointer-events: none;
}
.panneau-bas.visible { visibility: visible; pointer-events: auto; }
.panneau-bas .contenu-panneau { flex: 1 1 auto; min-height: 0; max-height: none; margin-bottom: 8px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.titre-panneau { font-size: clamp(20px, 5.5vw, 28px); padding-right: 38px; overflow-wrap: anywhere; }
.bouton-fermer-fiche { top: 8px; right: 8px; width: 44px; height: 44px; }
.pied-panneau { background: white; }
.navigation-itineraire { height: 52px; flex-shrink: 0; }
.bouton-navigation-fiche { width: 44px; height: 44px; flex-basis: 44px; }
.zone-contacts-fixe { width: 100%; height: auto; flex: 0 0 auto; max-height: 104px; padding-top: 10px; overflow-y: auto; overscroll-behavior: contain; }
.panneau-bas:not(.fiche-circuit):not(.avec-contacts) .zone-contacts-fixe { display: none; }
.panneau-bas.fiche-circuit .zone-contacts-fixe { height: 104px; flex: 0 0 104px; }
.zone-contacts-fixe .contacts-musee { margin: 0; gap: 6px; }
.choix-musees { max-height: 76px; overflow-y: auto; }
@media (max-height: 500px) { :root { --hauteur-entete: 50px; --hauteur-menu: 58px; } .logo { max-height: 38px; } .emplacement-icone { height: 25px; flex-basis: 25px; } .icone-svg-nav, .element-nav.actif .icone-svg-nav { width: 25px; height: 25px; } }
@media (prefers-reduced-motion: reduce) { .panneau-bas { transition: none; } }

.bouton-partager-fiche { position:absolute; top:8px; right:56px; width:44px; height:44px; display:flex; align-items:center; justify-content:center; border:1px solid #00000014; border-radius:50%; background:white; color:var(--rouge-colmar); z-index:10; cursor:pointer; box-shadow:0 1px 6px #00000026; }
.titre-panneau { padding-right:88px; }
.choix-musees { padding-top:38px; }
#message-partage { position:fixed; bottom:calc(var(--hauteur-menu) + env(safe-area-inset-bottom,0px) + 12px); left:50%; transform:translateX(-50%); max-width:90%; background:#fff; color:var(--rouge-colmar); padding:12px 18px; border-radius:14px; box-shadow:0 2px 15px #0003; z-index:5000; font-size:14px; }
