diff --git a/app/fonts/barlow-condensed-bold.woff2 b/app/fonts/barlow-condensed-bold.woff2 index bfa5f5d..790097d 100644 Binary files a/app/fonts/barlow-condensed-bold.woff2 and b/app/fonts/barlow-condensed-bold.woff2 differ diff --git a/app/fonts/barlow-condensed-medium.woff2 b/app/fonts/barlow-condensed-medium.woff2 deleted file mode 100644 index ba4fb60..0000000 Binary files a/app/fonts/barlow-condensed-medium.woff2 and /dev/null differ diff --git a/app/fonts/barlow-condensed-semibold.woff2 b/app/fonts/barlow-condensed-semibold.woff2 deleted file mode 100644 index 67c352f..0000000 Binary files a/app/fonts/barlow-condensed-semibold.woff2 and /dev/null differ diff --git a/app/styles/base.css b/app/styles/base.css index ce999c2..b6d2cd2 100644 --- a/app/styles/base.css +++ b/app/styles/base.css @@ -1,9 +1,8 @@ -/* Base : remise à zéro, typographie, mise en page de l'écran. */ -*, *::before, *::after { box-sizing: border-box; } +/* Base : remise à zéro, typographie, mise en page de l'écran. Angles droits + partout, aucune ombre, aucun dégradé. */ +*, *::before, *::after { box-sizing: border-box; border-radius: 0; } html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; - /* Le défilement vers un élément (focus, lien) tient compte de l'en-tête - collant de l'exercice et des barres fixées en bas. */ scroll-padding-top: 72px; scroll-padding-bottom: calc(var(--action-bar-h) + var(--space-4)); } @@ -11,68 +10,78 @@ html:has(body.has-timer) { scroll-padding-bottom: calc(var(--action-bar-h) + var html, body { margin: 0; padding: 0; } body { background: var(--bg); - color: var(--text); + color: var(--ink); font-family: var(--font-body); font-size: var(--fs-md); - line-height: 1.5; + line-height: 1.45; overscroll-behavior-y: none; -webkit-tap-highlight-color: transparent; - /* place pour la barre d'action collée en bas */ padding-bottom: calc(var(--action-bar-h) + env(safe-area-inset-bottom)); } body.has-timer { padding-bottom: calc(var(--action-bar-h) + var(--timer-h) + env(safe-area-inset-bottom)); } .wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); } -h1, h2, h3, p, ul, ol { margin: 0; } +h1, h2, h3, p, ul, ol, figure { margin: 0; } ul, ol { padding: 0; list-style: none; } -a { color: inherit; } +a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 2px; } button, input, select, textarea { font: inherit; color: inherit; } button { cursor: pointer; } [hidden] { display: none !important; } +svg { display: block; } -:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--radius-sm); } +:focus-visible { outline: var(--b) solid var(--focus); outline-offset: 3px; } h1:focus { outline: none; } .visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; } -.skip-link { position: absolute; left: var(--space-2); top: -100px; z-index: 50; } -.skip-link:focus { top: var(--space-2); background: var(--surface); padding: var(--space-2) var(--space-3); } +.skip-link { position: absolute; left: var(--space-2); top: -100px; z-index: 50; background: var(--signal); color: var(--on-signal); padding: var(--space-2) var(--space-3); } +.skip-link:focus { top: var(--space-2); } /* Chiffres alignés partout où l'on compare des nombres. */ -.tnum, .timer__time, .stepper__value, .set-btn, .field__input, .exercise__count, .objective__value, .action-bar__meta { font-variant-numeric: tabular-nums; } +.num, .timer__time, .stepper__value, .set-btn, .field__input, .exercise__count, .action-bar__meta, .stat__value { font-variant-numeric: tabular-nums lining-nums; } -/* Typographie d'affichage : capitales condensées. */ -.kicker, .section-label, .mini-label, .card__eyebrow, .plate__id, .plate__last, .tag, .back, .btn, .timer__label { - font-family: var(--font-display); - text-transform: uppercase; - font-weight: 600; - letter-spacing: 0.1em; +/* Trois voix typographiques : + - affichage (fonte condensée, capitales) : titres et grands chiffres ; + - marquage (chasse fixe du système, capitales) : étiquettes, comme un ruban + ou un chiffre frappé sur un disque ; + - texte courant (police du système). */ +.title, .h2, .num, .btn, .stat__value, .timer__time, .stepper__value, .set-btn, .dialog__title { + font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.01em; } -.title, .card__title, .plate__name, .note__title, .dialog__title, .timer__time, .objective__value, .stepper__value { - font-family: var(--font-display); - font-weight: 700; +.mark, .kicker, .tape, .back, .field__label, .mini-label, .tag, .badge, .stat__label, .chip, .timer__label, .action-bar__meta { + font-family: var(--font-mark); font-size: var(--fs-mark); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; } -.screen-head { padding: var(--space-5) 0 var(--space-4); } -.kicker { font-size: var(--fs-xs); color: var(--text-muted); letter-spacing: 0.16em; } -.title { font-size: var(--fs-3xl); line-height: 0.95; text-transform: uppercase; margin-top: var(--space-1); letter-spacing: -0.005em; } -.title--hero { font-size: 3.25rem; } -.lede { color: var(--text-muted); font-size: var(--fs-sm); margin-top: var(--space-2); max-width: 46ch; } -.muted { color: var(--text-muted); font-size: var(--fs-sm); } -.foot { color: var(--text-muted); font-size: var(--fs-xs); margin: var(--space-6) 0 var(--space-4); } -.empty { color: var(--text-muted); padding: var(--space-5) 0; } +.screen-head { padding: var(--space-4) 0 var(--space-3); border-bottom: var(--b-heavy) solid var(--ink); margin-bottom: var(--space-4); } +.kicker { color: var(--muted); display: block; } +.title { font-size: var(--fs-3xl); line-height: 0.88; margin-top: var(--space-2); overflow-wrap: anywhere; } +.title--hero { font-size: 4rem; } +.lede { color: var(--muted); margin-top: var(--space-2); max-width: 46ch; } +.h2 { font-size: var(--fs-xl); line-height: 0.95; } +.muted { color: var(--muted); font-size: var(--fs-sm); } +.foot { color: var(--muted); font-size: var(--fs-sm); margin: var(--space-6) 0 var(--space-4); border-top: var(--b) solid var(--ink); padding-top: var(--space-3); } +.empty { color: var(--muted); padding: var(--space-4) 0; } +.prose > * + * { margin-top: var(--space-3); } -.section-label { - font-size: var(--fs-sm); color: var(--text-muted); letter-spacing: 0.16em; - margin: var(--space-6) 0 var(--space-3); display: flex; align-items: baseline; gap: var(--space-2); +/* Ruban adhésif de salle : l'étiquette d'une section. */ +.tape { + display: inline-block; background: var(--signal); color: var(--on-signal); + padding: 4px var(--space-2); margin: var(--space-6) 0 var(--space-3); } -.section-label__hint { font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: none; font-family: var(--font-body); font-weight: 400; } +:root[data-theme="light"] .tape, :root[data-theme="light"] .badge--signal { outline: 2px solid var(--ink); } +@media (prefers-color-scheme: light) { + :root:not([data-theme="dark"]) .tape, :root:not([data-theme="dark"]) .badge--signal { outline: 2px solid var(--ink); } +} +.tape__hint { margin-left: var(--space-2); color: var(--muted); font-family: var(--font-body); font-size: var(--fs-sm); text-transform: none; letter-spacing: 0; font-weight: 400; } +.section-head { display: flex; align-items: baseline; flex-wrap: wrap; } -.status { min-height: 1.5em; margin-top: var(--space-3); color: var(--danger); font-size: var(--fs-sm); } -.status--ok { color: var(--primary); } +.status { min-height: 1.45em; margin-top: var(--space-3); font-weight: 700; } +.status:empty { min-height: 0; margin: 0; } +.status--err:not(:empty)::before { content: "! "; } +.status--ok:not(:empty)::before { content: "✓ "; } @media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } diff --git a/app/styles/components.css b/app/styles/components.css index cec7233..e3ea2eb 100644 --- a/app/styles/components.css +++ b/app/styles/components.css @@ -1,234 +1,226 @@ -/* Composants communs (docs/design.md). Un composant = un bloc nommé, avec ses - éléments (bloc__element) et variantes (bloc--variante). */ +/* Composants (docs/design.md). Bordures franches de 3 px, angles droits, aucune + ombre : un bloc est délimité par son trait, jamais par une élévation. */ -/* ---- Bouton ------------------------------------------------------------- */ +/* ---- boutons --------------------------------------------------------------- */ .btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); - min-height: var(--tap); padding: 0 var(--space-4); - background: var(--surface-2); color: var(--text); - border: 1px solid var(--line-strong); border-radius: var(--radius); - font-size: var(--fs-md); text-decoration: none; text-align: center; - transition: background-color .12s, border-color .12s, transform .06s; + min-height: 56px; padding: 0 var(--space-4); + border: var(--b) solid var(--ink); background: var(--bg); color: var(--ink); + font-size: var(--fs-lg); line-height: 1; text-decoration: none; text-align: center; + touch-action: manipulation; user-select: none; } -.btn:hover { border-color: var(--text-muted); } -.btn:active { transform: scale(.985); } -.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; } -.btn--primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 700; } -.btn--primary:hover { border-color: var(--text); } -.btn--ghost { background: transparent; } -.btn--danger { background: transparent; border-color: var(--danger); color: var(--danger); } -.btn--work { background: transparent; border-color: var(--work); color: var(--work); } +.btn:active { background: var(--ink); color: var(--bg); } +.btn[disabled], .btn[aria-disabled="true"] { border-style: dashed; color: var(--muted); cursor: not-allowed; } +.btn--primary { background: var(--signal); color: var(--on-signal); border-color: var(--signal); } +.btn--primary:active { background: var(--ink); color: var(--bg); border-color: var(--ink); } +.btn--ghost { border-color: var(--rule-soft); } +.btn--danger { border-style: double; border-width: 6px; } +.btn--danger::before { content: "✕"; } .btn--block { display: flex; width: 100%; } -.btn--lg { min-height: 56px; font-size: var(--fs-lg); letter-spacing: 0.06em; } -.btn--sm { min-height: 44px; padding: 0 var(--space-3); font-size: var(--fs-sm); } - -.link-btn { - background: none; border: 0; padding: 0 var(--space-2); min-height: 44px; min-width: 44px; - color: var(--text); text-decoration: underline; text-underline-offset: 3px; font-size: var(--fs-sm); -} +.btn--lg { min-height: 64px; font-size: var(--fs-xl); } +.btn--sm { min-height: var(--tap); font-size: var(--fs-md); padding: 0 var(--space-3); } +.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); } +.btn-stack { display: grid; gap: var(--space-2); margin-top: var(--space-3); } .back { - display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--space-2) 0 0; - background: none; border: 0; color: var(--text-muted); font-size: var(--fs-sm); letter-spacing: 0.12em; + display: inline-flex; align-items: center; min-height: var(--tap); padding: 0 var(--space-3) 0 0; + border: 0; background: none; color: var(--ink); } -.back:hover { color: var(--text); } -/* ---- Barre d'action collée en bas -------------------------------------- */ +/* ---- barre d'action, à portée de pouce ------------------------------------ */ .action-bar { - position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; - background: color-mix(in srgb, var(--bg) 92%, transparent); - border-top: 1px solid var(--line); - padding-bottom: env(safe-area-inset-bottom); - backdrop-filter: blur(6px); -} -.action-bar__in { - max-width: var(--max); margin: 0 auto; padding: var(--space-3) var(--gutter); - display: flex; align-items: center; gap: var(--space-3); + position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; + background: var(--bg); border-top: var(--b-heavy) solid var(--ink); + padding: var(--space-2) var(--gutter) calc(var(--space-2) + env(safe-area-inset-bottom)); } +.action-bar__in { max-width: var(--max); margin: 0 auto; display: flex; align-items: center; gap: var(--space-3); } .action-bar__in > .btn { flex: 1; } -/* Le minuteur s'empile sous la barre d'action : « Terminer la séance » reste - accessible pendant un repos. */ -body.has-timer .action-bar { bottom: calc(var(--timer-h) + env(safe-area-inset-bottom)); padding-bottom: 0; border-top-color: transparent; } -.action-bar__meta { color: var(--text-muted); font-family: var(--font-display); font-weight: 600; font-size: var(--fs-md); white-space: nowrap; } +.action-bar__meta { color: var(--ink); white-space: nowrap; display: grid; line-height: 1.2; } +.action-bar__meta .combo { color: var(--on-signal); background: var(--signal); padding: 0 4px; justify-self: start; } +body.has-timer .action-bar { bottom: var(--timer-h); border-top-width: var(--b); } -/* ---- Cartes ------------------------------------------------------------- */ -.card { - display: block; position: relative; text-decoration: none; color: inherit; - background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); - padding: var(--space-4); +/* ---- blocs ------------------------------------------------------------------ */ +.block { border: var(--b) solid var(--ink); padding: var(--space-4); margin-bottom: var(--space-4); } +.block > * + * { margin-top: var(--space-3); } +.block--today { border-width: var(--b-heavy); } +.block--signal { border-color: var(--signal); } +.block__head { display: flex; align-items: flex-start; gap: var(--space-3); } +.block__title { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: var(--fs-2xl); line-height: 0.9; overflow-wrap: anywhere; } +.block__meta { color: var(--muted); } +.block__sep { border-top: var(--b) solid var(--ink); padding-top: var(--space-3); } + +/* Plaque : la séance, comme un disque marqué de sa lettre et de sa couleur. */ +.plaque { + flex: none; width: 56px; height: 56px; display: grid; place-items: center; + background: var(--accent); color: var(--accent-ink); + font-family: var(--font-display); font-weight: 700; font-size: 2.25rem; line-height: 1; + border: var(--b) solid var(--ink); } -/* La carte du jour domine l'accueil : plus grande, bordée de la couleur de séance. */ -.card--today { - border-left: 6px solid var(--accent); padding: var(--space-5) var(--space-4); +.plaque--sm { width: 40px; height: 40px; font-size: 1.5rem; } +.plaque--empty { background: var(--bg); color: var(--muted); border-style: dashed; } + +/* ---- liste en grille : chaque ligne séparée par un trait ------------------ */ +.rows { border-top: var(--b) solid var(--ink); } +.row { + display: flex; align-items: center; gap: var(--space-3); min-height: 64px; + padding: var(--space-2) 0; border-bottom: var(--b) solid var(--ink); + text-decoration: none; color: inherit; } -a.card--today:hover { border-color: var(--line-strong); border-left-color: var(--accent); } -.card--proposal { border-left: 6px solid var(--primary); margin-bottom: var(--space-4); } -.card__eyebrow { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-4); font-size: var(--fs-sm); letter-spacing: 0.16em; } -.card__title { font-size: var(--fs-2xl); line-height: 1; text-transform: uppercase; margin-top: var(--space-1); } -.card__meta { color: var(--text-muted); font-size: var(--fs-sm); margin-top: var(--space-2); } -.card__text { margin-top: var(--space-3); font-size: var(--fs-sm); } -.card__hint { color: var(--text-muted); font-size: var(--fs-xs); margin-top: var(--space-3); } -.card__actions { display: grid; gap: var(--space-2); margin-top: var(--space-4); } +a.row:active { background: var(--ink); color: var(--bg); } +.row__main { flex: 1; min-width: 0; display: grid; gap: 2px; } +.row__title { font-weight: 700; overflow-wrap: anywhere; } +.row__meta { color: var(--muted); font-size: var(--fs-sm); } +a.row:active .row__meta { color: inherit; } +.row__side { flex: none; text-align: right; } +.row__actions { flex: none; display: flex; gap: var(--space-2); } +.row--today { box-shadow: inset 6px 0 0 var(--signal); padding-left: var(--space-3); } +.row__day { flex: none; width: 52px; display: grid; line-height: 1; } +.row__day .num { font-size: var(--fs-xl); } +.chevron::after { content: "→"; font-family: var(--font-mark); font-weight: 700; font-size: var(--fs-lg); } -.swatch { width: 12px; height: 12px; border-radius: 2px; background: var(--accent); flex: none; } - -/* ---- Plaque de séance (liste de l'accueil) ----------------------------- */ -.plates { display: grid; gap: var(--space-2); } -.plate { - display: flex; align-items: stretch; min-height: 72px; text-decoration: none; color: inherit; - background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; +/* ---- grille de navigation : la grille se voit -------------------------------- */ +.grid-nav { + display: grid; grid-template-columns: 1fr 1fr; gap: var(--b); + background: var(--ink); border: var(--b) solid var(--ink); margin-top: var(--space-3); } -.plate:hover { border-color: var(--line-strong); } -.plate__bar { width: 8px; flex: none; background: var(--accent); } -.plate__body { flex: 1; min-width: 0; padding: var(--space-3) var(--space-4); display: flex; flex-direction: column; } -.plate__id { font-size: var(--fs-xs); color: var(--text-muted); letter-spacing: 0.16em; } -.plate__name { font-size: var(--fs-xl); line-height: 1.05; text-transform: uppercase; } -.plate__meta { color: var(--text-muted); font-size: var(--fs-xs); margin-top: var(--space-1); } -.plate__last { padding: var(--space-3) var(--space-3) 0 0; font-size: var(--fs-xs); color: var(--text-muted); white-space: nowrap; text-align: right; } - -/* ---- Note (cardio, repères) --------------------------------------------- */ -.note { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-3) var(--space-4); margin-bottom: var(--space-2); } -.note__title { font-size: var(--fs-lg); text-transform: uppercase; letter-spacing: 0.03em; } -.note__text { color: var(--text-muted); font-size: var(--fs-sm); margin-top: var(--space-1); } - -.coach-note { color: var(--warn); border-left: 3px solid var(--warn); padding-left: var(--space-3); font-size: var(--fs-sm); margin: var(--space-3) 0; } - -/* ---- Puces (muscles) et étiquettes -------------------------------------- */ -.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-3) 0; } -.chip { - display: inline-flex; align-items: center; min-height: 28px; padding: 0 var(--space-3); - border-radius: 999px; font-size: var(--fs-xs); font-weight: 600; - background: var(--surface-2); color: var(--text); border: 1px solid var(--line-strong); +.tile { + min-height: 88px; background: var(--bg); color: var(--ink); padding: var(--space-3); + display: flex; flex-direction: column; justify-content: space-between; text-decoration: none; } -.chip--secondary { background: transparent; color: var(--text-muted); border-style: dashed; font-weight: 400; } -.tag { - display: inline-block; padding: 1px 6px; margin-right: var(--space-2); border-radius: var(--radius-sm); - font-size: var(--fs-xs); background: var(--accent); color: var(--accent-ink); letter-spacing: 0.08em; vertical-align: 1px; -} -.tag--superset { background: var(--work); color: var(--surface-sunk); } -.badge { - display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: var(--radius-sm); - background: var(--accent); color: var(--accent-ink); font-family: var(--font-display); font-weight: 700; font-size: var(--fs-md); -} -.badge--warmup { background: var(--primary); color: var(--on-primary); } -.inline-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--fs-xs); background: var(--surface-2); color: var(--text); padding: 2px 6px; border-radius: var(--radius-sm); overflow-wrap: anywhere; } +.tile:active { background: var(--signal); color: var(--on-signal); } +.tile__name { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: var(--fs-xl); line-height: 0.9; } +.tile__meta { color: var(--muted); font-size: var(--fs-sm); } +.tile:active .tile__meta { color: inherit; } -/* ---- Champs ------------------------------------------------------------- */ -.field { display: flex; align-items: center; gap: var(--space-2); } -.field--inline { justify-content: space-between; margin: var(--space-2) 0; } -.field__label { font-family: var(--font-display); text-transform: uppercase; font-weight: 600; letter-spacing: 0.1em; font-size: var(--fs-sm); color: var(--text-muted); } +/* ---- jauges (avancement de la semaine, XP) : des cases, pas de dégradé ------ */ +.cells { display: flex; gap: 3px; height: 20px; } +.cells > i { flex: 1; border: 2px solid var(--ink); } +.cells > i[data-state="done"] { background: var(--meter); border-color: var(--meter); } +.cells > i[data-state="skip"] { border-style: dashed; border-color: var(--muted); } +.cells--xp { height: 16px; gap: 2px; } +.cells--xp > i { border-width: 0; background: var(--sunk); } +.cells--xp > i[data-state="done"] { background: var(--meter); } + +/* ---- HUD : niveau, XP, série de semaines ---------------------------------- */ +.hud { display: grid; grid-template-columns: auto 1fr auto; border: var(--b) solid var(--ink); margin-bottom: var(--space-4); text-decoration: none; color: inherit; } +.hud > * { padding: var(--space-2) var(--space-3); } +.hud__lvl, .hud__streak { display: grid; place-content: center; text-align: center; line-height: 1; } +.hud__lvl { background: var(--ink); color: var(--bg); min-width: 64px; } +.hud__streak { border-left: var(--b) solid var(--ink); min-width: 72px; } +.hud__big { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-xl); } +.hud__body { display: grid; gap: 6px; align-content: center; min-width: 0; } +.hud__title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } +.hud--pending .hud__body { color: var(--muted); } + +/* ---- statistiques ----------------------------------------------------------- */ +.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--b); background: var(--ink); border: var(--b) solid var(--ink); } +.stat { background: var(--bg); padding: var(--space-3); display: grid; gap: var(--space-1); align-content: start; } +.stat__value { font-size: var(--fs-2xl); line-height: 0.9; } +.stat__value small { font-size: var(--fs-lg); margin-left: 2px; } +.stat__label { color: var(--muted); } +.big-number { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-num-xl); line-height: 0.85; font-variant-numeric: tabular-nums; } +.big-number small { font-size: var(--fs-2xl); margin-left: var(--space-1); } + +/* ---- textes ----------------------------------------------------------------- */ +.note { border-left: var(--b-heavy) solid var(--ink); padding: var(--space-1) 0 var(--space-1) var(--space-3); margin-bottom: var(--space-3); } +.note__title { font-weight: 700; } +.note__text { color: var(--muted); font-size: var(--fs-sm); } +.coach-note { border: var(--b) solid var(--ink); border-left-width: 12px; padding: var(--space-2) var(--space-3); font-size: var(--fs-sm); } +.coach-note::before { content: "NOTE · "; font-family: var(--font-mark); font-weight: 700; font-size: var(--fs-mark); } +.coach-note--plain::before { content: none; } +.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); } +.chip { border: 2px solid var(--ink); padding: 2px 6px; } +.chip--secondary { border-style: dashed; color: var(--muted); border-color: var(--muted); } +.tag { display: inline-block; border: 2px solid currentColor; padding: 0 4px; margin-right: var(--space-2); } +.badge { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 4px; border: 2px solid var(--ink); } +.badge--signal { background: var(--signal); color: var(--on-signal); border-color: var(--signal); } +.mini-label { display: block; color: var(--muted); margin: var(--space-4) 0 var(--space-2); } + +/* ---- champs ----------------------------------------------------------------- */ +.field { display: grid; gap: var(--space-1); margin-bottom: var(--space-3); } +.field__label { color: var(--ink); } +.field__hint { color: var(--muted); font-size: var(--fs-sm); } .field__input { - min-height: var(--tap); min-width: 0; padding: 0 var(--space-3); - background: var(--surface-2); color: var(--text); - border: 1px solid var(--line-strong); border-radius: var(--radius); - font-family: var(--font-display); font-weight: 600; font-size: var(--fs-lg); + min-height: 56px; width: 100%; padding: 0 var(--space-3); + border: var(--b) solid var(--ink); background: var(--sunk); color: var(--ink); + font-size: var(--fs-lg); } -.field__input:focus { outline: 3px solid var(--focus); outline-offset: 0; } -.field__input[aria-invalid="true"] { border-color: var(--danger); outline-color: var(--danger); } -.field__input--date { font-size: var(--fs-md); } -.field__input--area { width: 100%; min-height: 160px; padding: var(--space-3); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--fs-xs); font-weight: 400; } -.field--amount .field__input { width: 5.5em; text-align: right; } -.field--compact .field__input { width: 4.5em; } -.field__unit { font-family: var(--font-display); font-weight: 600; text-transform: uppercase; color: var(--text-muted); font-size: var(--fs-sm); } +.field__input[aria-invalid="true"] { border-style: dashed; outline: var(--b) solid var(--ink); outline-offset: 2px; } +.field__input--area { min-height: 120px; padding: var(--space-3); font-size: var(--fs-md); resize: vertical; font-family: var(--font-body); } +.field__input--mono { font-family: var(--font-mark); font-size: var(--fs-sm); } +.field--inline { grid-template-columns: auto 1fr; align-items: center; gap: var(--space-3); } +.field--amount { grid-template-columns: auto 1fr auto; align-items: center; gap: var(--space-2); margin: 0; } +.field--amount .field__input { font-family: var(--font-display); font-weight: 700; font-size: var(--fs-2xl); text-align: right; min-height: 64px; } +.field__unit { font-family: var(--font-mark); font-weight: 700; } +.field--compact .field__input { min-height: var(--tap); font-size: var(--fs-lg); width: 5.5em; } +.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); } -/* ---- Choix segmenté (mode de suivi) ------------------------------------ */ -.segmented { display: flex; flex-wrap: wrap; gap: var(--space-2); } +/* Choix exclusif ou multiple : des boutons carrés collés, la grille se voit. */ +.segmented { display: flex; flex-wrap: wrap; gap: var(--b); background: var(--ink); border: var(--b) solid var(--ink); } .segmented__opt { - min-height: 44px; padding: 0 var(--space-3); border-radius: var(--radius); - background: transparent; border: 1px solid var(--line-strong); color: var(--text-muted); font-size: var(--fs-sm); + flex: 1 1 0; min-width: max-content; min-height: var(--tap); padding: 0 var(--space-3); border: 0; + background: var(--bg); color: var(--ink); font-family: var(--font-mark); font-size: var(--fs-mark); + font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; } -.segmented__opt[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); font-weight: 600; } +.segmented__opt[aria-pressed="true"] { background: var(--signal); color: var(--on-signal); } +.segmented--days .segmented__opt { min-width: 0; font-family: var(--font-display); font-size: var(--fs-xl); min-height: 56px; padding: 0; } -/* ---- Liens de l'accueil, onboarding ------------------------------------ */ -.links { display: grid; gap: var(--space-2); } -.hero { padding-top: var(--space-6); } -.how { counter-reset: how; display: grid; gap: var(--space-3); margin-top: var(--space-4); } -.how__step { counter-increment: how; position: relative; padding-left: 44px; min-height: 32px; font-size: var(--fs-sm); } -.how__step::before { - content: counter(how); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; - display: grid; place-items: center; background: var(--primary); color: var(--on-primary); - font-family: var(--font-display); font-weight: 700; font-size: var(--fs-lg); +.choice-list { display: grid; gap: var(--b); background: var(--ink); border: var(--b) solid var(--ink); } +.choice { + min-height: var(--tap); padding: var(--space-2) var(--space-3); border: 0; text-align: left; + background: var(--bg); color: var(--ink); font-weight: 700; } -.card--onboarding { border-left: 6px solid var(--primary); padding: var(--space-5) var(--space-4); } -.how__step strong { font-weight: 700; } -.how__step span { color: var(--text-muted); } -.status--info { color: var(--text); } -.copy-line { display: flex; align-items: center; gap: var(--space-2); margin-top: var(--space-2); } -.copy-line__text { - flex: 1; min-width: 0; padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); - background: var(--surface-sunk); color: var(--text); border: 1px solid var(--line); - font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--fs-xs); overflow-wrap: anywhere; -} -.alt { display: grid; gap: var(--space-2); margin-top: var(--space-5); } -.manual-copy { margin-top: var(--space-3); display: grid; gap: var(--space-2); } +.choice[aria-pressed="true"] { background: var(--signal); color: var(--on-signal); } +.choice[aria-pressed="true"]::after { content: " ✓"; } -.preview { display: grid; gap: var(--space-3); margin-top: var(--space-4); } -.preview__session { display: grid; gap: 2px; font-size: var(--fs-sm); } +.copy-line { display: flex; align-items: stretch; gap: var(--space-2); } +.copy-line__text { flex: 1; min-width: 0; display: flex; align-items: center; padding: 0 var(--space-3); border: var(--b) dashed var(--ink); font-family: var(--font-mark); font-size: var(--fs-sm); overflow-wrap: anywhere; } -/* ---- Historique --------------------------------------------------------- */ -.history__list { display: grid; gap: var(--space-2); } -.history__item { - display: grid; grid-template-columns: 1fr auto; grid-template-areas: "date chev" "name chev" "meta chev"; - min-height: 72px; padding: var(--space-3) var(--space-4); text-decoration: none; color: inherit; - background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); -} -.history__item:hover { border-color: var(--line-strong); } -.history__date { grid-area: date; font-family: var(--font-display); text-transform: uppercase; font-weight: 600; letter-spacing: 0.1em; font-size: var(--fs-xs); color: var(--text-muted); } -.history__name { grid-area: name; font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: var(--fs-lg); line-height: 1.1; } -.history__meta { grid-area: meta; color: var(--text-muted); font-size: var(--fs-xs); } -.history__item .chevron { grid-area: chev; align-self: center; } +/* ---- courbes (SVG) ---------------------------------------------------------- */ +.chart { border: var(--b) solid var(--ink); padding: var(--space-2); color: var(--ink); } +.chart svg { width: 100%; height: auto; overflow: visible; } +.chart__axis { stroke: var(--rule-soft); stroke-width: 1; } +.chart__line { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: miter; } +.chart__trend { fill: none; stroke: var(--ink); stroke-width: 2; stroke-dasharray: 6 5; } +.chart__dot { fill: var(--ink); } +.chart__bar { fill: var(--ink); } +.chart__bar--now { fill: var(--meter); } +.chart__text { fill: var(--muted); font-family: var(--font-mark); font-size: 11px; } +.chart__caption { color: var(--muted); font-size: var(--fs-sm); margin-top: var(--space-2); } -.edit-list { display: grid; gap: var(--space-3); } -.edit-ex { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-3) var(--space-4); display: grid; gap: var(--space-3); } -.edit-ex__head { display: flex; justify-content: space-between; gap: var(--space-2); align-items: baseline; } -.edit-sets { display: grid; gap: var(--space-2); } -.edit-set { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); } -.edit-set__n { color: var(--text-muted); font-size: var(--fs-sm); } -.edit-sets__btns { display: flex; gap: var(--space-2); } +/* ---- aperçu des changements d'une proposition ------------------------------ */ +.diff { border-top: var(--b) solid var(--ink); } +.diff__item { border-bottom: var(--b) solid var(--ink); padding: var(--space-3) 0; display: grid; gap: var(--space-2); } +.diff__head { display: flex; align-items: center; gap: var(--space-3); } +.diff__what { font-weight: 700; flex: 1; min-width: 0; overflow-wrap: anywhere; } +.diff__lines > li { padding-left: 1.6em; text-indent: -1.6em; font-size: var(--fs-sm); } +.diff__lines > li::before, .diff__mark { font-family: var(--font-mark); font-weight: 700; display: inline-block; width: 1.6em; text-indent: 0; } +.diff__lines > li[data-change="added"]::before { content: "+"; } +.diff__lines > li[data-change="removed"]::before { content: "−"; } +.diff__lines > li[data-change="changed"]::before { content: "~"; } +.diff__lines > li[data-change="removed"] { text-decoration: line-through; text-decoration-thickness: 2px; color: var(--muted); } +.diff__lines del { color: var(--muted); text-decoration-thickness: 2px; } +.diff__lines ins { text-decoration: none; font-weight: 700; } -/* ---- Chevron ------------------------------------------------------------ */ -.chevron { width: 10px; height: 10px; border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(-45deg); flex: none; margin: 0 var(--space-1); transition: transform .15s; } - -/* ---- Dialogue et message bref ------------------------------------------- */ +/* ---- dialogue et message bref ---------------------------------------------- */ .dialog { - width: min(100% - 2 * var(--gutter), 480px); padding: var(--space-5) var(--space-4) var(--space-4); - background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius); + border: var(--b-heavy) solid var(--ink); background: var(--bg); color: var(--ink); + padding: var(--space-4); width: min(92vw, 440px); } -.dialog::backdrop { background: rgb(0 0 0 / .6); } -.dialog__title { font-size: var(--fs-xl); text-transform: uppercase; line-height: 1.05; margin-bottom: var(--space-3); } -.dialog__text { color: var(--text-muted); font-size: var(--fs-sm); margin-bottom: var(--space-2); } +.dialog::backdrop { background: rgb(0 0 0 / 0.8); } +.dialog__title { font-size: var(--fs-2xl); line-height: 0.95; margin-bottom: var(--space-3); } +.dialog__text { margin-bottom: var(--space-2); } .dialog__actions { display: grid; gap: var(--space-2); margin-top: var(--space-4); } - .toast { - position: fixed; left: 50%; bottom: calc(var(--action-bar-h) + var(--space-4) + env(safe-area-inset-bottom)); z-index: 40; - transform: translate(-50%, 20px); opacity: 0; pointer-events: none; - max-width: calc(100% - 2 * var(--gutter)); padding: var(--space-3) var(--space-4); - background: var(--text); color: var(--bg); border-radius: var(--radius); font-size: var(--fs-sm); font-weight: 600; - transition: opacity .2s, transform .2s; + position: fixed; left: 50%; bottom: calc(var(--action-bar-h) + var(--space-3)); z-index: 40; + transform: translate(-50%, 200%); max-width: calc(100vw - 32px); + background: var(--ink); color: var(--bg); padding: var(--space-3) var(--space-4); + font-weight: 700; transition: transform 0.15s steps(3); } -.toast--on { opacity: 1; transform: translate(-50%, 0); } -body.has-timer .toast { bottom: calc(var(--action-bar-h) + var(--timer-h) + var(--space-4) + env(safe-area-inset-bottom)); } +.toast--on { transform: translate(-50%, 0); } +body.has-timer .toast { bottom: calc(var(--action-bar-h) + var(--timer-h) + var(--space-3)); } -/* ---- Minuteur ----------------------------------------------------------- */ -.timer { - position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; - background: var(--surface); border-top: 1px solid var(--line-strong); - padding-bottom: env(safe-area-inset-bottom); - box-shadow: 0 -8px 24px rgb(0 0 0 / .25); -} -.timer__bar { height: 4px; background: var(--surface-2); position: relative; overflow: hidden; } -.timer__bar::after { - content: ""; position: absolute; inset: 0; background: var(--text); - transform-origin: left; transform: scaleX(var(--progress, 1)); transition: transform .25s linear; -} -.timer__in { max-width: var(--max); height: calc(var(--timer-h) - 4px); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: var(--space-3); } -.timer__read { flex: 1; min-width: 0; } -.timer__label { font-size: var(--fs-xs); color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } -.timer__time { font-size: 2.75rem; line-height: 1; } -.timer__btns { display: flex; gap: var(--space-2); } -.timer__btn { min-width: 64px; } -.timer--work .timer__time { color: var(--work); } -.timer--work .timer__bar::after { background: var(--work); } -.timer--low .timer__time { color: var(--warn); } -.timer--zero .timer__time { color: var(--primary); } -.timer--zero .timer__bar::after { background: var(--primary); } +.manual-copy { display: grid; gap: var(--space-2); } +.how { counter-reset: how; display: grid; gap: var(--space-3); } +.how__step { counter-increment: how; display: grid; grid-template-columns: 48px 1fr; gap: var(--space-3); align-items: start; } +.how__step::before { content: counter(how); display: grid; place-items: center; height: 48px; border: var(--b) solid var(--ink); font-family: var(--font-display); font-weight: 700; font-size: var(--fs-xl); } diff --git a/app/styles/fonts.css b/app/styles/fonts.css index d583fa3..b551414 100644 --- a/app/styles/fonts.css +++ b/app/styles/fonts.css @@ -1,19 +1,8 @@ -/* Barlow Condensed, SIL Open Font License 1.1 (app/fonts/OFL.txt). Auto-hébergée - (ADR 0007), sous-ensemble latin, depuis le dépôt google/fonts. */ -@font-face { - font-family: "Barlow Condensed"; - font-style: normal; - font-weight: 500; - font-display: swap; - src: url("../fonts/barlow-condensed-medium.woff2") format("woff2"); -} -@font-face { - font-family: "Barlow Condensed"; - font-style: normal; - font-weight: 600; - font-display: swap; - src: url("../fonts/barlow-condensed-semibold.woff2") format("woff2"); -} +/* Une seule fonte, une seule graisse : Barlow Condensed Bold, SIL Open Font + License 1.1 (app/fonts/OFL.txt). Auto-hébergée (ADR 0007), réduite aux + caractères du français (latin de base, latin-1, Œ, guillemets, tirets) : + 15 Ko. Elle porte les titres et les grands chiffres ; le texte courant et le + marquage utilisent les polices du système (0 octet). */ @font-face { font-family: "Barlow Condensed"; font-style: normal; diff --git a/app/styles/tokens.css b/app/styles/tokens.css index 61508a3..e4e6936 100644 --- a/app/styles/tokens.css +++ b/app/styles/tokens.css @@ -1,88 +1,73 @@ -/* Jetons de design (docs/design.md). Toute couleur de l'interface passe par - eux ; les ratios de contraste y sont notés. Thème sombre par défaut (« fonte et - craie »), thème clair selon la préférence du système. */ +/* Jetons de design (docs/design.md) : noir, blanc, une couleur signal. + Toute couleur de l'interface passe par eux ; les ratios WCAG sont notés. + Sombre par défaut (noir pur : écrans OLED éteints), clair si le système le + demande ou si l'utilisateur le choisit (data-theme sur ). */ :root { color-scheme: dark; + --bg: #000000; + --ink: #F2F2EC; /* 18,7 sur bg */ + --muted: #A3A3A3; /* 8,3 sur bg, 7,2 sur sunk */ + --sunk: #161616; /* champs de saisie ; ink 16,1 dessus */ + --rule-soft: #5C5C5C; /* filets décoratifs de la grille (3,1) */ + --signal: #FFD60A; /* jaune ruban : 14,9 sur bg */ + --on-signal: #000000; /* 14,9 sur signal */ + --meter: #FFD60A; /* remplissage des jauges (XP, semaine) */ + --focus: #FFD60A; - /* Surfaces */ - --bg: #14171A; /* iron */ - --surface: #1E2328; /* cartes */ - --surface-2: #272D33; /* champs, boutons secondaires */ - --surface-sunk: #0E1113; /* zones en creux */ - - /* Texte : AA sur toutes les surfaces */ - --text: #EDEAE3; /* chalk : 15,0 bg, 13,2 surface, 11,6 surface-2 */ - --text-muted: #A3AAB1; /* 7,7 bg, 6,7 surface, 5,9 surface-2 */ - - /* Traits */ - --line: #333A41; /* séparateurs décoratifs */ - --line-strong: #6B737B; /* bord des contrôles : 3,7 bg, 3,3 surface (≥ 3:1) */ - - /* Rôles */ - --primary: #3FA06A; /* action principale, séries faites */ - --on-primary: #0E1113; /* 5,8 sur primary */ - --warn: #E3B505; /* note du coach : 8,2 surface */ - --danger: #E0787C; /* 5,4 surface, 6,1 bg */ - --work: #7FB6CB; /* chrono de série : 7,1 surface */ - --focus: #7FB6CB; - - /* Ressenti */ - --effort-easy: #3FA06A; /* 4,9 surface */ - --effort-ok: #E3B505; /* 8,2 surface */ - --effort-hard: #D9762B; /* 5,0 surface */ - --effort-failure: #EF6B70;/* 5,1 surface */ - - /* Couleur de la séance, posée par le programme (setAccent) */ + /* Couleur d'une séance (donnée du programme, setAccent) : seulement sur sa + plaque, avec un texte calculé (inkOn). */ --accent: #8A9199; - --accent-ink: #0E1113; + --accent-ink: #000000; - /* Typographie */ - --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif-condensed, sans-serif; + --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif-condensed, Impact, sans-serif; + --font-mark: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, "Liberation Mono", monospace; --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; - --fs-xs: 0.8125rem; /* 13 px */ - --fs-sm: 0.875rem; /* 14 px */ - --fs-md: 1rem; /* 16 px */ - --fs-lg: 1.25rem; - --fs-xl: 1.75rem; - --fs-2xl: 2.25rem; - --fs-3xl: 2.75rem; - /* Espaces, rayons, tailles */ + --fs-mark: 0.8125rem; /* 13 px, marquage */ + --fs-sm: 0.9375rem; /* 15 px */ + --fs-md: 1rem; + --fs-lg: 1.375rem; + --fs-xl: 2rem; + --fs-2xl: 2.75rem; + --fs-3xl: 3.5rem; + --fs-num: 4.5rem; /* charges, répétitions */ + --fs-num-xl: 6.5rem; /* chrono, chiffre de fin de séance */ + + --b: 3px; /* bordure franche */ + --b-heavy: 6px; /* filet sous un titre, barre d'action */ --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; - --space-6: 32px; - --radius: 6px; - --radius-sm: 4px; - --tap: 48px; /* cible tactile minimale (≥ 44 px) */ + --space-6: 40px; + --tap: 48px; /* cible tactile minimale */ --gutter: 16px; --max: 560px; - --action-bar-h: 80px; - --timer-h: 80px; /* minuteur, barre de progression comprise */ + --action-bar-h: 84px; + --timer-h: 96px; } +/* Thème clair : celui du système, sauf choix explicite du sombre. */ @media (prefers-color-scheme: light) { - :root { + :root:not([data-theme="dark"]) { color-scheme: light; - --bg: #F3F1EC; - --surface: #FFFFFF; - --surface-2: #E8E5DE; - --surface-sunk: #ECE9E2; - --text: #14171A; /* 15,9 bg, 18,0 surface, 14,3 surface-2 */ - --text-muted: #555D65; /* 5,9 bg, 6,7 surface, 5,3 surface-2 */ - --line: #D6D2C9; - --line-strong: #8A857B; /* 3,3 bg, 3,7 surface */ - --primary: #2B7A4B; - --on-primary: #FFFFFF; /* 5,3 */ - --warn: #806200; /* 5,0 bg, 5,6 surface */ - --danger: #B3262C; /* 6,5 surface */ - --work: #2E6E8A; /* 5,7 surface */ - --focus: #2E6E8A; - --effort-easy: #2B7A4B; - --effort-ok: #806200; - --effort-hard: #A9531A; - --effort-failure: #B3262C; + --bg: #F2F2EC; + --ink: #000000; /* 18,7 sur bg */ + --muted: #555555; /* 6,6 sur bg, 5,8 sur sunk */ + --sunk: #E4E4DD; + --rule-soft: #8F8F8F; + --meter: #000000; /* le jaune sur blanc ferait 1,3:1 : la jauge passe au noir */ + --focus: #000000; } } +:root[data-theme="light"] { + color-scheme: light; + --bg: #F2F2EC; + --ink: #000000; + --muted: #555555; + --sunk: #E4E4DD; + --rule-soft: #8F8F8F; + --meter: #000000; + --focus: #000000; +}