/* Notes de bas de page : affichage public */

/* ---------------------------------------------------------------- appel dans le texte */

.gmob-note-appel {
    font-size: 0.62em;
    line-height: 0;
    vertical-align: super;
}

.gmob-note-appel a:link,
.gmob-note-appel a:visited,
.texte .gmob-note-appel a:link,
.texte .gmob-note-appel a:visited {
    display: inline-block;
    min-width: 1.2em;
    margin: 0 0.05em;
    padding: 0.2em 0.25em;
    border-radius: 0.3em;
    color: #1891ff;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    scroll-margin-top: 30vh;
    transition: background-color 0.15s, color 0.15s;
}

.gmob-note-appel a:hover,
.gmob-note-appel a:focus-visible,
.texte .gmob-note-appel a:hover {
    background: #1891ff;
    color: #fff;
    outline: none;
}

/* Retour depuis la liste : l'appel s'allume brièvement */
.gmob-note-appel a:target {
    animation: gmob-note-allume 2.5s ease-out;
}

/* ---------------------------------------------------------------- liste en fin d'article */

.gmob-notes {
    clear: both;
    margin-top: 2.5em;
    padding-top: 1.2em;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
    font-size: 0.8em;
}

.texte h3.gmob-notes-titre,
.gmob-notes-titre {
    margin: 0;
    padding: 0 0 0.7em;
    color: #212121;
    font-family: 'Oswald', 'Arial Narrow', Arial, sans-serif;
    font-size: 1.05em;
    font-weight: 600;
    letter-spacing: 0.06em;
    line-height: 1.3;
    text-transform: uppercase;
}

.texte ol.gmob-notes-liste,
.gmob-notes-liste {
    margin: 0;
    padding: 0;
    line-height: 1.45;
}

.texte ol.gmob-notes-liste > li,
.gmob-notes-liste > li {
    display: list-item;
    list-style-type: decimal;
    margin: 0 0 0 2em;
    padding: 0.35em 0.5em 0.35em 0.4em;
    border-radius: 0.3em;
    font-weight: 300;
    line-height: 1.45;
    text-align: left;
    overflow-wrap: anywhere;
    scroll-margin-top: 2em;
}

.gmob-notes-liste > li::marker {
    color: #f7080b;
    font-weight: 600;
}

.gmob-notes-liste > li:target {
    animation: gmob-note-allume 3s ease-out;
}

.texte .gmob-notes-liste a:link,
.texte .gmob-notes-liste a:visited {
    color: #1891ff;
}

.texte .gmob-notes-liste a.gmob-note-retour:link,
.texte .gmob-notes-liste a.gmob-note-retour:visited,
.gmob-note-retour-groupe {
    color: #f7080b;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.gmob-note-retour {
    padding: 0 0.25em;
    border-radius: 0.25em;
}

.texte .gmob-notes-liste a.gmob-note-retour:hover {
    background: #f7080b;
    color: #fff;
}

@keyframes gmob-note-allume {
    0%, 40% { background-color: #ffe98a; }
    100% { background-color: transparent; }
}

/* ---------------------------------------------------------------- numéro (bulle et panneau) */

.gmob-note-num {
    display: inline-block;
    min-width: 1.6em;
    margin-right: 0.5em;
    padding: 0 0.35em;
    border-radius: 1em;
    background: #f7080b;
    color: #fff;
    font-size: 0.85em;
    font-weight: 600;
    line-height: 1.6;
    text-align: center;
}

/* ---------------------------------------------------------------- bulle (souris) */

.gmob-note-bulle {
    position: absolute;
    z-index: 10001;
    width: max-content;
    max-width: min(28em, calc(100vw - 24px));
    padding: 0.9em 1.1em;
    border-top: 3px solid #f7080b;
    border-radius: 0.4em;
    background: #fff;
    box-shadow: 0 0.8em 2.5em rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.06);
    color: #212121;
    font-size: 0.78em;
    font-weight: 300;
    line-height: 1.5;
    text-align: left;
    overflow-wrap: anywhere;
}

.gmob-note-bulle[hidden] {
    display: none;
}

.gmob-note-bulle a:link,
.gmob-note-bulle a:visited,
.gmob-note-panneau a:link,
.gmob-note-panneau a:visited {
    color: #1891ff;
}

/* ---------------------------------------------------------------- panneau (tactile) */

.gmob-note-voile {
    position: fixed;
    inset: 0;
    z-index: 10002;
    background: rgba(0, 0, 0, 0);
    transition: background-color 0.2s;
}

.gmob-note-voile.est-ouvert {
    background: rgba(0, 0, 0, 0.3);
}

.gmob-note-panneau {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10003;
    max-height: 65vh;
    overflow-y: auto;
    padding: 1em 1.2em calc(1.2em + env(safe-area-inset-bottom));
    border-top: 3px solid #f7080b;
    border-radius: 1em 1em 0 0;
    background: #fff;
    box-shadow: 0 -0.5em 2em rgba(0, 0, 0, 0.2);
    color: #212121;
    font-size: 1em;
    font-weight: 300;
    line-height: 1.5;
    text-align: left;
    overflow-wrap: anywhere;
    transform: translateY(100%);
    transition: transform 0.22s ease-out;
}

.gmob-note-panneau.est-ouvert {
    transform: translateY(0);
}

.gmob-note-panneau-entete {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6em;
}

.gmob-note-panneau-titre {
    font-family: 'Oswald', 'Arial Narrow', Arial, sans-serif;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.gmob-note-panneau-fermer {
    width: 2.2em;
    height: 2.2em;
    border: 0;
    border-radius: 50%;
    background: #f1f1f1;
    color: #212121;
    font-size: 1.1em;
    line-height: 1;
    cursor: pointer;
}

.gmob-note-panneau-toutes {
    display: inline-block;
    margin-top: 0.9em;
    font-size: 0.85em;
    font-weight: 400;
}

@media (prefers-reduced-motion: reduce) {
    .gmob-note-panneau,
    .gmob-note-voile {
        transition: none;
    }
    .gmob-note-appel a:target,
    .gmob-notes-liste > li:target {
        animation: none;
        background-color: #ffe98a;
    }
}
