diff --git a/src/features/ai-copilot/components/ai-explanation-modal.tsx b/src/features/ai-copilot/components/ai-explanation-modal.tsx index 7577eb1..63366c4 100644 --- a/src/features/ai-copilot/components/ai-explanation-modal.tsx +++ b/src/features/ai-copilot/components/ai-explanation-modal.tsx @@ -35,108 +35,101 @@ export function AiExplanationModal({ const handleClose = () => { setIsVisible(false); - setTimeout(onClose, 250); + setTimeout(onClose, 200); }; if (!isOpen && !isVisible) return null; if (!mounted) return null; - const getGammeColor = (g?: string | null) => { + const getGammeStyles = (g?: string | null) => { switch (g) { - case "A": return "text-emerald-500 border-emerald-500/50 bg-emerald-500/10"; - case "C": return "text-amber-500 border-amber-500/50 bg-amber-500/10"; - case "Z": return "text-rose-500 border-rose-500/50 bg-rose-500/10"; - default: return "text-slate-500 border-slate-500/50 bg-slate-500/10"; + case "A": return "text-[var(--accent-success)] border-[var(--accent-success-bg)] bg-[var(--accent-success-bg)]"; + case "C": return "text-[var(--accent-warning)] border-[var(--accent-warning-bg)] bg-[var(--accent-warning-bg)]"; + case "Z": return "text-[var(--accent-error)] border-[var(--accent-error-bg)] bg-[var(--accent-error-bg)]"; + default: return "text-[var(--text-muted)] border-[var(--border)] bg-[var(--bg-elevated)]"; } }; const modalContent = (
- {/* Backdrop */} + {/* Backdrop - consistent with Apple overlay */}
- {/* Panel */} + {/* Panel - Using var(--bg-surface) and strict spacing */}
- {/* Header with Mary Icon */} -
-
-
- + {/* Header - Clean & Monochromatic */} +
+
+
+
-

- Analyse de Mary đź§™ +

+ Analyse Décisionnelle IA

-

- {productName} ({productCode}) +

+ {productName} ({productCode})

- {/* Content */} -
-
- {/* Recommandation Badge */} -
- Verdict : -
- {recommandation === "A" && } - {recommandation === "C" && } - {recommandation === "Z" && } - {recommandation ? `GAMME ${recommandation}` : "AUCUN"} + {/* Body */} +
+ {/* Recommendation Row */} +
+ Arbitrage suggéré +
+ {recommandation === "A" && } + {recommandation === "C" && } + {recommandation === "Z" && } + {recommandation ? `GAMME ${recommandation}` : "NON DÉFINI"} +
+
+ + {/* Explanation Box - Monospace for figures */} +
+
+ +
+ + {explanation} +
+
- {/* Explanation Text */} -
-
- -
- "{explanation}" -
-
-
- -
-
-

- Analyse générée en temps réel selon les indicateurs CA, Marge et Régularité. -

+ {/* Meta Info */} +
+
+ Basé sur CA, Marge & Volumes réels
- {/* Footers / Action */} -
+ {/* Footer Action */} +
@@ -144,9 +137,9 @@ export function AiExplanationModal({
diff --git a/src/features/ai-copilot/components/ai-insight-block.tsx b/src/features/ai-copilot/components/ai-insight-block.tsx index 6bb6340..33c695d 100644 --- a/src/features/ai-copilot/components/ai-insight-block.tsx +++ b/src/features/ai-copilot/components/ai-insight-block.tsx @@ -103,28 +103,19 @@ export function AiInsightBlock({ row }: AiInsightBlockProps) { return ( <>
-
- +

{ e.stopPropagation(); - handleAnalyze(); + setIsModalOpen(true); }} - /> -

-
{ - e.stopPropagation(); - setIsModalOpen(true); - }} - > - - {insight?.insight} - - -
-
+ > + {insight.insight} + + + +

{insight?.isDuplicate && ( diff --git a/task.md b/task.md index 41a5e1a..ec1c531 100644 --- a/task.md +++ b/task.md @@ -21,6 +21,7 @@ Activation et initialisation de l'Agent Master BMAD. - [x] Étape 13 : Implémentation du modal pour les explications IA détaillées - [x] Étape 14 : Correction du design et du positionnement du modal (z-index/Portal) - [x] Étape 15 : Polissage final et validation Michael +- [x] Étape 16 : Correction graphique selon la charte CollectFlow (Slate-950/Apple) # Progress Log @@ -48,3 +49,6 @@ Activation et initialisation de l'Agent Master BMAD. - Correction du modal : utilisation de `createPortal` et `z-index: 9999` pour passer au-dessus de tout. - Opacité du fond renforcée (0.85). - Validation Michael reçue (LGTM). +- Refonte visuelle complète du modal : passage aux variables CSS de `globals.css`. +- Suppression des bordures blanches et du fond noir pur pour le thème `Slate-950`. +- Intégration de `tabular-nums` pour les indicateurs financiers.