/* Polices auto-hébergées (fonctionnent hors ligne) : Playfair Display pour les titres, Inter pour le texte */
@font-face { font-family: "Playfair Display"; font-weight: 600; font-display: swap; src: url(fonts/playfair-display-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Playfair Display"; font-weight: 700; font-display: swap; src: url(fonts/playfair-display-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 100 900; font-display: swap; src: url(fonts/inter-latin-wght-normal.woff2) format("woff2"); }

:root {
  /* Palette : rouge Pantone 186 C, bleus de nuit (2765 C / 2220 C), blancs cassés (≈ 4745 C), brique victorienne */
  --encre: #1D1B3F;
  --encre-2: #45476A;
  --gris: #5E6078;
  --trait: #E6DCD2;
  --fond: #F6F1EB;
  --pierre: #EDE3D9;
  --carte: #FFFFFF;
  --rouge: #C8102E;
  --rouge-fonce: #A00D25;
  --rouge-pale: #FBE8EB;
  --nuit: #201A4F;
  --nuit-2: #13294B;
  --nuit-pale: #ECEBF5;
  --brique: #9A4A35;
  --brique-pale: #F5E6DF;
  --bleu: #2E3B8F;
  --bleu-pale: #ECEEF8;
  --or: #B8860B;
  --or-pale: #FAF1DC;
  --vert: #1F7A4D;
  --vert-pale: #E5F4EC;
  --serif: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --rapide: 140ms;
  --moyen: 220ms;
  --tactile: 44px;
  --r: 16px;
  --ombre: 0 1px 2px rgba(32, 26, 79, .06), 0 6px 18px rgba(32, 26, 79, .06);
  --bas: env(safe-area-inset-bottom, 0px);
}
* { 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); }
body.modal-ouverte { overflow: hidden; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .4em; font-weight: 600; }
h1 { font-size: 1.75rem; } h2 { font-size: 1.25rem; } h3 { font-size: 1.05rem; }
p { margin: 0 0 .6em; }
a { color: var(--bleu); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.ico { width: 1.2em; height: 1.2em; flex: none; vertical-align: -.22em; }
.petit { font-size: .85rem; color: var(--gris); }
.surtitre { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--rouge); font-weight: 700; margin-bottom: .3em; display: flex; align-items: center; gap: .35em; }
.erreur { color: var(--rouge); font-weight: 600; }
.message { background: var(--vert-pale); color: var(--vert); padding: .6em .8em; border-radius: 10px; font-weight: 600; }
.centre-texte { text-align: center; }

/* ---------- Structure ---------- */
#app { max-width: 620px; margin: 0 auto; min-height: 100vh; }
.entete { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: calc(env(safe-area-inset-top, 0px) + .6rem) 1rem .6rem; background: var(--encre); color: #fff; }
.marque { display: flex; align-items: center; gap: .6rem; }
.marque b { display: block; font-family: var(--serif); font-size: 1.05rem; }
.marque small { color: #B9C3D6; font-size: .78rem; }
.roundel { width: 38px; height: 38px; }
.roundel.grand { width: 96px; height: 96px; margin-bottom: .5rem; }
.entete-droite { display: flex; align-items: center; gap: .4rem; }
.puce-perso { display: flex; align-items: center; gap: .45rem; background: rgba(255,255,255,.12); border: 0; border-radius: 99px; padding: .25rem .8rem .25rem .25rem; color: #fff; font-weight: 600; }
.btn-ico { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: inherit; }
.entete .btn-ico { background: rgba(255,255,255,.12); }
.btn-ico.tourne .ico { animation: tourne 1s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
#contenu { padding: 1rem 1rem calc(88px + var(--bas)); }
.onglets { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 620px; z-index: 20; display: flex;
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid var(--trait); padding-bottom: var(--bas); }
.onglets button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .55rem 0 .5rem; border: 0; background: none; color: var(--gris); font-size: .7rem; font-weight: 600; }
.onglets button .ico { width: 24px; height: 24px; }
.onglets button.actif { color: var(--rouge); }

.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--c); color: #fff; font-weight: 700; font-size: .85rem; flex: none; }
.avatar.mini { width: 20px; height: 20px; font-size: .65rem; }

.bandeau { display: flex; align-items: center; gap: .5rem; padding: .5rem 1rem; font-size: .85rem; font-weight: 600; }
.bandeau.demo { background: var(--or-pale); color: #7A5B00; }
.bandeau.apercu { background: var(--bleu); color: #fff; }
.bandeau.apercu button { margin-left: auto; background: #fff; color: var(--bleu); border: 0; border-radius: 99px; padding: .2rem .8rem; font-weight: 700; }
.bandeau.horsligne { background: #333; color: #fff; }

/* ---------- Éléments communs ---------- */
.carte { background: var(--carte); border-radius: var(--r); box-shadow: var(--ombre); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.titre-page { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: .2rem 0 .6rem; }
.titre-page h1 { margin: 0; }
.titre-section { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.titre-section h2 { margin: 0; }
h2.section { font-size: 1rem; font-family: var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--gris); margin: 1.2rem 0 .6rem; }
.explication { color: var(--encre-2); font-size: .9rem; display: flex; gap: .5rem; align-items: flex-start; }
.explication .ico { margin-top: .2em; color: var(--gris); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .5rem .85rem; border-radius: 10px; border: 1px solid var(--trait);
  background: #fff; color: var(--encre); font-weight: 600; font-size: .88rem; text-decoration: none; min-height: 40px; }
.btn.primaire { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.btn.discret { border-color: transparent; background: transparent; color: var(--encre-2); padding-inline: .4rem; }
.btn.fantome { border-style: dashed; color: var(--gris); background: transparent; cursor: default; }
.btn.large { width: 100%; min-height: 48px; font-size: 1rem; }
.btn[disabled] { opacity: .6; }
.lien { background: none; border: 0; padding: 0; color: var(--bleu); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; display: inline-flex; align-items: center; gap: .3rem; }
.actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.badges { display: flex; flex-wrap: wrap; gap: .3rem; margin: .1rem 0 .4rem; }
.badge { font-size: .72rem; font-weight: 700; padding: .15rem .5rem; border-radius: 99px; background: #F1EEE8; color: var(--encre-2); display: inline-flex; align-items: center; gap: .25rem; }
.badge .ico { width: .9em; height: .9em; }
.badge.fort { background: var(--or-pale); color: #7A5B00; }
.badge.gratuit { background: var(--vert-pale); color: var(--vert); }
.badge.reserve { background: var(--bleu-pale); color: var(--bleu); }
.badge.ferme { background: var(--rouge-pale); color: var(--rouge); }
.ligne { display: inline-block; background: var(--bg); color: var(--fg); font-size: .72rem; font-weight: 700; padding: .1rem .5rem; border-radius: 4px; margin-right: .25rem; white-space: nowrap; }
.coches { padding-left: 1.2rem; margin: .3rem 0; }
.coches li { margin-bottom: .45rem; }
.vide { text-align: center; color: var(--gris); padding: 2rem 1rem; }
.vide .ico { width: 40px; height: 40px; opacity: .5; }
.spinner { width: 32px; height: 32px; margin: 0 auto 1rem; border: 3px solid var(--trait); border-top-color: var(--rouge); border-radius: 50%; animation: tourne .8s linear infinite; }

.bascule { display: inline-flex; background: #EFEAE1; border-radius: 99px; padding: 3px; }
.bascule button { border: 0; background: transparent; border-radius: 99px; padding: .3rem .8rem; font-size: .82rem; font-weight: 600; color: var(--encre-2); display: inline-flex; align-items: center; gap: .3rem; }
.bascule button.actif { background: #fff; color: var(--encre); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.bascule.large { display: flex; margin: .2rem 0 .8rem; }
.bascule.large button { flex: 1; justify-content: center; padding: .5rem .4rem; }
.bascule.defile { overflow-x: auto; }

/* ---------- Programme ---------- */
.jours { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .4rem; margin-bottom: .6rem; scrollbar-width: none; align-items: center; }
.jours button { flex: none; border: 1px solid var(--trait); background: #fff; border-radius: 99px; padding: .4rem .9rem; font-weight: 600; font-size: .88rem; text-transform: capitalize; }
.jours button.actif { background: var(--encre); color: #fff; border-color: var(--encre); }
.jour-verrou { flex: none; font-size: .78rem; color: var(--gris); display: inline-flex; gap: .3rem; align-items: center; padding: 0 .4rem; }
.annonce { display: flex; gap: .6rem; background: var(--bleu); color: #fff; border-radius: var(--r); padding: .8rem 1rem; margin-bottom: 1rem; }
.annonce p { margin: 0; font-weight: 600; }
.bandeau-demain { width: 100%; display: flex; align-items: center; gap: .5rem; background: var(--or-pale); color: #6B4E00; border: 0; border-radius: var(--r); padding: .7rem 1rem; font-weight: 700; margin-bottom: 1rem; }
.bandeau-demain .ico:last-child { margin-left: auto; }

.maintenant { background: var(--encre); color: #fff; border-radius: var(--r); padding: 1rem 1.1rem; margin-bottom: 1rem; display: grid; gap: .9rem; }
.maintenant .surtitre { color: #FF8C9C; }
.maintenant h2, .maintenant h3 { color: #fff; margin: 0 0 .3rem; }
.maintenant .ensuite { border-top: 1px solid rgba(255,255,255,.15); padding-top: .8rem; }
.maintenant > div:first-child.ensuite { border: 0; padding: 0; }
.maintenant .trajet { color: #CFD6E4; font-size: .88rem; }
.maintenant .btn { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.2); }
.maintenant .btn.primaire { background: var(--rouge); border-color: var(--rouge); }

.resume h2 { font-size: 1.4rem; }
.resume .intro { font-family: var(--serif); font-size: 1.08rem; color: var(--encre-2); }
.resume .depart { display: flex; gap: .4rem; align-items: center; font-weight: 600; font-size: .9rem; background: #F6F2EA; border-radius: 10px; padding: .5rem .7rem; }
.resume-liste { list-style: none; padding: 0; margin: .8rem 0; }
.resume-liste li { display: grid; grid-template-columns: 3.4rem 1fr; gap: .5rem; padding: .55rem 0; border-top: 1px solid var(--trait); }
.resume-liste li:first-child { border-top: 0; }
.resume-liste .h { font-weight: 700; color: var(--rouge); font-variant-numeric: tabular-nums; }
.resume-liste b { display: inline; }
.resume-liste li.fort b { color: #7A5B00; }
.resume-liste li.fort b::after { content: " ★"; }
.resume-liste .accroche { display: block; color: var(--encre-2); font-size: .88rem; font-style: italic; }
.resume-liste .avec { display: block; color: var(--gris); font-size: .8rem; }
.resume-liste .lien { font-size: .82rem; margin-top: .2rem; }
.mini .ico { width: .95em; height: .95em; color: var(--rouge); }
.attention { background: var(--rouge-pale); border-radius: 10px; padding: .6rem .8rem; margin: .6rem 0; }
.attention p { font-weight: 700; color: var(--rouge); margin: 0 0 .3rem; display: flex; gap: .35rem; align-items: center; }
.attention ul { margin: 0; padding-left: 1.1rem; font-size: .88rem; }
.attention li { margin-bottom: .25rem; }
.pendant { margin: .6rem 0; font-size: .9rem; }
.pendant summary { font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: .4rem; }
.pendant ul { padding-left: 1.1rem; margin: .4rem 0 0; }
.anecdote { background: var(--or-pale); border-radius: 10px; padding: .7rem .85rem; margin-top: .6rem; font-size: .92rem; }
.anecdote .surtitre { color: #8A6500; }
.anecdote p:last-child { margin-bottom: 0; }
.soir { margin: .6rem 0 0; font-size: .9rem; color: var(--encre-2); font-style: italic; }

.deroule { margin-top: 1.4rem; }
.deroule .sous-titre { color: var(--gris); margin: .2rem 0 .8rem; }
.etape { display: grid; grid-template-columns: 3.6rem 1fr; gap: .2rem .7rem; background: var(--carte); border-radius: var(--r); box-shadow: var(--ombre); padding: .85rem .9rem; margin-bottom: .6rem; border-left: 4px solid transparent; }
.etape-heure { display: flex; flex-direction: column; align-items: flex-start; }
.etape-heure b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.etape-heure small { font-size: .7rem; color: var(--gris); }
.etape-heure .pastille { margin-top: .3rem; background: var(--rouge); color: #fff; font-size: .65rem; font-weight: 700; padding: .1rem .4rem; border-radius: 99px; }
.etape h3 { margin: 0 0 .25rem; font-size: 1.02rem; }
.etape .qui { display: flex; align-items: center; gap: .2rem; font-size: .82rem; color: var(--encre-2); margin-bottom: .35rem; flex-wrap: wrap; }
.etape .qui span:last-child { margin-left: .3rem; }
.etape .trajet { font-size: .85rem; color: var(--encre-2); margin-bottom: .3rem; }
.etape .note { font-size: .88rem; color: var(--encre-2); margin: 0; }
.etape.en-cours { border-left-color: var(--rouge); }
.etape.passee { opacity: .55; }
.etape.est-fort { background: linear-gradient(0deg, #fff, #fff) padding-box, linear-gradient(135deg, #E9C46A, #C8102E) border-box; border-left: 4px solid #E9C46A; }
.etape.pas-moi { background: #F6F3ED; box-shadow: none; }
.parallele { border: 2px dashed var(--trait); border-radius: calc(var(--r) + 4px); padding: .5rem .5rem 0; margin-bottom: .6rem; }
.parallele-titre { font-size: .78rem; font-weight: 700; color: var(--gris); text-transform: uppercase; letter-spacing: .05em; display: flex; gap: .3rem; align-items: center; margin: 0 .3rem .5rem; }
.secret { display: flex; gap: .5rem; background: var(--encre); color: #fff; border-radius: 10px; padding: .6rem .75rem; margin-top: .5rem; font-size: .88rem; }
.secret p { margin: 0; white-space: pre-wrap; }
.bouton-large { display: flex; width: 100%; align-items: center; gap: .8rem; border: 0; text-align: left; }
.bouton-large > .ico:first-child { width: 28px; height: 28px; color: var(--rouge); }
.bouton-large span { flex: 1; display: flex; flex-direction: column; }
.bouton-large small { color: var(--gris); }

.hero { text-align: center; padding: 1.5rem 1rem; }
.hero h1 { font-size: 3.4rem; margin: .1rem 0 .4rem; color: var(--rouge); }
.hero .surtitre { justify-content: center; }
.hero .petit { display: inline-flex; gap: .4rem; text-align: left; max-width: 30rem; }

/* ---------- Billets ---------- */
.billet-carte { display: flex; align-items: center; gap: .8rem; background: var(--carte); border-radius: var(--r); box-shadow: var(--ombre); padding: .8rem .9rem; margin-bottom: .6rem; }
.billet-gauche { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #F1EEE8; color: var(--gris); flex: none; }
.billet-carte.dispo .billet-gauche { background: var(--rouge); color: #fff; }
.billet-carte.manque { opacity: .75; box-shadow: none; border: 1px dashed var(--trait); }
.billet-corps { flex: 1; min-width: 0; }
.billet-corps h3 { margin: 0 0 .15rem; font-size: 1rem; }
.billet-corps p:not(.surtitre) { margin: 0; font-size: .85rem; color: var(--gris); }
.billet-corps .surtitre { text-transform: none; letter-spacing: 0; }
.passes summary { font-weight: 600; color: var(--gris); margin: 1rem 0 .6rem; cursor: pointer; }

/* ---------- Trajets ---------- */
.statuts { list-style: none; padding: 0; margin: .6rem 0; }
.statuts li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .45rem 0; border-top: 1px solid var(--trait); }
.statuts li:first-child { border-top: 0; }
.statuts .ligne { min-width: 8.5rem; text-align: center; padding: .25rem .5rem; font-size: .8rem; }
.statuts .statut { font-weight: 600; font-size: .9rem; }
.statuts .statut::before { content: ""; display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .4rem; background: var(--vert); }
.statuts .niveau-moyen .statut::before { background: #E09B00; }
.statuts .niveau-grave .statut::before { background: var(--rouge); }
.statuts .niveau-grave .statut { color: var(--rouge); }
.statuts details { width: 100%; font-size: .82rem; color: var(--encre-2); }
.statuts summary { cursor: pointer; color: var(--bleu); }
.trajets { list-style: none; padding: 0; margin: 0; }
.trajets li { display: grid; grid-template-columns: 3.2rem 1fr; gap: .5rem; padding: .7rem 0; border-top: 1px solid var(--trait); }
.trajets li:first-child { border-top: 0; }
.trajets .h { font-weight: 700; color: var(--rouge); }
.trajets .trajet { font-size: .88rem; color: var(--encre-2); margin: .2rem 0 0; }
.liens-grille { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.liens-grille a { display: flex; gap: .5rem; align-items: flex-start; background: #F6F2EA; border-radius: 10px; padding: .7rem; text-decoration: none; color: var(--encre); font-weight: 600; font-size: .88rem; }
.liens-grille a span { display: flex; flex-direction: column; }
.liens-grille small { font-weight: 400; color: var(--gris); font-size: .75rem; }
.liens-grille .ico { color: var(--bleu); }

/* ---------- Dépenses ---------- */
.solde-perso .grand { font-family: var(--serif); font-size: 1.35rem; margin: 0 0 .3rem; }
.positif { color: var(--vert); font-weight: 700; }
.negatif { color: var(--rouge); font-weight: 700; }
.virements { list-style: none; padding: 0; margin: 0 0 .5rem; }
.virements li { display: flex; align-items: center; gap: .4rem; padding: .5rem 0; border-top: 1px solid var(--trait); }
.virements li:first-child { border-top: 0; }
.virements b { margin-left: auto; }
.virements .ico { color: var(--gris); }
.soldes summary { font-weight: 600; cursor: pointer; }
.soldes table { width: 100%; border-collapse: collapse; margin: .6rem 0; font-size: .88rem; }
.soldes th, .soldes td { text-align: right; padding: .35rem .2rem; border-bottom: 1px solid var(--trait); }
.soldes th:first-child, .soldes td:first-child { text-align: left; }
.soldes td:first-child { display: flex; gap: .4rem; align-items: center; }
.depenses { list-style: none; padding: 0; margin: 0; }
.depenses li { background: var(--carte); border-radius: var(--r); box-shadow: var(--ombre); padding: .75rem .9rem; margin-bottom: .5rem; }
.dep-ligne { display: flex; justify-content: space-between; gap: .6rem; }
.montant { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.depenses .petit { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; margin: .2rem 0 0; }
.depenses .actions { margin-top: .2rem; }

/* ---------- Manger ---------- */
.filtres { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin-bottom: .8rem; }
.filtres label { display: flex; flex-direction: column; font-size: .78rem; color: var(--gris); font-weight: 600; }
.filtres select { margin-top: .2rem; }
.filtres .case { flex-direction: row; align-items: center; gap: .35rem; font-size: .9rem; color: var(--encre); padding-bottom: .5rem; }
.restos { list-style: none; padding: 0; margin: 0; }
.resto { background: var(--carte); border-radius: var(--r); box-shadow: var(--ombre); padding: .85rem .95rem; margin-bottom: .6rem; }
.resto-tete { display: flex; justify-content: space-between; gap: .6rem; align-items: baseline; }
.resto h3 { margin: 0; }
.resto .note { white-space: nowrap; font-weight: 700; color: #8A6500; display: inline-flex; align-items: center; gap: .2rem; }
.resto .note .ico { fill: #E9B949; stroke: #C79A2A; }
.resto .petit { margin: .2rem 0; }
.attribution { text-align: right; font-size: .75rem; color: var(--gris); }

/* ---------- Formulaires ---------- */
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .7rem; }
input:not([type=checkbox]):not([type=radio]), select, textarea { display: block; width: 100%; margin-top: .3rem; padding: .65rem .75rem; border: 1px solid #D9D1C3; border-radius: 10px; background: #fff; font-size: 1rem; }
.filtres select { width: auto; padding: .4rem .5rem; font-size: .9rem; }
textarea { resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0 0 .7rem; }
legend { font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
.rangee { display: flex; gap: .6rem; align-items: flex-end; }
.grandit { flex: 1; }
.devise { display: flex; gap: .3rem; margin-bottom: .7rem; }
.devise label { margin: 0; }
.devise input { position: absolute; opacity: 0; }
.devise span { display: grid; place-items: center; width: 48px; height: 46px; border: 1px solid #D9D1C3; border-radius: 10px; font-weight: 700; font-size: 1.1rem; background: #fff; }
.devise input:checked + span { background: var(--encre); color: #fff; border-color: var(--encre); }
.conversion { margin-top: -.5rem; min-height: 1.2em; }
.choix-personnes { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .35rem; }
.choix-personnes label { display: flex; align-items: center; gap: .4rem; margin: 0; padding: .45rem .5rem; border: 1px solid var(--trait); border-radius: 10px; font-weight: 500; background: #fff; }
.choix-personnes input { accent-color: var(--rouge); }
.choix-personnes label:has(input:checked) { border-color: var(--rouge); background: var(--rouge-pale); }
.raccourcis { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .5rem; }
.raccourcis button { border: 1px solid var(--trait); background: #F6F2EA; border-radius: 99px; padding: .25rem .7rem; font-size: .8rem; font-weight: 600; }
.case { display: flex; align-items: center; gap: .4rem; }
.pile { display: flex; flex-direction: column; }
.pile > .btn { margin-top: .3rem; }
.encadre { border: 1px solid var(--trait); border-radius: var(--r); padding: .9rem; margin-top: .8rem; }
.depot { display: flex; align-items: center; justify-content: center; gap: .5rem; border: 2px dashed #D9D1C3; border-radius: var(--r); padding: 1.1rem; text-align: center; color: var(--encre-2); cursor: pointer; background: #fff; }
.depot input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; margin: .6rem 0; }
.pages figure { margin: 0; background: #fff; border: 1px solid var(--trait); border-radius: 10px; padding: .4rem; }
.pages img { width: 100%; height: 150px; object-fit: contain; background: #f4f4f4; border-radius: 6px; }
.pages figcaption small { display: block; color: var(--gris); font-size: .7rem; margin: .2rem 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pages select { padding: .35rem; font-size: .85rem; }
.liste-admin { list-style: none; padding: 0; margin: .3rem 0; }
.liste-admin li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .45rem 0; border-top: 1px solid var(--trait); font-size: .88rem; }

/* ---------- Fenêtres ---------- */
#modal .voile { position: fixed; inset: 0; background: rgba(11, 31, 58, .45); z-index: 40; }
.fenetre { position: fixed; z-index: 41; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 620px; max-height: 92vh; overflow-y: auto;
  background: var(--fond); border-radius: 20px 20px 0 0; padding: 1.1rem 1.1rem calc(1.2rem + var(--bas)); animation: monte .2s ease-out; }
@keyframes monte { from { transform: translate(-50%, 30px); opacity: .4; } }
.fenetre.plein { top: 0; max-height: none; border-radius: 0; background: #fff; padding-top: calc(env(safe-area-inset-top, 0px) + .6rem); }
.feuille-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: .6rem; margin-bottom: .6rem; }
.feuille-tete h2 { margin: 0; }
.feuille-tete .btn-ico { background: #EFEAE1; flex: none; }
.guide p { font-size: .98rem; }
.accroche-guide { font-family: var(--serif); font-size: 1.15rem !important; font-style: italic; color: var(--encre-2); }
.guide h3 { margin-top: 1rem; }
.pratique { display: flex; gap: .4rem; background: var(--bleu-pale); color: var(--encre); padding: .6rem .75rem; border-radius: 10px; font-size: .9rem !important; margin-top: .8rem; }
.liste-lieux, .liste-personnes { list-style: none; padding: 0; margin: 0 0 1rem; }
.liste-lieux button, .liste-personnes button { display: flex; width: 100%; align-items: center; gap: .6rem; text-align: left; background: #fff; border: 1px solid var(--trait); border-radius: 12px; padding: .7rem .8rem; margin-bottom: .4rem; }
.liste-lieux button { display: grid; grid-template-columns: 1fr auto; }
.liste-lieux small { grid-column: 1; color: var(--gris); }
.liste-lieux .ico { grid-row: 1 / span 2; grid-column: 2; }
.liste-personnes button.actif { border-color: var(--rouge); background: var(--rouge-pale); font-weight: 700; }
.billet-vue img { display: block; width: 100%; max-width: 560px; margin: .6rem auto; border: 1px solid #eee; }
.billet-vue-tete { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.billet-vue-tete > div { display: flex; align-items: center; gap: .6rem; }
.billet-vue-tete b { display: block; font-size: 1.1rem; }
.billet-vue-tete small { color: var(--gris); }
.admin h3 { margin-top: 1rem; }

/* ---------- Écrans d'accueil ---------- */
.centre { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 2rem 1.4rem; max-width: 420px; margin: 0 auto; }
.centre .pile, .centre form { width: 100%; text-align: left; }
.centre .btn.large { margin-bottom: .5rem; }
.centre.chargement { color: var(--gris); }
.connexion .sous-titre { color: var(--gris); margin-bottom: 1.4rem; }
.google .ico { width: 20px; height: 20px; }
.ou { width: 100%; display: flex; align-items: center; gap: .6rem; color: var(--gris); font-size: .85rem; margin: .8rem 0; }
.ou::before, .ou::after { content: ""; flex: 1; height: 1px; background: var(--trait); }
.discret { opacity: .8; }
.installation .depot { width: 100%; margin-top: 1rem; }

@media (min-width: 621px) {
  #app { box-shadow: 0 0 0 1px var(--trait); background: var(--fond); }
  body { background: #EFE9DF; }
}


/* =================== Version 2 : en-tête, frise, carte =================== */
.entete { background: linear-gradient(135deg, var(--nuit) 0%, var(--nuit-2) 100%); }
.marque { gap: .55rem; }
.marque-ico { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.marque b { font-size: 1.12rem; letter-spacing: .01em; }

/* Sélecteur de jours : aujourd'hui d'abord, jours passés dans un menu */
.jours { position: relative; overflow: visible; flex-wrap: nowrap; }
.jours button.passe { background: var(--brique); border-color: var(--brique); }
.menu-passes { position: relative; flex: none; }
.menu-passes summary { list-style: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #fff; border: 1px solid var(--trait); color: var(--encre-2); cursor: pointer; }
.menu-passes summary::-webkit-details-marker { display: none; }
.menu-liste { position: absolute; left: 0; top: 44px; z-index: 15; background: #fff; border-radius: 14px; box-shadow: 0 10px 30px rgba(32,26,79,.18); padding: .4rem; min-width: 220px; }
.menu-liste p { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--gris); margin: .3rem .6rem; font-weight: 700; }
.menu-liste button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: .55rem .6rem; border-radius: 10px; text-transform: capitalize; font-weight: 600; }
.menu-liste button:hover { background: var(--pierre); }

/* Illustrations */
.vignette { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--trait); flex: none; }
.vignette img { width: 30px; height: 30px; object-fit: contain; }
.vignette.grande { width: 64px; height: 64px; box-shadow: none; }
.vignette.grande img { width: 42px; height: 42px; }
.vignette.petite { width: 34px; height: 34px; }
.vignette.petite img { width: 22px; height: 22px; }

/* En ce moment (rouge) et Ensuite (bleu nuit) : deux cartes distinctes */
.maintenant { display: flex; gap: .9rem; align-items: flex-start; background: var(--rouge); color: #fff; margin-bottom: .8rem; box-shadow: 0 8px 22px rgba(200,16,46,.28); }
.maintenant .surtitre { color: #FFE3E8; }
.maintenant h2 { font-size: 1.35rem; }
.maintenant-note { color: #FFE9EC; font-size: .9rem; margin: .2rem 0 0; }
.maintenant .btn { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.3); color: #fff; }
.maintenant .btn.primaire { background: #fff; color: var(--rouge); border-color: #fff; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #fff; display: inline-block; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; transform: scale(.7); } }
.ensuite { background: #fff; border-radius: var(--r); box-shadow: var(--ombre); border-top: 5px solid var(--nuit); padding: .9rem 1rem 1rem; margin-bottom: 1.2rem; }
.ensuite-quand { display: flex; align-items: baseline; gap: .5rem; margin-bottom: .55rem; }
.ensuite-quand span { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--nuit); background: var(--nuit-pale); padding: .15rem .5rem; border-radius: 6px; }
.ensuite-quand b { font-size: 1.25rem; color: var(--nuit); }
.ensuite-quand small { color: var(--gris); font-weight: 600; }
.ensuite-corps { display: flex; gap: .75rem; align-items: center; }
.ensuite-corps h3 { margin: 0 0 .15rem; }
.ensuite-corps .trajet { font-size: .85rem; color: var(--encre-2); margin: 0; }

/* Résumé */
.resume-liste li { grid-template-columns: 34px 3.1rem 1fr; align-items: start; }

/* Frise du programme */
.deroule { position: relative; }
.etape { grid-template-columns: 52px 1fr; gap: .2rem .8rem; position: relative; padding: .85rem .9rem .85rem .7rem; }
.etape-rail { position: relative; display: flex; justify-content: center; }
.etape .etape-heure { display: flex; align-items: center; gap: .45rem; margin: 0 0 .1rem; flex-direction: row; }
.etape .etape-heure b { font-size: 1.15rem; color: var(--rouge); letter-spacing: .01em; }
.etape .etape-heure small { color: var(--gris); font-size: .75rem; }
.etape .etape-heure .pastille { margin: 0; }
.pastille.fini { background: var(--pierre); color: var(--gris); }
.etape h3 { font-size: 1.08rem; }
.etape.en-cours { border-left: 0; box-shadow: 0 0 0 2px var(--rouge), var(--ombre); }
.etape.passee { opacity: .5; }
.etape.passee .vignette { filter: grayscale(1); }
.etape.est-fort .vignette { box-shadow: 0 0 0 2px #E9B949; background: var(--or-pale); }

/* Trajets : logo du métro */
.titre-metro { display: flex; align-items: center; gap: .55rem; }
.logo-metro { height: 30px; width: auto; }

/* Carte */
.carte-zone { position: relative; border-radius: var(--r); overflow: hidden; box-shadow: var(--ombre); margin-bottom: .7rem; background: var(--pierre); }
#carte { height: 52vh; min-height: 300px; }
.carte-etat { position: absolute; left: .6rem; right: .6rem; bottom: .6rem; z-index: 500; background: rgba(255,255,255,.95); padding: .45rem .7rem; border-radius: 10px; font-size: .85rem; margin: 0; }
.carte-vide { padding: 3rem 1rem; text-align: center; color: var(--gris); }
.calques { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .6rem; }
.calques button { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--trait); background: #fff; border-radius: 99px; padding: .4rem .8rem; font-weight: 600; font-size: .85rem; color: var(--gris); min-height: 38px; }
.calques button.actif { color: var(--encre); border-color: var(--encre); }
.calques button:not(.actif) .point { opacity: .35; }
.point, .pin-point { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.pin-point { width: 18px; height: 18px; box-shadow: 0 2px 5px rgba(0,0,0,.35); }
.p-visite { background: var(--rouge); }
.p-manger { background: #E07B00; }
.p-wc { background: #2F6BFF; }
.p-pharma { background: var(--vert); }
.pin-lieu { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(32,26,79,.35); border: 2px solid #fff; }
.pin-lieu img { width: 26px; height: 26px; object-fit: contain; }
.pin-lieu.du-jour { border-color: var(--rouge); width: 46px; height: 46px; }
.pin-lieu.maison { border-color: var(--nuit); }
.leaflet-popup-content { font: 14px/1.45 var(--sans); color: var(--encre); margin: .7rem .9rem; }
.leaflet-popup-content b { font-family: var(--serif); font-size: 1rem; }
.popup-actions { display: flex; gap: .3rem; margin-top: .5rem; flex-wrap: wrap; }
.popup-actions .btn { min-height: 34px; padding: .3rem .6rem; font-size: .8rem; }
.leaflet-container a.btn { color: var(--encre); }
.carte-zone { isolation: isolate; z-index: 0; }
.entete, .onglets { z-index: 1000; }
#modal .voile { z-index: 2000; }
.fenetre { z-index: 2001; }
.jour-verrou { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 0 1 auto; }


/* =================== Finition (revue UI/UX) =================== */
html { color-scheme: light; }
body { font-size: 17px; line-height: 1.55; font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { letter-spacing: -.005em; }
h1 { font-size: 1.9rem; font-weight: 700; }
h2 { font-size: 1.32rem; }
h3 { font-size: 1.08rem; }
.etape h3, .ensuite-corps h3, .billet-corps h3, .resto h3 { font-family: var(--sans); font-weight: 700; letter-spacing: -.01em; }
.surtitre { font-size: .78rem; }
.petit { font-size: .9rem; }
.badge, .ligne { font-size: .78rem; }
.etape .note, .etape .trajet, .etape .qui { font-size: .92rem; }

/* En-tête : titre sur une ligne */
.marque b { font-family: var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: clamp(1rem, 4.6vw, 1.2rem); }
.marque { min-width: 0; }
.puce-perso { flex: none; min-height: var(--tactile); }
.entete .btn-ico { width: var(--tactile); height: var(--tactile); }

/* Cibles tactiles >= 44 px et retour visuel au toucher */
.btn, .jours button, .calques button, .bascule button, .raccourcis button, .liste-lieux button, .liste-personnes button, .menu-passes summary { min-height: var(--tactile); }
.menu-passes summary { width: var(--tactile); height: var(--tactile); }
.btn-ico { min-width: var(--tactile); min-height: var(--tactile); }
button, .btn, a.btn, summary { transition: background-color var(--rapide) ease, opacity var(--rapide) ease, box-shadow var(--rapide) ease, color var(--rapide) ease; -webkit-tap-highlight-color: transparent; }
button:active, .btn:active, summary:active { opacity: .72; }
.onglets button:active { opacity: .6; }
:focus-visible { outline: 3px solid var(--bleu); outline-offset: 2px; border-radius: 8px; }
.maintenant :focus-visible, .entete :focus-visible { outline-color: #fff; }

/* Cartes : hiérarchie et respiration */
.carte, .etape, .ensuite, .billet-carte, .resto, .depenses li { border: 1px solid rgba(32,26,79,.05); }
.resume { border-top: 5px solid var(--rouge); }
.resume .intro { font-family: var(--serif); font-size: 1.12rem; line-height: 1.5; }
.deroule .titre-section h2 { font-size: 1.5rem; }
.titre-page h1 { font-size: 2rem; }
.jours button { padding: .45rem 1rem; }
.jours button.actif { background: var(--nuit); border-color: var(--nuit); }
.menu-liste button { text-transform: none; }
.menu-liste button::first-letter { text-transform: uppercase; }
.onglets button { font-size: .75rem; min-height: 58px; }
.onglets button.actif { color: var(--rouge); }
.onglets button.actif .ico { stroke-width: 2.2; }
h2.section { font-size: .82rem; letter-spacing: .1em; }

/* Billet : plein écran lisible */
.billet-vue-tete b { font-family: var(--serif); font-size: 1.25rem; }

/* Mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
.roundel { width: 40px; height: 40px; object-fit: contain; }
.roundel.grand { width: 104px; height: 104px; }
/* Ajustements après revue des captures */
.entete { gap: .4rem; padding-left: .8rem; padding-right: .8rem; }
.marque-ico { width: 28px; height: 28px; }
.marque b { font-size: clamp(.98rem, 4.3vw, 1.2rem); }
.puce-perso { padding: .2rem .65rem .2rem .2rem; font-size: .88rem; gap: .35rem; }
.entete-droite { gap: .3rem; flex: none; }
.resume-liste li { grid-template-columns: 34px 3.7rem 1fr; }
.titre-page h1 { font-size: 1.75rem; }
.titre-page .btn { white-space: nowrap; flex: none; }
