/* ══════════════════════════════════════
   PÉRIPLE — Feuille de style
   Inspiration : carte routière française (routes jaunes bordées,
   bleu encre des légendes, fond « papier de carte » vert d'eau).
   ══════════════════════════════════════ */

:root, [data-theme="light"] {
    --fond: #E9EFEC;          /* papier de carte */
    --carte: #FBFCFA;         /* blocs */
    --encre: #1D2D50;         /* bleu des légendes */
    --encre-2: #56627A;
    --trait: #CFD8D3;
    --route: #F4C21B;         /* départementale */
    --route-bord: #8A6A00;
    --nationale: #C8312B;     /* rouge des nationales / coup de cœur */
    --foret: #2F7A55;         /* gardé */
    --gris: #9AA39E;
    --ombre: 0 1px 0 rgba(29,45,80,.06), 0 6px 18px -10px rgba(29,45,80,.35);
    --rayon: 14px;
    --serif: "Young Serif", Georgia, "Times New Roman", serif;
    --sans: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color-scheme: light;
}

[data-theme="dark"] {
    --fond: #121B2E;          /* carte de nuit */
    --carte: #1B2740;
    --encre: #E6ECF2;
    --encre-2: #9DABBF;
    --trait: #2C3A57;
    --route: #F4C21B;
    --route-bord: #6B5300;
    --nationale: #F06A5E;
    --foret: #5FBF8C;
    --gris: #6F7D92;
    --ombre: 0 1px 0 rgba(0,0,0,.2), 0 8px 20px -12px rgba(0,0,0,.6);
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --fond: #121B2E; --carte: #1B2740; --encre: #E6ECF2; --encre-2: #9DABBF;
        --trait: #2C3A57; --route-bord: #6B5300; --nationale: #F06A5E; --foret: #5FBF8C;
        --gris: #6F7D92; --ombre: 0 1px 0 rgba(0,0,0,.2), 0 8px 20px -12px rgba(0,0,0,.6);
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--fond); color: var(--encre);
    font: 16px/1.5 var(--sans);
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; margin: 0; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--route); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ── Barre du haut ── */
.topbar {
    position: sticky; top: 0; z-index: 500;
    display: flex; align-items: center; gap: 10px;
    padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
    background: color-mix(in srgb, var(--fond) 88%, transparent);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; font-family: var(--serif); font-size: 20px; }
.topbar-back { width: 44px; height: 44px; margin-left: -10px; border: 0; background: none; display: grid; place-items: center; cursor: pointer; }
.topbar-back:not([hidden]) + .logo, .logo.masque { display: none; }
.topbar-titre { font-family: var(--serif); font-size: 18px; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; gap: 4px; margin-left: auto; }
.icone-btn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; display: grid; place-items: center; cursor: pointer; }
.icone-btn:active { background: var(--trait); }

/* ── Navigation basse ── */
.nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 600;
    display: grid; grid-template-columns: repeat(5, 1fr);
    background: var(--carte); border-top: 1px solid var(--trait);
    padding-bottom: env(safe-area-inset-bottom);
}
.nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 0 8px; text-decoration: none; font-size: 11.5px; color: var(--encre-2); }
.nav svg { width: 24px; height: 24px; }
.nav a.actif { color: var(--encre); font-weight: 600; }
.nav a.actif svg { color: var(--route-bord); }
[data-theme="dark"] .nav a.actif svg { color: var(--route); }

.vue { max-width: 760px; margin: 0 auto; padding: 4px 16px 24px; }

