diff --git a/css/styles.css b/css/styles.css index 334e0ab..bfe7a5e 100644 --- a/css/styles.css +++ b/css/styles.css @@ -801,6 +801,7 @@ body.reverse-mode #countries-grid { display:grid; } color:var(--text); font-family:'Syne',sans-serif; font-size:0.88em; font-weight:600; cursor:pointer; transition:all 0.15s; text-align:left; + overflow: hidden; } .country-btn:hover:not(:disabled) { border-color:#f5c842; @@ -819,7 +820,6 @@ body.reverse-mode #countries-grid { display:grid; } .country-btn .cb-info { display:flex; flex-direction:column; min-width:0; } .country-btn .cb-name { font-size:0.82em; line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } .country-btn .cb-cat-badge { font-size:0.62em; color:var(--muted); font-family:'DM Mono',monospace; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; } - /* Btn reverse */ .btn-reverse { display:block; width:100%; padding:14px 20px; border-radius:10px; @@ -1102,7 +1102,6 @@ body.reverse-mode #countries-grid { display:grid; } MOBILE RESPONSIVE (max-width: 540px) ═══════════════════════════════════════════════════════ */ @media (max-width: 540px) { - /* ── Layout global ────────────────────────────────── */ body { padding: calc(env(safe-area-inset-top, 8px) + 8px) 8px calc(env(safe-area-inset-bottom, 8px) + 8px) 8px; diff --git a/js/game.js b/js/game.js index f37b38c..8216b6a 100644 --- a/js/game.js +++ b/js/game.js @@ -203,6 +203,10 @@ function rerenderCurrentTurn() { document.getElementById('reverse-cat-tooltip').textContent = catDesc(cat); document.getElementById('turn-label').textContent = t('reverseTurn') + ' ' + (currentStep + 1) + ' ' + t('of') + ' ' + gameCategories.length; + + //FIX : re-render la grille pays (noms + badges de catégories assignées) + renderCountryButtons(); + applyEmoji(document.getElementById('countries-grid')); } } else { if (currentStep < gameCountries.length) { @@ -599,7 +603,8 @@ function showTurnReverse() { var newSortBtn = sortBtn.cloneNode(true); sortBtn.parentNode.replaceChild(newSortBtn, sortBtn); // reverse mode should use click-only tooltips to avoid hover activation - if (gameMode === 'reverse') { + var isReverseMode = (gameMode === 'reverse' || (gameMode === 'custom' && customSubMode === 'reverse')); + if (isReverseMode) { _attachTooltipClickOnly(newSortBtn, 'sort-' + cat.id, showSortTooltip); } else { _attachTooltipTrigger(newSortBtn, 'sort-' + cat.id, showSortTooltip); diff --git a/js/translations.js b/js/translations.js index ba798d2..beb6287 100644 --- a/js/translations.js +++ b/js/translations.js @@ -719,6 +719,7 @@ function t(key) { function setLang(lang) { currentLang = lang; + //console.log('setLang', lang, 'gameCategories.length=', gameCategories.length); document.querySelectorAll('.lang-btn').forEach(function(b) { b.classList.toggle('active', b.textContent.trim() === lang.toUpperCase()); });