From 8471e477dbe83a7af3e4de796e2e68f37d09de6a Mon Sep 17 00:00:00 2001 From: Etienne Delvarre Date: Thu, 28 May 2026 18:00:40 +0200 Subject: [PATCH] =?UTF-8?q?Recentrer=20les=20titres=20d'actes=20quand=20pe?= =?UTF-8?q?u=20de=20cartes=20visibles=20apr=C3=A8s=20filtrage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Recalcule la largeur de chaque section d'acte dans applyFilters() en comptant uniquement les cartes visibles (non filtrées). Co-Authored-By: Claude Opus 4.6 --- public/index.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/public/index.html b/public/index.html index 8de7d98..96a221f 100644 --- a/public/index.html +++ b/public/index.html @@ -374,6 +374,13 @@ function applyFilters() { card.classList.toggle('filtered-out', !visible); }); + + // Resize acte sections based on visible cards + document.querySelectorAll('.acte-section').forEach(section => { + const visibleCards = section.querySelectorAll('.card:not(.filtered-out)').length; + const minW = Math.max(280, visibleCards * 274 + 20); + section.style.width = minW + 'px'; + }); } function clearFilters() {