/* Duo Bible — styles (mobile d’abord) */
@font-face { font-family: 'Inter'; src: url(/fonts/inter.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Literata'; src: url(/fonts/literata.woff2) format('woff2'); font-weight: 400 600; font-display: swap; }

:root {
  --bg: #f5f6fa; --surface: #ffffff; --surface-2: #eef1f7; --ink: #18202c; --ink-2: #4a5568; --muted: #8590a2;
  --line: #e4e8ef; --primary: #2549b8; --primary-2: #3a68e0; --primary-soft: #e8eefc; --on-primary: #fff;
  --gold: #b9851f; --gold-soft: #fbf1db; --ok: #13865a; --ok-soft: #e2f4eb; --danger: #c93c3c; --danger-soft: #fbe7e7;
  --shadow: 0 1px 2px rgba(20, 30, 60, .05), 0 6px 20px rgba(20, 30, 60, .06);
  --radius: 18px; --read-size: 19px;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e131b; --surface: #161d28; --surface-2: #1e2734; --ink: #e9eef6; --ink-2: #b7c1d0; --muted: #7d889b;
    --line: #273243; --primary: #7d9bff; --primary-2: #9bb3ff; --primary-soft: #1d2847; --on-primary: #0c1430;
    --gold: #e7bd5f; --gold-soft: #352b15; --ok: #45cf94; --ok-soft: #123428; --danger: #ff7b7b; --danger-soft: #3a1b1d;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e131b; --surface: #161d28; --surface-2: #1e2734; --ink: #e9eef6; --ink-2: #b7c1d0; --muted: #7d889b;
  --line: #273243; --primary: #7d9bff; --primary-2: #9bb3ff; --primary-soft: #1d2847; --on-primary: #0c1430;
  --gold: #e7bd5f; --gold-soft: #352b15; --ok: #45cf94; --ok-soft: #123428; --danger: #ff7b7b; --danger-soft: #3a1b1d;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3); color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh; min-height: 100dvh; overscroll-behavior-y: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary); }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.i { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.i.s { width: 18px; height: 18px; }
svg.i.xs { width: 15px; height: 15px; }

#app { max-width: 560px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; }
.screen { padding: calc(var(--safe-t) + 14px) 16px calc(96px + var(--safe-b)); animation: fade .18s ease-out; }
.screen.no-tab { padding-bottom: calc(28px + var(--safe-b)); }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

.boot { display: grid; place-items: center; align-content: center; gap: 12px; min-height: 100vh; color: var(--muted); font-weight: 600; }

/* Barre du haut */
.topbar { display: flex; align-items: center; gap: 8px; min-height: 44px; margin-bottom: 10px; }
.topbar h1 { font-size: 17px; font-weight: 650; flex: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .spacer { width: 40px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; display: grid; place-items: center; color: var(--ink); flex: none; }
.icon-btn:active { background: var(--surface-2); }
.icon-btn.filled { background: var(--surface); box-shadow: var(--shadow); }
.large-title { font-size: 28px; font-weight: 750; margin: 6px 0 4px; letter-spacing: -.02em; }
.subtitle { color: var(--ink-2); font-size: 15px; }
.eyebrow { font-size: 12.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 22px 4px 8px; }

/* Cartes */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card + .card { margin-top: 12px; }
.stack > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Grandes cartes d’accueil */
.mode-card { position: relative; display: block; width: 100%; text-align: left; border: 0; padding: 20px; border-radius: 22px; color: #fff; overflow: hidden; box-shadow: var(--shadow); text-decoration: none; }
.mode-card + .mode-card { margin-top: 14px; }
.mode-card.solo { background: linear-gradient(135deg, #3a68e0, #2549b8); }
.mode-card.duo { background: linear-gradient(135deg, #1f8a7a, #146a6a); }
:root[data-theme="dark"] .mode-card.solo { background: linear-gradient(135deg, #2c4fb0, #1b3480); }
:root[data-theme="dark"] .mode-card.duo { background: linear-gradient(135deg, #17695e, #0f4f4f); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mode-card.solo { background: linear-gradient(135deg, #2c4fb0, #1b3480); } :root:not([data-theme="light"]) .mode-card.duo { background: linear-gradient(135deg, #17695e, #0f4f4f); } }
.mode-card .mc-icon { width: 46px; height: 46px; border-radius: 14px; background: rgba(255, 255, 255, .18); display: grid; place-items: center; margin-bottom: 14px; }
.mode-card .mc-icon svg { width: 26px; height: 26px; }
.mode-card h2 { font-size: 21px; font-weight: 700; }
.mode-card p { opacity: .88; font-size: 14.5px; margin-top: 4px; max-width: 30ch; }
.mode-card .mc-status { margin-top: 14px; display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; background: rgba(255, 255, 255, .16); border-radius: 12px; padding: 9px 12px; }
.mode-card .mc-arrow { position: absolute; right: 16px; top: 20px; opacity: .8; }
.mode-card::after { content: ''; position: absolute; width: 180px; height: 180px; border-radius: 50%; right: -60px; bottom: -80px; background: rgba(255, 255, 255, .08); }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 20px; border-radius: 14px; border: 0; font-weight: 650; font-size: 16px; text-decoration: none; transition: transform .08s, opacity .15s; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.primary { background: var(--primary); color: var(--on-primary); }
.btn.soft { background: var(--primary-soft); color: var(--primary); }
.btn.ghost { background: transparent; color: var(--primary); }
.btn.line { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn.ok { background: var(--ok); color: #fff; }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.block { display: flex; width: 100%; }
.btn.sm { min-height: 38px; padding: 0 14px; font-size: 14.5px; border-radius: 11px; }
.btn-row { display: flex; gap: 10px; }
.btn-row > .btn { flex: 1; }
.link { background: none; border: 0; color: var(--primary); font-weight: 600; padding: 6px 0; }

/* Formulaires */
.field { display: block; margin-top: 14px; }
.field > span { display: block; font-size: 14px; font-weight: 600; color: var(--ink-2); margin: 0 2px 6px; }
.input, textarea.input, select.input { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); outline: none; font-size: 16px; }
textarea.input { min-height: 120px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.form-error { color: var(--danger); background: var(--danger-soft); border-radius: 12px; padding: 10px 12px; font-size: 14px; margin-top: 12px; }
.check-line { display: flex; gap: 10px; align-items: center; margin-top: 12px; font-size: 14.5px; color: var(--ink-2); }
.check-line input { width: 20px; height: 20px; accent-color: var(--primary); }

/* Auth */
.auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; padding: calc(var(--safe-t) + 28px) 20px calc(24px + var(--safe-b)); }
.auth .brand { display: flex; align-items: center; gap: 12px; }
.auth .brand img { width: 52px; height: 52px; border-radius: 14px; }
.auth .brand b { font-size: 22px; letter-spacing: -.01em; }
.auth .hero { margin: 36px 0 20px; }
.auth .hero h1 { font-size: 30px; font-weight: 750; letter-spacing: -.02em; }
.auth .hero p { color: var(--ink-2); margin-top: 10px; font-size: 16px; }
.auth .points { margin: 8px 0 26px; display: grid; gap: 12px; }
.auth .point { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: var(--ink-2); }
.auth .point .pi { width: 36px; height: 36px; border-radius: 11px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex: none; }
.auth .point b { color: var(--ink); display: block; }
.auth .bottom { margin-top: auto; }
.seg { display: flex; background: var(--surface-2); border-radius: 13px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 10px; padding: 9px 6px; font-weight: 600; font-size: 14px; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* Barre d’onglets */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); }
.tabbar .tabs { display: flex; width: 100%; max-width: 560px; }
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 0 8px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-decoration: none; position: relative; }
.tabbar a.on { color: var(--primary); }
.tabbar a .dot { position: absolute; top: 6px; left: calc(50% + 8px); width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }

/* Plans (listes) */
.plan-card { display: block; text-decoration: none; color: inherit; }
.plan-card .pc-top { display: flex; align-items: center; gap: 12px; }
.ring { width: 52px; height: 52px; flex: none; position: relative; }
.ring svg { width: 52px; height: 52px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 5; }
.ring .bg { stroke: var(--surface-2); }
.ring .fg { stroke: var(--primary); stroke-linecap: round; transition: stroke-dashoffset .5s; }
.ring span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; }
.ring.big, .ring.big svg { width: 64px; height: 64px; }
.pc-title { font-weight: 650; font-size: 16px; }
.pc-sub { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.pc-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--ink-2); }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.chip.blue { background: var(--primary-soft); color: var(--primary); }
.chip.gold { background: var(--gold-soft); color: var(--gold); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.red { background: var(--danger-soft); color: var(--danger); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); }
.empty .ei { width: 64px; height: 64px; border-radius: 20px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin: 0 auto 14px; }
.empty .ei svg { width: 30px; height: 30px; }
.empty h3 { color: var(--ink); font-size: 18px; margin-bottom: 6px; }

/* Bandeaux */
.banner { display: flex; gap: 12px; align-items: flex-start; border-radius: 16px; padding: 14px; font-size: 14.5px; }
.banner .bi { flex: none; margin-top: 1px; }
.banner b { display: block; font-size: 15px; margin-bottom: 2px; }
.banner.blue { background: var(--primary-soft); color: var(--ink); }
.banner.blue .bi { color: var(--primary); }
.banner.gold { background: var(--gold-soft); }
.banner.gold .bi { color: var(--gold); }
.banner.ok { background: var(--ok-soft); }
.banner.ok .bi { color: var(--ok); }
.banner.red { background: var(--danger-soft); }
.banner.red .bi { color: var(--danger); }
.banner .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* Vue plan */
.plan-head { display: flex; gap: 14px; align-items: center; }
.plan-head h2 { font-size: 20px; font-weight: 720; }
.day-title { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 4px 10px; }
.day-title h3 { font-size: 22px; font-weight: 750; }
.day-title span { color: var(--muted); font-size: 14px; font-weight: 600; }
.group-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 16px 4px 8px; }
.task { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 14px; }
.task + .task { margin-top: 10px; }
.task .tick { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); background: transparent; display: grid; place-items: center; flex: none; color: #fff; margin-top: 1px; transition: background .15s, border-color .15s; }
.task .tick:active { transform: scale(.92); }
.task.done .tick { background: var(--ok); border-color: var(--ok); }
.task .t-main { flex: 1; min-width: 0; }
.task .t-label { font-weight: 650; font-size: 16.5px; }
.task.done .t-label { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); }
.task .t-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; font-size: 13px; color: var(--muted); }
.task .t-note { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 14.5px; color: var(--ink-2); font-style: italic; }
.task .t-note b { font-style: normal; color: var(--ink); font-weight: 650; font-size: 12.5px; display: block; margin-bottom: 2px; }
.task .t-actions { display: flex; gap: 8px; margin-top: 12px; }
.task .read-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--primary-soft); color: var(--primary); font-weight: 650; font-size: 14px; border-radius: 10px; padding: 8px 12px; }
.task .val-btn { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: transparent; color: var(--ink); font-weight: 650; font-size: 14px; border-radius: 10px; padding: 7px 12px; }
.task.locked { opacity: .65; }
.avatars { display: flex; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-size: 12px; font-weight: 750; border: 2px solid var(--surface); flex: none; }
.avatar.lg { width: 40px; height: 40px; font-size: 16px; }
.avatar.ok { background: var(--ok); color: #fff; }
.avatar.gold { background: var(--gold-soft); color: var(--gold); }
.partner-line { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.duo-bar { display: flex; gap: 10px; }
.duo-bar .who { flex: 1; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 12px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.duo-bar .who .grow b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.duo-bar .who .grow span { font-size: 12.5px; color: var(--muted); }
.bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--primary); border-radius: 99px; transition: width .4s; }
.bar.ok i { background: var(--ok); }
.locked-card { display: flex; gap: 12px; align-items: center; padding: 16px; border-radius: 16px; border: 1.5px dashed var(--line); color: var(--muted); margin-top: 14px; }
.locked-card b { color: var(--ink-2); display: block; }
.rhythm { margin-top: 14px; }
.rhythm .tip { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); margin: 0 4px 8px; }
.tabs-inline { display: flex; gap: 6px; margin: 16px 0 4px; overflow-x: auto; scrollbar-width: none; }
.tabs-inline button { border: 0; background: transparent; padding: 8px 14px; border-radius: 999px; font-weight: 650; color: var(--muted); font-size: 14.5px; white-space: nowrap; }
.tabs-inline button.on { background: var(--ink); color: var(--bg); }

/* Programme */
.sched { list-style: none; margin: 0; padding: 0; }
.sched li { display: flex; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); align-items: flex-start; }
.sched .sd { width: 46px; flex: none; text-align: center; }
.sched .sd b { display: block; font-size: 17px; }
.sched .sd span { font-size: 11.5px; color: var(--muted); text-transform: uppercase; font-weight: 600; }
.sched .sl { flex: 1; min-width: 0; font-size: 14.5px; }
.sched .ss { flex: none; color: var(--ok); }
.sched li.cur { background: var(--primary-soft); border-radius: 12px; border-color: transparent; }
.sched li.lock { color: var(--muted); }

/* Assistant de création */
.wiz-progress { height: 4px; background: var(--surface-2); border-radius: 99px; overflow: hidden; margin: 4px 0 18px; }
.wiz-progress i { display: block; height: 100%; background: var(--primary); transition: width .3s; }
.wiz h2 { font-size: 25px; font-weight: 750; letter-spacing: -.02em; }
.wiz .lead { color: var(--ink-2); margin: 6px 0 18px; }
.options { display: grid; gap: 10px; }
.opt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: var(--surface); border: 2px solid transparent; border-radius: 16px; padding: 14px; box-shadow: var(--shadow); }
.opt .oi { width: 42px; height: 42px; border-radius: 13px; background: var(--surface-2); color: var(--ink-2); display: grid; place-items: center; flex: none; }
.opt .ot { flex: 1; min-width: 0; }
.opt .ot b { display: block; font-size: 15.5px; font-weight: 650; }
.opt .ot span { display: block; font-size: 13px; color: var(--muted); margin-top: 1px; }
.opt .oc { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; }
.opt.on { border-color: var(--primary); }
.opt.on .oi { background: var(--primary-soft); color: var(--primary); }
.opt.on .oc { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.wiz-foot { position: sticky; bottom: 0; padding: 14px 0 calc(14px + var(--safe-b)); background: linear-gradient(transparent, var(--bg) 30%); margin-top: 18px; }
.dur-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dur { border: 2px solid transparent; background: var(--surface); box-shadow: var(--shadow); border-radius: 14px; padding: 12px 6px; font-weight: 650; }
.dur span { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.dur.on { border-color: var(--primary); color: var(--primary); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.stat { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); padding: 14px 8px; text-align: center; }
.stat b { display: block; font-size: 24px; font-weight: 750; letter-spacing: -.02em; color: var(--primary); }
.stat span { font-size: 12px; color: var(--muted); font-weight: 600; }
.books-pick { display: flex; flex-wrap: wrap; gap: 7px; }
.books-pick button { border: 1.5px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 12px; font-size: 14px; font-weight: 600; }
.books-pick button.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.recap { display: grid; gap: 0; }
.recap > div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.recap > div:last-child { border: 0; }
.recap span { color: var(--muted); }
.recap b { text-align: right; font-weight: 650; }
.date-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Lecteur */
.reader-top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); margin: calc(-14px - var(--safe-t)) -16px 0; padding: calc(var(--safe-t) + 6px) 8px 6px; display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--line); }
.reader-top .rt-title { flex: 1; text-align: center; font-weight: 700; border: 0; background: none; font-size: 16.5px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.reader { font-family: Literata, Georgia, 'Times New Roman', serif; font-size: var(--read-size); line-height: 1.72; padding: 18px 6px 10px; }
.reader h2 { font-family: Literata, Georgia, serif; font-size: 1.5em; font-weight: 600; margin: 6px 0 4px; letter-spacing: -.01em; }
.reader .range-note { font-family: Inter, sans-serif; font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.reader .v { border-radius: 6px; padding: 1px 0; transition: background .15s; cursor: pointer; }
.reader .v sup { font-family: Inter, sans-serif; font-size: .58em; font-weight: 700; color: var(--primary); margin-right: 3px; vertical-align: .55em; }
.reader .v.sel { background: var(--gold-soft); box-shadow: 0 0 0 2px var(--gold-soft); }
.reader .v.hl { background: var(--primary-soft); box-shadow: 0 0 0 2px var(--primary-soft); }
.reader p.vp { margin: 0 0 .25em; }
.reader-nav { display: flex; gap: 10px; margin-top: 22px; }
.reader-nav .btn { flex: 1; }
.reader-cta { position: sticky; bottom: 0; padding: 12px 0 calc(12px + var(--safe-b)); background: linear-gradient(transparent, var(--bg) 35%); }
.sel-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + var(--safe-b)); z-index: 30; display: flex; gap: 6px; background: var(--ink); color: var(--bg); border-radius: 16px; padding: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.sel-bar button { border: 0; background: transparent; color: inherit; display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 11px; font-weight: 650; font-size: 14px; }
.sel-bar button:active { background: rgba(127, 127, 127, .25); }

/* Bible : livres et chapitres */
.book-list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.book-list a { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 550; }
.book-list a:last-child { border: 0; }
.book-list a span { color: var(--muted); font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 8px; }
.ch-grid a { aspect-ratio: 1; display: grid; place-items: center; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; font-weight: 650; font-size: 16px; }
.ch-grid a.last { background: var(--primary); color: var(--on-primary); }
.search { position: relative; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 42px; }

/* Carnet */
.note-card .nc-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.note-card .nc-ref { font-weight: 700; color: var(--primary); }
.note-card .nc-date { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.note-card .nc-text { margin-top: 8px; font-family: Literata, Georgia, serif; font-size: 16.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.note-card .nc-plan { margin-top: 10px; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }

/* Profil */
.list { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.list > * { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; color: var(--ink); text-decoration: none; font-size: 15.5px; }
.list > *:last-child { border-bottom: 0; }
.list .li-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); display: grid; place-items: center; flex: none; }
.list .li-val { color: var(--muted); font-size: 14px; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; background: var(--line); border-radius: 99px; transition: background .2s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(20px); }
.profile-head { display: flex; align-items: center; gap: 14px; }
.profile-head .avatar { width: 60px; height: 60px; font-size: 24px; }

/* Notifications */
.notice { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.notice:last-child { border: 0; }
.notice.unread { background: var(--primary-soft); }
.notice .nt { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Feuilles (bottom sheet) */
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(8, 12, 20, .45); display: flex; align-items: flex-end; justify-content: center; animation: bd .2s ease-out; }
@keyframes bd { from { opacity: 0; } }
.sheet { width: 100%; max-width: 560px; max-height: 92vh; max-height: 92dvh; overflow-y: auto; background: var(--bg); border-radius: 24px 24px 0 0; padding: 10px 18px calc(18px + var(--safe-b)); animation: up .24s cubic-bezier(.2, .8, .2, 1); }
@keyframes up { from { transform: translateY(40px); opacity: .5; } }
.sheet .grab { width: 40px; height: 5px; border-radius: 99px; background: var(--line); margin: 0 auto 14px; }
.sheet h3 { font-size: 20px; font-weight: 720; }
.sheet .sheet-sub { color: var(--ink-2); font-size: 14.5px; margin-top: 4px; }
.sheet .counter { text-align: right; font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Toast */
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(86px + var(--safe-b)); z-index: 60; background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-size: 14.5px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); max-width: calc(100% - 32px); text-align: center; animation: fade .2s; }

/* Célébration */
.celebrate { text-align: center; padding: 26px 16px; }
.celebrate .big { font-size: 54px; line-height: 1; }
.celebrate h3 { font-size: 22px; margin-top: 12px; }
.celebrate p { color: var(--ink-2); margin-top: 6px; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 70; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; animation: fall 1.6s ease-in forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(540deg); opacity: .8; } }

.install-card { display: flex; gap: 12px; align-items: center; }
.install-card img { width: 44px; height: 44px; border-radius: 12px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 14px; height: 76px; }
.skeleton + .skeleton { margin-top: 10px; }
@keyframes sk { to { background-position: -200% 0; } }

@media (min-width: 600px) {
  .screen { padding-top: 28px; }
}
