Renomme la marque en Gauthier Chombart & Nathan Chauwin et finalise le jeu Memory

Header, footer, titres et balises meta de toutes les pages actives : remplace NextGN Formation par Gauthier Chombart & Nathan Chauwin. Nouveau pied de page uniforme mentionnant les droits reserves et le statut de formateurs independants (dossier archives/ laisse inchange).

Integre aussi la refonte du jeu Memory (CSS/JS/HUD/leaderboard) et ajoute le rapport de veille Certibiocide semaine 28.
This commit is contained in:
2026-07-14 23:02:09 +02:00
parent 9140d2f468
commit 44be41b2b2
22 changed files with 747 additions and 327 deletions

View File

@@ -14,7 +14,6 @@ class MemoryGameEngine {
moves: 0,
score: 0,
isProcessing: false,
isPaused: false,
gameStarted: false
};
this.startTime = null;
@@ -128,8 +127,7 @@ class MemoryGameEngine {
if (this.gameState.flipped.length === 2) return;
if (this.cards[cardIndex].isMatched) return;
if (this.gameState.flipped.includes(cardIndex)) return;
if (this.gameState.isPaused) return;
// Retourner la carte
this.flipCard(cardIndex);
this.gameState.flipped.push(cardIndex);
@@ -260,9 +258,7 @@ class MemoryGameEngine {
this.startTime = Date.now();
this.timerInterval = setInterval(() => {
if (!this.gameState.isPaused) {
this.updateTimer();
}
this.updateTimer();
}, 100);
this.analytics.trackGameStart(this.difficulty);
@@ -429,7 +425,6 @@ class MemoryGameEngine {
moves: 0,
score: 0,
isProcessing: false,
isPaused: false,
gameStarted: false
};
@@ -444,34 +439,13 @@ class MemoryGameEngine {
document.getElementById('timer-display').style.animation = '';
}
/**
* Pause/Reprise
*/
togglePause() {
if (!this.gameState.gameStarted) return;
this.gameState.isPaused = !this.gameState.isPaused;
const pauseBtn = document.getElementById('pause-btn');
if (this.gameState.isPaused) {
pauseBtn.textContent = '▶ Reprendre';
pauseBtn.classList.add('paused');
} else {
pauseBtn.textContent = '⏸ Pause';
pauseBtn.classList.remove('paused');
}
}
/**
* Setup event listeners
*/
setupEventListeners() {
// Bouton restart
document.getElementById('restart-btn').addEventListener('click', () => this.restart());
// Bouton pause
document.getElementById('pause-btn').addEventListener('click', () => this.togglePause());
// Sélecteur de difficulté
document.querySelectorAll('.btn-difficulty').forEach(btn => {
btn.addEventListener('click', () => {
@@ -512,14 +486,51 @@ class MemoryGameEngine {
// ============================================
let game;
/**
* Demander le nom du joueur à la première partie
*/
function setupPlayerNameModal(onReady) {
const nameConfirmed = localStorage.getItem('nextgn_name_confirmed') === 'true';
if (nameConfirmed) {
onReady();
return;
}
const modal = document.getElementById('player-name-modal');
const input = document.getElementById('player-name-input');
const confirmBtn = document.getElementById('player-name-confirm');
modal.classList.remove('hidden');
input.focus();
const confirmName = () => {
const name = input.value.trim();
localStorage.setItem('nextgn_playerName', name || getPlayerName());
localStorage.setItem('nextgn_name_confirmed', 'true');
modal.classList.add('hidden');
onReady();
};
confirmBtn.addEventListener('click', confirmName, { once: true });
input.addEventListener('keydown', (e) => {
if (e.key === 'Enter') confirmName();
}, { once: true });
}
document.addEventListener('DOMContentLoaded', () => {
// Initialiser le jeu
game = new MemoryGameEngine('normal');
// Afficher le leaderboard initial
LeaderboardManager.updateDisplay('all');
LeaderboardManager.updatePlayerStats();
setupPlayerNameModal(() => {
LeaderboardManager.updateDisplay('all');
LeaderboardManager.updatePlayerStats();
});
// Initialiser le jeu
game = new MemoryGameEngine('normal');
// Scroll progress
window.addEventListener('scroll', () => {
game.updateHUD();