/* ===== LevelPlan V12 · priorité à l'espace utile =====
   Hiérarchie : agenda et événements → tâches et actions rapides → objectifs → Orbe → progression et décor.
   Mêmes jetons de couleur que le reste de l'app (contraste déjà vérifié pour 7 thèmes × 2 modes) :
   aucune teinte de texte nouvelle. */

/* ---------- barre du haut compacte (44 px sur téléphone, 48 px sur ordinateur) ---------- */
:root { --top-h: 44px; }
@media (min-width: 1024px) { :root { --top-h: 48px; } }
.topbar { gap: 8px; padding-left: calc(10px + var(--safe-l)); padding-right: calc(8px + var(--safe-r)); box-shadow: none; }
.topbar .acts { gap: 2px; }
.topbar .ibtn { width: 40px; height: 40px; }
.topbar .ibtn svg { width: 20px; height: 20px; }
.lvchip { display: inline-flex; align-items: center; gap: 8px; height: 34px; min-width: 44px; padding: 0 12px 0 3px; border-radius: 99px; background: var(--s1); border: 1px solid var(--line); color: var(--tx); flex: none; position: relative; }
.lvchip:hover { border-color: var(--line2); }
.lvchip:active { background: var(--s2); }
.lvchip .av { width: 28px; height: 28px; border-radius: 50%; overflow: hidden; background: var(--s2); border: 1px solid var(--acline); display: grid; place-items: center; font-size: 13px; font-weight: 750; color: var(--acs); flex: none; }
.lvchip .av svg { width: 100%; height: 100%; display: block; }
.lvtx { display: flex; flex-direction: column; justify-content: center; gap: 3px; line-height: 1; }
.lvtx b { font-size: 12.5px; font-weight: 700; letter-spacing: .01em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lvbar { display: block; width: 46px; height: 4px; border-radius: 2px; background: var(--s3); overflow: hidden; }
.lvbar i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--ac2), var(--acs)); }
.lvchip.gift::after { content: ""; position: absolute; top: 2px; right: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--ac); box-shadow: 0 0 0 2px var(--bg); }
[data-exp="essentiel"] .lvbar { display: none; }
.tbctx { flex: 1; min-width: 0; display: flex; justify-content: center; gap: 6px; overflow: hidden; }
.tbpill { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 99px; background: var(--s1); border: 1px solid var(--line); font-size: 12px; font-weight: 650; color: var(--tx2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbpill svg { width: 14px; height: 14px; flex: none; }
.tbpill.focus { color: var(--vgs); border-color: color-mix(in srgb, var(--vg) 40%, transparent); }
.tbpill.off { color: var(--warn); }
.tbpill.sim { color: var(--acs); border-color: var(--acline); background: var(--acbg); }
@media (max-width: 360px) { .tbpill span { display: none; } .tbpill { padding: 0 8px; } }

/* ---------- feuille « Ma progression » ---------- */
.lvhead { display: flex; align-items: center; gap: 12px; margin: 6px 0 12px; }
.lvav { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: var(--s2); border: 1px solid var(--acline); flex: none; }
.lvav svg { width: 100%; height: 100%; display: block; }
.lvname { display: block; font-family: var(--font-d); font-size: 20px; font-weight: 500; }
.lvrank { font-size: 13px; color: var(--tx2); }
.lvxp { height: 6px; }
.lvxpt { display: flex; justify-content: space-between; gap: 10px; margin: 6px 0 12px; font-size: 12.5px; color: var(--mu); }
.lvgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin: 0 0 12px; }
.lvgrid div { padding: 10px 12px; border-radius: var(--r-m); background: var(--s1); border: 1px solid var(--line); }
.lvgrid dt { font-size: 11.5px; color: var(--mu); margin: 0 0 2px; }
.lvgrid dd { margin: 0; font-size: 17px; font-weight: 650; }
.lvgrid dd small { font-size: 11.5px; font-weight: 500; color: var(--mu); }
.lvquests { display: grid; gap: 8px; margin-bottom: 12px; }

/* ---------- Aujourd'hui : en-tête compact et frise de la journée ---------- */
.tday { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin: 8px 2px 10px; }
.tday .greet { margin: 0 0 2px; font-size: 13px; color: var(--mu); }
.tday .pagetitle { margin: 0; font-size: 26px; line-height: 1.1; }
.tdsum { margin: 0 0 3px; font-size: 12.5px; color: var(--tx2); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.daybar { display: block; width: 100%; padding: 8px 10px 4px; margin: 0 0 14px; border-radius: var(--r-l); background: var(--s1); border: 1px solid var(--line); text-align: left; }
.daybar:hover { border-color: var(--line2); }
.db-row { display: block; position: relative; height: 18px; border-radius: 4px; background: repeating-linear-gradient(90deg, var(--grid2) 0 1px, transparent 1px 12.5%); }
.db-b { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: color-mix(in srgb, var(--c) 70%, var(--bg)); box-shadow: 0 0 0 1px var(--bg); }
.db-b.dn { opacity: .45; }
.db-b.now { box-shadow: 0 0 0 1.5px var(--vg); }
.db-now { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ko); }
.db-ax { display: block; position: relative; height: 15px; margin-top: 2px; }
.db-ax span { position: absolute; transform: translateX(-50%); font-size: 10.5px; color: var(--mu2); font-variant-numeric: tabular-nums; }
.db-ax span:first-child { transform: none; }
.db-ax span:last-child { transform: translateX(-100%); }
.toolrow { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 4px; }
.tchip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 99px; background: var(--s1); border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--tx2); }
.tchip svg { width: 15px; height: 15px; color: var(--acs); }
.tchip:hover { border-color: var(--line2); color: var(--tx); }
/* les blocs de l'écran se rapprochent : la journée tient sur le premier écran */
#v-today .blk { margin-top: 0; }
#v-today .blk .sech { margin-bottom: 8px; }
#v-today .nowcard .nowtitle { font-size: 20px; }

