SPB Git

Repository Public

tokens.css 7.7 KB 243 lines css

1/* Jetons de design « SP Mail Premium » : trois thèmes (clair, sombre, minuit), densité, typographie, verre, élévation, mouvement. */2/* `data-theme` porte toujours le thème résolu (posé par state/session.ts) : un seul bloc par thème, « Système » compris. */3:root {4  color-scheme: light;5  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;6  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;7  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;8  --reading-font: var(--font);910  /* ---- couleurs (clair : papier) */11  --bg: #f6f5f1;12  --surface: #ffffff;13  --surface-2: #f0eee8;14  --surface-3: #e6e3db;15  --border: #e2dfd6;16  --border-strong: #c4c0b4;17  --text: #1c1b19;18  --text-2: #4d4a44;19  --text-3: #66625b;20  --accent: #2c5b4d;21  --accent-strong: #1f4439;22  --accent-soft: #e0ece7;23  --accent-ink: #1f4439;24  --on-accent: #ffffff;25  --danger: #a8231c;26  --danger-soft: #fbe8e6;27  --warn: #7a4d00;28  --warn-soft: #fcefd2;29  --ok: #1b6236;30  --ok-soft: #e0f2e6;31  --info: #1d4f91;32  --info-soft: #e6eef9;33  --star: #b07a00;34  --unread: var(--accent);35  --admin: #7a3e00;36  --admin-soft: #fbeedd;37  --focus: #1a6dd6;38  --glass: rgba(246, 245, 241, 0.72);39  /* verre porteur de texte (palette, barre du bas) : assez opaque pour garder le contraste au-dessus de n'importe quel contenu */40  --glass-strong: color-mix(in srgb, var(--surface) 86%, transparent);41  --overlay: rgba(20, 19, 17, 0.42);42  --sheet: #ffffff;4344  /* pastilles teintées par adresse (avatars, « Toutes les boîtes ») : saturation et clarté ; la teinte --h vient de l'élément */45  --hue-bg-sl: 42% 90%;46  --hue-ink-sl: 45% 24%;47  --hue-dot-sl: 60% 38%;4849  /* libellés : dix teintes, lisibles (≥ 4,5:1) sur leur fond doux */50  --label-1: #b3261e;51  --label-2: #a14a00;52  --label-3: #7a5c00;53  --label-4: #2e6b2e;54  --label-5: #00695c;55  --label-6: #1d5fa8;56  --label-7: #4a4fb5;57  --label-8: #7a3fa0;58  --label-9: #a8327a;59  --label-10: #5c5f66;60  --label-soft-mix: 12%;6162  /* ---- élévation */63  --shadow-1: 0 1px 2px rgba(20, 19, 17, 0.06);64  --shadow-2: 0 8px 28px rgba(20, 19, 17, 0.14);65  --shadow-3: 0 24px 64px rgba(20, 19, 17, 0.22);66  --glass-filter: blur(20px) saturate(1.4);6768  /* ---- formes */69  --radius-s: 6px;70  --radius-m: 10px;71  --radius: 14px;72  --radius-pill: 999px;73  --gap: 12px;7475  /* ---- densité (aérée) */76  --row-h: 72px;77  --row-pad: 12px;78  --tap: 40px;79  --sidebar-w: 264px;80  --rail-w: 64px;81  --list-w: 400px;82  --list-h: 340px;8384  /* ---- mouvement */85  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);86  --dur-1: 120ms;87  --dur-2: 180ms;88  --dur-3: 240ms;8990  /* ---- typographie */91  --fs-scale: 1;92  --fs-xs: 0.75rem;93  --fs-s: 0.8125rem;94  --fs-callout: 0.84375rem;95  --fs: 0.9375rem;96  --fs-l: 1.0625rem;97  --fs-title: 1.25rem;98  --fs-display: 1.75rem;99}100101/* avant l'exécution du script (thème pas encore résolu) : pas d'éclair clair sur un appareil réglé en sombre */102@media (prefers-color-scheme: dark) {103  :root:not([data-theme]) { color-scheme: dark; --bg: #141513; --text: #eceae4; }104}105106/* ---- sombre : graphite */107:root[data-theme="dark"] {108  color-scheme: dark;109  --bg: #141513;110  --surface: #1c1d1b;111  --surface-2: #242523;112  --surface-3: #2e2f2c;113  --border: #2f302d;114  --border-strong: #4a4b47;115  --text: #eceae4;116  --text-2: #b9b6ae;117  --text-3: #98958d;118  --accent: #7cc4ae;119  --accent-strong: #9ad6c2;120  --accent-soft: #1f332d;121  --accent-ink: #7cc4ae;122  --on-accent: #0c1f19;123  --danger: #ff8a80;124  --danger-soft: #3a1b18;125  --warn: #f0c36a;126  --warn-soft: #33290f;127  --ok: #7fd39a;128  --ok-soft: #16301f;129  --info: #8fb8f0;130  --info-soft: #172941;131  --star: #e6b84d;132  --admin: #f0b070;133  --admin-soft: #33240f;134  --focus: #6aa9ff;135  --glass: rgba(28, 29, 27, 0.68);136  --overlay: rgba(0, 0, 0, 0.55);137  --hue-bg-sl: 28% 22%;138  --hue-ink-sl: 50% 84%;139  --hue-dot-sl: 60% 62%;140  --label-1: #f2a09a;141  --label-2: #f0b27a;142  --label-3: #e0c466;143  --label-4: #8fd18f;144  --label-5: #6fd0c2;145  --label-6: #8fbcf0;146  --label-7: #a9adf5;147  --label-8: #cfa0ea;148  --label-9: #f09ac8;149  --label-10: #b8bcc4;150  --label-soft-mix: 18%;151  /* les ombres cèdent la place à un filet et à une surface plus claire */152  --shadow-1: 0 0 0 1px var(--border);153  --shadow-2: 0 0 0 1px var(--border-strong), 0 12px 32px rgba(0, 0, 0, 0.45);154  --shadow-3: 0 0 0 1px var(--border-strong), 0 24px 64px rgba(0, 0, 0, 0.6);155}156157/* ---- minuit : noir véritable (OLED), éblouissement minimal */158:root[data-theme="midnight"] {159  color-scheme: dark;160  --bg: #000000;161  --surface: #0b0c0b;162  --surface-2: #131412;163  --surface-3: #1c1d1b;164  --border: #1f201e;165  --border-strong: #3a3b38;166  --text: #e6e4de;167  --text-2: #a9a69e;168  --text-3: #8f8c84;169  --accent: #86cdb7;170  --accent-strong: #a2dcc9;171  --accent-soft: #12231e;172  --accent-ink: #86cdb7;173  --on-accent: #06140f;174  --danger: #ff8a80;175  --danger-soft: #2a100e;176  --warn: #f0c36a;177  --warn-soft: #241c08;178  --ok: #7fd39a;179  --ok-soft: #0e2114;180  --info: #8fb8f0;181  --info-soft: #0f1c2e;182  --star: #e6b84d;183  --admin: #f0b070;184  --admin-soft: #241808;185  --focus: #6aa9ff;186  --glass: rgba(8, 9, 8, 0.72);187  --overlay: rgba(0, 0, 0, 0.66);188  --hue-bg-sl: 30% 15%;189  --hue-ink-sl: 50% 82%;190  --hue-dot-sl: 60% 62%;191  --label-1: #f2a09a;192  --label-2: #f0b27a;193  --label-3: #e0c466;194  --label-4: #8fd18f;195  --label-5: #6fd0c2;196  --label-6: #8fbcf0;197  --label-7: #a9adf5;198  --label-8: #cfa0ea;199  --label-9: #f09ac8;200  --label-10: #b8bcc4;201  --label-soft-mix: 16%;202  --shadow-1: 0 0 0 1px var(--border);203  --shadow-2: 0 0 0 1px var(--border-strong), 0 12px 32px rgba(0, 0, 0, 0.7);204  --shadow-3: 0 0 0 1px var(--border-strong), 0 24px 64px rgba(0, 0, 0, 0.8);205}206207/* ---- densité : aérée 72, intermédiaire 60, compacte 44 (une ligne) ; l'aperçu ajoute ou retire une ligne */208:root[data-density="comfortable"][data-preview="0"] { --row-h: 56px; }209:root[data-density="comfortable"][data-preview="2"] { --row-h: 92px; }210:root[data-density="cozy"] { --row-h: 60px; --row-pad: 10px; }211:root[data-density="cozy"][data-preview="2"] { --row-h: 78px; }212:root[data-density="compact"] { --row-h: 44px; --row-pad: 8px; --tap: 34px; }213214/* ---- taille du texte : toute l'interface suit (tailles en rem) */215:root[data-text="small"] { --fs-scale: 0.92; }216:root[data-text="large"] { --fs-scale: 1.08; }217:root[data-text="xlarge"] { --fs-scale: 1.18; }218219/* ---- police de lecture des messages */220:root[data-reading-font="serif"] { --reading-font: var(--serif); }221:root[data-reading-font="mono"] { --reading-font: var(--mono); }222223/* ---- transparence réduite (réglage de l'appareil, ou choix explicite) : le verre devient une surface opaque */224:root[data-transparency="reduce"] { --glass: var(--surface-2); --glass-strong: var(--surface); --glass-filter: none; }225@media (prefers-reduced-transparency: reduce) {226  :root:not([data-transparency="allow"]) { --glass: var(--surface-2); --glass-strong: var(--surface); --glass-filter: none; }227}228@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {229  :root { --glass: var(--surface-2); --glass-strong: var(--surface); --glass-filter: none; }230}231232/* ---- contraste accru : filets et textes secondaires renforcés */233@media (prefers-contrast: more) {234  :root { --border: var(--border-strong); --text-3: var(--text-2); --glass: var(--surface); --glass-strong: var(--surface); --glass-filter: none; }235  :root[data-theme="light"], :root:not([data-theme]) { --border-strong: #6f6b61; --text-2: #33312c; }236  :root[data-theme="dark"], :root[data-theme="midnight"] { --border-strong: #8a8b86; --text-2: #d6d3cb; }237}238239/* ---- mouvement réduit : plus aucune durée (les fondus restants sont coupés dans base.css) */240@media (prefers-reduced-motion: reduce) {241  :root { --dur-1: 0ms; --dur-2: 0ms; --dur-3: 0ms; }242}243
Files main
Menu

Theme