/*
 Theme Name:   IVG Europe v1
 Theme URI:
 Description:  Thème enfant pour Hello Elementor — typographies & palette unifiées (Poppins/Lora)
 Author:       Centre d'Action Laïque
 Author URI:   https://laicite.be
 Template:     hello-elementor
 Version:      1.0.0
 Text Domain:  hello-elementor-child
*/

/* =========================================================
   0) Rappels
   - PAS d’@import ici (editor-style.css est déjà enqueued côté front via functions.php)
   - Les variables WP sont mappées vers les variables Elementor ci-dessous.
   ========================================================= */

/* =========================================================
   1) Variables partagées (WP → Elementor) + tailles fluides
   ========================================================= */
:root {
  /* Map WP → Elementor (polices) */
  --e-global-typography-text-font-family: var(--wp--preset--font-family--text);
  --e-global-typography-headings-font-family: var(--wp--preset--font-family--headings);

  /* Map WP → Elementor (couleurs) */
  --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);

  /* Tailles fluides des titres (Poppins) */
  --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 */
}

/* =========================================================
   2) Base front (héritage cohérent hors/avec Elementor)
   ========================================================= */
html body {
  font-family: var(--wp--preset--font-family--text);
  color: var(--wp--preset--color--text);
}

/* Titres classiques + dans Elementor */
.entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6,
.elementor h1, .elementor h2, .elementor h3,
.elementor h4, .elementor h5, .elementor h6 {
  font-family: var(--wp--preset--font-family--headings);
  font-weight: 700;
  line-height: 1.2;
  color: var(--wp--preset--color--primary);
  margin: 0;
}

/* Titres de niv. 1 */
.entry-content h1,
.elementor h1 {
	text-transform: uppercase;
	border-bottom: 1px solid var(--wp--preset--color--primary);
	padding-bottom: 0.5rem; /* espace entre texte et filet */
	margin-bottom: 1.5rem;  /* respiration avant le contenu suivant */
}

/* Échelle fluide via clamp() */
.entry-content h1, .elementor h1 { font-size: clamp(var(--h1-min), 1.6rem + 2.4vw, var(--h1-max)); }
.entry-content h2, .elementor h2 { font-size: clamp(var(--h2-min), 1.35rem + 1.8vw, var(--h2-max)); }
.entry-content h3, .elementor h3 { font-size: clamp(var(--h3-min), 1.10rem + 1.2vw, var(--h3-max)); }
.entry-content h4, .elementor h4 { font-size: clamp(var(--h4-min), 1.00rem + 0.8vw, var(--h4-max)); }
.entry-content h5, .elementor h5 { font-size: clamp(var(--h5-min), 0.95rem + 0.5vw, var(--h5-max)); }
.entry-content h6, .elementor h6 { font-size: clamp(var(--h6-min), 0.90rem + 0.3vw, var(--h6-max)); }

/* Lien par défaut */
.entry-content a:not(.wp-block-button__link),
.elementor a:not(.elementor-button) {
  color: var(--wp--preset--color--primary);
  text-decoration: none;
}
.entry-content a:not(.wp-block-button__link):hover,
.elementor a:not(.elementor-button):hover {
  text-decoration: none;
}

/* Widget Heading d’Elementor (au cas où) */
.elementor-widget-heading .elementor-heading-title {
  font-family: var(--wp--preset--font-family--headings);
  font-weight: 700;
  line-height: 1.2;
  color: var(--wp--preset--color--primary);
}

/* Titre du site dans le header : garder la casse normale */
.header-title .elementor-heading-title,
.header-title .elementor-heading-title a{
	text-transform: none !important;  /* annule l'uppercase global */
	letter-spacing: normal;           /* optionnel si tu avais augmenté l’espacement */
	border:none;
	padding-bottom: 0;
	margin-bottom: 0;
}

/* Titre dans les loops */
.loop-title .elementor-heading-title,
.loop-title .elementor-heading-title a{
	font-size: clamp(var(--h4-min), 1.00rem + 0.8vw, var(--h4-max));
	text-transform: none !important;  /* annule l'uppercase global */
	letter-spacing: normal;           /* optionnel si tu avais augmenté l’espacement */
	border:none;
	padding-bottom: 0;
	margin-bottom: 0;
}

/* Paragraphe d’accroche / grand format */
.lead, .has-large-font-size {
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem); /* ~18 → 22px */
  line-height: 1.6;
}

/* Utilitaires */
.h-weight-500, .heading-500 { font-weight: 500; }
.is-accented {
  font-family: var(--wp--preset--font-family--headings);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* =========================================================
   3) Composants / Sur-mesure
   3.1) Multi-colonnes pour le sous-menu de l'item #48
   ========================================================= */

/* Desktop */
@media (min-width: 992px) {
  /* Confort visuel du dropdown */
  .menu-item-48 > .sub-menu,
  .elementor-nav-menu--dropdown .menu-item-48 > .elementor-submenu {
    min-width: 720px;     /* largeur totale du sous-menu */
    max-width: 90vw;
    max-height: 70vh;     /* pas plus haut que 70% de l'écran */
    overflow: auto;       /* scroll si vraiment trop long */
    padding: 16px 20px;
  }

  /* Mise en colonnes */
  .menu-item-48 > .sub-menu,
  .elementor-nav-menu--dropdown .menu-item-48 > .elementor-submenu {
    columns: 4;           /* ajuste à 2, 3 ou 4 selon ton besoin */
    column-gap: 24px;
  }

  /* Évite la casse entre colonnes */
  .menu-item-48 > .sub-menu > li,
  .elementor-nav-menu--dropdown .menu-item-48 > .elementor-submenu > li {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    padding: 0;
    margin: 0 0 8px 0;
  }

  /* Liens harmonisés */
  .menu-item-48 > .sub-menu a,
  .elementor-nav-menu--dropdown .menu-item-48 > .elementor-submenu a {
    display: block;
    line-height: 1.3;
    text-wrap: balance;
  }
}

/* Mobile : on revient en liste */
@media (max-width: 991px) {
  .menu-item-48 > .sub-menu,
  .elementor-nav-menu--dropdown .menu-item-48 > .elementor-submenu {
    columns: 1;
    max-height: none;
    overflow: visible;
    min-width: auto;
  }
}