/*
 * VIA 90.5 - Typographie 2026 (theme enfant)
 * Decidee le 2026-10-03 par la direction de VIA 90.5 (recommandation Claude Design, appliquee par AVI).
 * Seul niveau de decision typographique du site : ce fichier. Il recouvre Kirki et les anciennes regles.
 * Seuil mobile : 768 px. Tailles en rem. Plancher : 0.875rem (14 px).
 * Retour arriere : retirer le bloc "Typographie 2026" de functions.php (ce fichier n'est alors plus charge).
 */

:root {
  --via-police-marque:  'Recoleta Alt Bold', Georgia, serif;
  --via-police-titres:  'Roboto Condensed', 'Arial Narrow', Arial, sans-serif;
  --via-police-ui:      'Roboto', Arial, sans-serif;
  --via-police-lecture: 'Merriweather', Georgia, 'Times New Roman', serif;
  --via-texte: #2B3326;
  --via-lien:  #456735;
}

/* 1. Interface : police de base du site (recouvre Kirki : body, html, strong) */
html body { font-family: var(--via-police-ui) !important; }
html body strong, html body b { font-family: inherit !important; font-weight: 700; }

/* 2. Titres, boutons, legendes (recouvre Kirki : h1-h6, .qt-btn, .qt-capfont, caption, .qt-title) */
html body h1, html body h2, html body h3, html body h4, html body h5, html body h6,
html body .qt-title, html body .qt-capfont, html body caption {
  font-family: var(--via-police-titres) !important; font-weight: 700 !important;
  text-transform: none; letter-spacing: normal;
}

/* 3. Menus, boutons, surtitres : Roboto Condensed 700, majuscules */
html body .qt-menubar-top, html body .qt-menubar, html body .qt-side-nav, html body .qt-menu-footer,
html body .qt-menubar-top a, html body .qt-menubar a, html body .qt-side-nav a, html body .qt-menu-footer a,
html body .qt-btn, html body .qt-tags a {
  font-family: var(--via-police-titres) !important; font-weight: 700 !important;
  text-transform: uppercase; letter-spacing: 0.05em; line-height: 1.2;
}
html body .qt-menubar a, html body .qt-side-nav a, html body .qt-menu-footer a, html body .qt-btn { font-size: 1.0625rem; }

/* 4. Bandeau de page : Recoleta Bold */
html body:not(.page-template-front-page) .qt-pageheader h1.qt-caption,
html body:not(.page-template-front-page) .qt-pageheader .via-titre-section {
  font-family: var(--via-police-marque) !important; font-weight: 700 !important;
  font-size: 3rem !important; line-height: 1.1 !important; text-transform: uppercase; letter-spacing: 0.02em;
}

/* 5. Titres de section : Recoleta Bold, casse du texte source */
html body .qt-caption-med, html body .qt-caption-small,
html body .via-dossier-special > h3,
html body.page-template-category-php #maincontent .qt-container h2,
html body.page-template-category-php #maincontent .qt-container h3:not(.qt-title),
html body.post-type-archive-podcast #maincontent .qt-container h3:not(.qt-title) {
  font-family: var(--via-police-marque) !important; font-weight: 700 !important;
  font-size: 2.5rem; line-height: 1.15; text-transform: none; letter-spacing: normal;
}

/* 6. Titre d'article sur sa page (h2 actuel, h1 apres le temps 2) */
html body.single .qt-the-content > h2:first-child,
html body .via-titre-article {
  font-size: 2.25rem !important; line-height: 1.15 !important; text-transform: none !important; letter-spacing: normal !important;
  margin: 0 0 0.5em;
}

/* 7. Titres d'articles dans les listes et cartes */
html body .qt-part-archive-item .qt-title, html body .qt-part-archive-item h4, html body .qt-part-archive-item h5 {
  font-size: 1.5rem; line-height: 1.2; text-transform: none; letter-spacing: normal;
}

