/* ═══════════════════════════════════════════════════════════
   Ibadah Daily Planner — maquette
   Palette douce : vert émeraude, sable, or discret.
   ═══════════════════════════════════════════════════════════ */

:root {
  --bg:          #F4F1EA;
  --clavier:     0px;   /* hauteur cachée par le clavier — voir suivreLeClavier() */
  --surface:     #FFFFFF;
  --surface-2:   #FAF8F3;
  --line:        #E4DFD4;
  --text:        #17211D;
  --muted:       #5F6E66;   /* assombri pour rester lisible sur le fond sable (WCAG AA) */
  --primary:     #0B6E55;
  --primary-ink: #FFFFFF;
  --primary-soft:#E2F0EA;
  --gold:        #806211;   /* or profond : le doré clair ne passait pas le contraste */
  --gold-soft:   #F6EEDA;
  /* La grille du mois : commencé, puis journée entière.
     Deux teintes seulement — avec quatre, les nuances basses se
     confondaient avec le fond et devenaient illisibles. */
  --niv-partiel: #4E9C81;
  --niv-complet: #0B6E55;
  --shadow:      0 1px 2px rgba(23,33,29,.06), 0 8px 24px rgba(23,33,29,.06);
  --radius:      18px;
  --tap:         44px;
}

html[data-theme="dark"] {
  --bg:          #0D1512;
  --surface:     #16201C;
  --surface-2:   #1C2823;
  --line:        #2A3831;
  --text:        #E9EFEB;
  --muted:       #96AAA0;
  --primary:     #3DBE92;
  --primary-ink: #06211A;
  --primary-soft:#16332A;
  --gold:        #E0BC5E;
  --gold-soft:   #2C2617;
  --niv-partiel: #2F7D62;
  --niv-complet: #3DBE92;
  --shadow:      0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }

