/* =========================================================
   Editor Styles — IVG Europe (Gutenberg + Classic)
   Objectif : aperçu fidèle dans l’éditeur uniquement
   ========================================================= */

/* 1) Base typographique (éditeur) */
body,
.mce-content-body,
.editor-styles-wrapper {
  font-family: var(--wp--preset--font-family--text);
  font-size: var(--wp--preset--font-size--base);
  line-height: 1.6;
  color: var(--wp--preset--color--text);
  background-color: var(--wp--preset--color--background);
}

/* 2) Titres (éditeur) */
.mce-content-body h1, .editor-styles-wrapper h1,
.mce-content-body h2, .editor-styles-wrapper h2,
.mce-content-body h3, .editor-styles-wrapper h3,
.mce-content-body h4, .editor-styles-wrapper h4,
.mce-content-body h5, .editor-styles-wrapper h5,
.mce-content-body h6, .editor-styles-wrapper h6 {
  font-family: var(--wp--preset--font-family--headings);
  font-weight: 700;
  line-height: 1.2;
  color: var(--wp--preset--color--primary);
  margin: 0;
}

.mce-content-body h1, .editor-styles-wrapper h1 {
	text-transform: uppercase;
}

/* 3) Liens (éditeur) */
.mce-content-body a,
.editor-styles-wrapper a {
  color: var(--wp--preset--color--primary);
  text-decoration: none;
}
.mce-content-body a:hover,
.editor-styles-wrapper a:hover {
  text-decoration: none;
}

/* 4) Paragraphes & listes (éditeur) */
.mce-content-body p,
.editor-styles-wrapper p { margin: 0 0 1em; }

.mce-content-body ul, .mce-content-body ol,
.editor-styles-wrapper ul, .editor-styles-wrapper ol {
  margin: 0 0 1em 1.25em;
}

/* 5) Images (éditeur) */
.mce-content-body img,
.editor-styles-wrapper img {
  max-width: 100%;
  height: auto;
}

/* 6) Utilitaire : texte "accentué" (Poppins 400, MAJ) */
.is-accented {
  font-family: var(--wp--preset--font-family--headings);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* 7) Helpers de couleurs (éditeur) */
.has-primary-color           { color: var(--wp--preset--color--primary); }
.has-secondary-color         { color: var(--wp--preset--color--secondary); }
.has-accent-color            { color: var(--wp--preset--color--accent); }
.has-text-color              { color: var(--wp--preset--color--text); }

.has-background-background-color          { background-color: var(--wp--preset--color--background); }
.has-beige-rose-background-color          { background-color: var(--wp--preset--color--beige-rose); }
.has-access-restrict-background-color     { background-color: var(--wp--preset--color--access-restrict); }
.has-access-conditional-background-color  { background-color: var(--wp--preset--color--access-conditional); }
.has-access-granted-background-color      { background-color: var(--wp--preset--color--access-granted); }
.has-access-strong-restrict-background-color { background-color: var(--wp--preset--color--access-strong-restrict); }

/* 8) Variables tailles fluides — pour l'aperçu éditeur */
:root {
  --h1-min: 2.25rem;  /* ~36px */
  --h1-max: 3.50rem;  /* ~56px */
  --h2-min: 1.875rem; /* ~30px */
  --h2-max: 2.75rem;  /* ~44px */
  --h3-min: 1.50rem;  /* ~24px */
  --h3-max: 2.00rem;  /* ~32px */
  --h4-min: 1.25rem;  /* ~20px */
  --h4-max: 1.50rem;  /* ~24px */
  --h5-min: 1.125rem; /* ~18px */
  --h5-max: 1.25rem;  /* ~20px */
  --h6-min: 1.00rem;  /* ~16px */
  --h6-max: 1.125rem; /* ~18px */
}

/* 9) Titres fluides (éditeur) via clamp() */
.mce-content-body h1, .editor-styles-wrapper h1 { font-size: clamp(var(--h1-min), 1.6rem + 2.4vw, var(--h1-max)); }
.mce-content-body h2, .editor-styles-wrapper h2 { font-size: clamp(var(--h2-min), 1.35rem + 1.8vw, var(--h2-max)); }
.mce-content-body h3, .editor-styles-wrapper h3 { font-size: clamp(var(--h3-min), 1.10rem + 1.2vw, var(--h3-max)); }
.mce-content-body h4, .editor-styles-wrapper h4 { font-size: clamp(var(--h4-min), 1.00rem + 0.8vw, var(--h4-max)); }
.mce-content-body h5, .editor-styles-wrapper h5 { font-size: clamp(var(--h5-min), 0.95rem + 0.5vw, var(--h5-max)); }
.mce-content-body h6, .editor-styles-wrapper h6 { font-size: clamp(var(--h6-min), 0.90rem + 0.3vw, var(--h6-max)); }

/* 10) (Facultatif) Map WP → Elementor ici aussi (ne nuit pas en éditeur) */
/* Utile si tu utilises des blocs Elementor dans l'éditeur (rare), sinon tu peux supprimer ce bloc. */
:root {
  --e-global-typography-text-font-family:     var(--wp--preset--font-family--text);
  --e-global-typography-headings-font-family: var(--wp--preset--font-family--headings);
  --e-global-color-primary:   var(--wp--preset--color--primary);
  --e-global-color-secondary: var(--wp--preset--color--secondary);
  --e-global-color-text:      var(--wp--preset--color--text);
  --e-global-color-accent:    var(--wp--preset--color--accent);
}

/* === Aperçu éditeur : boutons accent === */
.wp-block-button__link {
  font-family: var(--wp--preset--font-family--headings);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background-color: var(--wp--preset--color--accent);
  color: var(--wp--preset--color--beige-rose);
  padding: 0.6em 1.2em;
  border-radius: 6px;
  border: none;
  text-decoration: none;
}
.wp-block-button__link:hover {
  background-color: var(--wp--preset--color--secondary);
  color: var(--wp--preset--color--beige-rose);
}