Spaces:
Running

File size: 49,013 Bytes
515a2f8
 
 
 
80c4bd4
515a2f8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80c4bd4
515a2f8
80c4bd4
515a2f8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80c4bd4
515a2f8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
80c4bd4
 
 
 
 
 
 
 
 
515a2f8
 
 
80c4bd4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
515a2f8
 
 
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
<!DOCTYPE html>
<html lang="fr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>Créateur d'activités FLE</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">
    <style>
        /* Custom animations */
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .fade-in {
            animation: fadeIn 0.3s ease-out forwards;
        }
        
        /* Custom scrollbar */
        ::-webkit-scrollbar {
            width: 8px;
        }
        
        ::-webkit-scrollbar-track {
            background: #f1f1f1;
        }
        
        ::-webkit-scrollbar-thumb {
            background: #888;
            border-radius: 4px;
        }
        
        ::-webkit-scrollbar-thumb:hover {
            background: #555;
        }
        
        /* Activity card hover effect */
        .activity-card {
            transition: all 0.2s ease;
        }
        
        .activity-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
        }
    </style>
</head>
<body class="bg-gray-50 font-sans">
    <div class="min-h-screen flex flex-col">
        <!-- Header -->
        <header class="bg-blue-600 text-white shadow-lg">
            <div class="container mx-auto px-4 py-6">
                <div class="flex justify-between items-center">
                    <div class="flex items-center space-x-2">
                        <i class="fas fa-language text-3xl"></i>
                        <h1 class="text-2xl font-bold">FLE Activity Creator</h1>
                    </div>
                    <button id="help-btn" class="bg-blue-700 hover:bg-blue-800 px-4 py-2 rounded-lg flex items-center space-x-2 transition">
                        <i class="fas fa-question-circle"></i>
                        <span>Aide</span>
                    </button>
                </div>
            </div>
        </header>

        <!-- Main Content -->
        <main class="flex-grow container mx-auto px-4 py-8">
            <div class="grid grid-cols-1 lg:grid-cols-3 gap-4 lg:gap-8">
                <!-- Activity Creator Panel -->
                <div class="lg:col-span-1 bg-white rounded-xl shadow-md p-4 lg:p-6 h-fit lg:sticky top-4 lg:top-8">
                    <h2 class="text-xl font-bold text-gray-800 mb-6 flex items-center">
                        <i class="fas fa-cog mr-2 text-blue-500"></i>
                        Créer une activité
                    </h2>
                    
                    <form id="activity-form" class="space-y-6">
                        <!-- Level Selection -->
                        <div>
                            <label class="block text-sm font-medium text-gray-700 mb-2">
                                <i class="fas fa-layer-group mr-1 text-blue-500"></i>
                                Niveau
                            </label>
                            <div class="grid grid-cols-3 gap-2">
                                <button type="button" data-level="A1" class="level-btn py-2 px-3 rounded-md border border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 transition">
                                    A1
                                </button>
                                <button type="button" data-level="A2" class="level-btn py-2 px-3 rounded-md border border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 transition">
                                    A2
                                </button>
                                <button type="button" data-level="B1" class="level-btn py-2 px-3 rounded-md border border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 transition">
                                    B1
                                </button>
                                <button type="button" data-level="B2" class="level-btn py-2 px-3 rounded-md border border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 transition">
                                    B2
                                </button>
                                <button type="button" data-level="C1" class="level-btn py-2 px-3 rounded-md border border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 transition">
                                    C1
                                </button>
                                <button type="button" data-level="C2" class="level-btn py-2 px-3 rounded-md border border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue-500 transition">
                                    C2
                                </button>
                            </div>
                            <input type="hidden" id="selected-level" name="level">
                        </div>
                        
                        <!-- Theme Selection -->
                        <div>
                            <label for="theme" class="block text-sm font-medium text-gray-700 mb-2">
                                <i class="fas fa-palette mr-1 text-blue-500"></i>
                                Thème
                            </label>
                            <select id="theme" name="theme" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md">
                                <option value="">Sélectionnez un thème</option>
                                <option value="vocabulaire">Vocabulaire</option>
                                <option value="grammaire">Grammaire</option>
                                <option value="conversation">Conversation</option>
                                <option value="culture">Culture française</option>
                                <option value="ecoute">Compréhension orale</option>
                                <option value="lecture">Compréhension écrite</option>
                            </select>
                        </div>
                        
                        <!-- Activity Type -->
                        <div>
                            <label for="activity-type" class="block text-sm font-medium text-gray-700 mb-2">
                                <i class="fas fa-tasks mr-1 text-blue-500"></i>
                                Type d'activité
                            </label>
                            <select id="activity-type" name="activity-type" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm rounded-md">
                                <option value="">Sélectionnez un type</option>
                                <option value="qcm">QCM</option>
                                <option value="text-lacunaire">Texte à trous</option>
                                <option value="association">Association</option>
                                <option value="dictation">Dictée</option>
                                <option value="dialogue">Dialogue à compléter</option>
                                <option value="flashcards">Flashcards</option>
                            </select>
                        </div>
                        
                        <!-- Customization Options (shown based on activity type) -->
                        <div id="customization-options" class="hidden space-y-4">
                            <div id="qcm-options" class="hidden">
                                <h3 class="font-medium text-gray-700 mb-2">
                                    <i class="fas fa-list-ol mr-1 text-blue-500"></i>
                                    Options QCM
                                </h3>
                                <div class="space-y-2">
                                    <div>
                                        <label class="block text-sm text-gray-600">Nombre de questions</label>
                                        <input type="number" min="1" max="20" value="5" class="w-full px-3 py-2 border border-gray-300 rounded-md">
                                    </div>
                                    <div>
                                        <label class="block text-sm text-gray-600">Nombre de réponses par question</label>
                                        <input type="number" min="2" max="5" value="3" class="w-full px-3 py-2 border border-gray-300 rounded-md">
                                    </div>
                                </div>
                            </div>
                            
                            <div id="text-lacunaire-options" class="hidden">
                                <h3 class="font-medium text-gray-700 mb-2">
                                    <i class="fas fa-align-left mr-1 text-blue-500"></i>
                                    Options Texte à trous
                                </h3>
                                <div class="space-y-2">
                                    <div>
                                        <label class="block text-sm text-gray-600">Nombre de trous</label>
                                        <input type="number" min="1" max="15" value="5" class="w-full px-3 py-2 border border-gray-300 rounded-md">
                                    </div>
                                    <div>
                                        <label class="block text-sm text-gray-600">Thème du texte</label>
                                        <input type="text" placeholder="Ex: Voyages, cuisine..." class="w-full px-3 py-2 border border-gray-300 rounded-md">
                                    </div>
                                </div>
                            </div>
                            
                            <div id="association-options" class="hidden">
                                <h3 class="font-medium text-gray-700 mb-2">
                                    <i class="fas fa-object-group mr-1 text-blue-500"></i>
                                    Options Association
                                </h3>
                                <div class="space-y-2">
                                    <div>
                                        <label class="block text-sm text-gray-600">Nombre de paires</label>
                                        <input type="number" min="3" max="10" value="5" class="w-full px-3 py-2 border border-gray-300 rounded-md">
                                    </div>
                                    <div>
                                        <label class="block text-sm text-gray-600">Type d'association</label>
                                        <select class="w-full px-3 py-2 border border-gray-300 rounded-md">
                                            <option>Mot - Définition</option>
                                            <option>Mot - Image</option>
                                            <option>Question - Réponse</option>
                                        </select>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <!-- Generate Button -->
                        <div class="pt-4">
                            <button type="button" id="generate-btn" class="w-full flex justify-center items-center py-3 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition">
                                <i class="fas fa-magic mr-2"></i>
                                Générer l'activité
                            </button>
                        </div>
                    </form>
                </div>
                
                <!-- Activity Preview Panel -->
                <div class="lg:col-span-2">
                    <div class="bg-white rounded-xl shadow-md p-6 mb-8">
                        <div class="flex justify-between items-center mb-6">
                            <h2 class="text-xl font-bold text-gray-800 flex items-center">
                                <i class="fas fa-eye mr-2 text-blue-500"></i>
                                Aperçu de l'activité
                            </h2>
                            <div class="flex space-x-2">
                                <button id="save-btn" class="bg-green-100 text-green-700 px-4 py-2 rounded-lg flex items-center space-x-2 hover:bg-green-200 transition disabled:opacity-50" disabled>
                                    <i class="fas fa-save"></i>
                                    <span>Enregistrer</span>
                                </button>
                                <button id="export-btn" class="bg-purple-100 text-purple-700 px-4 py-2 rounded-lg flex items-center space-x-2 hover:bg-purple-200 transition disabled:opacity-50" disabled>
                                    <i class="fas fa-file-export"></i>
                                    <span>Exporter</span>
                                </button>
                            </div>
                        </div>
                        
                        <!-- Activity Preview Content -->
                        <div id="activity-preview" class="min-h-[400px] border-2 border-dashed border-gray-300 rounded-lg flex items-center justify-center text-gray-400">
                            <div class="text-center p-6">
                                <i class="fas fa-sliders-h text-4xl mb-4"></i>
                                <h3 class="text-lg font-medium">Configurez votre activité</h3>
                                <p class="mt-2">Sélectionnez un niveau, un thème et un type d'activité pour commencer</p>
                            </div>
                        </div>
                    </div>
                    
                    <!-- Saved Activities -->
                    <div class="bg-white rounded-xl shadow-md p-6">
                        <h2 class="text-xl font-bold text-gray-800 mb-6 flex items-center">
                            <i class="fas fa-archive mr-2 text-blue-500"></i>
                            Mes activités sauvegardées
                        </h2>
                        
                        <div id="saved-activities" class="grid grid-cols-1 sm:grid-cols-2 gap-3">
                            <!-- Placeholder for saved activities -->
                            <div class="border border-gray-200 rounded-lg p-4 text-center text-gray-500">
                                <i class="fas fa-inbox text-3xl mb-2"></i>
                                <p>Aucune activité sauvegardée</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </main>
        
        <!-- Footer -->
        <footer class="bg-gray-800 text-white py-6">
            <div class="container mx-auto px-4 text-center">
                <p>Créateur d'activités FLE &copy; 2023 - Tous droits réservés</p>
                <div class="flex justify-center space-x-4 mt-2">
                    <a href="#" class="hover:text-blue-300 transition"><i class="fab fa-twitter"></i></a>
                    <a href="#" class="hover:text-blue-300 transition"><i class="fab fa-facebook"></i></a>
                    <a href="#" class="hover:text-blue-300 transition"><i class="fab fa-instagram"></i></a>
                </div>
            </div>
        </footer>
    </div>
    
    <!-- Help Modal -->
    <div id="help-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
        <div class="bg-white rounded-lg max-w-2xl w-full max-h-[90vh] overflow-y-auto">
            <div class="p-6">
                <div class="flex justify-between items-center mb-4">
                    <h3 class="text-xl font-bold text-gray-800">
                        <i class="fas fa-question-circle text-blue-500 mr-2"></i>
                        Aide et instructions
                    </h3>
                    <button id="close-help-modal" class="text-gray-500 hover:text-gray-700">
                        <i class="fas fa-times"></i>
                    </button>
                </div>
                
                <div class="space-y-4 text-gray-700">
                    <div>
                        <h4 class="font-medium text-lg mb-2">Comment créer une activité</h4>
                        <ol class="list-decimal pl-5 space-y-2">
                            <li>Sélectionnez le niveau de vos élèves (A1 à C2)</li>
                            <li>Choisissez un thème pour votre activité</li>
                            <li>Sélectionnez le type d'activité que vous souhaitez créer</li>
                            <li>Configurez les options spécifiques à votre activité</li>
                            <li>Cliquez sur "Générer l'activité"</li>
                        </ol>
                    </div>
                    
                    <div>
                        <h4 class="font-medium text-lg mb-2">Types d'activités disponibles</h4>
                        <ul class="space-y-3">
                            <li>
                                <span class="font-medium">QCM</span> - Questions à choix multiples avec feedback
                            </li>
                            <li>
                                <span class="font-medium">Texte à trous</span> - Texte avec des mots manquants à compléter
                            </li>
                            <li>
                                <span class="font-medium">Association</span> - Relier des éléments entre eux (mots-définitions, mots-images)
                            </li>
                            <li>
                                <span class="font-medium">Dictée</span> - Exercice d'écoute et de transcription
                            </li>
                            <li>
                                <span class="font-medium">Dialogue à compléter</span> - Dialogue avec répliques manquantes
                            </li>
                            <li>
                                <span class="font-medium">Flashcards</span> - Cartes mémoire pour réviser du vocabulaire
                            </li>
                        </ul>
                    </div>
                    
                    <div>
                        <h4 class="font-medium text-lg mb-2">Conseils pédagogiques</h4>
                        <ul class="space-y-2">
                            <li><i class="fas fa-check-circle text-green-500 mr-1"></i> Adaptez la difficulté au niveau de vos élèves</li>
                            <li><i class="fas fa-check-circle text-green-500 mr-1"></i> Variez les types d'activités pour maintenir l'intérêt</li>
                            <li><i class="fas fa-check-circle text-green-500 mr-1"></i> Utilisez des thèmes qui intéressent vos élèves</li>
                            <li><i class="fas fa-check-circle text-green-500 mr-1"></i> Intégrez des éléments culturels pour enrichir l'apprentissage</li>
                        </ul>
                    </div>
                </div>
                
                <div class="mt-6 pt-4 border-t border-gray-200">
                    <button id="close-help-modal-btn" class="w-full bg-blue-600 text-white py-2 px-4 rounded-md hover:bg-blue-700 transition">
                        J'ai compris
                    </button>
                </div>
            </div>
        </div>
    </div>
    
    <!-- Export Modal -->
    <div id="export-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
        <div class="bg-white rounded-lg max-w-md w-full">
            <div class="p-6">
                <div class="flex justify-between items-center mb-4">
                    <h3 class="text-xl font-bold text-gray-800">
                        <i class="fas fa-file-export text-blue-500 mr-2"></i>
                        Exporter l'activité
                    </h3>
                    <button id="close-export-modal" class="text-gray-500 hover:text-gray-700">
                        <i class="fas fa-times"></i>
                    </button>
                </div>
                
                <div class="space-y-4 text-gray-700">
                    <p>Choisissez le format d'exportation :</p>
                    
                    <div class="grid grid-cols-2 gap-4">
                        <button class="export-option border border-gray-200 rounded-lg p-4 hover:bg-gray-50 transition flex flex-col items-center">
                            <i class="fas fa-file-pdf text-3xl text-red-500 mb-2"></i>
                            <span>PDF</span>
                        </button>
                        
                        <button class="export-option border border-gray-200 rounded-lg p-4 hover:bg-gray-50 transition flex flex-col items-center">
                            <i class="fas fa-file-word text-3xl text-blue-500 mb-2"></i>
                            <span>Word</span>
                        </button>
                        
                        <button class="export-option border border-gray-200 rounded-lg p-4 hover:bg-gray-50 transition flex flex-col items-center">
                            <i class="fas fa-file-powerpoint text-3xl text-orange-500 mb-2"></i>
                            <span>PowerPoint</span>
                        </button>
                        
                        <button class="export-option border border-gray-200 rounded-lg p-4 hover:bg-gray-50 transition flex flex-col items-center">
                            <i class="fas fa-link text-3xl text-purple-500 mb-2"></i>
                            <span>Lien partageable</span>
                        </button>
                    </div>
                </div>
                
                <div class="mt-6 pt-4 border-t border-gray-200">
                    <button id="close-export-modal-btn" class="w-full bg-gray-200 text-gray-800 py-2 px-4 rounded-md hover:bg-gray-300 transition">
                        Annuler
                    </button>
                </div>
            </div>
        </div>
    </div>
    
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // Elements
            const levelBtns = document.querySelectorAll('.level-btn');
            const themeSelect = document.getElementById('theme');
            const activityTypeSelect = document.getElementById('activity-type');
            const customizationOptions = document.getElementById('customization-options');
            const generateBtn = document.getElementById('generate-btn');
            const saveBtn = document.getElementById('save-btn');
            const exportBtn = document.getElementById('export-btn');
            const activityPreview = document.getElementById('activity-preview');
            const savedActivities = document.getElementById('saved-activities');
            
            // Modal elements
            const helpBtn = document.getElementById('help-btn');
            const helpModal = document.getElementById('help-modal');
            const closeHelpModal = document.getElementById('close-help-modal');
            const closeHelpModalBtn = document.getElementById('close-help-modal-btn');
            
            const exportModal = document.getElementById('export-modal');
            const closeExportModal = document.getElementById('close-export-modal');
            const closeExportModalBtn = document.getElementById('close-export-modal-btn');
            const exportOptions = document.querySelectorAll('.export-option');
            
            // Sample activities data
            const sampleActivities = {
                qcm: {
                    title: "Quiz de vocabulaire",
                    content: `
                        <div class="space-y-6">
                            <h3 class="text-xl font-bold text-blue-600">Quiz de vocabulaire - Niveau A1</h3>
                            <p class="text-gray-600">Choisissez la bonne réponse pour chaque question.</p>
                            
                            <div class="space-y-4">
                                <div class="border border-gray-200 rounded-lg p-4">
                                    <p class="font-medium mb-3">1. Comment dit-on "apple" en français ?</p>
                                    <div class="space-y-2">
                                        <label class="flex items-center space-x-3 cursor-pointer">
                                            <input type="radio" name="q1" class="h-4 w-4 text-blue-600">
                                            <span>La banane</span>
                                        </label>
                                        <label class="flex items-center space-x-3 cursor-pointer">
                                            <input type="radio" name="q1" class="h-4 w-4 text-blue-600">
                                            <span>La pomme</span>
                                        </label>
                                        <label class="flex items-center space-x-3 cursor-pointer">
                                            <input type="radio" name="q1" class="h-4 w-4 text-blue-600">
                                            <span>L'orange</span>
                                        </label>
                                    </div>
                                </div>
                                
                                <div class="border border-gray-200 rounded-lg p-4">
                                    <p class="font-medium mb-3">2. Quel est le contraire de "grand" ?</p>
                                    <div class="space-y-2">
                                        <label class="flex items-center space-x-3 cursor-pointer">
                                            <input type="radio" name="q2" class="h-4 w-4 text-blue-600">
                                            <span>Petit</span>
                                        </label>
                                        <label class="flex items-center space-x-3 cursor-pointer">
                                            <input type="radio" name="q2" class="h-4 w-4 text-blue-600">
                                            <span>Beau</span>
                                        </label>
                                        <label class="flex items-center space-x-3 cursor-pointer">
                                            <input type="radio" name="q2" class="h-4 w-4 text-blue-600">
                                            <span>Vieux</span>
                                        </label>
                                    </div>
                                </div>
                                
                                <div class="border border-gray-200 rounded-lg p-4">
                                    <p class="font-medium mb-3">3. Complétez : "Je ___ à Paris."</p>
                                    <div class="space-y-2">
                                        <label class="flex items-center space-x-3 cursor-pointer">
                                            <input type="radio" name="q3" class="h-4 w-4 text-blue-600">
                                            <span>habite</span>
                                        </label>
                                        <label class="flex items-center space-x-3 cursor-pointer">
                                            <input type="radio" name="q3" class="h-4 w-4 text-blue-600">
                                            <span>habites</span>
                                        </label>
                                        <label class="flex items-center space-x-3 cursor-pointer">
                                            <input type="radio" name="q3" class="h-4 w-4 text-blue-600">
                                            <span>habitez</span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                            
                            <div class="pt-4">
                                <button class="bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">
                                    Valider les réponses
                                </button>
                            </div>
                        </div>
                    `
                },
                'text-lacunaire': {
                    title: "Texte à trous - La famille",
                    content: `
                        <div class="space-y-6">
                            <h3 class="text-xl font-bold text-blue-600">Texte à trous - La famille (Niveau A1)</h3>
                            <p class="text-gray-600">Complétez le texte avec les mots appropriés.</p>
                            
                            <div class="border border-gray-200 rounded-lg p-6 bg-gray-50">
                                <p class="mb-4">Je m'appelle Pierre. J'ai une grande <input type="text" class="border-b border-gray-400 px-2 py-1 w-24">. Mon <input type="text" class="border-b border-gray-400 px-2 py-1 w-24"> s'appelle Jean et ma <input type="text" class="border-b border-gray-400 px-2 py-1 w-24"> s'appelle Marie. Nous <input type="text" class="border-b border-gray-400 px-2 py-1 w-24"> à Lyon. Mes <input type="text" class="border-b border-gray-400 px-2 py-1 w-24"> habitent à la campagne.</p>
                                
                                <div class="bg-blue-50 border border-blue-200 rounded-lg p-4">
                                    <h4 class="font-medium text-blue-800 mb-2">Mots à utiliser :</h4>
                                    <div class="flex flex-wrap gap-2">
                                        <span class="bg-white border border-blue-200 px-3 py-1 rounded-full text-sm">famille</span>
                                        <span class="bg-white border border-blue-200 px-3 py-1 rounded-full text-sm">père</span>
                                        <span class="bg-white border border-blue-200 px-3 py-1 rounded-full text-sm">mère</span>
                                        <span class="bg-white border border-blue-200 px-3 py-1 rounded-full text-sm">habitons</span>
                                        <span class="bg-white border border-blue-200 px-3 py-1 rounded-full text-sm">grands-parents</span>
                                    </div>
                                </div>
                            </div>
                            
                            <div class="pt-4">
                                <button class="bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">
                                    Vérifier les réponses
                                </button>
                            </div>
                        </div>
                    `
                },
                association: {
                    title: "Association mots-images",
                    content: `
                        <div class="space-y-6">
                            <h3 class="text-xl font-bold text-blue-600">Association mots-images (Niveau A1)</h3>
                            <p class="text-gray-600">Reliez chaque mot à l'image correspondante.</p>
                            
                            <div class="grid grid-cols-2 gap-4">
                                <!-- Words Column -->
                                <div class="space-y-3">
                                    <div class="border border-gray-200 rounded-lg p-3 cursor-move bg-white draggable" draggable="true" data-word="pomme">
                                        <p class="text-center font-medium">La pomme</p>
                                    </div>
                                    <div class="border border-gray-200 rounded-lg p-3 cursor-move bg-white draggable" draggable="true" data-word="chien">
                                        <p class="text-center font-medium">Le chien</p>
                                    </div>
                                    <div class="border border-gray-200 rounded-lg p-3 cursor-move bg-white draggable" draggable="true" data-word="maison">
                                        <p class="text-center font-medium">La maison</p>
                                    </div>
                                    <div class="border border-gray-200 rounded-lg p-3 cursor-move bg-white draggable" draggable="true" data-word="voiture">
                                        <p class="text-center font-medium">La voiture</p>
                                    </div>
                                </div>
                                
                                <!-- Images Column -->
                                <div class="space-y-3">
                                    <div class="border border-gray-200 rounded-lg p-3 h-[60px] flex items-center justify-center dropzone" data-word="maison">
                                        <div class="w-10 h-10 bg-blue-200 rounded"></div>
                                    </div>
                                    <div class="border border-gray-200 rounded-lg p-3 h-[60px] flex items-center justify-center dropzone" data-word="chien">
                                        <div class="w-10 h-10 bg-yellow-200 rounded"></div>
                                    </div>
                                    <div class="border border-gray-200 rounded-lg p-3 h-[60px] flex items-center justify-center dropzone" data-word="voiture">
                                        <div class="w-10 h-10 bg-red-200 rounded"></div>
                                    </div>
                                    <div class="border border-gray-200 rounded-lg p-3 h-[60px] flex items-center justify-center dropzone" data-word="pomme">
                                        <div class="w-10 h-10 bg-green-200 rounded"></div>
                                    </div>
                                </div>
                            </div>
                            
                            <div class="pt-4 flex justify-between">
                                <button class="bg-gray-200 text-gray-800 px-4 py-2 rounded-md hover:bg-gray-300 transition">
                                    Réinitialiser
                                </button>
                                <button class="bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">
                                    Vérifier les associations
                                </button>
                            </div>
                        </div>
                    `
                },
                dictation: {
                    title: "Dictée - Ma journée",
                    content: `
                        <div class="space-y-6">
                            <h3 class="text-xl font-bold text-blue-600">Dictée - Ma journée (Niveau A2)</h3>
                            <p class="text-gray-600">Écoutez le texte et écrivez ce que vous entendez.</p>
                            
                            <div class="border border-gray-200 rounded-lg p-6 bg-gray-50">
                                <div class="flex justify-center mb-4">
                                    <button class="bg-blue-600 text-white px-6 py-3 rounded-full hover:bg-blue-700 transition flex items-center space-x-2">
                                        <i class="fas fa-play"></i>
                                        <span>Écouter le texte</span>
                                    </button>
                                </div>
                                
                                <div class="mb-4">
                                    <label class="block text-sm font-medium text-gray-700 mb-2">Nombre d'écoutes :</label>
                                    <select class="w-full px-3 py-2 border border-gray-300 rounded-md">
                                        <option>1</option>
                                        <option selected>2</option>
                                        <option>3</option>
                                    </select>
                                </div>
                                
                                <div>
                                    <label class="block text-sm font-medium text-gray-700 mb-2">Votre texte :</label>
                                    <textarea class="w-full px-3 py-2 border border-gray-300 rounded-md h-32" placeholder="Écrivez ici ce que vous entendez..."></textarea>
                                </div>
                            </div>
                            
                            <div class="pt-4">
                                <button class="bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">
                                    Vérifier la dictée
                                </button>
                            </div>
                        </div>
                    `
                },
                dialogue: {
                    title: "Dialogue au restaurant",
                    content: `
                        <div class="space-y-6">
                            <h3 class="text-xl font-bold text-blue-600">Dialogue au restaurant (Niveau A2)</h3>
                            <p class="text-gray-600">Complétez le dialogue avec les phrases appropriées.</p>
                            
                            <div class="border border-gray-200 rounded-lg p-6 bg-gray-50">
                                <div class="space-y-4">
                                    <div class="flex">
                                        <div class="bg-blue-100 rounded-lg p-3 max-w-[80%]">
                                            <p class="font-medium">Serveur :</p>
                                            <p>Bonjour, vous avez choisi ?</p>
                                        </div>
                                    </div>
                                    
                                    <div class="flex justify-end">
                                        <div class="bg-green-100 rounded-lg p-3 max-w-[80%]">
                                            <p class="font-medium">Client :</p>
                                            <select class="w-full px-2 py-1 border border-gray-300 rounded">
                                                <option value="">Choisissez une réponse</option>
                                                <option value="1">Oui, je vais prendre le menu du jour</option>
                                                <option value="2">Non, je n'ai pas faim</option>
                                                <option value="3">Je voudrais voir la carte des vins</option>
                                            </select>
                                        </div>
                                    </div>
                                    
                                    <div class="flex">
                                        <div class="bg-blue-100 rounded-lg p-3 max-w-[80%]">
                                            <p class="font-medium">Serveur :</p>
                                            <p>Très bien. Comme boisson ?</p>
                                        </div>
                                    </div>
                                    
                                    <div class="flex justify-end">
                                        <div class="bg-green-100 rounded-lg p-3 max-w-[80%]">
                                            <p class="font-medium">Client :</p>
                                            <select class="w-full px-2 py-1 border border-gray-300 rounded">
                                                <option value="">Choisissez une réponse</option>
                                                <option value="1">Un verre d'eau, s'il vous plaît</option>
                                                <option value="2">Je préfère un café</option>
                                                <option value="3">Une bouteille de vin rouge</option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                
                                <div class="mt-6 bg-yellow-50 border border-yellow-200 rounded-lg p-4">
                                    <h4 class="font-medium text-yellow-800 mb-2">Phrases possibles :</h4>
                                    <ul class="list-disc pl-5 space-y-1">
                                        <li>Oui, je vais prendre le menu du jour</li>
                                        <li>Un verre d'eau, s'il vous plaît</li>
                                        <li>Je voudrais voir la carte des vins</li>
                                        <li>Une bouteille de vin rouge</li>
                                    </ul>
                                </div>
                            </div>
                            
                            <div class="pt-4">
                                <button class="bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">
                                    Vérifier le dialogue
                                </button>
                            </div>
                        </div>
                    `
                },
                flashcards: {
                    title: "Flashcards - Les animaux",
                    content: `
                        <div class="space-y-6">
                            <h3 class="text-xl font-bold text-blue-600">Flashcards - Les animaux (Niveau A1)</h3>
                            <p class="text-gray-600">Apprenez le vocabulaire des animaux en français.</p>
                            
                            <div class="flex justify-center">
                                <div class="w-full max-w-md h-64 perspective">
                                    <div class="relative w-full h-full transition-transform duration-500 transform-style-preserve-3d" id="flashcard">
                                        <!-- Front of the card -->
                                        <div class="absolute w-full h-full backface-hidden bg-white border border-gray-200 rounded-xl p-6 flex flex-col items-center justify-center">
                                            <div class="w-24 h-24 bg-blue-200 rounded-full mb-4"></div>
                                            <h4 class="text-xl font-bold">Le chien</h4>
                                            <button class="mt-4 text-blue-600 hover:text-blue-800 transition" id="flip-card">
                                                <i class="fas fa-redo mr-1"></i> Retourner
                                            </button>
                                        </div>
                                        
                                        <!-- Back of the card -->
                                        <div class="absolute w-full h-full backface-hidden bg-blue-100 border border-blue-200 rounded-xl p-6 flex flex-col items-center justify-center transform-rotate-y-180">
                                            <div class="w-24 h-24 bg-blue-300 rounded-full mb-4 flex items-center justify-center">
                                                <span class="text-4xl">🐶</span>
                                            </div>
                                            <h4 class="text-xl font-bold">Dog</h4>
                                            <p class="text-center mt-2">Animal domestique fidèle</p>
                                            <button class="mt-4 text-blue-600 hover:text-blue-800 transition" id="flip-card-back">
                                                <i class="fas fa-redo mr-1"></i> Retourner
                                            </button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                            <div class="flex justify-between pt-4">
                                <button class="bg-gray-200 text-gray-800 px-4 py-2 rounded-md hover:bg-gray-300 transition">
                                    <i class="fas fa-arrow-left mr-1"></i> Précédent
                                </button>
                                <div class="text-gray-600">
                                    Carte 1/10
                                </div>
                                <button class="bg-blue-600 text-white px-4 py-2 rounded-md hover:bg-blue-700 transition">
                                    Suivant <i class="fas fa-arrow-right ml-1"></i>
                                </button>
                            </div>
                        </div>
                    `
                }
            };
            
            // Selected level
            let selectedLevel = '';
            
            // Function to check if form is valid
            function checkFormValidity() {
                const isLevelSelected = selectedLevel !== '';
                const isThemeSelected = themeSelect.value !== '';
                const isActivityTypeSelected = activityTypeSelect.value !== '';
                
                generateBtn.disabled = !(isLevelSelected && isThemeSelected && isActivityTypeSelected);
            }

            // Handle level selection
            levelBtns.forEach(btn => {
                btn.addEventListener('click', function() {
                    selectedLevel = this.dataset.level;
                    document.getElementById('selected-level').value = selectedLevel;
                    this.classList.add('bg-blue-100', 'border-blue-500');
                    levelBtns.forEach(otherBtn => {
                        if (otherBtn !== this) {
                            otherBtn.classList.remove('bg-blue-100', 'border-blue-500');
                        }
                    });
                    checkFormValidity();
                });
            });

            // Handle theme and activity type changes
            themeSelect.addEventListener('change', checkFormValidity);
            activityTypeSelect.addEventListener('change', function() {
                // Hide all options first
                document.querySelectorAll('#customization-options > div').forEach(div => {
                    div.classList.add('hidden');
                });
                
                // Show relevant options
                const selectedType = this.value;
                if (selectedType) {
                    customizationOptions.classList.remove('hidden');
                    document.getElementById(`${selectedType}-options`)?.classList.remove('hidden');
                } else {
                    customizationOptions.classList.add('hidden');
                }
                
                checkFormValidity();
            });
                   
<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=masterseb/fle2" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>