/* ⚠️ Règle indispensable.
   Le navigateur cache un élément marqué « hidden » en lui mettant
   display:none — mais la moindre règle de style qui impose un display
   (display:flex, display:block…) reprend le dessus, et l'élément reste
   visible. C'est arrivé à l'écran de bienvenue, qui ne se refermait plus.
   Ce !important garantit que « hidden » veut toujours dire caché. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

/* Cadre : plein écran sur mobile, "téléphone" centré sur grand écran */
.phone {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
@media (min-width: 700px) {
  body { align-items: center; padding: 24px 0; background: var(--surface-2); }
  .phone {
    height: min(880px, calc(100vh - 48px));
    border-radius: 34px;
    box-shadow: 0 24px 70px rgba(0,0,0,.18);
    border: 1px solid var(--line);
  }
}

/* ─── Écrans ─────────────────────────────────────────── */
.screens { flex: 1; display: flex; flex-direction: column; min-height: 0; }
/* ★ « position: relative » n'est pas décoratif : c'est LUI qui donne au
   bouton « + » un plancher. Sans lui, le seul repère du « + » était le
   bas du téléphone, et il se posait sur la barre d'onglets dès que
   celle-ci grandissait (grande police du système, barre de gestes en
   bas de l'écran). Ici, le bas de l'écran s'arrête où commence la
   barre d'onglets : le « + » ne peut plus lui marcher dessus. */
.screen { flex: 1; display: none; flex-direction: column; min-height: 0; position: relative; }
.screen.is-active { display: flex; animation: fade .28s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.scroll { flex: 1; overflow-y: auto; padding: 0 18px; -webkit-overflow-scrolling: touch; }
.scroll__pad { height: 96px; }

/* ─── Barre du haut ──────────────────────────────────── */
/* ─── La réserve du haut ────────────────────────────────────
   Sur le site, l'en-tête commence sous la barre d'adresse : il n'y a
   rien à réserver. Dans l'application, Android dessine la page SOUS
   l'horloge et la batterie — sans cette réserve, le titre passerait
   dessous, à moitié caché.

   La valeur vient d'abord du téléphone lui-même (app.js va la
   chercher et la pose ici) ; « env() » sert de solution de repli,
   et 0 sur le site, où il n'y a rien au-dessus. */
:root { --haut-barre: env(safe-area-inset-top, 0px); }

.topbar {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; padding: calc(22px + var(--haut-barre)) 18px 12px;
}
.topbar__date {
  margin: 0 0 2px; font-size: 13px; color: var(--muted);
  /* « capitalize » est là pour la DATE (« mercredi 26 août » → « Mercredi »).
     Il met une majuscule à CHAQUE mot : sur une phrase, cela donnait
     « Ce Que Tes Graines Ouvrent ». Les sous-titres qui sont des phrases
     portent donc .topbar__date--phrase. */
  text-transform: capitalize; letter-spacing: .2px;
}
.topbar__date--phrase { text-transform: none; }
.topbar__title { margin: 0; font-size: 26px; line-height: 1.15; letter-spacing: -.5px; font-weight: 700; }

.icon-btn {
  flex: none; width: var(--tap); height: var(--tap);
  border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--text);
  font-size: 18px; cursor: pointer;
  display: grid; place-items: center;
  transition: transform .15s ease, background .2s ease;
}
.icon-btn:active { transform: scale(.92); }

/* ─── Cartes ─────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.card__h { margin: 0 0 10px; font-size: 16px; }

.card--hero { display: flex; align-items: center; gap: 16px; padding: 18px 16px; }

/* Anneau de progression */
.ring { position: relative; width: 104px; height: 104px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; stroke-linecap: round; }
.ring__track { stroke: var(--primary-soft); }
.ring__fill {
  stroke: var(--primary);
  stroke-dasharray: 327;
  stroke-dashoffset: 327;
  transition: stroke-dashoffset .9s cubic-bezier(.22,1,.36,1);
}
.ring__label {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.ring__label strong { font-size: 24px; letter-spacing: -1px; }
.ring__label span { font-size: 10px; color: var(--muted); text-align: center; line-height: 1.2; }

.hero__side { min-width: 0; }
.hero__msg { margin: 0 0 10px; font-size: 15px; color: var(--text); }
.hero__stats { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 11px; font-size: 13px; color: var(--muted);
}
.pill b { color: var(--text); }

/* ─── Date hégirienne, à côté de la date du jour ─────────
   Volontairement plus discrète : c'est une estimation, elle ne doit
   pas se présenter avec la même assurance que la date grégorienne.
   Le point de séparation vit dans le ::before, pour disparaître avec
   elle quand le navigateur ne sait pas la calculer. */
.topbar__hijri { text-transform: none; opacity: .72; }
.topbar__hijri::before { content: " · "; opacity: .6; }

/* ─── Réglage « − 0 + » ──────────────────────────────── */
.stepper { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.stepper button {
  width: 32px; height: 32px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font: inherit; font-size: 17px; line-height: 1;
  display: grid; place-items: center;
}
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper b {
  min-width: 30px; text-align: center; font-size: 14px;
  font-variant-numeric: tabular-nums; color: var(--muted);
}

/* ─── Choix de la langue ─────────────────────────────────
   Une liste déroulante du système : c'est le seul endroit de
   l'application où on la laisse telle quelle. Elle sait déjà
   s'ouvrir en grand sur un téléphone, et la refaire à la main
   ferait perdre ce que le téléphone fait mieux que nous. */
.select {
  flex: none; max-width: 46%;
  padding: 8px 30px 8px 12px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font: inherit; font-size: 14px; line-height: 1.2;
  cursor: pointer;
  /* La flèche du système disparaît sur certains Android : on dessine
     la nôtre, pour qu'on voie toujours que ça s'ouvre. */
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 15px 15px;
}
.select:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ─── Titres de section ──────────────────────────────── */
.section-title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin: 22px 2px 10px; font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .9px; color: var(--muted);
}
.section-title__hint { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12px; }

/* ─── Intertitres de rythme dans la liste du jour ────────
   Plus discrets que les titres de section : ils séparent à
   l'intérieur d'une liste, ils n'ouvrent pas une nouvelle partie. */
.groupe-titre {
  margin: 15px 2px 7px; font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px; color: var(--muted);
}
.groupe-titre:first-child { margin-top: 2px; }

/* ─── Les 5 prières ──────────────────────────────────── */
.prayers { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.prayer {
  border: 1px solid var(--line); background: var(--surface);
  border-radius: 14px; padding: 12px 4px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; font: inherit; color: var(--muted);
  min-height: 76px;
  transition: transform .18s cubic-bezier(.22,1,.36,1), background .2s, border-color .2s, color .2s;
}
.prayer:active { transform: scale(.94); }
.prayer__dot {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line);
  display: grid; place-items: center;
  transition: background .2s, border-color .2s, transform .25s;
}
.prayer__dot svg { width: 13px; height: 13px; stroke: var(--primary-ink); stroke-width: 3.2; fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .18s; }
.prayer__name { font-size: 11.5px; font-weight: 600; letter-spacing: .2px; }
.prayer.is-on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.prayer.is-on .prayer__dot { background: var(--primary); border-color: var(--primary); transform: scale(1.06); }
.prayer.is-on .prayer__dot svg { opacity: 1; }

/* ─── Liste de tâches ────────────────────────────────── */
.tasks { list-style: none; margin: 0; padding: 0; }
.task {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 15px; margin-bottom: 9px; overflow: hidden;
  transition: transform .2s cubic-bezier(.22,1,.36,1), opacity .35s, border-color .2s;
}
.task__ligne { display: flex; align-items: stretch; }
.task.is-leaving { opacity: 0; transform: translateX(28px) scale(.97); }

/* La zone principale : tout sauf le bouton « … » */
.task__hit {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 13px;
  background: none; border: none; font: inherit; color: inherit; text-align: left;
  padding: 13px 4px 13px 14px; cursor: pointer;
  transition: transform .2s cubic-bezier(.22,1,.36,1);
}
.task__hit:active { transform: scale(.985); }

.task__more {
  flex: none; width: var(--tap); background: none; border: none;
  color: var(--muted); cursor: pointer; display: grid; place-items: center;
  border-left: 1px solid transparent;
  transition: color .2s, background .2s;
}
.task__more svg { width: 20px; height: 20px; fill: currentColor; }
.task__more:hover { color: var(--text); background: var(--surface-2); }

.check {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--line); background: transparent;
  display: grid; place-items: center;
  transition: background .2s, border-color .2s, transform .3s cubic-bezier(.16,1,.3,1);
}
.check svg { width: 14px; height: 14px; stroke: var(--primary-ink); stroke-width: 3.2; fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .18s; }
.task.is-done .check { background: var(--primary); border-color: var(--primary); transform: scale(1.12); }

.task.is-done .check svg { opacity: 1; }

.task__body { min-width: 0; flex: 1; }
.task__name { display: block; font-size: 15.5px; font-weight: 600; }
.task__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 3px; font-size: 12px; color: var(--muted); }
.task__tag {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 1px 6px; font-size: 11px;
}
.tasks--done .task { opacity: .55; }
.tasks--done .task__name { text-decoration: line-through; }

