HTML WEB DESIGN

★ PREMIUM Correction Étude de cas 7 : Site web de recherche de résidences meublées (uniquement la page d’accueil)

★ ARTICLE PREMIUM

1. Capture d’ecran de la page 

2. Code source final index html

<!DOCTYPE html>
<html lang="fr" class="scroll-smooth">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>IvoireSéjour | Résidences Meublées & Suites de Prestige</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        brand: {
                            primary: '#0f172a',    // Bleu nuit/Ardoise chic
                            secondary: '#1e293b',  // Variante sombre
                            accent: '#433e93',     // Le magnifique violet demandé
                            accentHover: '#343075',// Violet plus sombre au survol
                            dark: '#020617'
                        }
                    }
                }
            }
        }
    </script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        @import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght=400;600;700;800&display=swap');
        body { font-family: 'Plus Jakarta Sans', sans-serif; }
        
        /* Gestion des Slides du Hero */
        .slider-slide { display: none; }
        .slider-slide.active { display: block; }

        /* Animation Dropdown Desktop */
        @media (min-width: 768px) {
            .dropdown:hover .dropdown-menu { 
                display: block; 
                animation: fadeIn 0.2s ease-out forwards;
            }
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(8px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Accordéon Mobile Sidebar */
        .mobile-submenu {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease-out;
        }
        .mobile-submenu.open {
            max-height: 300px;
        }
    </style>
</head>
<body class="bg-slate-50 text-slate-900">

    <!-- NAVIGATION OPTIMISÉE AVEC LIENS PAGES -->
    <nav class="bg-white sticky top-0 z-[100] border-b border-slate-100 shadow-sm">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="flex justify-between items-center h-20">
                <a href="index.html" class="text-xl font-black tracking-tight flex items-center gap-2">
                    <span class="w-10 h-10 rounded-lg bg-brand-accent text-white flex items-center justify-center shadow-lg shadow-purple-900/30">
                        <i class="fa-solid fa-hotel"></i>
                    </span>
                    <span class="text-brand-primary">Ivoire<span class="text-brand-accent">Séjour</span></span>
                </a>

                <div class="hidden md:flex items-center gap-8 font-bold text-slate-700 text-sm">
                    <a href="index.html" class="hover:text-brand-accent transition">Accueil</a>
                    <!-- Ajout de À Propos -->
                    <a href="a-propos.html" class="hover:text-brand-accent transition">À Propos</a>
                    
                    <div class="relative dropdown">
                        <button class="flex items-center gap-1.5 hover:text-brand-accent transition py-7 outline-none">
                            Nos Résidences <i class="fa-solid fa-chevron-down text-[10px] text-slate-400"></i>
                        </button>
                        <div class="dropdown-menu hidden absolute top-full left-0 w-64 bg-white shadow-xl border border-slate-100 rounded-b-xl overflow-hidden z-50">
                            <a href="index.html#catalogue" class="block px-5 py-3.5 hover:bg-slate-50 hover:text-brand-accent transition border-b border-slate-50">Studios Américains</a>
                            <a href="index.html#catalogue" class="block px-5 py-3.5 hover:bg-slate-50 hover:text-brand-accent transition border-b border-slate-50">Appartements de luxe</a>
                            <a href="index.html#catalogue" class="block px-5 py-3.5 hover:bg-slate-50 hover:text-brand-accent transition">Villas & Penthouses</a>
                        </div>
                    </div>

                    <div class="relative dropdown">
                        <button class="flex items-center gap-1.5 hover:text-brand-accent transition py-7 outline-none">
                            Destinations <i class="fa-solid fa-chevron-down text-[10px] text-slate-400"></i>
                        </button>
                        <div class="dropdown-menu hidden absolute top-full left-0 w-64 bg-white shadow-xl border border-slate-100 rounded-b-xl overflow-hidden z-50">
                            <a href="#" class="block px-5 py-3.5 hover:bg-slate-50 hover:text-brand-accent transition border-b border-slate-50">Cocody (Vallons, Riviera)</a>
                            <a href="#" class="block px-5 py-3.5 hover:bg-slate-50 hover:text-brand-accent transition border-b border-slate-50">Marcory (Zone 4, Biétri)</a>
                            <a href="#" class="block px-5 py-3.5 hover:bg-slate-50 hover:text-brand-accent transition">Assinie-Mafia</a>
                        </div>
                    </div>

                    <a href="index.html#engagements" class="hover:text-brand-accent transition">Services & Garanties</a>
                    
                 
                    <!-- Ajout de Contact (Ici mis en valeur si on est sur la page contact, sinon enlever la classe text-brand-accent) -->
                    <a href="contacts.html" class="hover:text-brand-accent transition">Contact</a>
                </div>

                <div class="flex items-center gap-4">
                    <a href="tel:+22507000000" class="hidden sm:inline-flex bg-brand-accent text-white px-5 py-2.5 rounded-full font-bold text-sm hover:bg-brand-accentHover transition shadow-lg shadow-purple-600/20">
                        <i class="fa-solid fa-phone mr-2"></i> Conciergerie
                    </a>
                    <button onclick="toggleMobileSidebar(true)" class="md:hidden w-11 h-11 flex items-center justify-center bg-slate-50 rounded-xl text-brand-primary text-xl hover:bg-slate-100 transition">
                        <i class="fa-solid fa-bars-staggered"></i>
                    </button>
                </div>
            </div>
        </div>
    </nav>

    <div id="mobile-sidebar-backdrop" onclick="toggleMobileSidebar(false)" class="fixed inset-0 bg-slate-950/40 z-[190] hidden opacity-0 transition-opacity duration-300 backdrop-blur-sm"></div>
    
    <div id="mobile-sidebar" class="fixed top-0 right-0 bottom-0 w-[300px] bg-brand-primary text-white z-[200] translate-x-full transition-transform duration-300 ease-in-out shadow-2xl flex flex-col">
        <div class="p-6 flex justify-between items-center border-b border-slate-800">
            <span class="text-sm font-black tracking-wider uppercase text-purple-400">Menu Navigation</span>
            <button onclick="toggleMobileSidebar(false)" class="w-10 h-10 rounded-xl bg-slate-900 border border-slate-800 flex items-center justify-center text-xl text-slate-400 hover:text-white">
                <i class="fa-solid fa-xmark"></i>
            </button>
        </div>

        <div class="flex-grow overflow-y-auto p-6 space-y-4 font-bold text-base">
            <a href="#" onclick="toggleMobileSidebar(false)" class="block py-2 text-purple-400 hover:text-white transition">Accueil</a>
            
            <div class="space-y-1">
                <button onclick="toggleMobileSubmenu('sub-residences', this)" class="w-full flex justify-between items-center py-2 text-slate-200 hover:text-white transition outline-none">
                    <span>Nos Résidences</span>
                    <i class="fa-solid fa-chevron-down text-xs text-slate-500 transition-transform duration-200"></i>
                </button>
                <div id="sub-residences" class="mobile-submenu bg-slate-900/50 rounded-xl pl-4 space-y-3 font-semibold text-sm text-slate-400">
                    <a href="#catalogue" onclick="toggleMobileSidebar(false)" class="block pt-3 hover:text-white transition">Studios Américains</a>
                    <a href="#catalogue" onclick="toggleMobileSidebar(false)" class="block hover:text-white transition">Appartements de luxe</a>
                    <a href="#catalogue" onclick="toggleMobileSidebar(false)" class="block pb-3 hover:text-white transition">Villas & Penthouses</a>
                </div>
            </div>

            <div class="space-y-1">
                <button onclick="toggleMobileSubmenu('sub-destinations', this)" class="w-full flex justify-between items-center py-2 text-slate-200 hover:text-white transition outline-none">
                    <span>Destinations</span>
                    <i class="fa-solid fa-chevron-down text-xs text-slate-500 transition-transform duration-200"></i>
                </button>
                <div id="sub-destinations" class="mobile-submenu bg-slate-900/50 rounded-xl pl-4 space-y-3 font-semibold text-sm text-slate-400">
                    <a href="#" onclick="toggleMobileSidebar(false)" class="block pt-3 hover:text-white transition">Cocody (II Plateaux, Riviera)</a>
                    <a href="#" onclick="toggleMobileSidebar(false)" class="block hover:text-white transition">Marcory (Zone 4, Biétri)</a>
                    <a href="#" onclick="toggleMobileSidebar(false)" class="block pb-3 hover:text-white transition">Assinie-Mafia</a>
                </div>
            </div>

            <a href="#engagements" onclick="toggleMobileSidebar(false)" class="block py-2 text-slate-200 hover:text-white transition">Services & Garanties</a>
        </div>

        <div class="p-6 border-t border-slate-800 bg-brand-dark/50">
            <a href="tel:+22507000000" class="block w-full bg-brand-accent hover:bg-brand-accentHover text-center py-3.5 rounded-xl text-sm font-bold text-white transition shadow-lg">
                <i class="fa-solid fa-phone mr-2"></i> Contacter un conseiller
            </a>
        </div>
    </div>

    <section class="relative h-[60vh] md:h-[70vh] w-full overflow-hidden bg-brand-dark">
        <div class="slider-slide active absolute inset-0 transition-opacity duration-700">
            <img src="images/1489.jpg" class="w-full h-full object-cover opacity-45" alt="Villa d'exception">
            <div class="absolute inset-0 bg-gradient-to-b from-brand-dark/40 via-brand-dark/70 to-brand-dark/90"></div>
            
            <div class="absolute inset-0 flex items-center justify-center text-center">
                <div class="max-w-7xl mx-auto px-6 sm:px-8 w-full flex flex-col items-center">
                    <div class="max-w-2xl space-y-5">
                        <div>
                            <span class="inline-block bg-brand-accent px-3 py-1.5 rounded-full text-white text-[10px] font-black uppercase tracking-widest">Prestige & Confort</span>
                        </div>
                        <h1 class="text-3xl md:text-5xl font-extrabold text-white leading-[1.2]">
                            Des résidences d'exception <br>entièrement <span class="text-purple-300">meublées.</span>
                        </h1>
                        <p class="text-slate-300 text-sm md:text-base max-w-lg mx-auto font-medium">
                            Réservez des appartements haut de gamme situés dans les plus beaux quartiers d'Abidjan, disponibles instantanément.
                        </p>
                        <div class="pt-2">
                            <a href="#catalogue" class="inline-block bg-brand-accent text-white px-6 py-3 rounded-xl font-bold text-xs uppercase tracking-wider hover:bg-brand-accentHover transition shadow-lg shadow-purple-900/40">
                                Découvrir les offres
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="slider-slide absolute inset-0 transition-opacity duration-700">
            <img src="images/12322.jpg" class="w-full h-full object-cover opacity-45" alt="Resort Assinie">
            <div class="absolute inset-0 bg-gradient-to-b from-brand-dark/40 via-brand-dark/70 to-brand-dark/90"></div>
            
            <div class="absolute inset-0 flex items-center justify-center text-center">
                <div class="max-w-7xl mx-auto px-6 sm:px-8 w-full flex flex-col items-center">
                    <div class="max-w-2xl space-y-5">
                        <div>
                            <span class="inline-block bg-brand-accent px-3 py-1.5 rounded-full text-white text-[10px] font-black uppercase tracking-widest">Évasion Tropicale</span>
                        </div>
                        <h1 class="text-3xl md:text-5xl font-extrabold text-white leading-[1.2]">
                            Évadez-vous dans nos <br><span class="text-purple-300">Villas de Bord de Mer.</span>
                        </h1>
                        <p class="text-slate-300 text-sm md:text-base max-w-lg mx-auto font-medium">
                            Découvrez notre collection unique à Assinie-Mafia, entre lagune et océan, pour des week-ends mémorables.
                        </p>
                        <div class="pt-2">
                            <a href="#catalogue" class="inline-block bg-brand-accent text-white px-6 py-3 rounded-xl font-bold text-xs uppercase tracking-wider hover:bg-brand-accentHover transition shadow-lg shadow-purple-900/40">
                                Explorer Assinie
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <button onclick="changeSlide(-1)" class="absolute left-4 top-1/2 -translate-y-1/2 w-11 h-11 rounded-xl border border-white/10 bg-white/5 backdrop-blur-md text-white flex items-center justify-center hover:bg-brand-accent hover:border-transparent transition z-20">
            <i class="fa-solid fa-arrow-left text-xs"></i>
        </button>
        <button onclick="changeSlide(1)" class="absolute right-4 top-1/2 -translate-y-1/2 w-11 h-11 rounded-xl border border-white/10 bg-white/5 backdrop-blur-md text-white flex items-center justify-center hover:bg-brand-accent hover:border-transparent transition z-20">
            <i class="fa-solid fa-arrow-right text-xs"></i>
        </button>

        <div class="absolute bottom-6 left-1/2 -translate-x-1/2 flex gap-2 z-20">
            <span class="slider-dot w-8 h-1 rounded-full bg-white transition-all duration-300"></span>
            <span class="slider-dot w-8 h-1 rounded-full bg-white/30 transition-all duration-300"></span>
        </div>
    </section>

    <div class="max-w-6xl mx-auto px-4 -mt-12 relative z-30 mb-12">
        <div class="bg-white p-6 rounded-[24px] shadow-2xl border border-slate-100/80">
            <form id="search-form" onsubmit="handleSearch(event)" class="grid grid-cols-1 md:grid-cols-3 gap-4 items-end">
                <div class="space-y-1.5">
                    <label class="text-xs font-black uppercase tracking-wider flex items-center gap-1 text-brand-accent">
                        <i class="fa-solid fa-bed"></i> Type de Logement
                    </label>
                    <select id="search-class" class="w-full bg-slate-50 border border-slate-200 rounded-xl p-3.5 text-sm font-bold outline-none focus:ring-2 focus:ring-brand-accent transition">
                        <option value="all">Tous les types</option>
                        <option value="studio">Studio Américain (1 Pièce)</option>
                        <option value="appartement">Appartement F2 / F3 (2-3 Pièces)</option>
                        <option value="villa">Villa & Penthouse Prestige</option>
                    </select>
                </div>

                <div class="space-y-1.5">
                    <label class="text-xs font-black uppercase tracking-wider flex items-center gap-1 text-brand-accent">
                        <i class="fa-solid fa-location-dot"></i> Commune / Zone
                    </label>
                    <select id="search-zone" class="w-full bg-slate-50 border border-slate-200 rounded-xl p-3.5 text-sm font-bold outline-none focus:ring-2 focus:ring-brand-accent transition">
                        <option value="all">Toutes les zones</option>
                        <option value="cocody">Cocody (Angré / II Plateaux / Riviera)</option>
                        <option value="bietry">Marcory / Biétri / Zone 4</option>
                        <option value="assinie">Assinie-Mafia (Bord de mer)</option>
                    </select>
                </div>

                <button type="submit" class="w-full text-white h-13 py-3.5 rounded-xl text-sm font-bold shadow-xl shadow-purple-900/20 transition flex items-center justify-center gap-2 bg-brand-accent hover:bg-brand-accentHover">
                    <i class="fa-solid fa-magnifying-glass"></i> Rechercher les disponibilités
                </button>
            </form>
        </div>
    </div>

    <section id="catalogue" class="max-w-6xl mx-auto px-4 mb-24 scroll-mt-24">
        <div id="results-heading" class="mb-8 flex justify-between items-center">
            <h3 class="text-lg font-extrabold text-slate-900 flex items-center gap-2">
                <i class="fa-solid fa-building shadow-sm text-brand-accent"></i> Résidences sélectionnées (<span id="results-count">9</span>)
            </h3>
            
            <div class="hidden sm:flex items-center gap-4 bg-white px-4 py-2 rounded-xl border border-slate-100 text-xs font-semibold">
                <span class="flex items-center gap-1.5"><span class="w-2.5 h-2.5 rounded-full bg-emerald-500 block"></span> Libre</span>
                <span class="flex items-center gap-1.5"><span class="w-2.5 h-2.5 rounded-full bg-amber-500 block"></span> Bientôt Libre</span>
                <span class="flex items-center gap-1.5"><span class="w-2.5 h-2.5 rounded-full bg-rose-500 block"></span> Occupé</span>
            </div>
        </div>

        <div id="results-grid" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
            </div>
    </section>

    <!--section id="engagements" class="bg-white py-10 border-t border-b border-slate-100">
        <div class="max-w-5xl mx-auto px-6 text-center space-y-12">
            <div class="space-y-3">
                <h2 class="text-3xl font-extrabold text-slate-900 tracking-tight">Le confort d'un hôtel, l'intimité d'un chez-soi</h2>
                <p class="text-slate-500 text-sm max-w-xl mx-auto">Toutes nos résidences partagent un cahier des charges rigoureux pour assurer un séjour haut de gamme sans surprise.</p>
            </div>
            <div class="grid grid-cols-1 md:grid-cols-3 gap-8 text-left">
                <div class="p-6 bg-slate-50 rounded-2xl space-y-3">
                    <div class="w-12 h-12 rounded-xl bg-purple-100 text-brand-accent flex items-center justify-center text-lg"><i class="fa-solid fa-shield-halved"></i></div>
                    <h4 class="text-base font-bold text-slate-900">Sécurité & Gardiennage</h4>
                    <p class="text-xs text-slate-600 font-medium">Sécurité 24h/24, caméras de surveillance et contrôle des accès pour une tranquillité totale d'esprit.</p>
                </div>
                <div class="p-6 bg-slate-50 rounded-2xl space-y-3">
                    <div class="w-12 h-12 rounded-xl bg-purple-900 text-white flex items-center justify-center text-lg"><i class="fa-solid fa-wifi"></i></div>
                    <h4 class="text-base font-bold text-slate-900">Équipements Premium</h4>
                    <p class="text-xs text-slate-600 font-medium">Fibre optique ultra-rapide, Smart TV (Netflix, Canal+), climatisation totale et cuisine entièrement équipée.</p>
                </div>
                <div class="p-6 bg-slate-50 rounded-2xl space-y-3">
                    <div class="w-12 h-12 rounded-xl bg-emerald-100 text-emerald-700 flex items-center justify-center text-lg"><i class="fa-solid fa-home"></i></div>
                    <h4 class="text-base font-bold text-slate-900">Service de Ménage</h4>
                    <p class="text-xs text-slate-600 font-medium">Entretien régulier inclus, changement des draps et serviettes par un personnel de maison professionnel.</p>
                </div>
            </div>
        </div>
    </section-->

    <footer class="bg-slate-950 text-slate-400 pt-16 pb-8 border-t border-slate-900 font-sans">
        <div class="container mx-auto px-6 grid grid-cols-1 md:grid-cols-3 gap-12 mb-12">
            <div>
                <div class="flex items-center gap-3 mb-5">
                    <span class="text-lg font-black tracking-tight text-white">
                        <i class="fa-solid fa-hotel text-brand-accent mr-2"></i>Ivoire<span class="text-brand-accent">Séjour</span>
                    </span>
                </div>
                <p class="text-xs leading-relaxed text-slate-400 mb-6">
                    Votre partenaire de confiance en ingénierie d'hébergements meublés. Cabinet indépendant de gestion de prestige, nous concevons des séjours sur-mesure pour préserver le confort des professionnels et des particuliers exigeants.
                </p>
                <div class="flex space-x-3">
                    <a href="#" class="w-8 h-8 rounded-xl bg-slate-900 border border-slate-800 flex items-center justify-center text-slate-400 hover:text-white hover:bg-brand-accent transition-colors"><i class="fa-brands fa-facebook-f text-xs"></i></a>
                    <a href="#" class="w-8 h-8 rounded-xl bg-slate-900 border border-slate-800 flex items-center justify-center text-slate-400 hover:text-white hover:bg-brand-accent transition-colors"><i class="fa-brands fa-linkedin-in text-xs"></i></a>
                    <a href="https://wa.me/22507000000" target="_blank" class="w-8 h-8 rounded-xl bg-slate-900 border border-slate-800 flex items-center justify-center text-slate-400 hover:text-white hover:bg-green-600 transition-colors"><i class="fa-brands fa-whatsapp text-xs"></i></a>
                </div>
            </div>

            <div>
                <h4 class="text-sm font-bold text-white uppercase tracking-wider mb-5 border-l-2 border-brand-accent pl-3">
                    Liens Utiles
                </h4>
                <ul class="space-y-3 text-xs">
                    <li><a href="#" class="hover:text-purple-300 transition flex items-center gap-1.5"><i class="fa-solid fa-chevron-right text-[8px] text-purple-400"></i> Accueil</a></li>
                    <li><a href="#catalogue" class="hover:text-purple-300 transition flex items-center gap-1.5"><i class="fa-solid fa-chevron-right text-[8px] text-purple-400"></i> Nos Solutions</a></li>
                    <li><a href="#engagements" class="hover:text-purple-300 transition flex items-center gap-1.5"><i class="fa-solid fa-chevron-right text-[8px] text-purple-400"></i> Le Cabinet</a></li>
                    <li><a href="#" class="hover:text-purple-300 transition flex items-center gap-1.5"><i class="fa-solid fa-chevron-right text-[8px] text-purple-400"></i> Espace Privé</a></li>
                    <li><a href="#" class="hover:text-purple-300 transition flex items-center gap-1.5"><i class="fa-solid fa-chevron-right text-[8px] text-purple-400"></i> Mentions Légales & RGPD</a></li>
                </ul>
            </div>

            <div>
                <h4 class="text-sm font-bold text-white uppercase tracking-wider mb-5 border-l-2 border-brand-accent pl-3">
                    Nos Bureaux
                </h4>
                <ul class="space-y-4 text-xs">
                    <li class="flex items-start gap-3">
                        <i class="fa-solid fa-location-dot mt-0.5 text-purple-400 text-sm"></i>
                        <span>
                            <strong class="text-slate-300 block">Siège Social :</strong>
                            15 Avenue des Élite - Quartier d'Affaires<br>
                            Cocody, Abidjan, Côte d'Ivoire
                        </span>
                    </li>
                    <li class="flex items-start gap-3">
                        <i class="fa-solid fa-envelope mt-0.5 text-purple-400 text-xs"></i>
                        <span>
                            <strong class="text-slate-300 block">Adresse Email & Support :</strong>
                            contact@ivoiresejour.com<br>
                            <span class="text-slate-500">reservations@ivoiresejour.com</span>
                        </span>
                    </li>
                    <li class="flex items-start gap-3">
                        <i class="fa-solid fa-phone mt-0.5 text-purple-400 text-xs"></i>
                        <span>
                            <strong class="text-slate-300 block">Lignes Directes :</strong>
                            +225 07 00 00 00 00<br>
                            +225 27 00 00 00 01
                        </span>
                    </li>
                </ul>
            </div>
        </div>

        <div class="border-t border-slate-900 pt-6 mt-6 text-xs text-slate-500">
            <div class="container mx-auto px-6 flex flex-col sm:flex-row justify-between items-center gap-4">
                <p>&copy; 2026 Ivoireséjour. Tous droits réservés. Gestion immobilière certifiée.</p>
                <div class="text-slate-500 font-medium flex items-center gap-1">
                    Fait avec <i class="fa-solid fa-heart text-red-500 mx-0.5 animate-pulse"></i> par <span class="text-white font-bold hover:text-purple-400 transition-colors duration-200">Coach Lewi</span>
                </div>
            </div>
        </div>
    </footer>

    <script>
        // --- GESTION DU HERO SLIDER ---
        let currentSlide = 0;
        const slides = document.querySelectorAll('.slider-slide');
        const dots = document.querySelectorAll('.slider-dot');

        function showSlide(index) {
            slides.forEach(s => s.classList.remove('active'));
            dots.forEach(d => d.classList.replace('bg-white', 'bg-white/30'));
            
            if (index >= slides.length) currentSlide = 0;
            if (index < 0) currentSlide = slides.length - 1;
            
            slides[currentSlide].classList.add('active');
            dots[currentSlide].classList.replace('bg-white/30', 'bg-white');
        }

        function changeSlide(n) {
            currentSlide += n;
            showSlide(currentSlide);
        }

        setInterval(() => changeSlide(1), 7000);

        // --- GESTION SIDEBAR MOBILE ---
        function toggleMobileSidebar(open) {
            const sidebar = document.getElementById('mobile-sidebar');
            const backdrop = document.getElementById('mobile-sidebar-backdrop');
            
            if (open) {
                backdrop.classList.remove('hidden');
                setTimeout(() => backdrop.classList.add('opacity-100'), 10);
                sidebar.classList.remove('translate-x-full');
            } else {
                backdrop.classList.remove('opacity-100');
                sidebar.classList.add('translate-x-full');
                setTimeout(() => backdrop.classList.add('hidden'), 300);
            }
        }

        function toggleMobileSubmenu(id, btn) {
            const submenu = document.getElementById(id);
            const icon = btn.querySelector('.fa-chevron-down');
            submenu.classList.toggle('open');
            icon.classList.toggle('rotate-180');
        }

        // --- DONNÉES DU CATALOGUE ---
        const residenceDatabase = [
            {
                name: "Le Panoramic - Penthouse Chic",
                type: "villa",
                zone: "cocody",
                price: "120 000 F / jour",
                tags: ["Piscine", "Vue Lagune", "3 Chambres"],
                image: "https://images.unsplash.com/photo-1512917774080-9991f1c4c750?auto=format&fit=crop&w=600&q=80",
                address: "Riviera 3, Proche Lycée Français - Cocody",
                stockStatus: "Disponible",
                stockClass: "bg-emerald-500",
                pulseClass: "animate-ping bg-emerald-400",
                rating: "4.9",
                reviews: "48 avis"
            },
            {
                name: "Studio Urban Cozy - Design Épuré",
                type: "studio",
                zone: "bietry",
                price: "45 000 F / jour",
                tags: ["Fibre Optique", "Smart TV", "Sécurisé"],
                image: "https://images.unsplash.com/photo-1522708323590-d24dbb6b0267?auto=format&fit=crop&w=600&q=80",
                address: "Zone 4, Rue du Canal - Marcory",
                stockStatus: "Disponible",
                stockClass: "bg-emerald-500",
                pulseClass: "animate-ping bg-emerald-400",
                rating: "4.8",
                reviews: "92 avis"
            },
            {
                name: "L'Appart Émeraude - Style & Espace",
                type: "appartement",
                zone: "cocody",
                price: "75 000 F / jour",
                tags: ["2 Pièces", "Balcon", "Parking Interne"],
                image: "https://images.unsplash.com/photo-1502672260266-1c1ef2d93688?auto=format&fit=crop&w=600&q=80",
                address: "Deux Plateaux Vallons - Cocody",
                stockStatus: "Libre le 12/06",
                stockClass: "bg-amber-500",
                pulseClass: "bg-transparent",
                rating: "4.7",
                reviews: "31 avis"
            },
            {
                name: "Villa Corail - Pieds dans l'eau",
                type: "villa",
                zone: "assinie",
                price: "250 000 F / jour",
                tags: ["Bord de mer", "Piscine Privée", "Staff inclus"],
                image: "https://images.unsplash.com/photo-1613977257363-707ba9348227?auto=format&fit=crop&w=600&q=80",
                address: "Km 11, Côté Mer - Assinie",
                stockStatus: "Disponible",
                stockClass: "bg-emerald-500",
                pulseClass: "animate-ping bg-emerald-400",
                rating: "5.0",
                reviews: "14 avis"
            },
            {
                name: "L'Alizé - Loft Industriel Meublé",
                type: "appartement",
                zone: "bietry",
                price: "80 000 F / jour",
                tags: ["3 Pièces", "Terrasse", "Groupe Élec"],
                image: "https://images.unsplash.com/photo-1560448204-e02f11c3d0e2?auto=format&fit=crop&w=600&q=80",
                address: "Biétri, Boulevard de Marseille",
                stockStatus: "Occupé",
                stockClass: "bg-rose-500",
                pulseClass: "bg-transparent",
                rating: "4.6",
                reviews: "55 avis"
            },
            {
                name: "Studio Minimalist Sky - Vue Dégagée",
                type: "studio",
                zone: "cocody",
                price: "40 000 F / jour",
                tags: ["Gym accessible", "Machine à laver"],
                image: "https://images.unsplash.com/photo-1505691938895-1758d7feb511?auto=format&fit=crop&w=600&q=80",
                address: "Angré 7ème Tranche - Cocody",
                stockStatus: "Disponible",
                stockClass: "bg-emerald-500",
                pulseClass: "animate-ping bg-emerald-400",
                rating: "4.7",
                reviews: "28 avis"
            },
            {
                name: "Le Palms Resort - Villa Privée",
                type: "villa",
                zone: "assinie",
                price: "300 000 F / jour",
                tags: ["Ponton privé", "Jacuzzi", "Barbecue"],
                image: "https://images.unsplash.com/photo-1540555700478-4be289fbecef?auto=format&fit=crop&w=600&q=80",
                address: "Km 5, Côté Lagune - Assinie",
                stockStatus: "Occupé",
                stockClass: "bg-rose-500",
                pulseClass: "bg-transparent",
                rating: "4.9",
                reviews: "19 avis"
            },
            {
                name: "Appartement Riviera Confort",
                type: "appartement",
                zone: "cocody",
                price: "65 000 F / jour",
                tags: ["Séjour Lumineux", "Cuisine Américaine"],
                image: "images/1489.jpg",
                address: "Riviera Palmeraie - Cocody",
                stockStatus: "Disponible",
                stockClass: "bg-emerald-500",
                pulseClass: "animate-ping bg-emerald-400",
                rating: "4.5",
                reviews: "42 avis"
            },
            {
                name: "Suite Exécutive Zone 4",
                type: "studio",
                zone: "bietry",
                price: "55 000 F / jour",
                tags: ["Idéal Affaires", "Concierge dédié"],
                image: "https://images.unsplash.com/photo-1598928506311-c55ded91a20c?auto=format&fit=crop&w=600&q=80",
                address: "Marcory Zone 4, Rue Pierre et Marie Curie",
                stockStatus: "Libre le 15/06",
                stockClass: "bg-amber-500",
                pulseClass: "bg-transparent",
                rating: "4.8",
                reviews: "60 avis"
            }
        ];

        function renderResidences(data) {
            const grid = document.getElementById('results-grid');
            const countSpan = document.getElementById('results-count');
            
            grid.innerHTML = "";
            countSpan.innerText = data.length;

            if(data.length === 0) {
                grid.innerHTML = `<div class="col-span-full text-center py-12 bg-white rounded-2xl border border-slate-100 text-sm font-bold text-slate-500">Aucune résidence ne correspond à vos critères de recherche actuels.</div>`;
                return;
            }

            data.forEach(item => {
                const card = document.createElement('div');
                card.className = "bg-white rounded-2xl overflow-hidden border border-slate-100 shadow-md hover:shadow-xl transition-all duration-300 flex flex-col group";
                const badgesHtml = item.tags.map(t => `<span class="bg-slate-100 text-slate-800 text-[10px] font-bold px-2 py-1 rounded-md">${t}</span>`).join('');

                card.innerHTML = `
                    <div class="relative h-56 w-full bg-slate-200 overflow-hidden">
                        <img src="${item.image}" class="w-full h-full object-cover transition-transform duration-500 group-hover:scale-105" alt="${item.name}">
                        <div class="absolute inset-0 bg-gradient-to-t from-slate-900/60 via-transparent to-transparent"></div>
                        
                        <div class="absolute top-4 right-4 flex items-center gap-2 bg-slate-900/80 backdrop-blur-md px-3 py-1.5 rounded-full shadow-lg border border-white/10">
                            <span class="relative flex h-2.5 w-2.5">
                                <span class="${item.pulseClass} absolute inline-flex h-full w-full rounded-full opacity-75"></span>
                                <span class="relative inline-flex rounded-full h-2.5 w-2.5 ${item.stockClass}"></span>
                            </span>
                            <span class="text-white text-[11px] font-bold tracking-wide uppercase">${item.stockStatus}</span>
                        </div>
                        
                        <div class="absolute bottom-3 left-4 flex items-center gap-1 bg-white/90 backdrop-blur-sm px-2 py-1 rounded-lg text-xs font-bold text-slate-900">
                            <i class="fa-solid fa-star text-amber-500"></i> ${item.rating} <span class="text-slate-400 font-normal">(${item.reviews})</span>
                        </div>
                    </div>

                    <div class="p-5 flex flex-col flex-grow justify-between space-y-4">
                        <div class="space-y-2">
                            <h4 class="text-base font-extrabold text-slate-900 group-hover:text-brand-accent transition-colors">${item.name}</h4>
                            <p class="text-base font-black text-brand-accent">${item.price}</p>
                            <div class="flex flex-wrap gap-1.5 pt-1">${badgesHtml}</div>
                            <div class="pt-2 space-y-1.5 text-xs text-slate-500 font-medium">
                                <p class="flex items-start gap-2"><i class="fa-solid fa-location-dot mt-0.5 text-slate-400"></i> <span>${item.address}</span></p>
                            </div>
                        </div>

                        <div class="grid grid-cols-2 gap-2 pt-3 border-t border-slate-100">
                            <button class="bg-slate-50 text-slate-800 hover:bg-slate-100 py-3 rounded-xl text-xs font-black text-center transition flex items-center justify-center gap-1.5">
                                <i class="fa-solid fa-images"></i> Photos
                            </button>
                            <button class="text-white py-3 rounded-xl text-xs font-black text-center transition flex items-center justify-center gap-1.5 shadow-md ${item.stockClass === 'bg-rose-500' ? 'opacity-50 cursor-not-allowed bg-slate-400' : 'bg-brand-accent hover:bg-brand-accentHover'}" ${item.stockClass === 'bg-rose-500' ? 'disabled' : ''}>
                                <i class="fa-solid fa-calendar-check"></i> ${item.stockClass === 'bg-rose-500' ? 'Occupé' : 'Réserver'}
                            </button>
                        </div>
                    </div>
                `;
                grid.appendChild(card);
            });
        }

        function handleSearch(event) {
            event.preventDefault();
            const selectedType = document.getElementById('search-class').value;
            const selectedZone = document.getElementById('search-zone').value;
            
            const filtered = residenceDatabase.filter(item => {
                const matchType = (selectedType === 'all' || item.type === selectedType);
                const matchZone = (selectedZone === 'all' || item.zone === selectedZone);
                return matchType && matchZone;
            });
            renderResidences(filtered);
        }

        window.addEventListener('DOMContentLoaded', () => {
            renderResidences(residenceDatabase);
        });
    </script>
</body>
</html>

 

🔒
CONTENU RÉSERVÉ A MES APPRENANTS

Accédez à la suite de ce TP

La suite de ce TP ainsi que les contenus Premium sont accessibles exclusivement à mes étudiants.

⭐
PAS ENCORE INSCRIT ?

Rejoignez-nous

+225 01 61 01 71 96
💬 Je m'inscris
🎁
AVANTAGES POUR LES APPRENANTS

Tout ce que vous obtenez

L'offre est conçue pour vous permettre d'apprendre, de pratiquer et de progresser en informatique grâce à des ressources concrètes et accessibles.

🎓
Suivi et accompagnement Vous êtes ajouté au groupe WhatsApp Premium de mes apprenants et bénéficiez d'un accompagnement, d'un suivi et d'une assistance tout au long de votre apprentissage.
💻
Accès illimité aux codes sources Téléchargez librement les codes sources disponibles dans l'espace Premium pendant toute la durée de validité de votre abonnement.
📚
Formations & ressources variées Accédez à des tutoriels écrits de qualité, vidéos, PDF et échangez directement avec moi et les autres apprenants via le groupe WhatsApp Premium.
🧑‍💻
Plus de 10 ans d'expérience Profitez de connaissances, de méthodes et de conseils issus de plus de 10 années d'expérience dans le domaine informatique.
📅
1 mois d'accès Votre inscription est valable pendant un mois à compter de la date à laquelle vous effectuez le paiement.
🔄
Renouvellement libre À l'expiration, vous êtes libre de le renouveler ou de ne pas le renouveler. Aucun engagement obligatoire.
ESPACE PREMIUM

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *