227 lines
15 KiB
CSS
227 lines
15 KiB
CSS
/* 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. */
|
||
|
||
/* ---- boutons --------------------------------------------------------------- */
|
||
.btn {
|
||
display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
|
||
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: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-edge); }
|
||
.btn--primary:active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
|
||
.btn--ghost { border-color: var(--muted); }
|
||
.btn--danger { border-style: double; border-width: 6px; }
|
||
.btn--danger::before { content: "✕"; }
|
||
.btn--block { display: flex; width: 100%; }
|
||
.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; gap: 6px; min-height: var(--tap); padding: 0 var(--space-3) 0 0;
|
||
border: 0; background: none; color: var(--ink);
|
||
}
|
||
|
||
/* ---- barre d'action, à portée de pouce ------------------------------------ */
|
||
.action-bar {
|
||
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; }
|
||
.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); }
|
||
|
||
/* ---- 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);
|
||
}
|
||
.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.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); }
|
||
|
||
/* ---- 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);
|
||
}
|
||
.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;
|
||
}
|
||
.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; }
|
||
|
||
/* ---- 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(150px, 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-edge); }
|
||
.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: 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[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 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 {
|
||
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(--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; }
|
||
|
||
.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;
|
||
}
|
||
.choice[aria-pressed="true"] { background: var(--signal); color: var(--on-signal); }
|
||
.choice[aria-pressed="true"]::after { content: " ✓"; }
|
||
|
||
.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; }
|
||
|
||
/* ---- 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); }
|
||
|
||
/* ---- 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; }
|
||
|
||
/* ---- dialogue et message bref ---------------------------------------------- */
|
||
.dialog {
|
||
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 / 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-3)); z-index: 40;
|
||
transform: translate(-50%, 200%); max-width: calc(100vw - 32px); visibility: hidden;
|
||
background: var(--ink); color: var(--bg); padding: var(--space-3) var(--space-4);
|
||
font-weight: 700; transition: transform 0.15s steps(3); pointer-events: none;
|
||
}
|
||
.toast--on { transform: translate(-50%, 0); visibility: visible; }
|
||
body.has-timer .toast { bottom: calc(var(--action-bar-h) + var(--timer-h) + var(--space-3)); }
|
||
|
||
.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); }
|