-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1407 lines (1322 loc) · 87.2 KB
/
index.html
File metadata and controls
1407 lines (1322 loc) · 87.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GustoPlan</title>
<!-- Tailwind CSS (via CDN for simplicity, or local build) -->
<!-- Font Awesome -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap"
rel="stylesheet">
<!-- jsPDF and FileSaver for PDF/TXT Export -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf-autotable/3.8.2/jspdf.plugin.autotable.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/FileSaver.js/2.0.5/FileSaver.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sortablejs@1.15.2/Sortable.min.js"></script>
<link rel="manifest" href="/assets/manifest-X2GYo0pP.json">
<script>
if ('serviceWorker' in navigator) {
window.addEventListener('load', () => {
navigator.serviceWorker.register('./service-worker.js')
.then(registration => {
console.log('SW registered: ', registration);
})
.catch(registrationError => {
console.log('SW registration failed: ', registrationError);
});
});
}
</script>
<script type="module" crossorigin src="/assets/main-CPC2Lv91.js"></script>
<link rel="modulepreload" crossorigin href="/assets/firebase-config-9gANoKOS.js">
<link rel="stylesheet" crossorigin href="/assets/firebase-config-DuwEdJQT.css">
</head>
<body class="bg-background text-foreground transition-colors duration-200">
<!-- Mobile Navigation -->
<div class="md:hidden fixed bottom-0 left-0 right-0 bg-white shadow-[0_-4px_6px_-1px_rgba(0,0,0,0.1)] z-50">
<div class="flex justify-around items-center py-3">
<a href="#" class="flex flex-col items-center text-tomato" aria-label="Accueil">
<i class="fas fa-home text-xl"></i>
<span class="text-xs mt-1">Accueil</span>
</a>
<a href="#meal-planning-section" class="flex flex-col items-center text-gray-500 hover:text-tomato"
aria-label="Planning">
<i class="fas fa-calendar-alt text-xl"></i>
<span class="text-xs mt-1">Planning</span>
</a>
<a href="#shopping-list-section" class="flex flex-col items-center text-gray-500 hover:text-tomato"
aria-label="Courses">
<i class="fas fa-list text-xl"></i>
<span class="text-xs mt-1">Courses</span>
</a>
<a href="#ai-suggestions-section" class="flex flex-col items-center text-gray-500 hover:text-tomato"
aria-label="Suggestions IA">
<i class="fas fa-robot text-xl"></i>
<span class="text-xs mt-1">IA</span>
</a>
</div>
</div>
<!-- Header -->
<header class="bg-eggplant text-white shadow-lg sticky top-0 z-40">
<div class="container mx-auto px-4 py-3">
<div class="flex justify-between items-center">
<div class="flex items-center space-x-2">
<i class="fas fa-utensils text-2xl"></i>
<h1 class="text-xl md:text-2xl font-bold">GustoPlan</h1>
<span
class="text-xs font-mono bg-yellow-200 text-yellow-800 px-1 rounded border border-yellow-400">Vanilla
JS</span>
</div>
<!-- Hamburger Menu for Mobile -->
<div class="md:hidden flex items-center">
<button id="mobile-menu-btn" class="text-white focus:outline-none ml-4">
<i class="fas fa-bars text-2xl"></i>
</button>
</div>
</div>
<!-- Desktop Navigation -->
<div class="hidden md:flex items-center space-x-3">
<button id="menu-btn" data-path="menu"
class="inline-flex items-center justify-center px-4 py-2 rounded-full text-sm font-medium bg-tomato text-white hover:bg-tomato-dark transition-colors shadow-sm nav-btn">Mon
Menu</button>
<button id="shopping-mode-btn" data-path="shopping-mode"
class="inline-flex items-center justify-center px-4 py-2 rounded-full text-sm font-medium bg-white text-green-600 border border-green-600 hover:bg-green-50 transition-colors shadow-sm nav-btn"><i
class="fas fa-check-square mr-2"></i>Faire les courses</button>
<button id="plans-btn" data-path="plans"
class="inline-flex items-center justify-center px-4 py-2 rounded-full text-sm font-medium bg-white text-tomato hover:bg-gray-100 transition-colors shadow-sm nav-btn">Mes
Plans</button>
<button id="recipes-btn" data-path="recipes"
class="inline-flex items-center justify-center px-4 py-2 rounded-full text-sm font-medium bg-white text-tomato hover:bg-gray-100 transition-colors shadow-sm nav-btn">Mes
Recettes</button>
<button id="ingredients-btn" data-path="ingredients"
class="inline-flex items-center justify-center px-4 py-2 rounded-full text-sm font-medium bg-white text-tomato hover:bg-gray-100 transition-colors shadow-sm nav-btn">Mes
Ingrédients</button>
<button id="ai-btn" data-path="ai-suggestions"
class="inline-flex items-center justify-center px-4 py-2 rounded-full text-sm font-medium bg-white text-tomato hover:bg-gray-100 transition-colors shadow-sm nav-btn">
<i class="fas fa-robot mr-2"></i> IA Profil</button>
<button id="lists-btn" data-path="lists"
class="inline-flex items-center justify-center px-4 py-2 rounded-full text-sm font-medium bg-white text-tomato hover:bg-gray-100 transition-colors shadow-sm nav-btn">Mes
Listes</button>
<button id="shared-btn" data-path="shared"
class="inline-flex items-center justify-center px-4 py-2 rounded-full text-sm font-medium bg-white text-tomato hover:bg-gray-100 transition-colors shadow-sm nav-btn">Contenus
partagés</button>
<!-- Feedback Button (Beta) -->
<button id="feedback-btn"
class="inline-flex items-center justify-center px-4 py-2 rounded-full text-sm font-bold bg-yellow-400 text-yellow-900 hover:bg-yellow-500 transition-colors shadow-sm nav-btn animate-pulse"
title="Signaler un bug ou donner un avis">
<i class="fas fa-bug mr-2"></i> Avis / Bug
</button>
<!-- Notifications Bell -->
<div class="relative">
<button id="notifications-btn"
class="w-10 h-10 flex items-center justify-center bg-white text-tomato rounded-full hover:bg-gray-100 shadow-sm transition-colors"
aria-label="Notifications">
<i class="fas fa-envelope"></i>
<span id="notifications-badge"
class="absolute -top-1 -right-1 bg-red-500 text-white text-xs rounded-full h-4 w-4 flex items-center justify-center hidden">0</span>
</button>
</div>
<!-- Profile Dropdown -->
<div class="relative ml-2">
<button id="profile-btn"
class="flex items-center space-x-2 bg-gray-100 hover:bg-gray-200 rounded-full py-1 px-3 transition-colors">
<div
class="w-8 h-8 rounded-full bg-tomato text-white flex items-center justify-center font-bold">
<i class="fas fa-user"></i>
</div>
<span id="user-display-name" class="text-sm font-bold text-gray-800">Chargement...</span>
<i class="fas fa-chevron-down text-xs text-gray-500"></i>
</button>
<div id="profile-menu"
class="absolute top-12 right-0 bg-white rounded-lg shadow-xl w-64 py-2 hidden text-gray-700 z-[1000] border border-gray-100">
<div class="px-4 py-3 border-b bg-gray-50">
<p class="text-xs text-gray-500 uppercase font-semibold">Connecté en tant que</p>
<p class="text-sm font-bold truncate" id="menu-user-name">Invité</p>
</div>
<button class="w-full text-left px-4 py-2 hover:bg-gray-100 transition-colors" id="btn-logout">
<i class="fas fa-sign-out-alt mr-2 text-red-500"></i> Déconnexion
</button>
</div>
</div>
<button id="header-settings-btn"
class="w-10 h-10 flex items-center justify-center bg-white text-gray-600 rounded-full hover:bg-gray-100 shadow-sm transition-colors mr-2"
aria-label="Paramètres">
<i class="fas fa-cog"></i>
</button>
<button id="logout-btn"
class="inline-flex items-center justify-center px-4 py-2 rounded-full text-sm font-medium bg-red-500 text-white hover:bg-red-600 transition-colors shadow-sm">
<i class="fas fa-sign-out-alt mr-2"></i> Déconnexion
</button>
</div>
</div>
<!-- Mobile Menu Panel -->
<div id="mobile-menu" class="hidden md:hidden">
<div class="px-2 pt-2 pb-3 space-y-1 sm:px-3">
<button data-path="menu"
class="nav-btn-mobile text-white hover:bg-tomato-dark block w-full text-left rounded-md px-3 py-2 font-medium">Mon
Menu</button>
<button data-path="shopping-mode"
class="nav-btn-mobile text-white hover:bg-tomato-dark block w-full text-left rounded-md px-3 py-2 font-medium"><i
class="fas fa-check-square mr-2"></i>Faire les courses</button>
<button data-path="plans"
class="nav-btn-mobile text-white hover:bg-tomato-dark block w-full text-left rounded-md px-3 py-2 font-medium">Mes
Plans</button>
<button data-path="recipes"
class="nav-btn-mobile text-white hover:bg-tomato-dark block w-full text-left rounded-md px-3 py-2 font-medium">Mes
Recettes</button>
<button data-path="ingredients"
class="nav-btn-mobile text-white hover:bg-tomato-dark block w-full text-left rounded-md px-3 py-2 font-medium">Mes
Ingrédients</button>
<button data-path="ai-suggestions"
class="nav-btn-mobile text-white hover:bg-tomato-dark block w-full text-left rounded-md px-3 py-2 font-medium"><i
class="fas fa-robot mr-2"></i> IA Profil</button>
<button data-path="lists"
class="nav-btn-mobile text-white hover:bg-tomato-dark block w-full text-left rounded-md px-3 py-2 font-medium">Mes
Listes</button>
<button data-path="shared"
class="nav-btn-mobile text-white hover:bg-tomato-dark block w-full text-left rounded-md px-3 py-2 font-medium">Contenus
partagés</button>
<button id="profile-btn-mobile"
class="text-white hover:bg-tomato-dark block w-full text-left rounded-md px-3 py-2 font-medium">Mon
Profil</button>
<button id="logout-btn-mobile"
class="text-white bg-red-500 hover:bg-red-600 block w-full text-left rounded-md px-3 py-2 font-medium">Déconnexion</button>
</div>
</div>
</div>
</header>
<div id="firebase-status" class="text-center text-sm py-1 hidden"></div>
<!-- Main Content -->
<main class="mx-auto px-2 py-6 md:py-8 pb-20 md:pb-8"></main>
<!-- Tooltip pour les plats -->
<div id="meal-tooltip" class="hidden fixed bg-white shadow-lg rounded-lg p-4 text-sm text-gray-800 z-50">
<h4 id="tooltip-title" class="font-bold mb-2"></h4>
<ul id="tooltip-ingredients" class="list-disc pl-4"></ul>
</div>
<!-- Tooltip for long meal names -->
<div id="name-tooltip" class="hidden fixed bg-gray-800 text-white text-xs rounded py-1 px-2 z-50"></div>
<!-- Footer -->
<footer class="bg-eggplant text-white py-8 hidden md:block">
<div class="container mx-auto px-4">
<!-- Footer content -->
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
<div>
<h3 class="text-lg font-bold mb-4">GustoPlan</h3>
<p class="text-gray-300 text-sm">Votre assistant personnel pour des repas sains, économiques et
savoureux.</p>
</div>
<div>
<h3 class="text-lg font-bold mb-4">Navigation</h3>
<ul class="space-y-2 text-sm">
<li><a href="#" class="text-gray-300 hover:text-white transition">Accueil</a></li>
<li><a href="#meal-planning-section"
class="text-gray-300 hover:text-white transition">Planification</a></li>
<li><a href="#ai-suggestions-section" class="text-gray-300 hover:text-white transition">Recettes
IA</a></li>
<li><a href="#community-section"
class="text-gray-300 hover:text-white transition">Communauté</a></li>
</ul>
</div>
<div>
<h3 class="text-lg font-bold mb-4">Aide</h3>
<ul class="space-y-2 text-sm">
<li><a href="#" class="text-gray-300 hover:text-white transition">FAQ</a></li>
<li><a href="#" class="text-gray-300 hover:text-white transition">Contact</a></li>
<li><a href="#" class="text-gray-300 hover:text-white transition">Conditions</a></li>
<li><a href="#" class="text-gray-300 hover:text-white transition">Confidentialité</a></li>
</ul>
</div>
<div>
<h3 class="text-lg font-bold mb-4">Suivez-nous</h3>
<div class="flex space-x-4">
<a href="#" class="text-gray-300 hover:text-white transition" aria-label="Facebook"><i
class="fab fa-facebook-f"></i></a>
<a href="#" class="text-gray-300 hover:text-white transition" aria-label="Twitter"><i
class="fab fa-twitter"></i></a>
<a href="#" class="text-gray-300 hover:text-white transition" aria-label="Instagram"><i
class="fab fa-instagram"></i></a>
<a href="#" class="text-gray-300 hover:text-white transition" aria-label="Pinterest"><i
class="fab fa-pinterest"></i></a>
</div>
</div>
</div>
<div class="border-t border-gray-700 mt-8 pt-6 text-center text-gray-400 text-sm">
<p>© 2023 GustoPlan. Tous droits réservés.</p>
</div>
</div>
</footer>
<!-- Modals -->
<!-- Import List Modal -->
<div id="import-list-modal"
class="fixed inset-0 bg-black/30 backdrop-blur-sm flex items-center justify-center z-[100] hidden"
role="dialog">
<div class="bg-card text-card-foreground border border-border rounded-xl p-6 w-11/12 max-w-lg relative">
<button id="close-import-list-modal" class="absolute top-3 right-3 text-gray-400 hover:text-gray-600"
aria-label="Fermer">
<i class="fas fa-times text-xl"></i>
</button>
<h3 id="import-list-modal-title" class="text-lg font-bold mb-4">Importer une liste de courses</h3>
<div id="import-list-container" class="max-h-96 overflow-y-auto">
<!-- List of saved shopping lists will be generated here -->
</div>
</div>
</div>
<!-- Voice Assistant Modal -->
<div id="voice-modal"
class="fixed inset-0 bg-black/30 backdrop-blur-sm flex items-center justify-center z-[100] hidden" role="dialog"
aria-modal="true" aria-labelledby="voice-modal-title">
<div class="bg-card text-card-foreground border border-border rounded-xl p-6 w-11/12 max-w-md relative">
<button id="close-voice-modal" class="absolute top-3 right-3 text-gray-400 hover:text-gray-600"
aria-label="Fermer">
<i class="fas fa-times text-xl"></i>
</button>
<h3 id="voice-modal-title" class="text-lg md:text-xl font-bold text-center mb-4">Assistant vocal</h3>
<div class="text-center py-6">
<div id="voice-icon-container"
class="w-16 h-16 bg-tomato bg-opacity-10 rounded-full flex items-center justify-center mx-auto mb-4">
<i id="voice-icon"
class="fas fa-microphone text-tomato text-2xl transition-transform duration-200"></i>
</div>
<p id="voice-status" class="text-muted-foreground font-medium min-h-[1.5em]">Prêt à écouter</p>
<p id="voice-result" class="text-sm text-gray-500 mt-2 min-h-[2.5em]">Dites "Ajoute du poulet à la
liste" ou "Quel est le repas de demain midi ?"</p>
</div>
<div class="flex justify-center">
<button id="toggle-listening-btn" class="btn btn-primary rounded-full px-6 py-3">
<i class="fas fa-microphone mr-2"></i> Parler
</button>
</div>
</div>
</div>
<!-- Recipe Details Modal -->
<div id="recipe-modal"
class="fixed inset-0 bg-black/30 backdrop-blur-sm flex items-center justify-center z-[100] hidden" role="dialog"
aria-modal="true" aria-labelledby="recipe-modal-title">
<div
class="bg-card text-card-foreground border border-border rounded-xl p-4 md:p-6 w-11/12 max-w-2xl max-h-[90vh] overflow-y-auto relative">
<button id="close-recipe-modal" class="absolute top-3 right-3 text-gray-400 hover:text-gray-600 z-10"
aria-label="Fermer la recette">
<i class="fas fa-times text-xl"></i>
</button>
<!-- Contenu chargé par JS -->
<div id="recipe-modal-content" class="opacity-0 transition-opacity duration-300">
<div class="flex flex-col sm:flex-row justify-between sm:items-start mb-3 md:mb-4">
<div>
<h3 id="recipe-modal-title" class="text-xl md:text-2xl font-bold pr-8">Chargement...</h3>
<div class="flex items-center mt-1 space-x-2">
<span id="recipe-modal-score" class="nutrition-score score-c">?</span>
<span id="recipe-modal-info" class="text-xs md:text-sm text-gray-600">€?.?? • ?? min • ?
pers.</span>
<span id="recipe-modal-tags" class="text-xs"></span><!-- Tags like Végé, Saison -->
</div>
</div>
<img id="recipe-modal-image" src="https://placehold.co/150x100.png?text=GustoPlan"
alt="Image du plat"
class="w-full sm:w-32 md:w-40 h-auto rounded-lg object-cover mt-3 sm:mt-0 flex-shrink-0">
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 md:gap-6 mt-4">
<div class="md:col-span-2">
<h4 class="font-bold text-base md:text-lg mb-2">Ingrédients</h4>
<ul id="recipe-modal-ingredients" class="space-y-1 text-sm md:text-base">
<li>Chargement...</li>
</ul>
<h4 class="font-bold text-base md:text-lg mt-4 md:mt-6 mb-2">Préparation</h4>
<ol id="recipe-modal-steps" class="list-decimal list-inside space-y-2 text-sm md:text-base">
<li>Chargement...</li>
</ol>
</div>
<div>
<h4 class="font-bold text-base md:text-lg mb-2">Nutrition (indicatif)</h4>
<div id="recipe-modal-nutrition" class="bg-gray-50 p-3 rounded-lg space-y-1 text-xs md:text-sm">
<div class="flex justify-between"><span class="text-gray-600">Calories</span> <span
class="font-medium">--- kcal</span></div>
<!-- Autres nutriments -->
</div>
<div id="recipe-modal-tip-section" class="mt-4 md:mt-6 hidden">
<h4 class="font-bold text-base md:text-lg mb-2">Astuce <i
class="fas fa-lightbulb text-yellow-500"></i></h4>
<div class="bg-blue-50 p-3 rounded-lg">
<p id="recipe-modal-tip-text" class="text-sm text-blue-800">...</p>
</div>
</div>
<div class="mt-4 md:mt-6 space-y-2">
<button id="recipe-modal-add-plan-btn" class="btn btn-primary w-full btn-sm">
Ajouter au planning
</button>
<button id="recipe-modal-add-fav-btn" class="btn btn-outline w-full btn-sm">
<i class="far fa-heart mr-2"></i> Ajouter aux favoris
</button>
<button id="recipe-modal-remove-plan-btn"
class="btn btn-ghost text-red-600 hover:bg-red-50 w-full btn-sm hidden">
<i class="fas fa-trash-alt mr-2"></i> Retirer du planning
</button>
</div>
</div>
</div>
</div>
<!-- Modal Footer -->
<div class="mt-6 flex justify-end">
<button id="save-settings-btn" class="btn btn-primary px-6">
<i class="fas fa-save mr-2"></i> Sauver
</button>
</div>
</div>
</div>
<!-- Loading Spinner/Overlay (Optional) -->
<div id="loading-overlay"
class="fixed inset-0 bg-white bg-opacity-75 flex items-center justify-center z-[200] hidden">
<i class="fas fa-spinner fa-spin text-tomato text-4xl"></i>
</div>
<!-- Create Plan Modal -->
<div id="create-plan-modal"
class="fixed inset-0 bg-black/30 backdrop-blur-sm flex items-center justify-center z-[100] hidden"
role="dialog">
<div class="bg-card text-card-foreground border border-border rounded-xl p-6 w-11/12 max-w-md relative">
<button id="close-create-plan-modal" class="absolute top-3 right-3 text-gray-400 hover:text-gray-600"
aria-label="Fermer">
<i class="fas fa-times text-xl"></i>
</button>
<h3 class="text-lg font-bold mb-4">Créer un nouveau menu</h3>
<form id="create-plan-form">
<div class="space-y-4">
<div>
<label for="plan-name" class="block text-sm font-medium text-muted-foreground">Nom du
menu</label>
<input type="text" id="plan-name"
class="mt-1 block w-full rounded-md bg-input border-input text-foreground shadow-sm focus:ring-2 focus:ring-ring focus:border-ring focus:border-tomato focus:ring-tomato"
required>
</div>
</div>
<div class="flex justify-end space-x-4 mt-6">
<button type="button" id="cancel-create-plan-btn" class="btn btn-ghost">Annuler</button>
<button type="submit" class="btn btn-primary">Créer</button>
</div>
</form>
</div>
</div>
<!-- Rename Plan Modal -->
<div id="rename-plan-modal"
class="fixed inset-0 bg-black/30 backdrop-blur-sm flex items-center justify-center z-[100] hidden"
role="dialog">
<div class="bg-card text-card-foreground border border-border rounded-xl p-6 w-11/12 max-w-md relative">
<button id="close-rename-plan-modal" class="absolute top-3 right-3 text-gray-400 hover:text-gray-600"
aria-label="Fermer">
<i class="fas fa-times text-xl"></i>
</button>
<h3 class="text-lg font-bold mb-4">Renommer le menu</h3>
<form id="rename-plan-form">
<div>
<label for="new-plan-name" class="block text-sm font-medium text-muted-foreground">Nouveau nom du
menu</label>
<input type="text" id="new-plan-name"
class="mt-1 block w-full rounded-md bg-input border-input text-foreground shadow-sm focus:ring-2 focus:ring-ring focus:border-ring focus:border-tomato focus:ring-tomato"
required>
</div>
<div class="flex justify-end space-x-4 mt-6">
<button type="button" id="cancel-rename-plan-btn" class="btn btn-ghost">Annuler</button>
<button type="submit" class="btn btn-primary">Renommer</button>
</div>
</form>
</div>
</div>
<!-- Delete Confirmation Modal -->
<div id="delete-confirm-modal"
class="fixed inset-0 bg-black/30 backdrop-blur-sm flex items-center justify-center z-[150] hidden"
role="dialog">
<div class="bg-card text-card-foreground border border-border rounded-xl p-6 w-11/12 max-w-sm text-center">
<h3 id="delete-confirm-title" class="text-lg font-bold mb-4">Confirmer la suppression</h3>
<p id="delete-confirm-message" class="text-gray-600 mb-6">Êtes-vous sûr de vouloir supprimer cet élément ?
</p>
<div class="flex justify-center space-x-4">
<button id="cancel-delete-btn" class="btn btn-ghost">Annuler</button>
<button id="confirm-delete-btn" class="btn bg-red-500 text-white hover:bg-red-600">Supprimer</button>
</div>
</div>
</div>
<!-- Seasonal List Generator Modal -->
<div id="seasonal-list-modal"
class="fixed inset-0 bg-black/30 backdrop-blur-sm flex items-center justify-center z-[100] hidden">
<div
class="bg-card text-card-foreground border border-border rounded-xl p-6 w-11/12 max-w-lg relative max-h-[90vh] overflow-y-auto">
<button id="close-seasonal-modal" class="absolute top-3 right-3 text-gray-400 hover:text-gray-600"
aria-label="Fermer">
<i class="fas fa-times text-xl"></i>
</button>
<h3 class="text-lg font-bold mb-4">Générer une liste de saison</h3>
<div class="space-y-4">
<!-- Step 1: Season -->
<!-- Step 1: Mode & Selection -->
<div>
<div class="flex space-x-4 mb-4 border-b pb-2">
<label class="flex items-center cursor-pointer">
<input type="radio" name="gen-mode" value="season"
class="form-radio text-tomato focus:ring-tomato" checked>
<span class="ml-2 text-sm font-medium text-gray-700">Par Saison</span>
</label>
<label class="flex items-center cursor-pointer">
<input type="radio" name="gen-mode" value="month"
class="form-radio text-tomato focus:ring-tomato">
<span class="ml-2 text-sm font-medium text-gray-700">Par Mois</span>
</label>
</div>
<div id="gen-season-selector">
<label class="block text-sm font-medium text-muted-foreground mb-2">Choisir la saison</label>
<div class="grid grid-cols-2 gap-3">
<label class="cursor-pointer">
<input type="radio" name="gen-season" value="Printemps" class="peer sr-only">
<div
class="p-3 rounded-lg border text-center peer-checked:bg-green-100 peer-checked:border-green-500 hover:bg-gray-50">
<span class="block text-2xl">🌸</span>
<span class="text-sm font-medium">Printemps</span>
</div>
</label>
<label class="cursor-pointer">
<input type="radio" name="gen-season" value="Eté" class="peer sr-only">
<div
class="p-3 rounded-lg border text-center peer-checked:bg-yellow-100 peer-checked:border-yellow-500 hover:bg-gray-50">
<span class="block text-2xl">☀️</span>
<span class="text-sm font-medium">Eté</span>
</div>
</label>
<label class="cursor-pointer">
<input type="radio" name="gen-season" value="Automne" class="peer sr-only">
<div
class="p-3 rounded-lg border text-center peer-checked:bg-orange-100 peer-checked:border-orange-500 hover:bg-gray-50">
<span class="block text-2xl">🍂</span>
<span class="text-sm font-medium">Automne</span>
</div>
</label>
<label class="cursor-pointer">
<input type="radio" name="gen-season" value="Hiver" class="peer sr-only">
<div
class="p-3 rounded-lg border text-center peer-checked:bg-blue-100 peer-checked:border-blue-500 hover:bg-gray-50">
<span class="block text-2xl">❄️</span>
<span class="text-sm font-medium">Hiver</span>
</div>
</label>
</div>
</div>
<div id="gen-month-selector" class="hidden">
<label for="gen-month" class="block text-sm font-medium text-muted-foreground mb-2">Choisir le
mois</label>
<select id="gen-month"
class="block w-full rounded-md border-gray-300 shadow-sm focus:border-tomato focus:ring-tomato">
<option value="Janvier">Janvier</option>
<option value="Février">Février</option>
<option value="Mars">Mars</option>
<option value="Avril">Avril</option>
<option value="Mai">Mai</option>
<option value="Juin">Juin</option>
<option value="Juillet">Juillet</option>
<option value="Août">Août</option>
<option value="Septembre">Septembre</option>
<option value="Octobre">Octobre</option>
<option value="Novembre">Novembre</option>
<option value="Décembre">Décembre</option>
</select>
</div>
</div>
<!-- Step 2: Category -->
<div>
<label for="gen-category" class="block text-sm font-medium text-muted-foreground mb-2">2. Choisir la
catégorie</label>
<select id="gen-category"
class="block w-full rounded-md border-gray-300 shadow-sm focus:border-tomato focus:ring-tomato">
<!-- Categories will be loaded here -->
</select>
</div>
<!-- Step 3: Preview -->
<div id="gen-preview-section" class="hidden">
<label class="block text-sm font-medium text-muted-foreground mb-2">3. Sélectionner les
ingrédients</label>
<div id="gen-preview-list"
class="max-h-48 overflow-y-auto border rounded-md p-2 space-y-2 bg-gray-50">
<!-- Checkboxes will be loaded here -->
</div>
</div>
</div>
<div class="flex justify-end space-x-4 mt-6">
<button id="gen-preview-btn" class="btn btn-secondary">Voir les ingrédients</button>
<button id="gen-create-btn" class="btn btn-primary hidden">Créer la liste</button>
</div>
</div>
</div>
<!-- Save Plan As Modal -->
<div id="save-plan-as-modal"
class="fixed inset-0 bg-black/30 backdrop-blur-sm flex items-center justify-center z-[100] hidden"
role="dialog">
<div class="bg-card text-card-foreground border border-border rounded-xl p-6 w-11/12 max-w-md relative">
<button id="close-save-plan-as-modal" class="absolute top-3 right-3 text-gray-400 hover:text-gray-600"
aria-label="Fermer">
<i class="fas fa-times text-xl"></i>
</button>
<h3 class="text-lg font-bold mb-4">Nommer la sauvegarde</h3>
<form id="save-plan-as-form">
<div>
<label for="save-plan-name" class="block text-sm font-medium text-muted-foreground">Nom de la
sauvegarde</label>
<input type="text" id="save-plan-name"
class="mt-1 block w-full rounded-md bg-input border-input text-foreground shadow-sm focus:ring-2 focus:ring-ring focus:border-ring focus:border-tomato focus:ring-tomato"
required>
</div>
<div class="flex justify-end space-x-4 mt-6">
<button type="button" id="cancel-save-plan-as-btn" class="btn btn-ghost">Annuler</button>
<button type="submit" class="btn btn-primary">Enregistrer</button>
</div>
</form>
</div>
</div>
<!-- Meal Selection Modal -->
<div id="meal-select-modal"
class="fixed inset-0 bg-black/30 backdrop-blur-sm flex items-center justify-center z-[100] hidden"
role="dialog">
<div class="bg-card text-card-foreground border border-border rounded-xl p-6 w-11/12 max-w-lg relative">
<button id="close-meal-select-modal" class="absolute top-3 right-3 text-gray-400 hover:text-gray-600"
aria-label="Fermer">
<i class="fas fa-times text-xl"></i>
</button>
<h3 id="meal-select-modal-title" class="text-lg font-bold mb-4">Sélectionner un plat</h3>
<div id="meal-select-list" class="max-h-96 overflow-y-auto">
<!-- Meal list will be generated here -->
</div>
</div>
</div>
<!-- Recipe EDIT Form Modal -->
<div id="edit-recipe-form-modal"
class="fixed inset-0 bg-black/30 backdrop-blur-sm flex items-center justify-center z-[100] hidden">
<div
class="bg-card text-card-foreground border border-border rounded-xl p-6 w-11/12 max-w-3xl max-h-[90vh] overflow-y-auto relative">
<button id="close-edit-recipe-modal" class="absolute top-4 right-4 text-gray-400 hover:text-gray-600"
aria-label="Fermer">
<i class="fas fa-times text-xl"></i>
</button>
<h3 id="edit-recipe-modal-title" class="text-2xl font-bold mb-6">Modifier la recette</h3>
<!-- Magic Import Section -->
<div class="mb-6 p-4 bg-purple-50 border border-purple-200 rounded-lg">
<label class="block text-sm font-medium text-purple-700 mb-2">✨ Import Intelligent (IA)</label>
<div class="flex gap-2">
<input type="url" id="magic-import-url" placeholder="Collez l'URL d'une recette (Marmiton, 750g...)"
class="flex-1 rounded-md border-purple-300 focus:border-purple-500 focus:ring-purple-500 text-sm">
<button type="button" id="btn-magic-import"
class="bg-purple-600 text-white px-4 py-2 rounded-md hover:bg-purple-700 font-medium text-sm flex items-center">
<i class="fas fa-magic mr-2"></i> Importer
</button>
</div>
<p id="magic-import-status" class="text-xs text-purple-600 mt-1 hidden">
<i class="fas fa-spinner fa-spin mr-1"></i> Analyse en cours...
</p>
</div>
<!-- AI Generator Section -->
<div class="mb-6 p-4 bg-blue-50 border border-blue-200 rounded-lg">
<label class="block text-sm font-medium text-blue-700 mb-2">💡 Générateur (Chef Gusto)</label>
<div class="flex gap-2">
<input type="text" id="ai-generate-prompt"
placeholder="Ex: Risotto aux champignons, J'ai des courgettes..."
class="flex-1 rounded-md border-blue-300 focus:border-blue-500 focus:ring-blue-500 text-sm">
<button type="button" id="btn-ai-generate"
class="bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 font-medium text-sm flex items-center">
<i class="fas fa-lightbulb mr-2"></i> Créer
</button>
</div>
<p id="ai-generate-status" class="text-xs text-blue-600 mt-1 hidden">
<i class="fas fa-spinner fa-spin mr-1"></i> Chef Gusto réfléchit...
</p>
</div>
<form id="edit-recipe-form" class="space-y-4">
<input type="hidden" id="edit-recipe-id">
<!-- Main Details Grid -->
<div class="grid grid-cols-1 md:grid-cols-2 gap-4">
<div class="md:col-span-2">
<label for="edit-recipe-name" class="block text-sm font-medium text-muted-foreground">Nom de la
recette</label>
<input type="text" id="edit-recipe-name"
class="mt-1 block w-full rounded-md bg-input border-input text-foreground shadow-sm focus:ring-2 focus:ring-ring focus:border-ring focus:border-tomato focus:ring-tomato"
required>
</div>
<div class="md:col-span-2">
<label for="edit-recipe-image-url" class="block text-sm font-medium text-muted-foreground">URL
de l'image</label>
<input type="text" id="edit-recipe-image-url"
class="mt-1 block w-full rounded-md bg-input border-input text-foreground shadow-sm focus:ring-2 focus:ring-ring focus:border-ring focus:border-tomato focus:ring-tomato"
placeholder="Laisser vide pour une image aléatoire">
</div>
<div>
<label for="edit-recipe-category"
class="block text-sm font-medium text-muted-foreground">Catégorie</label>
<select id="edit-recipe-category"
class="mt-1 block w-full rounded-md bg-input border-input text-foreground shadow-sm focus:ring-2 focus:ring-ring focus:border-ring focus:border-tomato focus:ring-tomato"
required>
<option>ENTREE</option>
<option>PLAT</option>
<option>ACCOMPAGNEMENT</option>
<option>DESSERT</option>
</select>
</div>
<div>
<label for="edit-recipe-servings" class="block text-sm font-medium text-muted-foreground">Nombre
de personnes</label>
<input type="number" id="edit-recipe-servings"
class="mt-1 block w-full rounded-md bg-input border-input text-foreground shadow-sm focus:ring-2 focus:ring-ring focus:border-ring focus:border-tomato focus:ring-tomato"
min="1">
</div>
<div>
<label for="edit-recipe-prep-time" class="block text-sm font-medium text-muted-foreground">Temps
de préparation (min)</label>
<input type="number" id="edit-recipe-prep-time"
class="mt-1 block w-full rounded-md bg-input border-input text-foreground shadow-sm focus:ring-2 focus:ring-ring focus:border-ring focus:border-tomato focus:ring-tomato"
min="0">
</div>
<div>
<label for="edit-recipe-difficulty"
class="block text-sm font-medium text-muted-foreground">Difficulté</label>
<select id="edit-recipe-difficulty"
class="mt-1 block w-full rounded-md bg-input border-input text-foreground shadow-sm focus:ring-2 focus:ring-ring focus:border-ring focus:border-tomato focus:ring-tomato">
<option>Très facile</option>
<option>Facile</option>
<option>Moyen</option>
<option>Difficile</option>
</select>
</div>
<div class="md:col-span-2">
<label class="block text-sm font-medium text-muted-foreground mb-1">Saisonnalité</label>
<div class="grid grid-cols-2 gap-4 mb-2">
<!-- Printemps -->
<div class="border border-green-200 rounded-md p-3 bg-green-50">
<label class="flex items-center space-x-2 cursor-pointer mb-2 font-medium">
<input type="checkbox" id="recipe-season-printemps" value="Printemps"
class="form-checkbox h-4 w-4 text-green-600 focus:ring-green-500 recipe-season-checkbox"
data-months="avril,mai,juin">
<span class="text-sm text-green-800">Printemps 🌸</span>
</label>
<div class="ml-6 space-y-1 flex flex-col">
<label
class="flex items-center space-x-2 cursor-pointer text-xs text-gray-700 hover:text-green-700">
<input type="checkbox" id="recipe-month-avril" value="Avril"
class="form-checkbox h-3 w-3 text-green-500 recipe-month-checkbox rounded-sm"
data-season="Printemps">
<span>Avril</span>
</label>
<label
class="flex items-center space-x-2 cursor-pointer text-xs text-gray-700 hover:text-green-700">
<input type="checkbox" id="recipe-month-mai" value="Mai"
class="form-checkbox h-3 w-3 text-green-500 recipe-month-checkbox rounded-sm"
data-season="Printemps">
<span>Mai</span>
</label>
<label
class="flex items-center space-x-2 cursor-pointer text-xs text-gray-700 hover:text-green-700">
<input type="checkbox" id="recipe-month-juin" value="Juin"
class="form-checkbox h-3 w-3 text-green-500 recipe-month-checkbox rounded-sm"
data-season="Printemps">
<span>Juin</span>
</label>
</div>
</div>
<!-- Eté -->
<div class="border border-yellow-200 rounded-md p-3 bg-yellow-50">
<label class="flex items-center space-x-2 cursor-pointer mb-2 font-medium">
<input type="checkbox" id="recipe-season-ete" value="Eté"
class="form-checkbox h-4 w-4 text-yellow-600 focus:ring-yellow-500 recipe-season-checkbox"
data-months="juillet,aout,septembre">
<span class="text-sm text-yellow-800">Eté ☀️</span>
</label>
<div class="ml-6 space-y-1 flex flex-col">
<label
class="flex items-center space-x-2 cursor-pointer text-xs text-gray-700 hover:text-yellow-700">
<input type="checkbox" id="recipe-month-juillet" value="Juillet"
class="form-checkbox h-3 w-3 text-yellow-500 recipe-month-checkbox rounded-sm"
data-season="Eté">
<span>Juillet</span>
</label>
<label
class="flex items-center space-x-2 cursor-pointer text-xs text-gray-700 hover:text-yellow-700">
<input type="checkbox" id="recipe-month-aout" value="Août"
class="form-checkbox h-3 w-3 text-yellow-500 recipe-month-checkbox rounded-sm"
data-season="Eté">
<span>Août</span>
</label>
<label
class="flex items-center space-x-2 cursor-pointer text-xs text-gray-700 hover:text-yellow-700">
<input type="checkbox" id="recipe-month-septembre" value="Septembre"
class="form-checkbox h-3 w-3 text-yellow-500 recipe-month-checkbox rounded-sm"
data-season="Eté">
<span>Septembre</span>
</label>
</div>
</div>
<!-- Automne -->
<div class="border border-orange-200 rounded-md p-3 bg-orange-50">
<label class="flex items-center space-x-2 cursor-pointer mb-2 font-medium">
<input type="checkbox" id="recipe-season-automne" value="Automne"
class="form-checkbox h-4 w-4 text-orange-600 focus:ring-orange-500 recipe-season-checkbox"
data-months="octobre,novembre,decembre">
<span class="text-sm text-orange-800">Automne 🍂</span>
</label>
<div class="ml-6 space-y-1 flex flex-col">
<label
class="flex items-center space-x-2 cursor-pointer text-xs text-gray-700 hover:text-orange-700">
<input type="checkbox" id="recipe-month-octobre" value="Octobre"
class="form-checkbox h-3 w-3 text-orange-500 recipe-month-checkbox rounded-sm"
data-season="Automne">
<span>Octobre</span>
</label>
<label
class="flex items-center space-x-2 cursor-pointer text-xs text-gray-700 hover:text-orange-700">
<input type="checkbox" id="recipe-month-novembre" value="Novembre"
class="form-checkbox h-3 w-3 text-orange-500 recipe-month-checkbox rounded-sm"
data-season="Automne">
<span>Novembre</span>
</label>
<label
class="flex items-center space-x-2 cursor-pointer text-xs text-gray-700 hover:text-orange-700">
<input type="checkbox" id="recipe-month-decembre" value="Décembre"
class="form-checkbox h-3 w-3 text-orange-500 recipe-month-checkbox rounded-sm"
data-season="Automne">
<span>Décembre</span>
</label>
</div>
</div>
<!-- Hiver -->
<div class="border border-blue-200 rounded-md p-3 bg-blue-50">
<label class="flex items-center space-x-2 cursor-pointer mb-2 font-medium">
<input type="checkbox" id="recipe-season-hiver" value="Hiver"
class="form-checkbox h-4 w-4 text-blue-600 focus:ring-blue-500 recipe-season-checkbox"
data-months="janvier,fevrier,mars">
<span class="text-sm text-blue-800">Hiver ❄️</span>
</label>
<div class="ml-6 space-y-1 flex flex-col">
<label
class="flex items-center space-x-2 cursor-pointer text-xs text-gray-700 hover:text-blue-700">
<input type="checkbox" id="recipe-month-janvier" value="Janvier"
class="form-checkbox h-3 w-3 text-blue-500 recipe-month-checkbox rounded-sm"
data-season="Hiver">
<span>Janvier</span>
</label>
<label
class="flex items-center space-x-2 cursor-pointer text-xs text-gray-700 hover:text-blue-700">
<input type="checkbox" id="recipe-month-fevrier" value="Février"
class="form-checkbox h-3 w-3 text-blue-500 recipe-month-checkbox rounded-sm"
data-season="Hiver">
<span>Février</span>
</label>
<label
class="flex items-center space-x-2 cursor-pointer text-xs text-gray-700 hover:text-blue-700">
<input type="checkbox" id="recipe-month-mars" value="Mars"
class="form-checkbox h-3 w-3 text-blue-500 recipe-month-checkbox rounded-sm"
data-season="Hiver">
<span>Mars</span>
</label>
</div>
</div>
</div>
</div>
</div>
<!-- Ingredients Section -->
<div>
<h4 class="text-lg font-medium text-gray-800 mb-2">Ingrédients</h4>
<div id="edit-ingredients-list" class="space-y-2"></div>
<button type="button" id="edit-add-ingredient-btn" class="btn btn-outline btn-sm mt-2">
<i class="fas fa-plus mr-2"></i> Ajouter un ingrédient
</button>
</div>
<!-- Steps Section -->
<div>
<label for="edit-recipe-steps" class="block text-lg font-medium text-gray-800">Préparation</label>
<textarea id="edit-recipe-steps" rows="8"
class="mt-1 block w-full rounded-md bg-input border-input text-foreground shadow-sm focus:ring-2 focus:ring-ring focus:border-ring focus:border-tomato focus:ring-tomato"></textarea>
</div>
<!-- Form Actions -->
<div class="flex justify-end space-x-4 pt-4">
<button type="button" id="edit-cancel-recipe-btn" class="btn btn-ghost">Annuler</button>
<button type="submit" id="edit-save-recipe-btn" class="btn btn-primary">Sauvegarder</button>
</div>
</form>
</div>
</div>
<!-- Share Modal -->
<div id="share-modal"
class="fixed inset-0 bg-black/30 backdrop-blur-sm flex items-center justify-center z-[100] hidden"
role="dialog">
<div class="bg-card text-card-foreground border border-border rounded-xl p-6 w-11/12 max-w-lg relative">
<button id="close-share-modal" class="absolute top-3 right-3 text-gray-400 hover:text-gray-600"
aria-label="Fermer">
<i class="fas fa-times text-xl"></i>
</button>
<h3 id="share-modal-title" class="text-lg font-bold mb-4">Partager</h3>
<div id="share-friends-list" class="max-h-64 overflow-y-auto border rounded-lg p-2 mb-4">
<!-- Friend list for sharing will be generated here -->
</div>
<div id="share-mode-selection" class="my-4 space-y-2">
<div>
<label class="flex items-center p-2 border rounded-lg cursor-pointer hover:bg-gray-50">
<input type="radio" name="share-mode" value="collaborate"
class="form-radio h-5 w-5 text-tomato focus:ring-tomato" checked>
<span class="ml-3">
<span class="block font-medium">Inviter à collaborer</span>
<span class="block text-sm text-gray-500">L'ami pourra modifier le plan original.</span>
</span>
</label>
</div>
<div>
<label class="flex items-center p-2 border rounded-lg cursor-pointer hover:bg-gray-50">
<input type="radio" name="share-mode" value="copy"
class="form-radio h-5 w-5 text-tomato focus:ring-tomato">
<span class="ml-3">
<span class="block font-medium">Envoyer une copie</span>
<span class="block text-sm text-gray-500">L'ami recevra une copie indépendante du
plan.</span>
</span>
</label>
</div>
</div>
<div class="flex justify-end">
<button id="confirm-share-btn" class="btn btn-primary">Envoyer le partage</button>
</div>
</div>
</div>
<!-- Settings Modal -->
<div id="settings-modal"
class="fixed inset-0 bg-black/30 backdrop-blur-sm flex items-center justify-center z-[100] hidden"
role="dialog">
<div class="bg-white dark:bg-gray-800 rounded-xl p-6 w-11/12 max-w-md relative">
<button id="close-settings-modal" class="absolute top-3 right-3 text-gray-400 hover:text-gray-600"
aria-label="Fermer">
<i class="fas fa-times text-xl"></i>
</button>
<h3 class="text-lg font-bold mb-4 text-gray-900 dark:text-white">Paramètres</h3>
<div class="space-y-4 max-h-[70vh] overflow-y-auto pr-2">
<!-- Dark Mode -->
<div class="flex items-center justify-between p-3 border rounded-lg dark:border-gray-700">
<span class="font-medium text-gray-900 dark:text-gray-300">Mode Sombre</span>
<label for="dark-mode-toggle" class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" id="dark-mode-toggle" class="sr-only peer">
<div
class="w-11 h-6 bg-gray-200 rounded-full peer dark:bg-gray-700 peer-focus:ring-4 peer-focus:ring-tomato-300 dark:peer-focus:ring-tomato-800 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-0.5 after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all dark:border-gray-600 peer-checked:bg-tomato">
</div>
</label>
</div>
<!-- Seasonality Section -->
<div class="border-t pt-4 dark:border-gray-700">
<h4 class="text-md font-bold text-gray-900 dark:text-white mb-2 flex items-center">
<span class="mr-2">🌱</span> Saisonnalité Intelligente
</h4>
<!-- Mode -->
<div class="mb-4">
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">Mode de
saison</label>
<div class="flex flex-col space-y-2">
<label class="inline-flex items-center">
<input type="radio" name="season-mode" value="auto" class="form-radio text-tomato">
<span class="ml-2 text-sm text-gray-700 dark:text-gray-300">Automatique (Date du
jour)</span>
</label>
<label class="inline-flex items-center">
<input type="radio" name="season-mode" value="forced" class="form-radio text-tomato">
<span class="ml-2 text-sm text-gray-700 dark:text-gray-300">Forcée</span>
</label>
<div id="forced-season-selector" class="ml-6 hidden">
<select id="forced-season-select" class="form-select mt-1">
<option value="Printemps">🌸 Printemps</option>
<option value="Eté">☀️ Eté</option>
<option value="Automne">🍂 Automne</option>
<option value="Hiver">❄️ Hiver</option>
</select>
</div>
<label class="inline-flex items-center">
<input type="radio" name="season-mode" value="disabled" class="form-radio text-tomato">
<span class="ml-2 text-sm text-gray-700 dark:text-gray-300">Désactivée</span>
</label>
</div>
</div>
<!-- Hors Saison Behavior -->
<div class="mb-4">
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">Produits hors
saison</label>
<select id="off-season-behavior" class="form-select mt-1">
<option value="last">Afficher en dernier (défaut)</option>
<option value="dim">Afficher normalement (grisé)</option>
<option value="hide">Masquer complètement</option>