/* ---------- Agenda : en-tête et bande de la semaine resserrés ---------- */
.aghead { padding-bottom: 2px; border-bottom: 0; margin-bottom: 0; }
.agtop { min-height: 40px; margin: 0 0 2px; gap: 4px; }
.agtitle { font-size: 20px; }
.agtbtn { padding: 4px 4px 4px 2px; }
.agvbtn { height: 34px; padding: 0 8px 0 10px; }
.agadd { width: 34px; height: 34px; }
.agzoom { display: inline-flex; gap: 0; }
.agzoom .ibtn { width: 34px; height: 34px; color: var(--tx2); }
.agzoom .ibtn svg { width: 18px; height: 18px; }
.agzoom .ibtn:disabled { opacity: .35; }
@media (max-width: 420px) { .agzoom { display: none; } .agvbtn span { display: none; } .agvbtn { padding: 0 6px 0 8px; } }
.wsd { gap: 1px; padding: 0 0 2px; }
.wsd .wdn { font-size: 10.5px; }
.wsd b { width: 32px; height: 32px; font-size: 15.5px; }
.wdots { height: 4px; gap: 2px; }
.wdots i { width: 4px; height: 4px; }
.agsugg { gap: 6px; padding: 3px 3px 3px 10px; margin: 2px 0 6px; border-radius: 99px; min-height: 36px; }
.agsugg p { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; overflow: hidden; }
.agsugg p b { display: inline; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.agsugg p span { display: inline; font-size: 12px; flex: none; }
.agsugg .sgk { font-size: 10.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--vgs); flex: none; }
.agsugg .sbtn { align-items: center; }
.agsugg .btn.xs { min-height: 30px; border-radius: 99px; }
.ibtn.sm { width: 30px; height: 30px; }
.ibtn.sm svg { width: 15px; height: 15px; }
.evb-rec { display: inline-flex; vertical-align: -1px; margin-right: 3px; opacity: .8; }
.evb-rec svg { width: 11px; height: 11px; }
.tl { transition: none; will-change: auto; }
.tray { min-height: 0; }

/* ---------- répétition dans le formulaire d'événement ---------- */
.repbox { display: grid; gap: 8px; margin-top: 6px; padding: 10px 12px; border-radius: var(--r-m); background: var(--s1); border: 1px solid var(--line); }
.repdays { display: flex; flex-wrap: wrap; gap: 4px; }
.repdays button { min-width: 40px; min-height: 36px; padding: 0 8px; border-radius: 99px; border: 1px solid var(--line2); background: var(--bg2); font-size: 12.5px; font-weight: 650; color: var(--tx2); }
.repdays button[aria-pressed=true] { background: var(--vgbg); border-color: var(--vg); color: var(--tx); }
.repsum { font-size: 12.5px; color: var(--tx2); }
.scope { display: grid; gap: 6px; margin: 10px 0; }
.scope button { display: block; width: 100%; text-align: left; padding: 12px 14px; border-radius: var(--r-l); border: 1px solid var(--line2); background: var(--s1); }
.scope button b { display: block; font-size: 14.5px; }
.scope button span { display: block; font-size: 12.5px; color: var(--tx2); }
.scope button:hover { border-color: var(--acline); }
.serieschip { display: inline-flex; align-items: center; gap: 5px; }
.serieschip svg { width: 13px; height: 13px; }

/* ---------- ajout rapide contextuel ---------- */
.qagrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 8px 0 12px; }
.qagrid button { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 12px; border-radius: var(--r-l); border: 1px solid var(--line2); background: var(--s1); font-weight: 650; text-align: left; }
.qagrid button svg { width: 20px; height: 20px; color: var(--acs); flex: none; }
.qagrid button:hover { border-color: var(--acline); }

