diff --git a/components/BandeauBas.vue b/components/BandeauBas.vue
index deb85d1..51c6a68 100644
--- a/components/BandeauBas.vue
+++ b/components/BandeauBas.vue
@@ -461,10 +461,12 @@ const jaugePct = computed(() => {
}
/* ── FAB mobile soutenir ─────────────────────────────────────────────────── */
+/* Stack vertical avec le FAB Chatbot a droite (evite l'overlap avec les chips
+ sidebar mobile sur viewport intermediaire ~880px - bug E2E M3) */
.fab-soutenir {
position: fixed;
- bottom: 68px; /* au-dessus du FAB chatbot à 24px du bas + 48px de hauteur */
- left: 16px;
+ bottom: 84px; /* au-dessus du FAB chatbot a bottom-6 (24px) + 48px de hauteur + 12px gap */
+ right: 16px;
z-index: 1000;
width: 44px;
height: 44px;
diff --git a/components/EuropeMap.vue b/components/EuropeMap.vue
index 6a6c157..9c918a7 100644
--- a/components/EuropeMap.vue
+++ b/components/EuropeMap.vue
@@ -123,6 +123,12 @@ async function initMap() {
updateMarkers(L)
}
+// Vue initiale (centre Europe + zoom 4) - sauvegardee pour reset
+const INITIAL_CENTER: [number, number] = [50.0, 10.0]
+const INITIAL_ZOOM = 4
+
+let initialFitDone = false
+
function updateMarkers(L?: any) {
if (!mapInstance || !clusterGroup) return
const leaflet = L || (window as any).L
@@ -158,6 +164,29 @@ function updateMarkers(L?: any) {
markers.set(org.id, marker)
clusterGroup.addLayer(marker)
})
+
+ // Bug E2E L3 : recadrer la carte sur les resultats filtres
+ // Conditions : 1+ resultat, et au moins 1 marker hors viewport actuel.
+ // On evite de recadrer au tout premier rendu (laisser la vue initiale).
+ if (orgsWithCoords.length > 0 && initialFitDone) {
+ try {
+ const bounds = leaflet.latLngBounds(
+ orgsWithCoords.map((o) => [o.lat!, o.lng!])
+ )
+ // On recadre uniquement si la liste filtree est restreinte
+ // (evite un recadrage permanent quand toutes les fiches sont la).
+ if (orgsWithCoords.length <= 15) {
+ mapInstance.fitBounds(bounds, {
+ padding: [40, 40],
+ maxZoom: 10,
+ animate: true,
+ })
+ }
+ } catch (e) {
+ console.warn('[EuropeMap] fitBounds echoue:', e)
+ }
+ }
+ initialFitDone = true
}
watch(
diff --git a/components/NavMap.vue b/components/NavMap.vue
index ae3938c..aeb68ab 100644
--- a/components/NavMap.vue
+++ b/components/NavMap.vue
@@ -128,6 +128,8 @@ async function initMap() {
updateMarkers(L)
}
+let initialFitDone = false
+
function updateMarkers(L?: any) {
if (!mapInstance || !clusterGroup) return
const leaflet = L || (window as any).L
@@ -168,6 +170,25 @@ function updateMarkers(L?: any) {
markers.set(org.Id, marker)
clusterGroup.addLayer(marker)
})
+
+ // Bug E2E L3 : recadrer la carte sur les resultats filtres
+ if (orgsWithCoords.length > 0 && initialFitDone) {
+ try {
+ const bounds = leaflet.latLngBounds(
+ orgsWithCoords.map((o: any) => [o.latitude!, o.longitude!])
+ )
+ if (orgsWithCoords.length <= 15) {
+ mapInstance.fitBounds(bounds, {
+ padding: [40, 40],
+ maxZoom: 10,
+ animate: true,
+ })
+ }
+ } catch (e) {
+ console.warn('[NavMap] fitBounds echoue:', e)
+ }
+ }
+ initialFitDone = true
}
// Réagir aux changements de filtres (liste d'orgs)
diff --git a/pages/fiche/[id].vue b/pages/fiche/[id].vue
index 9f19738..cd57b52 100644
--- a/pages/fiche/[id].vue
+++ b/pages/fiche/[id].vue
@@ -72,6 +72,21 @@ const { data: org, pending, error } = await useFetch