document.addEventListener('DOMContentLoaded', function() { // Simulate calculation const calculateBtn = document.querySelector('button'); if(calculateBtn) { calculateBtn.addEventListener('click', function() { // Generate random price between 300 and 1200 // Convert to Tunisian Dinar (TND) with realistic range const randomPrice = Math.floor(Math.random() * (4000 - 1000 + 1)) + 1000; // Create result element const resultDiv = document.createElement('div'); resultDiv.className = 'mt-6 p-4 bg-blue-50 rounded-lg border border-blue-200'; resultDiv.innerHTML = `
Votre tarif estimé est de :
${randomPrice}€/an
Ce tarif est une estimation et peut varier selon votre profil.
`; // Insert after the form const formSection = document.querySelector('section'); formSection.appendChild(resultDiv); // Refresh icons feather.replace(); }); } });