/* =====================================================================
   01 — TYPOGRAPHIE COMMUNE
   Les valeurs sont dans reglages.css.
   Cette feuille est chargée EN DERNIER sur toutes les pages.
   Les !important neutralisent les anciennes tailles propres aux rubriques.
   ===================================================================== */
body {
  font-family: var(--police-texte);
  font-size: var(--taille-texte);
  line-height: var(--interligne-texte);
}

/* TITRES : une seule règle par niveau, sur toutes les pages. */
body #content :is(h1, h2, h3, h4, h5, h6) {
  font-family: var(--police-titres) !important;
  line-height: var(--interligne-titres) !important;
  color: var(--couleur-titres) !important;
  letter-spacing: normal !important;
  margin-bottom: var(--espace-apres-titre) !important;
  overflow-wrap: anywhere;
}
body #content h1 {
  font-size: var(--taille-h1) !important;
  font-weight: var(--graisse-h1) !important;
  text-transform: var(--casse-h1) !important;
}
body #content h2 {
  font-size: var(--taille-h2) !important;
  font-weight: var(--graisse-h2) !important;
  text-transform: var(--casse-h2) !important;
}
body #content h3 {
  font-size: var(--taille-h3) !important;
  font-weight: var(--graisse-h3) !important;
  text-transform: var(--casse-h3) !important;
}
body #content h4 {
  font-size: var(--taille-h4) !important;
  font-weight: var(--graisse-h4) !important;
  text-transform: var(--casse-h4) !important;
}
body #content h5 {
  font-size: var(--taille-h5) !important;
  font-weight: var(--graisse-h5) !important;
  text-transform: var(--casse-h5) !important;
}
body #content h6 {
  font-size: var(--taille-h6) !important;
  font-weight: var(--graisse-h6) !important;
  text-transform: var(--casse-h6) !important;
}
body #content :is(h1, h2, h3, h4, h5, h6) :is(a, span, strong, em) {
  font: inherit !important;
  color: inherit !important;
  text-transform: inherit !important;
  letter-spacing: inherit !important;
}

/* TEXTES : introduction, articles, cartes et tableaux. */
body #content :is(p, li, dt, dd, td, th, .body-text, .presentation-summary, .fiche-subtitle) {
  font-family: var(--police-texte) !important;
  font-size: var(--taille-texte) !important;
  line-height: var(--interligne-texte) !important;
}
body #content :is(p, .body-text, .presentation-summary, .fiche-subtitle) {
  color: var(--couleur-texte) !important;
  margin-bottom: var(--espace-paragraphes) !important;
}
body #content :is(p, li, dt, dd, td, th) :is(a, span, strong, em) {
  font-size: inherit !important;
  font-family: inherit !important;
  line-height: inherit !important;
}
body #content .presentation-copy .presentation-kicker,
body #content :is(figcaption, small, .table-label) {
  font-family: var(--police-texte) !important;
  font-size: var(--taille-legendes) !important;
  line-height: 1.5 !important;
}

/* BOUTONS ET FORMULAIRES : taille identique, sans toucher aux icônes. */
body :is(button, input, select, textarea),
body #content :is(.presentation-button, .button, .btn, .read-more) {
  font-family: var(--police-texte) !important;
  font-size: var(--taille-boutons) !important;
  line-height: 1.4 !important;
}
body #content .presentation-actions .presentation-button {
  background: var(--couleur-boutons) !important;
  border-color: var(--couleur-boutons) !important;
  color: #fff !important;
}
body #content .presentation-actions .presentation-button-secondary {
  background: #fff !important;
  color: var(--couleur-boutons) !important;
}
body #content .presentation-actions .presentation-button:hover {
  background: var(--couleur-boutons-survol) !important;
  color: #fff !important;
}
body #site-navigation .site-menu { flex-wrap: wrap; }
body #site-navigation .site-menu > li > :is(a, button) {
  font-family: var(--police-texte) !important;
  font-size: var(--taille-menu) !important;
  line-height: 1.4 !important;
}

/* FOOTER : même famille et même taille de lecture. */
body footer :is(p, li, a) {
  font-family: var(--police-texte) !important;
  font-size: var(--taille-texte) !important;
  line-height: var(--interligne-texte) !important;
}

/* TITRE ÉDITORIAL DE L’ACCUEIL : même taille qu’un H2. */
body .home .presentation-detail::before,
body.home .presentation-detail::before {
  font-family: var(--police-titres) !important;
  font-size: var(--taille-h2) !important;
  font-weight: var(--graisse-h2) !important;
  line-height: var(--interligne-titres) !important;
  color: var(--couleur-titres) !important;
  text-transform: var(--casse-h2) !important;
}

/* LARGEUR DES TEXTES : occuper toute la largeur du bloc disponible. */
body #content :is(p, .body-text, .presentation-summary, .fiche-subtitle, .discovery-intro) {
  max-width: none !important;
}
