document.addEventListener("DOMContentLoaded", () => { // Gestion des clics sur les vidéos initiales de la page catégorie // Note: Le bouton "Voir Plus" est géré par main.js via data-category-id const videoCards = document.querySelectorAll(".video-card"); for (const videoCard of videoCards) { if (!videoCard.hasAttribute("data-click-initialized")) { videoCard.setAttribute("data-click-initialized", "true"); videoCard.addEventListener("click", function () { const videoId = this.dataset.videoId; if (videoId) { window.location.href = `video.php?id=${videoId}`; } }); } } });