.countdown-wrapper {
text-align: center;
font-family: ‘Segoe UI’, Roboto, sans-serif;
max-width: 220px;
margin: 0 auto 1rem;
}
#countdown-title {
font-size: 1.8rem;
margin-bottom: 0.3rem;
color: #333;
}
.countdown-box {
display: flex;
justify-content: center;
}
.countdown-unit {
padding: 0.1rem 0.4rem;
flex: none;
max-width: 200px;
background: transparent;
box-shadow: none;
font-size: 1.6rem;
font-weight: 700;
color: #4c5a59;
}
/* jours et label même style */
#days, .days-label {
color: #4c5a59;
font-size: 1.6rem;
font-weight: 700;
}
const targetDate = new Date(« 2025-06-01T00:00:00Z »); // Change la date ici
const title = document.getElementById(« countdown-title »);
const daysEl = document.getElementById(« days »);
function updateCountdown() {
const now = new Date();
let diff = targetDate – now;
if (diff < 0) {
diff = -diff;
title.textContent = "Parti depuis";
} else {
title.textContent = "Départ dans";
}
const days = Math.floor(diff / (1000 * 60 * 60 * 24));
daysEl.textContent = String(days).padStart(2, '0');
}
updateCountdown();
setInterval(updateCountdown, 60000);