/* ── Boutons ── */
.btn {
    min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--trait);
    background: var(--carte); cursor: pointer; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    text-decoration: none;
}
.btn-primaire { background: var(--encre); color: var(--fond); border-color: var(--encre); }
.btn-route { background: var(--route); color: #2B2100; border-color: var(--route-bord); }
.btn-danger { color: var(--nationale); border-color: currentColor; background: none; }
.btn-plein { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }

/* ── Accueil : bandeau de l'année ── */
.annee { padding: 6px 0 18px; }
.annee h1 { font-size: 34px; }
.annee-chiffres { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; color: var(--encre-2); }
.annee-chiffres b { color: var(--encre); font-family: var(--serif); font-weight: 400; font-size: 22px; margin-right: 4px; }

/* ── Liste des périples : chaque séjour est un « ruban de route » ── */
.periples { display: flex; flex-direction: column; gap: 14px; }
.periple {
    display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center;
    background: var(--carte); border-radius: var(--rayon); padding: 12px; text-decoration: none;
    box-shadow: var(--ombre);
}
.periple-trace { width: 96px; height: 96px; border-radius: 10px; background: var(--fond); }
.periple h2 { font-size: 20px; margin-bottom: 4px; }
.periple-dates { color: var(--encre-2); font-size: 14px; }
.periple-chiffres { margin-top: 6px; font-size: 14px; display: flex; gap: 12px; flex-wrap: wrap; }
.periple-chiffres span { white-space: nowrap; }
.mois { font-family: var(--serif); font-size: 15px; color: var(--encre-2); margin: 14px 0 -2px; }

.vide { text-align: center; padding: 40px 12px; }
.vide svg { width: 220px; max-width: 70%; }
.vide h2 { font-size: 24px; margin: 10px 0 6px; }
.vide p { color: var(--encre-2); max-width: 34ch; margin: 0 auto 20px; }

.fab {
    position: fixed; right: 18px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 550;
    box-shadow: 0 10px 24px -8px rgba(138,106,0,.6);
}

/* ── Formulaires ── */
.etape { background: var(--carte); border-radius: var(--rayon); padding: 18px; margin-bottom: 14px; box-shadow: var(--ombre); }
.etape h2 { font-size: 21px; margin-bottom: 6px; }
.etape p.aide { color: var(--encre-2); margin: 0 0 14px; font-size: 15px; }
label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 12px; }
input[type=text], input[type=date], input[type=password], input[type=url], input[type=search], input[type=time], input:not([type]), textarea, select {
    display: block; width: 100%; margin-top: 5px; min-height: 46px; padding: 10px 12px;
    border: 1.5px solid var(--trait); border-radius: 10px; background: var(--fond); font-weight: 400;
}
textarea { min-height: 80px; resize: vertical; }
.ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.depot {
    display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
    padding: 24px 12px; border: 2px dashed var(--trait); border-radius: var(--rayon); cursor: pointer; font-weight: 400;
}
.depot strong { font-size: 16px; }
.depot small { color: var(--encre-2); }
.depot input { display: none; }
.depot.ok { border-style: solid; border-color: var(--foret); }
.comment-exporter { font-size: 14px; color: var(--encre-2); margin-top: 12px; }
.comment-exporter summary { cursor: pointer; font-weight: 600; color: var(--encre); min-height: 32px; }
.comment-exporter ol { padding-left: 20px; margin: 6px 0 0; }

.escapades { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.escapade {
    display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left;
    padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--trait); background: var(--fond); cursor: pointer;
}
.escapade.choisie { border-color: var(--route-bord); background: color-mix(in srgb, var(--route) 22%, var(--fond)); }
.escapade small { color: var(--encre-2); display: block; }
.escapade .km { font-family: var(--serif); white-space: nowrap; }