/* ---------- petits écrans : rien d'important n'est hors de portée ---------- */
@media (max-width: 360px) {
  .tday .pagetitle { font-size: 23px; }
  .tdsum { display: none; }
  .agtitle { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) { .lvbar i { transition: none; } }

/* ---------- Aujourd'hui sur téléphone : l'ordre suit la hiérarchie V12 ----------
   journée (maintenant, à suivre) → tâches (à valider, à planifier) → objectif → Orbe → progression → outils */
@media (max-width: 899px) {
  .tgrid { gap: 16px; }
  .s-now { order: 1; } .s-next { order: 2; } .s-valid { order: 3; } .s-plan { order: 4; } .s-goal { order: 5; } .s-proact { order: 6; }
  .s-week { order: 7; } .s-review { order: 8; } .s-prog { order: 9; } .s-quests { order: 10; } .s-daily { order: 11; } .toolrow { order: 12; }
}
.tray .traychip.sugg { border-style: dashed; background: var(--vgbg); }
.tray .traychip.sugg b::before { content: "Idée · "; color: var(--vgs); font-weight: 750; }

/* ---------- aperçu d'une semaine proposée par l'Orbe ---------- */
.wstrip { margin: 8px 12px 10px; }
.wsgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.wscol { display: flex; flex-direction: column; align-items: stretch; gap: 3px; min-width: 0; }
.wsh { font-size: 10.5px; color: var(--mu); text-align: center; white-space: nowrap; }
.wsg { position: relative; display: block; height: 120px; border-radius: 6px; background: var(--s1); border: 1px solid var(--line); overflow: hidden; }
.wsb { position: absolute; left: 2px; right: 2px; border-radius: 3px; }
.wsb.ex { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 35%, transparent) 0 3px, transparent 3px 6px); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
.wsb.nw { background: color-mix(in srgb, var(--c) 75%, var(--bg)); }
.wsb.nw.off { opacity: .2; }
.wsn { font-size: 10.5px; color: var(--tx2); text-align: center; }
.wsax { display: flex; justify-content: space-between; font-size: 10px; color: var(--mu2); margin-top: 2px; }
.prop.replaced { opacity: .6; }

/* ---------- réglages : modes de l'Orbe ---------- */
.aimodes { display: grid; gap: 8px; }
.aimode { display: flex; gap: 10px; padding: 10px 12px; border-radius: var(--r-m); background: var(--s1); border: 1px solid var(--line); }
.aimode.on { border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.aimode .ain { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--s3); font-size: 12px; font-weight: 750; color: var(--tx2); }
.aimode b { display: block; font-size: 14px; }
.aimode span:not(.ain):not(.chip) { display: block; font-size: 12.5px; color: var(--tx2); }
.orbacts { display: inline-flex; gap: 2px; flex: none; }

/* ===== V12 · tâches : étapes, répétition, filtres, regroupements ===== */
.subs { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; }
.sub { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 6px 4px 4px; border: 1px solid var(--line); border-radius: var(--r-s, 8px); background: var(--bg2); }
.sub span { flex: 1; min-width: 0; font-size: 14.5px; overflow-wrap: anywhere; }
.sub.done span { color: var(--tx3, var(--tx2)); text-decoration: line-through; }
.sbox { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; border: 1.5px solid var(--line2); background: transparent; color: transparent; cursor: pointer; }
.sbox svg { width: 18px; height: 18px; }
.sub.done .sbox { border-color: var(--vg, var(--ac)); background: var(--vgbg, var(--acbg)); color: var(--vg, var(--ac)); }
.sdel { flex: none; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--tx2); font-size: 20px; line-height: 1; cursor: pointer; }
.sdel:hover { background: var(--s2); color: var(--tx); }
.addline.sm input { min-height: 42px; font-size: 14px; }
.addline.sm button { min-width: 42px; }
.todo .subn, .todo .rep { display: inline-flex; align-items: center; gap: 3px; }
.todo .subn svg, .todo .rep svg { width: 13px; height: 13px; opacity: .8; }
.tfilters { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tfilters::-webkit-scrollbar { display: none; }
.tfilters .chip { height: 34px; padding: 0 12px; border: 1px solid transparent; cursor: pointer; font-size: 13px; }
.tfilters .chip.on { background: var(--vgbg, var(--acbg)); border-color: var(--vg, var(--ac)); color: var(--tx); }
.tgroup { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 10px; }
.tgroup .seg button { min-height: 34px; font-size: 12.5px; }
.tgh { margin: 14px 0 6px; font-family: var(--font-b, system-ui); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--tx2); }
.tgh .muted { font-weight: 600; letter-spacing: 0; }

