/*
Theme Name: CaraC
Description: Thème enfant de Divi
Author: Fabien Buchillot Caractere B
Author URI: https://www.caractere-b.fr
Template: Divi
Version: 1.0
*/

/* ===============================
   SWITCH TYPO — Lato / Garamond / Ballet
   Piloté par: html[data-font="lato|garamond|ballet"]
================================ */

/* Valeur par défaut (Lato 14) */
html {
  --font-main: "Lato", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --base-size: 14px;
  --lh: 1.65;
  --ls: 0;
}

/* Garamond (16) */
html[data-font="garamond"]{
  --font-main: "EB Garamond", Georgia, "Times New Roman", serif;
  --base-size: 16px;
  --lh: 1.78;
  --ls: 0;
}

/* Ballet (22) */
html[data-font="ballet"]{
  --font-main: "Ballet", "EB Garamond", serif;
  --base-size: 22px;
  --lh: 1.25;
  --ls: 0;
}

/* Forcer Divi à suivre */
body,
p, li, blockquote,
.et_pb_text, .et_pb_text p, .et_pb_text li,
.et_pb_blurb_description, .et_pb_toggle_content,
.et_pb_module p, .et_pb_module li {
  font-family: var(--font-main) !important;
  font-size: var(--base-size) !important;
  line-height: var(--lh) !important;
  letter-spacing: var(--ls) !important;
}

/* Optionnel: un petit style d'état pour tes boutons */
.js-font-btn.is-active{
  opacity: 1;
}



/* Taille de base (par défaut) */
html{
  --base-size: 16px;   /* valeur de départ */
  --lh: 1.65;
}

/* Appliquer la taille aux textes (forcé pour Divi) */
body,
p, li, blockquote,
.et_pb_text, .et_pb_text p, .et_pb_text li,
.et_pb_blurb_description, .et_pb_toggle_content,
.et_pb_module p, .et_pb_module li{
  font-size: var(--base-size) !important;
  line-height: var(--lh) !important;
}

/* UI optionnelle */
.font-size-switch .et_pb_button,
.font-size-switch button,
.font-size-switch a{
  line-height: 1;
}
