File size: 65,846 Bytes
ce1f269
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
<!DOCTYPE html>
<html lang="fr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>CASHRULER - Gestion Financière</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#4F46E5',
                        secondary: '#10B981',
                        danger: '#EF4444',
                        warning: '#F59E0B',
                        dark: '#1E293B',
                        light: '#F8FAFC',
                    }
                }
            }
        }
    </script>
    <style>
        .progress-bar {
            height: 8px;
            border-radius: 4px;
            background-color: #E5E7EB;
            overflow: hidden;
        }
        
        .progress-fill {
            height: 100%;
            border-radius: 4px;
            transition: width 0.3s ease;
        }
        
        .chart-container {
            position: relative;
            height: 300px;
            width: 100%;
        }
        
        .floating-btn {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
        }
        
        .slide-in {
            animation: slideIn 0.3s forwards;
        }
        
        .slide-out {
            animation: slideOut 0.3s forwards;
        }
        
        @keyframes slideIn {
            from { transform: translateX(100%); }
            to { transform: translateX(0); }
        }
        
        @keyframes slideOut {
            from { transform: translateX(0); }
            to { transform: translateX(100%); }
        }
        
        .fade-in {
            animation: fadeIn 0.3s forwards;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        
        .category-chip {
            transition: all 0.2s ease;
        }
        
        .category-chip:hover {
            transform: scale(1.05);
        }
        
        .input-highlight {
            transition: all 0.2s ease;
        }
        
        .input-highlight:focus {
            border-color: #4F46E5;
            box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
        }
    </style>
</head>
<body class="bg-gray-50 text-gray-800 dark:bg-gray-900 dark:text-gray-100">
    <!-- Authentification -->
    <div id="auth-screen" class="fixed inset-0 bg-white dark:bg-gray-900 z-50 flex flex-col items-center justify-center p-6">
        <div class="text-center mb-8">
            <h1 class="text-3xl font-bold text-primary mb-2">CASHRULER</h1>
            <p class="text-gray-600 dark:text-gray-300">Prenez le contrôle de vos finances</p>
        </div>
        
        <div class="w-full max-w-sm">
            <div class="bg-white dark:bg-gray-800 rounded-lg shadow-lg p-6">
                <h2 class="text-xl font-semibold mb-6 text-center">Authentification</h2>
                
                <div class="flex justify-center mb-6">
                    <div class="w-24 h-24 rounded-full bg-primary bg-opacity-10 flex items-center justify-center">
                        <i class="fas fa-lock text-primary text-3xl"></i>
                    </div>
                </div>
                
                <div class="mb-4">
                    <p class="text-sm text-gray-600 dark:text-gray-300 mb-2 text-center">Entrez votre code PIN à 4 chiffres</p>
                    <div class="flex justify-center space-x-3 mb-4">
                        <div class="w-12 h-12 rounded-full border-2 border-gray-300 dark:border-gray-600 flex items-center justify-center pin-digit" data-index="0"></div>
                        <div class="w-12 h-12 rounded-full border-2 border-gray-300 dark:border-gray-600 flex items-center justify-center pin-digit" data-index="1"></div>
                        <div class="w-12 h-12 rounded-full border-2 border-gray-300 dark:border-gray-600 flex items-center justify-center pin-digit" data-index="2"></div>
                        <div class="w-12 h-12 rounded-full border-2 border-gray-300 dark:border-gray-600 flex items-center justify-center pin-digit" data-index="3"></div>
                    </div>
                </div>
                
                <div class="grid grid-cols-3 gap-3">
                    <button class="number-btn bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-full h-12 flex items-center justify-center font-medium text-lg" data-value="1">1</button>
                    <button class="number-btn bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-full h-12 flex items-center justify-center font-medium text-lg" data-value="2">2</button>
                    <button class="number-btn bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-full h-12 flex items-center justify-center font-medium text-lg" data-value="3">3</button>
                    <button class="number-btn bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-full h-12 flex items-center justify-center font-medium text-lg" data-value="4">4</button>
                    <button class="number-btn bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-full h-12 flex items-center justify-center font-medium text-lg" data-value="5">5</button>
                    <button class="number-btn bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-full h-12 flex items-center justify-center font-medium text-lg" data-value="6">6</button>
                    <button class="number-btn bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-full h-12 flex items-center justify-center font-medium text-lg" data-value="7">7</button>
                    <button class="number-btn bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-full h-12 flex items-center justify-center font-medium text-lg" data-value="8">8</button>
                    <button class="number-btn bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-full h-12 flex items-center justify-center font-medium text-lg" data-value="9">9</button>
                    <button class="bg-transparent rounded-full h-12 flex items-center justify-center"></button>
                    <button class="number-btn bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-full h-12 flex items-center justify-center font-medium text-lg" data-value="0">0</button>
                    <button class="delete-btn bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-full h-12 flex items-center justify-center">
                        <i class="fas fa-backspace text-lg"></i>
                    </button>
                </div>
                
                <div class="mt-6 text-center">
                    <button id="fingerprint-btn" class="text-primary flex items-center justify-center w-full py-2">
                        <i class="fas fa-fingerprint mr-2"></i>
                        Utiliser l'empreinte digitale
                    </button>
                </div>
            </div>
        </div>
    </div>

    <!-- Interface principale -->
    <div id="main-app" class="hidden">
        <!-- Header -->
        <header class="bg-primary text-white p-4 shadow-md">
            <div class="container mx-auto flex justify-between items-center">
                <div>
                    <h1 class="text-xl font-bold">CASHRULER</h1>
                    <p class="text-xs opacity-80" id="welcome-message">Bonjour, John</p>
                </div>
                <div class="flex items-center space-x-4">
                    <button id="theme-toggle" class="p-2 rounded-full hover:bg-white hover:bg-opacity-10">
                        <i class="fas fa-moon"></i>
                    </button>
                    <button id="settings-btn" class="p-2 rounded-full hover:bg-white hover:bg-opacity-10">
                        <i class="fas fa-cog"></i>
                    </button>
                </div>
            </div>
        </header>

        <!-- Navigation -->
        <nav class="bg-white dark:bg-gray-800 shadow-sm">
            <div class="container mx-auto flex overflow-x-auto">
                <button class="nav-btn active px-4 py-3 font-medium text-sm whitespace-nowrap" data-target="dashboard">
                    <i class="fas fa-home mr-2"></i> Tableau de bord
                </button>
                <button class="nav-btn px-4 py-3 font-medium text-sm whitespace-nowrap" data-target="transactions">
                    <i class="fas fa-exchange-alt mr-2"></i> Transactions
                </button>
                <button class="nav-btn px-4 py-3 font-medium text-sm whitespace-nowrap" data-target="savings">
                    <i class="fas fa-piggy-bank mr-2"></i> Épargne
                </button>
                <button class="nav-btn px-4 py-3 font-medium text-sm whitespace-nowrap" data-target="stats">
                    <i class="fas fa-chart-bar mr-2"></i> Statistiques
                </button>
            </div>
        </nav>

        <!-- Contenu principal -->
        <main class="container mx-auto p-4 pb-20">
            <!-- Tableau de bord -->
            <div id="dashboard" class="content-section">
                <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-4 mb-4">
                    <div class="flex justify-between items-center mb-4">
                        <h2 class="font-bold text-lg">Votre solde</h2>
                        <span class="text-xl font-bold text-primary">2 450,00 €</span>
                    </div>
                    
                    <div class="grid grid-cols-2 gap-4 mb-4">
                        <div class="bg-gray-50 dark:bg-gray-700 rounded-lg p-3">
                            <p class="text-sm text-gray-600 dark:text-gray-300">Revenus</p>
                            <p class="font-bold text-green-600">3 200,00 €</p>
                        </div>
                        <div class="bg-gray-50 dark:bg-gray-700 rounded-lg p-3">
                            <p class="text-sm text-gray-600 dark:text-gray-300">Dépenses</p>
                            <p class="font-bold text-red-600">750,00 €</p>
                        </div>
                    </div>
                </div>
                
                <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-4 mb-4">
                    <h2 class="font-bold text-lg mb-4">Défis du jour</h2>
                    
                    <div class="space-y-3">
                        <div class="flex items-center justify-between p-3 bg-green-50 dark:bg-gray-700 rounded-lg border border-green-200 dark:border-green-800">
                            <div>
                                <p class="font-medium">Alimentation</p>
                                <p class="text-sm text-gray-600 dark:text-gray-300">20,00 € / 30,00 €</p>
                            </div>
                            <div class="w-24">
                                <div class="progress-bar">
                                    <div class="progress-fill bg-green-500" style="width: 66%"></div>
                                </div>
                            </div>
                        </div>
                        
                        <div class="flex items-center justify-between p-3 bg-red-50 dark:bg-gray-700 rounded-lg border border-red-200 dark:border-red-800">
                            <div>
                                <p class="font-medium">Shopping</p>
                                <p class="text-sm text-gray-600 dark:text-gray-300">120,00 € / 100,00 €</p>
                                <p class="text-xs text-red-500">Dépassement de 20,00 €</p>
                            </div>
                            <div class="w-24">
                                <div class="progress-bar">
                                    <div class="progress-fill bg-red-500" style="width: 120%"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-4 mb-4">
                    <h2 class="font-bold text-lg mb-4">Projets d'épargne</h2>
                    
                    <div class="space-y-4">
                        <div class="border rounded-lg p-3">
                            <div class="flex justify-between items-center mb-2">
                                <h3 class="font-medium">Nouveau téléphone</h3>
                                <span class="text-sm">800,00 €</span>
                            </div>
                            <div class="progress-bar mb-2">
                                <div class="progress-fill bg-primary" style="width: 45%"></div>
                            </div>
                            <div class="flex justify-between text-xs text-gray-600 dark:text-gray-300">
                                <span>360,00 € épargnés</span>
                                <span>440,00 € restants</span>
                            </div>
                        </div>
                        
                        <div class="border rounded-lg p-3">
                            <div class="flex justify-between items-center mb-2">
                                <h3 class="font-medium">Vacances</h3>
                                <span class="text-sm">1 500,00 €</span>
                            </div>
                            <div class="progress-bar mb-2">
                                <div class="progress-fill bg-secondary" style="width: 20%"></div>
                            </div>
                            <div class="flex justify-between text-xs text-gray-600 dark:text-gray-300">
                                <span>300,00 € épargnés</span>
                                <span>1 200,00 € restants</span>
                            </div>
                        </div>
                    </div>
                    
                    <button class="w-full mt-4 py-2 text-primary font-medium rounded-lg border border-primary hover:bg-primary hover:text-white transition-colors">
                        Voir tous les projets
                    </button>
                </div>
                
                <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-4">
                    <h2 class="font-bold text-lg mb-4">Dépenses récentes</h2>
                    
                    <div class="space-y-3">
                        <div class="flex items-center justify-between p-2 hover:bg-gray-50 dark:hover:bg-gray-700 rounded-lg">
                            <div class="flex items-center">
                                <div class="w-10 h-10 rounded-full bg-red-100 dark:bg-red-900 flex items-center justify-center mr-3">
                                    <i class="fas fa-shopping-bag text-red-500"></i>
                                </div>
                                <div>
                                    <p class="font-medium">Courses</p>
                                    <p class="text-xs text-gray-600 dark:text-gray-300">Aujourd'hui, 12:30</p>
                                </div>
                            </div>
                            <span class="font-medium text-red-500">-45,20 €</span>
                        </div>
                        
                        <div class="flex items-center justify-between p-2 hover:bg-gray-50 dark:hover:bg-gray-700 rounded-lg">
                            <div class="flex items-center">
                                <div class="w-10 h-10 rounded-full bg-blue-100 dark:bg-blue-900 flex items-center justify-center mr-3">
                                    <i class="fas fa-bus text-blue-500"></i>
                                </div>
                                <div>
                                    <p class="font-medium">Transport</p>
                                    <p class="text-xs text-gray-600 dark:text-gray-300">Aujourd'hui, 08:15</p>
                                </div>
                            </div>
                            <span class="font-medium text-red-500">-2,50 €</span>
                        </div>
                        
                        <div class="flex items-center justify-between p-2 hover:bg-gray-50 dark:hover:bg-gray-700 rounded-lg">
                            <div class="flex items-center">
                                <div class="w-10 h-10 rounded-full bg-green-100 dark:bg-green-900 flex items-center justify-center mr-3">
                                    <i class="fas fa-wallet text-green-500"></i>
                                </div>
                                <div>
                                    <p class="font-medium">Salaire</p>
                                    <p class="text-xs text-gray-600 dark:text-gray-300">Hier, 09:00</p>
                                </div>
                            </div>
                            <span class="font-medium text-green-500">+2 300,00 €</span>
                        </div>
                    </div>
                    
                    <button class="w-full mt-4 py-2 text-primary font-medium rounded-lg border border-primary hover:bg-primary hover:text-white transition-colors">
                        Voir toutes les transactions
                    </button>
                </div>
            </div>
            
            <!-- Transactions -->
            <div id="transactions" class="content-section hidden">
                <div class="flex justify-between items-center mb-4">
                    <h2 class="font-bold text-lg">Transactions</h2>
                    <div class="flex space-x-2">
                        <button class="px-3 py-1 text-sm rounded-full bg-gray-100 dark:bg-gray-700">Tout</button>
                        <button class="px-3 py-1 text-sm rounded-full">Dépenses</button>
                        <button class="px-3 py-1 text-sm rounded-full">Revenus</button>
                    </div>
                </div>
                
                <div class="mb-6">
                    <div class="flex justify-between items-center mb-2">
                        <h3 class="font-medium text-gray-600 dark:text-gray-300">Aujourd'hui</h3>
                        <span class="text-sm font-medium text-red-500">-47,70 €</span>
                    </div>
                    
                    <div class="space-y-2">
                        <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-3">
                            <div class="flex items-center justify-between">
                                <div class="flex items-center">
                                    <div class="w-10 h-10 rounded-full bg-red-100 dark:bg-red-900 flex items-center justify-center mr-3">
                                        <i class="fas fa-shopping-bag text-red-500"></i>
                                    </div>
                                    <div>
                                        <p class="font-medium">Courses</p>
                                        <p class="text-xs text-gray-600 dark:text-gray-300">Supermarché</p>
                                    </div>
                                </div>
                                <span class="font-medium text-red-500">-45,20 €</span>
                            </div>
                        </div>
                        
                        <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-3">
                            <div class="flex items-center justify-between">
                                <div class="flex items-center">
                                    <div class="w-10 h-10 rounded-full bg-blue-100 dark:bg-blue-900 flex items-center justify-center mr-3">
                                        <i class="fas fa-bus text-blue-500"></i>
                                    </div>
                                    <div>
                                        <p class="font-medium">Transport</p>
                                        <p class="text-xs text-gray-600 dark:text-gray-300">Métro</p>
                                    </div>
                                </div>
                                <span class="font-medium text-red-500">-2,50 €</span>
                            </div>
                        </div>
                    </div>
                </div>
                
                <div class="mb-6">
                    <div class="flex justify-between items-center mb-2">
                        <h3 class="font-medium text-gray-600 dark:text-gray-300">Hier</h3>
                        <span class="text-sm font-medium text-green-500">+2 300,00 €</span>
                    </div>
                    
                    <div class="space-y-2">
                        <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-3">
                            <div class="flex items-center justify-between">
                                <div class="flex items-center">
                                    <div class="w-10 h-10 rounded-full bg-green-100 dark:bg-green-900 flex items-center justify-center mr-3">
                                        <i class="fas fa-wallet text-green-500"></i>
                                    </div>
                                    <div>
                                        <p class="font-medium">Salaire</p>
                                        <p class="text-xs text-gray-600 dark:text-gray-300">Entreprise XYZ</p>
                                    </div>
                                </div>
                                <span class="font-medium text-green-500">+2 300,00 €</span>
                            </div>
                        </div>
                    </div>
                </div>
                
                <div class="mb-6">
                    <div class="flex justify-between items-center mb-2">
                        <h3 class="font-medium text-gray-600 dark:text-gray-300">23 juin 2023</h3>
                        <span class="text-sm font-medium text-red-500">-86,45 €</span>
                    </div>
                    
                    <div class="space-y-2">
                        <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-3">
                            <div class="flex items-center justify-between">
                                <div class="flex items-center">
                                    <div class="w-10 h-10 rounded-full bg-purple-100 dark:bg-purple-900 flex items-center justify-center mr-3">
                                        <i class="fas fa-tshirt text-purple-500"></i>
                                    </div>
                                    <div>
                                        <p class="font-medium">Vêtements</p>
                                        <p class="text-xs text-gray-600 dark:text-gray-300">Boutique ABC</p>
                                    </div>
                                </div>
                                <span class="font-medium text-red-500">-65,00 €</span>
                            </div>
                        </div>
                        
                        <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-3">
                            <div class="flex items-center justify-between">
                                <div class="flex items-center">
                                    <div class="w-10 h-10 rounded-full bg-yellow-100 dark:bg-yellow-900 flex items-center justify-center mr-3">
                                        <i class="fas fa-utensils text-yellow-500"></i>
                                    </div>
                                    <div>
                                        <p class="font-medium">Restaurant</p>
                                        <p class="text-xs text-gray-600 dark:text-gray-300">Le Bon Repas</p>
                                    </div>
                                </div>
                                <span class="font-medium text-red-500">-21,45 €</span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Épargne -->
            <div id="savings" class="content-section hidden">
                <div class="flex justify-between items-center mb-6">
                    <h2 class="font-bold text-lg">Projets d'épargne</h2>
                    <button id="add-savings-btn" class="bg-primary text-white px-4 py-2 rounded-lg flex items-center">
                        <i class="fas fa-plus mr-2"></i> Nouveau projet
                    </button>
                </div>
                
                <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6">
                    <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-4">
                        <div class="flex justify-between items-center mb-3">
                            <h3 class="font-bold">Nouveau téléphone</h3>
                            <span class="text-sm bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-2 py-1 rounded">En cours</span>
                        </div>
                        
                        <div class="flex justify-between items-center mb-2">
                            <span class="text-sm text-gray-600 dark:text-gray-300">Objectif</span>
                            <span class="font-medium">800,00 €</span>
                        </div>
                        
                        <div class="progress-bar mb-2">
                            <div class="progress-fill bg-primary" style="width: 45%"></div>
                        </div>
                        
                        <div class="flex justify-between text-sm mb-4">
                            <span class="text-gray-600 dark:text-gray-300">360,00 € épargnés</span>
                            <span class="text-gray-600 dark:text-gray-300">440,00 € restants</span>
                        </div>
                        
                        <div class="flex justify-between items-center text-sm">
                            <span class="text-gray-600 dark:text-gray-300">Échéance: 15/12/2023</span>
                            <button class="text-primary font-medium">Ajouter des fonds</button>
                        </div>
                    </div>
                    
                    <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-4">
                        <div class="flex justify-between items-center mb-3">
                            <h3 class="font-bold">Vacances</h3>
                            <span class="text-sm bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-2 py-1 rounded">En cours</span>
                        </div>
                        
                        <div class="flex justify-between items-center mb-2">
                            <span class="text-sm text-gray-600 dark:text-gray-300">Objectif</span>
                            <span class="font-medium">1 500,00 €</span>
                        </div>
                        
                        <div class="progress-bar mb-2">
                            <div class="progress-fill bg-secondary" style="width: 20%"></div>
                        </div>
                        
                        <div class="flex justify-between text-sm mb-4">
                            <span class="text-gray-600 dark:text-gray-300">300,00 € épargnés</span>
                            <span class="text-gray-600 dark:text-gray-300">1 200,00 € restants</span>
                        </div>
                        
                        <div class="flex justify-between items-center text-sm">
                            <span class="text-gray-600 dark:text-gray-300">Échéance: 01/06/2024</span>
                            <button class="text-primary font-medium">Ajouter des fonds</button>
                        </div>
                    </div>
                    
                    <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-4">
                        <div class="flex justify-between items-center mb-3">
                            <h3 class="font-bold">Voiture</h3>
                            <span class="text-sm bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200 px-2 py-1 rounded">Terminé</span>
                        </div>
                        
                        <div class="flex justify-between items-center mb-2">
                            <span class="text-sm text-gray-600 dark:text-gray-300">Objectif</span>
                            <span class="font-medium">5 000,00 €</span>
                        </div>
                        
                        <div class="progress-bar mb-2">
                            <div class="progress-fill bg-green-500" style="width: 100%"></div>
                        </div>
                        
                        <div class="flex justify-between text-sm mb-4">
                            <span class="text-gray-600 dark:text-gray-300">5 000,00 € épargnés</span>
                            <span class="text-gray-600 dark:text-gray-300">0,00 € restants</span>
                        </div>
                        
                        <div class="flex justify-between items-center text-sm">
                            <span class="text-gray-600 dark:text-gray-300">Terminé le: 15/05/2023</span>
                            <button class="text-primary font-medium">Détails</button>
                        </div>
                    </div>
                </div>
                
                <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-4">
                    <h2 class="font-bold text-lg mb-4">Plan d'épargne recommandé</h2>
                    
                    <div class="space-y-4">
                        <div class="flex items-center justify-between p-3 bg-gray-50 dark:bg-gray-700 rounded-lg">
                            <div>
                                <p class="font-medium">Nouveau téléphone</p>
                                <p class="text-sm text-gray-600 dark:text-gray-300">440,00 € restants sur 5 mois</p>
                            </div>
                            <div>
                                <p class="font-medium text-primary">88,00 €/mois</p>
                            </div>
                        </div>
                        
                        <div class="flex items-center justify-between p-3 bg-gray-50 dark:bg-gray-700 rounded-lg">
                            <div>
                                <p class="font-medium">Vacances</p>
                                <p class="text-sm text-gray-600 dark:text-gray-300">1 200,00 € restants sur 11 mois</p>
                            </div>
                            <div>
                                <p class="font-medium text-primary">109,09 €/mois</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Statistiques -->
            <div id="stats" class="content-section hidden">
                <div class="flex justify-between items-center mb-6">
                    <h2 class="font-bold text-lg">Statistiques</h2>
                    <div class="flex items-center">
                        <select class="bg-gray-100 dark:bg-gray-700 border-0 rounded-lg px-3 py-2 text-sm">
                            <option>Ce mois-ci</option>
                            <option>Le mois dernier</option>
                            <option>3 derniers mois</option>
                            <option>Cette année</option>
                        </select>
                    </div>
                </div>
                
                <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-4 mb-6">
                    <h3 class="font-medium mb-4">Répartition des dépenses</h3>
                    <div class="chart-container">
                        <!-- Ce serait un graphique en réalité -->
                        <div class="flex items-end h-48 space-x-2">
                            <div class="flex-1 bg-blue-500 rounded-t" style="height: 70%"></div>
                            <div class="flex-1 bg-green-500 rounded-t" style="height: 40%"></div>
                            <div class="flex-1 bg-yellow-500 rounded-t" style="height: 30%"></div>
                            <div class="flex-1 bg-red-500 rounded-t" style="height: 60%"></div>
                            <div class="flex-1 bg-purple-500 rounded-t" style="height: 25%"></div>
                            <div class="flex-1 bg-pink-500 rounded-t" style="height: 50%"></div>
                        </div>
                        <div class="flex justify-between mt-2 text-xs text-gray-600 dark:text-gray-300">
                            <span>Alim.</span>
                            <span>Logt.</span>
                            <span>Trans.</span>
                            <span>Loisirs</span>
                            <span>Santé</span>
                            <span>Autres</span>
                        </div>
                    </div>
                </div>
                
                <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-6">
                    <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-4">
                        <h3 class="font-medium mb-4">Dépenses les plus fréquentes</h3>
                        <div class="space-y-3">
                            <div class="flex items-center">
                                <div class="w-8 h-8 rounded-full bg-blue-100 dark:bg-blue-900 flex items-center justify-center mr-3">
                                    <i class="fas fa-bus text-blue-500 text-sm"></i>
                                </div>
                                <div class="flex-1">
                                    <p class="text-sm">Transport</p>
                                </div>
                                <div>
                                    <p class="text-sm font-medium">22 fois</p>
                                </div>
                            </div>
                            
                            <div class="flex items-center">
                                <div class="w-8 h-8 rounded-full bg-yellow-100 dark:bg-yellow-900 flex items-center justify-center mr-3">
                                    <i class="fas fa-coffee text-yellow-500 text-sm"></i>
                                </div>
                                <div class="flex-1">
                                    <p class="text-sm">Café</p>
                                </div>
                                <div>
                                    <p class="text-sm font-medium">18 fois</p>
                                </div>
                            </div>
                            
                            <div class="flex items-center">
                                <div class="w-8 h-8 rounded-full bg-red-100 dark:bg-red-900 flex items-center justify-center mr-3">
                                    <i class="fas fa-shopping-bag text-red-500 text-sm"></i>
                                </div>
                                <div class="flex-1">
                                    <p class="text-sm">Courses</p>
                                </div>
                                <div>
                                    <p class="text-sm font-medium">12 fois</p>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-4">
                        <h3 class="font-medium mb-4">Dépenses les plus élevées</h3>
                        <div class="space-y-3">
                            <div class="flex items-center">
                                <div class="w-8 h-8 rounded-full bg-purple-100 dark:bg-purple-900 flex items-center justify-center mr-3">
                                    <i class="fas fa-laptop text-purple-500 text-sm"></i>
                                </div>
                                <div class="flex-1">
                                    <p class="text-sm">Ordinateur</p>
                                </div>
                                <div>
                                    <p class="text-sm font-medium text-red-500">-850,00 €</p>
                                </div>
                            </div>
                            
                            <div class="flex items-center">
                                <div class="w-8 h-8 rounded-full bg-green-100 dark:bg-green-900 flex items-center justify-center mr-3">
                                    <i class="fas fa-plane text-green-500 text-sm"></i>
                                </div>
                                <div class="flex-1">
                                    <p class="text-sm">Voyage</p>
                                </div>
                                <div>
                                    <p class="text-sm font-medium text-red-500">-600,00 €</p>
                                </div>
                            </div>
                            
                            <div class="flex items-center">
                                <div class="w-8 h-8 rounded-full bg-pink-100 dark:bg-pink-900 flex items-center justify-center mr-3">
                                    <i class="fas fa-mobile-alt text-pink-500 text-sm"></i>
                                </div>
                                <div class="flex-1">
                                    <p class="text-sm">Téléphone</p>
                                </div>
                                <div>
                                    <p class="text-sm font-medium text-red-500">-450,00 €</p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                
                <div class="bg-white dark:bg-gray-800 rounded-lg shadow p-4">
                    <h3 class="font-medium mb-4">Suivi des plans d'économie</h3>
                    <div class="space-y-4">
                        <div>
                            <div class="flex justify-between mb-1">
                                <span class="text-sm">Alimentation</span>
                                <span class="text-sm">75% respecté</span>
                            </div>
                            <div class="progress-bar">
                                <div class="progress-fill bg-green-500" style="width: 75%"></div>
                            </div>
                        </div>
                        
                        <div>
                            <div class="flex justify-between mb-1">
                                <span class="text-sm">Shopping</span>
                                <span class="text-sm">45% respecté</span>
                            </div>
                            <div class="progress-bar">
                                <div class="progress-fill bg-yellow-500" style="width: 45%"></div>
                            </div>
                        </div>
                        
                        <div>
                            <div class="flex justify-between mb-1">
                                <span class="text-sm">Loisirs</span>
                                <span class="text-sm">90% respecté</span>
                            </div>
                            <div class="progress-bar">
                                <div class="progress-fill bg-green-500" style="width: 90%"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </main>

        <!-- Menu flottant -->
        <div class="floating-btn">
            <button id="add-transaction-btn" class="w-14 h-14 rounded-full bg-primary text-white flex items-center justify-center text-2xl">
                <i class="fas fa-plus"></i>
            </button>
        </div>

        <!-- Overlay d'ajout de transaction -->
        <div id="transaction-overlay" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden flex items-center justify-center p-4">
            <div class="bg-white dark:bg-gray-800 rounded-lg shadow-xl w-full max-w-md max-h-[90vh] overflow-y-auto">
                <div class="p-4 border-b border-gray-200 dark:border-gray-700 flex justify-between items-center">
                    <h3 class="font-bold text-lg">Nouvelle transaction</h3>
                    <button id="close-transaction-btn" class="text-gray-500 dark:text-gray-300 hover:text-gray-700 dark:hover:text-gray-100">
                        <i class="fas fa-times"></i>
                    </button>
                </div>
                
                <div class="p-4">
                    <div class="flex space-x-2 mb-6">
                        <button class="transaction-type-btn flex-1 py-2 rounded-lg border-2 border-primary font-medium bg-primary text-white" data-type="expense">
                            Dépense
                        </button>
                        <button class="transaction-type-btn flex-1 py-2 rounded-lg border-2 border-gray-300 dark:border-gray-600 font-medium" data-type="income">
                            Revenu
                        </button>
                    </div>
                    
                    <div class="mb-4">
                        <label class="block text-sm font-medium mb-1">Titre</label>
                        <input type="text" class="w-full px-4 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 input-highlight" placeholder="Ex: Courses, Salaire...">
                    </div>
                    
                    <div class="mb-4">
                        <label class="block text-sm font-medium mb-1">Catégorie</label>
                        <div class="grid grid-cols-3 gap-2">
                            <button class="category-chip py-2 px-3 rounded-lg border border-gray-300 dark:border-gray-600 text-sm flex items-center justify-center">
                                <i class="fas fa-shopping-bag mr-1 text-red-500"></i> Courses
                            </button>
                            <button class="category-chip py-2 px-3 rounded-lg border border-gray-300 dark:border-gray-600 text-sm flex items-center justify-center">
                                <i class="fas fa-tshirt mr-1 text-purple-500"></i> Vêtements
                            </button>
                            <button class="category-chip py-2 px-3 rounded-lg border border-gray-300 dark:border-gray-600 text-sm flex items-center justify-center">
                                <i class="fas fa-bus mr-1 text-blue-500"></i> Transport
                            </button>
                            <button class="category-chip py-2 px-3 rounded-lg border border-gray-300 dark:border-gray-600 text-sm flex items-center justify-center">
                                <i class="fas fa-utensils mr-1 text-yellow-500"></i> Restaurant
                            </button>
                            <button class="category-chip py-2 px-3 rounded-lg border border-gray-300 dark:border-gray-600 text-sm flex items-center justify-center">
                                <i class="fas fa-home mr-1 text-green-500"></i> Logement
                            </button>
                            <button class="category-chip py-2 px-3 rounded-lg border border-gray-300 dark:border-gray-600 text-sm flex items-center justify-center">
                                <i class="fas fa-plus-circle mr-1 text-gray-500"></i> Autre
                            </button>
                        </div>
                    </div>
                    
                    <div class="mb-4">
                        <label class="block text-sm font-medium mb-1">Montant</label>
                        <div class="relative">
                            <span class="absolute left-3 top-1/2 transform -translate-y-1/2"></span>
                            <input type="number" class="w-full pl-8 pr-4 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 input-highlight" placeholder="0,00">
                        </div>
                    </div>
                    
                    <div class="mb-4">
                        <label class="block text-sm font-medium mb-1">Date</label>
                        <input type="date" class="w-full px-4 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 input-highlight">
                    </div>
                    
                    <div class="mb-4">
                        <label class="block text-sm font-medium mb-1">Notes (optionnel)</label>
                        <textarea class="w-full px-4 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 input-highlight" rows="2" placeholder="Ajoutez des détails..."></textarea>
                    </div>
                    
                    <div class="flex space-x-3">
                        <button class="flex-1 py-2 rounded-lg border border-gray-300 dark:border-gray-600 font-medium">
                            Annuler
                        </button>
                        <button class="flex-1 py-2 rounded-lg bg-primary text-white font-medium">
                            Enregistrer
                        </button>
                    </div>
                </div>
            </div>
        </div>

        <!-- Overlay d'ajout de projet d'épargne -->
        <div id="savings-overlay" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden flex items-center justify-center p-4">
            <div class="bg-white dark:bg-gray-800 rounded-lg shadow-xl w-full max-w-md max-h-[90vh] overflow-y-auto">
                <div class="p-4 border-b border-gray-200 dark:border-gray-700 flex justify-between items-center">
                    <h3 class="font-bold text-lg">Nouveau projet d'épargne</h3>
                    <button id="close-savings-btn" class="text-gray-500 dark:text-gray-300 hover:text-gray-700 dark:hover:text-gray-100">
                        <i class="fas fa-times"></i>
                    </button>
                </div>
                
                <div class="p-4">
                    <div class="mb-4">
                        <label class="block text-sm font-medium mb-1">Nom du projet</label>
                        <input type="text" class="w-full px-4 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 input-highlight" placeholder="Ex: Nouveau téléphone, Vacances...">
                    </div>
                    
                    <div class="mb-4">
                        <label class="block text-sm font-medium mb-1">Montant cible</label>
                        <div class="relative">
                            <span class="absolute left-3 top-1/2 transform -translate-y-1/2"></span>
                            <input type="number" class="w-full pl-8 pr-4 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 input-highlight" placeholder="0,00">
                        </div>
                    </div>
                    
                    <div class="mb-4">
                        <label class="block text-sm font-medium mb-1">Date cible</label>
                        <input type="date" class="w-full px-4 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 input-highlight">
                    </div>
                    
                    <div class="mb-6">
                        <label class="block text-sm font-medium mb-1">Description (optionnel)</label>
                        <textarea class="w-full px-4 py-2 rounded-lg border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 input-highlight" rows="2" placeholder="Décrivez votre projet..."></textarea>
                    </div>
                    
                    <div class="bg-blue-50 dark:bg-blue-900 rounded-lg p-3 mb-6">
                        <div class="flex items-start">
                            <i class="fas fa-info-circle text-blue-500 mt-1 mr-2"></i>
                            <p class="text-sm text-blue-800 dark:text-blue-200">
                                En fonction de votre date cible, CASHRULER calculera automatiquement un plan d'épargne hebdomadaire ou mensuel pour atteindre votre objectif.
                            </p>
                        </div>
                    </div>
                    
                    <div class="flex space-x-3">
                        <button class="flex-1 py-2 rounded-lg border border-gray-300 dark:border-gray-600 font-medium">
                            Annuler
                        </button>
                        <button class="flex-1 py-2 rounded-lg bg-primary text-white font-medium">
                            Créer le projet
                        </button>
                    </div>
                </div>
            </div>
        </div>

        <!-- Overlay de paramètres -->
        <div id="settings-overlay" class="fixed inset-0 bg-black bg-opacity-50 z-50 hidden flex items-center justify-center p-4">
            <div class="bg-white dark:bg-gray-800 rounded-lg shadow-xl w-full max-w-md max-h-[90vh] overflow-y-auto">
                <div class="p-4 border-b border-gray-200 dark:border-gray-700 flex justify-between items-center">
                    <h3 class="font-bold text-lg">Paramètres</h3>
                    <button id="close-settings-btn" class="text-gray-500 dark:text-gray-300 hover:text-gray-700 dark:hover:text-gray-100">
                        <i class="fas fa-times"></i>
                    </button>
                </div>
                
                <div class="p-4">
                    <div class="mb-6">
                        <h4 class="font-medium mb-3">Compte</h4>
                        <div class="space-y-3">
                            <button class="w-full text-left p-3 rounded-lg border border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center justify-between">
                                <span>Modifier le code PIN</span>
                                <i class="fas fa-chevron-right text-gray-400"></i>
                            </button>
                            <button class="w-full text-left p-3 rounded-lg border border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center justify-between">
                                <span>Sauvegarde en ligne</span>
                                <div class="flex items-center">
                                    <span class="text-sm text-gray-500 dark:text-gray-300 mr-2">Non connecté</span>
                                    <i class="fas fa-chevron-right text-gray-400"></i>
                                </div>
                            </button>
                        </div>
                    </div>
                    
                    <div class="mb-6">
                        <h4 class="font-medium mb-3">Préférences</h4>
                        <div class="space-y-3">
                            <div class="flex items-center justify-between p-3 rounded-lg border border-gray-200 dark:border-gray-700">
                                <span>Thème sombre</span>
                                <label class="relative inline-flex items-center cursor-pointer">
                                    <input type="checkbox" class="sr-only peer" id="dark-mode-toggle">
                                    <div class="w-11 h-6 bg-gray-200 peer-focus:outline-none rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] 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-primary"></div>
                                </label>
                            </div>
                            
                            <div class="flex items-center justify-between p-3 rounded-lg border border-gray-200 dark:border-gray-700">
                                <span>Devise</span>
                                <div class="flex items-center">
                                    <span class="mr-2">€ (EUR)</span>
                                    <i class="fas fa-chevron-right text-gray-400"></i>
                                </div>
                            </div>
                            
                            <div class="flex items-center justify-between p-3 rounded-lg border border-gray-200 dark:border-gray-700">
                                <span>Notifications</span>
                                <label class="relative inline-flex items-center cursor-pointer">
                                    <input type="checkbox" class="sr-only peer" checked>
                                    <div class="w-11 h-6 bg-gray-200 peer-focus:outline-none rounded-full peer dark:bg-gray-700 peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] 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-primary"></div>
                                </label>
                            </div>
                        </div>
                    </div>
                    
                    <div class="mb-6">
                        <h4 class="font-medium mb-3">Aide & Support</h4>
                        <div class="space-y-3">
                            <button class="w-full text-left p-3 rounded-lg border border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center justify-between">
                                <span>Centre d'aide</span>
                                <i class="fas fa-chevron-right text-gray-400"></i>
                            </button>
                            <button class="w-full text-left p-3 rounded-lg border border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center justify-between">
                                <span>Nous contacter</span>
                                <i class="fas fa-chevron-right text-gray-400"></i>
                            </button>
                            <button class="w-full text-left p-3 rounded-lg border border-gray-200 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700 flex items-center justify-between">
                                <span>Conditions d'utilisation</span>
                                <i class="fas fa-chevron-right text-gray-400"></i>
                            </button>
                        </div>
                    </div>
                    
                    <div>
                        <button class="w-full py-3 rounded-lg bg-red-50 dark:bg-red-900 text-red-500 dark:text-red-300 font-medium flex items-center justify-center">
                            <i class="fas fa-sign-out-alt mr-2"></i>
                            Déconnexion
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        // Gestion de l'authentification
        document.addEventListener('DOMContentLoaded', function() {
            const pinDigits = document.querySelectorAll('.pin-digit');
            const numberBtns = document.querySelectorAll('.number-btn');
            const deleteBtn = document.querySelector('.delete-btn');
            const fingerprintBtn = document.getElementById('fingerprint-btn');
            const authScreen = document.getElementById('auth-screen');
            const mainApp = document.getElementById('main-app');
            
            let pinCode = [];
            const correctPin = '1234'; // Code PIN par défaut
            
            // Saisie du code PIN
            numberBtns.forEach(btn => {
                btn.addEventListener('click', function() {
                    if (pinCode.length < 4) {
                        const value = this.getAttribute('data-value');
                        pinCode.push(value);
                        updatePinDisplay();
                        
                        if (pinCode.length === 4) {
                            checkPinCode();
                        }
                    }
                });
            });
            
            // Suppression du code PIN
            deleteBtn.addEventListener('click', function() {
                if (pinCode.length > 0) {
                    pinCode.pop();
                    updatePinDisplay();
                }
            });
            
            // Authentification par empreinte digitale
            fingerprintBtn.addEventListener('click', function() {
                // Simulation d'authentification réussie
                setTimeout(() => {
                    authScreen.classList.add('hidden');
                    mainApp.classList.remove('hidden');
                }, 500);
            });
            
            // Mise à jour de l'affichage du code PIN
            function updatePinDisplay() {
                pinDigits.forEach((digit, index) => {
                    if (index < pinCode.length) {
                        digit.innerHTML = '•';
                    } else {
                        digit.innerHTML = '';
                    }
                });
            }
            
            // Vérification du code PIN
            function checkPinCode() {
                if (pinCode.join('') === correctPin) {
                    authScreen.classList.add('hidden');
                    mainApp.classList.remove('hidden');
                } else {
                    pinCode = [];
                    updatePinDisplay();
                    alert('Code PIN incorrect. Veuillez réessayer.');
                }
            }
            
            // Navigation
            const navBtns = document.querySelectorAll('.nav-btn');
            const contentSections = document.querySelectorAll('.content-section');
            
            navBtns.forEach(btn => {
                btn.addEventListener('click', function() {
                    const target = this.getAttribute('data-target');
                    
                    // Mettre à jour l'état actif du bouton
                    navBtns.forEach(navBtn => {
                        navBtn.classList.remove('active');
                        navBtn.classList.add('text-gray-600', 'dark:text-gray-300');
                    });
                    
                    this.classList.add('active');
                    this.classList.remove('text-gray-600', 'dark:text-gray-300');
                    
                    // Afficher la section cible
                    contentSections.forEach(section => {
                        section.classList.add('hidden');
                    });
                    
                    document.getElementById(target).classList.remove('hidden');
                });
            });
            
            // Gestion du thème sombre
            const themeToggle = document.getElementById('theme-toggle');
            const darkModeToggle = document.getElementById('dark-mode-toggle');
            const html = document.documentElement;
            
            themeToggle.addEventListener('click', function() {
                html.classList.toggle('dark');
                localStorage.setItem('darkMode', html.classList.contains('dark'));
                
                if (html.classList.contains('dark')) {
                    themeToggle.innerHTML = '<i class="fas fa-sun"></i>';
                } else {
                    themeToggle.innerHTML = '<i class="fas fa-moon"></i>';
                }
            });
            
            darkModeToggle.addEventListener('change', function() {
                html.classList.toggle('dark');
                localStorage.setItem('darkMode', html.classList.contains('dark'));
                
                if (html.classList.contains('dark')) {
                    themeToggle.innerHTML = '<i class="fas fa-sun"></i>';
                } else {
                    themeToggle.innerHTML = '<i class="fas fa-moon"></i>';
                }
            });
            
            // Vérifier le mode sombre au chargement
            if (localStorage.getItem('darkMode') === 'true') {
                html.classList.add('dark');
                themeToggle.innerHTML = '<i class="fas fa-sun"></i>';
                darkModeToggle.checked = true;
            }
            
            // Gestion des overlays
            const addTransactionBtn = document.getElementById('add-transaction-btn');
            const transactionOverlay = document.getElementById('transaction-overlay');
            const closeTransactionBtn = document.getElementById('close-transaction-btn');
            
            const addSavingsBtn = document.getElementById('add-savings-btn');
            const savingsOverlay = document.getElementById('savings-overlay');
            const closeSavingsBtn = document.getElementById('close-savings-btn');
            
            const settingsBtn = document.getElementById('settings-btn');
            const settingsOverlay = document.getElementById('settings-overlay');
            const closeSettingsBtn = document.getElementById('close-settings-btn');
            
            // Transaction overlay
            addTransactionBtn.addEventListener('click', function() {
                transactionOverlay.classList.remove('hidden');
            });
            
            closeTransactionBtn.addEventListener('click', function() {
                transactionOverlay.classList.add('hidden');
            });
            
            // Savings overlay
            addSavingsBtn.addEventListener('click', function() {
                savingsOverlay.classList.remove('hidden');
            });
            
            closeSavingsBtn.addEventListener('click', function() {
                savingsOverlay.classList.add('hidden');
            });
            
            // Settings overlay
            settingsBtn.addEventListener('click', function() {
                settingsOverlay.classList.remove('hidden');
            });
            
            closeSettingsBtn.addEventListener('click', function() {
                settingsOverlay.classList.add('hidden');
            });
            
            // Gestion du type de transaction
            const transactionTypeBtns = document.querySelectorAll('.transaction-type-btn');
            
            transactionTypeBtns.forEach(btn => {
                btn.addEventListener('click', function() {
                    const type = this.getAttribute('data-type');
                    
                    transactionTypeBtns.forEach(tBtn => {
                        tBtn.classList.remove('border-primary', 'bg-primary', 'text-white');
                        tBtn.classList.add('border-gray-300', 'dark:border-gray-600');
                    });
                    
                    this.classList.add('border-primary', 'bg-primary', 'text-white');
                    this.classList.remove('border-gray-300', 'dark:border-gray-600');
                });
            });
            
            // Message de bienvenue personnalisé
            const welcomeMessage = document.getElementById('welcome-message');
            const hours = new Date().getHours();
            
            if (hours < 12) {
                welcomeMessage.textContent = 'Bonjour, John';
            } else if (hours < 18) {
                welcomeMessage.textContent = 'Bon après-midi, John';
            } else {
                welcomeMessage.textContent = 'Bonsoir, John';
            }
        });
    </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=Kesif/measdouspace" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>