.done-block { margin-top: 18px; }
.done-block summary {
  cursor: pointer; font-size: 13px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: .9px; padding: 8px 2px;
  display: flex; align-items: center; gap: 8px;
}
.badge-count {
  background: var(--primary-soft); color: var(--primary);
  border-radius: 999px; padding: 1px 8px; font-size: 12px; letter-spacing: 0;
}

/* ─── État vide ──────────────────────────────────────── */
.empty { text-align: center; padding: 30px 20px; }
.empty__art { width: 92px; height: 92px; margin-bottom: 10px; }
.empty__c1 { fill: var(--primary-soft); }
.empty__c2 { fill: none; stroke: var(--primary); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.empty__title { margin: 4px 0 6px; font-size: 18px; font-weight: 700; }
.empty__text { margin: 0 0 18px; color: var(--muted); font-size: 14.5px; }

/* ─── Boutons ────────────────────────────────────────── */
.btn {
  font: inherit; font-weight: 600; font-size: 15px;
  border-radius: 13px; padding: 13px 20px; min-height: var(--tap);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, filter .2s;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--primary); color: var(--primary-ink); }
.btn--ghost { background: transparent; color: var(--muted); border-color: var(--line); }

.fab {
  /* « bottom » se compte depuis le haut de la barre d'onglets, et non
     depuis le bas du téléphone (voir .screen ci-dessus). */
  position: absolute; right: 18px; bottom: 18px; z-index: 5;
  width: 58px; height: 58px; border-radius: 50%; border: none;
  background: var(--primary); color: var(--primary-ink);
  box-shadow: 0 8px 22px rgba(11,110,85,.34);
  cursor: pointer; display: grid; place-items: center;
  transition: transform .18s cubic-bezier(.16,1,.3,1);
}
.fab:active { transform: scale(.9) rotate(90deg); }
.fab svg { width: 26px; height: 26px; stroke: currentColor; stroke-width: 2.4; fill: none; stroke-linecap: round; }

/* ─── Barre d'onglets ────────────────────────────────── */
.tabbar {
  /* Cinq onglets (Aujourd'hui, Ma journée, Progrès, Hadith, Réglages). À
     375 px de large, cela fait 75 px chacun : c'est la limite, ne pas en
     ajouter un sixième sans repenser la barre. */
  flex: none; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface); border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
/* Quand le clavier monte, la barre d'onglets saute au-dessus de lui et
   se plante au milieu de l'écran. On la retire le temps de la frappe :
   de toute façon, on ne change pas d'écran en train d'écrire. */
body.clavier-ouvert .tabbar { display: none; }
.tab {
  background: none; border: none; font: inherit; cursor: pointer;
  color: var(--muted); font-size: 10px; font-weight: 600;
  /* « Bibliothèque » est le plus long des cinq : on le laisse se
     réduire plutôt que déborder sur ses voisins. */
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 2px; min-height: var(--tap); border-radius: 12px;
  transition: color .2s;
}
.tab svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tab.is-active { color: var(--primary); }
.tab.is-active svg { stroke-width: 2.5; }

/* ─── Statistiques ───────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 4px; }
.stat-grid .card { margin: 0; text-align: center; padding: 18px 10px; }
.stat__icon { font-size: 20px; }
.stat__value { display: block; font-size: 28px; font-weight: 700; letter-spacing: -1px; margin-top: 4px; }
.stat__label { font-size: 12px; color: var(--muted); }

.chart { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; height: 140px; }
.chart__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.chart__track { flex: 1; width: 100%; max-width: 30px; display: flex; align-items: flex-end; }
/* La barre garde toujours sa hauteur pleine et on l'écrase verticalement :
   animer `height` forcerait le navigateur à recalculer la page à chaque image. */
.chart__bar {
  width: 100%; border-radius: 8px 8px 4px 4px;
  background: var(--primary); height: 100%;
  transform-origin: bottom;
  transform: scaleY(var(--v, 0));
  transition: transform .7s cubic-bezier(.22,1,.36,1);
}
/* Les jours passés sont plus discrets que celui d'aujourd'hui, mais pas
   effacés : en vert très pâle ils devenaient invisibles sur la carte. */
.chart__bar--soft { background: var(--niv-partiel); }
.chart__day { font-size: 11px; color: var(--muted); }

.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; }
.badge {
  background: var(--surface); border: 1px solid var(--line); border-radius: 15px;
  padding: 15px 8px; text-align: center;
}
.badge__ico { font-size: 26px; display: block; filter: grayscale(1); opacity: .35; }
.badge__name { font-size: 11.5px; color: var(--muted); margin-top: 6px; display: block; line-height: 1.3; }
.badge.is-won { background: var(--gold-soft); border-color: var(--gold); }
.badge.is-won .badge__ico { filter: none; opacity: 1; }
.badge.is-won .badge__name { color: var(--gold); font-weight: 600; }

.note { font-size: 12.5px; color: var(--muted); text-align: center; margin: 20px 6px 0; line-height: 1.6; }

/* ─── Hadith ─────────────────────────────────────────── */
.card--hadith { padding: 22px 20px 20px; position: relative; margin-top: 4px; }
.quote-mark { font-size: 40px; color: var(--gold); line-height: .6; display: block; margin-bottom: 8px; }
.hadith__text { margin: 0 0 14px; font-family: Georgia, "Times New Roman", serif; font-size: 18px; line-height: 1.66; }
/* ★ Replié, pas coupé : le texte entier est là, seule sa hauteur est
   bornée. Un doigt sur « Voir plus » le rend en entier. */
