-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
979 lines (901 loc) · 67.1 KB
/
index.html
File metadata and controls
979 lines (901 loc) · 67.1 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
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Nūr Frequencies - Ruqyah Vibratoire</title>
<!-- Favicon Premium / Top 1% Design -->
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0%25' y1='0%25' x2='100%25' y2='100%25'%3E%3Cstop offset='0%25' stop-color='%23fbbf24'/%3E%3Cstop offset='100%25' stop-color='%23b45309'/%3E%3C/linearGradient%3E%3Cfilter id='f'%3E%3CfeGaussianBlur stdDeviation='2' result='b'/%3E%3CfeMerge%3E%3CfeMergeNode in='b'/%3E%3CfeMergeNode in='SourceGraphic'/%3E%3C/feMerge%3E%3C/filter%3E%3C/defs%3E%3Crect width='100' height='100' rx='22' fill='%23060913' stroke='%23fbbf24' stroke-width='1' stroke-opacity='0.3'/%3E%3Cpolyline points='85 50 70 50 58 80 42 20 30 50 15 50' fill='none' stroke='url(%23g)' stroke-width='8' stroke-linecap='round' stroke-linejoin='round' filter='url(%23f)'/%3E%3C/svg%3E">
<!-- Tailwind CSS -->
<script src="https://cdn.tailwindcss.com"></script>
<!-- React & ReactDOM -->
<script crossorigin src="https://unpkg.com/react@18/umd/react.production.min.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"></script>
<!-- Babel -->
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<style>
/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #060913; }
::-webkit-scrollbar-thumb { background: #f59e0b; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #fbbf24; }
</style>
</head>
<body class="bg-[#060913]">
<div id="root"></div>
<script type="text/babel">
const { useState, useEffect, useRef } = React;
// --- COMPOSANTS D'ICÔNES DE BASE ---
const Play = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><polygon points="5 3 19 12 5 21 5 3"/></svg>;
const Pause = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><rect x="6" y="4" width="4" height="16"/><rect x="14" y="4" width="4" height="16"/></svg>;
const Volume2 = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"/><path d="M15.54 8.46a5 5 0 0 1 0 7.07"/><path d="M19.07 4.93a10 10 0 0 1 0 14.14"/></svg>;
const Shield = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/></svg>;
const Activity = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><polyline points="22 12 18 12 15 21 9 3 6 12 2 12"/></svg>;
const Sparkles = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><path d="m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z"/></svg>;
const Globe = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><circle cx="12" cy="12" r="10"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"/><path d="M2 12h20"/></svg>;
const ChevronRight = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><polyline points="9 18 15 12 9 6"/></svg>;
const Menu = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><line x1="4" x2="20" y1="12" y2="12"/><line x1="4" x2="20" y1="6" y2="6"/><line x1="4" x2="20" y1="18" y2="18"/></svg>;
const X = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><line x1="18" x2="6" y1="6" y2="18"/><line x1="6" x2="18" y1="6" y2="18"/></svg>;
const Music = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><path d="M9 18V5l12-2v13"/><circle cx="6" cy="18" r="3"/><circle cx="18" cy="16" r="3"/></svg>;
const Radio = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><path d="M4.9 19.1C1 15.2 1 8.8 4.9 4.9"/><path d="M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5"/><circle cx="12" cy="12" r="2"/><path d="M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5"/><path d="M19.1 4.9C23 8.8 23 15.1 19.1 19"/></svg>;
const Info = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg>;
const Search = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>;
const Heart = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"/></svg>;
const Moon = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><path d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"/></svg>;
const Sun = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><circle cx="12" cy="12" r="5"/><line x1="12" y1="1" x2="12" y2="3"/><line x1="12" y1="21" x2="12" y2="23"/><line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/><line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/><line x1="1" y1="12" x2="3" y2="12"/><line x1="21" y1="12" x2="23" y2="12"/><line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/><line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/></svg>;
const Target = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><circle cx="12" cy="12" r="10"/><circle cx="12" cy="12" r="6"/><circle cx="12" cy="12" r="2"/></svg>;
const ArrowLeft = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline></svg>;
const Shuffle = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><polyline points="16 3 21 3 21 8"/><line x1="4" y1="20" x2="21" y2="3"/><polyline points="21 16 21 21 16 21"/><line x1="15" y1="15" x2="21" y2="21"/><line x1="4" y1="4" x2="9" y2="9"/></svg>;
const RepeatIcon = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><polyline points="17 1 21 5 17 9"/><path d="M3 11V9a4 4 0 0 1 4-4h14"/><polyline points="7 23 3 19 7 15"/><path d="M21 13v2a4 4 0 0 1-4 4H3"/></svg>;
const Repeat1Icon = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><polyline points="17 1 21 5 17 9"/><path d="M3 11V9a4 4 0 0 1 4-4h14"/><polyline points="7 23 3 19 7 15"/><path d="M21 13v2a4 4 0 0 1-4 4H3"/><text x="12" y="15" fontSize="8" fontFamily="sans-serif" fill="currentColor" stroke="none" textAnchor="middle" fontWeight="bold">1</text></svg>;
// --- NOUVELLES ICÔNES SURNATURELLES & PIEUSES ---
const Zap = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg>;
const Eye = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/></svg>;
const Flame = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><path d="M8.5 14.5A2.5 2.5 0 0011 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 11-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 002.5 2.5z"/></svg>;
const Compass = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><circle cx="12" cy="12" r="10"/><polygon points="16.24 7.76 14.12 14.12 7.76 16.24 9.88 9.88 16.24 7.76"/></svg>;
const Anchor = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><circle cx="12" cy="5" r="3"/><line x1="12" y1="22" x2="12" y2="8"/><path d="M5 12H2a10 10 0 0020 0h-3"/></svg>;
const Feather = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><path d="M20.24 12.24a6 6 0 00-8.49-8.49L5 10.5V19h8.5z"/><line x1="16" y1="8" x2="2" y2="22"/><line x1="17.5" y1="15" x2="9" y2="15"/></svg>;
const Star = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg>;
const Key = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><path d="M21 2l-2 2m-7.61 7.61a5.5 5.5 0 11-7.778 7.778 5.5 5.5 0 017.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4"/></svg>;
const Crown = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><path d="M2 4l3 12h14l3-12-6 7-4-7-4 7-6-7zm3 16h14"/></svg>;
const Wind = (props) => <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" {...props}><path d="M9.59 4.59A2 2 0 1111 8H2m10.59 11.41A2 2 0 1014 16H2m15.73-8.27A2.5 2.5 0 1119.5 12H2"/></svg>;
// --- DICTIONNAIRE DE TRADUCTION (i18n) ---
const translations = {
FR: {
navScience: "La Science",
navPrograms: "Programmes",
navLibrary: "Bibliothèque FVC",
heroBadge: "100% Gratuit & Accessible à tous",
heroTitle1: "L'Élévation par la",
heroTitle2: "Résonance Divine",
heroDesc: "Découvrez la première plateforme mondiale gratuite fusionnant la puissance millénaire de la Ruqyah avec la précision des fréquences vibratoires curatives.",
heroBtnStart: "Commencer la Guérison",
heroBtnExplore: "Explorer le Catalogue",
scienceBadge: "Fondements Scientifiques",
scienceTitle: "La Synergie du Son et de l'Esprit",
scienceP1: "Notre plateforme utilise des ondes isochrones et des fréquences solfèges (comme le 528Hz, connu pour la réparation de l'ADN) superposées à des récitations coraniques de très haute définition.",
scienceP2: "Cette ingénierie acoustique permet au cerveau d'entrer plus rapidement en ondes Theta (état méditatif profond), maximisant la réceptivité spirituelle, la relaxation du système nerveux et la purification cellulaire.",
scienceBtn: "Écouter les fréquences",
progSectionTitle: "Thérapies Ciblées & Surnaturelles",
progSectionDesc: "Découvrez nos 17 programmes spécialisés conçus pour répondre aux maux de l'âme, du corps et détruire les attaques occultes selon la tradition prophétique.",
playProgram: "Lancer le programme",
backToPrograms: "Retour aux programmes",
sessionsCount: "Sessions",
libTitle: "Le Sanctuaire des Fréquences",
libDesc: "Accès libre et gratuit à nos 39 sessions de Ruqyah Vibratoire",
libSearch: "Rechercher une sourate, un bienfait ou une fréquence...",
hqAudio: "Audio HQ",
footerDesc: "Plateforme 100% gratuite propulsée par une architecture d'élite pour la guérison spirituelle par le Coran et les fréquences vibratoires.",
footerRights: "© 2026 Nūr Frequencies. Tous droits réservés.",
compliance: "Accessibilité WCAG | Audit Axe-core validé.",
thetaWaves: "Ondes Theta Actives",
thetaDesc: "4-8 Hz (Zone de Guérison)",
searchEmpty: "Aucune session ne correspond à votre recherche."
},
EN: {
navScience: "The Science",
navPrograms: "Programs",
navLibrary: "Vibrational Library",
heroBadge: "100% Free & Accessible to all",
heroTitle1: "Elevation through",
heroTitle2: "Divine Resonance",
heroDesc: "Discover the world's first free platform merging the ancient power of Ruqyah with the precision of healing vibrational frequencies.",
heroBtnStart: "Start Healing",
heroBtnExplore: "Explore Catalog",
scienceBadge: "Scientific Foundations",
scienceTitle: "The Synergy of Sound and Spirit",
scienceP1: "Our platform uses isochronic tones and solfeggio frequencies (like 528Hz, known for DNA repair) overlaid on ultra-high-definition Quranic recitations.",
scienceP2: "This acoustic engineering allows the brain to quickly enter Theta waves (deep meditative state), maximizing spiritual receptivity, nervous system relaxation, and cellular purification.",
scienceBtn: "Listen to frequencies",
progSectionTitle: "Targeted & Supernatural Therapies",
progSectionDesc: "Discover our 17 specialized programs designed to address ailments of the soul, body, and destroy occult attacks according to the prophetic tradition.",
playProgram: "Play program",
backToPrograms: "Back to programs",
sessionsCount: "Sessions",
libTitle: "The Frequency Sanctuary",
libDesc: "Free and open access to our 39 Vibrational Ruqyah sessions",
libSearch: "Search for a surah, benefit, or frequency...",
hqAudio: "HQ Audio",
footerDesc: "100% free platform powered by an elite architecture for spiritual healing through the Quran and vibrational frequencies.",
footerRights: "© 2026 Nūr Frequencies. All rights reserved.",
compliance: "WCAG Accessibility | Validated Axe-core Audit.",
thetaWaves: "Active Theta Waves",
thetaDesc: "4-8 Hz (Healing Zone)",
searchEmpty: "No sessions match your search."
}
};
// --- BASE DE DONNÉES DES 39 SESSIONS ---
const baseTracks = [
{ id: 1, num: "001", title: "Al-Fatiha", freq: 528, cFR: "Guérison Profonde", cEN: "Deep Healing", bFR: "Restauration de l'ADN et guérison globale", bEN: "DNA restoration and global healing" },
{ id: 2, num: "002", title: "Al-Baqarah", freq: 741, cFR: "Purification Cellulaire", cEN: "Cellular Purification", bFR: "Nettoyage des toxines spirituelles et protection absolue", bEN: "Cleansing of spiritual toxins and absolute protection" },
{ id: 3, num: "003", title: "Al-Imran", freq: 396, cFR: "Libération Émotionnelle", cEN: "Emotional Release", bFR: "Libération de la peur et de l'anxiété profonde", bEN: "Liberation from deep fear and anxiety" },
{ id: 4, num: "004", title: "An-Nisa", freq: 417, cFR: "Résolution & Paix", cEN: "Resolution & Peace", bFR: "Résolution des traumatismes passés et harmonie", bEN: "Resolution of past traumas and harmony" },
{ id: 5, num: "005", title: "Al-Ma'idah", freq: 639, cFR: "Harmonie Relationnelle", cEN: "Relational Harmony", bFR: "Connexion, compassion et pardon interpersonnel", bEN: "Connection, compassion, and interpersonal forgiveness" },
{ id: 6, num: "006", title: "Al-An'am", freq: 852, cFR: "Éveil Spirituel", cEN: "Spiritual Awakening", bFR: "Retour à l'ordre spirituel et clarté mentale", bEN: "Return to spiritual order and mental clarity" },
{ id: 7, num: "007", title: "Al-A'raf", freq: 963, cFR: "Connexion Divine", cEN: "Divine Connection", bFR: "Reconnexion suprême et élévation de l'âme", bEN: "Supreme reconnection and soul elevation" },
{ id: 8, num: "008", title: "Al-Anfal", freq: 174, cFR: "Apaisement Physique", cEN: "Physical Relief", bFR: "Réduction de la douleur et ancrage corporel", bEN: "Pain reduction and body grounding" },
{ id: 9, num: "009", title: "At-Tawbah", freq: 285, cFR: "Régénération", cEN: "Regeneration", bFR: "Régénération des tissus et de l'énergie vitale", bEN: "Regeneration of tissues and vital energy" },
{ id: 10, num: "010", title: "Yunus", freq: 528, cFR: "Paix Intérieure", cEN: "Inner Peace", bFR: "Acceptation et réparation des blessures de l'âme", bEN: "Acceptance and repair of soul wounds" },
{ id: 11, num: "011", title: "Hud", freq: 417, cFR: "Courage & Force", cEN: "Courage & Strength", bFR: "Force face aux épreuves et résilience", bEN: "Strength facing trials and resilience" },
{ id: 12, num: "012", title: "Yusuf", freq: 639, cFR: "Guérison du Chagrin", cEN: "Healing Sadness", bFR: "Soulagement de la tristesse profonde et de la dépression", bEN: "Relief from deep sadness and depression" },
{ id: 13, num: "013", title: "Ar-Ra'd", freq: 741, cFR: "Équilibre Nerveux", cEN: "Nervous System Balance", bFR: "Équilibre du système nerveux central et ancrage", bEN: "Central nervous system balance and grounding" },
{ id: 14, num: "014", title: "Ibrahim", freq: 852, cFR: "Abondance", cEN: "Abundance", bFR: "Gratitude, abondance spirituelle et matérielle", bEN: "Gratitude, spiritual and material abundance" },
{ id: 15, num: "015", title: "Al-Hijr", freq: 396, cFR: "Lâcher-Prise", cEN: "Letting Go", bFR: "Dissipation de la culpabilité et des regrets", bEN: "Dissipation of guilt and regrets" },
{ id: 16, num: "016", title: "An-Nahl", freq: 528, cFR: "Vitalité", cEN: "Vitality", bFR: "Vitalité physique et restauration de la santé", bEN: "Physical vitality and health restoration" },
{ id: 17, num: "017", title: "Al-Isra", freq: 963, cFR: "Élévation", cEN: "Elevation", bFR: "Élévation de la conscience et clairvoyance", bEN: "Elevation of consciousness and clairvoyance" },
{ id: 18, num: "018", title: "Al-Kahf", freq: 432, cFR: "Protection & Harmonie", cEN: "Protection & Harmony", bFR: "Protection divine absolue et harmonie naturelle", bEN: "Absolute divine protection and natural harmony" },
{ id: 19, num: "019", title: "Maryam", freq: 528, cFR: "Miracles", cEN: "Miracles", bFR: "Facilitation des miracles et douceur intérieure", bEN: "Facilitation of miracles and inner sweetness" },
{ id: 20, num: "020", title: "Ta-Ha", freq: 396, cFR: "Clarté Mentale", cEN: "Mental Clarity", bFR: "Apaisement définitif des pensées obsessionnelles", bEN: "Definitive calming of obsessive thoughts" },
{ id: 21, num: "021", title: "Al-Anbiya", freq: 639, cFR: "Sagesse Prophétique", cEN: "Prophetic Wisdom", bFR: "Connexion spirituelle à la lignée des prophètes", bEN: "Spiritual connection to the prophetic lineage" },
{ id: 22, num: "022", title: "Al-Hajj", freq: 741, cFR: "Détoxification", cEN: "Detoxification", bFR: "Purger l'esprit des influences et énergies toxiques", bEN: "Purging the mind of toxic influences and energies" },
{ id: 23, num: "023", title: "Al-Mu'minun", freq: 852, cFR: "Renforcement", cEN: "Strengthening", bFR: "Renforcement inébranlable de la faith", bEN: "Unshakable strengthening of faith" },
{ id: 24, num: "024", title: "An-Nur", freq: 963, cFR: "Lumière Divine", cEN: "Divine Light", bFR: "Illumination du cœur, de l'aura et de l'environnement", bEN: "Illumination of the heart, aura, and environment" },
{ id: 25, num: "025", title: "Al-Furqan", freq: 417, cFR: "Discernement", cEN: "Discernment", bFR: "Clarté de jugement et dissipation de l'illusion mentale", bEN: "Clarity of judgment and dissipation of mental illusion" },
{ id: 26, num: "026", title: "Ash-Shu'ara", freq: 528, cFR: "Résonance Cellulaire", cEN: "Cellular Resonance", bFR: "Harmonie vibratoire dans toutes les cellules du corps", bEN: "Vibrational harmony in all cells of the body" },
{ id: 27, num: "027", title: "An-Naml", freq: 639, cFR: "Intelligence Émotionnelle", cEN: "Emotional Intelligence", bFR: "Sagesse face aux épreuves et patience infinie", bEN: "Wisdom in the face of trials and infinite patience" },
{ id: 28, num: "028", title: "Al-Qasas", freq: 741, cFR: "Déblocage", cEN: "Unblocking", bFR: "Libération des blocages de vie et ouverture des voies", bEN: "Release of life blockages and opening of paths" },
{ id: 29, num: "029", title: "Al-'Ankabut", freq: 396, cFR: "Résilience", cEN: "Resilience", bFR: "Résistance spirituelle face au stress extrême", bEN: "Spiritual resistance against extreme stress" },
{ id: 30, num: "030", title: "Ar-Rum", freq: 285, cFR: "Alignement", cEN: "Alignment", bFR: "Alignement parfait du corps, de l'esprit et de l'âme", bEN: "Perfect alignment of body, mind, and soul" },
{ id: 31, num: "031", title: "Luqman", freq: 174, cFR: "Soulagement", cEN: "Relief", bFR: "Soulagement des tensions physiques et mentales", bEN: "Relief of physical and mental tensions" },
{ id: 32, num: "032", title: "As-Sajdah", freq: 852, cFR: "Soumission Pacifique", cEN: "Peaceful Submission", bFR: "Profonde paix absolue et sérénité", bEN: "Deep absolute peace and serenity" },
{ id: 33, num: "036", title: "Ya-Sin", freq: 528, cFR: "Cœur du Coran", cEN: "Heart of the Quran", bFR: "Guérison majeure du cœur physique et spirituel", bEN: "Major healing of the physical and spiritual heart" },
{ id: 34, num: "055", title: "Ar-Rahman", freq: 639, cFR: "Compassion Universelle", cEN: "Universal Compassion", bFR: "Équilibre émotionnel, amour pur et grâce divine", bEN: "Emotional balance, pure love, and divine grace" },
{ id: 35, num: "056", title: "Al-Waqi'ah", freq: 852, cFR: "Magnétisme", cEN: "Magnetism", bFR: "Attraction de l'abondance et éloignement de la pauvreté", bEN: "Attraction of abundance and warding off poverty" },
{ id: 36, num: "067", title: "Al-Mulk", freq: 432, cFR: "Sérénité Nocturne", cEN: "Nocturnal Serenity", bFR: "Protection durant le sommeil et paix", bEN: "Protection during sleep and peace" },
{ id: 37, num: "112", title: "Al-Ikhlas", freq: 963, cFR: "Pureté Absolue", cEN: "Absolute Purity", bFR: "Unité divine et purification totale de l'intention", bEN: "Divine unity and total purification of intention" },
{ id: 38, num: "113", title: "Al-Falaq", freq: 741, cFR: "Bouclier Divin", cEN: "Divine Shield", bFR: "Protection totale contre les énergies et entités négatives", bEN: "Total protection against negative energies and entities" },
{ id: 39, num: "114", title: "An-Nas", freq: 396, cFR: "Rempart Mental", cEN: "Mental Fortress", bFR: "Protection infaillible contre les mauvaises suggestions", bEN: "Infallible protection against evil suggestions" }
];
const images = [
"https://images.unsplash.com/photo-1518002054494-3a6f94352e9d?auto=format&fit=crop&q=80&w=400&h=400",
"https://images.unsplash.com/photo-1507608616759-54f48f0af0ee?auto=format&fit=crop&q=80&w=400&h=400",
"https://images.unsplash.com/photo-1519834785169-98be25ec3f84?auto=format&fit=crop&q=80&w=400&h=400",
"https://images.unsplash.com/photo-1462331940025-496dfbfc7564?auto=format&fit=crop&q=80&w=400&h=400",
"https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&q=80&w=400&h=400",
"https://images.unsplash.com/photo-1534447677768-be436bb09401?auto=format&fit=crop&q=80&w=400&h=400"
];
const mockTracks = baseTracks.map((t, idx) => ({
id: t.id,
title: `Sourate ${t.title}`,
frequency: t.freq,
freqStr: `${t.freq} Hz`,
category: { FR: t.cFR, EN: t.cEN },
benefit: { FR: t.bFR, EN: t.bEN },
audioUrl: `https://server8.mp3quran.net/afs/${t.num}.mp3`,
image: images[idx % images.length],
duration: "HQ"
}));
// --- PROFILS THÉRAPEUTIQUES ---
const profiles = [
{
id: "protection",
icon: Shield,
title: { FR: "Désenvoûtement & Protection", EN: "Exorcism & Protection" },
desc: { FR: "Neutralise le mauvais œil (Ayn), la sorcellerie (Sihr) et protège l'aura en créant un bouclier vibratoire.", EN: "Neutralizes the evil eye (Ayn), sorcery (Sihr) and protects the aura by creating a vibrational shield." },
tracks: [1, 2, 37, 38, 39],
color: "from-red-500 to-rose-700"
},
{
id: "sihr_destruction",
icon: Zap,
title: { FR: "Destruction du Sihr (Magie Noire)", EN: "Sihr Destruction (Black Magic)" },
desc: { FR: "Cible et annihile les sortilèges complexes, les nœuds de sorcellerie et libère l'âme des emprises occultes.", EN: "Targets and annihilates complex spells, witchcraft knots, and frees the soul from occult holds." },
tracks: [2, 10, 20, 38, 39],
color: "from-fuchsia-700 to-purple-900"
},
{
id: "exorcism",
icon: Flame,
title: { FR: "Extraction & Expulsion (Djinn)", EN: "Extraction & Expulsion (Jinn)" },
desc: { FR: "Fréquences intenses conçues pour consumer les entités parasitaires, forcer l'expulsion et nettoyer les blocages démoniaques.", EN: "Intense frequencies designed to consume parasitic entities, force expulsion, and clear demonic blockages." },
tracks: [2, 33, 37, 38, 39],
color: "from-red-600 to-orange-800"
},
{
id: "clairvoyance",
icon: Eye,
title: { FR: "Clairvoyance & Al-Basira", EN: "Clairvoyance & Al-Basira" },
desc: { FR: "Ouvre l'œil du cœur (Basira), dissipe le voile de l'illusion spatio-temporelle et aiguise l'intuition spirituelle.", EN: "Opens the eye of the heart (Basira), dissipates the veil of spatio-temporal illusion, and sharpens spiritual intuition." },
tracks: [6, 17, 24, 25],
color: "from-cyan-400 to-blue-800"
},
{
id: "invincibility",
icon: Anchor,
title: { FR: "Forteresse Inébranlable", EN: "Unshakable Fortress" },
desc: { FR: "Ancrage suprême. Rend votre aura impénétrable aux attaques psychiques, au vampirisme énergétique et à la jalousie.", EN: "Supreme grounding. Makes your aura impenetrable to psychic attacks, energy vampirism, and jealousy." },
tracks: [2, 3, 18, 37],
color: "from-slate-400 to-slate-700"
},
{
id: "guidance",
icon: Compass,
title: { FR: "Guidance Divine & Destinée", EN: "Divine Guidance & Destiny" },
desc: { FR: "Aligne votre fréquence sur le plan divin. Élimine la confusion et attire les synchronicités pour prendre les bonnes décisions.", EN: "Aligns your frequency with the divine plan. Eliminates confusion and attracts synchronicities to make the right decisions." },
tracks: [1, 21, 24, 28],
color: "from-teal-400 to-emerald-700"
},
{
id: "soul_wash",
icon: Feather,
title: { FR: "Purification de l'Âme (Tawbah)", EN: "Purification of the Soul (Tawbah)" },
desc: { FR: "Un lavage de l'âme à très haute fréquence. Dissout la lourdeur des péchés passés et attire la Miséricorde absolue.", EN: "A very high-frequency soul wash. Dissolves the heaviness of past sins and attracts absolute Mercy." },
tracks: [5, 9, 15, 34],
color: "from-sky-300 to-indigo-600"
},
{
id: "miracles",
icon: Star,
title: { FR: "Manifestation des Miracles", EN: "Manifestation of Miracles" },
desc: { FR: "Active l'énergie de 'Kun Faya Kun'. Idéal pour les causes jugées impossibles, la fertilité et les interventions surnaturelles.", EN: "Activates the energy of 'Kun Faya Kun'. Ideal for seemingly impossible causes, fertility, and supernatural interventions." },
tracks: [19, 21, 33, 34],
color: "from-yellow-300 to-amber-600"
},
{
id: "ego_mastery",
icon: Key,
title: { FR: "Dompter l'Ego (An-Nafs)", EN: "Mastering the Ego (An-Nafs)" },
desc: { FR: "Brise les chaînes de l'addiction, maîtrise les pulsions destructrices et installe une paix profonde face aux murmures.", EN: "Breaks the chains of addiction, masters destructive impulses, and establishes deep peace against whispers." },
tracks: [12, 29, 31, 39],
color: "from-stone-400 to-stone-800"
},
{
id: "supreme_light",
icon: Crown,
title: { FR: "Ascension & Lumière (An-Nur)", EN: "Ascension & Light (An-Nur)" },
desc: { FR: "La fréquence des Anges. Élévation vibratoire ultime pour se connecter aux sphères célestes et irradier de pure lumière.", EN: "The frequency of Angels. Ultimate vibrational elevation to connect with celestial spheres and radiate pure light." },
tracks: [7, 17, 24, 32],
color: "from-amber-200 to-yellow-600"
},
{
id: "aura_renewal",
icon: Wind,
title: { FR: "Régénération de l'Aura", EN: "Aura Regeneration" },
desc: { FR: "Insuffle une énergie vitale purificatrice. Répare les brèches énergétiques causées par le stress, les maladies et les chocs occultes.", EN: "Breathes purifying vital energy. Repairs energetic breaches caused by stress, illnesses, and occult shocks." },
tracks: [8, 9, 16, 30],
color: "from-lime-400 to-green-700"
},
{
id: "anxiety",
icon: Sun,
title: { FR: "Anxiété & Dépression", EN: "Anxiety & Depression" },
desc: { FR: "Dissipe la tristesse profonde (Huzn), apaise le système nerveux et libère des traumatismes passés.", EN: "Dissipates deep sadness (Huzn), soothes the nervous system and releases past traumas." },
tracks: [12, 20, 33, 34],
color: "from-amber-400 to-orange-500"
},
{
id: "abundance",
icon: Sparkles,
title: { FR: "Abondance & Subsistance", EN: "Abundance & Sustenance" },
desc: { FR: "Débloque les voies de la subsistance (Rizq), favorise la gratitude et attire la barakah matérielle et spirituelle.", EN: "Unblocks the paths of sustenance (Rizq), fosters gratitude and attracts material and spiritual barakah." },
tracks: [14, 34, 35],
color: "from-emerald-400 to-teal-600"
},
{
id: "healing",
icon: Activity,
title: { FR: "Guérison Physique", EN: "Physical Healing" },
desc: { FR: "Stimule la régénération cellulaire et procure un soulagement profond des maux physiques (Shifa).", EN: "Stimulates cellular regeneration and provides deep relief from physical ailments (Shifa)." },
tracks: [1, 8, 9, 17, 26],
color: "from-cyan-400 to-blue-600"
},
{
id: "faith",
icon: Target,
title: { FR: "Renforcement de la Foi", EN: "Strengthening of Faith" },
desc: { FR: "Dissipe les doutes (Waswas), reconnecte l'âme à la vérité divine et raffermit le cœur (Iman).", EN: "Dissipates doubts (Waswas), reconnects the soul to divine truth and strengthens the heart (Iman)." },
tracks: [3, 18, 23, 24],
color: "from-indigo-400 to-purple-600"
},
{
id: "harmony",
icon: Heart,
title: { FR: "Harmonie Familiale", EN: "Family Harmony" },
desc: { FR: "Restaure l'amour, la patience et la miséricorde dans le foyer et les relations interpersonnelles.", EN: "Restores love, patience, and mercy in the household and interpersonal relationships." },
tracks: [4, 5, 27, 30],
color: "from-pink-400 to-rose-600"
},
{
id: "sleep",
icon: Moon,
title: { FR: "Sérénité Nocturne", EN: "Nocturnal Serenity" },
desc: { FR: "Combat les insomnies et repousse les cauchemars pour garantir un sommeil profond et réparateur.", EN: "Combats insomnia and repels nightmares to guarantee deep and restful sleep." },
tracks: [32, 36, 37, 38, 39],
color: "from-slate-500 to-indigo-800"
}
];
// --- COMPOSANT TRACK CARD RÉUTILISABLE ---
const TrackCard = ({ track, lang, isActive, isPlaying, onPlay, t }) => (
<div
className="group relative bg-white/[0.02] border border-white/5 rounded-2xl p-4 hover:bg-white/[0.04] hover:border-amber-500/30 transition-all duration-300 backdrop-blur-sm cursor-pointer flex flex-col"
onClick={onPlay}
>
<div className="relative overflow-hidden rounded-xl mb-4 aspect-square shrink-0">
<img src={track.image} alt={track.title} className="w-full h-full object-cover opacity-80 group-hover:opacity-100 group-hover:scale-110 transition-all duration-700" />
<div className="absolute inset-0 bg-gradient-to-t from-black/90 via-black/20 to-transparent"></div>
<div className={`absolute inset-0 flex items-center justify-center bg-black/40 transition-opacity duration-300 ${isActive ? 'opacity-100' : 'opacity-0 group-hover:opacity-100'}`}>
<div className="w-12 h-12 rounded-full bg-amber-500 text-white flex items-center justify-center shadow-[0_0_20px_rgba(245,158,11,0.5)]">
{isActive && isPlaying ? <Pause className="w-5 h-5 fill-white" /> : <Play className="w-5 h-5 fill-white ml-1" />}
</div>
</div>
<div className="absolute bottom-3 left-3 px-2 py-1 bg-black/60 backdrop-blur-md rounded text-[10px] font-bold text-amber-400 tracking-wider">
{track.freqStr}
</div>
</div>
<div className="text-[10px] text-gray-500 mb-1 font-bold uppercase tracking-wider">{track.category[lang]}</div>
<h3 className="text-lg font-bold text-white mb-2">{track.title}</h3>
<p className="text-xs text-gray-400 mb-4 line-clamp-2 leading-relaxed flex-grow">
{track.benefit[lang]}
</p>
<div className="flex justify-between items-center text-xs text-gray-500 pt-3 border-t border-white/5">
<span className="flex items-center gap-1.5"><Radio className="w-3 h-3 text-emerald-500" /> {t.hqAudio}</span>
<span>{track.duration}</span>
</div>
</div>
);
// --- APPLICATION PRINCIPALE ---
function App() {
const [lang, setLang] = useState('FR');
const t = translations[lang];
const [isScrolled, setIsScrolled] = useState(false);
const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false);
const [isLoading, setIsLoading] = useState(true);
const [searchQuery, setSearchQuery] = useState('');
const [selectedProgram, setSelectedProgram] = useState(null);
const [activeTrack, setActiveTrack] = useState(null);
const [currentPlaylist, setCurrentPlaylist] = useState(mockTracks);
const [isPlaying, setIsPlaying] = useState(false);
const [isShuffle, setIsShuffle] = useState(false);
const [repeatMode, setRepeatMode] = useState(0); // 0: off, 1: repeat all, 2: repeat one
const [playbackRate, setPlaybackRate] = useState(1);
const audioRef = useRef(null);
const [progress, setProgress] = useState(0);
const [audioDuration, setAudioDuration] = useState(0);
const [volume, setVolume] = useState(1);
const audioCtxRef = useRef(null);
const oscRef = useRef(null);
const oscGainRef = useRef(null);
const scrollToSection = (id) => {
setIsMobileMenuOpen(false);
const element = document.getElementById(id);
if (element) {
const offset = 80;
const bodyRect = document.body.getBoundingClientRect().top;
const elementRect = element.getBoundingClientRect().top;
const elementPosition = elementRect - bodyRect;
window.scrollTo({ top: elementPosition - offset, behavior: 'smooth' });
}
};
const handlePlay = (track, playlist = mockTracks) => {
if (activeTrack?.id === track.id) {
setIsPlaying(!isPlaying);
} else {
setCurrentPlaylist(playlist);
setActiveTrack(track);
setIsPlaying(true);
}
};
const playNextTrack = (isManual = false) => {
if (!activeTrack || !currentPlaylist.length) return;
// Si la piste se termine naturellement et qu'on est en "Repeat 1"
if (!isManual && repeatMode === 2) {
if (audioRef.current) {
audioRef.current.currentTime = 0;
audioRef.current.play();
}
return;
}
let nextIndex;
if (isShuffle) {
nextIndex = Math.floor(Math.random() * currentPlaylist.length);
// Évite de rejouer la même piste si la playlist a plus d'1 titre
if (currentPlaylist.length > 1 && currentPlaylist[nextIndex].id === activeTrack.id) {
nextIndex = (nextIndex + 1) % currentPlaylist.length;
}
} else {
const currentIndex = currentPlaylist.findIndex(t => t.id === activeTrack.id);
nextIndex = currentIndex + 1;
if (nextIndex >= currentPlaylist.length) {
if (repeatMode === 0 && !isManual) {
setIsPlaying(false);
return; // Fin de la playlist, on arrête
}
nextIndex = 0; // On boucle manuellement ou si Repeat All est actif
}
}
setActiveTrack(currentPlaylist[nextIndex]);
setIsPlaying(true);
};
const playPrevTrack = () => {
if (!activeTrack || !currentPlaylist.length) return;
// Si la piste joue depuis plus de 3 secondes, on la recommence
if (audioRef.current && audioRef.current.currentTime > 3) {
audioRef.current.currentTime = 0;
return;
}
let prevIndex;
if (isShuffle) {
prevIndex = Math.floor(Math.random() * currentPlaylist.length);
} else {
const currentIndex = currentPlaylist.findIndex(t => t.id === activeTrack.id);
prevIndex = (currentIndex - 1 + currentPlaylist.length) % currentPlaylist.length;
}
setActiveTrack(currentPlaylist[prevIndex]);
setIsPlaying(true);
};
const startFrequency = (freqVal) => {
if (!freqVal) return;
if (!audioCtxRef.current) {
audioCtxRef.current = new (window.AudioContext || window.webkitAudioContext)();
}
if (audioCtxRef.current.state === 'suspended') {
audioCtxRef.current.resume();
}
stopFrequency();
oscRef.current = audioCtxRef.current.createOscillator();
oscGainRef.current = audioCtxRef.current.createGain();
oscRef.current.type = 'sine';
oscRef.current.frequency.setValueAtTime(freqVal, audioCtxRef.current.currentTime);
oscGainRef.current.gain.setValueAtTime(volume * 0.05, audioCtxRef.current.currentTime);
oscRef.current.connect(oscGainRef.current);
oscGainRef.current.connect(audioCtxRef.current.destination);
oscRef.current.start();
};
const stopFrequency = () => {
if (oscRef.current) {
try {
oscRef.current.stop();
oscRef.current.disconnect();
} catch (e) {}
oscRef.current = null;
}
};
useEffect(() => {
const handleScroll = () => setIsScrolled(window.scrollY > 50);
window.addEventListener('scroll', handleScroll);
const timer = setTimeout(() => setIsLoading(false), 1500);
return () => {
window.removeEventListener('scroll', handleScroll);
clearTimeout(timer);
};
}, []);
useEffect(() => {
if (audioRef.current) {
audioRef.current.playbackRate = playbackRate;
if (isPlaying) {
audioRef.current.play().catch(e => console.error("Erreur lecture:", e));
startFrequency(activeTrack?.frequency);
} else {
audioRef.current.pause();
stopFrequency();
}
}
return () => stopFrequency();
}, [isPlaying, activeTrack, playbackRate]);
const handleTimeUpdate = () => {
if (audioRef.current) setProgress(audioRef.current.currentTime);
};
const handleLoadedMetadata = () => {
if (audioRef.current) setAudioDuration(audioRef.current.duration);
};
const handleSeek = (e) => {
const rect = e.currentTarget.getBoundingClientRect();
const percent = (e.clientX - rect.left) / rect.width;
if (audioRef.current) {
audioRef.current.currentTime = percent * (audioDuration || 1);
setProgress(audioRef.current.currentTime);
}
};
const handleVolumeChange = (e) => {
const rect = e.currentTarget.getBoundingClientRect();
let percent = (e.clientX - rect.left) / rect.width;
percent = Math.max(0, Math.min(1, percent));
setVolume(percent);
if (audioRef.current) audioRef.current.volume = percent;
if (oscGainRef.current && audioCtxRef.current) {
oscGainRef.current.gain.setValueAtTime(percent * 0.05, audioCtxRef.current.currentTime);
}
};
const handleSpeedChange = () => {
const rates = [1, 1.25, 1.5, 2];
const currentIdx = rates.indexOf(playbackRate);
const nextIdx = (currentIdx + 1) % rates.length;
setPlaybackRate(rates[nextIdx]);
};
const formatTime = (timeInSeconds) => {
if (isNaN(timeInSeconds)) return "00:00";
const m = Math.floor(timeInSeconds / 60).toString().padStart(2, '0');
const s = Math.floor(timeInSeconds % 60).toString().padStart(2, '0');
return `${m}:${s}`;
};
const filteredTracks = mockTracks.filter(track =>
track.title.toLowerCase().includes(searchQuery.toLowerCase()) ||
track.benefit[lang].toLowerCase().includes(searchQuery.toLowerCase()) ||
track.freqStr.toLowerCase().includes(searchQuery.toLowerCase()) ||
track.category[lang].toLowerCase().includes(searchQuery.toLowerCase())
);
return (
<div className="min-h-screen text-gray-200 font-sans selection:bg-amber-500/30 overflow-x-hidden">
<div className="fixed inset-0 z-0 pointer-events-none opacity-40">
<div className="absolute top-[-10%] left-[-10%] w-[50vw] h-[50vw] rounded-full bg-indigo-900/20 blur-[120px] animate-pulse"></div>
<div className="absolute bottom-[-10%] right-[-10%] w-[60vw] h-[60vw] rounded-full bg-amber-900/10 blur-[150px]"></div>
<div className="absolute top-[40%] left-[30%] w-[30vw] h-[30vw] rounded-full bg-teal-900/10 blur-[100px] animate-bounce" style={{ animationDuration: '10s' }}></div>
</div>
<header className={`fixed top-0 w-full z-50 transition-all duration-500 ${isScrolled ? 'bg-[#060913]/80 backdrop-blur-xl border-b border-white/5 py-4' : 'bg-transparent py-6'}`}>
<div className="max-w-7xl mx-auto px-6 md:px-12 flex justify-between items-center">
<div className="flex items-center gap-3">
<div className="relative flex items-center justify-center w-10 h-10 rounded-full bg-gradient-to-tr from-amber-400 to-amber-600 shadow-[0_0_15px_rgba(251,191,36,0.3)]">
<Activity className="w-5 h-5 text-white" />
</div>
<span className="text-xl font-bold tracking-widest text-white uppercase font-serif">
Nūr<span className="text-amber-400 font-light">Freq</span>
</span>
</div>
<nav className="hidden md:flex items-center gap-8 text-sm font-medium tracking-wide">
<button onClick={() => scrollToSection('science')} className="text-gray-400 hover:text-amber-400 transition-colors">{t.navScience}</button>
<button onClick={() => scrollToSection('programs')} className="text-gray-400 hover:text-amber-400 transition-colors">{t.navPrograms}</button>
<button onClick={() => scrollToSection('library')} className="text-gray-400 hover:text-amber-400 transition-colors">{t.navLibrary}</button>
</nav>
<div className="hidden md:flex items-center gap-4">
<button
onClick={() => setLang(lang === 'FR' ? 'EN' : 'FR')}
className="flex items-center gap-2 bg-white/5 hover:bg-white/10 border border-white/10 px-5 py-2 rounded-full text-sm font-semibold transition-all backdrop-blur-md text-amber-50"
>
<Globe className="w-4 h-4 text-amber-400" /> {lang === 'FR' ? 'English' : 'Français'}
</button>
</div>
<button className="md:hidden text-white" onClick={() => setIsMobileMenuOpen(!isMobileMenuOpen)}>
{isMobileMenuOpen ? <X className="w-6 h-6" /> : <Menu className="w-6 h-6" />}
</button>
</div>
{isMobileMenuOpen && (
<div className="md:hidden absolute top-full left-0 w-full bg-[#060913]/95 backdrop-blur-xl border-b border-white/10 py-4 px-6 flex flex-col gap-4 shadow-2xl">
<button onClick={() => scrollToSection('science')} className="text-left text-gray-300 py-3 border-b border-white/5 text-sm uppercase tracking-wider">{t.navScience}</button>
<button onClick={() => scrollToSection('programs')} className="text-left text-gray-300 py-3 border-b border-white/5 text-sm uppercase tracking-wider">{t.navPrograms}</button>
<button onClick={() => scrollToSection('library')} className="text-left text-gray-300 py-3 border-b border-white/5 text-sm uppercase tracking-wider">{t.navLibrary}</button>
<button onClick={() => setLang(lang === 'FR' ? 'EN' : 'FR')} className="text-left text-amber-400 py-3 font-bold flex items-center gap-2">
<Globe className="w-5 h-5" /> {lang === 'FR' ? 'Switch to English' : 'Passer en Français'}
</button>
</div>
)}
</header>
<main className="relative z-10 pt-32 pb-24">
<section className="max-w-7xl mx-auto px-6 md:px-12 pt-12 pb-24 flex flex-col items-center text-center">
<div className="inline-flex items-center gap-2 px-4 py-2 rounded-full bg-emerald-500/10 border border-emerald-500/20 text-emerald-400 text-xs font-semibold uppercase tracking-widest mb-8">
<Sparkles className="w-3 h-3" /> {t.heroBadge}
</div>
<h1 className="text-5xl md:text-7xl font-bold text-white mb-6 leading-tight font-serif">
{t.heroTitle1} <br className="hidden md:block"/>
<span className="text-transparent bg-clip-text bg-gradient-to-r from-amber-200 via-amber-400 to-amber-600">
{t.heroTitle2}
</span>
</h1>
<p className="max-w-2xl text-lg md:text-xl text-gray-400 mb-10 leading-relaxed font-light">
{t.heroDesc}
</p>
<div className="flex flex-col sm:flex-row gap-4 w-full sm:w-auto">
<button
onClick={() => { handlePlay(mockTracks[0], mockTracks); scrollToSection('library'); }}
className="px-8 py-4 rounded-full bg-gradient-to-r from-amber-500 to-amber-600 text-white font-bold text-sm tracking-wide hover:shadow-[0_0_30px_rgba(245,158,11,0.4)] hover:scale-105 transition-all flex items-center justify-center gap-2"
>
<Play className="w-4 h-4 fill-white" />
{t.heroBtnStart}
</button>
<button
onClick={() => scrollToSection('programs')}
className="px-8 py-4 rounded-full bg-white/5 border border-white/10 text-white font-bold text-sm tracking-wide hover:bg-white/10 transition-all backdrop-blur-md flex items-center justify-center gap-2"
>
{t.heroBtnExplore}
<ChevronRight className="w-4 h-4" />
</button>
</div>
</section>
<section id="science" className="max-w-7xl mx-auto px-6 md:px-12 py-20 relative">
<div className="absolute inset-0 bg-gradient-to-b from-indigo-900/5 via-transparent to-transparent pointer-events-none"></div>
<div className="grid md:grid-cols-2 gap-12 items-center">
<div>
<div className="inline-flex items-center gap-2 px-3 py-1 rounded-full bg-indigo-500/10 border border-indigo-500/20 text-indigo-400 text-xs font-semibold uppercase tracking-widest mb-6">
<Info className="w-3 h-3" /> {t.scienceBadge}
</div>
<h2 className="text-3xl md:text-4xl font-bold text-white mb-6 font-serif">{t.scienceTitle}</h2>
<p className="text-gray-400 mb-6 leading-relaxed">{t.scienceP1}</p>
<p className="text-gray-400 mb-8 leading-relaxed">{t.scienceP2}</p>
<button onClick={() => scrollToSection('programs')} className="text-amber-400 font-semibold flex items-center gap-2 hover:gap-3 transition-all">
{t.scienceBtn} <ChevronRight className="w-4 h-4" />
</button>
</div>
<div className="relative">
<div className="aspect-square rounded-3xl overflow-hidden border border-white/10 relative">
<img src="https://images.unsplash.com/photo-1518002054494-3a6f94352e9d?auto=format&fit=crop&q=80&w=800&h=800" alt="Ondes sonores" className="w-full h-full object-cover opacity-60 mix-blend-screen" />
<div className="absolute inset-0 bg-gradient-to-tr from-[#060913] to-transparent"></div>
</div>
<div className="absolute -bottom-6 -left-6 bg-[#0a0d18] p-6 rounded-2xl border border-white/10 shadow-2xl">
<div className="flex items-center gap-4">
<Activity className="w-8 h-8 text-amber-500 animate-pulse" />
<div>
<div className="text-white font-bold">{t.thetaWaves}</div>
<div className="text-xs text-gray-500">{t.thetaDesc}</div>
</div>
</div>
</div>
</div>
</div>
</section>
<section id="programs" className="max-w-7xl mx-auto px-6 md:px-12 py-20 relative">
<div className="text-center mb-16">
<h2 className="text-3xl md:text-4xl font-bold text-white mb-4 font-serif">{t.progSectionTitle}</h2>
<p className="text-gray-400 text-lg max-w-2xl mx-auto">{t.progSectionDesc}</p>
</div>
{!selectedProgram ? (
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
{profiles.map(p => (
<div
key={p.id}
onClick={() => setSelectedProgram(p)}
className={`relative overflow-hidden rounded-2xl p-6 cursor-pointer group bg-gradient-to-br ${p.color} border border-white/10 hover:shadow-2xl hover:shadow-${p.color.split('-')[1]}-500/20 transition-all duration-300`}
>
<div className="absolute inset-0 bg-black/40 group-hover:bg-black/20 transition-colors"></div>
<div className="relative z-10 flex flex-col h-full gap-4">
<div className="bg-white/20 w-12 h-12 rounded-xl flex items-center justify-center backdrop-blur-sm shadow-inner">
<p.icon className="w-6 h-6 text-white" />
</div>
<h3 className="text-xl font-bold text-white">{p.title[lang]}</h3>
<p className="text-sm text-white/80 line-clamp-3">{p.desc[lang]}</p>
<div className="mt-auto pt-4 text-xs font-bold text-white/90 uppercase tracking-widest flex items-center gap-2">
{p.tracks.length} {t.sessionsCount} <ChevronRight className="w-4 h-4" />
</div>
</div>
</div>
))}
</div>
) : (
<div className="bg-white/5 border border-white/10 rounded-3xl p-6 md:p-10 relative overflow-hidden">
<div className={`absolute top-0 right-0 w-64 h-64 bg-gradient-to-br ${selectedProgram.color} rounded-full blur-[100px] opacity-20 pointer-events-none`}></div>
<button
onClick={() => setSelectedProgram(null)}
className="flex items-center gap-2 text-gray-400 hover:text-amber-400 transition-colors mb-8 text-sm font-semibold uppercase tracking-wider"
>
<ArrowLeft className="w-5 h-5" />
{t.backToPrograms}
</button>
<div className="flex flex-col md:flex-row gap-8 items-start mb-12 relative z-10">
<div className={`w-24 h-24 md:w-32 md:h-32 rounded-2xl bg-gradient-to-br ${selectedProgram.color} flex items-center justify-center shrink-0 shadow-lg`}>
<selectedProgram.icon className="w-12 h-12 md:w-16 md:h-16 text-white" />
</div>
<div>
<h3 className="text-3xl md:text-4xl font-bold text-white mb-4">{selectedProgram.title[lang]}</h3>
<p className="text-gray-300 text-lg mb-6 max-w-2xl">{selectedProgram.desc[lang]}</p>
<button
onClick={() => {
const pTracks = selectedProgram.tracks.map(tid => mockTracks.find(mt => mt.id === tid)).filter(Boolean);
handlePlay(pTracks[0], pTracks);
}}
className="px-6 py-3 rounded-full bg-white text-black font-bold text-sm tracking-wide hover:scale-105 transition-all flex items-center gap-2 shadow-[0_0_20px_rgba(255,255,255,0.3)]"
>
<Play className="w-4 h-4 fill-black" />
{t.playProgram}
</button>
</div>
</div>
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 relative z-10">
{selectedProgram.tracks.map(tid => {
const track = mockTracks.find(t => t.id === tid);
if (!track) return null;
const isActive = activeTrack?.id === track.id;
return (
<TrackCard
key={track.id}
track={track}
lang={lang}
isActive={isActive}
isPlaying={isPlaying}
onPlay={() => {
const pTracks = selectedProgram.tracks.map(id => mockTracks.find(mt => mt.id === id)).filter(Boolean);
handlePlay(track, pTracks);
}}
t={t}
/>
);
})}
</div>
</div>
)}
</section>
<section id="library" className="max-w-7xl mx-auto px-6 md:px-12 py-20 border-t border-white/5">
<div className="flex flex-col md:flex-row justify-between items-start md:items-end mb-12 gap-6">
<div>
<h2 className="text-3xl font-bold text-white mb-2 font-serif">{t.libTitle}</h2>
<p className="text-amber-400 text-sm font-medium">{t.libDesc}</p>
</div>
<div className="relative w-full md:w-72">
<input
type="text"
placeholder={t.libSearch}
value={searchQuery}
onChange={(e) => setSearchQuery(e.target.value)}
className="w-full bg-white/5 border border-white/10 rounded-full py-3 px-12 text-sm text-white focus:outline-none focus:border-amber-500 transition-colors"
/>
<Search className="w-4 h-4 text-gray-400 absolute left-4 top-1/2 transform -translate-y-1/2" />
</div>
</div>
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6">
{isLoading ? (
Array(8).fill(0).map((_, i) => (
<div key={`skeleton-${i}`} className="bg-white/5 border border-white/5 rounded-2xl p-4 flex flex-col gap-4 animate-pulse">
<div className="w-full h-48 bg-white/10 rounded-xl"></div>
<div className="w-1/3 h-4 bg-white/10 rounded"></div>
<div className="w-3/4 h-6 bg-white/10 rounded"></div>
<div className="w-full flex justify-between items-center mt-2">
<div className="w-1/4 h-4 bg-white/10 rounded"></div>
<div className="w-8 h-8 rounded-full bg-white/10"></div>
</div>
</div>
))
) : (
filteredTracks.map((track) => (
<TrackCard
key={track.id}
track={track}
lang={lang}
isActive={activeTrack?.id === track.id}
isPlaying={isPlaying}
onPlay={() => handlePlay(track, filteredTracks)}
t={t}
/>
))
)}
{!isLoading && filteredTracks.length === 0 && (
<div className="col-span-full py-12 text-center text-gray-400">
{t.searchEmpty}
</div>
)}
</div>
</section>
</main>
<footer className="border-t border-white/5 bg-[#030409] py-12 relative z-10 pb-32">
<div className="max-w-7xl mx-auto px-6 md:px-12 grid grid-cols-1 md:grid-cols-2 gap-8 items-center">
<div>
<div className="flex items-center gap-2 mb-4">
<Activity className="w-5 h-5 text-amber-500" />
<span className="text-lg font-bold tracking-widest text-white uppercase font-serif">
Nūr<span className="text-amber-400 font-light">Freq</span>
</span>
</div>
<p className="text-gray-500 text-sm max-w-sm leading-relaxed">
{t.footerDesc}
</p>
</div>
<div className="md:text-right">
<div className="inline-flex items-center gap-2 px-4 py-2 rounded-full bg-emerald-500/10 text-emerald-400 text-xs font-semibold uppercase tracking-widest border border-emerald-500/20">
{t.heroBadge}
</div>
</div>
</div>
<div className="max-w-7xl mx-auto px-6 md:px-12 mt-12 pt-8 border-t border-white/5 text-center text-xs text-gray-600 flex flex-col items-center gap-2">
<span>{t.footerRights}</span>
<span>{t.compliance}</span>
</div>
</footer>
<div className={`fixed bottom-0 left-0 w-full bg-[#0a0d18]/95 backdrop-blur-xl border-t border-amber-500/20 p-4 transform transition-transform duration-500 z-50 shadow-[0_-10px_40px_rgba(0,0,0,0.5)] ${activeTrack ? 'translate-y-0' : 'translate-y-full'}`}>
{activeTrack && (
<audio
ref={audioRef}
src={activeTrack.audioUrl}
onTimeUpdate={handleTimeUpdate}
onLoadedMetadata={handleLoadedMetadata}
onEnded={() => playNextTrack(false)}
/>
)}
<div className="max-w-7xl mx-auto flex items-center justify-between gap-4">
<div className="flex items-center gap-4 w-1/3">
<div className="w-12 h-12 rounded bg-white/10 overflow-hidden relative shrink-0">
{activeTrack && <img src={activeTrack.image} alt="cover" className="w-full h-full object-cover" />}
{isPlaying && (
<div className="absolute inset-0 bg-black/40 flex items-center justify-center gap-0.5">
<div className="w-1 h-3 bg-amber-400 rounded animate-[pulse_0.8s_ease-in-out_infinite]"></div>
<div className="w-1 h-5 bg-amber-400 rounded animate-[pulse_1.2s_ease-in-out_infinite_0.2s]"></div>
<div className="w-1 h-2 bg-amber-400 rounded animate-[pulse_0.6s_ease-in-out_infinite_0.4s]"></div>
</div>
)}
</div>
<div className="hidden sm:block truncate">
<div className="text-sm font-bold text-white truncate">{activeTrack?.title}</div>
<div className="text-xs text-amber-400 truncate">{activeTrack?.benefit[lang]} • {activeTrack?.freqStr}</div>
</div>
</div>
<div className="flex flex-col items-center gap-2 w-1/3">
<div className="flex items-center gap-4 sm:gap-6">
<button
onClick={() => setIsShuffle(!isShuffle)}
className={`hidden sm:block transition-colors hover:scale-110 ${isShuffle ? 'text-amber-400' : 'text-gray-500 hover:text-white'}`}
title="Aléatoire"
>
<Shuffle className="w-4 h-4" />
</button>
<button onClick={playPrevTrack} className="text-gray-400 hover:text-white transition-colors hover:scale-110">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><polygon points="19 20 9 12 19 4 19 20"></polygon><line x1="5" y1="19" x2="5" y2="5"></line></svg>
</button>
<button
className="w-10 h-10 rounded-full bg-gradient-to-r from-amber-400 to-amber-600 text-black flex items-center justify-center hover:scale-105 transition-transform shadow-[0_0_15px_rgba(245,158,11,0.4)]"
onClick={() => setIsPlaying(!isPlaying)}
>
{isPlaying ? <Pause className="w-5 h-5 fill-black" /> : <Play className="w-5 h-5 fill-black ml-1" />}
</button>
<button onClick={() => playNextTrack(true)} className="text-gray-400 hover:text-white transition-colors hover:scale-110">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><polygon points="5 4 15 12 5 20 5 4"></polygon><line x1="19" y1="5" x2="19" y2="19"></line></svg>
</button>
<button
onClick={() => setRepeatMode((repeatMode + 1) % 3)}
className={`hidden sm:block transition-colors hover:scale-110 ${repeatMode !== 0 ? 'text-amber-400' : 'text-gray-500 hover:text-white'}`}
title="En boucle"
>
{repeatMode === 2 ? <Repeat1Icon className="w-4 h-4" /> : <RepeatIcon className="w-4 h-4" />}
</button>
</div>
<div className="w-full max-w-md flex items-center gap-2 text-[10px] text-gray-500">
<span className="w-8 text-right font-mono">{formatTime(progress)}</span>
<div
className="flex-1 h-2 bg-white/10 rounded-full overflow-hidden relative cursor-pointer group"
onClick={handleSeek}
>
<div
className="absolute top-0 left-0 h-full bg-gradient-to-r from-amber-500 to-amber-400 transition-colors"
style={{ width: `${(progress / (audioDuration || 1)) * 100}%` }}
></div>
</div>
<span className="w-8 font-mono">{formatTime(audioDuration) !== "00:00" ? formatTime(audioDuration) : "--:--"}</span>
</div>
</div>
<div className="w-1/3 flex justify-end items-center gap-3 text-gray-400">
<button
onClick={handleSpeedChange}
className="w-8 h-6 flex items-center justify-center rounded border border-white/10 bg-white/5 hover:bg-white/10 text-[10px] font-bold text-gray-300 transition-colors"
title="Vitesse de lecture"
>
{playbackRate}x
</button>
<Music className="w-4 h-4 hidden sm:block" />
<div className="flex items-center gap-2 hidden sm:flex">
<Volume2 className="w-4 h-4" />
<div
className="w-20 h-2 bg-white/10 rounded-full cursor-pointer relative"
onClick={handleVolumeChange}
>
<div
className="absolute top-0 left-0 h-full bg-white rounded-full pointer-events-none"
style={{ width: `${volume * 100}%` }}
></div>
</div>
</div>
</div>
</div>
</div>
</div>
);
}
// --- RENDU ---
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(<App />);
</script>
</body>
</html>