/* ===== V12 · notes : recherche, étiquettes, liens ===== */
.nsearch { display: flex; gap: 8px; margin: 0 0 10px; }
.nsearch .field { flex: 1; min-width: 0; min-height: 44px; }
.nsearch .btn { flex: none; min-height: 44px; }
.note .ntags { display: flex; flex-wrap: wrap; gap: 4px; }
.note .ntags i { font-style: normal; font-size: 11.5px; font-weight: 650; color: var(--acs, var(--ac)); }
.note .nlinks { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--tx2); min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.note .nlinks svg { width: 13px; height: 13px; flex: none; }
.nlinklist { margin: 0 0 8px; }
.nlinklist .item { display: flex; align-items: center; gap: 6px; }
.nlinklist .item .tx { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 8px 10px; border: 0; background: transparent; color: var(--tx); text-align: left; cursor: pointer; font: inherit; }
.nlinklist .item .tx span { font-size: 12px; color: var(--tx2); }
/* zoom d'un seul doigt dans le menu des vues (téléphones : alternative au pincement) */
.agmzoom { display: none; align-items: center; gap: 4px; padding: 6px 8px 4px 12px; border-top: 1px solid var(--line); margin-top: 4px; }
.agmzoom span { flex: 1; font-size: 13px; color: var(--tx2); }
.agmzoom button { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line2); background: var(--s1); color: var(--tx); }
.agmzoom button svg { width: 18px; height: 18px; }
@media (max-width: 420px) { .agmzoom { display: flex; } }