.hadith__text.is-replie {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 9;
  overflow: hidden;
}
.hadith__plus {
  display: block; background: none; border: none; font: inherit;
  font-size: 14.5px; font-weight: 600; color: var(--primary);
  cursor: pointer; padding: 0 0 12px; min-height: var(--tap); text-align: left;
}
.hadith__source { margin: 0; font-size: 13px; color: var(--gold); font-weight: 600; }
.hadith__note {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 14px; color: var(--muted);
}
.hadith__warn { font-size: 12px; color: var(--muted); margin-top: 10px; font-style: italic; }

.skeleton__line { height: 13px; border-radius: 7px; background: var(--surface-2); margin-bottom: 11px; animation: pulse 1.4s ease-in-out infinite; }
.skeleton__line--short { width: 55%; }
.skeleton__text { font-size: 13px; color: var(--muted); text-align: center; margin: 16px 0 0; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

.card--info { background: var(--surface-2); }
.info-list { list-style: none; margin: 0; padding: 0; }
.info-list li { padding: 11px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.info-list li:first-child { border-top: none; padding-top: 0; }
.info-list b { display: block; font-size: 12px; color: var(--primary); text-transform: uppercase; letter-spacing: .6px; margin-bottom: 2px; }

/* ─── Réglages ───────────────────────────────────────── */
.list { padding: 4px 16px; margin-top: 4px; }
.row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 0; border-top: 1px solid transparent; min-height: var(--tap);
  cursor: pointer;
}
/* Le trait est un SÉPARATEUR : il n'a de sens qu'entre deux lignes visibles.
   On ne peut donc pas dire « pas de trait sur la première ligne » — car la
   première ligne est parfois cachée (« Sonner à l'heure exacte » disparaît
   quand l'autorisation est déjà donnée), et la suivante gardait alors un trait
   tout en haut de l'encadré, sans rien à séparer.
   On dit l'inverse : une ligne ne prend un trait que s'il existe une ligne
   visible AVANT elle. Le trait reste réservé (transparent) pour que toutes les
   lignes gardent exactement la même hauteur. */
.list .row:not([hidden]) ~ .row:not([hidden]) { border-top-color: var(--line); }
.row b { display: block; font-size: 15px; font-weight: 600; }
.row small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.row--action { width: 100%; background: none; border-left: none; border-right: none; border-bottom: none; font: inherit; color: var(--text); text-align: left; }

.switch {
  appearance: none; -webkit-appearance: none; flex: none;
  width: 50px; height: 30px; border-radius: 999px;
  background: var(--line); position: relative; cursor: pointer;
  transition: background .25s; margin: 0;
}
.switch::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,.25); transition: transform .25s cubic-bezier(.16,1,.3,1);
}
.switch:checked { background: var(--primary); }
.switch:checked::after { transform: translateX(20px); }

/* ═══════════════════════════════════════════════════════
   Les dhikr rangés dans une intention
   ═══════════════════════════════════════════════════════ */

/* Le rond d'une intention à dhikr est un bouton séparé : il coche
   tout d'un coup, alors que le reste de la ligne déplie la liste. */
.task__check {
  flex: none; width: 46px; background: none; border: none;
  display: grid; place-items: center; cursor: pointer;
  transition: transform .2s cubic-bezier(.16,1,.3,1);
}
.task__check:active { transform: scale(.9); }
.task__hit--groupe { padding-left: 0; gap: 10px; }

.task__prog {
  flex: none; background: var(--primary-soft); color: var(--primary);
  border-radius: 999px; padding: 2px 9px; font-size: 11.5px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.task__chev {
  flex: none; width: 18px; height: 18px; margin-right: 2px;
  display: grid; place-items: center;
  transition: transform .22s cubic-bezier(.16,1,.3,1);
}
.task__chev svg {
  width: 18px; height: 18px;
  stroke: var(--muted); stroke-width: 2.2; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
}
.task.is-open .task__chev { transform: rotate(180deg); }

.subs {
  list-style: none; margin: 0; padding: 0;
  background: var(--surface-2); border-top: 1px dashed var(--line);
}
.sub { display: flex; align-items: stretch; border-top: 1px dashed var(--line); }
.sub:first-child { border-top: none; }

.sub__coche {
  flex: none; width: 46px; padding-left: 14px; background: none; border: none;
  display: grid; place-items: center; cursor: pointer;
}
.sub__rond {
  width: 19px; height: 19px; border-radius: 50%;
  border: 2px solid var(--line); display: grid; place-items: center;
  transition: background .2s, border-color .2s, transform .25s cubic-bezier(.16,1,.3,1);
}
.sub__rond svg {
  width: 11px; height: 11px; stroke: var(--primary-ink); stroke-width: 3.4;
  fill: none; stroke-linecap: round; stroke-linejoin: round;
  opacity: 0; transition: opacity .18s;
}
.sub.is-done .sub__rond { background: var(--primary); border-color: var(--primary); transform: scale(1.08); }
.sub.is-done .sub__rond svg { opacity: 1; }

.sub__hit {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px;
  padding: 10px 12px 10px 0; min-height: var(--tap);
  background: none; border: none; font: inherit; color: inherit;
  text-align: left; cursor: pointer;
}
.sub__nom { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.35; }
.sub.is-done .sub__nom { text-decoration: line-through; color: var(--muted); }
.sub__fois {
  flex: none; font-size: 11.5px; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.sub__voir { flex: none; width: 14px; height: 14px; stroke: var(--muted); stroke-width: 2.4; fill: none; stroke-linecap: round; }

.sub--ajout { border-top: 1px dashed var(--line); }
.sub__ajout {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 11px 12px 11px 22px; min-height: var(--tap);
  background: none; border: none; font: inherit; font-size: 13px;
  color: var(--primary); text-align: left; cursor: pointer;
}
.sub__ajout svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2.4; fill: none; stroke-linecap: round; }

/* ═══════════════════════════════════════════════════════
   La grille du mois et la régularité
   ═══════════════════════════════════════════════════════ */

.month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.month__tete { font-size: 10.5px; color: var(--muted); text-align: center; padding-bottom: 2px; }
.month__case { aspect-ratio: 1; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); }
.month__case--vide { background: none; border: none; }
.month__case--partiel { background: var(--niv-partiel); border-color: var(--niv-partiel); }
.month__case--complet { background: var(--niv-complet); border-color: var(--niv-complet); }
.month__case--futur { background: none; border-style: dashed; }
.month__case--ce-jour { outline: 2px solid var(--gold); outline-offset: 1.5px; }

