/* ——— Fontes auto-hébergées ————————————————————————————————————————————— */
@font-face {
    font-family: 'Bricolage Grotesque';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("../fonts/bricolage-latin-ZzKOOYL.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                   U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                   U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Bricolage Grotesque';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url("../fonts/bricolage-latin-ext-E7qegro.woff2") format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
                   U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                   U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/inter-latin-joy4ri1.woff2") format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                   U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                   U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/inter-latin-ext-9fzmmZy.woff2") format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
                   U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB,
                   U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ——— Jetons ———————————————————————————————————————————————————————————— */
:root {
    --fond: #0B1020;
    --surface: #161B33;
    --surface-haute: #1E2544;
    --bordure: #2A3157;

    --turquoise: #2DD4BF;      /* actions, position, « ouvert » — un signal, jamais un aplat */
    --turquoise-sombre: #14B8A6;
    --violet: #8B5CF6;         /* marqueurs, catégories */
    --ambre: #F59E0B;          /* « ferme bientôt » */
    --rose: #F43F5E;           /* « fermé », erreurs */

    --texte: #E8EAF2;
    --texte-doux: #9AA3B8;

    --titre: 'Bricolage Grotesque', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    --corps: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

    --rayon: 14px;
    --rayon-petit: 10px;
    --gouttiere: 20px;
    --touche: 44px;            /* cible tactile minimale */
}

/* ——— Base ————————————————————————————————————————————————————————————— */
*, *::before, *::after { box-sizing: border-box; }

/*
 * `hidden` doit gagner, toujours.
 *
 * Le navigateur ne lui donne qu'un `display: none` d'origine, que la moindre
 * règle de mise en page écrase — un `display: grid` posé sur un panneau suffit
 * à le rendre visible alors qu'il se croit caché. Le mode « poser un point »
 * s'est ainsi affiché en permanence, sa barre sans son viseur, puisque seule la
 * barre déclarait un display.
 */
[hidden] { display: none !important; }

html {
    background: var(--fond);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100dvh;
    background: var(--fond);
    color: var(--texte);
    font-family: var(--corps);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding: env(safe-area-inset-top) env(safe-area-inset-right)
             env(safe-area-inset-bottom) env(safe-area-inset-left);
}

h1, h2, h3 {
    font-family: var(--titre);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

a { color: var(--turquoise); }

/* ——— Marque ——————————————————————————————————————————————————————————— */
.titre-marque {
    font-size: clamp(1.75rem, 6vw, 2.25rem);
    line-height: 1.1;
}

.sous-titre {
    margin: 6px 0 28px;
    color: var(--texte-doux);
    font-size: 0.95rem;
}

/* ——— Écran de connexion ——————————————————————————————————————————————— */
.ecran-centre {
    min-height: 100dvh;
    display: grid;
    place-items: center;
    padding: var(--gouttiere);
    /* halo discret : le violet et le turquoise en lueur, pas en aplat */
    background:
        radial-gradient(60ch 40ch at 15% -10%, rgba(139, 92, 246, 0.18), transparent 70%),
        radial-gradient(50ch 35ch at 110% 110%, rgba(45, 212, 191, 0.14), transparent 70%);
}

.carte-accueil {
    width: 100%;
    max-width: 380px;
    padding: 32px 28px;
    background: var(--surface);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
}

/* ——— Formulaire ——————————————————————————————————————————————————————— */
.formulaire { display: grid; gap: 6px; }

.formulaire label {
    margin-top: 14px;
    color: var(--texte-doux);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.formulaire input {
    min-height: var(--touche);
    padding: 0 14px;
    background: var(--fond);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-petit);
    color: var(--texte);
    font: inherit;
    font-size: 1rem; /* ≥ 16px : évite le zoom automatique sur iOS */
}

.formulaire input:focus-visible {
    outline: 2px solid var(--turquoise);
    outline-offset: 1px;
    border-color: transparent;
}

.bouton-principal {
    min-height: var(--touche);
    margin-top: 24px;
    background: var(--turquoise);
    border: 0;
    border-radius: var(--rayon-petit);
    color: #04131A;
    font-family: var(--titre);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.bouton-principal:hover { background: var(--turquoise-sombre); }

.alerte {
    margin: 0 0 16px;
    padding: 10px 14px;
    background: rgba(244, 63, 94, 0.12);
    border: 1px solid rgba(244, 63, 94, 0.35);
    border-radius: var(--rayon-petit);
    color: #FFC2CD;
    font-size: 0.9rem;
}

/* ——— Chrome de l'application —————————————————————————————————————————— */
/* L'entête est la même partout : c'est elle qui porte la seule navigation. */
.entete-app {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px var(--gouttiere);
    background: var(--fond);
    border-bottom: 1px solid var(--bordure);
}

.entete-app__titre {
    flex: 1;
    min-width: 0;
    font-size: 1.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.entete-app__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: none;
}

/* Masqué à l'œil, lu par les lecteurs d'écran. */
.invisible {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.bouton-menu {
    flex: none;
    display: grid;
    place-items: center;
    width: var(--touche);
    height: var(--touche);
    margin-left: -10px;
    background: none;
    border: 0;
    color: var(--texte);
    cursor: pointer;
}

/* Trois barres dessinées en ombres : rien à charger, rien à aligner. */
.bouton-menu__barres,
.bouton-menu__barres::before,
.bouton-menu__barres::after {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.bouton-menu__barres { position: relative; }
.bouton-menu__barres::before,
.bouton-menu__barres::after {
    content: '';
    position: absolute;
    left: 0;
}
.bouton-menu__barres::before { top: -6px; }
.bouton-menu__barres::after { top: 6px; }

.lien-discret {
    color: var(--texte-doux);
    font-size: 0.85rem;
    text-decoration: none;
}

.lien-discret:hover { color: var(--texte); }

.contenu { padding: var(--gouttiere); }

.vide {
    color: var(--texte-doux);
    text-align: center;
    padding: 48px 0;
}

/* ——— Liste des carnets ————————————————————————————————————————————————— */
.liste-carnets {
    list-style: none;
    margin: 0 0 28px;
    padding: 0;
    display: grid;
    gap: 10px;
}

.carte-carnet {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: var(--touche);
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    color: var(--texte);
    text-decoration: none;
}

.carte-carnet:hover { border-color: var(--turquoise); }

.carte-carnet__nom {
    font-family: var(--titre);
    font-size: 1.1rem;
    font-weight: 700;
}

.carte-carnet__meta { color: var(--texte-doux); font-size: 0.85rem; }

.formulaire--inline { gap: 6px; }

.champ-avec-bouton { display: flex; gap: 8px; }
.champ-avec-bouton input { flex: 1; min-width: 0; }
.champ-avec-bouton .bouton-principal { margin-top: 0; padding: 0 20px; }

/* ——— Écran carte ——————————————————————————————————————————————————————— */
.ecran-carte {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}


.compteur {
    flex: none;
    padding: 5px 11px;
    background: var(--surface-haute);
    border-radius: 999px;
    color: var(--texte-doux);
    font-size: 0.8rem;
}

.carte {
    height: 52dvh;
    min-height: 260px;
    background: var(--surface);
}

.aide-carte {
    margin: 0;
    padding: 10px var(--gouttiere);
    background: var(--surface);
    border-bottom: 1px solid var(--bordure);
    color: var(--texte-doux);
    font-size: 0.8rem;
    text-align: center;
}

/* Cap de marche : une pointe devant le point GPS, du même bleu que lui (celui
   de MapLibre). Hors du point, pour ne pas le masquer ; le marqueur pivote, la
   pointe est dessinée vers le nord. */
.cap-de-marche {
    width: 48px;
    height: 48px;
    pointer-events: none;
}

.cap-de-marche::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 16px;
    height: 12px;
    translate: -50% 0;
    background: #1da1f2;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    filter: drop-shadow(0 0 2px rgb(0 0 0 / 0.6));
}

/* Marqueur : le violet porte les lieux, le turquoise reste à la position et aux actions. */
.marqueur {
    width: 34px;
    height: 34px;
    padding: 0;
    background: var(--violet);
    border: 2px solid var(--fond);
    border-radius: 50% 50% 50% 4px;
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.45);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transform: rotate(-45deg);
}

.marqueur > * { display: inline-block; transform: rotate(45deg); }

/* ——— Liste des lieux —————————————————————————————————————————————————— */
.liste-lieux {
    flex: 1;
    list-style: none;
    margin: 0;
    padding: 0 0 24px;
}

.ligne-lieu {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    min-height: var(--touche);
    padding: 13px var(--gouttiere);
    border-bottom: 1px solid var(--bordure);
    cursor: pointer;
}

.ligne-lieu:hover { background: var(--surface); }

.ligne-lieu__pastille {
    flex: none;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: var(--surface-haute);
    border-radius: 10px;
}

.ligne-lieu__corps { display: grid; gap: 2px; min-width: 0; }
.ligne-lieu__adresse,
.ligne-lieu__note { color: var(--texte-doux); font-size: 0.85rem; }
.ligne-lieu__horaires { color: var(--turquoise); font-size: 0.85rem; }

/* ——— Horaires en clair ———————————————————————————————————————————————— */
.horaires-semaine {
    margin: 6px 0 0;
    font-size: 0.85rem;
}

.horaires-semaine__ligne {
    display: flex;
    gap: 10px;
    padding: 1px 0;
}

.horaires-semaine dt {
    flex: none;
    width: 5.5em;
    color: var(--texte-doux);
}

.horaires-semaine dd {
    margin: 0;
    color: var(--turquoise);
}

/* Un jour fermé n'est pas un signal : il reste en gris. */
.horaires-semaine__ferme { color: var(--texte-doux); }

.horaires-semaine__mention {
    margin: 4px 0 0;
    color: var(--texte-doux);
    font-size: 0.8rem;
}

.horaires-repli { margin-top: 4px; }

.horaires-repli > summary {
    min-height: var(--touche);
    display: flex;
    align-items: center;
    color: var(--turquoise);
    font-size: 0.85rem;
    cursor: pointer;
}

/* ——— Panneau d'édition ———————————————————————————————————————————————— */
.feuille {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 10;
    max-height: 86dvh;
    overflow-y: auto;
    padding: 20px var(--gouttiere) calc(24px + env(safe-area-inset-bottom));
    background: var(--surface);
    border-top: 1px solid var(--bordure);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -12px 32px rgb(0 0 0 / 0.5);
}

.feuille h2 {
    margin: 0 36px 4px 0;
    font-size: 1.2rem;
}

.feuille__fermer {
    position: absolute;
    top: 12px;
    right: 12px;
    width: var(--touche);
    height: var(--touche);
    background: none;
    border: 0;
    color: var(--texte-doux);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.feuille textarea {
    padding: 10px 14px;
    background: var(--fond);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-petit);
    color: var(--texte);
    font: inherit;
    font-size: 1rem;
    resize: vertical;
}

.feuille textarea:focus-visible {
    outline: 2px solid var(--turquoise);
    outline-offset: 1px;
    border-color: transparent;
}

.bouton-danger {
    width: 100%;
    min-height: var(--touche);
    margin-top: 10px;
    background: none;
    border: 1px solid rgb(244 63 94 / 0.4);
    border-radius: var(--rayon-petit);
    color: var(--rose);
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

.bouton-danger:hover { background: rgb(244 63 94 / 0.12); }

.fiche-lecture p { margin: 4px 0; color: var(--texte-doux); }

/* Les contrôles MapLibre au thème nocturne */
.maplibregl-ctrl-group {
    background: var(--surface-haute);
    border: 1px solid var(--bordure);
}

.maplibregl-ctrl-group button + button { border-top-color: var(--bordure); }
.maplibregl-ctrl-group button span { filter: invert(1); }
.maplibregl-ctrl-attrib { background: rgb(11 16 32 / 0.75); }

.maplibregl-ctrl-attrib a { color: var(--texte-doux); }

@media (min-width: 900px) {
    .carte { height: 60dvh; }
    .feuille {
        inset: auto auto 24px 24px;
        width: 380px;
        border-radius: var(--rayon);
        border: 1px solid var(--bordure);
    }
}


/* ——— Partage ——————————————————————————————————————————————————————————— */
.aide-champ { margin: 6px 0 0; color: var(--texte-doux); font-size: 0.78rem; }

.bloc {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--bordure);
}

.bloc:last-child { border-bottom: 0; }

.bloc h2 {
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.champ-avec-bouton select,
.champ-avec-bouton input[readonly] {
    flex: 1;
    min-width: 0;
    min-height: var(--touche);
    padding: 0 14px;
    background: var(--fond);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-petit);
    color: var(--texte);
    font: inherit;
    font-size: 1rem;
}

.champ-avec-bouton input[readonly] {
    color: var(--turquoise);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8rem;
}

.bouton-secondaire,
.bouton-partage {
    width: 100%;
    min-height: var(--touche);
    margin-top: 12px;
    background: transparent;
    border: 1px solid var(--bordure);
    border-radius: var(--rayon-petit);
    color: var(--texte-doux);
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

.bouton-secondaire:hover,
.bouton-partage:hover { border-color: var(--turquoise); color: var(--turquoise); }

.liste-membres { list-style: none; margin: 0; padding: 0; }

.liste-membres li {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--bordure);
}

.liste-membres li:last-child { border-bottom: 0; }

.badge-role {
    margin-left: auto;
    padding: 3px 10px;
    background: var(--surface-haute);
    border-radius: 999px;
    color: var(--texte-doux);
    font-size: 0.75rem;
}

.succes {
    margin: 0;
    padding: 10px var(--gouttiere);
    background: rgb(45 212 191 / 0.12);
    border-bottom: 1px solid rgb(45 212 191 / 0.3);
    color: var(--turquoise);
    font-size: 0.85rem;
    text-align: center;
}

/* ——— Badge d'ouverture ———————————————————————————————————————————————— */
.badge-ouverture {
    justify-self: start;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.badge-ouverture--ouvert {
    background: rgb(45 212 191 / 0.15);
    color: var(--turquoise);
}

.badge-ouverture--ferme_bientot {
    background: rgb(245 158 11 / 0.15);
    color: var(--ambre);
}

.badge-ouverture--ferme {
    background: rgb(244 63 94 / 0.13);
    color: #FF8FA0;
}

.filtre-ouvert {
    padding: 12px var(--gouttiere) 0;
}

.filtre-ouvert label {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: var(--touche);
    color: var(--texte-doux);
    font-size: 0.88rem;
    cursor: pointer;
}

.filtre-ouvert input[type="checkbox"] {
    width: 19px;
    height: 19px;
    accent-color: var(--turquoise);
}

/* ——— Menu ————————————————————————————————————————————————————————————— */
.voile {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgb(4 8 20 / 0.6);
}

.menu {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 31;
    width: min(310px, 84vw);
    overflow-y: auto;
    padding: calc(18px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
    background: var(--surface);
    border-right: 1px solid var(--bordure);
    box-shadow: 8px 0 32px rgb(0 0 0 / 0.5);
}

.menu__section {
    margin: 18px 4px 8px;
    color: var(--texte-doux);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.menu__section:first-child { margin-top: 0; }

.menu__liste { list-style: none; margin: 0; padding: 0; }

.menu__ligne {
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: var(--rayon-petit);
}

.menu__ligne--actif { background: var(--surface-haute); }

.menu__carnet {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 1px;
    min-height: var(--touche);
    padding: 9px 10px;
    color: var(--texte);
    text-decoration: none;
}

.menu__nom {
    font-family: var(--titre);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu__meta { color: var(--texte-doux); font-size: 0.78rem; }

.menu__epingle { flex: none; display: grid; place-items: center; width: 34px; }

.menu__activer {
    flex: none;
    min-height: 32px;
    margin-right: 8px;
    padding: 0 11px;
    background: none;
    border: 1px solid var(--bordure);
    border-radius: 999px;
    color: var(--texte-doux);
    font: inherit;
    font-size: 0.76rem;
    cursor: pointer;
}

.menu__activer:hover { border-color: var(--turquoise); color: var(--turquoise); }

.menu__vide { padding: 10px; color: var(--texte-doux); font-size: 0.85rem; }

/* ——— Poser un lieu ———————————————————————————————————————————————————— */
.zone-carte { position: relative; }

/* Le viseur ne bouge pas : c'est la carte qui glisse dessous. La pointe du pin
   tombe exactement au centre, d'où la translation d'une hauteur entière. */
.viseur {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 5;
    transform: translate(-50%, -100%);
    pointer-events: none;
    filter: drop-shadow(0 6px 10px rgb(0 0 0 / 0.5));
}

.pin--viseur { animation: viseur-pose 220ms ease-out; }

@keyframes viseur-pose {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: none; opacity: 1; }
}

/* Une pilule libellée, et non un « + » nu : l'action se lit, elle ne se devine pas. */
.bouton-ajouter {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 6;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 18px;
    background: var(--turquoise);
    border: 0;
    border-radius: 999px;
    box-shadow: 0 6px 18px rgb(0 0 0 / 0.45);
    color: #04131A;
    font: inherit;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
}

.bouton-ajouter > span:first-child { font-size: 1.6rem; }

.barre-placement {
    position: absolute;
    inset: auto 12px 12px;
    z-index: 6;
    display: grid;
    gap: 10px;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.45);
}

.barre-placement__aide {
    margin: 0;
    color: var(--texte-doux);
    font-size: 0.85rem;
    text-align: center;
}

.barre-placement__boutons { display: flex; gap: 10px; }
.barre-placement__boutons > * { flex: 1; margin-top: 0; }

.feuille__pied {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--bordure);
}

.feuille__pied > * { flex: 1; }
.feuille__pied form { display: flex; }
.feuille__pied .bouton-danger { flex: 1; margin-top: 0; }
.feuille__pied .bouton-secondaire { margin-top: 0; }

/* ——— Distance ————————————————————————————————————————————————————————— */
.ligne-lieu__distance {
    flex: none;
    align-self: center;
    padding: 4px 10px;
    background: var(--surface-haute);
    border-radius: 999px;
    color: var(--turquoise);
    font-size: 0.8rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ——— Accueil sans carnet —————————————————————————————————————————————— */
.contenu--accueil { max-width: 420px; margin: 0 auto; text-align: center; }
.contenu--accueil .formulaire { text-align: left; }
.accueil-vide__pin { margin: 32px 0 12px; }

/* ——— Recherche sur la carte ——————————————————————————————————————————— */
.recherche-carte {
    position: absolute;
    inset: 10px 10px auto;
    z-index: 7;
}

.recherche-carte__champ {
    width: 100%;
    min-height: var(--touche);
    padding: 0 16px;
    background: var(--surface);
    border: 1px solid var(--bordure);
    border-radius: 999px;
    box-shadow: 0 4px 16px rgb(0 0 0 / 0.4);
    color: var(--texte);
    font: inherit;
    font-size: 1rem; /* ≥ 16px : évite le zoom automatique sur iOS */
}

.recherche-carte__champ::placeholder { color: var(--texte-doux); }

.recherche-carte__champ:focus-visible {
    outline: none;
    border-color: var(--turquoise);
}

.suggestions {
    list-style: none;
    margin: 8px 0 0;
    padding: 6px;
    max-height: 46dvh;
    overflow-y: auto;
    background: var(--surface-haute);
    border: 1px solid var(--bordure);
    border-radius: var(--rayon);
    box-shadow: 0 10px 28px rgb(0 0 0 / 0.5);
}

.suggestion {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: var(--touche);
    padding: 8px 10px;
    border-radius: var(--rayon-petit);
    cursor: pointer;
}

.suggestion--actif { background: rgb(45 212 191 / 0.12); }

.suggestion__pastille {
    flex: none;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    background: var(--surface);
    border-radius: 50%;
    font-size: 15px;
}

.suggestion__corps { display: grid; gap: 1px; min-width: 0; }

.suggestion__corps strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggestion__detail {
    color: var(--texte-doux);
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.suggestion--vide {
    color: var(--texte-doux);
    font-size: 0.85rem;
    cursor: default;
}

/* Le bouton « + » laisse la place à la barre de placement sur un petit écran. */
@media (min-width: 900px) {
    .recherche-carte { inset: 12px auto auto 12px; width: 360px; }
}

/* ——— Ajouter un lieu : recherche, fiche courte, position corrigeable ——— */
.feuille__contexte { margin: 0 0 18px; color: var(--texte-doux); font-size: 0.85rem; }
.recherche-carte__label { display: block; margin-bottom: 10px; font-size: 0.9rem; }
.feuille--recherche .recherche-carte__champ { border-radius: var(--rayon-petit); box-shadow: none; }
.recherche-carte__statut { margin: 10px 0 0; color: var(--texte-doux); font-size: 0.8rem; }
.recherche-carte__statut:empty { display: none; }
.recherche-carte__alternative { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--bordure); }
.recherche-carte__alternative p { color: var(--texte-doux); font-size: 0.85rem; margin: 0 0 10px; }
.recherche-carte__alternative .bouton-secondaire { width: 100%; margin: 0; }
.feuille__retour { min-height: var(--touche); padding: 0; border: 0; background: none; color: var(--turquoise); font: inherit; font-size: 0.85rem; text-align: left; cursor: pointer; }
.position-lieu { margin: 10px 0 0; padding: 12px 14px; border: 1px solid var(--bordure); border-radius: var(--rayon-petit); }
.position-lieu p { margin: 0; color: var(--texte-doux); font-size: 0.85rem; overflow-wrap: anywhere; }
.details-lieu { margin-top: 18px; border-top: 1px solid var(--bordure); }
.details-lieu summary { padding: 14px 0; min-height: var(--touche); cursor: pointer; color: var(--texte-doux); font-size: 0.85rem; }
.formulaire select { min-height: var(--touche); padding: 0 12px; border: 1px solid var(--bordure); border-radius: var(--rayon-petit); background: var(--fond); color: var(--texte); font: inherit; font-size: 1rem; }
.facultatif { font-weight: 400; }
.feuille__validation { position: sticky; bottom: -24px; padding: 12px 0 6px; background: var(--surface); }
.feuille__validation .bouton-principal { width: 100%; margin: 0; }
.marqueur--brouillon { background: var(--turquoise); color: var(--fond); border: 3px solid var(--texte); pointer-events: none; }
.ecran-carte--placement .carte { scroll-margin-top: 64px; }
.feuille--recherche .suggestions { max-height: 32dvh; box-shadow: none; }
@media (min-width: 900px) {
    .feuille { width: 400px; max-height: calc(100dvh - 100px); }
    .barre-placement { max-width: 440px; margin-inline: auto; }
}

/* Consulter et suivre le voyage */
.ligne-lieu__ouvrir { border: 0; padding: 0; min-height: var(--touche); background: none; color: var(--texte); font: inherit; text-align: left; cursor: pointer; }
.ligne-lieu__suivi { color: var(--texte-doux); font-size: .8rem; }
.ligne-lieu--important .ligne-lieu__suivi { color: var(--ambre); }
.ligne-lieu--visite .ligne-lieu__ouvrir, .ligne-lieu--visite .ligne-lieu__pastille { opacity: .55; }
.ligne-lieu--proche { border-left: 3px solid var(--turquoise); }
.marqueur--important { background: var(--ambre); color: var(--fond); }
.marqueur--visite { background: var(--surface-haute); color: var(--texte-doux); opacity: .55; }
.marqueur--proche { box-shadow: 0 0 0 3px var(--turquoise); }
.proximite { margin: 0; padding: 12px var(--gouttiere); color: var(--turquoise); background: var(--surface); font-size: .85rem; }
.itineraire { display: flex; align-items: center; justify-content: center; text-decoration: none; margin-top: 20px; }
.priorite { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--bordure); }
.priorite .bouton-secondaire { margin: 0; }
.fiche-lecture p { margin: 10px 0; }
