/* Système typographique commun à toutes les vues Mnoria.
   Les tailles et la géométrie restent définies par chaque écran. */

body.mnoria-typography {
  --font-ui: 'Barlow', Arial, sans-serif;
  --mnoria-reading-font: 'Barlow', Arial, sans-serif;
  --mnoria-metadata-weight: 500;
  --font-heading: 'Oswald', Arial, sans-serif;
  --font-heading-condensed: var(--font-ui);
  --font-heading-condensed-legacy: var(--font-ui);
  font-family: var(--font-ui);
  font-weight: 400;
}
/* !important limité à la famille : neutralise les anciens resets à forte
   spécificité/inline, sans toucher aux tailles ni aux fontes d’icônes. */
:is(body.mnoria-typography, #mnoria-typography-root)
:where(p, span, div, a, button, input, select, textarea, option, label, small, strong, em, b, time, li, summary, h1, h2, h3, h4, h5, h6):where(:not(.fa):not(.fas):not(.far):not(.fab):not([class^='fa-']):not([class*=' fa-'])) {
  font-family: var(--font-ui) !important;
}
/* Identité éditoriale : les descendants héritent explicitement du titre. */
:is(body.mnoria-typography, #mnoria-typography-root)
:is(h1, h2, h3, .theme-row-title, .theme-row-title-text, .index-card-title-banner-text, .tribunes-title),
:is(body.mnoria-typography, #mnoria-typography-root)
:is(h1, h2, h3) :where(span, a, strong, em):where(:not(.fa):not(.fas):not(.far):not(.fab):not([class^='fa-']):not([class*=' fa-'])) {
  font-family: var(--font-heading) !important;
}
body.mnoria-typography h1 { font-weight: 600; }
body.mnoria-typography
:is(.theme-row-title, .theme-row-title-text, .tribunes-theme-heading h2, .explorer-rubric-heading h2) {
  font-weight: 600 !important;
  text-transform: uppercase;
  letter-spacing: 0;
  line-height: .98;
  -webkit-text-stroke: 0;
}
body.page-home #debates-list .debate-card h2,
body.page-home-mobile #debates-list .debate-card h2,
body.page-home #debates-list .index-card-title-banner-text,
body.page-home-mobile #debates-list .index-card-title-banner-text,
body.explorer-page #explorer-activities .tribunes-title {
  font-size: 22px !important;
  font-weight: 500;
  line-height: 1.1 !important;
  letter-spacing: 0;
}
:is(body.mnoria-typography, #mnoria-typography-root)
:is(button, [role='button'], input, select, textarea, .tribunes-source-btn, .tribunes-arena-btn, .explorer-event-link),
:is(body.mnoria-typography, #mnoria-typography-root)
:is(button, [role='button']) :where(span, strong, small, em):where(:not(.fa):not(.fas):not(.far):not(.fab):not([class^='fa-']):not([class*=' fa-'])) {
  font-family: var(--font-ui) !important;
  font-weight: 600;
}
body.mnoria-typography
:is(input, textarea, option, .tribunes-summary, .explorer-description, .explorer-heading p, .tribunes-page-header p) { font-weight: 400; }
body.mnoria-typography
:is(.debate-card-context-text, .debate-card-context-text :where(p, span, div)) { font-weight: 400 !important; }
body.mnoria-typography
:is(.debate-card-new-badge, .debate-card-date-badge, .debate-card-ai-badge, .ai-card-badge-inner, .debate-card-stats-badge, .debate-card-youtube-label, .debate-source-card-image-domain-badge, .tribunes-badge, .explorer-badges span) { font-weight: 600; }
body.mnoria-typography
:is(.debate-date, .debate-last-argument, .tribunes-date, .tribunes-image-date, .tribunes-video-duration, .explorer-date, .explorer-location, .tribunes-meta strong) { font-weight: 500; }
body.mnoria-typography
.home-bottom-nav .home-bottom-nav-item,
body.mnoria-typography
.home-bottom-nav .home-bottom-nav-item span {
  font-family: var(--font-ui) !important;
  font-weight: 600;
}
body.mnoria-typography
.home-bottom-nav .home-bottom-nav-item span { font-size: 10px; line-height: 1; letter-spacing: 0; }

/* Les règles historiques des métadonnées d’Accueil sont plus spécifiques. */
body:is(.page-home, .page-home-mobile) .debate-card :is(.debate-card-stats-badge, .debate-card-date-badge, .debate-card-new-badge) { font-weight: 600; }
body:is(.page-home, .page-home-mobile) .debate-card :is(.debate-date, .debate-last-argument) { font-weight: 500; }
body:is(.page-home, .page-home-mobile) .debate-card .debate-card-trend-badge { font-weight: 700; }
body:is(.page-home, .page-home-mobile) :is(#debates-list, #tribunes-list) .debate-card-context-text,
body:is(.page-home, .page-home-mobile) :is(#debates-list, #tribunes-list) .debate-card-context-text :where(p, span, div) {
  font-family: var(--font-ui) !important;
}

body:is(.page-home, .page-home-mobile) .debate-card-stats-badge { --mnoria-metadata-weight: 600; }

/* Titres éditoriaux hors des trois flux : conserver leurs dimensions locales. */
body.mnoria-typography :is(h1, h2, h3) { font-weight: 600; }
:is(body.mnoria-typography, #mnoria-typography-root) :is(.mon-fil-card-title, .mon-fil-debate-title, .contribution-title) {
  font-family: var(--font-heading) !important;
  font-weight: 500;
}
/* La lecture et les contrôles restent distincts des titres, même imbriqués. */
body.mnoria-typography :is(button, [role='button'], input, select, textarea) { font-weight: 600; }
body.mnoria-typography :is(input, textarea) { font-weight: 400; }
/* Code technique : exception fonctionnelle, pas une famille éditoriale. */
:is(body.mnoria-typography, #mnoria-typography-root) :is(code, pre, kbd, samp),
:is(body.mnoria-typography, #mnoria-typography-root) :is(code, pre, kbd, samp) * { font-family: monospace !important; }

:is(body.mnoria-typography, #mnoria-typography-root) :is(.profil-section-title, .ecl-block-toggle-title) { font-family: var(--font-heading) !important; font-weight: 600; }

:is(body.mnoria-typography, #mnoria-typography-root) .mnoria-tech-title { font-family: var(--font-heading) !important; font-weight: 600; }

/* Mon fil : le lien et son cadre reprennent la typographie du titre événement.
   Les boutons de suivi/partage conservent leurs règles de contrôle. */
:is(body.mnoria-typography.mon-fil-page, #mnoria-typography-root) :is(.mon-fil-card-title, .mon-fil-arena-name-chip, .mon-fil-arena-name-link, .mon-fil-card-learning-tile-label) {
  font-family: var(--font-heading) !important;
  font-weight: 500;
}

body.mnoria-typography.mon-fil-page :is(.mon-fil-card-arena-context, .mon-fil-event-description) {
  font-family: var(--font-ui) !important;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

/* Accueil : même titre éditorial dans le flux et pendant le défilement. */
body.mnoria-typography:is(.page-home, .page-home-mobile)
:is(.index-recommended-arenas-title, .index-active-arenas-title, .index-news-arenas-title, #home-feed-sticky-title .home-feed-sticky-label),
body.mnoria-typography:is(.page-home, .page-home-mobile)
:is(.index-recommended-arenas-title, .index-active-arenas-title, .index-news-arenas-title, #home-feed-sticky-title .home-feed-sticky-label) > span {
  font-family: var(--font-heading) !important;
  font-weight: 600;
}