/* 8. Texte des nouvelles : Merriweather (pages d'articles seulement) */
html body.single-post .qt-the-content {
  font-family: var(--via-police-lecture) !important; color: var(--via-texte);
  font-size: 1.125rem; line-height: 1.7; max-width: 42rem; text-align: left;
}
html body.single-post .qt-the-content p, html body.single-post .qt-the-content li,
html body.single-post .qt-the-content blockquote, html body.single-post .qt-the-content td {
  font-family: var(--via-police-lecture) !important; font-size: inherit; line-height: 1.7; text-align: left;
}
html body.single-post .qt-the-content p { margin: 0 0 1em; }
html body.single-post .qt-the-content > p:first-of-type { font-size: 1.3125rem; line-height: 1.6; }
html body.single-post .qt-the-content em, html body.single-post .qt-the-content i { font-style: italic; }
html body.single-post .qt-the-content strong, html body.single-post .qt-the-content b { font-weight: 700; }
html body.single-post .qt-the-content u,
html body.single-post .qt-the-content [style*="text-decoration: underline"] {
  text-decoration: underline; text-decoration-color: currentColor; text-decoration-thickness: 1px; text-underline-offset: 0.15em;
}
html body.single-post .qt-the-content a { color: var(--via-lien); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em; }
html body.single-post .qt-the-content a:hover, html body.single-post .qt-the-content a:focus { color: #2C4322; text-decoration-thickness: 3px; }
html body.single-post .qt-the-content a:focus-visible { outline: 2px solid var(--via-lien); outline-offset: 2px; }
/* Intertitres dans l'article */
html body.single-post .qt-the-content > h2:not(:first-child) { font-size: 1.5rem; line-height: 1.25; }
html body.single-post .qt-the-content h3 { font-size: 1.25rem; line-height: 1.25; }
/* Polices et tailles collees dans le contenu (2 127 et 2 306 nouvelles au 2026-10-03) : neutralisees sans toucher a la base */
html body.single-post .qt-the-content [style*="font-family"], html body.single-post .qt-the-content font[face] { font-family: inherit !important; }
html body.single-post .qt-the-content [style*="font-size"], html body.single-post .qt-the-content font[size] { font-size: inherit !important; }

/* 9. Petit texte : dates, mises a jour, legendes */
html body .qt-item-metas, html body .qt-date, html body .kt-update-date, html body .wp-caption-text, html body figcaption {
  font-family: var(--via-police-ui) !important; font-size: 0.9375rem; line-height: 1.5;
}
html body.single-post .qt-the-content .qt-item-metas, html body.single-post .qt-the-content .qt-date { font-family: var(--via-police-ui) !important; }

/* 10. Interface : extraits dans les listes */
html body .qt-part-archive-item .qt-the-content { font-family: var(--via-police-ui) !important; font-size: 1.0625rem; line-height: 1.5; max-width: none; }

/* 11. Lecteur audio (MediaElement), visionneur d'images, bandeau des temoins : plus de Helvetica, 14 px minimum */
html body .mejs-container, html body .mejs-container *, html body #swipebox-overlay, html body #swipebox-overlay *,
html body .cky-consent-container, html body .cky-consent-container * {
  font-family: var(--via-police-ui) !important;
}
html body .mejs-container .mejs-time, html body .mejs-container .mejs-currenttime, html body .mejs-container .mejs-duration { font-size: 0.875rem !important; }

/* 12. Mobile (768 px et moins) */
@media only screen and (max-width: 768px) {
  html body:not(.page-template-front-page) .qt-pageheader h1.qt-caption,
  html body:not(.page-template-front-page) .qt-pageheader .via-titre-section { font-size: clamp(1.25rem, 6vw, 1.75rem) !important; }
  html body .qt-caption-med, html body .qt-caption-small,
  html body .via-dossier-special > h3,
  html body.page-template-category-php #maincontent .qt-container h2,
  html body.page-template-category-php #maincontent .qt-container h3:not(.qt-title),
  html body.post-type-archive-podcast #maincontent .qt-container h3:not(.qt-title) { font-size: 1.875rem; }
  html body.single .qt-the-content > h2:first-child, html body .via-titre-article { font-size: 1.75rem !important; }
  html body .qt-part-archive-item .qt-title, html body .qt-part-archive-item h4, html body .qt-part-archive-item h5 { font-size: 1.375rem; }
  html body.single-post .qt-the-content { font-size: 1.0625rem; }
  html body.single-post .qt-the-content > p:first-of-type { font-size: 1.1875rem; }
  html body.single-post .qt-the-content > h2:not(:first-child) { font-size: 1.375rem; }
  html body.single-post .qt-the-content h3 { font-size: 1.125rem; }
  html body .qt-menubar a, html body .qt-side-nav a, html body .qt-menu-footer a, html body .qt-btn { font-size: 1rem; }
  html body .qt-item-metas, html body .qt-date, html body .kt-update-date, html body .wp-caption-text, html body figcaption { font-size: 0.875rem; }
  html body .qt-part-archive-item .qt-the-content { font-size: 1rem; }
}

/* 13. Barre de menus a l'ordinateur (2026-10-03) : les 7 menus doivent tenir sur une ligne des 1201 px.
   Ecart assume a la recommandation (1.0625rem) : 0.875rem de 1201 a 1440 px, 1rem au-dela. */
@media only screen and (min-width: 1201px) {
  html body .qt-menubar ul.qt-desktopmenu li, html body .qt-menubar ul.qt-desktopmenu a { white-space: nowrap; }
  html body .qt-menubar ul.qt-desktopmenu img { max-width: none; flex-shrink: 0; }
  html body .qt-menubar ul.qt-desktopmenu li a { font-size: 0.875rem; letter-spacing: 0.02em; }
}
@media only screen and (min-width: 1441px) {
  html body .qt-menubar ul.qt-desktopmenu li a { font-size: 1rem; letter-spacing: 0.04em; }
}

/* 14. Bandeau : titres longs (2026-10-03). Titre a environ la moitie de la hauteur du bandeau (105 px : 3rem ; 64 px : 2rem ; 57 px : 1.75rem au plus)
   Ecart assume a la recommandation (2.25rem mobile), le bandeau etant plus bas que prevu. Minimum 1.25rem : Recoleta Bold 700 reste un grand texte (seuil 18,7 px en gras). */
@media only screen and (min-width: 769px) and (max-width: 1200px) {
  html body:not(.page-template-front-page) .qt-pageheader h1.qt-caption,
  html body:not(.page-template-front-page) .qt-pageheader .via-titre-section { font-size: 2rem !important; }
}
