Enoder commited on
Commit
c12162b
·
verified ·
1 Parent(s): 97c42b6

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +655 -19
index.html CHANGED
@@ -1,19 +1,655 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="fr">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Devine la Mante | Jeu Géographique</title>
7
+ <link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
8
+ <link href="https://fonts.googleapis.com/css2?family=Crimson+Pro:wght@400;600;700&family=Source+Sans+3:wght@300;400;600&display=swap" rel="stylesheet">
9
+ <style>
10
+ * {
11
+ margin: 0;
12
+ padding: 0;
13
+ box-sizing: border-box;
14
+ }
15
+
16
+ :root {
17
+ --sepia: #f4f1e8;
18
+ --dark-sepia: #3d3526;
19
+ --accent-green: #4a7c59;
20
+ --accent-gold: #d4a574;
21
+ --shadow: rgba(61, 53, 38, 0.15);
22
+ --border: rgba(61, 53, 38, 0.2);
23
+ }
24
+
25
+ body {
26
+ font-family: 'Source Sans 3', sans-serif;
27
+ background: linear-gradient(135deg, #f4f1e8 0%, #e8e3d6 100%);
28
+ color: var(--dark-sepia);
29
+ overflow-x: hidden;
30
+ min-height: 100vh;
31
+ }
32
+
33
+ /* Texture overlay */
34
+ body::before {
35
+ content: '';
36
+ position: fixed;
37
+ top: 0;
38
+ left: 0;
39
+ width: 100%;
40
+ height: 100%;
41
+ background-image:
42
+ repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(61, 53, 38, 0.03) 2px, rgba(61, 53, 38, 0.03) 4px),
43
+ repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(61, 53, 38, 0.03) 2px, rgba(61, 53, 38, 0.03) 4px);
44
+ pointer-events: none;
45
+ z-index: 1;
46
+ opacity: 0.3;
47
+ }
48
+
49
+ .container {
50
+ max-width: 1400px;
51
+ margin: 0 auto;
52
+ padding: 2rem;
53
+ position: relative;
54
+ z-index: 2;
55
+ }
56
+
57
+ header {
58
+ text-align: center;
59
+ margin-bottom: 3rem;
60
+ animation: fadeInDown 1s ease;
61
+ }
62
+
63
+ h1 {
64
+ font-family: 'Crimson Pro', serif;
65
+ font-size: 3.5rem;
66
+ font-weight: 700;
67
+ color: var(--accent-green);
68
+ letter-spacing: -0.02em;
69
+ margin-bottom: 0.5rem;
70
+ text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
71
+ }
72
+
73
+ .subtitle {
74
+ font-size: 1.1rem;
75
+ color: var(--dark-sepia);
76
+ opacity: 0.8;
77
+ font-style: italic;
78
+ }
79
+
80
+ .game-container {
81
+ display: grid;
82
+ grid-template-columns: 1fr 380px;
83
+ gap: 2rem;
84
+ animation: fadeInUp 1s ease 0.2s both;
85
+ }
86
+
87
+ .map-panel {
88
+ background: white;
89
+ border-radius: 16px;
90
+ box-shadow:
91
+ 0 10px 40px var(--shadow),
92
+ inset 0 0 0 1px var(--border);
93
+ overflow: hidden;
94
+ position: relative;
95
+ }
96
+
97
+ .map-header {
98
+ background: linear-gradient(135deg, var(--accent-green) 0%, #5a8c69 100%);
99
+ color: white;
100
+ padding: 1.5rem 2rem;
101
+ font-family: 'Crimson Pro', serif;
102
+ font-size: 1.4rem;
103
+ font-weight: 600;
104
+ letter-spacing: 0.02em;
105
+ }
106
+
107
+ #map {
108
+ height: 600px;
109
+ width: 100%;
110
+ background: #a8c5d9;
111
+ }
112
+
113
+ .control-panel {
114
+ background: white;
115
+ border-radius: 16px;
116
+ box-shadow:
117
+ 0 10px 40px var(--shadow),
118
+ inset 0 0 0 1px var(--border);
119
+ padding: 2rem;
120
+ display: flex;
121
+ flex-direction: column;
122
+ gap: 1.5rem;
123
+ }
124
+
125
+ .species-options {
126
+ display: flex;
127
+ flex-direction: column;
128
+ gap: 0.75rem;
129
+ }
130
+
131
+ .species-btn {
132
+ background: var(--sepia);
133
+ border: 2px solid var(--border);
134
+ padding: 1rem 1.25rem;
135
+ border-radius: 10px;
136
+ font-family: 'Crimson Pro', serif;
137
+ font-size: 1.05rem;
138
+ color: var(--dark-sepia);
139
+ cursor: pointer;
140
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
141
+ text-align: left;
142
+ position: relative;
143
+ overflow: hidden;
144
+ }
145
+
146
+ .species-btn::before {
147
+ content: '';
148
+ position: absolute;
149
+ top: 0;
150
+ left: -100%;
151
+ width: 100%;
152
+ height: 100%;
153
+ background: linear-gradient(90deg, transparent, rgba(74, 124, 89, 0.1), transparent);
154
+ transition: left 0.5s;
155
+ }
156
+
157
+ .species-btn:hover {
158
+ background: white;
159
+ border-color: var(--accent-green);
160
+ transform: translateX(4px);
161
+ box-shadow: 0 4px 12px var(--shadow);
162
+ }
163
+
164
+ .species-btn:hover::before {
165
+ left: 100%;
166
+ }
167
+
168
+ .species-btn.correct {
169
+ background: var(--accent-green);
170
+ color: white;
171
+ border-color: var(--accent-green);
172
+ animation: correctPulse 0.6s ease;
173
+ }
174
+
175
+ .species-btn.incorrect {
176
+ background: #c54a4a;
177
+ color: white;
178
+ border-color: #c54a4a;
179
+ animation: shake 0.5s ease;
180
+ }
181
+
182
+ .hints-section {
183
+ border-top: 2px solid var(--border);
184
+ padding-top: 1.5rem;
185
+ }
186
+
187
+ .hint-btn {
188
+ background: linear-gradient(135deg, var(--accent-gold) 0%, #c49564 100%);
189
+ color: white;
190
+ border: none;
191
+ padding: 1rem 1.5rem;
192
+ border-radius: 10px;
193
+ font-family: 'Crimson Pro', serif;
194
+ font-size: 1.1rem;
195
+ font-weight: 600;
196
+ cursor: pointer;
197
+ width: 100%;
198
+ transition: all 0.3s ease;
199
+ box-shadow: 0 4px 12px rgba(212, 165, 116, 0.3);
200
+ }
201
+
202
+ .hint-btn:hover {
203
+ transform: translateY(-2px);
204
+ box-shadow: 0 6px 20px rgba(212, 165, 116, 0.4);
205
+ }
206
+
207
+ .hint-btn:active {
208
+ transform: translateY(0);
209
+ }
210
+
211
+ .hint-btn:disabled {
212
+ opacity: 0.5;
213
+ cursor: not-allowed;
214
+ }
215
+
216
+ .hints-display {
217
+ margin-top: 1rem;
218
+ display: flex;
219
+ flex-direction: column;
220
+ gap: 0.75rem;
221
+ }
222
+
223
+ .hint-item {
224
+ background: #fff9f0;
225
+ border-left: 4px solid var(--accent-gold);
226
+ padding: 1rem;
227
+ border-radius: 6px;
228
+ font-size: 0.95rem;
229
+ line-height: 1.6;
230
+ animation: slideInRight 0.4s ease;
231
+ }
232
+
233
+ .hint-label {
234
+ font-weight: 600;
235
+ color: var(--accent-green);
236
+ margin-bottom: 0.25rem;
237
+ }
238
+
239
+ .score-display {
240
+ background: linear-gradient(135deg, #f8f6f0 0%, #ede9dc 100%);
241
+ padding: 1.5rem;
242
+ border-radius: 10px;
243
+ text-align: center;
244
+ border: 2px solid var(--border);
245
+ }
246
+
247
+ .score-label {
248
+ font-family: 'Crimson Pro', serif;
249
+ font-size: 0.9rem;
250
+ color: var(--dark-sepia);
251
+ opacity: 0.7;
252
+ text-transform: uppercase;
253
+ letter-spacing: 0.1em;
254
+ margin-bottom: 0.5rem;
255
+ }
256
+
257
+ .score-value {
258
+ font-size: 2.5rem;
259
+ font-weight: 700;
260
+ color: var(--accent-green);
261
+ font-family: 'Crimson Pro', serif;
262
+ }
263
+
264
+ .next-btn {
265
+ background: var(--accent-green);
266
+ color: white;
267
+ border: none;
268
+ padding: 1rem 1.5rem;
269
+ border-radius: 10px;
270
+ font-family: 'Crimson Pro', serif;
271
+ font-size: 1.1rem;
272
+ font-weight: 600;
273
+ cursor: pointer;
274
+ width: 100%;
275
+ transition: all 0.3s ease;
276
+ box-shadow: 0 4px 12px rgba(74, 124, 89, 0.3);
277
+ }
278
+
279
+ .next-btn:hover {
280
+ background: #5a8c69;
281
+ transform: translateY(-2px);
282
+ box-shadow: 0 6px 20px rgba(74, 124, 89, 0.4);
283
+ }
284
+
285
+ .next-btn:disabled {
286
+ opacity: 0.5;
287
+ cursor: not-allowed;
288
+ }
289
+
290
+ .result-message {
291
+ padding: 1.5rem;
292
+ border-radius: 10px;
293
+ text-align: center;
294
+ font-family: 'Crimson Pro', serif;
295
+ font-size: 1.2rem;
296
+ font-weight: 600;
297
+ animation: fadeIn 0.5s ease;
298
+ }
299
+
300
+ .result-message.correct {
301
+ background: rgba(74, 124, 89, 0.1);
302
+ color: var(--accent-green);
303
+ border: 2px solid var(--accent-green);
304
+ }
305
+
306
+ .result-message.incorrect {
307
+ background: rgba(197, 74, 74, 0.1);
308
+ color: #c54a4a;
309
+ border: 2px solid #c54a4a;
310
+ }
311
+
312
+ /* Animations */
313
+ @keyframes fadeInDown {
314
+ from {
315
+ opacity: 0;
316
+ transform: translateY(-30px);
317
+ }
318
+ to {
319
+ opacity: 1;
320
+ transform: translateY(0);
321
+ }
322
+ }
323
+
324
+ @keyframes fadeInUp {
325
+ from {
326
+ opacity: 0;
327
+ transform: translateY(30px);
328
+ }
329
+ to {
330
+ opacity: 1;
331
+ transform: translateY(0);
332
+ }
333
+ }
334
+
335
+ @keyframes slideInRight {
336
+ from {
337
+ opacity: 0;
338
+ transform: translateX(-20px);
339
+ }
340
+ to {
341
+ opacity: 1;
342
+ transform: translateX(0);
343
+ }
344
+ }
345
+
346
+ @keyframes fadeIn {
347
+ from { opacity: 0; }
348
+ to { opacity: 1; }
349
+ }
350
+
351
+ @keyframes correctPulse {
352
+ 0%, 100% { transform: scale(1); }
353
+ 50% { transform: scale(1.05); }
354
+ }
355
+
356
+ @keyframes shake {
357
+ 0%, 100% { transform: translateX(0); }
358
+ 25% { transform: translateX(-10px); }
359
+ 75% { transform: translateX(10px); }
360
+ }
361
+
362
+ /* Responsive */
363
+ @media (max-width: 1024px) {
364
+ .game-container {
365
+ grid-template-columns: 1fr;
366
+ }
367
+
368
+ h1 {
369
+ font-size: 2.5rem;
370
+ }
371
+
372
+ #map {
373
+ height: 500px;
374
+ }
375
+ }
376
+
377
+ /* Leaflet attribution styling */
378
+ .leaflet-control-attribution {
379
+ background: rgba(255, 255, 255, 0.8) !important;
380
+ font-size: 0.7rem !important;
381
+ }
382
+ </style>
383
+ </head>
384
+ <body>
385
+ <div class="container">
386
+ <header>
387
+ <h1>🦗 Devine la Mante</h1>
388
+ <p class="subtitle">Identifie l'espèce selon sa distribution géographique</p>
389
+ </header>
390
+
391
+ <div class="game-container">
392
+ <div class="map-panel">
393
+ <div class="map-header">
394
+ Distribution Mondiale des Occurrences
395
+ </div>
396
+ <div id="map"></div>
397
+ </div>
398
+
399
+ <div class="control-panel">
400
+ <div class="score-display">
401
+ <div class="score-label">Score</div>
402
+ <div class="score-value" id="score">0</div>
403
+ </div>
404
+
405
+ <div id="result-container"></div>
406
+
407
+ <div class="species-options" id="species-options">
408
+ <!-- Options will be generated here -->
409
+ </div>
410
+
411
+ <div class="hints-section">
412
+ <button class="hint-btn" id="hint-btn">
413
+ 💡 Demander un indice
414
+ </button>
415
+ <div class="hints-display" id="hints-display">
416
+ <!-- Hints will appear here -->
417
+ </div>
418
+ </div>
419
+
420
+ <button class="next-btn" id="next-btn" style="display: none;">
421
+ Mante Suivante →
422
+ </button>
423
+ </div>
424
+ </div>
425
+ </div>
426
+
427
+ <script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
428
+ <script>
429
+ // Species data with taxonKeys and hints
430
+ const speciesData = [
431
+ {
432
+ name: "Mantis religiosa",
433
+ commonName: "Mante religieuse",
434
+ taxonKey: "144094823",
435
+ hints: [
436
+ "Famille : Mantidae",
437
+ "C'est l'espèce de mante la plus commune et répandue en Europe",
438
+ "Son nom vient de sa posture caractéristique, pattes avant levées comme en prière"
439
+ ]
440
+ },
441
+ {
442
+ name: "Iris oratoria",
443
+ commonName: "Mante méditerranéenne",
444
+ taxonKey: "1404300",
445
+ hints: [
446
+ "Famille : Tarachodidae",
447
+ "Espèce méditerranéenne qui s'étend vers le nord",
448
+ "Reconnaissable aux ocelles (taches en forme d'œil) sur ses ailes postérieures"
449
+ ]
450
+ },
451
+ {
452
+ name: "Hierodula patellifera",
453
+ commonName: "Mante asiatique géante",
454
+ taxonKey: "1405951",
455
+ hints: [
456
+ "Famille : Mantidae",
457
+ "Une des plus grandes espèces, originaire d'Asie du Sud-Est",
458
+ "Très populaire en terrariophilie pour sa taille impressionnante"
459
+ ]
460
+ },
461
+ {
462
+ name: "Sphodromantis viridis",
463
+ commonName: "Mante africaine",
464
+ taxonKey: "7204692",
465
+ hints: [
466
+ "Famille : Mantidae",
467
+ "Espèce africaine de couleur verte caractéristique",
468
+ "Robuste et facile à élever, très appréciée des éleveurs"
469
+ ]
470
+ },
471
+ {
472
+ name: "Blepharopsis mendica",
473
+ commonName: "Mante fleur égyptienne",
474
+ taxonKey: "1406697",
475
+ hints: [
476
+ "Famille : Empusidae",
477
+ "Originaire d'Afrique du Nord et du Moyen-Orient",
478
+ "Connue pour ses superbes motifs et sa ressemblance avec une fleur"
479
+ ]
480
+ },
481
+ {
482
+ name: "Idolomantis diabolica",
483
+ commonName: "Mante fleur du diable",
484
+ taxonKey: "1406692",
485
+ hints: [
486
+ "Famille : Empusidae",
487
+ "Espèce africaine considérée comme la plus spectaculaire au monde",
488
+ "Appelée 'du diable' pour son apparence impressionnante et ses cornes"
489
+ ]
490
+ }
491
+ ];
492
+
493
+ // Game state
494
+ let currentSpecies = null;
495
+ let score = 0;
496
+ let hintsRevealed = 0;
497
+ let answered = false;
498
+ let map = null;
499
+ let tileLayer = null;
500
+
501
+ // Initialize map
502
+ function initMap() {
503
+ map = L.map('map').setView([20, 0], 2);
504
+
505
+ // Base map layer
506
+ L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
507
+ attribution: '© OpenStreetMap contributors',
508
+ maxZoom: 18
509
+ }).addTo(map);
510
+ }
511
+
512
+ // Load species occurrences on map
513
+ function loadSpeciesOnMap(taxonKey) {
514
+ // Remove previous tile layer if exists
515
+ if (tileLayer) {
516
+ map.removeLayer(tileLayer);
517
+ }
518
+
519
+ // Add GBIF occurrence tile layer
520
+ tileLayer = L.tileLayer(
521
+ `https://api.gbif.org/v2/map/occurrence/density/{z}/{x}/{y}@1x.png?taxonKey=${taxonKey}&bin=hex&hexPerTile=100&style=classic.point`,
522
+ {
523
+ attribution: '© GBIF',
524
+ maxZoom: 18
525
+ }
526
+ );
527
+
528
+ tileLayer.addTo(map);
529
+ }
530
+
531
+ // Shuffle array
532
+ function shuffle(array) {
533
+ const shuffled = [...array];
534
+ for (let i = shuffled.length - 1; i > 0; i--) {
535
+ const j = Math.floor(Math.random() * (i + 1));
536
+ [shuffled[i], shuffled[j]] = [shuffled[j], shuffled[i]];
537
+ }
538
+ return shuffled;
539
+ }
540
+
541
+ // Start new round
542
+ function startNewRound() {
543
+ // Pick random species
544
+ currentSpecies = speciesData[Math.floor(Math.random() * speciesData.length)];
545
+ hintsRevealed = 0;
546
+ answered = false;
547
+
548
+ // Load map
549
+ loadSpeciesOnMap(currentSpecies.taxonKey);
550
+
551
+ // Clear hints
552
+ document.getElementById('hints-display').innerHTML = '';
553
+ document.getElementById('hint-btn').disabled = false;
554
+
555
+ // Clear result
556
+ document.getElementById('result-container').innerHTML = '';
557
+
558
+ // Generate options (correct + 3 random wrong ones)
559
+ const options = [currentSpecies];
560
+ const otherSpecies = speciesData.filter(s => s !== currentSpecies);
561
+ const shuffledOthers = shuffle(otherSpecies);
562
+ options.push(...shuffledOthers.slice(0, 3));
563
+
564
+ const shuffledOptions = shuffle(options);
565
+
566
+ // Render options
567
+ const optionsContainer = document.getElementById('species-options');
568
+ optionsContainer.innerHTML = shuffledOptions.map(species => `
569
+ <button class="species-btn" data-species="${species.name}">
570
+ <strong>${species.commonName}</strong>
571
+ <br><em>${species.name}</em>
572
+ </button>
573
+ `).join('');
574
+
575
+ // Add event listeners
576
+ document.querySelectorAll('.species-btn').forEach(btn => {
577
+ btn.addEventListener('click', handleAnswer);
578
+ });
579
+
580
+ // Hide next button
581
+ document.getElementById('next-btn').style.display = 'none';
582
+ }
583
+
584
+ // Handle answer
585
+ function handleAnswer(e) {
586
+ if (answered) return;
587
+
588
+ answered = true;
589
+ const selectedSpecies = e.currentTarget.dataset.species;
590
+ const isCorrect = selectedSpecies === currentSpecies.name;
591
+
592
+ // Disable all buttons
593
+ document.querySelectorAll('.species-btn').forEach(btn => {
594
+ btn.style.pointerEvents = 'none';
595
+ if (btn.dataset.species === currentSpecies.name) {
596
+ btn.classList.add('correct');
597
+ } else if (btn.dataset.species === selectedSpecies && !isCorrect) {
598
+ btn.classList.add('incorrect');
599
+ }
600
+ });
601
+
602
+ // Update score
603
+ if (isCorrect) {
604
+ const points = Math.max(3 - hintsRevealed, 1);
605
+ score += points;
606
+ document.getElementById('score').textContent = score;
607
+
608
+ document.getElementById('result-container').innerHTML = `
609
+ <div class="result-message correct">
610
+ ✓ Correct ! +${points} point${points > 1 ? 's' : ''}
611
+ </div>
612
+ `;
613
+ } else {
614
+ document.getElementById('result-container').innerHTML = `
615
+ <div class="result-message incorrect">
616
+ ✗ Incorrect ! C'était ${currentSpecies.commonName}
617
+ </div>
618
+ `;
619
+ }
620
+
621
+ // Show next button
622
+ document.getElementById('next-btn').style.display = 'block';
623
+ document.getElementById('hint-btn').disabled = true;
624
+ }
625
+
626
+ // Handle hint request
627
+ document.getElementById('hint-btn').addEventListener('click', () => {
628
+ if (hintsRevealed >= currentSpecies.hints.length || answered) return;
629
+
630
+ const hint = currentSpecies.hints[hintsRevealed];
631
+ const hintElement = document.createElement('div');
632
+ hintElement.className = 'hint-item';
633
+ hintElement.innerHTML = `
634
+ <div class="hint-label">Indice ${hintsRevealed + 1} :</div>
635
+ ${hint}
636
+ `;
637
+
638
+ document.getElementById('hints-display').appendChild(hintElement);
639
+ hintsRevealed++;
640
+
641
+ if (hintsRevealed >= currentSpecies.hints.length) {
642
+ document.getElementById('hint-btn').disabled = true;
643
+ document.getElementById('hint-btn').textContent = 'Tous les indices révélés';
644
+ }
645
+ });
646
+
647
+ // Handle next round
648
+ document.getElementById('next-btn').addEventListener('click', startNewRound);
649
+
650
+ // Initialize game
651
+ initMap();
652
+ startNewRound();
653
+ </script>
654
+ </body>
655
+ </html>