HormoneTrack-web/css/style.css
Siphonight 491efef8eb v1.4.10 — portage initial de l'app Android v1.4.10
Portage navigateur complet de l'app Android HormoneTrack v1.4.10 :
- moteur PK fidèle (Estrannaise tables ODS, Transfem Science V3C,
  WHSAH fit Mona, Bateman) — paramètres identiques, invariants Android
  préservés (fixes #19-#23, #35, #52-#62), 121 tests Node épinglés
- calibration par période d'ester et par modèle affiché (#60/#61)
- UI 6 écrans + éditeur, CurveChart Canvas (zoom/pan fractionnaire,
  prévision, pics/creux, fuseau configurable), rappels web
  (Notification API), seuils d'alerte, i18n FR/EN
- sauvegarde JSON v2 compatible Android bidirectionnelle (rétrocompat v1)
- 100 % local : localStorage, aucun serveur applicatif, aucune télémétrie
- processus : scripts/check.sh (syntaxe, i18n, tests, E2E navigateur,
  smoke HTTP), docs séparées (README + DEVELOPPEMENT + CHANGELOG)
- dépôt GIT SÉPARÉ de l'Android : historique 100 % propre, versions
  alignées sur l'Android porté, changelogs indépendants

Non porté (impossible dans un navigateur, documenté §12) : agenda
récurrent, notifications onglet fermé, montre.
2026-09-08 14:34:58 +02:00

309 lines
10 KiB
CSS

/*
* ─────────────────────────────────────────────────────────────────────────────
* HormoneTrack Web — feuille de style unique.
*
* Couleurs reprises du thème Android (ui/theme/Color.kt) :
* - primaire bleu #4F5BD5, secondaire rose #D6589E, tertiaire teal #2FA48D ;
* - bandeau TransSky #5BCEFA / TransPink #F5A9B8 ;
* - labs orange #E67E22 ; WHSAH vert #2E7D32 / violet #9C27B0.
* Design : Material-ish, mobile-first, sans framework.
* ─────────────────────────────────────────────────────────────────────────────
*/
:root {
--blue: #4f5bd5;
--blue-dark: #3a44a8;
--blue-container: #dee0ff;
--pink: #d6589e;
--pink-container: #ffd9ec;
--teal: #2fa48d;
--teal-container: #bff0e4;
--trans-sky: #5bcefa;
--trans-pink: #f5a9b8;
--chart-e2: #4f5bd5;
--chart-t: #d6589e;
--chart-whs: #2e7d32;
--chart-twhs: #9c27b0;
--lab-dot: #e67e22;
--good: #2e7d32;
--warn: #b26a00;
--error-bg: #ffdad6;
--error-fg: #410002;
--surface: #fef7ff;
--surface-variant: #e7e0ec;
--on-surface: #1d1b20;
--on-surface-variant: #49454f;
--outline: #79747e;
--outline-variant: #cac4d0;
--radius: 14px;
}
* { box-sizing: border-box; }
html, body {
margin: 0;
padding: 0;
background: var(--surface);
color: var(--on-surface);
font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
font-size: 15px;
}
/* ── En-tête + bandeau trans ──────────────────────────────────────────────── */
.topbar {
position: sticky;
top: 0;
z-index: 10;
background: var(--surface);
display: flex;
align-items: center;
gap: 8px;
padding: 10px 16px;
}
.topbar h1 { font-size: 1.25rem; margin: 0; flex: 1; font-weight: 600; }
.trans-banner {
height: 3px;
background: linear-gradient(90deg, var(--trans-sky), var(--trans-pink), var(--trans-sky));
}
/* ── Onglets (bottom nav, comme l'app Android) ────────────────────────────── */
.tabbar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
display: flex;
background: #f3edf7;
border-top: 1px solid var(--outline-variant);
z-index: 10;
}
.tabbar button {
flex: 1;
border: none;
background: none;
padding: 8px 2px 10px;
font-size: 0.72rem;
color: var(--on-surface-variant);
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
cursor: pointer;
}
.tabbar button .ico { font-size: 1.25rem; line-height: 1; }
.tabbar button.active { color: var(--blue); font-weight: 600; }
/* Zone de contenu : au-dessus de la tabbar */
main.content {
padding: 8px 16px 90px;
max-width: 720px;
margin: 0 auto;
}
/* ── Cartes ───────────────────────────────────────────────────────────────── */
.card {
background: #fff;
border: 1px solid var(--outline-variant);
border-radius: var(--radius);
padding: 14px;
margin: 10px 0;
}
.card.primary { background: var(--blue-container); border-color: var(--blue-container); }
.card.variant { background: var(--surface-variant); border-color: var(--surface-variant); }
.card.error { background: var(--error-bg); border-color: var(--error-bg); color: var(--error-fg); }
.card h3 { margin: 0 0 8px; font-size: 1rem; font-weight: 600; }
.card .label { font-size: 0.78rem; color: var(--on-surface-variant); margin-bottom: 4px; }
.card .small { font-size: 0.78rem; color: var(--on-surface-variant); }
/* ── Boutons / chips ──────────────────────────────────────────────────────── */
button.btn {
border: none;
border-radius: 22px;
padding: 9px 18px;
font-size: 0.9rem;
cursor: pointer;
background: var(--blue);
color: #fff;
}
button.btn.tonal { background: var(--blue-container); color: var(--blue-dark); }
button.btn.outlined { background: none; border: 1px solid var(--blue); color: var(--blue); }
button.btn.text { background: none; color: var(--blue); padding: 6px 10px; }
button.btn.danger { background: none; color: #b3261e; }
button.btn:disabled { opacity: 0.4; cursor: default; }
.chip {
display: inline-flex;
align-items: center;
gap: 6px;
border: 1px solid var(--outline-variant);
border-radius: 10px;
padding: 5px 10px;
font-size: 0.8rem;
cursor: pointer;
background: #fff;
user-select: none;
white-space: nowrap;
}
.chip.selected { background: var(--blue-container); border-color: var(--blue-container); color: var(--blue-dark); font-weight: 600; }
.chip.static { cursor: default; }
.chip-row { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; padding: 2px 0; }
.chip-row.wrap { flex-wrap: wrap; overflow: visible; }
.fab {
position: fixed;
right: 18px;
bottom: 78px;
width: 56px;
height: 56px;
border-radius: 18px;
border: none;
background: var(--pink);
color: #fff;
font-size: 1.6rem;
cursor: pointer;
box-shadow: 0 3px 10px rgba(0,0,0,0.25);
z-index: 9;
}
/* ── Listes ───────────────────────────────────────────────────────────────── */
.list-item {
display: flex;
align-items: center;
gap: 10px;
padding: 11px 4px;
border-bottom: 1px solid var(--outline-variant);
cursor: pointer;
}
.list-item:last-child { border-bottom: none; }
.list-item .main { flex: 1; min-width: 0; }
.list-item .title { font-size: 0.95rem; }
.list-item .sub { font-size: 0.8rem; color: var(--on-surface-variant); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.group-header {
font-size: 0.95rem;
font-weight: 600;
color: var(--on-surface);
padding: 12px 4px 4px;
}
.icon-btn {
border: none;
background: none;
font-size: 1.1rem;
cursor: pointer;
color: var(--on-surface-variant);
padding: 6px;
}
/* ── Formulaires ──────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 3px; margin: 8px 0; flex: 1; min-width: 0; }
.field label { font-size: 0.75rem; color: var(--on-surface-variant); }
.field input, .field select, .field textarea {
border: 1px solid var(--outline);
border-radius: 8px;
padding: 9px 10px;
font-size: 0.95rem;
background: #fff;
color: var(--on-surface);
font-family: inherit;
width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--blue); border-color: var(--blue); }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.error-text { color: #b3261e; font-size: 0.82rem; margin: 4px 0; }
.hint { font-size: 0.78rem; color: var(--on-surface-variant); margin: 3px 0; }
/* Switch (miroir Material3 Switch) */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
position: absolute; inset: 0;
background: var(--outline-variant);
border-radius: 26px;
transition: 0.2s;
cursor: pointer;
}
.switch .slider::before {
content: '';
position: absolute;
width: 20px; height: 20px;
left: 3px; top: 3px;
background: #fff;
border-radius: 50%;
transition: 0.2s;
}
.switch input:checked + .slider { background: var(--blue); }
.switch input:checked + .slider::before { transform: translateX(20px); }
/* ── Dialogs ──────────────────────────────────────────────────────────────── */
.dialog-backdrop {
position: fixed; inset: 0;
background: rgba(0,0,0,0.45);
display: flex; align-items: center; justify-content: center;
z-index: 50;
padding: 16px;
}
.dialog {
background: var(--surface);
border-radius: 24px;
padding: 20px;
width: 100%;
max-width: 480px;
max-height: 86vh;
overflow-y: auto;
}
.dialog h2 { margin: 0 0 12px; font-size: 1.1rem; }
.dialog .actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
/* ── Divers ───────────────────────────────────────────────────────────────── */
.big-number { font-size: 2rem; font-weight: 700; color: var(--blue-dark); }
.unit { font-size: 1rem; color: var(--on-surface-variant); }
.t-inline { font-size: 1rem; }
.delta-up { color: var(--good); }
.delta-down { color: var(--warn); }
.legend-text { font-size: 0.78rem; margin: 2px 0; }
.legend-muted { font-size: 0.78rem; color: var(--on-surface-variant); }
.message-banner { color: var(--blue-dark); font-weight: 600; margin: 6px 0; }
.demo-banner {
background: var(--pink-container);
border-radius: 10px;
padding: 8px 12px;
font-size: 0.8rem;
margin: 8px 0;
}
.reminder-banner {
background: var(--pink-container);
border-radius: 12px;
padding: 10px 14px;
margin: 8px 0;
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
}
canvas.chart { width: 100%; display: block; touch-action: none; }
canvas.chart-cursor { cursor: grab; }
/* Toast (feedback Paramètres) */
.toast {
position: fixed;
bottom: 96px;
left: 50%;
transform: translateX(-50%);
background: #322f35;
color: #fff;
border-radius: 10px;
padding: 10px 18px;
font-size: 0.88rem;
z-index: 60;
max-width: 90vw;
}
/* Écrans larges : la tabbar passe à gauche */
@media (min-width: 800px) {
.tabbar { right: auto; width: 170px; top: 0; bottom: 0; flex-direction: column; justify-content: flex-start; padding-top: 64px; border-top: none; border-right: 1px solid var(--outline-variant); }
.tabbar button { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 14px 20px; font-size: 0.9rem; }
main.content { margin-left: 170px; max-width: 760px; }
.fab { bottom: 24px; }
.toast { bottom: 32px; }
}