/* ============================================================
   xau-typography.css — Refonte typo cohérente
   ============================================================
   Principe : garder Cormorant Garamond partout (pas de rupture
   de police), mais augmenter le poids de 400 → 500 sur les
   textes courants pour gagner en lisibilité tout en préservant
   l élégance.

   Italique conservé pour :
   - <em>, <blockquote>, <q> · emphasis naturel HTML
   - .preserve-italic, [data-keep-italic] · opt-in explicite
   - .keep-italic, .quote, .principe · citations

   Italique converti en regular pour tous les autres textes
   descriptifs (sub-titres, descriptions, KPIs sub-text, etc.)
   ============================================================ */

/* ============================================================
   1. Variables CSS globales · poids body par defaut
   ============================================================ */
:root {
  --serif-body-weight: 500;
  --serif-body-weight-quote: 500;
}

/* ============================================================
   2. Override · Cormorant Garamond ITALIQUE → REGULAR 500
   --------------------------------------------------------
   Cible les elements avec style inline 'Cormorant' + 'italic'
   et les classes connues qui sont en italique par defaut.
   Exclut : em, blockquote, .keep-italic, .preserve-italic, .quote
   ============================================================ */

[style*="Cormorant"][style*="font-style:italic"]:not(em):not(blockquote):not(q):not(.keep-italic):not(.preserve-italic):not(.quote):not(.principe):not(.notice-italic):not([data-keep-italic]),
[style*="Cormorant"][style*="font-style: italic"]:not(em):not(blockquote):not(q):not(.keep-italic):not(.preserve-italic):not(.quote):not(.principe):not(.notice-italic):not([data-keep-italic]) {
  font-style: normal !important;
  font-weight: 500 !important;
}

/* Classes CSS communes qui appliquent italic via stylesheet (pas inline) */
.lede, .sub, .ph, .desc, .pitch,
.kpi .s, .kpi .d,
.pm-notice, .pm-mention,
.ref-row .dt, .ref-row .pl,
.commission-card .pct-sub,
.link-card .lede,
.tier-cell div:not(.tn):not(.tb),
.evt-meta, .evt-sub,
.muted,
.discipline p,
.lvl-card .lobj,
.month .sub,
.featured-event .body .pitch {
  font-style: normal !important;
  font-weight: 500 !important;
}

/* ============================================================
   3. Cormorant Garamond NON-ITALIQUE → weight 500 minimum
   --------------------------------------------------------
   Les textes Cormorant deja en regular (non italique) doivent
   etre au moins en weight 500 pour la lisibilite.
   ============================================================ */

[style*="Cormorant"]:not([style*="font-weight:6"]):not([style*="font-weight:7"]):not([style*="font-weight: 6"]):not([style*="font-weight: 7"]) {
  font-weight: 500 !important;
}

p, span, div, li, td, th, label, h3, h4, h5, h6 {
  /* Si l element utilise --serif-body (Cormorant) via var, on garantit weight 500 */
}

/* ============================================================
   4. ITALIQUE PRESERVE · pour citations et notes
   --------------------------------------------------------
   Les <em> inline et blockquotes gardent leur italique mais
   en weight 500 (au lieu de 400 fin) pour lisibilite.
   ============================================================ */

em, blockquote, q,
.keep-italic, .preserve-italic, .quote, .principe, .notice-italic,
[data-keep-italic] {
  font-weight: 500 !important;
}

/* Citations dans les principes pedagogiques */
.discipline h4, .discipline blockquote {
  font-weight: 600 !important;
}

/* ============================================================
   5. Cas particuliers · ne pas toucher
   --------------------------------------------------------
   - Cinzel (titres prestigieux) reste comme est
   - Boutons et UI Inter reste comme est
   - Stats numeriques (.v, .kpi .v, .count, .am) restent en Cinzel
   ============================================================ */

[style*="Cinzel"], .kpi .v, .kpi .lbl,
.count, .am, .now-tag {
  /* Reset · ne pas appliquer les overrides ci-dessus */
}