/* ===== V12.1 · statistiques ===== */
.statsHead { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.statsHead .pagetitle { margin-bottom: 0; }
.statsHead .btn svg, .tourcta svg { width: 16px; height: 16px; }
.tourcta { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 12px 0 0; border-color: var(--acline, var(--line)); background: linear-gradient(120deg, var(--acbg, transparent), var(--s1)); }
.tourcta p { margin: 0; flex: 1 1 220px; }
.speriod { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 14px 0 4px; }
.snav { display: flex; align-items: center; gap: 4px; }
.snav .slab { min-width: 150px; text-align: center; font-size: 14px; }
.snav .ibtn:disabled { opacity: .3; }
/* V12.4 : bouton « i » dimensionné partout (hors d'un en-tête de section, il faisait 0 px de large : invisible et intouchable) */
.sinfo { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--tx2); }
.sinfo svg { width: 17px; height: 17px; }
.sech .sinfo { width: 32px; height: 32px; margin-left: 2px; color: var(--tx2); }
.sech .sinfo svg { width: 17px; height: 17px; }
.kpi .dlt { align-self: flex-start; margin: -2px 0 2px; padding: 1px 7px; border-radius: 99px; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .dlt.up { color: var(--ok, #5fc08f); background: color-mix(in srgb, var(--ok, #5fc08f) 14%, transparent); }
.kpi .dlt.down { color: var(--ko, #ef7474); background: color-mix(in srgb, var(--ko, #ef7474) 14%, transparent); }
.kpi .dlt.eq { color: var(--tx2); background: var(--s2); }
.prlist { display: grid; gap: 12px; }
.pr .prh { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 13.5px; }
.pr .prv { color: var(--tx2); font-size: 12.5px; white-space: nowrap; }
.pr .prv b { color: var(--tx); }
.prt { display: flex; height: 12px; margin: 6px 0 3px; border-radius: 6px; background: var(--s2); overflow: hidden; }
.prt i, .prleg i { display: block; height: 100%; }
.prt .d, .prleg .d { background: var(--c, var(--vg)); }
.prt .m, .prleg .m { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--ko, #ef7474) 75%, transparent) 0 4px, color-mix(in srgb, var(--ko, #ef7474) 35%, transparent) 4px 8px); }
.prt .p, .prleg .p { box-shadow: inset 0 0 0 1.5px var(--tx2); border-radius: 3px; }
.prt .u, .prleg .u { background: repeating-linear-gradient(90deg, var(--line2) 0 3px, transparent 3px 6px); }
.prs { display: block; min-height: 1em; }
.prleg { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 4px; border-top: 1px solid var(--line); }
.prleg span { display: inline-flex; align-items: center; gap: 5px; }
.prleg i { width: 14px; height: 8px; border-radius: 2px; }
.prleg .d { --c: var(--vg); }
.trendl { margin: 6px 0 0; }
.regdays.month { grid-template-columns: repeat(7, 1fr); }
.regdays .rdh { text-align: center; font-size: 11px; color: var(--tx2); font-weight: 700; }
.wdbars { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; }
.wdbars .hint { grid-column: 1 / -1; margin: 8px 0 0; }
/* (V12.3) limité au graphique des meilleurs jours : « .wd » seul transformait aussi la ligne des jours de la vue
   Mois (.mcrow.wd) en colonne */
.wdbars .wd { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11.5px; color: var(--tx2); }
.wdb { display: flex; align-items: flex-end; width: 100%; max-width: 30px; height: 70px; border-radius: 6px; background: var(--s2); overflow: hidden; }
.wdb i { display: block; width: 100%; background: var(--vg); border-radius: 6px 6px 0 0; }
.wdbars .wd.best .wdb i { background: var(--ac); }
.wdbars .wd b { color: var(--tx); font-size: 12.5px; }
.qstat { margin: 0; font-size: 14.5px; }
.guide p { margin: 0 0 10px; line-height: 1.5; }
.guide .gsrc, .tour-body .gsrc { color: var(--tx2); }
.guide .gtip, .tour-body .gtip { padding: 8px 10px; border-left: 3px solid var(--ac); background: var(--s1); border-radius: 0 8px 8px 0; }

/* ===== V12.1 · visite guidée ===== */
.tour { position: fixed; inset: 0; z-index: 90; padding: var(--safe-t) var(--safe-r) var(--safe-b) var(--safe-l); /* lu par tour.js pour placer la carte hors de l'encoche et du trait d'accueil */ }
.tour-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(3, 7, 13, .72); outline: 2px solid var(--ac); outline-offset: 2px; pointer-events: none; transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease, opacity .2s; }
.tour-card { position: fixed; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 12px; border: 1px solid var(--line2); border-radius: 14px; background: var(--bg2, var(--s1)); color: var(--tx); box-shadow: 0 20px 60px #000a; transition: top .25s ease, left .25s ease; }
.tour-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.tour-n { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--acs, var(--ac)); }
.tour-x { width: 36px; height: 36px; margin: -6px -8px 0 0; border: 0; border-radius: 8px; background: transparent; color: var(--tx2); font-size: 22px; line-height: 1; cursor: pointer; }
.tour-card h2 { margin: 0 0 8px; font-family: var(--font-d); font-size: 20px; font-weight: 500; outline: none; }
.tour-body { font-size: 14px; line-height: 1.5; max-height: 42vh; overflow: auto; }
.tour-body p { margin: 0 0 8px; }
.tour-dots { display: flex; gap: 5px; justify-content: center; margin: 8px 0 10px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line2); }
.tour-dots i.on { background: var(--ac); }
.tour-btns { display: flex; justify-content: space-between; gap: 8px; }
.tour-btns .btn { flex: 1; min-height: 44px; }
body.touring { overflow: hidden; }
:root[data-motion=reduced] .tour-spot, :root[data-motion=reduced] .tour-card { transition: none; }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-card { transition: none; } }
.sech .sechr { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.regdays.month .rd i { width: 28px; height: 28px; font-style: normal; font-size: 11.5px; font-weight: 650; color: var(--tx2); }
.regdays.month .rd.on i { color: var(--bg); }
.regdays.month { row-gap: 6px; }
.kpinote { margin: 8px 2px 0; }

/* ===== V12.1 · quêtes : rythme, actions, « pourquoi » ===== */
.qpace { font-size: 13px; color: var(--mu); margin: 0; }
.qacts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.qwhy { font-size: 13px; color: var(--mu); }
.qwhy summary { cursor: pointer; color: var(--acs, var(--ac)); width: max-content; max-width: 100%; padding: 4px 0; }
.qwhy summary:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; border-radius: 4px; }
.qwhy p { margin: 4px 0 0; }

/* ===== V12.1 · agenda : résumé, chevauchements, recherche, raccourcis ===== */
.agsum { display: flex; align-items: center; gap: 8px; min-height: 26px; padding: 2px 16px 4px; font-size: 12.5px; color: var(--tx2); }
.agsumt { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agfix { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 6px; border-radius: 13px; border: 1px solid color-mix(in srgb, var(--warn) 55%, transparent); background: color-mix(in srgb, var(--warn) 12%, transparent); color: var(--tx); font-size: 12.5px; }
.agfix i { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: var(--warn); color: #1b1408; font-style: normal; font-weight: 700; font-size: 11px; }
.agfix b { color: var(--warn); font-weight: 600; }
.agfix:hover { background: color-mix(in srgb, var(--warn) 20%, transparent); }
.fixlist { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.fixi { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--s1); }
.fixp { margin: 0 0 6px; line-height: 1.55; }
.fixp span { color: var(--tx2); font-size: 13px; }
.fixi .btns { margin-top: 4px; }
.sresults { margin-top: 10px; min-height: 120px; }
.sresults .lday { margin: 14px 0 6px; font-size: 14px; }
.sresults .item .tx > span { color: var(--tx2); }
.keys { display: grid; gap: 6px; margin: 8px 0 0; }
.keys > div { display: grid; grid-template-columns: 128px 1fr; gap: 10px; align-items: baseline; }
.keys dt, .keys dd { margin: 0; }
.keys dd { color: var(--tx2); font-size: 14px; }
kbd { display: inline-block; min-width: 22px; padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line2); border-bottom-width: 2px; background: var(--s2); font: 600 12px/1.6 var(--font-ui, inherit); text-align: center; color: var(--tx); white-space: nowrap; }
.agmkeys { border-top: 1px solid var(--line); margin-top: 4px; }
.agmkeys kbd { margin-left: auto; }
@media (max-width: 420px) { .agsum { padding: 0 12px 2px; font-size: 12px; min-height: 24px; } .agfix { height: 24px; font-size: 12px; } .agfixn, .agsumx { display: none; } }
.agmenu .agmkeys { display: none; }
@media (min-width: 760px) and (hover: hover) { .agmenu .agmkeys { display: flex; } }

/* ===== V12.2 · stats du héros ===== */
.hhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 4px 0 12px; }
.hhead .lede { margin: 0; flex: 1; min-width: 0; }
.hhead .btn { flex: none; display: inline-flex; align-items: center; gap: 6px; }
.hhead .btn svg { width: 16px; height: 16px; }
@media (max-width: 520px) { .hhead { flex-direction: column; } }
.hexcard .sinfo { width: 30px; height: 30px; margin: -8px 0 -8px -2px; vertical-align: middle; }
.hexfoot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; flex-wrap: wrap; }
.hweek, .hadvice { margin-top: 12px; }
.hweek .sech, .hadvice .sech { margin-bottom: 6px; }
.hweek h2, .hadvice h2 { font-size: 17px; }
.hwtot { margin: 0 0 8px; }
.hwtot b { font-family: var(--font-d); font-size: 22px; }
.hchips { display: flex; flex-wrap: wrap; gap: 6px; }
.hchip { display: inline-flex; gap: 5px; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 13px; background: color-mix(in srgb, var(--sc) 14%, var(--s2)); border: 1px solid color-mix(in srgb, var(--sc) 40%, transparent); }
.hchip b { color: var(--sc); font-weight: 650; }
.hadvice p { margin: 0; }
.hadvice .btns { margin-top: 10px; }
.hstat .hsn { display: block; text-align: left; min-height: 44px; }
.hstat .hsn:focus-visible { outline: 2px solid var(--sc); outline-offset: 3px; border-radius: 6px; }
.hstat .hline { margin: 8px 0 0; font-size: 13.5px; }
.hstat .hsrc { margin: 4px 0 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; font-size: 12.5px; color: var(--mu); }
.hstat .hwk.on { color: var(--sc); font-weight: 600; }
.hstat .sf { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.hstat .sf .nm { font-size: 12.5px; color: var(--tx2); flex: 1; min-width: 160px; }
.hstat .hbtns { display: inline-flex; gap: 6px; flex: none; }
.hstat.st-gate { border-color: color-mix(in srgb, var(--sc) 55%, var(--line)); }
.meter.gated i { background: repeating-linear-gradient(135deg, var(--sc) 0 8px, color-mix(in srgb, var(--sc) 70%, #000) 8px 14px); }
.hsheet h3 { font-size: 15px; margin: 16px 0 6px; }
.hsheet p { margin: 6px 0; }
.hbig { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.hbig > b { font-family: var(--font-d); font-size: 40px; line-height: 1; color: var(--sc); }
.hbig span { color: var(--tx2); font-size: 14px; }
.hsrcs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hsrcs li { display: grid; grid-template-columns: auto auto 1fr; gap: 2px 8px; align-items: center; }
.hsrcs li > span:last-child { grid-column: 1 / -1; font-size: 13px; color: var(--mu); }
.hsrcs .chip { font-size: 11.5px; }
.hwbars { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; align-items: end; height: 120px; margin-top: 6px; }
.hwbars .hb { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; min-width: 0; }
.hwbars .hb i { display: block; width: 100%; max-width: 28px; border-radius: 5px 5px 2px 2px; background: color-mix(in srgb, var(--sc) 55%, var(--s3)); }
.hwbars .hb.cur i { background: var(--sc); }
.hwbars small { font-size: 11px; color: var(--tx2); }
.hwbars em { font-style: normal; font-size: 10.5px; color: var(--mu); white-space: nowrap; }
.hrew { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.hrew li { display: grid; grid-template-columns: 56px 1fr auto; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; font-size: 13.5px; color: var(--tx2); }
.hrew li.got { color: var(--tx); }
.hrew li.next { background: color-mix(in srgb, var(--sc) 12%, transparent); color: var(--tx); font-weight: 600; }
.hrew li i svg { width: 15px; height: 15px; color: var(--sc); }
.hadvice .btns .btn { white-space: normal; max-width: 100%; height: auto; min-height: 36px; padding-top: 7px; padding-bottom: 7px; text-align: center; line-height: 1.3; }
.six .sixg { display: block; margin-top: 3px; font-size: 11.5px; color: var(--mu); }
.six .sixg.on { color: var(--sc); font-weight: 600; }

/* ===== V12.3 · offre au bon moment (feuille, bandeau, compteur de l'Orbe, micro réservé) ===== */
.offer .olead { margin: 0 0 12px; color: var(--tx2); line-height: 1.45; }
.offer .ocard { border: 1px solid var(--ac); border-radius: 14px; padding: 14px; background: var(--s1); }
.offer .ocard .price { margin: 6px 0 0; }
.offer .ocard .price .num { font-family: var(--font-d); font-size: 28px; } .offer .ocard .price span { color: var(--mu); font-size: 13.5px; margin-left: 5px; }
.offer .ocard .big { font-size: 20px; }
/* même liste d'avantages que la page des offres (.plan .bens), dans la feuille : icônes à 16 px */
.offer ul.bens { list-style: none; margin: 10px 0 8px; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.offer .bens li { display: flex; gap: 8px; align-items: flex-start; }
.offer .bens li svg { width: 16px; height: 16px; color: var(--vgs); flex: none; margin-top: 2px; }
.offer .bens li span { display: flex; flex-direction: column; gap: 1px; }
.offer .bens b { font-weight: 650; font-size: 14.5px; }
.offer .bens small { color: var(--mu); font-size: 12.5px; line-height: 1.4; }
.offer .btns.col { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 12px; }
.offer .center { text-align: center; margin: 10px 0 0; }
.perday { margin: 2px 0 8px; font-size: 13px; color: var(--tx2); }
.offerban { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; border: 1px solid color-mix(in srgb, var(--ac) 45%, var(--line)); margin-bottom: 12px; }
.offerban > div:first-child { flex: 1 1 200px; min-width: 0; }
.offerban b { display: block; }
.offerban span { display: block; font-size: 13px; color: var(--tx2); margin-top: 2px; }
.offerban .row { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.cquota { margin: 0 12px 6px; font-size: 12.5px; color: var(--tx2); text-align: center; }
.cquota .link { font-size: inherit; }
.cbtn { position: relative; }
.cbtn .lockb { position: absolute; right: 3px; bottom: 3px; width: 15px; height: 15px; border-radius: 50%; background: var(--ac); display: grid; place-items: center; pointer-events: none; }
.cbtn .lockb svg { width: 9px; height: 9px; stroke: var(--bg, #000); }

/* ===== V12.4 · textes légaux, offres dans l'app native, confort iPhone ===== */
/* textes légaux affichés dans une feuille (contenu de legal/*.html) */
.legaldoc { font-size: 15px; line-height: 1.6; }
.legaldoc h2 { margin: 22px 0 6px; font-family: var(--font-d); font-weight: 500; font-size: 19px; line-height: 1.3; }
.legaldoc h3 { margin: 14px 0 4px; font-size: 15px; }
.legaldoc p, .legaldoc li, .legaldoc td { color: var(--tx2); }
.legaldoc ul { padding-left: 20px; }
.legaldoc li { margin: 4px 0; }
.legaldoc a { color: var(--acs, var(--ac)); }
.legaldoc .updated { color: var(--mu); font-size: 13px; }
.legaldoc .box { margin: 12px 0; padding: 12px 14px; border-left: 3px solid var(--ac); background: var(--s2); border-radius: 0 10px 10px 0; }
.legaldoc .box p:first-child { margin-top: 0; }
.legaldoc table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0; }
.legaldoc th, .legaldoc td { text-align: left; vertical-align: top; padding: 7px 8px; border-bottom: 1px solid var(--line); }
@media (max-width: 520px) {
  .legaldoc table, .legaldoc thead, .legaldoc tbody, .legaldoc tr, .legaldoc th, .legaldoc td { display: block; }
  .legaldoc thead { display: none; }
  .legaldoc td { border: 0; padding: 2px 0; }
  .legaldoc tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .legaldoc td:first-child { color: var(--tx); font-weight: 600; }
}
/* sous les offres : conditions, confidentialité et, dans l'app native, l'information sur le renouvellement */
.legalfoot { margin: 18px 4px 6px; font-size: 12.5px; line-height: 1.55; color: var(--mu); text-align: center; }
.legalfoot .link, .consent .link { font-size: inherit; padding: 2px 0; }
.consent { margin: 10px 2px 0; line-height: 1.5; }
/* iPhone : un champ de moins de 16 px fait zoomer la page au toucher (Safari comme l'app native), et elle reste zoomée */
@media (pointer: coarse) { .field.sm, .addline input, .addline.sm input, .timepair .field, .setrow select.field { font-size: 16px; } }
/* une ligne-lien des réglages garde son chevron à droite, même avec une description sur deux lignes */
.setrow.linkrow { flex-wrap: nowrap; }
.setrow.linkrow > div { flex: 1; min-width: 0; }
.setrow.linkrow .chev { flex: none; }
/* le bouton « + » flottant ne cache jamais la fin d'une liste : de la place sous le dernier élément des écrans qui l'affichent */
body[data-route=today] .view.on::after, body[data-route=goals] .view.on::after, body[data-route=notes] .view.on::after { content: ''; display: block; height: 72px; }
/* offres : liste de l'offre Free repliée quand c'est l'offre actuelle */
.plan .pbens { margin: 6px 0 2px; }
.plan .pbens > summary { cursor: pointer; padding: 6px 0; font-size: 14px; font-weight: 600; color: var(--acs, var(--ac)); list-style: none; }
.plan .pbens > summary::-webkit-details-marker { display: none; }
.plan .pbens > summary::after { content: '›'; display: inline-block; margin-left: 6px; transition: transform .2s; }
.plan .pbens[open] > summary::after { transform: rotate(90deg); }


/* ===================== V13 ===================== */
/* Aujourd'hui : l'offre (comptes Free) vient après la journée et les tâches, jamais au-dessus de « Maintenant ». */
.offerban { order: 6; margin-bottom: 0; }
@media (max-width: 899px) { .offerban { order: 4; } }

/* Agenda sur petit écran (iPhone SE et écrans courts) : l'en-tête, la bande de la semaine et la zone « À planifier »
   se resserrent pour rendre la place à la grille. Mesuré sur 320 × 568 et 375 × 667 (docs/V13/RAPPORT-PERFORMANCE-V13.md). */
@media (max-height: 700px) and (max-width: 899px) {
  body[data-agv="day"] .agtop, body[data-agv="week"] .agtop { min-height: 36px; margin: 0; }
  .ag.day .agtitle, .ag.week .agtitle { font-size: 17px; }
  .ag.day .agvbtn, .ag.week .agvbtn { height: 32px; }
  .ag.day .agadd, .ag.week .agadd { width: 32px; height: 32px; }
  .ag.day .wstrip, .ag.week .wstrip { margin: 2px 8px 4px; }
  .ag.day .wsd b, .ag.week .wsd b { width: 28px; height: 28px; font-size: 14px; }
  .ag.day .wsd .wdn, .ag.week .wsd .wdn { font-size: 10px; line-height: 1.1; }
  .ag.day .agsum, .ag.week .agsum { min-height: 20px; padding: 0 12px; font-size: 11.5px; }
  .ag.day .tray, .ag.week .tray { padding: 3px 0; }
  .ag.day .trayhead, .ag.week .trayhead { min-height: 34px; }
  .ag.day .traychip, .ag.week .traychip { height: 34px; }
}
@media (max-height: 600px) and (max-width: 899px) {
  /* très petit écran : les pastilles de catégories sous les jours laissent leur place (le détail est dans la grille) */
  .ag.day .wdots, .ag.week .wdots { display: none; }
  .ag.day .wsd, .ag.week .wsd { padding-bottom: 0; }
}

/* Écran de chargement et d'erreur : même fond que l'app, message lisible, bouton à portée de pouce. */
.bootfail { max-width: 340px; margin: 0 auto; padding: 24px 20px; text-align: center; line-height: 1.5; }
.bootfail b { display: block; font-family: var(--font-d); font-size: 20px; margin-bottom: 8px; }
.bootfail p { color: var(--tx2); margin: 0 0 16px; }
.bootfail .btn { min-height: 46px; min-width: 160px; }

/* ===== V13.1 · connexion avec Apple et Google =====
   Deux boutons de même taille, Apple en premier (règle 4.8 de l'App Store : une option au moins aussi visible),
   couleurs des recommandations d'Apple (noir sur fond clair, blanc sur fond sombre) et de Google (neutre). */
.authbtns { display: grid; gap: 10px; margin: 2px 0 4px; }
.authbtn { min-height: 48px; font-size: 15.5px; font-weight: 600; letter-spacing: .1px; border: 1px solid transparent; }
.authbtn.apple { background: #fff; color: #000; }
/* V14.2 : logo Apple fourni par la police système d'Apple (présente uniquement sur iPhone / iPad), exigé par les règles de présentation de « Sign in with Apple » */
html[data-platform=ios] .authbtn.apple::before { content: '\F8FF'; font-family: -apple-system, system-ui, sans-serif; font-size: 1.2em; font-weight: 500; line-height: 1; margin-right: 7px; position: relative; top: -1px; }
.authbtn.google { background: #131314; color: #e3e3e3; border-color: #8e918f; }
:root[data-mode=light] .authbtn.apple { background: #000; color: #fff; }
:root[data-mode=light] .authbtn.google { background: #fff; color: #1f1f1f; border-color: #747775; }
.authbtn:disabled { opacity: .6; }
.authbtn:focus-visible { outline: 3px solid var(--ac); outline-offset: 2px; }
.author { display: flex; align-items: center; gap: 10px; margin: 14px 0 4px; color: var(--mu); font-size: 13px; }
.author::before, .author::after { content: ""; flex: 1; height: 1px; background: var(--line2); }
