/* Langues dérivées de l'anglais (scripts/build-i18n.js) : ajustements d'écriture.
   Chargée seulement par les pages de ces langues, après les feuilles du site.
   L'URL porte son hash : relancer build-i18n.js après toute retouche. */

/* Écritures non latines : Space Grotesk et Inter ne les couvrent pas. La police
   de l'écriture passe en secours ; le latin et les chiffres gardent celles du site. */
html:lang(ja) { --i18n-font: 'Noto Sans JP', 'Hiragino Sans', 'Yu Gothic', 'Meiryo'; }
html:lang(zh-Hans) { --i18n-font: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei'; }
html:lang(zh-Hant) { --i18n-font: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei'; }
html:lang(ko) { --i18n-font: 'Noto Sans KR', 'Apple SD Gothic Neo', 'Malgun Gothic'; }
html:lang(hi) { --i18n-font: 'Noto Sans Devanagari', 'Kohinoor Devanagari', 'Nirmala UI'; }
html:lang(ja), html:lang(zh-Hans), html:lang(zh-Hant), html:lang(ko), html:lang(hi) {
  --font-display: 'Space Grotesk', var(--i18n-font), sans-serif;
  --font-body: 'Inter', var(--i18n-font), sans-serif;
}

/* Japonais et chinois : pas d'espaces entre les mots. Le resserrement des
   titres, réglé pour le latin, colle les caractères ; la coupe des lignes suit
   les groupes de sens quand le navigateur sait le faire. */
:lang(ja) :is(h1, h2, h3, h4, .lx-title, .lx-h2), :lang(zh-Hans) :is(h1, h2, h3, h4, .lx-title, .lx-h2), :lang(zh-Hant) :is(h1, h2, h3, h4, .lx-title, .lx-h2) {
  letter-spacing: 0; line-height: 1.3;
}
:lang(ja) body, :lang(zh-Hans) body, :lang(zh-Hant) body { line-break: strict; }
:lang(ja) :is(h1, h2, h3, p, li) { word-break: auto-phrase; }
:lang(ja) *, :lang(zh-Hans) *, :lang(zh-Hant) * { font-style: normal; text-transform: none; }

/* Allemand : mots composés longs. Les titres peuvent couper un mot plutôt que
   déborder d'un écran de téléphone. */
:lang(de) :is(h1, h2, h3, h4, .lx-title, .lx-h2) { hyphens: auto; overflow-wrap: break-word; }
