/* Présenter la journée (0.9.8) et les outils de la journée.
   Préfixes : tool-group (la barre de la journée : le numérique, le papier, le cahier de textes),
   pj- (l'écran de présentation : projeté, grand, sobre, rien d'autre à l'écran ; tient sur l'iPad
   en paysage, 1080 × 810, sans défiler ; s'il y a beaucoup d'étapes, seule leur liste défile). */

/* ---------- la barre de la journée : un petit intitulé par groupe */
.day-tools { align-items: flex-end; column-gap: 16px; }
.tool-group { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tool-group-title { padding-left: 6px; font-family: var(--title-font); font-size: 11.5px; font-weight: 700; line-height: 1.2; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tool-group-btns { display: flex; flex-wrap: wrap; gap: 8px; }
/* sur l'iPad (1080 px), les trois groupes et « ⋯ » tiennent sur une ligne */
.day-tools .btn { padding-left: 15px; padding-right: 15px; }

/* ---------- l'écran de présentation */
.page.focus.pj-page { max-width: 1240px; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 10px; overflow: hidden;
  padding: max(12px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
.pj-top { flex: none; display: flex; align-items: center; gap: 16px; }
.pj-retour { flex: none; }
.pj-jour { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.pj-date { font-family: var(--title-font); font-weight: 700; font-size: 19px; color: var(--ink); }

/* les créneaux de la journée : celui montré en couleur, les autres d'un toucher */
.pj-creneaux { flex: none; display: flex; flex-wrap: wrap; gap: 8px; }
.pj-creneau { position: relative; flex: 1 1 116px; max-width: 190px; min-width: 0; min-height: 52px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; padding: 5px 12px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); text-align: left; -webkit-tap-highlight-color: transparent; }
.pj-creneau:hover:not(.on) { border-color: #bdb8aa; }
.pj-creneau-h { font-family: var(--title-font); font-weight: 700; font-size: 17px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.pj-creneau-m { max-width: 100%; font-size: 14px; line-height: 1.25; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pj-creneau-tag { position: absolute; top: 6px; right: 9px; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--brand); }
.pj-creneau-ok { color: var(--leaf); }
.pj-creneau.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pj-creneau.on .pj-creneau-m, .pj-creneau.on .pj-creneau-tag, .pj-creneau.on .pj-creneau-ok { color: #e1f0ee; }

.pj-tete { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.pj-tete h1 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 16px; font-size: 31px; }
.pj-heure { font-variant-numeric: tabular-nums; }
.pj-matiere { font-size: 23px; font-weight: 500; color: var(--ink-2); }
.pj-maintenant { font-size: 14px; }

/* les étapes : le rituel, puis les activités ; celle en cours encadrée */
/* (la liste défile s'il le faut : sa marge intérieure laisse la place à l'ombre des cartes) */
.pj-etapes { flex: 1 1 auto; min-height: 0; overflow-y: auto; list-style: none; margin: 0 -8px -10px; padding: 4px 8px 14px; display: flex; flex-direction: column; gap: 10px; }
.pj-etape { flex: none; border: 2px solid transparent; border-radius: 20px; background: #fff; box-shadow: 0 1px 2px rgb(30 40 50 / 6%), 0 3px 10px rgb(30 40 50 / 6%); }
.pj-etape.courante { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft), 0 3px 10px rgb(30 40 50 / 6%); }
.pj-etape-tete { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 64px; padding: 8px 20px; border: 0; border-radius: 18px; background: none; color: inherit; text-align: left; -webkit-tap-highlight-color: transparent; }
.pj-num { flex: none; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--bg-2); font-family: var(--title-font); font-weight: 700; font-size: 20px; color: var(--ink-2); }
.pj-etape.courante .pj-num { background: var(--brand); color: #fff; }
.pj-etape.faite .pj-num { background: var(--leaf); color: #fff; }
.pj-etape-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pj-type { font-family: var(--title-font); font-size: 12.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.pj-titre { font-family: var(--title-font); font-weight: 700; font-size: 25px; line-height: 1.2; overflow-wrap: anywhere; }
.pj-sous { font-size: 16.5px; color: var(--ink-2); }
.pj-etape.faite:not(.courante) .pj-titre { color: var(--ink-2); }
.pj-etat { flex: none; font-family: var(--title-font); font-weight: 600; font-size: 15px; color: var(--muted); }
.pj-etat.ok { color: #1d6b41; }
/* le rituel n'est plus l'étape en cours, son minuteur tourne encore */
.pj-etat-temps { padding: 4px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-deep); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pj-etat-temps.fini { background: var(--sun-soft); color: #7a5600; }

/* le minuteur du rituel : − / + d'un toucher, le temps en grand, une barre qui se vide */
.pj-rituel { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0 20px 10px; }
.pj-minuteur { display: flex; align-items: center; justify-content: center; gap: 28px; }
.pj-pm { flex: none; width: 64px; height: 64px; border: 2px solid var(--line); border-radius: 50%; background: #fff; font-family: var(--title-font); font-size: 34px; font-weight: 600; line-height: 1; color: var(--ink); -webkit-tap-highlight-color: transparent; }
.pj-pm:hover:not(:disabled) { border-color: #bdb8aa; background: #fbfaf7; }
.pj-pm:active:not(:disabled) { transform: scale(.96); }
.pj-pm:disabled { opacity: .35; cursor: default; }
.pj-temps-box { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 250px; padding: 6px 22px 10px; border-radius: 20px; }
.pj-temps { font-family: var(--title-font); font-weight: 700; font-size: 62px; line-height: 1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pj-temps-aide { font-size: 15px; color: var(--muted); }
.pj-barre { width: 100%; height: 10px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.pj-barre-in { display: block; height: 100%; border-radius: 999px; background: var(--brand); transition: width .25s linear; }
.pj-minuteur.en-cours .pj-temps { color: var(--brand-deep); }
/* fini : le signal doux s'entend, et se voit (trois pulsations lentes, sans clignoter) */
.pj-minuteur.fini .pj-temps-box { background: var(--sun-soft); animation: pj-doux 1.4s ease-in-out 3; }
.pj-minuteur.fini .pj-temps { padding-top: 12px; font-size: 46px; color: #7a5600; }
.pj-minuteur.fini .pj-barre-in { background: var(--sun); }
@keyframes pj-doux { 50% { box-shadow: 0 0 0 10px rgb(242 179 61 / 30%); } }

/* les trois gros boutons */
.pj-actions { flex: none; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 18px; padding-top: 2px; }
.btn.pj-gros { min-width: 200px; min-height: 64px; padding: 10px 32px; gap: 12px; font-size: 23px; font-weight: 600; }
.btn.pj-gros .ico { width: 26px; height: 26px; }
.btn.pj-termine { background: var(--leaf-soft); border-color: #9fd2b3; color: #1d6b41; }
.btn.pj-termine:hover:not(:disabled) { background: #d3eedd; border-color: var(--leaf); }
.pj-fini { flex-basis: 100%; margin: 0; text-align: center; font-family: var(--title-font); font-weight: 600; font-size: 20px; color: #1d6b41; }

.pj-rien { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; text-align: center; }
.pj-rien-t { margin: 0; font-family: var(--title-font); font-weight: 700; font-size: 26px; }
.pj-rien .muted { max-width: 560px; margin: 0; }

/* le temps du rituel dans la barre du tableau de la dictée (fond sombre) */
.rt-board .pj-puce { flex: none; display: inline-flex; align-items: center; min-height: 48px; padding: 4px 18px; border-radius: 999px; background: rgb(255 255 255 / 14%); color: #fff; font-weight: 700; font-size: clamp(19px, 2.9vh, 27px); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rt-board .pj-puce.fini { background: var(--sun); color: #3a2b00; }

/* téléphone, fenêtre étroite : la page défile, les boutons se partagent la largeur */
@media (max-width: 700px) {
  .page.focus.pj-page { height: auto; min-height: 100dvh; overflow: visible; }
  .pj-etapes { overflow: visible; }
  .pj-tete h1 { font-size: 26px; }
  .pj-matiere { font-size: 20px; }
  .pj-titre { font-size: 20px; }
  .pj-rituel { padding: 0 10px 10px; }
  .pj-minuteur { gap: 10px; }
  .pj-pm { width: 54px; height: 54px; font-size: 30px; }
  .pj-temps-box { min-width: 0; padding: 6px 10px 10px; }
  .pj-temps { font-size: 50px; }
  .pj-minuteur.fini .pj-temps { font-size: 24px; white-space: normal; text-align: center; }
  .btn.pj-gros { flex: 1 1 140px; min-width: 0; padding: 8px 16px; font-size: 19px; }
}
