Écrans branchés : planning du jour, semaine, activités, poids, données, profil, analyses, propositions avec aperçu, gamification

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Pierre MARTIN
2026-11-18 05:26:02 +01:00
co-authored by Claude Opus 5.5
parent 077f2dc58d
commit 41d5e44daa
35 changed files with 2931 additions and 367 deletions
+89 -79
View File
@@ -1,106 +1,116 @@
/* Composants de la séance guidée : exercice, superset, séries, ressenti. */
/* La séance guidée : exercice, superset, séries, ressenti, minuteur. Les
chiffres sont énormes : on les lit à un mètre, la barre dans les mains. */
.exercises { display: grid; gap: var(--space-2); margin-top: var(--space-4); }
.exercises { display: grid; gap: var(--space-3); margin-top: var(--space-4); }
/* ---- Exercice (details/summary natif, accessible sans script) ---------- */
.exercise { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.exercise[open] { border-color: var(--line-strong); }
/* ---- exercice (details/summary natif) --------------------------------------- */
.exercise { border: var(--b) solid var(--ink); background: var(--bg); }
.exercise__head {
display: flex; align-items: center; gap: var(--space-3);
min-height: 64px; padding: var(--space-3) var(--space-4); cursor: pointer; list-style: none;
border-radius: var(--radius);
min-height: 72px; padding: var(--space-2) var(--space-3); cursor: pointer; list-style: none;
}
.exercise__head::-webkit-details-marker { display: none; }
/* Piège d'Atelier : combinateur enfant, et pas d'overflow:hidden sur la carte,
sinon l'en-tête collant ne colle plus. */
.exercise[open] > .exercise__head {
position: sticky; top: 0; z-index: 5; background: var(--surface);
border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0;
position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: var(--b) solid var(--ink);
}
.exercise[open] > .exercise__head .chevron { transform: rotate(45deg); }
.exercise[open] > .exercise__head .chevron::after { content: "↓"; }
.exercise .badge { font-family: var(--font-display); font-size: var(--fs-lg); }
.exercise__name { flex: 1; min-width: 0; display: grid; }
.exercise__name strong { font-size: var(--fs-md); font-weight: 600; line-height: 1.25; }
.exercise__sub { color: var(--text-muted); font-size: var(--fs-xs); }
.exercise__count { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-md); color: var(--text-muted); }
.exercise__count--done { color: var(--primary); }
.exercise__body { padding: var(--space-3) var(--space-4) var(--space-4); }
.exercise__name strong { font-size: var(--fs-lg); line-height: 1.15; }
.exercise__sub { color: var(--muted); font-family: var(--font-mark); font-size: var(--fs-mark); }
.exercise__count { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-xl); }
.exercise__count--done { background: var(--signal); color: var(--on-signal); padding: 0 6px; }
.exercise__body { padding: var(--space-3); }
.exercise__body > .coach-note { margin-bottom: var(--space-3); }
.mini-label { font-family: var(--font-display); text-transform: uppercase; font-weight: 600; letter-spacing: 0.14em; font-size: var(--fs-xs); color: var(--text-muted); margin: var(--space-4) 0 var(--space-2); }
.cues li, .mistakes li { position: relative; padding-left: 20px; margin-bottom: var(--space-2); font-size: var(--fs-sm); }
.cues li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); }
.mistakes { border-left: 3px solid var(--danger); padding-left: var(--space-1); }
.mistakes li { color: var(--text-muted); padding-left: var(--space-3); }
.tutorial { margin-top: var(--space-2); }
.cues li, .mistakes li { padding-left: 1.4em; text-indent: -1.4em; margin-bottom: var(--space-2); font-size: var(--fs-sm); }
.cues li::before { content: "▪ "; font-family: var(--font-mark); }
.mistakes li { color: var(--muted); }
.mistakes li::before { content: "✕ "; font-family: var(--font-mark); color: var(--ink); }
.tutorial { margin-top: var(--space-3); }
.objective { display: flex; align-items: baseline; gap: var(--space-3); margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.objective__value { font-size: var(--fs-xl); line-height: 1; }
.objective__rest { margin-left: auto; font-family: var(--font-display); text-transform: uppercase; font-weight: 600; letter-spacing: .1em; font-size: var(--fs-sm); color: var(--text-muted); }
.objective { display: flex; align-items: baseline; gap: var(--space-3); margin-top: var(--space-4); padding-top: var(--space-3); border-top: var(--b) solid var(--ink); }
.objective__value { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-3xl); line-height: 0.85; }
.objective__rest { margin-left: auto; font-family: var(--font-mark); font-weight: 700; font-size: var(--fs-mark); text-transform: uppercase; color: var(--muted); }
/* ---- Zone de saisie ----------------------------------------------------- */
/* Conseil de progression : « Prêt à monter » */
.advice { border: var(--b) solid var(--signal); padding: var(--space-3); margin-top: var(--space-3); display: grid; gap: var(--space-2); }
.advice__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); }
.advice__head .mark { background: var(--signal); color: var(--on-signal); padding: 2px 6px; }
.advice__kg { font-size: var(--fs-2xl); line-height: 0.9; }
/* ---- saisie ------------------------------------------------------------------- */
.work { display: grid; gap: var(--space-3); margin-top: var(--space-3); }
.work__fields { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-4); align-items: center; }
.set-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.work__fields { display: grid; gap: var(--space-3); }
.set-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: var(--space-2); }
.set-btn {
position: relative; width: 52px; height: 52px; border-radius: var(--radius);
background: transparent; border: 1px solid var(--line-strong); color: var(--text);
font-family: var(--font-display); font-weight: 700; font-size: var(--fs-lg);
height: 72px; display: grid; place-content: center; gap: 2px; padding: 0;
background: var(--bg); border: var(--b) solid var(--ink); color: var(--ink); font-size: var(--fs-2xl); line-height: 0.9;
}
.set-btn[aria-expanded="true"] { outline: 3px solid var(--text); outline-offset: 1px; }
.set-btn--done { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
/* Pastille du ressenti : la couleur double le texte (aria-label), jamais seule. */
.set-btn--done::after {
content: ""; position: absolute; right: 4px; top: 4px; width: 10px; height: 10px; border-radius: 50%;
border: 2px solid var(--on-primary); background: var(--dot, transparent);
}
.set-btn[data-effort="easy"] { --dot: var(--effort-easy); }
.set-btn[data-effort="ok"] { --dot: var(--effort-ok); }
.set-btn[data-effort="hard"] { --dot: var(--effort-hard); }
.set-btn[data-effort="failure"] { --dot: var(--effort-failure); }
.set-btn[aria-expanded="true"] { outline: var(--b) solid var(--focus); outline-offset: 2px; }
.set-btn--done { background: var(--ink); color: var(--bg); }
.set-btn__effort { font-family: var(--font-mark); font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; }
/* Un échec se voit : rayé, jamais mis en valeur. */
.set-btn--done[data-effort="failure"] { background: var(--bg); color: var(--ink); border-style: dashed; }
.set-btn--done[data-effort="failure"] .set-btn__n { text-decoration: line-through; text-decoration-thickness: 3px; }
.set-panel { background: var(--surface-sunk); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: var(--space-3); display: grid; gap: var(--space-3); }
.set-panel__title, .set-panel__ask { font-family: var(--font-display); text-transform: uppercase; font-weight: 600; letter-spacing: .12em; font-size: var(--fs-sm); color: var(--text-muted); }
.set-panel { border: var(--b) solid var(--ink); background: var(--sunk); padding: var(--space-3); display: grid; gap: var(--space-3); }
.set-panel__title, .set-panel__ask { font-family: var(--font-mark); font-weight: 700; font-size: var(--fs-mark); text-transform: uppercase; }
.stepper { display: flex; align-items: center; gap: var(--space-3); }
.stepper__btn { width: 56px; height: 56px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text); font-size: 1.75rem; line-height: 1; }
.stepper__value { min-width: 2.2ch; text-align: center; font-size: 2.5rem; line-height: 1; }
.stepper__unit { font-family: var(--font-display); text-transform: uppercase; font-weight: 600; letter-spacing: .1em; font-size: var(--fs-sm); color: var(--text-muted); }
.stepper { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; gap: var(--space-2); }
.stepper__btn { height: 64px; background: var(--bg); border: var(--b) solid var(--ink); color: var(--ink); font-family: var(--font-display); font-size: 2.25rem; line-height: 1; }
.stepper__btn:active { background: var(--ink); color: var(--bg); }
.stepper__value { text-align: center; font-size: var(--fs-num); line-height: 0.85; }
.stepper__unit { grid-column: 1 / -1; text-align: center; font-family: var(--font-mark); font-weight: 700; font-size: var(--fs-mark); text-transform: uppercase; color: var(--muted); }
.effort-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); }
.effort {
display: grid; gap: 2px; text-align: left; min-height: 64px; padding: var(--space-2) var(--space-3);
background: var(--surface); border: 1px solid var(--line-strong); border-left: 6px solid var(--c); border-radius: var(--radius); color: var(--text);
}
.effort[data-effort="easy"] { --c: var(--effort-easy); }
.effort[data-effort="ok"] { --c: var(--effort-ok); }
.effort[data-effort="hard"] { --c: var(--effort-hard); }
.effort[data-effort="failure"] { --c: var(--effort-failure); }
.effort[aria-pressed="true"] { border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); }
.effort__label { font-family: var(--font-display); text-transform: uppercase; font-weight: 700; letter-spacing: .06em; font-size: var(--fs-lg); color: var(--c); }
.effort__hint { font-size: var(--fs-xs); color: var(--text-muted); }
.effort-picker { display: grid; grid-template-columns: 1fr 1fr; gap: var(--b); background: var(--ink); border: var(--b) solid var(--ink); }
.effort { display: grid; gap: 2px; text-align: left; min-height: 64px; padding: var(--space-2) var(--space-3); background: var(--bg); border: 0; color: var(--ink); }
.effort[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.effort__label { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: var(--fs-xl); line-height: 1; }
.effort__hint { font-size: var(--fs-sm); color: var(--muted); }
.effort[aria-pressed="true"] .effort__hint { color: inherit; }
.effort[data-effort="failure"] .effort__label::before { content: "✕ "; }
.tracking { display: grid; gap: 0; margin-top: var(--space-3); padding-top: var(--space-1); border-top: 1px solid var(--line); }
.btn--work { border-style: solid; border-width: var(--b-heavy); }
.tracking { margin-top: var(--space-4); padding-top: var(--space-3); border-top: var(--b) solid var(--ink); }
.tracking .mini-label { margin-top: 0; }
/* ---- Superset ----------------------------------------------------------- */
.superset { border: 1px solid var(--work); border-radius: var(--radius); padding: var(--space-2); display: grid; gap: var(--space-2); }
.superset__head { padding: var(--space-2); }
.superset__text { color: var(--text-muted); font-size: var(--fs-xs); margin-top: var(--space-1); }
.superset .exercise { background: var(--surface); }
/* ---- superset : deux exercices dans un même cadre épais ------------------------- */
.superset { border: var(--b-heavy) solid var(--ink); padding: var(--space-2); display: grid; gap: var(--space-2); }
.superset__head { padding: var(--space-1) var(--space-1) var(--space-2); }
.tag--superset { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.superset__text { color: var(--muted); font-size: var(--fs-sm); margin-top: var(--space-1); }
/* ---- Échauffement ------------------------------------------------------- */
.exercise--warmup { border-color: var(--primary); }
/* ---- échauffement ----------------------------------------------------------------- */
.exercise--warmup { border-style: dashed; }
.steps { display: grid; }
.step { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; border-top: 1px solid var(--line); }
.step { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) 0; border-top: 2px solid var(--rule-soft); }
.step:first-child { border-top: 0; }
.step__text { flex: 1; min-width: 0; display: grid; }
.step__text strong { font-size: var(--fs-sm); font-weight: 600; }
.step__text span { color: var(--text-muted); font-size: var(--fs-xs); }
.tick {
width: 44px; height: 44px; flex: none; border-radius: var(--radius); background: transparent;
border: 1px solid var(--line-strong); position: relative;
}
.tick[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); }
.tick[aria-pressed="true"]::after {
content: ""; position: absolute; left: 15px; top: 9px; width: 10px; height: 18px;
border-right: 3px solid var(--on-primary); border-bottom: 3px solid var(--on-primary); transform: rotate(45deg);
}
.step__text strong { font-size: var(--fs-md); }
.step__text span { color: var(--muted); font-size: var(--fs-sm); }
.tick { width: var(--tap); height: var(--tap); flex: none; background: var(--bg); border: var(--b) solid var(--ink); color: var(--bg); font-family: var(--font-display); font-size: var(--fs-xl); }
.tick[aria-pressed="true"] { background: var(--ink); }
.tick[aria-pressed="true"]::after { content: "✓"; }
.step__go { flex: none; }
/* ---- minuteur, sous la barre d'action -------------------------------------------- */
.timer {
position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--timer-h) + env(safe-area-inset-bottom));
background: var(--ink); color: var(--bg); padding-bottom: env(safe-area-inset-bottom);
}
.timer__bar { height: 8px; background: var(--bg); }
.timer__bar::after { content: ""; display: block; height: 100%; width: 100%; background: var(--meter); transform-origin: left; transform: scaleX(var(--progress, 0)); }
.timer__in { max-width: var(--max); margin: 0 auto; padding: var(--space-1) var(--gutter); display: flex; align-items: center; gap: var(--space-3); height: calc(var(--timer-h) - 8px); }
.timer__read { flex: 1; min-width: 0; display: grid; }
.timer__label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timer__time { font-size: 3.75rem; line-height: 0.85; }
.timer__btns { display: flex; gap: var(--space-2); }
.timer .btn { border-color: var(--bg); background: var(--ink); color: var(--bg); min-height: 56px; font-size: var(--fs-lg); }
.timer .btn--primary { background: var(--signal); color: var(--on-signal); border-color: var(--signal); }
.timer--work .timer__bar::after { background: var(--signal); }
.timer--low .timer__time { text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 4px; }
.timer--zero { background: var(--signal); color: var(--on-signal); }
.timer--zero .btn { border-color: var(--on-signal); background: var(--signal); color: var(--on-signal); }