.month__legend {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 6px;
  margin-top: 14px; font-size: 11px; color: var(--muted);
}
.month__legend .dot { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.dot--rien    { background: var(--surface-2); border: 1px solid var(--line); }
.dot--partiel { background: var(--niv-partiel); }
.dot--complet { background: var(--niv-complet); }

.reg { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line); }
.reg:first-child { border-top: none; }
.reg__nom { flex: 1; min-width: 0; font-size: 14px; }
.reg__barre { flex: none; width: 70px; height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.reg__jauge { height: 100%; background: var(--primary); border-radius: 999px; transition: width .6s cubic-bezier(.22,1,.36,1); }
.reg__val { flex: none; width: 52px; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.empty--small { padding: 16px 20px; }
.empty--small .empty__text { margin: 0; }

/* ═══════════════════════════════════════════════════════
   La bibliothèque de dhikr
   ═══════════════════════════════════════════════════════ */

.biblio {
  position: absolute; inset: 0; z-index: 30;
  background: var(--bg); display: flex; flex-direction: column;
  animation: glisse .26s cubic-bezier(.22,1,.36,1);
}
@keyframes glisse { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

.topbar--back { align-items: center; justify-content: flex-start; }
.topbar--back .icon-btn svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.biblio__bar {
  flex: none; display: flex; align-items: center; gap: 12px;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); background: var(--surface);
}
.biblio__count { flex: 1; font-size: 13px; color: var(--muted); }

.warn {
  background: var(--gold-soft); border: 1px solid var(--gold);
  border-radius: 14px; padding: 12px 14px; margin: 4px 0 14px;
  font-size: 13px; line-height: 1.5;
}
.warn b { display: block; color: var(--gold); margin-bottom: 3px; }

#biblio-cats { margin-bottom: 12px; }

.bib { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; overflow: hidden; }
.bib__ligne { display: flex; align-items: stretch; }
.bib__hit {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px;
  padding: 11px 8px 11px 12px; min-height: var(--tap);
  background: none; border: none; font: inherit; color: inherit;
  text-align: left; cursor: pointer;
}
.bib__box {
  flex: none; width: 22px; height: 22px; border-radius: 7px;
  border: 2px solid var(--line); display: grid; place-items: center;
  transition: background .2s, border-color .2s;
}
.bib__box svg { width: 13px; height: 13px; stroke: var(--primary-ink); stroke-width: 3.2; fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .18s; }
.bib.is-on .bib__box { background: var(--primary); border-color: var(--primary); }
.bib.is-on .bib__box svg { opacity: 1; }

.bib__body { flex: 1; min-width: 0; }
.bib__nom { display: block; font-size: 14.5px; font-weight: 600; }
.bib__src { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.bib__fois { flex: none; font-size: 11px; color: var(--gold); background: var(--gold-soft); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }

.bib__voir {
  flex: none; width: var(--tap); background: none; border: none;
  border-left: 1px solid var(--line); color: var(--muted); cursor: pointer;
  display: grid; place-items: center;
}
.bib__chev { display: grid; place-items: center; width: 16px; height: 16px; transition: transform .22s cubic-bezier(.16,1,.3,1); }
.bib__chev svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.bib.is-open .bib__chev { transform: rotate(180deg); }
.bib__texte { padding: 4px 14px 14px; border-top: 1px dashed var(--line); background: var(--surface-2); }

.perso-btn {
  width: 100%; background: var(--surface-2); border: 1.5px dashed var(--line);
  border-radius: 14px; padding: 14px; min-height: var(--tap);
  font: inherit; font-size: 14px; color: var(--primary);
  cursor: pointer; margin-top: 6px;
  transition: border-color .2s, transform .15s;
}
.perso-btn:active { transform: scale(.98); }

/* ═══════════════════════════════════════════════════════
   Le texte d'un dhikr
   ═══════════════════════════════════════════════════════ */

.arabe {
  font-family: "Amiri", "Scheherazade New", "Noto Naskh Arabic",
               "Traditional Arabic", "Geeza Pro", "Segoe UI", serif;
  font-size: 21px; line-height: 2.15; text-align: right;
  margin: 14px 0 16px; word-break: normal; overflow-wrap: break-word;
}
.sheet--lecture { max-height: 90%; }
/* Ayat al-Kursi fait plusieurs écrans de haut : sans cela, il faudrait
   faire défiler tout le texte pour retrouver le bouton « C'est fait ».
   Les deux boutons restent donc collés en bas de la feuille. Même chose
   pour « Écrire mon propre dhikr », devenue assez haute pour défiler. */
.sheet--lecture .sheet__actions,
.sheet--perso .sheet__actions {
  position: sticky; bottom: 0;
  background: var(--surface);
  padding: 12px 0 2px; margin-top: 10px;
  box-shadow: 0 -10px 14px -8px var(--surface);
}
.lecture__fois {
  display: inline-block; margin: 0; font-size: 12px; font-weight: 600;
  color: var(--gold); background: var(--gold-soft);
  border-radius: 999px; padding: 3px 11px;
}
.lecture__pho { margin: 0 0 12px; font-size: 14.5px; font-style: italic; color: var(--muted); line-height: 1.65; }
.lecture__trad { margin: 0 0 14px; font-size: 15px; line-height: 1.65; }
.lecture__src { margin: 0; font-size: 12.5px; color: var(--gold); font-weight: 600; }
.lecture__warn {
  margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--muted); font-style: italic; line-height: 1.5;
}
.bib__texte .arabe { font-size: 19px; margin: 10px 0 12px; }
.bib__texte .lecture__pho,
.bib__texte .lecture__trad { font-size: 13.5px; }

/* ─── Feuille "ajouter" ──────────────────────────────── */
.sheet-backdrop {
  position: absolute; inset: 0; z-index: 20;
  background: rgba(10,20,16,.45); backdrop-filter: blur(2px);
  animation: fade .2s ease;
}
/* ★ « bottom » n'est pas 0 mais la hauteur du clavier. Collée à 0, la
   feuille se retrouve ENTIÈREMENT derrière le clavier sur Android 15+,
   et on écrit sans voir ce qu'on tape. --clavier vaut 0 tant qu'aucun
   clavier n'est ouvert, donc rien ne change le reste du temps. */
.sheet {
  position: absolute; left: 0; right: 0; bottom: var(--clavier); z-index: 21;
  background: var(--surface); border-radius: 26px 26px 0 0;
  padding: 10px 20px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 40px rgba(0,0,0,.2);
  animation: slideUp .32s cubic-bezier(.22,1,.36,1);
  transition: bottom .18s ease;
  max-height: calc(92% - var(--clavier)); overflow-y: auto;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }

/* ★ « Écrire mon propre dhikr » s'ouvre DEPUIS la bibliothèque, et c'est la
   seule feuille dans ce cas. À l'étage 21 elle passait derrière le panneau
   (étage 30, plein écran, fond opaque) : la feuille existait, le curseur
   était dedans, le clavier montait — et on ne voyait rien. On tapait à
   l'aveugle dans un champ invisible.
   On la monte au-dessus du panneau, mais sous l'écran de bienvenue (40) et
   sous la question (50/51), qui doit rester la dernière chose lisible.
   ⚠️ Ne PAS monter « .sheet » en entier : le toast est à l'étage 30, il
   passerait derrière toutes les autres feuilles. */
#perso-backdrop { z-index: 31; }
#perso-sheet    { z-index: 32; }
.sheet__grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 14px; }
.sheet__title { margin: 0 0 18px; font-size: 21px; }

.field { display: block; border: none; padding: 0; margin: 0 0 18px; }
.field__label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 8px; color: var(--muted); }
.field__label small { font-weight: 400; }
.field input[type="text"], .field input[type="time"], .field input[type="number"], .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: var(--surface-2); border: 1.5px solid var(--line);
  border-radius: 13px; padding: 13px 14px; min-height: var(--tap);
  transition: border-color .2s;
}
/* Les champs de texte long : on les agrandit à la main, jamais de côté. */
.field textarea { display: block; resize: vertical; line-height: 1.6; min-height: 78px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); }
.field input.has-error { border-color: #C0392B; }
.field__error { display: block; font-size: 13px; color: #C0392B; margin-top: 7px; }

/* Une remarque, pas une erreur : rien n'est cassé, on prévient simplement. */
.field__note { display: block; font-size: 13px; color: var(--muted); margin-top: 7px; line-height: 1.5; }
.lien {
  font: inherit; font-size: 13px; padding: 0; border: none; background: none;
  color: var(--primary); text-decoration: underline; cursor: pointer;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: inherit; font-size: 14px; cursor: pointer;
  background: var(--surface-2); border: 1.5px solid var(--line);
  color: var(--muted); border-radius: 999px; padding: 9px 15px; min-height: var(--tap);
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.chip:active { transform: scale(.95); }
.chip.is-on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 600; }

.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.day {
  font: inherit; font-size: 12.5px; cursor: pointer;
  background: var(--surface-2); border: 1.5px solid var(--line); color: var(--muted);
  border-radius: 10px; padding: 10px 2px; min-height: var(--tap);
  transition: background .2s, color .2s, border-color .2s, transform .15s;
}
.day:active { transform: scale(.94); }
.day.is-on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 700; }

.sheet__actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 4px; }

