diff --git a/Max Avatar/package-lock.json b/Max Avatar/package-lock.json
index 0595d3c..e9b8418 100644
--- a/Max Avatar/package-lock.json
+++ b/Max Avatar/package-lock.json
@@ -11,6 +11,8 @@
"dependencies": {
"@electron-toolkit/preload": "^3.0.2",
"@electron-toolkit/utils": "^4.0.0",
+ "@fontsource/inter": "^5.3.0",
+ "@fontsource/jetbrains-mono": "^5.3.0",
"dotenv": "^18.0.8",
"electron-updater": "^6.8.11",
"pdf-lib": "^1.17.1",
@@ -1240,6 +1242,24 @@
}
}
},
+ "node_modules/@fontsource/inter": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/@fontsource/inter/-/inter-5.3.0.tgz",
+ "integrity": "sha512-RofMylZmjlJEfELXeNHFWBRcSs75rGU/6bV2S2jfnvv/3rPXPGe0LgUJTklcHZ9lM4OZmAVFhcJPnACfb91A3g==",
+ "license": "OFL-1.1",
+ "funding": {
+ "url": "https://github.com/sponsors/ayuhito"
+ }
+ },
+ "node_modules/@fontsource/jetbrains-mono": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/@fontsource/jetbrains-mono/-/jetbrains-mono-5.3.0.tgz",
+ "integrity": "sha512-fqDfB5I9f1p1TV486aUgB9t8zP84P0O1FtQR5Ol9vjwPy+S+EIGlVYm1cvj2W5shcZMTg2nZFdVMoH5wFu8a1A==",
+ "license": "OFL-1.1",
+ "funding": {
+ "url": "https://github.com/sponsors/ayuhito"
+ }
+ },
"node_modules/@humanfs/core": {
"version": "0.19.2",
"resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz",
diff --git a/Max Avatar/package.json b/Max Avatar/package.json
index ebecc0f..d58c4c5 100644
--- a/Max Avatar/package.json
+++ b/Max Avatar/package.json
@@ -44,6 +44,8 @@
"dependencies": {
"@electron-toolkit/preload": "^3.0.2",
"@electron-toolkit/utils": "^4.0.0",
+ "@fontsource/inter": "^5.3.0",
+ "@fontsource/jetbrains-mono": "^5.3.0",
"dotenv": "^18.0.8",
"electron-updater": "^6.8.11",
"pdf-lib": "^1.17.1",
diff --git a/Max Avatar/src/renderer/src/assets/base.css b/Max Avatar/src/renderer/src/assets/base.css
index 5ed6406..ea9b1a3 100644
--- a/Max Avatar/src/renderer/src/assets/base.css
+++ b/Max Avatar/src/renderer/src/assets/base.css
@@ -1,35 +1,5 @@
-:root {
- --ev-c-white: #ffffff;
- --ev-c-white-soft: #f8f8f8;
- --ev-c-white-mute: #f2f2f2;
-
- --ev-c-black: #1b1b1f;
- --ev-c-black-soft: #222222;
- --ev-c-black-mute: #282828;
-
- --ev-c-gray-1: #515c67;
- --ev-c-gray-2: #414853;
- --ev-c-gray-3: #32363f;
-
- --ev-c-text-1: rgba(255, 255, 245, 0.86);
- --ev-c-text-2: rgba(235, 235, 245, 0.6);
- --ev-c-text-3: rgba(235, 235, 245, 0.38);
-
- --ev-button-alt-border: transparent;
- --ev-button-alt-text: var(--ev-c-text-1);
- --ev-button-alt-bg: var(--ev-c-gray-3);
- --ev-button-alt-hover-border: transparent;
- --ev-button-alt-hover-text: var(--ev-c-text-1);
- --ev-button-alt-hover-bg: var(--ev-c-gray-2);
-}
-
-:root {
- --color-background: var(--ev-c-black);
- --color-background-soft: var(--ev-c-black-soft);
- --color-background-mute: var(--ev-c-black-mute);
-
- --color-text: var(--ev-c-text-1);
-}
+/* Les tokens de couleur/typographie/espace vivent dans ../styles/tokens.css (design system,
+ docs/Max_Design_System.md) : ce fichier ne garde que le reset de base. */
*,
*::before,
@@ -45,22 +15,10 @@ ul {
body {
min-height: 100vh;
- color: var(--color-text);
- background: var(--color-background);
- line-height: 1.6;
- font-family:
- Inter,
- -apple-system,
- BlinkMacSystemFont,
- 'Segoe UI',
- Roboto,
- Oxygen,
- Ubuntu,
- Cantarell,
- 'Fira Sans',
- 'Droid Sans',
- 'Helvetica Neue',
- sans-serif;
+ color: var(--text-1);
+ background: var(--bg);
+ line-height: var(--leading-body);
+ font-family: var(--font-sans);
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
diff --git a/Max Avatar/src/renderer/src/components/LoginView.tsx b/Max Avatar/src/renderer/src/components/LoginView.tsx
index c4e0dc9..545f29b 100644
--- a/Max Avatar/src/renderer/src/components/LoginView.tsx
+++ b/Max Avatar/src/renderer/src/components/LoginView.tsx
@@ -28,85 +28,43 @@ export default function LoginView(): React.JSX.Element {
}
return (
-
-
Connexion a Max
+
+
Connexion a Max
{success ? (
-
+
Connexion reussie. Cette fenetre se ferme automatiquement...
) : (
diff --git a/Max Avatar/src/renderer/src/components/ThinkingIndicator.tsx b/Max Avatar/src/renderer/src/components/ThinkingIndicator.tsx
index 18584c8..eea4424 100644
--- a/Max Avatar/src/renderer/src/components/ThinkingIndicator.tsx
+++ b/Max Avatar/src/renderer/src/components/ThinkingIndicator.tsx
@@ -1,12 +1,3 @@
-const dotStyle = (delay: string): React.CSSProperties => ({
- width: 10,
- height: 10,
- borderRadius: '50%',
- backgroundColor: '#ffffff',
- animation: 'forge-avatar-think-bounce 1s infinite ease-in-out',
- animationDelay: delay
-})
-
/**
* Doit rester visible meme sur une tache tres longue (pipeline Coach : plusieurs dizaines de
* secondes, constate en test reel) pour que l'utilisateur sache que Max travaille encore, pas
@@ -15,35 +6,12 @@ const dotStyle = (delay: string): React.CSSProperties => ({
*/
function ThinkingIndicator(): React.JSX.Element {
return (
-
-
-
- Max reflechit...
-
-
-
-
-
+
+ Max reflechit...
+
+
+
+
)
diff --git a/Max Avatar/src/renderer/src/components/UpdateBanner.tsx b/Max Avatar/src/renderer/src/components/UpdateBanner.tsx
index 9f6c8d3..a144608 100644
--- a/Max Avatar/src/renderer/src/components/UpdateBanner.tsx
+++ b/Max Avatar/src/renderer/src/components/UpdateBanner.tsx
@@ -9,28 +9,7 @@ function UpdateBanner({ status }: { status: 'available' | 'ready' }): React.JSX.
? 'Mise a jour prete : elle sera installee a la prochaine fermeture de Max.'
: 'Mise a jour disponible, telechargement en cours...'
- return (
-
- {message}
-
- )
+ return {message}
}
export default UpdateBanner
diff --git a/Max Avatar/src/renderer/src/components/VoiceErrorBanner.tsx b/Max Avatar/src/renderer/src/components/VoiceErrorBanner.tsx
index 4456484..ddcbfd5 100644
--- a/Max Avatar/src/renderer/src/components/VoiceErrorBanner.tsx
+++ b/Max Avatar/src/renderer/src/components/VoiceErrorBanner.tsx
@@ -4,28 +4,7 @@
* alors qu'une erreur reseau transitoire avait simplement coupe la transcription.
*/
function VoiceErrorBanner({ message }: { message: string }): React.JSX.Element {
- return (
-
- Erreur : {message}
-
- )
+ return Erreur : {message}
}
export default VoiceErrorBanner
diff --git a/Max Avatar/src/renderer/src/main.tsx b/Max Avatar/src/renderer/src/main.tsx
index 93397c7..6489d58 100644
--- a/Max Avatar/src/renderer/src/main.tsx
+++ b/Max Avatar/src/renderer/src/main.tsx
@@ -1,3 +1,10 @@
+import '@fontsource/inter/400.css'
+import '@fontsource/inter/500.css'
+import '@fontsource/inter/600.css'
+import '@fontsource/jetbrains-mono/400.css'
+import './styles/tokens.css'
+import './styles/components.css'
+import './styles/app.css'
import './assets/main.css'
import { StrictMode } from 'react'
diff --git a/Max Avatar/src/renderer/src/styles/app.css b/Max Avatar/src/renderer/src/styles/app.css
new file mode 100644
index 0000000..a76df06
--- /dev/null
+++ b/Max Avatar/src/renderer/src/styles/app.css
@@ -0,0 +1,170 @@
+/* Composants propres a Max Avatar qui n'ont pas d'equivalent direct dans la bibliotheque du
+ design system (docs/Max_Design_System.md) mais doivent en respecter les tokens, rayons, ombres
+ et regles visuelles (section "ce que l'IA codeuse ne doit pas faire"). */
+
+/* ── Indicateur de reflexion ── */
+
+.thinking {
+ position: absolute;
+ top: 4%;
+ left: 50%;
+ transform: translateX(-50%);
+ display: flex;
+ align-items: center;
+ gap: var(--space-3);
+ padding: var(--space-2) var(--space-4);
+ border-radius: var(--radius-full);
+ background: var(--surface);
+ border: 1px solid var(--border);
+ box-shadow: var(--shadow-panel);
+ pointer-events: none;
+}
+
+.thinking__label {
+ font-family: var(--font-sans);
+ font-size: var(--text-sm);
+ color: var(--text-1);
+}
+
+.thinking__dots {
+ display: flex;
+ gap: var(--space-1);
+}
+
+.thinking__dot {
+ width: 6px;
+ height: 6px;
+ border-radius: 50%;
+ background: var(--accent);
+ animation: thinking-bounce 1s infinite ease-in-out;
+}
+
+@keyframes thinking-bounce {
+ 0%,
+ 80%,
+ 100% {
+ transform: scale(0.6);
+ opacity: 0.5;
+ }
+ 40% {
+ transform: scale(1);
+ opacity: 1;
+ }
+}
+
+/* ── Bannieres flottantes (erreur, mise a jour) ── */
+
+.banner {
+ position: absolute;
+ left: 50%;
+ transform: translateX(-50%);
+ max-width: min(90%, 420px);
+ padding: var(--space-2) var(--space-4);
+ border-radius: var(--radius-md);
+ background: var(--surface);
+ box-shadow: var(--shadow-panel);
+ font-family: var(--font-sans);
+ font-size: var(--text-sm);
+ line-height: var(--leading-tight);
+ text-align: center;
+ color: var(--text-1);
+ pointer-events: none;
+}
+
+.banner--error {
+ top: 4%;
+ border: 1px solid rgba(248, 113, 113, 0.3);
+}
+
+.banner--info {
+ bottom: 4%;
+ border: 1px solid var(--border-active);
+}
+
+/* ── Fenetre de connexion ── */
+
+.auth-panel {
+ width: 100%;
+ height: 100%;
+ box-sizing: border-box;
+ padding: var(--space-5);
+ background: var(--bg);
+ font-family: var(--font-sans);
+ display: flex;
+ flex-direction: column;
+}
+
+.auth-panel__title {
+ font-size: var(--text-md);
+ font-weight: var(--weight-semi);
+ color: var(--text-1);
+ margin-bottom: var(--space-5);
+}
+
+.auth-panel__success {
+ font-size: var(--text-base);
+ color: var(--green);
+}
+
+.auth-field {
+ display: block;
+ margin-bottom: var(--space-4);
+}
+
+.auth-field__label {
+ display: block;
+ margin-bottom: var(--space-1);
+ font-size: var(--text-sm);
+ color: var(--text-2);
+}
+
+.auth-field__input {
+ width: 100%;
+ box-sizing: border-box;
+ padding: var(--space-3);
+ background: var(--surface);
+ border: 1px solid var(--border);
+ border-radius: var(--radius-md);
+ color: var(--text-1);
+ font-family: var(--font-sans);
+ font-size: var(--text-base);
+ outline: none;
+ caret-color: var(--accent);
+ transition: border-color var(--ease);
+}
+
+.auth-field__input:focus {
+ border-color: var(--border-active);
+}
+
+.auth-panel__error {
+ margin-bottom: var(--space-4);
+ font-size: var(--text-sm);
+ color: var(--red);
+}
+
+.auth-panel__submit {
+ width: 100%;
+ padding: var(--space-3) var(--space-4);
+ border: none;
+ border-radius: var(--radius-md);
+ background: var(--accent);
+ color: white;
+ font-family: var(--font-sans);
+ font-size: var(--text-base);
+ font-weight: var(--weight-medium);
+ cursor: pointer;
+ opacity: 0.9;
+ transition: opacity var(--ease);
+}
+
+.auth-panel__submit:hover:not(:disabled) {
+ opacity: 1;
+}
+
+.auth-panel__submit:disabled {
+ background: var(--surface-2);
+ color: var(--text-3);
+ cursor: not-allowed;
+ opacity: 1;
+}
diff --git a/Max Avatar/src/renderer/src/styles/components.css b/Max Avatar/src/renderer/src/styles/components.css
new file mode 100644
index 0000000..2e3656d
--- /dev/null
+++ b/Max Avatar/src/renderer/src/styles/components.css
@@ -0,0 +1,333 @@
+/* Bibliotheque de composants du design system (docs/Max_Design_System.md). A reutiliser tel quel
+ pour toute nouvelle surface du pipeline coach (bulle de chat, panneau de module, carte
+ d'exercice, stepper, barre de saisie, badge) plutot que d'ecrire de nouvelles classes. */
+
+/* ── Chat bubble — bulle de message ── */
+
+.chat-bubble {
+ max-width: 280px;
+ padding: var(--space-3) var(--space-4);
+ border-radius: var(--radius-lg);
+ font-family: var(--font-sans);
+ font-size: var(--text-base);
+ line-height: var(--leading-body);
+ box-shadow: var(--shadow-panel);
+}
+
+.chat-bubble--max {
+ background: var(--surface);
+ border: 1px solid var(--border);
+ color: var(--text-1);
+ border-bottom-left-radius: var(--radius-sm);
+}
+
+.chat-bubble--user {
+ background: var(--accent-dim);
+ border: 1px solid var(--border-active);
+ color: var(--text-1);
+ border-bottom-right-radius: var(--radius-sm);
+ align-self: flex-end;
+}
+
+/* ── Module panel — panneau de cours ── */
+
+.module-panel {
+ width: 420px;
+ max-height: 520px;
+ background: var(--surface);
+ border: 1px solid var(--border);
+ border-radius: var(--radius-lg);
+ box-shadow: var(--shadow-panel);
+ display: flex;
+ flex-direction: column;
+ overflow: hidden;
+}
+
+.module-panel__header {
+ padding: var(--space-4) var(--space-5);
+ border-bottom: 1px solid var(--border);
+ flex-shrink: 0;
+}
+
+.module-panel__tag {
+ font-size: var(--text-xs);
+ font-weight: var(--weight-medium);
+ color: var(--accent);
+ margin-bottom: var(--space-1);
+}
+
+.module-panel__title {
+ font-size: var(--text-md);
+ font-weight: var(--weight-semi);
+ letter-spacing: -0.3px;
+ color: var(--text-1);
+}
+
+.module-panel__body {
+ flex: 1;
+ overflow-y: auto;
+ padding: var(--space-5);
+ font-size: var(--text-base);
+ line-height: var(--leading-body);
+ color: #9097b0;
+ scrollbar-width: thin;
+ scrollbar-color: var(--surface-2) transparent;
+}
+
+/* ── Exercise card — carte d'exercice ── */
+
+.ex-card {
+ padding: var(--space-4);
+ background: var(--bg);
+ border: 1px solid var(--border);
+ border-radius: var(--radius-md);
+ cursor: pointer;
+ transition: border-color var(--ease);
+}
+
+.ex-card:hover {
+ border-color: var(--border-active);
+}
+
+.ex-card__level {
+ font-size: var(--text-xs);
+ font-weight: var(--weight-medium);
+ margin-bottom: var(--space-2);
+}
+
+.ex-card__level--easy {
+ color: var(--green);
+}
+
+.ex-card__level--medium {
+ color: var(--amber);
+}
+
+.ex-card__level--hard {
+ color: var(--red);
+}
+
+.ex-card__text {
+ font-size: var(--text-sm);
+ color: var(--text-2);
+ line-height: var(--leading-tight);
+}
+
+/* ── Pipeline stepper — progression session ── */
+
+.step {
+ display: flex;
+ align-items: center;
+ gap: var(--space-2);
+ padding: var(--space-2) var(--space-2);
+ border-radius: var(--radius-sm);
+ border: 1px solid transparent;
+}
+
+.step--done {
+ opacity: 0.45;
+}
+
+.step--pending {
+ opacity: 0.25;
+}
+
+.step--active {
+ background: var(--accent-dim);
+ border-color: var(--border-active);
+}
+
+.step__num {
+ width: 18px;
+ height: 18px;
+ border-radius: 5px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 9px;
+ font-weight: var(--weight-semi);
+ flex-shrink: 0;
+}
+
+.step--done .step__num {
+ background: var(--green-dim);
+ color: var(--green);
+}
+
+.step--active .step__num {
+ background: var(--accent);
+ color: white;
+}
+
+.step--pending .step__num {
+ background: var(--surface-2);
+ color: var(--text-3);
+ border: 1px solid var(--border);
+}
+
+.step__label {
+ font-size: var(--text-sm);
+ font-weight: var(--weight-medium);
+ color: var(--text-2);
+}
+
+.step--active .step__label {
+ color: var(--text-1);
+}
+
+/* ── Input bar — barre de saisie ── */
+
+.input-bar {
+ display: flex;
+ align-items: center;
+ gap: var(--space-2);
+ padding: var(--space-2) var(--space-3);
+ background: var(--surface);
+ border: 1px solid var(--border);
+ border-radius: var(--radius-md);
+ transition: border-color var(--ease);
+ width: 320px;
+}
+
+.input-bar:focus-within {
+ border-color: var(--border-active);
+}
+
+.input-bar input {
+ flex: 1;
+ border: none;
+ background: none;
+ outline: none;
+ font-family: var(--font-sans);
+ font-size: var(--text-base);
+ color: var(--text-1);
+ caret-color: var(--accent);
+}
+
+.input-bar input::placeholder {
+ color: var(--text-3);
+}
+
+.input-bar__btn {
+ width: 28px;
+ height: 28px;
+ border-radius: var(--radius-sm);
+ border: 1px solid var(--border);
+ background: none;
+ color: var(--text-2);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ cursor: pointer;
+ transition: all var(--ease);
+ flex-shrink: 0;
+}
+
+.input-bar__btn:hover {
+ background: var(--surface-2);
+ color: var(--text-1);
+}
+
+.input-bar__send {
+ width: 28px;
+ height: 28px;
+ border-radius: var(--radius-sm);
+ border: none;
+ background: var(--accent);
+ color: white;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ cursor: pointer;
+ opacity: 0.9;
+ transition: opacity var(--ease);
+ flex-shrink: 0;
+}
+
+.input-bar__send:hover {
+ opacity: 1;
+}
+
+/* ── Badge — statut et labels ── */
+
+.badge {
+ display: inline-flex;
+ align-items: center;
+ gap: var(--space-1);
+ padding: 3px var(--space-2);
+ border-radius: var(--radius-full);
+ font-size: var(--text-xs);
+ font-weight: var(--weight-medium);
+ white-space: nowrap;
+}
+
+.badge--active {
+ background: var(--accent-dim);
+ color: #a5b4fc;
+ border: 1px solid var(--border-active);
+}
+
+.badge--success {
+ background: var(--green-dim);
+ color: var(--green);
+}
+
+.badge--neutral {
+ background: var(--surface-2);
+ color: var(--text-2);
+ border: 1px solid var(--border);
+}
+
+.live-dot {
+ width: 5px;
+ height: 5px;
+ border-radius: 50%;
+ background: var(--green);
+ animation: blink 2.5s ease-in-out infinite;
+}
+
+@keyframes blink {
+ 0%,
+ 100% {
+ opacity: 1;
+ }
+ 60% {
+ opacity: 0.3;
+ }
+}
+
+/* ── Code block — affichage de code ── */
+
+.code-block {
+ background: #0a0b0f;
+ border: 1px solid var(--border);
+ border-radius: var(--radius-md);
+ padding: var(--space-4) var(--space-5);
+ font-family: var(--font-mono);
+ font-size: 12px;
+ line-height: 1.65;
+ color: #8892b0;
+ overflow-x: auto;
+ tab-size: 2;
+}
+
+.token-kw {
+ color: #8b8bdb;
+}
+
+.token-fn {
+ color: #88c0d0;
+}
+
+.token-str {
+ color: #a3be8c;
+}
+
+.token-num {
+ color: #d08770;
+}
+
+.token-cm {
+ color: #3b4261;
+ font-style: italic;
+}
diff --git a/Max Avatar/src/renderer/src/styles/tokens.css b/Max Avatar/src/renderer/src/styles/tokens.css
new file mode 100644
index 0000000..ef3e733
--- /dev/null
+++ b/Max Avatar/src/renderer/src/styles/tokens.css
@@ -0,0 +1,65 @@
+:root {
+ /* ── Couleurs de base ── */
+ --bg: #0c0d12; /* fond principal de la fenetre */
+ --surface: #111318; /* surface des panneaux */
+ --surface-2: #16181f; /* surface secondaire, hover */
+
+ /* ── Bordures ── */
+ --border: rgba(255, 255, 255, 0.06);
+ --border-active: rgba(99, 102, 241, 0.3);
+ --border-hover: rgba(255, 255, 255, 0.1);
+
+ /* ── Accent ── */
+ --accent: #6366f1; /* indigo — couleur principale */
+ --accent-dim: rgba(99, 102, 241, 0.12); /* fond des elements actifs */
+ --accent-glow: rgba(99, 102, 241, 0.08); /* halo tres subtil avatar uniquement */
+
+ /* ── Texte ── */
+ --text-1: #e4e6ee; /* texte principal */
+ --text-2: #6b7280; /* texte secondaire, labels */
+ --text-3: #2d3148; /* texte desactive, placeholders */
+
+ /* ── Semantique ── */
+ --green: #34d399;
+ --green-dim: rgba(52, 211, 153, 0.1);
+ --amber: #fbbf24;
+ --red: #f87171;
+
+ /* ── Typographie ── */
+ --font-sans: 'Inter', system-ui, sans-serif;
+ --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
+
+ --text-xs: 11px;
+ --text-sm: 12px;
+ --text-base: 13.5px;
+ --text-md: 15px;
+ --text-lg: 18px;
+
+ --weight-normal: 400;
+ --weight-medium: 500;
+ --weight-semi: 600;
+
+ --leading-tight: 1.4;
+ --leading-body: 1.75;
+
+ /* ── Espace ── */
+ --space-1: 4px;
+ --space-2: 8px;
+ --space-3: 12px;
+ --space-4: 16px;
+ --space-5: 20px;
+ --space-6: 24px;
+
+ /* ── Rayons ── */
+ --radius-sm: 6px;
+ --radius-md: 9px;
+ --radius-lg: 14px;
+ --radius-full: 9999px;
+
+ /* ── Ombres ── */
+ --shadow-panel: 0 8px 32px rgba(0, 0, 0, 0.45);
+ --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.3);
+
+ /* ── Transitions ── */
+ --ease: 0.15s ease;
+}
diff --git a/docs/Max_Design_System.md b/docs/Max_Design_System.md
new file mode 100644
index 0000000..2757cde
--- /dev/null
+++ b/docs/Max_Design_System.md
@@ -0,0 +1,395 @@
+# Max — Design System & CSS Template
+
+> Ce document définit les tokens CSS et les règles visuelles à respecter pour tous les composants de Max. Max est un **avatar 3D de bureau** — les composants sont des **panneaux flottants**, des **bulles**, des **cartes** qui apparaissent autour de l'avatar. Pas des pages entières.
+
+---
+
+## Contexte d'utilisation
+
+Max s'affiche comme une fenêtre Electron transparente, always-on-top. Les composants UI sont de petites surfaces qui apparaissent autour ou à côté de l'avatar 3D selon le contexte :
+
+- Une **bulle de chat** pour les messages
+- Un **panneau de module** pour afficher le contenu de cours
+- Des **cartes d'exercice** pour les exercices
+- Un **stepper** pour la progression dans le pipeline
+- Une **barre de saisie** pour l'input utilisateur
+- Des **badges de statut** pour indiquer l'état de Max
+
+Tous ces composants sont compacts, semi-transparents, et ne doivent jamais cacher l'avatar.
+
+---
+
+## Tokens CSS
+
+À placer dans un fichier `src/renderer/styles/tokens.css` importé globalement.
+
+```css
+:root {
+ /* ── Couleurs de base ── */
+ --bg: #0C0D12; /* fond principal de la fenêtre */
+ --surface: #111318; /* surface des panneaux */
+ --surface-2: #16181F; /* surface secondaire, hover */
+
+ /* ── Bordures ── */
+ --border: rgba(255, 255, 255, 0.06);
+ --border-active: rgba(99, 102, 241, 0.30);
+ --border-hover: rgba(255, 255, 255, 0.10);
+
+ /* ── Accent ── */
+ --accent: #6366F1; /* indigo — couleur principale */
+ --accent-dim: rgba(99, 102, 241, 0.12); /* fond des éléments actifs */
+ --accent-glow: rgba(99, 102, 241, 0.08); /* halo très subtil avatar uniquement */
+
+ /* ── Texte ── */
+ --text-1: #E4E6EE; /* texte principal */
+ --text-2: #6B7280; /* texte secondaire, labels */
+ --text-3: #2D3148; /* texte désactivé, placeholders */
+
+ /* ── Sémantique ── */
+ --green: #34D399;
+ --green-dim: rgba(52, 211, 153, 0.10);
+ --amber: #FBBF24;
+ --red: #F87171;
+
+ /* ── Typographie ── */
+ --font-sans: 'Inter', system-ui, sans-serif;
+ --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
+
+ --text-xs: 11px;
+ --text-sm: 12px;
+ --text-base: 13.5px;
+ --text-md: 15px;
+ --text-lg: 18px;
+
+ --weight-normal: 400;
+ --weight-medium: 500;
+ --weight-semi: 600;
+
+ --leading-tight: 1.4;
+ --leading-body: 1.75;
+
+ /* ── Espace ── */
+ --space-1: 4px;
+ --space-2: 8px;
+ --space-3: 12px;
+ --space-4: 16px;
+ --space-5: 20px;
+ --space-6: 24px;
+
+ /* ── Rayons ── */
+ --radius-sm: 6px;
+ --radius-md: 9px;
+ --radius-lg: 14px;
+ --radius-full: 9999px;
+
+ /* ── Ombres ── */
+ --shadow-panel: 0 8px 32px rgba(0, 0, 0, 0.45);
+ --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.30);
+
+ /* ── Transitions ── */
+ --ease: 0.15s ease;
+}
+```
+
+---
+
+## Composants
+
+### Chat bubble — bulle de message
+
+```css
+/* Conteneur de conversation */
+.chat-bubble {
+ max-width: 280px;
+ padding: var(--space-3) var(--space-4);
+ border-radius: var(--radius-lg);
+ font-family: var(--font-sans);
+ font-size: var(--text-base);
+ line-height: var(--leading-body);
+ box-shadow: var(--shadow-panel);
+}
+
+/* Message de Max */
+.chat-bubble--max {
+ background: var(--surface);
+ border: 1px solid var(--border);
+ color: var(--text-1);
+ border-bottom-left-radius: var(--radius-sm);
+}
+
+/* Message de l'utilisateur */
+.chat-bubble--user {
+ background: var(--accent-dim);
+ border: 1px solid var(--border-active);
+ color: var(--text-1);
+ border-bottom-right-radius: var(--radius-sm);
+ align-self: flex-end;
+}
+```
+
+### Module panel — panneau de cours
+
+```css
+.module-panel {
+ width: 420px;
+ max-height: 520px;
+ background: var(--surface);
+ border: 1px solid var(--border);
+ border-radius: var(--radius-lg);
+ box-shadow: var(--shadow-panel);
+ display: flex;
+ flex-direction: column;
+ overflow: hidden;
+}
+
+.module-panel__header {
+ padding: var(--space-4) var(--space-5);
+ border-bottom: 1px solid var(--border);
+ flex-shrink: 0;
+}
+
+.module-panel__tag {
+ font-size: var(--text-xs);
+ font-weight: var(--weight-medium);
+ color: var(--accent);
+ margin-bottom: var(--space-1);
+}
+
+.module-panel__title {
+ font-size: var(--text-md);
+ font-weight: var(--weight-semi);
+ letter-spacing: -0.3px;
+ color: var(--text-1);
+}
+
+.module-panel__body {
+ flex: 1;
+ overflow-y: auto;
+ padding: var(--space-5);
+ font-size: var(--text-base);
+ line-height: var(--leading-body);
+ color: #9097B0;
+ scrollbar-width: thin;
+ scrollbar-color: var(--surface-2) transparent;
+}
+```
+
+### Exercise card — carte d'exercice
+
+```css
+.ex-card {
+ padding: var(--space-4);
+ background: var(--bg);
+ border: 1px solid var(--border);
+ border-radius: var(--radius-md);
+ cursor: pointer;
+ transition: border-color var(--ease);
+}
+
+.ex-card:hover {
+ border-color: var(--border-active);
+}
+
+.ex-card__level {
+ font-size: var(--text-xs);
+ font-weight: var(--weight-medium);
+ margin-bottom: var(--space-2);
+}
+
+.ex-card__level--easy { color: var(--green); }
+.ex-card__level--medium { color: var(--amber); }
+.ex-card__level--hard { color: var(--red); }
+
+.ex-card__text {
+ font-size: var(--text-sm);
+ color: var(--text-2);
+ line-height: var(--leading-tight);
+}
+```
+
+### Pipeline stepper — progression session
+
+```css
+.step {
+ display: flex;
+ align-items: center;
+ gap: var(--space-2);
+ padding: var(--space-2) var(--space-2);
+ border-radius: var(--radius-sm);
+ border: 1px solid transparent;
+}
+
+.step--done { opacity: 0.45; }
+.step--pending { opacity: 0.25; }
+
+.step--active {
+ background: var(--accent-dim);
+ border-color: var(--border-active);
+}
+
+.step__num {
+ width: 18px;
+ height: 18px;
+ border-radius: 5px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 9px;
+ font-weight: var(--weight-semi);
+ flex-shrink: 0;
+}
+
+.step--done .step__num { background: var(--green-dim); color: var(--green); }
+.step--active .step__num { background: var(--accent); color: white; }
+.step--pending .step__num { background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border); }
+
+.step__label {
+ font-size: var(--text-sm);
+ font-weight: var(--weight-medium);
+ color: var(--text-2);
+}
+
+.step--active .step__label { color: var(--text-1); }
+```
+
+### Input bar — barre de saisie
+
+```css
+.input-bar {
+ display: flex;
+ align-items: center;
+ gap: var(--space-2);
+ padding: var(--space-2) var(--space-3);
+ background: var(--surface);
+ border: 1px solid var(--border);
+ border-radius: var(--radius-md);
+ transition: border-color var(--ease);
+ width: 320px;
+}
+
+.input-bar:focus-within {
+ border-color: var(--border-active);
+}
+
+.input-bar input {
+ flex: 1;
+ border: none;
+ background: none;
+ outline: none;
+ font-family: var(--font-sans);
+ font-size: var(--text-base);
+ color: var(--text-1);
+ caret-color: var(--accent);
+}
+
+.input-bar input::placeholder { color: var(--text-3); }
+
+.input-bar__btn {
+ width: 28px;
+ height: 28px;
+ border-radius: var(--radius-sm);
+ border: 1px solid var(--border);
+ background: none;
+ color: var(--text-2);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ cursor: pointer;
+ transition: all var(--ease);
+ flex-shrink: 0;
+}
+
+.input-bar__btn:hover { background: var(--surface-2); color: var(--text-1); }
+
+.input-bar__send {
+ width: 28px;
+ height: 28px;
+ border-radius: var(--radius-sm);
+ border: none;
+ background: var(--accent);
+ color: white;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ cursor: pointer;
+ opacity: 0.9;
+ transition: opacity var(--ease);
+ flex-shrink: 0;
+}
+
+.input-bar__send:hover { opacity: 1; }
+```
+
+### Badge — statut et labels
+
+```css
+.badge {
+ display: inline-flex;
+ align-items: center;
+ gap: var(--space-1);
+ padding: 3px var(--space-2);
+ border-radius: var(--radius-full);
+ font-size: var(--text-xs);
+ font-weight: var(--weight-medium);
+ white-space: nowrap;
+}
+
+.badge--active { background: var(--accent-dim); color: #A5B4FC; border: 1px solid var(--border-active); }
+.badge--success { background: var(--green-dim); color: var(--green); }
+.badge--neutral { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); }
+
+/* Point de statut live */
+.live-dot {
+ width: 5px;
+ height: 5px;
+ border-radius: 50%;
+ background: var(--green);
+ animation: blink 2.5s ease-in-out infinite;
+}
+
+@keyframes blink {
+ 0%, 100% { opacity: 1; }
+ 60% { opacity: 0.3; }
+}
+```
+
+### Code block — affichage de code
+
+```css
+.code-block {
+ background: #0A0B0F;
+ border: 1px solid var(--border);
+ border-radius: var(--radius-md);
+ padding: var(--space-4) var(--space-5);
+ font-family: var(--font-mono);
+ font-size: 12px;
+ line-height: 1.65;
+ color: #8892B0;
+ overflow-x: auto;
+ tab-size: 2;
+}
+
+/* Syntax highlighting */
+.token-kw { color: #8B8BDB; } /* keywords */
+.token-fn { color: #88C0D0; } /* functions */
+.token-str { color: #A3BE8C; } /* strings */
+.token-num { color: #D08770; } /* numbers */
+.token-cm { color: #3B4261; font-style: italic; } /* comments */
+```
+
+---
+
+## Règles visuelles — ce que l'IA codeuse ne doit pas faire
+
+| Interdit | Pourquoi |
+| --- | --- |
+| Utiliser une couleur hors des tokens | Crée de l'incohérence visuelle |
+| Ajouter des ombres colorées (box-shadow coloré) | Réservé au halo de l'avatar uniquement |
+| Utiliser `border-radius` hors des variables | Les rayons doivent être cohérents |
+| Animer autre chose que les dots et le live-dot | Les animations doivent être discrètes |
+| Dépasser 420px de largeur pour un panneau | Max est un composant de bureau, pas une page |
+| Utiliser du blanc pur (#FFF) ou du noir pur (#000) | Toujours utiliser les tokens |
+| Mettre du texte en all-caps | Jamais dans cette interface |
+| Utiliser un dégradé visible sur du texte | Réservé au logo "Max." uniquement |
+| Ajouter des icônes emoji dans les composants | Utiliser une lib d'icônes (Lucide) |
+| Importer une nouvelle police | Inter et JetBrains Mono uniquement |