.emojis { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.emojis button { width: 44px; height: 44px; font-size: 22px; border-radius: 10px; border: 1.5px solid var(--trait); background: var(--fond); cursor: pointer; }
.emojis button.choisi { border-color: var(--encre); background: var(--carte); }
.apercu-import { background: var(--fond); border-radius: 10px; padding: 12px; font-size: 15px; margin-bottom: 14px; }

/* ── Détail d'un périple ── */
.entete-periple { padding: 4px 0 12px; }
.entete-periple h1 { font-size: 28px; }
.entete-periple .meta { color: var(--encre-2); margin-top: 4px; }
.carte-leaflet { height: 300px; border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); background: var(--trait); z-index: 1; }
.carte-grande { height: calc(100vh - 220px); min-height: 360px; }
.leaflet-container { font: 14px var(--sans); }
.leaflet-popup-content { margin: 10px 12px; }
.repere {
    width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
    background: var(--encre); color: #fff; font: 600 12px var(--sans); border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.repere.coeur { background: var(--nationale); }
.repere.emoji { width: 32px; height: 32px; background: var(--carte); color: inherit; font-size: 17px; border: 2px solid var(--encre); }
.repere.emoji.coeur { border-color: var(--nationale); background: #FFF1EF; }
.repere.projet { background: var(--route); border: 2px dashed var(--route-bord); }
.repere.ecarte { width: 12px; height: 12px; background: var(--gris); border-width: 1.5px; }

.onglets { display: flex; gap: 6px; margin: 16px 0 12px; overflow-x: auto; }
.onglets button {
    min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--trait);
    background: none; cursor: pointer; font-weight: 600; white-space: nowrap;
}
.onglets button.actif { background: var(--encre); color: var(--fond); border-color: var(--encre); }

.filtre-ecartes { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 14px; color: var(--encre-2); margin: 0 0 8px; }
.filtre-ecartes input { width: 20px; height: 20px; }

/* Journée = étape de la route */
.jour { margin-bottom: 18px; }
.jour-titre { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.jour-titre h3 { font-size: 19px; }
.jour-titre .km { color: var(--encre-2); font-size: 14px; margin-left: auto; white-space: nowrap; }
input.jour-notes { width: 100%; border: 0; border-radius: 0; margin-top: 0; border-bottom: 1.5px dashed var(--trait); background: none; padding: 4px 0; margin-bottom: 8px; font-style: italic; color: var(--encre-2); min-height: 36px; }

.etapes { list-style: none; padding: 0 0 0 18px; margin: 0; position: relative; }
.etapes::before {   /* la route qui relie les lieux */
    content: ""; position: absolute; left: 5px; top: 10px; bottom: 10px; width: 6px; border-radius: 3px;
    background: var(--route); box-shadow: 0 0 0 1.5px var(--route-bord);
}
.lieu { position: relative; background: var(--carte); border-radius: 12px; margin: 0 0 8px 10px; box-shadow: var(--ombre); }
.lieu::before {
    content: ""; position: absolute; left: -24px; top: 18px; width: 12px; height: 12px; border-radius: 50%;
    background: var(--encre); border: 2px solid var(--carte);
}
.lieu.ecarte { background: none; box-shadow: none; border: 1.5px dashed var(--trait); }
.lieu.ecarte::before { background: var(--gris); }
.lieu.ecarte .lieu-nom { color: var(--encre-2); }
.lieu-tete { display: flex; align-items: center; gap: 10px; padding: 10px 6px 10px 12px; cursor: pointer; }
.lieu-cat { font-size: 22px; width: 28px; text-align: center; flex: none; }
.lieu-infos { flex: 1; min-width: 0; }
.lieu-nom { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lieu-nom.attente { color: var(--encre-2); font-weight: 400; font-style: italic; }
.lieu-sous { font-size: 13px; color: var(--encre-2); }
.lieu-badges { font-size: 13px; color: var(--route-bord); }
[data-theme="dark"] .lieu-badges { color: var(--route); }
.garder {
    flex: none; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--trait); background: none; cursor: pointer;
    display: grid; place-items: center; color: var(--gris);
}
.garder.oui { background: var(--foret); border-color: var(--foret); color: #fff; }
.lieu-corps { padding: 0 12px 12px 12px; display: none; }
.lieu.ouvert .lieu-corps { display: block; }
.puces { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.puce { white-space: nowrap; flex: none; min-height: 36px; padding: 0 10px; border-radius: 999px; border: 1.5px solid var(--trait); background: var(--fond); cursor: pointer; font-size: 14px; }
.puce.choisie { border-color: var(--encre); background: var(--encre); color: var(--fond); }
.etoiles { display: flex; gap: 2px; margin-bottom: 8px; }
.etoiles button { width: 40px; height: 40px; border: 0; background: none; font-size: 26px; cursor: pointer; color: var(--trait); padding: 0; }
.etoiles button.on { color: var(--route); text-shadow: 0 0 1px var(--route-bord); }
.bascules { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.bascule { min-height: 40px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--trait); background: none; cursor: pointer; font-size: 14px; font-weight: 600; }
.bascule.on { border-color: var(--nationale); color: var(--nationale); }
.bascule.on.refaire { border-color: var(--foret); color: var(--foret); }
.lien-maps { font-size: 14px; display: inline-block; margin-top: 8px; color: var(--encre-2); }

/* ── Tri rapide (une carte à la fois) ── */
.tri { display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
.tri-progres { height: 6px; border-radius: 3px; background: var(--trait); overflow: hidden; }
.tri-progres div { height: 100%; background: var(--route); }
.tri-carte {
    background: var(--carte); border-radius: 18px; box-shadow: var(--ombre); overflow: hidden;
    touch-action: pan-y; transition: transform .25s ease, opacity .25s ease; user-select: none;
}
.tri-carte .mini { height: 200px; }
.tri-carte .txt { padding: 14px 16px 16px; }
.tri-carte h2 { font-size: 24px; }
.tri-carte p { margin: 4px 0 0; color: var(--encre-2); }
.tri-boutons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tri-fin { text-align: center; padding: 30px 0; }

/* ── Guide (lecture + impression) ── */
.guide-sejour { margin-bottom: 34px; break-inside: avoid-page; }
.guide-sejour h2 { font-size: 26px; }
.guide-sejour .meta { color: var(--encre-2); margin: 4px 0 10px; }
.guide-sejour .resume { font-family: var(--serif); font-size: 17px; line-height: 1.6; margin: 0 0 12px; }
.guide-trace { width: 100%; height: 160px; background: var(--carte); border-radius: 12px; margin-bottom: 12px; }
.guide-jour { font-family: var(--serif); font-size: 17px; margin: 14px 0 6px; border-bottom: 1.5px solid var(--trait); padding-bottom: 4px; }
.guide-lieu { display: grid; grid-template-columns: 28px 1fr; gap: 6px; padding: 6px 0; break-inside: avoid; }
.guide-lieu .nom { font-weight: 600; }
.guide-lieu .com { color: var(--encre-2); font-size: 15px; }
.guide-outils { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.guide-outils select { width: auto; margin: 0; }

/* ── Carte globale ── */
.filtres-carte { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; }

/* ── Escapades repérées ── */
.escapade.ajoutee { border-style: solid; border-color: var(--foret); }
.escapade.ignoree { opacity: .55; }
.statut-esc { color: var(--foret); font-weight: 600; }
.escapade.ignoree .statut-esc { color: var(--encre-2); }
.esc-titre { font-family: var(--serif); font-size: 18px; margin: 14px 0 6px; }
.esc-jour { padding: 6px 0; border-bottom: 1px solid var(--trait); font-size: 15px; }
.esc-date { display: block; font-size: 13px; color: var(--encre-2); font-weight: 600; }
.esc-liste .traverse { color: var(--encre-2); }
.esc-date { display: flex !important; justify-content: space-between; align-items: center; }
.esc-retirer { border: 1.5px solid var(--trait); background: none; border-radius: 999px; min-height: 32px; padding: 0 12px; font-size: 13px; font-weight: 600; color: var(--nationale); cursor: pointer; }
.esc-jour.retire .esc-liste, .esc-jour.retire .esc-date { text-decoration: line-through; opacity: .45; }
.esc-jour.retire .esc-retirer { text-decoration: none; opacity: 1; color: var(--foret); }
.esc-jour.retire .esc-date { opacity: 1; text-decoration: none; }
.esc-jour.retire .esc-liste { text-decoration: line-through; }
.actions-jour { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; }

/* ── Ajouts manuels, liens ── */
.lien-ajout { border: 0; background: none; color: var(--encre-2); font-weight: 600; font-size: 14px; min-height: 40px; padding: 0 4px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.lien-ajout.danger { color: var(--nationale); }
.liens { display: flex; gap: 16px; flex-wrap: wrap; }
.resultats { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.resultat { text-align: left; border: 1.5px solid var(--trait); background: var(--fond); border-radius: 10px; padding: 8px 12px; cursor: pointer; min-height: 48px; }
.resultat small { display: block; color: var(--encre-2); font-size: 13px; }

/* ── Souvenirs : notes de carnet ── */
.souvenir { position: relative; background: var(--carte); border-radius: 4px 14px 14px 4px; padding: 12px 14px 6px 18px; margin-bottom: 10px; box-shadow: var(--ombre); border-left: 5px solid var(--route); }
.souvenir p { font-family: var(--serif); font-size: 17px; line-height: 1.55; margin: 4px 0 2px; }
.souvenir-quand { font-size: 13px; color: var(--encre-2); }
.souvenir-actions { display: flex; gap: 12px; }

/* ── Fiche d'un lieu (grande carte) ── */
.fiche-tete { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.fiche-emoji { font-size: 34px; width: 52px; height: 52px; display: grid; place-items: center; background: var(--fond); border-radius: 14px; flex: none; }
.fiche-quand { margin: 0 0 8px; color: var(--encre-2); }
.fiche-badges { margin: 0 0 8px; }
.or { color: #C99A00; }
.fiche-avis { font-family: var(--serif); font-size: 17px; line-height: 1.55; margin: 0 0 10px; padding: 10px 14px; background: var(--fond); border-left: 4px solid var(--route); border-radius: 0 10px 10px 0; }
.fiche-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.fiche-actions .btn { flex: 1 1 auto; }
.separateur { flex: none; width: 1.5px; background: var(--trait); margin: 4px 2px; }
.astuce { margin: 0 0 8px; font-size: 13px; }

/* ── Projets ── */
.projets { display: flex; flex-direction: column; gap: 10px; }
.projet { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; background: var(--carte); border: 0; border-radius: var(--rayon); padding: 12px; box-shadow: var(--ombre); cursor: pointer; text-decoration: none; }
.projet.prevu { border-left: 5px solid var(--route); }
.projet.envie { border-left: 5px dashed var(--route-bord); }
.projet.fait { opacity: .7; }
.projet.refaire { align-items: center; cursor: default; }
.projet-emoji { font-size: 26px; width: 40px; text-align: center; flex: none; }
.projet-txt { flex: 1; min-width: 0; text-decoration: none; }
.projet-txt b { font-family: var(--serif); font-weight: 400; font-size: 18px; display: block; }
.projet-txt small { color: var(--encre-2); display: block; }
.projet-notes { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; margin-top: 4px; }

/* ── Guide : souvenirs et liens ── */
.guide-souvenir { font-family: var(--serif); font-size: 16px; line-height: 1.6; margin: 8px 0 10px; padding-left: 14px; border-left: 3px solid var(--route); }
.guide-souvenir cite { display: block; font-family: var(--sans); font-style: normal; font-size: 13px; color: var(--encre-2); }
.guide-lien { font-size: 14px; color: var(--encre-2); }

/* ── Photos ── */
.periple-photo { object-fit: cover; }
.bande-photos { display: flex; gap: 8px; overflow-x: auto; margin: 2px 0 12px; padding-bottom: 2px; }
.bande-photos img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; flex: none; cursor: pointer; }
.ajout-photo { flex: none; width: 72px; height: 72px; border: 2px dashed var(--trait); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 22px; margin: 0; cursor: pointer; }
.ajout-photo span { font-size: 12px; color: var(--encre-2); }
.photos-jour { font-family: var(--serif); font-size: 18px; margin: 14px 0 8px; }
.grille-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.vignette { position: relative; padding: 0; border: 0; background: var(--trait); border-radius: 10px; overflow: hidden; aspect-ratio: 1; cursor: pointer; }
.vignette img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vignette span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; font-size: 11px; font-weight: 600; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(0,0,0,.65)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vignette i { position: absolute; top: 4px; right: 4px; font-style: normal; font-size: 13px; }
.photo-grande { width: 100%; max-height: 60vh; object-fit: contain; border-radius: 12px; background: #000; display: block; }
.repere-photo { width: 40px; height: 40px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.4); overflow: hidden; background: var(--trait); }
.repere-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fiche-photos { display: flex; gap: 8px; overflow-x: auto; margin: 0 0 10px; }
.fiche-photos img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; flex: none; cursor: pointer; }
.guide-photos { display: flex; gap: 6px; margin-top: 6px; }
.guide-photos img { width: 30%; max-width: 160px; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; }
.guide-liens { display: flex; gap: 12px; flex-wrap: wrap; }
textarea.champ-liens { min-height: 60px; }
.resume-apercu { max-height: 52vh; overflow-y: auto; border-radius: 12px; background: var(--fond); margin: 4px 0 12px; }
.resume-apercu img { width: 100%; display: block; }

/* ── Installation ── */
.bandeau-install { display: flex; align-items: center; gap: 10px; }
.bandeau-install span { flex: 1; }
.bandeau-install .btn { min-height: 40px; padding: 0 14px; }
.consignes { margin: 0; padding-left: 20px; }
.consignes li { margin-bottom: 4px; }

/* ── Réglages ── */
.reglage { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--trait); }
.reglage:last-child { border: 0; }
.reglage small { display: block; color: var(--encre-2); font-weight: 400; }

/* ── Menus, modales, notifications ── */
.menu-fond { position: fixed; inset: 0; z-index: 900; background: rgba(10,18,35,.45); display: flex; align-items: flex-end; justify-content: center; }
.menu {
    width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; background: var(--carte);
    border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    animation: monte .22s ease-out;
}
.menu h2 { font-size: 22px; margin-bottom: 12px; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; border: 0; background: none; text-align: left; font-weight: 600; cursor: pointer; border-radius: 10px; padding: 0 8px; }
.menu-item:active { background: var(--fond); }
.menu-item.danger { color: var(--nationale); }
@keyframes monte { from { transform: translateY(40px); opacity: 0; } }

.toast {
    position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 1000;
    background: var(--encre); color: var(--fond); padding: 10px 16px; border-radius: 10px; font-weight: 600; max-width: 90vw;
}
.toast.erreur { background: var(--nationale); color: #fff; }
.chargement { text-align: center; padding: 40px 0; color: var(--encre-2); }
.bandeau-info { background: color-mix(in srgb, var(--route) 22%, var(--carte)); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }

/* ── Connexion ── */
.page-login { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login { width: 100%; max-width: 360px; background: var(--carte); padding: 28px 22px; border-radius: 20px; box-shadow: var(--ombre); }
.login-route { width: 120px; display: block; margin-bottom: 6px; }
.login h1 { font-size: 36px; }
.login .sous { color: var(--encre-2); margin: 4px 0 20px; }
.login .btn { width: 100%; margin-top: 4px; }
.erreur { color: var(--nationale); min-height: 1.4em; margin: 0 0 8px; font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Impression du guide ── */
@media print {
    @page { margin: 16mm 14mm; }
    body { background: #fff; color: #1D2D50; padding: 0; font-size: 11pt; }
    .topbar, .nav, .fab, .guide-outils, .no-print { display: none !important; }
    .vue { max-width: none; padding: 0; }
    .guide-sejour { break-before: page; }
    .guide-sejour:first-of-type { break-before: auto; }
    .guide-trace { border: 1px solid #ccc; }
    .couverture { display: flex !important; }
}
.couverture { display: none; flex-direction: column; justify-content: center; height: 240mm; break-after: page; }
.couverture h1 { font-size: 48pt; }
.couverture p { font-size: 14pt; color: #56627A; }
