diff --git a/modules/holidays/holidays.js b/modules/holidays/holidays.js
index 8aec1e7..c75b933 100644
--- a/modules/holidays/holidays.js
+++ b/modules/holidays/holidays.js
@@ -221,26 +221,46 @@ function initDetailMap() {
latlngs.push(pos);
bounds.extend(pos);
- // Couleur selon le paiement
- const color = pt.paid == 1 ? "#10b981" : "#f59e0b";
+ // Couleur de base (Bleu PachaFamily)
+ const color = "#2563eb";
// On place un petit cercle pour chaque point
const marker = L.circleMarker(pos, {
color: color,
- radius: 7,
+ radius: 8,
fillOpacity: 1,
fillColor: "white",
weight: 3,
}).addTo(detailMap);
- // Numérotation et Popup
+ // Correction : Numérotation et Popup avec les bonnes variables
marker.bindPopup(`
-
Étape ${index + 1}
-
${pt.title}
-
${parseFloat(pt.amount).toFixed(2)} €
+
Étape ${index + 1}
+
${pt.location_name}
+
${parseFloat(pt.total_amount).toFixed(2)} €
`);
+
+ // NOUVEAU : Focus et scroll sur la liste au clic sur la carte !
+ marker.on("click", function () {
+ const card = document.getElementById("step-card-" + pt.sort_order);
+ if (card) {
+ // Fait défiler la liste doucement jusqu'à l'élément
+ card.scrollIntoView({ behavior: "smooth", block: "center" });
+
+ // Effet visuel "Flash" pour repérer la carte
+ card.style.transition = "box-shadow 0.3s, transform 0.3s";
+ card.style.boxShadow = "0 0 0 3px #3b82f6";
+ card.style.transform = "scale(1.02)";
+
+ // Retire l'effet après 1.5 seconde
+ setTimeout(() => {
+ card.style.boxShadow = "";
+ card.style.transform = "";
+ }, 1500);
+ }
+ });
});
// On dessine le trait en pointillés pour relier le roadtrip !
diff --git a/modules/holidays/views/detail.php b/modules/holidays/views/detail.php
index ccfe81d..acec2d3 100644
--- a/modules/holidays/views/detail.php
+++ b/modules/holidays/views/detail.php
@@ -129,9 +129,8 @@ $pctSaved = $cost > 0 ? min(100 - $pctPaid, ($saved / $cost) * 100) : 0;
Aucune étape planifiée.
-