@font-face {
  font-family: "KFGQPC Warsh";
  src: url("KFGQPC-Warsh-Uthmanic.ttf") format("truetype");
  font-display: swap;
}
:root {
  --bg: #F6F7FB; --panel: #FFFFFF; --ink: #1A1F3D; --muted: #5D6382; --line: #E7E0CC;
  --accent: #2E3C96; --gold: #8A630F; --onaccent: #FFFFFF; --soft: #EBEEFB; --danger: #A83232;
  --fs: 1;
  color-scheme: light dark;
}
:root[data-theme="dark"] {
  --bg: #0E1230; --panel: #161B45; --ink: #F3EBD3; --muted: #A9AEC8; --line: #2C3470;
  --accent: #C9A24B; --gold: #C9A24B; --onaccent: #0E1230; --soft: #1E2559; --danger: #F0A0A0;
}
:root[data-theme="contrast"] {
  --bg: #000; --panel: #000; --ink: #FFF; --muted: #E6E6E6; --line: #FFF;
  --accent: #FFD700; --gold: #FFD700; --onaccent: #000; --soft: #1A1A1A; --danger: #FF9090;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 64px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: calc(17px * var(--fs)); line-height: 1.6;
  padding-top: calc(env(safe-area-inset-top, 0px) + 56px);
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 72px);
}
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--onaccent); padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 0; }
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; align-items: center; gap: .5rem;
  padding: calc(env(safe-area-inset-top, 0px) + .4rem) 1rem .4rem;
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.top h1 { font-size: 1.15rem; margin: 0; flex: 1; font-weight: 600; letter-spacing: .02em; }
.top .ar, .ar { font-family: "KFGQPC Warsh", "Amiri", "Traditional Arabic", serif; }
.net { font-size: .75rem; color: var(--muted); }
.iconbtn { font: inherit; background: none; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; min-width: 44px; min-height: 44px; cursor: pointer; font-size: 1.1rem; }
#main { max-width: 480px; margin: 0 auto; padding: 1rem 1rem 2rem; outline: none; }
.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex;
  background: var(--panel); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.tabs a {
  flex: 1; text-align: center; text-decoration: none; color: var(--muted);
  padding: .55rem .2rem; font-size: .78rem; min-height: 56px; border-top: 3px solid transparent;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem;
}
.tabs a .g { font-size: 1.25rem; line-height: 1; font-family: sans-serif; }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 700; border-top-color: var(--gold); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}
h2 { font-size: 1.5rem; margin: .2rem 0 .8rem; font-weight: 600; }
h3 { font-size: 1.15rem; margin: 1.4rem 0 .5rem; }
p { margin: .4rem 0 .8rem; }
.muted { color: var(--muted); font-size: .9rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; margin: 0 0 .9rem; }
.card h3:first-child { margin-top: 0; }
.callout { border-left: 4px solid var(--gold); background: var(--soft); padding: .7rem 1rem; border-radius: 0 8px 8px 0; margin: .9rem 0; font-size: .95rem; }
.callout.warn { border-left-color: var(--danger); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }

.tile { display: block; text-decoration: none; color: inherit; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1rem; min-height: 96px; }
.tile strong { display: block; font-size: 1.15rem; margin-bottom: .2rem; }
.tile span { color: var(--muted); font-size: .88rem; }
.btn { font: inherit; background: var(--accent); color: var(--onaccent); border: 0; border-radius: 10px; padding: .65rem 1.1rem; min-height: 44px; cursor: pointer; font-weight: 600; text-decoration: none; display: inline-block; }
.btn.alt { background: none; color: var(--ink); border: 1px solid var(--line); font-weight: 500; }
.btn.danger { background: none; color: var(--danger); border: 1px solid var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.row.between { justify-content: space-between; }
label.f { display: block; font-size: .9rem; color: var(--muted); margin: .9rem 0 .25rem; }
input[type=text], input[type=number], input[type=search], input[type=password], select, textarea {
  width: 100%; font: inherit; background: var(--bg); color: var(--ink);
  border: 1px solid var(--line); border-radius: 8px; padding: .6rem .7rem; min-height: 44px;
}
input[type=range] { width: 100%; }
.list { list-style: none; margin: 0; padding: 0; }
.list li a, .list li button.item {
  display: flex; align-items: center; gap: .8rem; width: 100%; text-align: left; font: inherit; color: inherit;
  text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: .6rem .9rem; margin-bottom: .45rem; min-height: 52px; cursor: pointer;
}
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 2.1rem; height: 2.1rem; border: 1px solid var(--gold); color: var(--gold); border-radius: 999px; font-size: .85rem; flex: none; }
.list .nm { flex: 1; }
.list .nm small { display: block; color: var(--muted); font-size: .8rem; }
.list .ar { font-size: 1.35rem; }
.bar { height: 8px; background: var(--soft); border-radius: 4px; overflow: hidden; margin-top: .4rem; }
.bar > i { display: block; height: 100%; background: var(--gold); }
.pill { display: inline-block; border: 1px solid var(--line); border-radius: 999px; padding: .15rem .7rem; font-size: .8rem; color: var(--muted); }

