diff --git a/assets/css/v2-bifurcation.css b/assets/css/v2-bifurcation.css new file mode 100644 index 0000000..3d6ca22 --- /dev/null +++ b/assets/css/v2-bifurcation.css @@ -0,0 +1,23 @@ +/* Palette familles V2 - variables locales, ne pas toucher --nav-* */ +:root { + --bifurc-color-f1: #a85d3e; /* Réemploi & filières - terracotta */ + --bifurc-color-f2: #c4a472; /* Frugalité & low-tech - terre crue */ + --bifurc-color-f3: #d4a017; /* Architecture sociale - ocre */ + --bifurc-color-f4: #5a7a4a; /* Collectifs & AMO - vert mousse */ + --bifurc-color-f5: #3d6a8c; /* Urbanisme transition - bleu profond */ + + --bifurc-badge-f6: #6b3fa0; /* Recherche politique - violet */ + --bifurc-badge-cr: #2d8a6b; /* Centre ressources - vert foncé */ + --bifurc-badge-mm: #c44a2f; /* Mouvement manifeste - rouge brique */ + --bifurc-badge-cp: #1a3a6b; /* Contre-pouvoir - bleu nuit */ + + --bifurc-banner-bg: #faf8f5; + --bifurc-banner-border: #e0d8cc; + --bifurc-banner-text: #2c2416; +} + +.bifurc-pin-f1 { background: var(--bifurc-color-f1); } +.bifurc-pin-f2 { background: var(--bifurc-color-f2); } +.bifurc-pin-f3 { background: var(--bifurc-color-f3); } +.bifurc-pin-f4 { background: var(--bifurc-color-f4); } +.bifurc-pin-f5 { background: var(--bifurc-color-f5); } diff --git a/components/ChatbotPlaceholder.vue b/components/ChatbotPlaceholder.vue index 00cdf6e..1f0e294 100644 --- a/components/ChatbotPlaceholder.vue +++ b/components/ChatbotPlaceholder.vue @@ -52,18 +52,9 @@
-

Ce chatbot fonctionne sur un serveur européen souverain -(Mistral FR, zéro rétention), conçu sobre en énergie.

-

Pour m'aider à te répondre efficacement, -formule ta requête ainsi :

- -

Exemple : "Je suis salarié d'agence, litige avec mon -employeur, besoin conseil juridique droit du travail, -Île-de-France."

+

Explore les 120 structures de la carte par la conversation. Je peux t'aider à trouver des collectifs, agences ou réseaux selon ta situation, ta pratique ou tes inspirations du moment.

+

Exemple : "Je cherche des acteurs de la rénovation de maisons individuelles en France, plutôt en milieu rural, avec des approches biosourcées ou low-tech."

+

Propulsé par Mistral FR - serveur européen souverain, zéro rétention.

@@ -72,7 +63,7 @@ employeur, besoin conseil juridique droit du travail,

{{ msg.content }}

-

Fiches recommandées :

+

Fiches recommandees :

{{ fiche.explication }}
+
+

Filtrer par :

+
+ {{ tag }} +
+
@@ -132,10 +138,12 @@ interface ChatMessage { role: 'user' | 'assistant' content: string fiches?: FicheReco[] + suggestedHashtags?: string[] } const emit = defineEmits<{ 'highlightOrgs': [ids: (number | string)[]] + 'applyHashtag': [tag: string] }>() const isExpanded = ref(false) @@ -145,6 +153,37 @@ const loading = ref(false) const errorMsg = ref('') const messagesContainer = ref(null) +// Detection hashtags depuis la question posee +const HASHTAG_KEYWORDS: Record = { + '#reemploi-structurel': ['reemploi', 'materiaux recuperes', 'deconstruction', 'reemploi structurel'], + '#reemploi-second-oeuvre': ['revetement', 'second oeuvre', 'reemploi'], + '#biosource-geosource': ['biosource', 'geosource', 'paille', 'terre', 'chanvre', 'lin', 'biosource'], + '#low-tech-experimentation': ['low-tech', 'low tech', 'technique simple', 'autonomie', 'lowtech'], + '#chantier-ecole': ['formation', 'chantier ecole', 'chantier-ecole', 'apprendre', 'auto-construction', 'autoconstruction'], + '#sobriete-energetique': ['sobriete', 'energie', 'renovation energetique', 'isolation', 'chauffage', 'economie energie'], + '#mal-logement-precarite': ['mal-logement', 'precarite', 'sans-abri', 'logement social', 'squat', 'mal logement'], + '#tiers-lieux-friches': ['friche', 'tiers-lieu', 'tiers lieu', 'espace intermediaire', 'temporaire', 'reconversion'], + '#accompagnement-cooperatif': ['cooperative', 'accompagnement', 'cooperation', 'collectif', 'mutualisation'], + '#transition-energetique-territoriale': ['territoire', 'transition', 'energetique', 'local', 'region', 'transition energetique'], + '#communs-fonciers': ['communs', 'foncier', 'anti-speculatif', 'community land trust', 'commun foncier'], + '#hack-juridique': ['juridique', 'montage', 'structure legale', 'sci', 'cooperative', 'statut'], + '#retrofit-strates': ['retrofit', 'renovation lourde', 'sur-isolation', 'rehaussement'], + '#phytoconstruction': ['plantes', 'vegetal', 'arbre', 'construction vivante', 'phyto'], +} + +function detectHashtagsFromQuery(query: string): string[] { + const q = query.toLowerCase() + .normalize('NFD') + .replace(/[̀-ͯ]/g, '') + const detected: string[] = [] + for (const [hashtag, keywords] of Object.entries(HASHTAG_KEYWORDS)) { + if (keywords.some(kw => q.includes(kw))) { + detected.push(hashtag) + } + } + return detected.slice(0, 3) +} + function toggleExpand() { isExpanded.value = !isExpanded.value } @@ -170,10 +209,12 @@ async function sendMessage() { body: { question }, }) + const suggestedHashtags = detectHashtagsFromQuery(question) const assistantMsg: ChatMessage = { role: 'assistant', content: res.reponse_texte, fiches: res.fiches_recommandees || [], + suggestedHashtags: suggestedHashtags.length ? suggestedHashtags : undefined, } messages.value.push(assistantMsg) diff --git a/components/FicheFamilleModal.vue b/components/FicheFamilleModal.vue new file mode 100644 index 0000000..2d56e53 --- /dev/null +++ b/components/FicheFamilleModal.vue @@ -0,0 +1,284 @@ + + + + + diff --git a/components/FicheModalV2.vue b/components/FicheModalV2.vue new file mode 100644 index 0000000..8cccf41 --- /dev/null +++ b/components/FicheModalV2.vue @@ -0,0 +1,341 @@ + + + + + diff --git a/components/GraphView.vue b/components/GraphView.vue new file mode 100644 index 0000000..05c9dad --- /dev/null +++ b/components/GraphView.vue @@ -0,0 +1,860 @@ + + + diff --git a/components/HashtagFilter.vue b/components/HashtagFilter.vue new file mode 100644 index 0000000..467d29b --- /dev/null +++ b/components/HashtagFilter.vue @@ -0,0 +1,97 @@ + + + + + diff --git a/components/IntentionBanner.vue b/components/IntentionBanner.vue new file mode 100644 index 0000000..888f17d --- /dev/null +++ b/components/IntentionBanner.vue @@ -0,0 +1,76 @@ + + + + + diff --git a/components/NavMapV2.vue b/components/NavMapV2.vue new file mode 100644 index 0000000..e0e3b43 --- /dev/null +++ b/components/NavMapV2.vue @@ -0,0 +1,243 @@ + + + diff --git a/pages/index.vue b/pages/index.vue index 4d42073..71107c3 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -1,56 +1,144 @@