Spaces:
Running
Running
undefined - Follow Up Deployment
Browse files87 unmodified lines88899091929394110 unmodified lines20520620720820921021121221321447 unmodified lines26226326426526626726826927027127227327427540 unmodified lines31631731831932032132242 unmodified lines36536636736836937037179 unmodified lines4514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535546 unmodified lines56156256356456556656792 unmodified lines66066166266366466566632 unmodified lines6997007017027037047055 unmodified lines71171271371471571671797 unmodified lines81581681781881982082170 unmodified lines89289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095187 unmodified lines'400': '#fbbf24','500': '#f59e0b','600': '#d97706','700': '#b45309','800': '#92400e','900': '#78350f',},110 unmodified lines.senoufo { background-color: #D1FAE5; color: #065F46; }.yacouba { background-color: #DBEAFE; color: #1E40AF; }.akan { background-color: #FCE7F3; color: #9D174D; }</style></head><body class="font-sans bg-white text-gray-900 overflow-x-hidden"><!-- Navigation (updated) --><nav class="bg-white shadow-md sticky top-0 z-50 border-b border-gray-100"><div class="container mx-auto px-4 py-3 flex justify-between items-center"><div class="flex items-center space-x-3">47 unmodified lines<a href="#menu" class="block py-3 px-4 text-gray-700 hover:bg-primary-50 hover:text-primary-600 rounded-lg transition">Menu</a><a href="#story" class="block py-3 px-4 text-gray-700 hover:bg-primary-50 hover:text-primary-600 rounded-lg transition">Notre Histoire</a><a href="#contact" class="block py-3 px-4 text-gray-700 hover:bg-primary-50 hover:text-primary-600 rounded-lg transition">Contact</a><button class="mt-2 bg-gradient-to-r from-accent-500 to-accent-400 text-primary-900 font-medium py-3 rounded-lg hover:shadow-lg transition-all flex items-center justify-center hover:animate-pulse" id="reservation-btn-mobile"><i class="fas fa-calendar-alt mr-2"></i> Réserver</button></div></div></nav><!-- Hero Section (updated) --><header id="home" class="relative overflow-hidden h-screen max-h-[900px]"><!-- Floating food images --><img src="https://images.unsplash.com/photo-1603105037880-88090c06fdbd?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&h=150&q=80"40 unmodified lines</div></header><!-- Food Gallery Section (new) --><section id="gallery" class="py-16 bg-white"><div class="container mx-auto px-4"><div class="text-center mb-12">42 unmodified lines</div></section><!-- Our Story Section (new) --><section id="story" class="py-16 bg-gray-50"><div class="container mx-auto px-4"><div class="flex flex-col lg:flex-row items-center gap-12">79 unmodified lines</div><!-- Menu items --><div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8"><!-- Dish 1 - Baoulé --><div class="bg-white rounded-2xl overflow-hidden shadow-lg transition-all duration-300 menu-item hover:shadow-xl" data-category="baoule"><div class="relative h-64 overflow-hidden dish-image-container"><img src="https://images.unsplash.com/photo-1603105037880-88090c06fdbd?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80"alt="Riz sauce graine" class="w-full h-full object-cover dish-image"><div class="absolute top-4 right-4 dish-badge bg-accent-500 text-primary-900 font-medium px-4 py-2"><span>Spécialité</span></div><span class="origin-badge baoule">Baoulé</span></div><div class="p-6"><div class="flex justify-between items-start mb-3"><h3 class="text-xl font-bold text-primary-900">Riz sauce graine <span class="dish-spicy"></span></h3><span class="text-xl font-bold text-primary-600">2,500F</span></div><p class="text-gray-600 mb-6">Riz parfumé accompagné de notre fameuse sauce graine préparée avec des noix de palme fraîches et une viande braisée à la perfection.</p><div class="flex items-center justify-between"><div class="flex items-center text-accent-400"><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star-half-alt"></i><span class="text-gray-500 text-sm ml-2">(28)</span></div><button class="add-to-cart bg-gradient-to-r from-primary-600 to-primary-700 hover:shadow-lg text-white py-2 px-4 rounded-full transition-all duration-300 flex items-center hover:scale-105"data-name="Riz sauce graine" data-price="2500"><i class="fas fa-plus mr-1"></i> Ajouter</button></div></div></div><!-- Dish 2 - Sénoufo --><div class="bg-white rounded-2xl overflow-hidden shadow-lg transition-all duration-300 menu-item hover:shadow-xl" data-category="senoufo"><div class="relative h-64 overflow-hidden dish-image-container"><img src="https://images.unsplash.com/photo-1555938164-8f93f8f6d344?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80"alt="Foutou banane" class="w-full h-full object-cover dish-image"><div class="absolute top-4 right-4 dish-badge bg-primary-600 text-white font-medium px-4 py-2"><span>Meilleure vente</span></div><span class="origin-badge senoufo">Sénoufo</span></div><div class="p-6"><div class="flex justify-between items-start mb-3"><h3 class="text-xl font-bold text-primary-900">Foutou banane + sauce</h3><span class="text-xl font-bold text-primary-600">3,000F</span></div><p class="text-gray-600 mb-6">Foutou préparé avec de la banane plantain mûre, accompagné de sauce graine ou sauce claire avec viande au choix.</p><div class="flex items-center justify-between"><div class="flex items-center text-accent-400"><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i><span class="text-gray-500 text-sm ml-2">(42)</span></div><button class="add-to-cart bg-gradient-to-r from-primary-600 to-primary-700 hover:shadow-lg text-white py-2 px-4 rounded-full transition-all duration-300 flex items-center hover:scale-105"data-name="Foutou banane + sauce" data-price="3000"><i class="fas fa-plus mr-1"></i> Ajouter</button></div></div></div><!-- Dish 3 - Akan --><div class="bg-white rounded-2xl overflow-hidden shadow-lg transition-all duration-300 menu-item hover:shadow-xl" data-category="akan"><div class="relative h-64 overflow-hidden dish-image-container"><img src="https://images.unsplash.com/photo-1604329760661-e71dc83f8f26?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80"alt="Riz gras au poulet" class="w-full h-full object-cover dish-image"><div class="absolute top-4 right-4 dish-badge bg-primary-100 text-primary-900 font-medium px-4 py-2"><span>Populaire</span></div><span class="origin-badge akan">Akan</span></div><div class="p-6"><div class="flex justify-between items-start mb-3"><h3 class="text-xl font-bold text-primary-900">Riz gras au poulet <span class="dish-spicy"></span></h3><span class="text-xl font-bold text-primary-600">2,800F</span></div><p class="text-gray-600 mb-6">Riz préparé avec une sauce riche en légumes et épices, accompagné de poulet bien assaisonné et doré à la perfection.</p><div class="flex items-center justify-between"><div class="flex items-center text-accent-400"><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="far fa-star"></i><span class="text-gray-500 text-sm ml-2">(35)</span></div><button class="add-to-cart bg-gradient-to-r from-primary-600 to-primary-700 hover:shadow-lg text-white py-2 px-4 rounded-full transition-all duration-300 flex items-center hover:scale-105"data-name="Riz gras au poulet" data-price="2800"><i class="fas fa-plus mr-1"></i> Ajouter</button></div></div></div></div>6 unmodified lines</div></section><!-- Loyalty Program Section (new) --><section class="py-16 bg-gradient-to-r from-primary-700 to-primary-600 text-white"><div class="container mx-auto px-4"><div class="flex flex-col lg:flex-row items-center gap-12">92 unmodified lines</div></section><!-- Testimonials Section (updated) --><section id="testimonials" class="py-16 bg-gray-50"><div class="container mx-auto px-4"><div class="text-center mb-16">32 unmodified lines</div></div><!-- More testimonials... --></div><div class="text-center mt-12">5 unmodified lines</div></section><!-- Contact Section (updated) --><section id="contact" class="py-16 bg-white"><div class="container mx-auto px-4"><div class="text-center mb-16">97 unmodified lines<i class="fab fa-whatsapp"></i></a><!-- Footer (updated) --><footer class="bg-primary-900 text-primary-100 pt-12 pb-8"><div class="container mx-auto px-4"><div class="grid grid-cols-1 md:grid-cols-4 gap-12 mb-12">70 unmodified lines</div></footer><!-- All existing scripts... --><!-- New scripts for enhanced features --><script>// Initialize Splide gallerydocument.addEventListener( 'DOMContentLoaded', function() {new Splide( '.splide', {type : 'loop',perPage : 1,perMove : 1,gap : '1rem',autoplay : true,interval : 5000,pauseOnHover: true,breakpoints: {640: {perPage: 1,}}} ).mount();// Menu filtering by originconst categoryTabs = document.querySelectorAll('.category-tab');const menuItems = document.querySelectorAll('.menu-item');categoryTabs.forEach(tab => {tab.addEventListener('click', function() {// Remove active class from all tabscategoryTabs.forEach(t => t.classList.remove('active'));// Add active class to clicked tabthis.classList.add('active');const category = this.getAttribute('data-category');// Filter menu itemsmenuItems.forEach(item => {if (category === 'all' || item.getAttribute('data-category') === category) {item.style.display = 'block';} else {item.style.display = 'none';}});});});// Reservation buttonconst reservationBtns = document.querySelectorAll('#reservation-btn, #reservation-btn-mobile');reservationBtns.forEach(btn => {btn.addEventListener('click', function() {// In a real implementation, this would open a reservation modalshowToast("Fonctionnalité de réservation bientôt disponible!", true);});});});</script><p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=phpcisseab666cb/netlify" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>87 unmodified lines88899091929394110 unmodified lines20520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243347 unmodified lines48148248348448548648748848949049149249349440 unmodified lines53553653753853954054142 unmodified lines58458558658758858959079 unmodified lines6706716726736746756766776786796806 unmodified lines68768868969069169269392 unmodified lines78678778878979079179232 unmodified lines8258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868875 unmodified lines89389489589689789889997 unmodified lines997998999100010011002100370 unmodified lines107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211587 unmodified lines'400': '#fbbf24','500': '#f59e0b','600': '#d97706','700': '#b45309",'800': '#92400e','900': '#78350f',},110 unmodified lines.senoufo { background-color: #D1FAE5; color: #065F46; }.yacouba { background-color: #DBEAFE; color: #1E40AF; }.akan { background-color: #FCE7F3; color: #9D174D; }/* Modal styles */.modal {display: none;position: fixed;top: 0;left: 0;width: 100%;height: 100%;background-color: rgba(0,0,0,0.7);z-index: 1000;overflow-y: auto;}.modal-content {background-color: white;margin: 5% auto;padding: 2rem;border-radius: 12px;max-width: 600px;width: 90%;box-shadow: 0 10px 25px rgba(0,0,0,0.2);animation: fadeIn 0.3s ease-out;}.modal-header {display: flex;justify-content: space-between;align-items: center;margin-bottom: 1.5rem;padding-bottom: 1rem;border-bottom: 1px solid #e5e7eb;}.modal-title {font-size: 1.5rem;font-weight: 600;color: #1e1b4b;}.close-modal {background: none;border: none;font-size: 1.5rem;cursor: pointer;color: #6b7280;}/* Form styles */.form-group {margin-bottom: 1.5rem;}.form-label {display: block;margin-bottom: 0.5rem;font-weight: 500;color: #374151;}.form-input {width: 100%;padding: 0.75rem;border: 1px solid #d1d5db;border-radius: 0.5rem;font-size: 1rem;transition: border-color 0.3s;}.form-input:focus {outline: none;border-color: #8b5cf6;box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);}/* Payment steps */.payment-steps {display: flex;justify-content: space-between;margin-bottom: 2rem;position: relative;}.payment-steps::before {content: '';position: absolute;top: 15px;left: 0;right: 0;height: 2px;background-color: #e5e7eb;z-index: 1;}.step {display: flex;flex-direction: column;align-items: center;position: relative;z-index: 2;}.step-number {width: 32px;height: 32px;border-radius: 50%;background-color: #e5e7eb;color: #6b7280;display: flex;align-items: center;justify-content: center;font-weight: 600;margin-bottom: 0.5rem;}.step.active .step-number {background-color: #8b5cf6;color: white;}.step.completed .step-number {background-color: #10b981;color: white;}.step-label {font-size: 0.875rem;color: #6b7280;font-weight: 500;}.step.active .step-label {color: #1e1b4b;}/* Toast notification */.toast {position: fixed;bottom: 20px;left: 50%;transform: translateX(-50%);background-color: #1e1b4b;color: white;padding: 12px 24px;border-radius: 8px;box-shadow: 0 4px 12px rgba(0,0,0,0.15);z-index: 1000;display: flex;align-items: center;animation: fadeIn 0.3s ease-out;}.toast.success {background-color: #10b981;}.toast.error {background-color: #ef4444;}.toast-icon {margin-right: 8px;}/* Loading spinner */.spinner {width: 24px;height: 24px;border: 3px solid rgba(255,255,255,0.3);border-radius: 50%;border-top-color: white;animation: spin 1s ease-in-out infinite;}@keyframes spin {to { transform: rotate(360deg); }}/* Cart styles */.cart-item {display: flex;justify-content: space-between;align-items: center;padding: 1rem 0;border-bottom: 1px solid #e5e7eb;}.cart-item:last-child {border-bottom: none;}.cart-item-name {font-weight: 500;}.cart-item-price {font-weight: 600;color: #1e1b4b;}.cart-item-actions {display: flex;align-items: center;}.cart-item-quantity {margin: 0 0.5rem;font-weight: 500;}.cart-total {display: flex;justify-content: space-between;margin-top: 1rem;padding-top: 1rem;border-top: 2px solid #e5e7eb;font-weight: 600;font-size: 1.125rem;}</style></head><body class="font-sans bg-white text-gray-900 overflow-x-hidden"><!-- Navigation --><nav class="bg-white shadow-md sticky top-0 z-50 border-b border-gray-100"><div class="container mx-auto px-4 py-3 flex justify-between items-center"><div class="flex items-center space-x-3">47 unmodified lines<a href="#menu" class="block py-3 px-4 text-gray-700 hover:bg-primary-50 hover:text-primary-600 rounded-lg transition">Menu</a><a href="#story" class="block py-3 px-4 text-gray-700 hover:bg-primary-50 hover:text-primary-600 rounded-lg transition">Notre Histoire</a><a href="#contact" class="block py-3 px-4 text-gray-700 hover:bg-primary-50 hover:text-primary-600 rounded-lg transition">Contact</a><button class="mt-2 bg-gradient-to-r from-accent-500 to-accent-400 text-primary-900 font-medium py-3 rounded-lg hover:shadow-lg transition-all duration-300 flex items-center justify-center hover:animate-pulse" id="reservation-btn-mobile"><i class="fas fa-calendar-alt mr-2"></i> Réserver</button></div></div></nav><!-- Hero Section --><header id="home" class="relative overflow-hidden h-screen max-h-[900px]"><!-- Floating food images --><img src="https://images.unsplash.com/photo-1603105037880-88090c06fdbd?ixlib=rb-4.0.3&auto=format&fit=crop&w=150&h=150&q=80"40 unmodified lines</div></header><!-- Food Gallery Section --><section id="gallery" class="py-16 bg-white"><div class="container mx-auto px-4"><div class="text-center mb-12">42 unmodified lines</div></section><!-- Our Story Section --><section id="story" class="py-16 bg-gray-50"><div class="container mx-auto px-4"><div class="flex flex-col lg:flex-row items-center gap-12">79 unmodified lines</div><!-- Menu items --><div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8" id="menu-items-container"><!-- Items will be loaded dynamically --><div class="text-center py-12"><div class="spinner mx-auto mb-4"></div><p>Chargement du menu...</p></div></div>6 unmodified lines</div></section><!-- Loyalty Program Section --><section class="py-16 bg-gradient-to-r from-primary-700 to-primary-600 text-white"><div class="container mx-auto px-4"><div class="flex flex-col lg:flex-row items-center gap-12">92 unmodified lines</div></section><!-- Testimonials Section --><section id="testimonials" class="py-16 bg-gray-50"><div class="container mx-auto px-4"><div class="text-center mb-16">32 unmodified lines</div></div><!-- Testimonial 2 --><div class="bg-white rounded-xl p-8 shadow-lg testimonial-card"><div class="flex items-center mb-6"><img src="https://randomuser.me/api/portraits/men/32.jpg" alt="Jean" class="w-12 h-12 rounded-full object-cover border-2 border-white shadow-md"><div class="ml-4"><h4 class="font-bold text-gray-900">Jean B.</h4><div class="flex items-center mt-1 text-accent-400"><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i></div></div></div><p class="text-gray-700 mb-4">"Le foutou banane avec sauce graine est tout simplement exceptionnel. Je recommande vivement ce restaurant à tous ceux qui veulent découvrir la vraie cuisine ivoirienne."</p><div class="flex justify-between items-center"><span class="text-sm text-gray-500">15 avis</span><div class="flex space-x-2"><button class="text-primary-600 hover:text-primary-800"><i class="fas fa-thumbs-up"></i></button><button class="text-gray-400 hover:text-gray-600"><i class="fas fa-thumbs-down"></i></button></div></div></div><!-- Testimonial 3 --><div class="bg-white rounded-xl p-8 shadow-lg testimonial-card"><div class="flex items-center mb-6"><img src="https://randomuser.me/api/portraits/women/68.jpg" alt="Aminata" class="w-12 h-12 rounded-full object-cover border-2 border-white shadow-md"><div class="ml-4"><h4 class="font-bold text-gray-900">Aminata D.</h4><div class="flex items-center mt-1 text-accent-400"><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="fas fa-star"></i><i class="far fa-star"></i></div></div></div><p class="text-gray-700 mb-4">"J'ai testé plusieurs restaurants africains à Duékoué et Guémon-Délices est de loin le meilleur en termes de qualité et d'authenticité. Leur alloco est parfaitement préparé!"</p><div class="flex justify-between items-center"><span class="text-sm text-gray-500">7 avis</span><div class="flex space-x-2"><button class="text-primary-600 hover:text-primary-800"><i class="fas fa-thumbs-up"></i></button><button class="text-gray-400 hover:text-gray-600"><i class="fas fa-thumbs-down"></i></button></div></div></div></div><div class="text-center mt-12">5 unmodified lines</div></section><!-- Contact Section --><section id="contact" class="py-16 bg-white"><div class="container mx-auto px-4"><div class="text-center mb-16">97 unmodified lines<i class="fab fa-whatsapp"></i></a><!-- Footer --><footer class="bg-primary-900 text-primary-100 pt-12 pb-8"><div class="container mx-auto px-4"><div class="grid grid-cols-1 md:grid-cols-4 gap-12 mb-12">70 unmodified lines</div></footer><!-- Reservation Modal --><div id="reservation-modal" class="modal"><div class="modal-content"><div class="modal-header"><h3 class="modal-title">Réserver une table</h3><button class="close-modal">×</button></div><form id="reservation-form"><div class="form-group"><label for="reservation-name" class="form-label">Nom complet *</label><input type="text" id="reservation-name" required class="form-input"></div><div class="form-group"><label for="reservation-phone" class="form-label">Téléphone *</label><input type="tel" id="reservation-phone" required class="form-input"></div><div class="form-group"><label for="reservation-email" class="form-label">Email</label><input type="email" id="reservation-email" class="form-input"></div><div class="grid grid-cols-2 gap-4"><div class="form-group"><label for="reservation-date" class="form-label">Date *</label><input type="date" id="reservation-date" required class="form-input"></div><div class="form-group"><label for="reservation-time" class="form-label">Heure *</label><input type="time" id="reservation-time" required class="form-input"></div></div><div class="form-group"><label for="reservation-guests" class="form-label">Nombre de personnes *</label><select id="reservation-guests" required class="form-input"><option value="1">1 personne</option><option value="2">2 personnes</option><option value="3">3 personnes</option><option value="4">4 personnes</option><option value="5">5 personnes</option><option value="6">6 personnes</option><option value="7">7 personnes</option><option value="8">8+ personnes</option></select></div><div class="form-group"><label for="reservation-notes" class="form-label">Notes supplémentaires</label><textarea id="reservation-notes" rows="3" class="form-input"></textarea></div><button type="submit" class="w-full bg-gradient-to-r from-primary-600 to-primary-700 hover:shadow-lg text-white font-medium py-3 px-6 rounded-lg transition-all duration-300 flex items-center justify-center hover:scale-[1.02]"><i class="fas fa-calendar-check mr-2"></i> Confirmer la réservation</button></form></div></div><!-- Payment Modal --><div id="payment-modal" class="modal"><div class="modal-content"><div class="modal-header"><h3 class="modal-title">Paiement</h3><button class="close-modal">×</button></div><div class="payment-steps"><div class="step active" data-step="1"><div class="step-number">1</div><div class="step-label">Commande</div></div><div class="step" data-step="2"><div class="step-number">2</div><div class="step-label">Paiement</div></div><div class="step" data-step="3"><div class="step-number">3</div><div class="step-label">Livraison</div></div></div><div id="payment-step-1"><div class="mb-6"><h4 class="font-bold text-lg mb-4">Votre commande</h4><div id="payment-cart-items" class="space-y-4"><!-- Cart items will be loaded here --></div><div class="cart-total"><span>Total</span><span id="payment-total">0 FCFA</span></div></div><div class="form-group"><label for="delivery-address" class="form-label">Adresse de livraison</label><textarea id="delivery-address" rows="2" class="form-input"></textarea></div><div class="form-group"><label for="delivery-notes" class="form-label">Instructions spéciales</label><textarea id="delivery-notes" rows="2" class="form-input"></textarea></div><button id="next-to-payment" class="w-full bg-gradient-to-r from-primary-600 to-primary-700 hover:shadow-lg text-white font-medium py-3 px-6 rounded-lg transition-all duration-300 flex items-center justify-center hover:scale-[1.02]"><span>Passer au paiement</span><i class="fas fa-arrow-right ml-2"></i></button></div><div id="payment-step-2" class="hidden"><div class="mb-6"><h4 class="font-bold text-lg mb-4">Méthode de paiement</h4><div class="space-y-4"><div class="flex items-center p-4 border border-gray-200 rounded-lg cursor-pointer hover:border-primary-500 payment-method" data-method="mobile"><div class="w-6 h-6 rounded-full border-2 border-primary-500 mr-3 flex items-center justify-center"><div class="w-3 h-3 rounded-full bg-primary-500 payment-method-check"></div></div><div><h5 class="font-medium">Paiement mobile (Orange Money, MTN Mobile Money)</h5><p class="text-sm text-gray-500">Paiement sécurisé via votre mobile</p></div></div><div class="flex items-center p-4 border border-gray-200 rounded-lg cursor-pointer hover:border-primary-500 payment-method" data-method="cash"><div class="w-6 h-6 rounded-full border-2 border-gray-300 mr-3 flex items-center justify-center"><div class="w-3 h-3 rounded-full bg-primary-500 payment-method-check hidden"></div></div><div><h5 class="font-medium">Paiement à la livraison</h5><p class="text-sm text-gray-500">Payez en espèces à la livraison</p></div></div></div></div><div id="mobile-payment-details" class="hidden"><div class="form-group"><label for="mobile-number" class="form-label">Numéro de mobile *</label><input type="tel" id="mobile-number" class="form-input"></div><div class="form-group"><label for="mobile-provider" class="form-label">Opérateur mobile *</label><select id="mobile-provider" class="form-input"><option value="orange">Orange Money</option><option value="mtn">MTN Mobile Money</option><option value="moov">Moov Money</option></select></div></div><div class="flex space-x-4"><button id="back-to-order" class="flex-1 bg-gray-200 hover:bg-gray-300 text-gray-800 font-medium py-3 px-6 rounded-lg transition-all duration-300 flex items-center justify-center"><i class="fas fa-arrow-left mr-2"></i> Retour</button><button id="confirm-payment" class="flex-1 bg-gradient-to-r from-primary-600 to-primary-700 hover:shadow-lg text-white font-medium py-3 px-6 rounded-lg transition-all duration-300 flex items-center justify-center hover:scale-[1.02]"><span>Confirmer le paiement</span><i class="fas fa-check ml-2"></i></button></div></div><div id="payment-step-3" class="hidden text-center py-8"><div class="bg-green-100 text-green-800 rounded-full w-16 h-16 flex items-center justify-center mx-auto mb-6"><i class="fas fa-check text-2xl"></i></div><h4 class="font-bold text-xl mb-2">Commande confirmée!</h4><p class="text-gray-600 mb-6">Votre commande a été enregistrée et sera préparée rapidement.</p><p class="font-medium mb-6">Numéro de commande: <span id="order-number" class="text-primary-600">GD-12345</span></p><p class="text-sm text-gray-500 mb-6">Nous vous contacterons pour confirmer la livraison.</p><button id="close-payment-modal" class="bg-gradient-to-r from-primary-600 to-primary-700 hover:shadow-lg text-white font-medium py-3 px-6 rounded-lg transition-all duration-300 flex items-center justify-center mx-auto hover:scale-[1.02]"><span>Fermer</span></button></div></div></div><!-- Cart Modal --><div id="cart-modal" class="modal"><div class="modal-content"><div class="modal-header"><h3 class="modal-title">Votre Panier</h3><button class="close-modal">×</button></div><div id="cart-items-container" class="mb-6"><!-- Cart items will be loaded here --><div class="text-center py-8 text-gray-500"><i class="fas fa-shopping-bag text-3xl mb-3"></i><p>Votre panier est vide</p></div></div><div id="cart-total-container" class="hidden"><div class="cart-total"><span>Total</span><span id="cart-total">0 FCFA</span></div><button id="checkout-btn" class="w-full bg-gradient-to-r from-primary-600 to-primary-700 hover:shadow-lg text-white font-medium py-3 px-6 rounded-lg transition-all duration-300 flex items-center justify-center mt-4 hover:scale-[1.02]"><i class="fas fa-credit-card mr-2"></i> Passer la commande</button></div></div></div><!-- Toast Notification --><div id="toast" class="toast hidden"><span id="toast-icon" class="toast-icon"></span><span id="toast-message"></span></div><!-- API Configuration --><script>const API_CONFIG = {baseUrl: 'https://api.guemon-delices.com/v1',getApiKey: () => {// In production, this should be handled by a backend proxyreturn 'live_1234567890abcdef'; // Replace with your actual API key},endpoints: {menu: '/menu',reservations: '/reservations',orders: '/orders',payments: '/payments'},headers: {'Content-Type': 'application/json','Accept': 'application/json'}};</script><!-- Main Application Script --><script>document.addEventListener('DOMContentLoaded', function() {// Initialize Splide gallerynew Splide('.splide', {type: 'loop',perPage: 1,perMove: 1,gap: '1rem',autoplay: true,interval: 5000,pauseOnHover: true,breakpoints: {640: {perPage: 1,}}}).mount();// Toggle mobile menuconst menuToggle = document.getElementById('menu-toggle');const mobileMenu = document.getElementById('mobile-menu');menuToggle.addEventListener('click', function() {mobileMenu.classList.toggle('hidden');});// Initialize cartlet cart = JSON.parse(localStorage.getItem('cart')) || [];updateCartCount();// Load menu items from APIloadMenuItems();// Setup modal functionalitysetupModals();// Setup contact formsetupContactForm();// Setup reservation formsetupReservationForm();// Setup payment processsetupPaymentProcess();// Setup cart functionalitysetupCartFunctionality();// Menu filtering by originsetupMenuFiltering();// Helper functionsfunction showToast(message, isSuccess = true) {const toast = document.getElementById('toast');const toastIcon = document.getElementById('toast-icon');const toastMessage = document.getElementById('toast-message');toast.className = isSuccess ? 'toast success' : 'toast error';toastIcon.innerHTML = isSuccess ? '<i class="fas fa-check"></i>' : '<i class="fas fa-exclamation"></i>';toastMessage.textContent = message;toast.classList.remove('hidden');setTimeout(() => {toast.classList.add('hidden');}, 3000);}function updateCartCount() {const count = cart.reduce((total, item) => total + item.quantity, 0);document.getElementById('cart-count-desktop').textContent = count;document.getElementById('cart-count-mobile').textContent = count;}function loadMenuItems() {const menuContainer = document.getElementById('menu-items-container');// Show loading statemenuContainer.innerHTML = `<div class="text-center py-12"><div class="spinner mx-auto mb-4"></div><p>Chargement du menu...</p></div>`;// In a real implementation, this would fetch from your API// For demo purposes, we'll use a timeout to simulate network delaysetTimeout(() => {try {// This would be the API call in production:// fetch(`${API_CONFIG.baseUrl}${API_CONFIG.endpoints.menu}`, {// headers: {// ...API_CONFIG.headers,// 'Authorization': `Bearer ${API_CONFIG.getApiKey()}`// }// })// .then(response => response.json())// .then(data => renderMenuItems(data))// .catch(error => showError(error));// Mock data for demonstrationconst mockMenuData = [{id: 1,name: "Riz sauce graine",description: "Riz parfumé accompagné de notre fameuse sauce graine préparée avec des noix de palme fraîches et une viande braisée à la perfection.",price: 2500,category: "baoule",image: "https://images.unsplash.com/photo-1603105037880-88090c06fdbd?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80",rating: 4.5,reviews: 28,spicy: true},{id: 2,name: "Foutou banane + sauce",description: "Foutou préparé avec de la banane plantain mûre, accompagné de sauce graine ou sauce claire avec viande au choix.",price: 3000,category: "senoufo",image: "https://images.unsplash.com/photo-1555938164-8f93f8f6d344?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80",rating: 5,reviews: 42,bestseller: true},{id: 3,name: "Riz gras au poulet",description: "Riz préparé avec une sauce riche en légumes et épices, accompagné de poulet bien assaisonné et doré à la perfection.",price: 2800,category: "akan",image: "https://images.unsplash.com/photo-1604329760661-e71dc83f8f26?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80",rating: 4,reviews: 35,spicy: true,popular: true},{id: 4,name: "Attiéké avec poisson braisé",description: "Attiéké léger accompagné de poisson braisé et de sauce tomate fraîche.",price: 3000,category: "akan",image: "https://images.unsplash.com/photo-1530026186672-2cd00ffc50fe?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80",rating: 4.5,reviews: 22},{id: 5,name: "Alloco avec poisson",description: "Banane plantain frite accompagnée de poisson braisé et de sauce piquante.",price: 2500,category: "baoule",image: "https://images.unsplash.com/photo-1603360946369-dc9bb6258143?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80",rating: 4,reviews: 18,spicy: true},{id: 6,name: "Kedjenou de poulet",description: "Poulet cuit à l'étouffée avec des légumes et des épices, spécialité du centre de la Côte d'Ivoire.",price: 3500,category: "baoule",image: "https://images.unsplash.com/photo-1547592180-85f173990554?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80",rating: 4.5,reviews: 25,traditional: true},{id: 7,name: "Bangui",description: "Boisson locale à base de vin de palme.",price: 1000,category: "drinks",image: "https://images.unsplash.com/photo-1560963805-eae2e1a6f5a9?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80",rating: 4,reviews: 12},{id: 8,name: "Gnamakoudji",description: "Jus de gingembre frais, rafraîchissant et piquant.",price: 1500,category: "drinks",image: "https://images.unsplash.com/photo-1595475884562-073c30d45670?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80",rating: 4.5,reviews: 15,spicy: true}];renderMenuItems(mockMenuData);} catch (error) {showError(error);}}, 1000);}function renderMenuItems(items) {const menuContainer = document.getElementById('menu-items-container');if (!items || items.length === 0) {menuContainer.innerHTML = `<div class="text-center py-12 col-span-3"><i class="fas fa-utensils text-3xl mb-3 text-gray-400"></i><p class="text-gray-500">Menu non disponible pour le moment</p></div>`;return;}menuContainer.innerHTML = items.map(item => `<div class="bg-white rounded-2xl overflow-hidden shadow-lg transition-all duration-300 menu-item hover:shadow-xl" data-category="${item.category}"><div class="relative h-64 overflow-hidden dish-image-container"><img src="${item.image}"alt="${item.name}" class="w-full h-full object-cover dish-image">${item.bestseller ? `<div class="absolute top-4 right-4 dish-badge bg-primary-600 text-white font-medium px-4 py-2"><span>Meilleure vente</span></div>` : ''}${item.popular ? `<div class="absolute top-4 right-4 dish-badge bg-primary-100 text-primary-900 font-medium px-4 py-2"><span>Populaire</span></div>` : ''}${item.traditional ? `<div class="absolute top-4 right-4 dish-badge bg-accent-500 text-primary-900 font-medium px-4 py-2"><span>Traditionnel</span></div>` : ''}<span class="origin-badge ${item.category}">${getCategoryLabel(item.category)}</span></div><div class="p-6"><div class="flex justify-between items-start mb-3"><h3 class="text-xl font-bold text-primary-900">${item.name} ${item.spicy ? '<span class="dish-spicy"></span>' : ''}</h3><span class="text-xl font-bold text-primary-600">${formatPrice(item.price)}</span></div><p class="text-gray-600 mb-6">${item.description}</p><div class="flex items-center justify-between"><div class="flex items-center text-accent-400">${renderStars(item.rating)}<span class="text-gray-500 text-sm ml-2">(${item.reviews})</span></div><button class="add-to-cart bg-gradient-to-r from-primary-600 to-primary-700 hover:shadow-lg text-white py-2 px-4 rounded-full transition-all duration-300 flex items-center hover:scale-105"data-id="${item.id}" data-name="${item.name}" data-price="${item.price}"><i class="fas fa-plus mr-1"></i> Ajouter</button></div></div></div>`).join('');// Add event listeners to all add-to-cart buttonsdocument.querySelectorAll('.add-to-cart').forEach(button => {button.addEventListener('click', function() {const id = this.getAttribute('data-id');const name = this.getAttribute('data-name');const price = parseInt(this.getAttribute('data-price'));addToCart(id, name, price);});});}function renderStars(rating) {const fullStars = Math.floor(rating);const hasHalfStar = rating % 1 >= 0.5;const emptyStars = 5 - fullStars - (hasHalfStar ? 1 : 0);let stars = '';for (let i = 0; i < fullStars; i++) {stars += '<i class="fas fa-star"></i>';}if (hasHalfStar) {stars += '<i class="fas fa-star-half-alt"></i>';}for (let i = 0; i < emptyStars; i++) {stars += '<i class="far fa-star"></i>';}return stars;}function getCategoryLabel(category) {const labels = {'baoule': 'Baoulé','senoufo': 'Sénoufo','akan': 'Akan','drinks': 'Boisson'};return labels[category] || category;}function formatPrice(price) {return price.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") + 'F';}function showError(error) {console.error('Error:', error);const menuContainer = document.getElementById('menu-items-container');menuContainer.innerHTML = `<div class="text-center py-12 col-span-3"><i class="fas fa-exclamation-triangle text-3xl mb-3 text-red-500"></i><p class="text-gray-500">Erreur de chargement du menu</p><button class="mt-4 text-primary-600 hover:text-primary-700" onclick="loadMenuItems()"><i class="fas fa-sync-alt mr-2"></i> Réessayer</button></div>`;}function setupModals() {// Reservation modalconst reservationModal = document.getElementById('reservation-modal');const reservationBtns = document.querySelectorAll('#reservation-btn, #reservation-btn-mobile');const closeReservationModal = reservationModal.querySelector('.close-modal');reservationBtns.forEach(btn => {btn.addEventListener('click', function() {reservationModal.style.display = 'block';document.body.style.overflow = 'hidden';});});closeReservationModal.addEventListener('click', function() {reservationModal.style.display = 'none';document.body.style.overflow = 'auto';});// Payment modalconst paymentModal = document.getElementById('payment-modal');const closePaymentModal = paymentModal.querySelector('.close-modal');closePaymentModal.addEventListener('click', function() {paymentModal.style.display = 'none';document.body.style.overflow = 'auto';});// Cart modalconst cartModal = document.getElementById('cart-modal');const cartBtns = document.querySelectorAll('#cart-btn-desktop, #cart-btn-mobile');const closeCartModal = cartModal.querySelector('.close-modal');cartBtns.forEach(btn => {btn.addEventListener('click', function() {renderCartItems();cartModal.style.display = 'block';document.body.style.overflow = 'hidden';});});closeCartModal.addEventListener('click', function() {cartModal.style.display = 'none';document.body.style.overflow = 'auto';});// Close modals when clicking outsidewindow.addEventListener('click', function(event) {if (event.target === reservationModal) {reservationModal.style.display = 'none';document.body.style.overflow = 'auto';}if (event.target === paymentModal) {paymentModal.style.display = 'none';document.body.style.overflow = 'auto';}if (event.target === cartModal) {cartModal.style.display = 'none';document.body.style.overflow = 'auto';}});}function setupContactForm() {const contactForm = document.getElementById('contact-form');contactForm.addEventListener('submit', function(e) {e.preventDefault();const formData = {name: document.getElementById('contact-name').value,email: document.getElementById('contact-email').value,subject: document.getElementById('contact-subject').value,message: document.getElementById('contact-message').value};// In a real implementation, this would send to your backend// For demo purposes, we'll simulate the submissionconst submitBtn = contactForm.querySelector('button[type="submit"]');const originalBtnText = submitBtn.innerHTML;submitBtn.disabled = true;submitBtn.innerHTML = '<div class="spinner mr-2"></div> Envoi en cours...';setTimeout(() => {submitBtn.disabled = false;submitBtn.innerHTML = originalBtnText;// Show success messageshowToast('Votre message a été envoyé avec succès!', true);// Reset formcontactForm.reset();}, 1500);});}function setupReservationForm() {const reservationForm = document.getElementById('reservation-form');const reservationModal = document.getElementById('reservation-modal');reservationForm.addEventListener('submit', function(e) {e.preventDefault();const formData = {name: document.getElementById('reservation-name').value,phone: document.getElementById('reservation-phone').value,email: document.getElementById('reservation-email').value,date: document.getElementById('reservation-date').value,time: document.getElementById('reservation-time').value,guests: document.getElementById('reservation-guests').value,notes: document.getElementById('reservation-notes').value};// In a real implementation, this would send to your backend// For demo purposes, we'll simulate the submissionconst submitBtn = reservationForm.querySelector('button[type="submit"]');const originalBtnText = submitBtn.innerHTML;submitBtn.disabled = true;submitBtn.innerHTML = '<div class="spinner mr-2"></div> Réservation en cours...';setTimeout(() => {submitBtn.disabled = false;submitBtn.innerHTML = originalBtnText;// Show success messageshowToast('Votre réservation a été confirmée!', true);// Reset form and close modalreservationForm.reset();reservationModal.style.display = 'none';document.body.style.overflow = 'auto';// In production, this would sync with your POS systemsyncReservationWithPOS(formData);}, 1500);});}function syncReservationWithPOS(reservationData) {// This would be the API call in production:// fetch(`${API_CONFIG.baseUrl}${API_CONFIG.endpoints.reservations}`, {// method: 'POST',// headers: {// ...API_CONFIG.headers,// 'Authorization': `Bearer ${API_CONFIG.getApiKey()}`// },// body: JSON.stringify(reservationData)// })// .then(response => response.json())// .then(data => console.log('Reservation synced with POS:', data))// .catch(error => console.error('Error syncing reservation:', error));console.log('Reservation data to sync with POS:', reservationData);}function setupPaymentProcess() {const paymentModal = document.getElementById('payment-modal');const checkoutBtn = document.getElementById('checkout-btn');const nextToPaymentBtn = document.getElementById('next-to-payment');const backToOrderBtn = document.getElementById('back-to-order');const confirmPaymentBtn = document.getElementById('confirm-payment');const closePaymentModalBtn = document.getElementById('close-payment-modal');const paymentMethods = document.querySelectorAll('.payment-method');// Open payment modal from checkout buttoncheckoutBtn.addEventListener('click', function() {renderPaymentCartItems();paymentModal.style.display = 'block';document.body.style.overflow = 'hidden';});// Step 1 to Step 2nextToPaymentBtn.addEventListener('click', function() {document.getElementById('payment-step-1').classList.add('hidden');document.getElementById('payment-step-2').classList.remove('hidden');// Update step indicatorsdocument.querySelector('.step[data-step="1"]').classList.remove('active');document.querySelector('.step[data-step="2"]').classList.add('active');});// Step 2 back to Step 1backToOrderBtn.addEventListener('click', function() {document.getElementById('payment-step-2').classList.add('hidden');document.getElementById('payment-step-1').classList.remove('hidden');// Update step indicatorsdocument.querySelector('.step[data-step="2"]').classList.remove('active');document.querySelector('.step[data-step="1"]').classList.add('active');});// Payment method selectionpaymentMethods.forEach(method => {method.addEventListener('click', function() {// Remove active class from all methodspaymentMethods.forEach(m => {m.querySelector('.payment-method-check').classList.add('hidden');m.querySelector('.border-primary-500').classList.remove('border-primary-500');m.querySelector('.border-primary-500').classList.add('border-gray-300');});// Add active class to selected methodthis.querySelector('.payment-method-check').classList.remove('hidden');this.querySelector('.border-gray-300').classList.remove('border-gray-300');this.querySelector('.border-gray-300').classList.add('border-primary-500');// Show/hide mobile payment detailsconst methodType = this.getAttribute('data-method');if (methodType === 'mobile') {document.getElementById('mobile-payment-details').classList.remove('hidden');} else {document.getElementById('mobile-payment-details').classList.add('hidden');}});});// Confirm paymentconfirmPaymentBtn.addEventListener('click', function() {const selectedMethod = document.querySelector('.payment-method .payment-method-check:not(.hidden)').parentElement.parentElement.getAttribute('data-method');// Validate mobile payment details if selectedif (selectedMethod === 'mobile') {const mobileNumber = document.getElementById('mobile-number').value;if (!mobileNumber) {showToast('Veuillez entrer votre numéro de mobile', false);return;}}// In a real implementation, this would process the payment// For demo purposes, we'll simulate the payment processingconst originalBtnText = confirmPaymentBtn.innerHTML;confirmPaymentBtn.disabled = true;confirmPaymentBtn.innerHTML = '<div class="spinner mr-2"></div> Traitement...';setTimeout(() => {confirmPaymentBtn.disabled = false;confirmPaymentBtn.innerHTML = originalBtnText;// Move to confirmation stepdocument.getElementById('payment-step-2').classList.add('hidden');document.getElementById('payment-step-3').classList.remove('hidden');// Update step indicatorsdocument.querySelector('.step[data-step="2"]').classList.remove('active');document.querySelector('.step[data-step="2"]').classList.add('completed');document.querySelector('.step[data-step="3"]').classList.add('active');// Generate random order numberdocument.getElementById('order-number').textContent = 'GD-' + Math.floor(10000 + Math.random() * 90000);// In production, this would sync with your POS systemsyncOrderWithPOS();// Clear cartclearCart();}, 2000);});// Close payment modal from confirmation stepclosePaymentModalBtn.addEventListener('click', function() {paymentModal.style.display = 'none';document.body.style.overflow = 'auto';});}function syncOrderWithPOS() {// This would be the API call in production:// fetch(`${API_CONFIG.baseUrl}${API_CONFIG.endpoints.orders}`, {// method: 'POST',// headers: {// ...API_CONFIG.headers,// 'Authorization': `Bearer ${API_CONFIG.getApiKey()}`// },// body: JSON.stringify({// items: cart,// total: calculateCartTotal(),// deliveryAddress: document.getElementById('delivery-address').value,// deliveryNotes: document.getElementById('delivery-notes').value// })// })// .then(response => response.json())// .then(data => console.log('Order synced with POS:', data))// .catch(error => console.error('Error syncing order:', error));console.log('Order data to sync with POS:', {items: cart,total: calculateCartTotal(),deliveryAddress: document.getElementById('delivery-address').value,deliveryNotes: document.getElementById('delivery-notes').value});}function setupCartFunctionality() {// Add to cart functionality is already set up in renderMenuItems()// Here we'll set up the cart modal functionality}function addToCart(id, name, price) {// Check if item already exists in cartconst existingItem = cart.find(item => item.id === id);if (existingItem) {existingItem.quantity += 1;} else {cart.push({id,name,price,quantity: 1});}// Update cart in localStoragelocalStorage.setItem('cart', JSON.stringify(cart));// Update cart countupdateCartCount();// Show success messageshowToast(`${name} ajouté au panier`, true);}function renderCartItems() {const cartContainer = document.getElementById('cart-items-container');const cartTotalContainer = document.getElementById('cart-total-container');if (cart.length === 0) {cartContainer.innerHTML = `<div class="text-center py-8 text-gray-500"><i class="fas fa-shopping-bag text-3xl mb-3"></i><p>Votre panier est vide</p></div>`;cartTotalContainer.classList.add('hidden');return;}cartContainer.innerHTML = cart.map(item => `<div class="cart-item" data-id="${item.id}"><div><div class="cart-item-name">${item.name}</div><div class="cart-item-price">${formatPrice(item.price)}</div></div><div class="cart-item-actions"><button class="decrease-quantity w-8 h-8 rounded-full bg-gray-100 hover:bg-gray-200 flex items-center justify-center"><i class="fas fa-minus text-xs"></i></button><span class="cart-item-quantity">${item.quantity}</span><button class="increase-quantity w-8 h-8 rounded-full bg-gray-100 hover:bg-gray-200 flex items-center justify-center"><i class="fas fa-plus text-xs"></i></button><button class="remove-item ml-4 text-red-500 hover:text-red-700"><i class="fas fa-trash"></i></button></div></div>`).join('');// Update totaldocument.getElementById('cart-total').textContent = formatPrice(calculateCartTotal());cartTotalContainer.classList.remove('hidden');// Add event listeners to quantity buttonsdocument.querySelectorAll('.increase-quantity').forEach(button => {button.addEventListener('click', function() {const itemId = this.closest('.cart-item').getAttribute('data-id');updateCartItemQuantity(itemId, 1);});});document.querySelectorAll('.decrease-quantity').forEach(button => {button.addEventListener('click', function() {const itemId = this.closest('.cart-item').getAttribute('data-id');updateCartItemQuantity(itemId, -1);});});document.querySelectorAll('.remove-item').forEach(button => {button.addEventListener('click', function() {const itemId = this.closest('.cart-item').getAttribute('data-id');removeCartItem(itemId);});});}function renderPaymentCartItems() {const paymentCartContainer = document.getElementById('payment-cart-items');if (cart.length === 0) {paymentCartContainer.innerHTML = '<p>Aucun article dans le panier</p>';return;}paymentCartContainer.innerHTML = cart.map(item => `<div class="cart-item"><div class="cart-item-name">${item.name} × ${item.quantity}</div><div class="cart-item-price">${formatPrice(item.price * item.quantity)}</div></div>`).join('');// Update totaldocument.getElementById('payment-total').textContent = formatPrice(calculateCartTotal());}function updateCartItemQuantity(itemId, change) {const item = cart.find(item => item.id === itemId);if (item) {item.quantity += change;// Remove item if quantity reaches 0if (item.quantity <= 0) {cart = cart.filter(item => item.id !== itemId);showToast(`${item.name} retiré du panier`, true);}// Update cart in localStoragelocalStorage.setItem('cart', JSON.stringify(cart));// Update cart count and renderupdateCartCount();renderCartItems();}}function removeCartItem(itemId) {const item = cart.find(item => item.id === itemId);if (item) {cart = cart.filter(item => item.id !== itemId);showToast(`${item.name} retiré du panier`, true);// Update cart in localStoragelocalStorage.setItem('cart', JSON.stringify(cart));// Update cart count and renderupdateCartCount();renderCartItems();}}function calculateCartTotal() {return cart.reduce((total, item) => total + (item.price * item.quantity), 0);}function clearCart() {cart = [];localStorage.setItem('cart', JSON.stringify(cart));updateCartCount();renderCartItems();}function setupMenuFiltering() {const categoryTabs = document.querySelectorAll('.category-tab');const menuItems = document.querySelectorAll('.menu-item');categoryTabs.forEach(tab => {tab.addEventListener('click', function() {// Remove active class from all tabscategoryTabs.forEach(t => t.classList.remove('active'));// Add active class to clicked tabthis.classList.add('active');const category = this.getAttribute('data-category');// Filter menu itemsmenuItems.forEach(item => {if (category === 'all' || item.getAttribute('data-category') === category) {item.style.display = 'block';} else {item.style.display = 'none';}});});});}});</script><p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=phpcisseab666cb/netlify" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
index.html+1307-143