/* ─── Feuille « options d'une tâche » ────────────────── */
.sheet--menu { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
.sheet__subtitle {
  margin: 0 0 16px; font-size: 16px; font-weight: 700;
  text-align: center; color: var(--text);
}
.menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  font: inherit; font-size: 15.5px; color: var(--text); text-align: left;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 14px; padding: 15px 16px; margin-bottom: 9px;
  min-height: var(--tap); cursor: pointer;
  transition: transform .15s ease, background .2s;
}
.menu-item:active { transform: scale(.98); }
.menu-cancel { width: 100%; margin-top: 5px; }

.confirm__text {
  margin: 0 0 18px; font-size: 14.5px; color: var(--muted);
  text-align: center; line-height: 1.6;
}
.btn--soft { background: var(--gold-soft); color: var(--gold); border-color: var(--gold); }

/* ─── La question ────────────────────────────────────
   À la place du confirm() du navigateur, dont les boutons
   s'écrivaient CANCEL / OK en anglais dans l'application.
   Elle est au centre, et non en bas comme les feuilles : une
   question n'est pas un panneau qu'on écarte d'un revers de
   pouce, c'est quelque chose qu'on lit avant de répondre. */
.ask-backdrop {
  position: absolute; inset: 0; z-index: 50;
  background: rgba(10,20,16,.55); backdrop-filter: blur(2px);
  animation: fade .2s ease;
}
.ask {
  position: absolute; z-index: 51;
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(360px, calc(100% - 40px));
  max-height: calc(100% - 60px); overflow-y: auto;
  background: var(--surface); border-radius: 22px;
  padding: 22px 20px 18px;
  box-shadow: 0 18px 44px rgba(0,0,0,.28);
  animation: askIn .24s cubic-bezier(.22,1,.36,1);
}
@keyframes askIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(.94); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.ask__title { margin: 0 0 12px; font-size: 19px; line-height: 1.3; }
/* ★ Certaines de ces fenêtres montrent un CHEMIN de fichier
   (« /storage/emulated/0/Documents/Ibadah/… »). Sans cette ligne, le
   chemin ne se coupe nulle part et dépasse de la fenêtre : on ne lit
   plus la fin, c'est-à-dire le nom du fichier qu'on cherche. */
.ask__text { margin: 0 0 20px; font-size: 14.5px; color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
.ask__text p { margin: 0 0 10px; }
.ask__text p:last-child { margin: 0; }
.ask__actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
/* Un simple message n'a rien à décider : un seul bouton, toute la largeur. */
.ask--seul .ask__actions { grid-template-columns: 1fr; }

/* ─── Bandeau « installer l'application » ────────────── */
.install-bar {
  display: flex; align-items: center; gap: 12px;
  background: var(--primary-soft); border: 1px solid var(--primary);
  border-radius: 15px; padding: 13px 14px; margin: 4px 0 14px;
}
.install-bar p { margin: 0; flex: 1; font-size: 14px; color: var(--primary); }
.install-bar .btn { padding: 9px 15px; min-height: var(--tap); font-size: 14px; }
.install-bar__close {
  flex: none; width: var(--tap); height: var(--tap); background: none; border: none;
  color: var(--primary); font-size: 22px; cursor: pointer; line-height: 1;
  display: grid; place-items: center; border-radius: 10px;
}

/* ─── Le rattrapage de la veille ─────────────────────── */

/* Le bandeau reprend le style de la proposition d'installation, mais
   son texte tient sur deux lignes : il passe donc en colonne. */
.install-bar--hier { flex-direction: column; align-items: stretch; gap: 10px; }
.install-bar--hier p { line-height: 1.55; }
.install-bar--hier b { display: block; margin-bottom: 3px; }
.install-bar--hier .btn { width: 100%; }

.sheet--hier .note--hier { margin: 0 0 4px; text-align: left; }
.sheet--hier .section-title { margin-top: 20px; }
.sheet--hier .tasks { margin-bottom: 0; }
/* Un seul bouton, et il reste atteignable quand la liste d'hier est
   longue — même raison que pour la feuille de lecture plus haut. */
.sheet--hier .sheet__actions {
  grid-template-columns: 1fr;
  position: sticky; bottom: 0;
  background: var(--surface);
  padding: 12px 0 2px; margin-top: 10px;
  box-shadow: 0 -10px 14px -8px var(--surface);
}

/* ─── Ma journée ─────────────────────────────────────── */
.agenda__nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 0 14px; }
.agenda__jour { flex: 1; min-width: 0; text-align: center; display: grid; gap: 2px; justify-items: center; }
.agenda__nav .icon-btn svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
/* Seule la première lettre prend une majuscule : « Jeudi 8 octobre », pas « Octobre ». */
.agenda__jour b { font-size: 16px; }
.agenda__jour b::first-letter { text-transform: uppercase; }
.agenda__bilan { margin: 0 0 14px; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.5; }
.agenda__liste { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }

/* Une activité et un trou ont la même forme : deux colonnes, l'heure à
   gauche, le nom à droite. Seul le trait change — plein pour ce qui est
   pris, en pointillé pour ce qui reste. */
