Compte à Rebours - Événement Spécial

🏷️ Extraits & Composants HTML 📅 06/04/2026 09:00:00 👤 Mezgani Said
Bootstrap 5 Counter Countdown Coming Soon Javascript Timer

Composant de compte à rebours animé avec jours, heures, minutes et secondes. Idéal pour les lancements de produits, événements ou promotions.

<!DOCTYPE html>
<html lang="fr">
<head>
    <meta charset="UTF-8" />
    <meta name="copyright" content="MEZGANI Said" />
    <meta name="author" content="AngularForAll" />
    <meta name="robots" content="noindex, nofollow" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Snippet Counter Comming Bootstrap 5 20260421100 | AngularForAll</title>
<!-- Bootstrap 5 CSS -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
    <!-- Bootstrap Icons -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.0/font/bootstrap-icons.css">
    <!-- Google Fonts -->
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
    
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
        body {
            font-family: 'Inter', sans-serif;
            min-height: 100vh;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            position: relative;
            overflow-x: hidden;
        }
        
        /* Animation des particules */
        .particles {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 0;
            overflow: hidden;
        }
        
        .particle {
            position: absolute;
            background: rgba(255,255,255,0.1);
            border-radius: 50%;
            animation: float 20s infinite linear;
        }
        
        @keyframes float {
            0% {
                transform: translateY(100vh) rotate(0deg);
                opacity: 0;
            }
            10% {
                opacity: 0.5;
            }
            90% {
                opacity: 0.5;
            }
            100% {
                transform: translateY(-100vh) rotate(360deg);
                opacity: 0;
            }
        }
        
        /* Contenu principal */
        .main-content {
            position: relative;
            z-index: 1;
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .coming-soon-card {
            background: rgba(255,255,255,0.95);
            backdrop-filter: blur(10px);
            border-radius: 30px;
            padding: 50px 40px;
            box-shadow: 0 30px 60px rgba(0,0,0,0.3);
            text-align: center;
            max-width: 800px;
            margin: 20px;
            transition: transform 0.3s ease;
        }
        
        .coming-soon-card:hover {
            transform: translateY(-5px);
        }
        
        /* Logo */
        .app-logo {
            width: 100px;
            height: 100px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 25px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 25px;
            box-shadow: 0 15px 30px rgba(102,126,234,0.3);
            animation: pulse 2s infinite;
        }
        
        @keyframes pulse {
            0%, 100% {
                transform: scale(1);
                box-shadow: 0 15px 30px rgba(102,126,234,0.3);
            }
            50% {
                transform: scale(1.05);
                box-shadow: 0 20px 40px rgba(102,126,234,0.5);
            }
        }
        
        .app-logo i {
            font-size: 50px;
            color: white;
        }
        
        /* Titre */
        .app-title {
            font-size: 48px;
            font-weight: 800;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 15px;
        }
        
        .coming-soon {
            font-size: 18px;
            color: #666;
            margin-bottom: 30px;
        }
        
        /* Compteur */
        .countdown-container {
            margin: 40px 0;
        }
        
        .countdown-item {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 20px;
            padding: 20px 15px;
            color: white;
            text-align: center;
            transition: all 0.3s ease;
        }
        
        .countdown-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0,0,0,0.2);
        }
        
        .countdown-number {
            font-size: 48px;
            font-weight: 800;
            line-height: 1;
            margin-bottom: 10px;
        }
        
        .countdown-label {
            font-size: 14px;
            text-transform: uppercase;
            letter-spacing: 2px;
            opacity: 0.9;
        }
        
        /* Newsletter */
        .newsletter {
            margin: 30px 0;
        }
        
        .newsletter-title {
            font-size: 20px;
            font-weight: 600;
            margin-bottom: 15px;
            color: #333;
        }
        
        .input-group-custom {
            display: flex;
            gap: 10px;
            max-width: 450px;
            margin: 0 auto;
        }
        
        .input-group-custom input {
            flex: 1;
            padding: 15px 20px;
            border: 2px solid #e0e0e0;
            border-radius: 50px;
            font-size: 16px;
            transition: all 0.3s ease;
        }
        
        .input-group-custom input:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
        }
        
        .btn-notify {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border: none;
            padding: 15px 30px;
            border-radius: 50px;
            font-weight: 600;
            color: white;
            transition: all 0.3s ease;
        }
        
        .btn-notify:hover {
            transform: scale(1.05);
            box-shadow: 0 10px 20px rgba(102,126,234,0.4);
        }
        
        /* Boutons stores */
        .store-buttons {
            display: flex;
            gap: 15px;
            justify-content: center;
            margin: 30px 0;
            flex-wrap: wrap;
        }
        
        .store-btn {
            display: flex;
            align-items: center;
            gap: 10px;
            background: #1a1a2e;
            color: white;
            padding: 12px 25px;
            border-radius: 15px;
            text-decoration: none;
            transition: all 0.3s ease;
        }
        
        .store-btn:hover {
            transform: translateY(-3px);
            background: #16213e;
            color: white;
        }
        
        .store-btn i {
            font-size: 30px;
        }
        
        .store-btn-text small {
            font-size: 12px;
            opacity: 0.8;
        }
        
        .store-btn-text span {
            font-size: 18px;
            font-weight: 600;
        }
        
        /* Réseaux sociaux */
        .social-links {
            display: flex;
            gap: 15px;
            justify-content: center;
            margin-top: 30px;
        }
        
        .social-link {
            width: 45px;
            height: 45px;
            background: #f0f0f0;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #667eea;
            font-size: 20px;
            transition: all 0.3s ease;
            text-decoration: none;
        }
        
        .social-link:hover {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            transform: translateY(-3px);
        }
        
        /* Progress bar */
        .progress-container {
            margin: 20px 0;
        }
        
        .progress-text {
            font-size: 14px;
            color: #666;
            margin-bottom: 10px;
        }
        
        .progress {
            height: 8px;
            border-radius: 10px;
            background: #e0e0e0;
        }
        
        .progress-bar {
            background: linear-gradient(90deg, #667eea, #764ba2);
            border-radius: 10px;
            transition: width 1s ease;
        }
        
        /* Animation de fondu */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .fade-in {
            animation: fadeInUp 0.6s ease forwards;
        }
        
        /* Responsive */
        @media (max-width: 768px) {
            .coming-soon-card {
                padding: 30px 20px;
            }
            .app-title {
                font-size: 32px;
            }
            .countdown-number {
                font-size: 28px;
            }
            .countdown-item {
                padding: 15px 10px;
            }
            .input-group-custom {
                flex-direction: column;
            }
            .input-group-custom input {
                border-radius: 50px;
            }
            .btn-notify {
                border-radius: 50px;
            }
        }
        
        @media (max-width: 576px) {
            .countdown-number {
                font-size: 22px;
            }
            .countdown-label {
                font-size: 10px;
            }
            .store-btn {
                padding: 8px 15px;
            }
            .store-btn i {
                font-size: 24px;
            }
            .store-btn-text span {
                font-size: 14px;
            }
        }
        
        /* Modal notification */
        .modal-success {
            position: fixed;
            top: 20px;
            right: 20px;
            background: #4caf50;
            color: white;
            padding: 15px 25px;
            border-radius: 10px;
            z-index: 2000;
            transform: translateX(400px);
            transition: transform 0.3s ease;
        }
        
        .modal-success.show {
            transform: translateX(0);
        }
    </style>
</head>
<body>
    
    <!-- Particules animées -->
    <div class="particles" id="particles"></div>
    
    <!-- Contenu principal -->
    <div class="main-content">
        <div class="coming-soon-card fade-in">
            
            <!-- Logo -->
            <div class="app-logo">
                <i class="bi bi-phone-fill"></i>
            </div>
            
            <!-- Titre -->
            <h1 class="app-title">AppName</h1>
            <p class="coming-soon">La nouvelle façon de vivre votre quotidien</p>
            
            <!-- Compte à rebours -->
            <div class="countdown-container">
                <div class="row g-3">
                    <div class="col-6 col-md-3">
                        <div class="countdown-item">
                            <div class="countdown-number" id="days">00</div>
                            <div class="countdown-label">Jours</div>
                        </div>
                    </div>
                    <div class="col-6 col-md-3">
                        <div class="countdown-item">
                            <div class="countdown-number" id="hours">00</div>
                            <div class="countdown-label">Heures</div>
                        </div>
                    </div>
                    <div class="col-6 col-md-3">
                        <div class="countdown-item">
                            <div class="countdown-number" id="minutes">00</div>
                            <div class="countdown-label">Minutes</div>
                        </div>
                    </div>
                    <div class="col-6 col-md-3">
                        <div class="countdown-item">
                            <div class="countdown-number" id="seconds">00</div>
                            <div class="countdown-label">Secondes</div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Barre de progression -->
            <div class="progress-container">
                <div class="progress-text">
                    <i class="bi bi-check-circle-fill text-success"></i> Lancement imminent
                </div>
                <div class="progress">
                    <div class="progress-bar" id="progressBar" style="width: 0%"></div>
                </div>
            </div>
            
            <!-- Newsletter -->
            <div class="newsletter">
                <div class="newsletter-title">
                    <i class="bi bi-envelope"></i> Soyez le premier informé !
                </div>
                <div class="input-group-custom">
                    <input type="email" id="emailInput" placeholder="Votre adresse email" required>
                    <button id="notifyBtn" class="btn-notify">
                        <i class="bi bi-bell-fill"></i> M'avertir
                    </button>
                </div>
            </div>
            
            <!-- Boutons stores -->
            <div class="store-buttons">
                <a href="#" class="store-btn">
                    <i class="bi bi-apple"></i>
                    <div class="store-btn-text">
                        <small>Télécharger sur</small>
                        <div>App Store</div>
                    </div>
                </a>
                <a href="#" class="store-btn">
                    <i class="bi bi-google-play"></i>
                    <div class="store-btn-text">
                        <small>Disponible sur</small>
                        <div>Google Play</div>
                    </div>
                </a>
            </div>
            
            <!-- Réseaux sociaux -->
            <div class="social-links">
                <a href="#" class="social-link"><i class="bi bi-facebook"></i></a>
                <a href="#" class="social-link"><i class="bi bi-twitter-x"></i></a>
                <a href="#" class="social-link"><i class="bi bi-instagram"></i></a>
                <a href="#" class="social-link"><i class="bi bi-linkedin"></i></a>
                <a href="#" class="social-link"><i class="bi bi-discord"></i></a>
            </div>
            
            <!-- Copyright -->
            <div class="mt-4">
                <small class="text-muted">© 2024 AppName - Tous droits réservés</small>
            </div>
        </div>
    </div>
    
    <!-- Notification toast -->
    <div id="notificationToast" class="modal-success">
        <i class="bi bi-check-circle-fill"></i> Merci ! Vous serez averti du lancement.
    </div>
    
    <script>
        // Date de lancement (ajustez selon vos besoins)
        // Exemple : 30 jours à partir de maintenant
        const launchDate = new Date();
        launchDate.setDate(launchDate.getDate() + 30);
        launchDate.setHours(0, 0, 0, 0);
        
        // Ou définissez une date spécifique :
        // const launchDate = new Date(2025, 0, 15, 0, 0, 0); // 15 Janvier 2025
        
        // Éléments du compte à rebours
        const daysElement = document.getElementById('days');
        const hoursElement = document.getElementById('hours');
        const minutesElement = document.getElementById('minutes');
        const secondsElement = document.getElementById('seconds');
        const progressBar = document.getElementById('progressBar');
        
        // Calcul du temps total initial (en secondes)
        const totalTime = (launchDate.getTime() - Date.now()) / 1000;
        
        // Mettre à jour le compte à rebours
        function updateCountdown() {
            const now = new Date().getTime();
            const distance = launchDate.getTime() - now;
            
            if (distance < 0) {
                // Lancement dépassé
                daysElement.textContent = '00';
                hoursElement.textContent = '00';
                minutesElement.textContent = '00';
                secondsElement.textContent = '00';
                progressBar.style.width = '100%';
                document.querySelector('.progress-text').innerHTML = '<i class="bi bi-rocket-takeoff-fill text-success"></i> L\'application est disponible !';
                return;
            }
            
            // Calculs
            const days = Math.floor(distance / (1000 * 60 * 60 * 24));
            const hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
            const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
            const seconds = Math.floor((distance % (1000 * 60)) / 1000);
            
            // Affichage (toujours 2 chiffres)
            daysElement.textContent = days.toString().padStart(2, '0');
            hoursElement.textContent = hours.toString().padStart(2, '0');
            minutesElement.textContent = minutes.toString().padStart(2, '0');
            secondsElement.textContent = seconds.toString().padStart(2, '0');
            
            // Barre de progression
            const elapsed = totalTime - (distance / 1000);
            const percentage = Math.min(100, Math.max(0, (elapsed / totalTime) * 100));
            progressBar.style.width = percentage + '%';
        }
        
        // Mettre à jour toutes les secondes
        setInterval(updateCountdown, 1000);
        updateCountdown();
        
        // Générer des particules
        function createParticles() {
            const particlesContainer = document.getElementById('particles');
            const particleCount = 50;
            
            for (let i = 0; i < particleCount; i++) {
                const particle = document.createElement('div');
                particle.className = 'particle';
                
                // Taille aléatoire
                const size = Math.random() * 8 + 2;
                particle.style.width = size + 'px';
                particle.style.height = size + 'px';
                
                // Position aléatoire
                particle.style.left = Math.random() * 100 + '%';
                
                // Durée d'animation aléatoire
                const duration = Math.random() * 15 + 10;
                particle.style.animationDuration = duration + 's';
                
                // Délai aléatoire
                const delay = Math.random() * 10;
                particle.style.animationDelay = delay + 's';
                
                // Opacité aléatoire
                particle.style.opacity = Math.random() * 0.3 + 0.1;
                
                particlesContainer.appendChild(particle);
            }
        }
        
        createParticles();
        
        // Newsletter
        const notifyBtn = document.getElementById('notifyBtn');
        const emailInput = document.getElementById('emailInput');
        const notificationToast = document.getElementById('notificationToast');
        
        function showNotification(message, isError = false) {
            notificationToast.textContent = message;
            notificationToast.style.background = isError ? '#f44336' : '#4caf50';
            notificationToast.classList.add('show');
            
            setTimeout(() => {
                notificationToast.classList.remove('show');
            }, 3000);
        }
        
        notifyBtn.addEventListener('click', () => {
            const email = emailInput.value.trim();
            const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
            
            if (!email) {
                showNotification('❌ Veuillez entrer votre email', true);
                return;
            }
            
            if (!emailRegex.test(email)) {
                showNotification('❌ Email invalide', true);
                return;
            }
            
            // Sauvegarder l'email dans localStorage
            let subscribers = JSON.parse(localStorage.getItem('appSubscribers')) || [];
            if (!subscribers.includes(email)) {
                subscribers.push(email);
                localStorage.setItem('appSubscribers', JSON.stringify(subscribers));
                showNotification('✅ Merci ! Vous recevrez une notification au lancement');
                emailInput.value = '';
            } else {
                showNotification('ℹ️ Vous êtes déjà inscrit !');
            }
        });
        
        // Animation au scroll
        const observerOptions = {
            threshold: 0.1,
            rootMargin: '0px'
        };
        
        const observer = new IntersectionObserver((entries) => {
            entries.forEach(entry => {
                if (entry.isIntersecting) {
                    entry.target.style.opacity = '1';
                    entry.target.style.transform = 'translateY(0)';
                }
            });
        }, observerOptions);
        
        document.querySelectorAll('.countdown-item, .store-btn, .social-link').forEach(el => {
            el.style.opacity = '0';
            el.style.transform = 'translateY(20px)';
            el.style.transition = 'all 0.6s ease';
            observer.observe(el);
        });
        
        // Afficher les éléments progressivement
        setTimeout(() => {
            document.querySelectorAll('.countdown-item, .store-btn, .social-link').forEach(el => {
                el.style.opacity = '1';
                el.style.transform = 'translateY(0)';
            });
        }, 200);
        
        // Effet de survol sur le logo
        const logo = document.querySelector('.app-logo');
        logo.addEventListener('mouseenter', () => {
            logo.style.transform = 'scale(1.1) rotate(5deg)';
        });
        logo.addEventListener('mouseleave', () => {
            logo.style.transform = 'scale(1) rotate(0deg)';
        });
        
        console.log('Page de lancement prête ! Date cible :', launchDate.toLocaleDateString());
    </script>
    
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

Ouvrir cet aperçu dans un nouvel onglet du navigateur

🔗 Ouvrir dans le navigateur