/* Lecture du Coran */
.mushaf { font-family: "KFGQPC Warsh", "Amiri", serif; direction: rtl; text-align: justify; text-align-last: center; line-height: 2.5; font-size: calc(26px * var(--fs)); padding: 1rem .8rem; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.mushaf .v { cursor: pointer; border-radius: 6px; padding: 0 .1em; }
.mushaf .v:hover { background: var(--soft); }
.mushaf .v.sel { background: var(--soft); outline: 1px solid var(--gold); }
.mushaf .v.mem { color: var(--gold); }
.mushaf .v.bm::after { content: " \25C6"; font-size: .6em; color: var(--gold); }
.mushaf .hide { color: transparent; text-shadow: 0 0 10px var(--muted); user-select: none; }
.mushaf .first { color: var(--ink); text-shadow: none; }
.suraHead { text-align: center; font-family: "KFGQPC Warsh", "Amiri", serif; font-size: calc(30px * var(--fs)); border: 1px solid var(--gold); border-radius: 10px; padding: .5rem; margin: 0 0 .8rem; color: var(--gold); }
.basmala { text-align: center; direction: rtl; font-family: "KFGQPC Warsh", "Amiri", serif; font-size: calc(28px * var(--fs)); margin: .2rem 0 .6rem; }
.pageTag { direction: ltr; text-align: center; display: block; font-family: "Source Serif 4", serif; font-size: .75rem; color: var(--muted); margin: .6rem 0; }
.sheet { position: sticky; bottom: calc(env(safe-area-inset-bottom, 0px) + 64px); background: var(--panel); border: 1px solid var(--gold); border-radius: 12px; padding: .7rem; margin-top: .8rem; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* Prières */
.prayers { display: grid; gap: .5rem; }
.prayer { display: flex; justify-content: space-between; align-items: center; padding: .65rem .9rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.prayer.next { border-color: var(--gold); background: var(--soft); font-weight: 700; }
.prayer .t { font-variant-numeric: tabular-nums; font-size: 1.2rem; }
.big { font-size: 2.2rem; font-variant-numeric: tabular-nums; font-weight: 600; line-height: 1.1; }
.compass { width: 220px; height: 220px; margin: .5rem auto; position: relative; border: 2px solid var(--gold); border-radius: 50%; }
.compass .needle { position: absolute; left: 50%; top: 8%; width: 4px; height: 42%; background: var(--gold); transform-origin: 50% 100%; margin-left: -2px; border-radius: 2px; }
.compass .dot { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px; background: var(--gold); border-radius: 50%; }
.compass .n { position: absolute; left: 50%; top: 2px; transform: translateX(-50%); font-size: .8rem; color: var(--muted); }
table.month { width: 100%; border-collapse: collapse; font-size: .85rem; font-variant-numeric: tabular-nums; }
table.month th, table.month td { padding: .35rem .3rem; border-bottom: 1px solid var(--line); text-align: center; }
table.month tr.today { background: var(--soft); font-weight: 700; }
.scroll { overflow-x: auto; }

/* Compteurs / enfant */
.counter { text-align: center; }
.counter .num { font-size: 3.4rem; font-variant-numeric: tabular-nums; font-weight: 700; }
.tap { width: 100%; min-height: 130px; font-size: 1.3rem; border-radius: 16px; border: 2px solid var(--gold); background: var(--soft); color: var(--ink); cursor: pointer; font: inherit; font-weight: 700; touch-action: manipulation; }
.tap:active { transform: scale(.985); }
.stars { font-size: 2rem; color: var(--gold); text-align: center; min-height: 2.4rem; letter-spacing: .2em; }
.kid .mushaf { font-size: calc(36px * var(--fs)); }
#toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 84px); background: var(--ink); color: var(--bg); padding: .6rem 1rem; border-radius: 10px; z-index: 50; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90vw; text-align: center; }
#toast.show { opacity: 1; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { .tabs, .top { display: none; } body { padding: 0; } }

/* v1.1 : lecture débutant, alphabet, niveaux */
.vcard { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; margin: 0 0 .8rem; }
.vcard.done { border-color: var(--gold); }
.ar-line { font-size: calc(30px * var(--fs)); line-height: 2.4; text-align: right; padding: .2rem 0; border: 0; background: none; }
.ph { font-size: calc(1.05rem * var(--fs)); color: var(--gold); font-style: italic; margin: .2rem 0; word-spacing: .15em; }
.trfr { margin: .3rem 0 .6rem; }
.chk-flag { font-style: normal; font-size: .72rem; border: 1px solid var(--danger); color: var(--danger); border-radius: 999px; padding: 0 .5rem; margin-left: .4rem; }
label.chk { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; font-size: .95rem; }
.lgrid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.lgrid { grid-template-columns: 1fr; }
.lcard { display: flex; gap: .8rem; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .6rem .8rem; }
.lcard .lg { font-size: 2.4rem; line-height: 1; min-width: 2.4rem; text-align: center; color: var(--gold); }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: .35rem 0; border-bottom: 1px solid var(--line); }
ul.plain li:last-child { border-bottom: 0; }
.big2 { font-size: 1.8rem; margin-right: .5rem; display: inline-block; min-width: 3rem; }

/* v1.2 : bienvenue, profils, objectifs du jour, khatm, parcours */
.salut { font-size: 1.15rem; font-weight: 600; margin: 0 0 .6rem; }
.steps { list-style: none; margin: .4rem 0 .8rem; padding: 0; counter-reset: st; }
.steps li { counter-increment: st; }
.steps li a { display: flex; align-items: center; gap: .7rem; padding: .5rem .1rem; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; min-height: 48px; }
.steps li:last-child a { border-bottom: 0; }
.steps li a::before { content: counter(st); display: inline-flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); font-size: .85rem; flex: none; }
.steps li.done a::before { content: "\2713"; background: var(--gold); color: var(--panel); }
.steps li .pt { margin-left: auto; color: var(--muted); font-size: .85rem; white-space: nowrap; }
.week { display: flex; gap: .35rem; margin-top: .7rem; }
.week span { flex: 1; text-align: center; font-size: .75rem; color: var(--muted); border: 1px solid var(--line); border-radius: 8px; padding: .3rem 0; }
.week span.on { border-color: var(--gold); background: var(--soft); color: var(--ink); font-weight: 700; }
.week span.today { outline: 2px solid var(--gold); outline-offset: 1px; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; margin: .6rem 0; }
.chip { font: inherit; min-height: 44px; padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; }
.chip.on { border-color: var(--gold); background: var(--soft); font-weight: 700; }
.tile.wide { grid-column: 1 / -1; min-height: 0; margin-bottom: .9rem; }
.tile.wide .bar { margin: .5rem 0 .3rem; }
.ob { text-align: center; padding-top: .6rem; }
.ob .obLogo { font-size: 4.2rem; color: var(--gold); line-height: 1.4; }
.ob .lead, .lead { font-size: 1.12rem; }
.ob ul.plain { text-align: left; margin: 1rem 0 1.4rem; }
.ob ul.plain li { padding: .6rem 0; }
.btn.big { font-size: 1.08rem; padding: .85rem 1.6rem; min-width: 62%; }
.who { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: .4rem 0 1rem; }
.who button { font: inherit; min-height: 56px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; font-weight: 600; }
.who button.sub { font-weight: 500; min-height: 48px; font-size: .95rem; }
.who button[aria-pressed="true"] { border-color: var(--gold); background: var(--soft); outline: 2px solid var(--gold); }
.prog { display: flex; align-items: center; gap: .6rem; margin: .1rem 0 1rem; }
.prog .bar { flex: 1; margin: 0; }
.mots { width: 100%; border-collapse: collapse; margin: .4rem 0; }
.mots td { padding: .5rem .3rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.mots td.a { font-family: "KFGQPC Warsh", "Amiri", "Traditional Arabic", serif; font-size: 1.7rem; direction: rtl; text-align: right; color: var(--gold); line-height: 1.7; }
.mots small { display: block; color: var(--muted); font-size: .8rem; }
.lesson p { font-size: 1.08rem; }
.vline { border-bottom: 1px solid var(--line); padding: .3rem 0 .6rem; }
.vline:last-child { border-bottom: 0; }
.hq { margin: 0 0 .6rem; padding: 0 0 0 .9rem; border-left: 4px solid var(--gold); font-size: 1.2rem; line-height: 1.5; }
.flashA { font-size: 2.5rem; color: var(--gold); line-height: 1.9; }
.qz fieldset { border: 1px solid var(--line); border-radius: 12px; padding: .6rem .9rem .4rem; margin: 0 0 .8rem; background: var(--panel); min-width: 0; }
.qz legend { font-weight: 600; padding: 0 .3rem; }
.qz label { display: flex; align-items: center; gap: .6rem; min-height: 44px; }
.qz .ok { color: var(--gold); font-weight: 700; font-size: .85rem; }
.qz .ko { color: var(--danger); font-size: .85rem; }
.flash { min-height: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; text-align: center; cursor: pointer; width: 100%; font: inherit; color: inherit; }
.flash .a { font-family: "KFGQPC Warsh", "Amiri", "Traditional Arabic", serif; font-size: 3rem; color: var(--gold); direction: rtl; line-height: 1.7; }
.list li.locked a { opacity: .55; }
details.card > summary { cursor: pointer; min-height: 32px; }
details.card ol { margin: .5rem 0 0; padding-left: 1.3rem; }

/* phonétique sous chaque verset dans la lecture continue (espace enfant) */
.mushaf .phx { display: block; direction: ltr; text-align: left; text-align-last: left; font-family: "Source Serif 4", Georgia, "Times New Roman", serif; font-size: calc(1rem * var(--fs)); line-height: 1.5; margin: 0 0 .7rem; }
.ph { overflow-wrap: anywhere; }

/* Même présentation sur ordinateur que sur téléphone : une colonne de la largeur d'un téléphone, centrée. */
.top, .tabs { max-width: 480px; margin-left: auto; margin-right: auto; }
#toast { max-width: min(440px, calc(100vw - 2rem)); }
@media (min-width: 481px) {
  html { background: var(--soft); }
  body { max-width: 480px; margin: 0 auto; min-height: 100vh; box-shadow: 0 0 0 1px var(--line), 0 8px 40px rgba(0, 0, 0, .08); }
  .top, .tabs { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}
/* compteur de points dans la barre du haut */
.pts { text-decoration: none; color: var(--ink); border: 1px solid var(--gold); background: var(--soft); border-radius: 999px; padding: .35rem .75rem; font-size: .85rem; font-weight: 700; white-space: nowrap; min-height: 36px; display: inline-flex; align-items: center; }
.top h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptsline { font-size: .95rem; }

/* lecteur : réglages sur une ligne, progression groupée */
.modeRow { display: grid; grid-template-columns: 1fr auto auto; gap: .5rem; align-items: center; margin: .7rem 0 .2rem; }
.modeRow select { width: 100%; max-width: none; margin: 0; }
.modeRow .btn { padding-left: .8rem; padding-right: .8rem; }
.prog2 .bar { margin: .5rem 0 .4rem; }
.ptsline { margin: .2rem 0 0; font-size: .92rem; }
.basmalaPh { text-align: center; margin: -.3rem 0 .9rem; }
.vcard.lu { border-left: 4px solid var(--gold); }

/* ================= v1.3 : structure reprise de MAARIFA ================= */
.plain-link, .plain-link:hover { color: inherit; text-decoration: none; display: block; }
.arr { font-family: sans-serif; color: var(--gold); font-weight: 700; }
.phead { margin: .2rem 0 .8rem; gap: .5rem; }
.phead .row { gap: .4rem; }
a.iconbtn { display: inline-flex; align-items: center; justify-content: center; color: var(--ink); }
.iconbtn svg, .ib svg { display: block; }
.center { text-align: center; }
.small.btn { min-height: 36px; padding: .3rem .8rem; font-size: .85rem; }
/* en-tête Quotidien */
.qhead { display: flex; align-items: center; gap: .8rem; margin: .2rem 0 .9rem; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: var(--onaccent); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem; text-decoration: none; flex: none; }
.avatar.big { width: 64px; height: 64px; font-size: 1.6rem; }
.salutM { font-size: 1.15rem; font-weight: 700; }
.lieu { display: inline-flex; align-items: center; gap: .25rem; text-decoration: none; }
/* carte principale (prochaine prière, continuer la lecture) */
.hero { display: block; background: var(--accent); color: var(--onaccent); border-radius: 16px; padding: 1rem 1.1rem; margin: 0 0 .9rem; text-decoration: none; }
.hero.center { text-align: center; }
.hero .hl { font-size: .85rem; opacity: .85; }
.hero .hn { font-size: 1.35rem; font-weight: 700; letter-spacing: .02em; }
.hero .ht { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.hero .hbig { font-size: 3rem; font-weight: 700; line-height: 1.1; }
.hero .hr { text-align: right; }
.hchip { display: inline-flex; align-items: center; gap: .3rem; border-radius: 999px; padding: .3rem .75rem; background: rgba(255,255,255,.14); color: inherit; font-size: .85rem; text-decoration: none; min-height: 32px; }
.hchip.light { background: var(--soft); color: var(--ink); }
.chips3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: .8rem 0 .2rem; }
.chips3 div { background: var(--soft); color: var(--ink); border-radius: 12px; padding: .4rem .5rem; text-align: center; }
.hero .chips3 div { background: rgba(255,255,255,.14); color: var(--onaccent); }
.chips3 span { display: block; font-size: .75rem; opacity: .8; }
.chips3 b { font-size: 1rem; }
/* prières à marquer */
.pchips { display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; margin: .6rem 0 0; }
.pchip { font: inherit; font-size: .78rem; min-height: 48px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; padding: .2rem; }
.pchip i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--gold); display: block; }
.pchip.on { background: var(--soft); border-color: var(--gold); font-weight: 700; }
.pchip.on i { background: var(--gold); }
/* explorer : trois tuiles */
.tiles3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: .6rem; }
.t3 { background: var(--soft); border-radius: 12px; padding: .6rem; text-decoration: none; color: var(--ink); min-height: 76px; display: flex; flex-direction: column; justify-content: space-between; }
.t3 b { font-size: .95rem; }
.t3 span { font-size: .8rem; color: var(--muted); }
/* objectifs du jour */
.stepsM { list-style: none; margin: .6rem 0 .8rem; padding: 0; }
.stepsM a { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; text-decoration: none; color: inherit; min-height: 44px; border-bottom: 1px solid var(--line); }
.stepsM li:last-child a { border-bottom: 0; }
.stepsM .nb { width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--gold); color: var(--panel); display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; font-weight: 700; flex: none; }
.stepsM li.done .nb { background: var(--accent); color: var(--onaccent); }
.stepsM li.done span:nth-child(2) { text-decoration: line-through; color: var(--muted); }
.stepsM .pt { margin-left: auto; color: var(--muted); font-size: .85rem; }
/* cartes à interrupteur */
.tcard { display: flex; align-items: center; justify-content: space-between; gap: .8rem; width: 100%; font: inherit; color: inherit; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .75rem 1rem; margin: 0 0 .6rem; min-height: 56px; cursor: pointer; }
.tcard small { display: block; color: var(--muted); font-size: .85rem; }
.tcard.soon { opacity: .65; cursor: default; }
.sw { appearance: none; -webkit-appearance: none; width: 48px; height: 28px; border-radius: 999px; background: var(--line); position: relative; flex: none; cursor: pointer; margin: 0; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.sw:checked { background: var(--accent); }
.sw:checked::after { left: 23px; }
.sw:disabled { opacity: .5; }
/* prière */
.datenav { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .5rem; text-align: center; margin: .9rem 0 .6rem; }
.plist { display: grid; gap: .45rem; }
.prow { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .7rem; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .35rem .9rem .35rem .4rem; min-height: 56px; }
.prow.next { background: var(--soft); border-color: var(--gold); font-weight: 700; }
.prow .t { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.bell { font: inherit; width: 44px; height: 44px; border-radius: 10px; border: 0; background: none; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.bell.on { color: var(--gold); }
.linkcard { display: flex; justify-content: space-between; align-items: center; gap: .6rem; text-decoration: none; color: inherit; margin-top: .9rem; background: var(--soft); }
.seg { display: flex; gap: .2rem; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: .7rem; }
.seg button { font: inherit; background: none; border: 0; border-bottom: 3px solid transparent; padding: .5rem .7rem; min-height: 44px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button[aria-selected="true"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--gold); }
.fiche { background: var(--accent); color: var(--onaccent); border-radius: 14px; padding: 1rem; margin-bottom: .9rem; }
.fiche h4 { margin: .8rem 0 .3rem; font-size: 1rem; }
.fiche .rk { display: flex; justify-content: space-between; gap: .6rem; background: rgba(255,255,255,.12); border-radius: 10px; padding: .55rem .8rem; margin: .3rem 0; font-size: .95rem; }
.fiche .rk span { opacity: .85; font-size: .85rem; text-align: right; }
.fiche .muted { color: inherit; opacity: .8; }
.reco a { font-weight: 700; color: var(--accent); }
.card.soft { background: var(--soft); }
.invrow { display: flex; align-items: center; justify-content: space-between; gap: .8rem; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; margin-bottom: .6rem; }
.ar.small { font-size: 1.4rem; text-align: left; }
.ring { --p: 0; flex: none; width: 74px; height: 74px; border-radius: 50%; border: 0; cursor: pointer; font: inherit; font-size: .85rem; font-weight: 700; color: var(--ink);
  background: radial-gradient(closest-side, var(--panel) 78%, transparent 80% 100%), conic-gradient(var(--gold) calc(var(--p) * 1%), var(--line) 0); }
/* feuille modale */
.mwrap { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.msheet { background: var(--bg); width: 100%; max-width: 480px; max-height: 85vh; overflow: auto; border-radius: 18px 18px 0 0; padding: 1rem 1rem calc(env(safe-area-inset-bottom, 0px) + 1rem); }
.seg2 { display: grid; grid-template-columns: 1fr 1fr; background: var(--soft); border-radius: 12px; padding: .25rem; margin: .8rem 0; }
.seg2 button, .seg3 button { font: inherit; border: 0; background: none; border-radius: 10px; min-height: 40px; cursor: pointer; color: var(--ink); }
.seg2 button[aria-selected="true"], .seg3 button[aria-pressed="true"] { background: var(--accent); color: var(--onaccent); font-weight: 700; }
.seg3 { display: inline-grid; grid-template-columns: 1fr 1fr; background: var(--soft); border-radius: 12px; padding: .2rem; min-width: 150px; }
/* Coran */
.hero.cont .ar { font-size: 1.4rem; }
.hero .two { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-top: .7rem; }
.hero .two > div { background: rgba(255,255,255,.12); border-radius: 10px; padding: .5rem .6rem; font-size: .9rem; }
.hero .bar { background: rgba(255,255,255,.25); margin: .35rem 0 0; }
.sgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.scard { position: relative; display: flex; flex-direction: column; gap: .15rem; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1.7rem .55rem .55rem; text-decoration: none; color: var(--ink); min-height: 112px; }
.scard b { font-size: .88rem; line-height: 1.25; }
.scard small { color: var(--muted); font-size: .75rem; line-height: 1.2; }
.scard .nv { margin-top: auto; font-size: .78rem; color: var(--muted); }
.scard .ck { position: absolute; top: .45rem; left: .55rem; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line); font-size: .7rem; display: flex; align-items: center; justify-content: center; }
.scard.done { border-color: var(--gold); }
.scard.done .ck { background: var(--gold); color: var(--panel); border-color: var(--gold); }
.scard[hidden] { display: none; }
.vcard .vrow { display: flex; align-items: center; gap: .25rem; margin-top: .5rem; border-top: 1px solid var(--line); padding-top: .4rem; }
.vrow .sp { flex: 1; }
.vpill { font: inherit; font-size: .85rem; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--muted); padding: .2rem .7rem; min-height: 36px; cursor: pointer; }
.vpill.on { border-color: var(--gold); color: var(--gold); background: var(--soft); font-weight: 700; }
.ib { font: inherit; width: 40px; height: 40px; border-radius: 10px; border: 0; background: none; color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.ib[aria-pressed="true"] { color: var(--gold); }
.vcard.bsm { text-align: center; }
.vcard.bsm .ph { text-align: center; }
.viewtog { position: sticky; bottom: calc(env(safe-area-inset-bottom, 0px) + 72px); margin: .8rem auto 0; width: max-content; display: flex; gap: .2rem; background: var(--ink); border-radius: 999px; padding: .25rem; z-index: 5; }
.viewtog button { font: inherit; width: 48px; height: 40px; border-radius: 999px; border: 0; background: none; color: var(--bg); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.viewtog button[aria-pressed="true"] { background: var(--gold); color: var(--ink); }
/* Apprendre */
.lead2 { font-size: 1.15rem; font-weight: 600; margin: .4rem 0 .1rem; }
.chipsH { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 .4rem; }
.chipsH .chip { text-decoration: none; display: inline-flex; align-items: center; font-size: .88rem; }
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: 72%; gap: .6rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .4rem; margin-bottom: .6rem; }
.ccard { scroll-snap-align: start; display: flex; flex-direction: column; gap: .3rem; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: .8rem .9rem; text-decoration: none; color: var(--ink); min-height: 120px; }
.ccard.cbig { background: var(--accent); color: var(--onaccent); min-height: 150px; margin-bottom: .8rem; }
.ccard.cbig .muted2, .ccard.cbig .dur { color: inherit; opacity: .85; }
.ccard b { font-size: 1.02rem; line-height: 1.3; }
.ccard .dur { font-size: .8rem; color: var(--muted); }
.muted2 { font-size: .85rem; color: var(--muted); margin-top: auto; }
.ccard.locked { opacity: .55; }
.ccard.done { border-color: var(--gold); }
.pill.gold { border-color: var(--gold); background: var(--soft); color: var(--ink); text-decoration: none; font-weight: 700; }
/* Plus et Profil */
.fcard { display: block; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: 12px; padding: .8rem 1rem; margin: 0 0 .6rem; text-decoration: none; color: var(--ink); }
.fcard > span { display: block; color: var(--muted); font-size: .9rem; margin-top: .2rem; }
.fcard .pill { margin-left: .3rem; font-size: .75rem; }
.lcardM { display: flex; justify-content: space-between; align-items: center; gap: .6rem; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .7rem 1rem; margin: 0 0 .5rem; min-height: 52px; text-decoration: none; color: var(--ink); }
.lcardM.danger span:first-child { color: var(--danger); }
.card.gold { background: var(--soft); border-color: var(--gold); }
.appid code { font-size: .75rem; word-break: break-all; }
/* premier lancement */
.obGlyph { font-size: 4rem; color: var(--gold); line-height: 1.3; margin: 1rem 0 .3rem; font-family: serif; }
.proj { list-style: none; padding: 0; margin: 1rem 0; text-align: left; }
.proj li { background: var(--accent); color: var(--onaccent); border-radius: 12px; padding: .8rem 1rem; margin-bottom: .5rem; }
.proj b { color: var(--gold); font-size: 1.2rem; }
.bigin { font-size: 1.6rem; text-align: center; margin: 1.2rem 0; }
.ob .prog { align-items: center; }
.cardprev { width: 100%; height: auto; border-radius: 12px; margin: .8rem 0; border: 1px solid var(--line); }
.scanv { width: 100%; border-radius: 12px; margin: .6rem 0; background: #000; }
.row.plain-link { display: flex; }

/* v1.4 : lecteur audio, coches, qibla */
.laychk { display: flex; gap: .8rem; flex-wrap: wrap; }
.trfr { margin: .35rem 0 0; font-size: calc(1rem * var(--fs)); line-height: 1.5; }
.vcard.playing { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold) inset; }
.pbar { position: fixed; left: 0; right: 0; margin: 0 auto; max-width: 480px; bottom: calc(env(safe-area-inset-bottom, 0px) + 60px); z-index: 25; display: flex; align-items: center; gap: .2rem; background: var(--ink); color: var(--bg); padding: .4rem .6rem; border-radius: 14px 14px 0 0; }
.pbar .pinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .85rem; line-height: 1.25; }
.pbar .pinfo span { opacity: .8; }
.pbar .ib { color: var(--bg); font-size: 1.05rem; }
.pbar .ib.big { background: var(--gold); color: var(--ink); border-radius: 50%; }
body:has(.pbar) #main { padding-bottom: 5rem; }
.hadp { background: var(--soft); }
.qdeg { font-size: 3.2rem; font-weight: 700; color: var(--accent); line-height: 1.1; }
.rose { position: relative; width: 240px; height: 240px; margin: 1rem auto .5rem; border-radius: 50%; border: 2px solid var(--gold); background: var(--panel); transition: transform .15s linear; }
.rose .tk { position: absolute; inset: 0; display: block; }
.rose .tk i { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); font-style: normal; font-size: .72rem; color: var(--muted); font-weight: 700; }
.rose .qneedle { position: absolute; left: 50%; top: 12%; width: 6px; height: 38%; margin-left: -3px; background: var(--accent); border-radius: 3px; transform-origin: 50% 100%; }
.rose .qneedle b { position: absolute; top: -1.6rem; left: 50%; transform: translateX(-50%); font-size: .75rem; color: var(--accent); white-space: nowrap; }
.rose .dot { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px; background: var(--gold); border-radius: 50%; }

/* v1.5 : langues */
.langs { margin: .3rem 0 .6rem; justify-content: center; }
.langs .chip { cursor: pointer; font: inherit; font-size: .9rem; }
.chip.on { border-color: var(--gold); background: var(--soft); font-weight: 700; }
.ph { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .ph { text-align: left; }
[dir="rtl"] .trfr { text-align: right; }
[dir="rtl"] .arr { display: inline-block; transform: scaleX(-1); }
[dir="rtl"] .stepsM .pt { margin-left: 0; margin-right: auto; }
:lang(zh-CN) body, [lang="zh-CN"] { font-family: "Source Serif 4", "Noto Serif SC", "Songti SC", "SimSun", serif; }
/* lien d'évitement sans débordement horizontal (indispensable en arabe, de droite à gauche) */
.skip { left: 0; right: auto; transform: translateY(-150%); }
.skip:focus { transform: none; }
html, body { overflow-x: hidden; }

/* ---------- v1.6 : guides, hors ligne, révision, jeûne, zakât ---------- */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .8rem; }
.grid2 > .card { margin: 0; }
ul.dots { list-style: disc; padding-left: 1.2rem; }
[dir="rtl"] ul.dots { padding-left: 0; padding-right: 1.2rem; }
ul.dots li { margin: .25rem 0; }
.small { font-size: .85rem; }
.btn.small { padding: .35rem .8rem; font-size: .9rem; min-height: 36px; }
.pill.st-ob { border-color: var(--gold); color: var(--ink); font-weight: 700; }
.pill.st-su { border-color: var(--green, #25307A); color: var(--ink); }
.pill.st-re { border-style: dashed; }
.pill.big { font-size: 1.2rem; padding: .3rem 1rem; }
.formule { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; margin: .5rem 0; }
.formule .ar-line { font-size: 1.5rem; line-height: 2.1; }
.formule .sens { margin-top: .3rem; }
ol.guide { list-style: none; padding: 0; margin: .5rem 0; }
ol.guide > li { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; margin: 0 0 .6rem; }
ol.guide > li p { margin: .35rem 0; }
table.rk5 td:nth-child(2) { text-align: center; font-weight: 700; }
dl.gloss { margin: .6rem 0; }
dl.gloss .gi { border-bottom: 1px solid var(--line); padding: .55rem 0; }
dl.gloss dt { margin: 0; }
dl.gloss dt .ar { font-size: 1.15rem; color: var(--gold); margin-left: .4rem; }
dl.gloss dd { margin: .2rem 0 0; color: var(--muted); }
.jgrid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .35rem; margin: .5rem 0; }
.jd { min-height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; cursor: pointer; }
.jd.on { background: var(--gold); color: #1b1405; border-color: var(--gold); font-weight: 700; }
.jd.today { outline: 2px solid var(--gold); outline-offset: 1px; }
.zres { margin-top: .8rem; }
.zres .rk, .card .rk { background: var(--soft); }
.rk.big b { font-size: 1.25rem; }
.audrow { padding: .55rem .8rem; }
.audrow small { display: block; }
.vcard.rev .btn { margin-top: .4rem; }
.lcard .ib { margin-left: auto; }
[dir="rtl"] .lcard .ib { margin-left: 0; margin-right: auto; }
#say { margin-left: auto; }
[dir="rtl"] #say { margin-left: 0; margin-right: auto; }
.card input[inputmode], .card input[type="search"], #gq { width: 100%; box-sizing: border-box; }
.card label.f + input + small { display: block; margin: .2rem 0 .4rem; }
.rk b { white-space: nowrap; }

/* ---------- v1.7 : palette claire, logo, mémorisé, enfants ---------- */
.hero { background: linear-gradient(135deg, #3A4BB0 0%, #5566C8 100%); color: #FFFFFF; }
.top { background: #FFFFFF; border-bottom: 1px solid var(--line); }
.tabs { background: #FFFFFF; }
.btn:not(.alt) { background: #2E3C96; color: #FFFFFF; }
.pill.gold, .pts { border-color: #E2B84B; background: #FFF6DD; color: #6B4E0E; }
.pill.mem { cursor: pointer; font: inherit; font-size: .75rem; background: transparent; color: var(--muted); }
.pill.mem.on { background: #EBEEFB; border-color: #2E3C96; color: #1F2870; font-weight: 700; }
.kidbox { background: #FFF8E6; border-color: #F0D79A; }
ol.kid { padding-left: 1.4rem; font-size: 1.05rem; }
[dir="rtl"] ol.kid { padding-left: 0; padding-right: 1.4rem; }
ol.kid li { margin: .3rem 0; }
details.evt summary { cursor: pointer; list-style: none; }
details.evt[open] { border-color: #2E3C96; }
ul.qv { columns: 2; margin: .2rem 0 0; }
.brand { height: 28px; width: auto; vertical-align: middle; }

/* ================================================================ v1.8 : audit et design */
.ic { display: block; }
.tabs a .g { font-family: inherit; }
.tabs a .g .ic { width: 24px; height: 24px; }
.top { background-image: url(img/pattern-light.svg); }
.hero { background: #1C2566 url(img/pattern-light.svg); background-size: 80px; }
.heroQ .hqx { display: flex; justify-content: space-between; gap: .6rem; align-items: flex-start; }
.heroQ .hn { font-size: 1.6rem; }
.heroQ .ht { font-size: 1.9rem; color: #F6E3A6; }
.heroQ .ht small { font-size: .85rem; color: #fff; opacity: .9; font-weight: 600; }
.hscene { width: 112px; height: 84px; object-fit: cover; border-radius: 14px; flex: none; }
.hhelp { font: inherit; font-size: .75rem; width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(255,255,255,.6); background: none; color: #fff; cursor: pointer; margin-left: .3rem; padding: 0; }
.pchipsQ { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .3rem; margin-top: .35rem; }
.pq { font: inherit; display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .45rem .1rem; border-radius: 12px; background: rgba(255,255,255,.12); color: #fff; border: 0; min-height: 44px; cursor: pointer; }
.pq span { font-size: .72rem; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pq b { font-size: .9rem; }
.pq i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); display: block; }
.pq.on i { background: #E9C46A; border-color: #E9C46A; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12l4 4 8-8' fill='none' stroke='%231C2566' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-size: 16px; background-position: center; background-repeat: no-repeat; }
.pq.pop i { animation: nurPop .26s ease-out; }
.objM .bar { margin: .5rem 0 .6rem; }
.ogrid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.ocell { display: flex; gap: .5rem; align-items: center; padding: .6rem; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-size: .88rem; line-height: 1.3; background: var(--panel); }
.ocell.done { background: var(--soft); }
.oi { flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.ocell.done .oi { background: #F6E3A6; color: #7F5A0C; }
.hcard { display: flex; gap: .7rem; align-items: center; }
.tiles2 { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: .9rem; }
.t2 { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; text-align: center; }
.t2 img { width: 100%; height: 84px; object-fit: contain; background: var(--soft); }
.t2 b { padding: .5rem; }
.lnk { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; font: inherit; cursor: pointer; }
.avatar .ic { margin: auto; }
/* grilles d'icônes groupées */
.ggrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem .4rem; margin-bottom: 1rem; }
.gico { display: flex; flex-direction: column; align-items: center; gap: .3rem; text-decoration: none; color: var(--ink); text-align: center; font-size: .78rem; line-height: 1.25; }
.gico span { width: 56px; height: 56px; border-radius: 16px; background: var(--soft); color: var(--accent); display: flex; align-items: center; justify-content: center; transition: transform .15s; }
.gico:active span { transform: scale(.94); }
.gico b { font-weight: 600; }
h3 { color: #7F5A0C; }
.prow { display: flex; align-items: center; gap: .8rem; }
.prow > div { flex: 1; }
/* Coran en liste */
.sord { margin: .2rem 0 .7rem; }
.sord button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.slist { list-style: none; margin: 0; padding: 0; }
.srow { display: grid; grid-template-columns: auto 1fr auto 18px; gap: .6rem; align-items: center; padding: .6rem .3rem; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.srow .nm { display: flex; flex-direction: column; min-width: 0; }
.srow .nm small { color: var(--muted); }
.srow .ar { font-family: "KFGQPC Warsh", "Amiri", serif; font-size: 1.25rem; color: var(--accent); }
.srow .badge, .etl .badge { width: 34px; height: 34px; border-radius: 50%; background: var(--soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; }
.srow.done .ck { color: #8A630F; }
/* Apprendre */
.lhead { display: flex; align-items: center; gap: .8rem; margin-bottom: .8rem; }
.lhead img { width: 72px; height: 54px; border-radius: 12px; object-fit: cover; flex: none; }
.lhead > div { flex: 1; }
.etl { list-style: none; padding: 0; margin: .6rem 0; }
.etl a { display: flex; gap: .7rem; align-items: center; padding: .55rem .2rem; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.etl a.locked { opacity: .55; }
.etl .nm { display: flex; flex-direction: column; }
.etl .nm small { color: var(--muted); }
.etl a.done .badge { background: #F6E3A6; color: #7F5A0C; }
/* Prière */
.bst { display: block; font-size: .72rem; color: var(--muted); font-weight: 400; }
.bell.on { color: #8A630F; }
.bell:not(.on) { color: var(--muted); opacity: .8; }
details.fold > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.fold > summary::after { content: "+"; font-size: 1.3rem; color: var(--accent); }
details.fold[open] > summary::after { content: "−"; }
.seg button { white-space: nowrap; font-size: .82rem; padding-left: .35rem; padding-right: .35rem; }
.ecole { display: flex; gap: .5rem; align-items: flex-start; background: #FFF6E0; border: 1px solid #EED9A4; color: #5B4410; border-radius: 12px; padding: .55rem .7rem; font-size: .85rem; margin: .5rem 0 .8rem; }
.ecole .ic { flex: none; margin-top: .1rem; }
/* accueil */
.oblogo { width: 140px; display: block; margin: .5rem auto 0; animation: nurGlow 2.4s ease-out 1; }
.projG { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; text-align: center; }
.projG div { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: .7rem .4rem; }
.projG b { display: block; font-size: 1.8rem; color: var(--accent); }
.projG span { font-size: .85rem; color: var(--ink); }
.ob .chip.on { background: var(--accent); color: #fff; }
/* animations sobres */
@keyframes nurGlow { from { filter: drop-shadow(0 0 0 rgba(233,196,106,0)); opacity: .6; } 50% { filter: drop-shadow(0 0 18px rgba(233,196,106,.9)); opacity: 1; } to { filter: drop-shadow(0 0 0 rgba(233,196,106,0)); } }
@keyframes nurPop { 0% { transform: scale(.6); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes nurIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#main > * { animation: nurIn .25s ease-out both; }
.bar i { transition: width .6s ease; }
.top h1 .brand { animation: nurGlow 2.4s ease-out 1; }
@media (prefers-reduced-motion: reduce) { #main > *, .oblogo, .top h1 .brand, .pq.pop i { animation: none !important; } }
/* grands écrans : menu latéral et deux colonnes */
@media (min-width: 900px) {
  html { background: var(--bg); }
  body { max-width: none; margin: 0; box-shadow: none; padding-bottom: 0; padding-left: 220px; }
  .top { max-width: none; left: 220px; border: 0; border-bottom: 1px solid var(--line); }
  .tabs { top: 0; bottom: 0; right: auto; width: 220px; max-width: none; flex-direction: column; justify-content: flex-start; padding-top: 72px; border-top: 0; border-right: 1px solid var(--line); background: #FFFFFF; }
  .tabs a { flex: none; flex-direction: row; justify-content: flex-start; gap: .7rem; padding: .7rem 1.2rem; font-size: .95rem; border-top: 0; border-left: 4px solid transparent; }
  .tabs a[aria-current="page"] { border-left-color: var(--gold); background: var(--soft); }
  #main { max-width: 980px; padding: 1.5rem 2rem 3rem; }
  body[data-r="#/"] #main { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.2rem; align-items: start; }
  body[data-r="#/"] #main > .qhead, body[data-r="#/"] #main > .heroQ { grid-column: 1 / -1; }
  .ggrid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .slist { columns: 2; column-gap: 2rem; }
  .slist li { break-inside: avoid; }
  #toast { left: calc(50% + 110px); }
}
body.enfant .tabs { background: var(--panel); }
.dots span + span::before { content: " · "; }

/* ================================================================ v1.9 : astrolabe, ambiances du moment */
body { font-variant-numeric: tabular-nums; }
.moment { display: flex; flex-direction: column; gap: .1rem; margin: 0 0 .7rem; padding: .2rem .2rem .2rem .8rem; border-left: 3px solid var(--gold); }
.moment b { font-size: 1.15rem; letter-spacing: .01em; }
.moment span { color: var(--muted); }
.moment .lnk { align-self: flex-start; font-size: .92rem; }
.heroQ { position: relative; border: 1px solid rgba(233,196,106,.45); box-shadow: inset 0 0 0 4px rgba(255,255,255,.05), inset 0 0 0 5px rgba(233,196,106,.25); }
.heroQ::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; border: 1px dashed rgba(246,227,166,.35); box-shadow: 0 0 0 14px rgba(246,227,166,.05), 0 0 0 15px rgba(246,227,166,.2); pointer-events: none; }
.heroQ .hqx { position: relative; z-index: 1; }
.heroQ .ht { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .03em; }
body[data-moment="aube"] .hero { background: linear-gradient(160deg, #2B3A67 0%, #8E6A8F 55%, #E9A88C 100%); }
body[data-moment="matin"] .hero { background: #2E3C96 url(img/pattern-light.svg); background-size: 80px; }
body[data-moment="jour"] .hero { background: #1C2566 url(img/pattern-light.svg); background-size: 80px; }
body[data-moment="soir"] .hero { background: linear-gradient(160deg, #7A3B2E 0%, #C46A3C 55%, #E9C46A 100%); }
body[data-moment="nuit"] .hero { background: radial-gradient(circle at 80% 10%, #3B4C86 0%, #1B2A4A 55%, #121C33 100%); }
body[data-moment="aube"] .moment { border-left-color: #C77B8A; }
body[data-moment="soir"] .moment { border-left-color: #C46A3C; }
body[data-moment="nuit"] .moment { border-left-color: #3B4C86; }
.astro { --p: 0; width: 62px; height: 62px; border-radius: 50%; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
  background: radial-gradient(closest-side, var(--panel) 72%, transparent 73% 100%), conic-gradient(#C9A24B calc(var(--p) * 1%), #E7E0CC 0); position: relative; }
.astro::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 1px dashed rgba(154,111,18,.35); }
.astro b { font-size: 1.15rem; color: #7F5A0C; }
.astro small { font-size: .65rem; color: var(--muted); }
.jspec { display: flex; gap: .7rem; align-items: flex-start; background: #FFF6E0; border-color: #EED9A4; }
.assez { background: linear-gradient(135deg, #EBEEFB, #FFF6E0); border-color: #C9A24B; text-align: center; }
.assez strong { font-size: 1.1rem; }
.grace { margin: -.3rem 0 .8rem; }
.card { border-radius: 16px; }
h2, .salutM, .moment b { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; }
/* profil enfant : plus vif, lanterne */
body[data-prof="garcon"] .moment, body[data-prof="fille"] .moment { border-left: 0; padding-left: 3.2rem; background: url(img/ill-lanterne.svg) left center / 44px no-repeat; min-height: 52px; }
body[data-prof="garcon"] .ocell, body[data-prof="fille"] .ocell { border-width: 2px; }
body[data-prof="garcon"] { --soft: #E3F1FA; }
body[data-prof="fille"] { --soft: #FBEDEA; }
.heroQ .ht { font-size: 1.75rem; white-space: nowrap; }
.heroQ .ht small { font-family: inherit; letter-spacing: 0; }

/* ================================================================ v2.0 */
.constel { width: 100%; height: auto; display: block; margin: .6rem 0 .3rem; border-radius: 16px; }
.qcard .bar { margin: .5rem 0 0; }
.ngrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.ncard { background: var(--panel); border: 1px solid #EED9A4; border-radius: 14px; padding: .5rem .4rem; text-align: center; box-shadow: inset 0 0 0 3px #FFF6E0; }
.ncard summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.ncard .nn { font-size: .7rem; color: var(--muted); }
.ncard .nar { font-family: "KFGQPC Warsh", "Amiri", serif; font-size: 1.25rem; color: #7F5A0C; line-height: 1.6; }
.ncard .ph { font-size: .75rem; }
.ncard p { font-size: .82rem; margin: .3rem 0 0; }
.ncard.locked { background: var(--soft); border-style: dashed; box-shadow: none; opacity: .7; }
.ncard.locked .nar { color: var(--muted); }
.glyph { font-family: "KFGQPC Warsh", "Amiri", serif; font-size: 5rem; text-align: center; color: var(--accent); line-height: 1.6; margin: .5rem 0; }
.gopt { font: inherit; justify-content: center; cursor: pointer; min-height: 56px; }
.gopt .nar { font-family: "KFGQPC Warsh", "Amiri", serif; font-size: 1.3rem; }
.ocell.bad, .vo.bad { border-color: #D9827B; background: #FBEDEA; }
.vord { display: flex; flex-direction: column; gap: .5rem; }
.vo { font: inherit; display: flex; gap: .6rem; align-items: center; text-align: right; padding: .6rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); cursor: pointer; }
.vo .ar { flex: 1; font-family: "KFGQPC Warsh", "Amiri", serif; font-size: 1.25rem; line-height: 1.9; }
.vo .nn { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; }
.vo.done { background: var(--soft); opacity: .75; }
.vo.done .nn { background: #F6E3A6; color: #7F5A0C; }
@media (min-width: 900px) { .ngrid { grid-template-columns: repeat(6, minmax(0, 1fr)); } .constel { max-width: 520px; } }

/* ================================================================ v2.0 : fond vivant selon le moment, sur toutes les pages */
html { background: var(--bg); }
body { background: transparent; }
body::before { content: ""; position: fixed; inset: 0; z-index: -2; transition: background 1.2s ease;
  background: linear-gradient(180deg, var(--sky1, #F6F7FB) 0%, var(--sky2, #F6F7FB) 100%); }
body::after { content: ""; position: fixed; inset: -80px; z-index: -1; pointer-events: none; opacity: .5;
  background-image: var(--skyfx, none), url(img/pattern-gold.svg); background-size: 100% 100%, 120px 120px;
  animation: nurDrift 90s linear infinite; }
@keyframes nurDrift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-120px, -120px, 0); } }
body[data-moment="aube"] { --sky1: #F4E4EE; --sky2: #FBEBDD; --skyfx: radial-gradient(circle at 50% 110%, rgba(242,180,155,.55), transparent 55%); }
body[data-moment="matin"] { --sky1: #FFF7E2; --sky2: #F6F7FB; --skyfx: radial-gradient(circle at 85% 0%, rgba(255,217,122,.55), transparent 45%); }
body[data-moment="jour"] { --sky1: #EEF0FA; --sky2: #F6F7FB; --skyfx: radial-gradient(circle at 50% -10%, rgba(255,233,168,.5), transparent 50%); }
body[data-moment="soir"] { --sky1: #FCE6D4; --sky2: #FFF3E3; --skyfx: radial-gradient(circle at 20% 105%, rgba(196,106,60,.35), transparent 55%); }
body[data-moment="nuit"] { --sky1: #DDE4F3; --sky2: #EEF1F8; --skyfx: radial-gradient(circle at 80% 5%, rgba(59,76,134,.25), transparent 45%); }
#main { background: transparent; }
.top { background-color: color-mix(in srgb, var(--sky1, #F6F7FB) 88%, #fff); backdrop-filter: blur(6px); transition: background-color 1.2s; }
.tabs { background: color-mix(in srgb, var(--sky2, #fff) 70%, #fff) !important; backdrop-filter: blur(6px); }
/* étoiles scintillantes la nuit et à l'aube */
.skyfx { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.skyfx i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #C9A24B; opacity: 0; animation: nurTwinkle 4s ease-in-out infinite; }
body:not([data-moment="nuit"]):not([data-moment="aube"]) .skyfx i { display: none; }
@keyframes nurTwinkle { 0%, 100% { opacity: 0; transform: scale(.6); } 50% { opacity: .8; transform: scale(1.2); } }
/* halo du soleil le jour, lanterne qui respire le soir */
.skyfx b { position: absolute; width: 260px; height: 260px; border-radius: 50%; right: -80px; top: -60px; background: radial-gradient(circle, rgba(255,217,122,.45), transparent 65%); animation: nurBreath 8s ease-in-out infinite; }
body[data-moment="soir"] .skyfx b { right: auto; left: -90px; top: auto; bottom: 40px; background: radial-gradient(circle, rgba(196,106,60,.35), transparent 65%); }
body[data-moment="nuit"] .skyfx b { background: radial-gradient(circle, rgba(246,227,166,.55), transparent 60%); width: 140px; height: 140px; right: 24px; top: 70px; }
@keyframes nurBreath { 0%, 100% { transform: scale(1); opacity: .8; } 50% { transform: scale(1.12); opacity: 1; } }
/* dynamique des cartes */
.card, .ocell, .gico span, .srow, .ncard { transition: transform .18s ease, box-shadow .18s ease; }
.card:active, .ocell:active, .ncard:active { transform: scale(.985); }
@media (hover: hover) { .card.plain-link:hover, .ocell:hover, .ncard:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(28,37,102,.10); } }
#main > * { animation: nurIn .35s cubic-bezier(.2,.7,.2,1) both; }
#main > *:nth-child(2) { animation-delay: .04s; } #main > *:nth-child(3) { animation-delay: .08s; } #main > *:nth-child(4) { animation-delay: .12s; } #main > *:nth-child(5) { animation-delay: .16s; }
.hscene { animation: nurFloat 6s ease-in-out infinite; }
@keyframes nurFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.constel circle { animation: nurTwinkle 5s ease-in-out infinite; opacity: .9; }
.constel circle:nth-child(3n) { animation-delay: 1.3s; } .constel circle:nth-child(5n) { animation-delay: 2.6s; }
.astro { transition: background .8s ease; }
@media (prefers-reduced-motion: reduce) { body::after, .skyfx i, .skyfx b, .hscene, .constel circle, #main > * { animation: none !important; } }
@media (min-width: 900px) { .tabs { background: color-mix(in srgb, var(--sky1, #fff) 60%, #fff) !important; } }

/* ================================================================ v2.0.1 : image et message du moment sur toutes les pages */
.skyfx .sk-cloud { position: absolute; width: 220px; height: 40px; border-radius: 40px; background: rgba(255,255,255,.8); filter: blur(6px); left: -260px; animation: skCloud 70s linear infinite; }
.skyfx .sk-cloud.c1 { top: 16%; } .skyfx .sk-cloud.c2 { top: 32%; width: 160px; animation-duration: 95s; animation-delay: -40s; }
body[data-moment="nuit"] .skyfx .sk-cloud { opacity: .15; } body[data-moment="soir"] .skyfx .sk-cloud, body[data-moment="aube"] .skyfx .sk-cloud { background: rgba(255,236,224,.75); }
@keyframes skCloud { from { transform: translateX(0); } to { transform: translateX(calc(100vw + 520px)); } }
.skyfx .sk-city { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 96px; opacity: .13; fill: #2E3C96; transition: fill 1.2s; }
body[data-moment="aube"] .skyfx .sk-city { fill: #8E6A8F; } body[data-moment="matin"] .skyfx .sk-city { fill: #8A630F; } body[data-moment="soir"] .skyfx .sk-city { fill: #7A3B2E; } body[data-moment="nuit"] .skyfx .sk-city { fill: #3B4C86; opacity: .2; }
.skyfx i { width: 3px; height: 3px; }
body[data-moment="nuit"] .skyfx i { background: #5B6BA8; box-shadow: 0 0 6px #8E9CD8; }
#momline { position: fixed; z-index: 19; left: 0; right: 0; max-width: 480px; margin: 0 auto; top: calc(env(safe-area-inset-top, 0px) + 56px); padding: .22rem .7rem; text-align: center; font-size: .76rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: color-mix(in srgb, var(--sky1, #F6F7FB) 75%, #fff); border-bottom: 1px solid var(--line); animation: nurIn .6s ease-out; transition: background 1.2s; }
body.home #momline, body:has(.ob) #momline { display: none; }
body:not(.home) { padding-top: calc(env(safe-area-inset-top, 0px) + 82px); }
@media (min-width: 900px) { #momline { left: 220px; max-width: none; } }
@media (prefers-reduced-motion: reduce) { .skyfx .sk-cloud, #momline { animation: none !important; } }
/* v2.0.2 : cocher une prière oubliée */
.pck { font: inherit; flex: none; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--accent); background: var(--panel); cursor: pointer; margin-right: .3rem; padding: 0; }
.pck.on { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12l4 4 8-8' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; animation: nurPop .26s ease-out; }

/* ================================================================ v2.1 : écrans qui se calent, taille adaptée au téléphone */
html.snap { scroll-snap-type: y mandatory; scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 82px); }
body.home { --_pt: 56px; }
html.snap .scr { scroll-snap-align: start; min-height: var(--scrH, 70vh); display: flex; flex-direction: column; justify-content: flex-start; padding-bottom: .4rem; }
html.snap .scr > *:last-child { margin-bottom: 0; }
html.snap #main { padding-bottom: .5rem; }
#sdots { position: fixed; right: 5px; top: 50%; transform: translateY(-50%); z-index: 18; display: flex; flex-direction: column; gap: 7px; }
#sdots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(46,60,150,.25); transition: all .25s; cursor: pointer; }
#sdots i.on { background: #2E3C96; height: 18px; border-radius: 4px; }
/* miniaturisation selon la hauteur de l'écran */
@media (max-height: 760px) {
  body { font-size: calc(15.5px * var(--fs)); line-height: 1.5; }
  .card { padding: .7rem .85rem; margin-bottom: .6rem; }
  .heroQ { padding: .75rem .9rem; }
  .heroQ .hn { font-size: 1.35rem; } .heroQ .ht { font-size: 1.5rem; }
  .hscene { width: 92px; height: 66px; }
  .pq { min-height: 40px; padding: .3rem .1rem; }
  .moment { margin-bottom: .45rem; } .moment span { font-size: .9rem; }
  .ocell { padding: .45rem; font-size: .82rem; } .oi { width: 30px; height: 30px; }
  .gico span { width: 48px; height: 48px; border-radius: 14px; } .ggrid { gap: .5rem .3rem; margin-bottom: .6rem; }
  .astro { width: 54px; height: 54px; }
  h2 { font-size: 1.3rem; margin: .3rem 0 .5rem; } h3 { margin: .6rem 0 .4rem; }
  .constel { max-height: 110px; }
  .t2 img { height: 66px; }
}
@media (max-height: 660px) {
  body { font-size: calc(14.5px * var(--fs)); }
  .qhead .avatar { width: 40px; height: 40px; }
  .heroQ .ht { font-size: 1.35rem; } .hscene { width: 76px; height: 56px; }
  .pq b { font-size: .82rem; } .pq span { font-size: .66rem; }
  .gico span { width: 42px; height: 42px; } .gico { font-size: .72rem; }
  .tabs a { min-height: 50px; font-size: .72rem; }
  .srow { padding: .45rem .2rem; }
}
@media (prefers-reduced-motion: reduce) { #sdots i { transition: none; } }

/* ================================================================ v2.2 : vraies pages, transitions de haut niveau */
html.snap { scroll-snap-type: y mandatory; scroll-padding-top: var(--scrTop, 82px); scroll-behavior: smooth; }
html.snap #main { padding-top: .4rem; }
html.snap .scr { scroll-snap-align: start; scroll-snap-stop: always; position: relative; min-height: calc(var(--scrH, 70vh) - 6px); margin: 0 0 18px; padding: 1.4rem .85rem .9rem; border-radius: 26px;
  background: rgba(255,255,255,.42); border: 1px solid rgba(255,255,255,.75); box-shadow: 0 10px 30px rgba(28,37,102,.10), inset 0 1px 0 rgba(255,255,255,.9); backdrop-filter: blur(10px);
  transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .45s ease, box-shadow .45s ease; transform-origin: 50% 0; }
html.snap .scr:not(.in) { opacity: .45; transform: scale(.93) translateY(10px); box-shadow: 0 2px 8px rgba(28,37,102,.05); }
html.snap .scr.in > *:not(.scrNum):not(.swipeHint) { animation: scrIn .5s cubic-bezier(.2,.8,.2,1) both; }
html.snap .scr.in > *:nth-child(3) { animation-delay: .06s; } html.snap .scr.in > *:nth-child(4) { animation-delay: .12s; } html.snap .scr.in > *:nth-child(n+5) { animation-delay: .18s; }
@keyframes scrIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.scrNum { position: absolute; top: .45rem; right: .9rem; font-size: .68rem; letter-spacing: .08em; color: #7F5A0C; background: rgba(246,227,166,.55); border-radius: 999px; padding: .05rem .5rem; }
.swipeHint { font: inherit; margin: auto auto .2rem; display: flex; flex-direction: column; align-items: center; gap: 0; background: none; border: 0; color: var(--accent); font-size: .78rem; font-weight: 600; cursor: pointer; }
.swipeHint b { font-size: 1.4rem; line-height: .8; animation: hintUp 1.4s ease-in-out infinite; }
@keyframes hintUp { 0%, 100% { transform: translateY(4px); opacity: .5; } 50% { transform: translateY(-4px); opacity: 1; } }
#sdots { right: 4px; gap: 8px; } #sdots i { width: 6px; height: 6px; } #sdots i.on { height: 22px; background: linear-gradient(#2E3C96, #C9A24B); }
/* changement de page : glissement latéral selon l'onglet */
#main.fromR { animation: pgR .38s cubic-bezier(.2,.8,.2,1); } #main.fromL { animation: pgL .38s cubic-bezier(.2,.8,.2,1); } #main.fromB { animation: pgB .32s cubic-bezier(.2,.8,.2,1); }
@keyframes pgR { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes pgL { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
@keyframes pgB { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
.tabs a { transition: color .2s; } .tabs a .g { transition: transform .25s cubic-bezier(.2,.8,.2,1); } .tabs a[aria-current="page"] .g { transform: translateY(-3px) scale(1.12); color: var(--accent); }
.tabs a[aria-current="page"]::after { content: ""; position: absolute; bottom: 6px; width: 5px; height: 5px; border-radius: 50%; background: #C9A24B; }
.tabs a { position: relative; }
button:active, .btn:active, a.card:active { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) { html.snap { scroll-behavior: auto; } html.snap .scr, html.snap .scr > *, #main, .swipeHint b, .tabs a .g { animation: none !important; transition: none !important; } html.snap .scr:not(.in) { opacity: 1; transform: none; } }
html.snap { scroll-snap-type: none !important; }
/* v2.2 : contenu ajusté et cadré dans chaque page */
html.snap .scr { min-height: calc(var(--scrH, 70vh) - 6px); }
html.snap .scr.fitS { justify-content: space-between; }
html.snap .scr.fitC { justify-content: center; gap: .4rem; }
html.snap .scr.fitS > *, html.snap .scr.fitC > * { margin-bottom: 0; }
html.snap .scr.fitS { gap: .55rem; }
html.snap .scr > .scrNum { margin: 0; }
html.snap .scr::before { content: ""; position: absolute; inset: 7px; border-radius: 20px; border: 1px solid rgba(201,162,75,.28); pointer-events: none; }
html.snap .scr.long { border-radius: 26px 26px 0 0; }
/* v2.3 : zones tactiles d'au moins 36 px (recommandation d'accessibilité) */
#main button, #main .btn, #main .chip, #main select, #main input:not([type=checkbox]):not([type=radio]), #main summary, #main .pill.mem { min-height: 36px; }
#main .lnk { display: inline-block; padding: .35rem 0; }
#main .pill.mem { display: inline-flex; align-items: center; padding: 0 .8rem; }
/* v2.4 : sauvegarde mensuelle et invitation à installer */
.card.bkp, .card.inst { border: 1px solid #C9A24B; background: linear-gradient(135deg, #FFF6E0, #FFFFFF); }
.card.inst { background: linear-gradient(135deg, #EBEEFB, #FFFFFF); border-color: #2E3C96; }

/* ================================================================ v2.5 : design avant-gardiste, spirituel et sobre */
:root { --gold1: #E9C46A; --gold2: #B8893A; --em1: #2E3C96; --em2: #1C2566; --glass: rgba(255,255,255,.62); --hair: rgba(184,137,58,.35); }
/* titres : capitales espacées et filet doré, comme une enluminure */
#main h3 { font-family: inherit; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: #8A6516; display: flex; align-items: center; gap: .6rem; margin: 1rem 0 .6rem; }
#main h3::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--hair), transparent); }
#main h2 { letter-spacing: -.01em; }
/* cartes de verre au liseré lumineux */
.card { position: relative; background: var(--glass); backdrop-filter: blur(14px) saturate(1.2); border: 1px solid rgba(255,255,255,.8); box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 8px 28px rgba(28,37,102,.08); }
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(233,196,106,.55), rgba(46,60,150,.12) 40%, rgba(255,255,255,0) 60%, rgba(233,196,106,.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
/* boutons : émeraude, reflet qui passe */
.btn:not(.alt) { position: relative; overflow: hidden; border: 0; border-radius: 999px; background: linear-gradient(135deg, var(--em1), var(--em2)); box-shadow: 0 6px 18px rgba(28,37,102,.28), inset 0 1px 0 rgba(255,255,255,.25); letter-spacing: .01em; }
.btn:not(.alt)::before { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg); animation: sheen 5.5s ease-in-out infinite; }
@keyframes sheen { 0%, 70% { left: -60%; } 100% { left: 130%; } }
.btn.alt { border-radius: 999px; background: rgba(255,255,255,.7); border: 1px solid var(--hair); color: var(--em2); }
/* encadré de prière : anneau d'astrolabe qui tourne lentement, rayons de lumière */
.heroQ { overflow: hidden; border-radius: 24px; }
.heroQ::before { content: ""; position: absolute; width: 260px; height: 260px; right: -70px; top: -90px; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(246,227,166,.22) 0 2deg, transparent 2deg 15deg); -webkit-mask: radial-gradient(circle, transparent 54%, #000 55%, #000 70%, transparent 71%); mask: radial-gradient(circle, transparent 54%, #000 55%, #000 70%, transparent 71%); animation: astro 80s linear infinite; }
@keyframes astro { to { transform: rotate(360deg); } }
.heroQ .hn { font-size: 1.75rem; letter-spacing: .02em; }
.heroQ .ht { background: linear-gradient(180deg, #FFF3C9, #E9C46A); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; }
.heroQ .ht small { -webkit-text-fill-color: #fff; color: #fff; }
.pq { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(4px); }
.pq.on { background: rgba(233,196,106,.18); border-color: rgba(233,196,106,.55); }
/* tuiles d'icônes : verre teinté et halo doré au toucher */
.gico span { background: radial-gradient(circle at 30% 25%, #FFFFFF, #EBEEFB 70%); border: 1px solid rgba(46,60,150,.14); box-shadow: 0 6px 16px rgba(28,37,102,.10), inset 0 1px 0 #fff; color: var(--em2); }
.gico:hover span, .gico:focus-visible span { box-shadow: 0 0 0 2px rgba(233,196,106,.6), 0 10px 24px rgba(28,37,102,.16); }
.oi { background: radial-gradient(circle at 30% 25%, #fff, #EBEEFB 75%); border: 1px solid rgba(46,60,150,.12); }
/* nombres : dorés */
.astro b, .projG b, .pill.gold { background: linear-gradient(180deg, #C9A24B, #8A6516); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pill.gold { border: 1px solid var(--hair); background-color: transparent; }
/* barre d'onglets : dock flottant de verre */
@media (max-width: 899px) {
  .tabs { left: 10px; right: 10px; bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); border-radius: 22px; border: 1px solid rgba(255,255,255,.85); box-shadow: 0 12px 30px rgba(28,37,102,.16); background: rgba(255,255,255,.78) !important; backdrop-filter: blur(16px) saturate(1.3); padding-bottom: 0; max-width: 460px; }
  body { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 86px); }
  .tabs a { min-height: 58px; border-top: 0; }
}
.tabs a[aria-current="page"] .g { color: var(--em1); filter: drop-shadow(0 0 6px rgba(233,196,106,.7)); }
.tabs a[aria-current="page"]::after { width: 18px; height: 3px; border-radius: 3px; bottom: 5px; background: linear-gradient(90deg, var(--gold1), var(--gold2)); box-shadow: 0 0 8px rgba(233,196,106,.8); }
/* barre du haut : plus légère */
.top { background-image: none !important; border-bottom: 1px solid rgba(184,137,58,.18); }
.top h1 { letter-spacing: .12em; font-weight: 700; }
/* message du moment : ligne fine, typographie espacée */
#momline { font-size: .7rem; letter-spacing: .06em; border-bottom: 1px solid rgba(184,137,58,.18); }
/* pages calées : filet lumineux qui respire sur la page active */
html.snap .scr.in::before { border-color: rgba(201,162,75,.45); box-shadow: 0 0 22px rgba(233,196,106,.18) inset; }
/* listes : rangées aérées */
.srow, .etl a { border-bottom-color: rgba(184,137,58,.15); }
.srow .badge, .etl .badge { background: transparent; border: 1px solid rgba(46,60,150,.35); box-shadow: inset 0 0 0 3px rgba(228,244,239,.9); }
small.cons { display: block; color: #8A6516; font-size: .72rem; }
/* focus visible doré */
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold1); outline-offset: 3px; border-radius: 10px; }
@media (prefers-reduced-motion: reduce) { .btn::before, .heroQ::before { animation: none !important; } }

/* ================================================================ v2.6 : identité propre — lapis-lazuli et feuille d'or, typographie Marcellus et Manrope */
@font-face { font-family: "NurDisplay"; src: url("fonts/marcellus.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "NurText"; src: url("fonts/manrope.woff2") format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "NurText"; src: url("fonts/manrope-ext.woff2") format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root { --bg: #F6F7FB; --ink: #1A1F3D; --muted: #5D6382; --line: #E1E3EF; --accent: #2E3C96; --soft: #EBEEFB; --gold: #8A630F; --hair: rgba(166,124,40,.32); --glass: rgba(255,255,255,.66); }
body, button, input, select, textarea { font-family: "NurText", "Segoe UI", system-ui, -apple-system, sans-serif; }
body { font-size: calc(16px * var(--fs)); letter-spacing: .005em; font-feature-settings: "tnum" 1, "ss01" 1; }
h1, h2, .salutM, .moment b, .heroQ .hn, .hero .hn, .lhead strong, .srow .nm b, .card > strong:first-child, .qcard strong, .assez strong, .jspec strong, .ncard .ph, .top h1 { font-family: "NurDisplay", "NurText", serif; font-weight: 400; letter-spacing: .02em; }
.top h1 { letter-spacing: .18em; }
#main h3 { font-family: "NurText", sans-serif; font-weight: 700; color: #8A6516; }
.heroQ .ht { font-family: "NurText", sans-serif; font-weight: 800; letter-spacing: .01em; }
strong, b { font-weight: 700; }
/* fond nacré : voile lapis très léger au lieu du crème */
html { background: #F6F7FB !important; }
.tabs a { font-family: "NurText", sans-serif; font-weight: 600; letter-spacing: .01em; }
.tabs a[aria-current="page"] .g { color: var(--accent); }
.btn:not(.alt) { background: linear-gradient(135deg, #3A4BB0, #1C2566); }
.pill { font-family: "NurText", sans-serif; }
/* filet doré sur l'encadré de prière, comme un cadre de manuscrit */
.heroQ { border: 1px solid rgba(233,196,106,.55); box-shadow: inset 0 0 0 4px rgba(255,255,255,.04), inset 0 0 0 5px rgba(233,196,106,.3), 0 14px 34px rgba(28,37,102,.22); }
body[data-moment="matin"] .hero { background: #2E3C96 url(img/pattern-light.svg); background-size: 80px; }
body[data-moment="jour"] .hero { background: #1C2566 url(img/pattern-light.svg); background-size: 80px; }
/* ciel du jour : bleu de nacre au lieu du vert */
body[data-moment="jour"] { --sky1: #E8ECFA; --sky2: #F6F7FB; }
body[data-moment="matin"] { --sky1: #FFF4DC; --sky2: #F6F7FB; }
/* sélecteur de paliers */
.palsel { display: flex; gap: .4rem; overflow-x: auto; padding: .1rem 0 .6rem; scrollbar-width: none; }
.palsel::-webkit-scrollbar { display: none; }
.palsel .chip { flex: none; text-decoration: none; border-radius: 999px; padding: .35rem .9rem; border: 1px solid var(--hair); background: rgba(255,255,255,.7); color: var(--ink); font-weight: 600; font-size: .85rem; display: inline-flex; align-items: center; }
.palsel .chip.on { background: linear-gradient(135deg, #3A4BB0, #1C2566); color: #fff; border-color: transparent; box-shadow: 0 6px 14px rgba(28,37,102,.25); }
ol.plainol { margin: .4rem 0 .8rem 1.2rem; color: var(--muted); }