.agenda__ligne, .agenda__trou {
  display: grid; grid-template-columns: 58px 1fr; gap: 12px; align-items: center;
  width: 100%; text-align: left; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 12px 14px; min-height: var(--tap); cursor: pointer;
  transition: transform .15s ease, background .2s;
}
.agenda__ligne:active, .agenda__trou:active { transform: scale(.98); }
.agenda__heures {
  display: grid; gap: 1px; font-size: 13px; font-weight: 600; color: var(--muted);
  font-variant-numeric: tabular-nums; line-height: 1.35;
}
.agenda__nom { display: block; font-size: 15.5px; font-weight: 600; overflow-wrap: anywhere; }
.agenda__meta { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.agenda__trou { background: transparent; border: 1.5px dashed var(--primary); }
.agenda__trou .agenda__heures, .agenda__trou .agenda__nom { color: var(--primary); }
.agenda__trou .agenda__nom { font-weight: 700; }
.agenda__ajout { width: 100%; }

.field-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field__note--seul { margin: -6px 0 18px; }
.agenda__raccourcis { display: flex; gap: 18px; margin-top: 10px; }
.agenda__retirer { width: 100%; margin-top: 10px; }
.sheet--agenda .sheet__actions { position: sticky; bottom: 0; background: var(--surface); padding: 12px 0 2px; margin-top: 10px; box-shadow: 0 -10px 14px -8px var(--surface); }
.day[aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 700; }

/* ─── Bienvenue (première ouverture) ─────────────────── */
.welcome {
  position: absolute; inset: 0; z-index: 40;
  background: var(--bg);
  display: flex; flex-direction: column; justify-content: center;
  /* 80px en haut, et non 28 : la rangee des langues se pose au-dessus. */
  padding: calc(80px + var(--haut-barre)) 24px calc(28px + env(safe-area-inset-bottom));
  overflow-y: auto;
  animation: fade .35s ease;
}
.welcome__step { width: 100%; }

/* Le choix de la langue, pose en haut de l'ecran de bienvenue.
   En absolu, parce que le reste du contenu est centre verticalement :
   la rangee, elle, ne doit pas bouger entre les deux etapes. */
.wlangues {
  position: absolute; top: calc(12px + var(--haut-barre)); left: 0; right: 0;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 0 24px;
}
.wlang {
  display: inline-flex; align-items: center; gap: 7px;
  font: inherit; font-size: 13.5px; font-weight: 600; color: var(--muted);
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 999px; padding: 0 15px; min-height: 40px; cursor: pointer;
  transition: transform .15s ease;
}
.wlang:active { transform: scale(.96); }
.wlang.is-on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
/* Le drapeau. Sur un ordinateur Windows, il s'affiche en deux petites
   lettres (« FR », « GB ») : c'est normal, et le nom suit juste a cote. */
.wlang__drapeau { font-size: 16px; line-height: 1; }
.welcome__art { width: 108px; height: 108px; margin: 0 auto 22px; }
.welcome__art svg { width: 100%; height: 100%; }
.w-star { fill: var(--primary); }
.w-hole { fill: var(--bg); }

.welcome__title { margin: 0 0 12px; font-size: 27px; letter-spacing: -.6px; text-align: center; }
.welcome__text { margin: 0 0 14px; font-size: 15.5px; color: var(--muted); text-align: center; line-height: 1.6; }
.welcome__text--small { font-size: 13.5px; }
.welcome__btn { width: 100%; margin-top: 14px; }
.welcome__actions { display: grid; grid-template-columns: 1fr 1.2fr; gap: 10px; margin-top: 20px; }

.packs { display: grid; gap: 10px; margin-top: 18px; }
.pack {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: left;
  font: inherit; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 16px; padding: 14px;
  transition: border-color .2s, background .2s, transform .15s;
}
.pack:active { transform: scale(.985); }
.pack.is-on { border-color: var(--primary); background: var(--primary-soft); }
.pack__ico { font-size: 22px; flex: none; }
.pack__body { flex: 1; min-width: 0; }
.pack__name { display: block; font-size: 15px; font-weight: 600; color: var(--text); }
.pack__desc { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.pack__dot {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--line); display: grid; place-items: center;
  transition: background .2s, border-color .2s;
}
.pack__dot svg { width: 13px; height: 13px; stroke: var(--primary-ink); stroke-width: 3.2; fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity .18s; }
.pack.is-on .pack__dot { background: var(--primary); border-color: var(--primary); }
.pack.is-on .pack__dot svg { opacity: 1; }

/* ─── Toast ──────────────────────────────────────────── */
.toast {
  position: absolute; left: 18px; right: 18px; bottom: 100px; z-index: 30;
  background: var(--primary); color: var(--primary-ink);
  border-radius: 14px; padding: 13px 16px; font-size: 14.5px; font-weight: 500;
  text-align: center; box-shadow: 0 10px 30px rgba(11,110,85,.3);
  animation: toastIn .35s cubic-bezier(.22,1,.36,1);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ─── Accessibilité ──────────────────────────────────── */
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 8px; }

/* Animations réduites : certaines personnes ont des vertiges avec le mouvement.
   On ne coupe pas tout — sinon on perdrait aussi le retour visuel qui dit
   « c'est bien coché ». On supprime uniquement les déplacements, et on garde
   un fondu court sur les couleurs et l'opacité. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-property: opacity, background-color, border-color, color, stroke, fill !important;
    transition-duration: .12s !important;
    scroll-behavior: auto !important;
  }
  /* Plus aucun glissement ni agrandissement */
  .task.is-leaving { transform: none; }
  .check, .prayer__dot, .fab, .btn, .chip, .day, .task__hit, .pack,
  .task__check, .sub__rond, .perso-btn { transform: none !important; }
  .chart__bar, .reg__jauge { transition: none; }
  .switch::after { transition: none; }
  /* Les panneaux qui montaient du bas ou glissaient apparaissent en fondu */
  .sheet, .welcome, .toast, .biblio { animation: fade .14s ease !important; }
}
