/*
 * AIMSIB — Système typographique v1.0
 *
 * Référence unique : deux familles (Mukta pour les titres et les chiffres,
 * Public Sans pour tout le reste), 21 styles nommés, aucune valeur libre.
 * Chaque texte du site doit porter l'un des styles ci-dessous, soit par sa
 * balise (h1…h5, p, input), soit par une classe .t-* (classes globales Bricks
 * du même nom, sans réglage : le style vient d'ici).
 *
 * Valeurs en px : la racine du site est à 62,5 % (Bricks), 1 rem = 10 px.
 *
 * Chargée sur le site public et dans le canevas de Bricks. Les surcharges
 * d'AIMSIB Core sont préfixées par `html` : elles l'emportent même quand la
 * feuille du plugin est imprimée après celle-ci (shortcodes rendus en pied
 * de page), sans !important.
 *
 * Exception assumée : l'espace équipe garde sa base de 19 px (DECISIONS §61,
 * personnes âgées) : --aimsib-equipe-taille ci-dessous, à passer à
 * var(--fs-body) pour appliquer le système strictement. Le corps des
 * articles et des congrès suit le système (article.css).
 */

/* --- Polices ----------------------------------------------------------------
 * Toutes auto-hébergées dans assets/css/polices.css (Google Fonts désactivé
 * dans Bricks) : Public Sans variable 400–700 et italique 400, Mukta 600/700.
 */

/* --- Variables ------------------------------------------------------------- */

:root {
	--font-heading: "Mukta", system-ui, sans-serif;
	--font-body: "Public Sans", system-ui, sans-serif;

	/* Titres — Mukta */
	--fs-display: 56px;
	--fs-h1: 44px;
	--fs-h2: 34px;
	--fs-h3: 26px;
	--fs-h4: 21px;
	--fs-h5: 18px;
	--fs-stat: 40px;

	/* Texte — Public Sans */
	--fs-lead: 20px;
	--fs-body-lg: 18px;
	--fs-body: 16px;
	--fs-body-sm: 14px;
	--fs-caption: 13px;
	--fs-eyebrow: 12px;
	--fs-legal: 12px;

	/* Interface — Public Sans */
	--fs-btn-lg: 16px;
	--fs-btn: 15px;
	--fs-btn-sm: 13px;
	--fs-nav: 15px;
	--fs-label: 14px;
	--fs-input: 16px;
	--fs-badge: 11px;

	/* Base de l'espace équipe (voir en-tête). */
	--aimsib-equipe-taille: 19px;
}

@media (max-width: 767px) {
	:root {
		--fs-display: 38px;
		--fs-h1: 32px;
		--fs-h2: 26px;
		--fs-h3: 22px;
		--fs-h4: 19px;
		--fs-h5: 17px;
		--fs-stat: 32px;
		--fs-lead: 18px;
		--fs-body-lg: 17px;
		--fs-nav: 16px;
	}
}

/* --- Balises --------------------------------------------------------------- */

body {
	font-family: var(--font-body);
	font-size: var(--fs-body);
	line-height: 1.6;
	font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-heading);
	text-transform: none;
	text-wrap: balance;
}

h1 { font-size: var(--fs-h1); line-height: 1.1; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: var(--fs-h2); line-height: 1.15; font-weight: 700; letter-spacing: -0.005em; }
h3 { font-size: var(--fs-h3); line-height: 1.2; font-weight: 600; letter-spacing: 0; }
h4 { font-size: var(--fs-h4); line-height: 1.25; font-weight: 600; letter-spacing: 0; }
h5, h6 { font-size: var(--fs-h5); line-height: 1.3; font-weight: 600; letter-spacing: 0; }

strong, b { font-weight: 600; }

button, input, select, textarea { font-family: var(--font-body); }
input, select, textarea { font-size: var(--fs-input); line-height: 1.4; }
th { font-size: var(--fs-label); line-height: 1.3; font-weight: 600; }
table td { font-variant-numeric: tabular-nums; }

/* --- Éléments Bricks récurrents ------------------------------------------- */

/* Boutons : Bouton M par défaut ; .t-btn-lg / .t-btn-sm pour les deux autres. */
.bricks-button,
.brxe-button {
	font-family: var(--font-body);
	font-size: var(--fs-btn);
	line-height: 1.25;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
}

/* Menus : public, adhérent, administrateur — un seul style. */
.brxe-nav-menu .bricks-nav-menu > li > a,
.brxe-nav-menu .bricks-nav-menu > li > .brx-submenu-toggle > *,
.brxe-nav-nested .brx-nav-nested-items > li > a,
.brxe-nav-nested .brx-nav-nested-items > li > .brx-submenu-toggle > *,
.brxe-nav-menu .sub-menu a,
.brxe-nav-nested .brx-dropdown-content a {
	font-family: var(--font-body);
	font-size: var(--fs-nav);
	line-height: 1.3;
	font-weight: 500;
	letter-spacing: 0;
	text-transform: none;
}

.brxe-nav-menu .current-menu-item > a,
.brxe-nav-menu [aria-current="page"],
.brxe-nav-nested [aria-current="page"] {
	font-weight: 600;
}

/* Pied de page : liens de colonnes en petit texte, interligne 2 pour la liste. */
#brx-footer .brxe-nav-menu .bricks-nav-menu > li > a,
#brx-footer .brxe-nav-nested .brx-nav-nested-items > li > a {
	font-size: var(--fs-body-sm);
	line-height: 2;
	font-weight: 400;
}

/* Fil d'Ariane, méta d'article, légendes. */
.brxe-breadcrumbs,
.brxe-post-meta,
.brxe-image figcaption,
.wp-caption-text {
	font-family: var(--font-body);
	font-size: var(--fs-caption);
	line-height: 1.45;
	font-weight: 400;
}

/* Pagination. */
.bricks-pagination,
.brxe-pagination,
.woocommerce-pagination {
	font-size: var(--fs-body-sm);
	line-height: 1.55;
}

/* Titres de vignette : pas de souligné par défaut, souligné au survol. */
.brxe-heading a,
.t-h5 a { text-decoration: none; }
.brxe-heading a:hover,
.t-h5 a:hover { text-decoration: underline; }

/* --- AIMSIB Core ----------------------------------------------------------- */

/* [aimsib_formules] : cartes formules = H4, description = texte courant. */
html .aimsib-formules {
	--aimsib-formules-taille: var(--fs-body);
	--aimsib-formules-titre: var(--fs-h4);
	font-family: var(--font-body);
	line-height: 1.6;
}
html .aimsib-formules__titre { font-family: var(--font-heading); font-weight: 600; line-height: 1.25; }
html .aimsib-formules__prix { font-weight: 600; }
html .aimsib-formules__etat { font-size: var(--fs-body-sm); line-height: 1.55; }
html .aimsib-formules__bouton { font-size: var(--fs-btn-lg); line-height: 1.25; font-weight: 600; }
html .aimsib-formules__badge {
	font-size: var(--fs-badge);
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* Panier et validation de commande. */
html .woocommerce-cart .woocommerce,
html .woocommerce-checkout .woocommerce {
	--aimsib-p-taille: var(--fs-body);
	--aimsib-p-petit: var(--fs-body-sm);
	--aimsib-p-titre: var(--fs-h3);
	font-family: var(--font-body);
}

/* Commentaires. */
html .aimsib-commentaires {
	--aimsib-com-police: var(--font-body);
	--aimsib-com-taille: var(--fs-body);
	--aimsib-com-petit: var(--fs-body-sm);
}

/* Fenêtre congrès, carte d'inscription, newsletter. */
html .aimsib-popup-congres { --aimsib-pop-taille: var(--fs-body); --aimsib-pop-titre: var(--fs-h3); }
html .aimsib-inscription { --aimsib-insc-taille: var(--fs-body); --aimsib-insc-petit: var(--fs-body-sm); --aimsib-insc-etiquette: var(--fs-label); }
html .aimsib-newsletter { font-family: var(--font-body); }
html .aimsib-newsletter__rgpd { font-size: var(--fs-body-sm); line-height: 1.55; }

/* Espace adhérent (Mon compte). */
html .woocommerce-account .aimsib-compte { font-family: var(--font-body); }
html .woocommerce-account .aimsib-compte h2 {
	font-family: var(--font-heading);
	font-size: var(--fs-h4);
	font-weight: 600;
	line-height: 1.25;
}
html .woocommerce-account .aimsib-compte .aimsib-adhesion__pastille {
	font-size: var(--fs-badge);
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}
html .woocommerce-account .aimsib-compte .aimsib-adhesion__colonnes dt {
	font-size: var(--fs-eyebrow);
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0.08em;
}

/* Espace équipe : base accessible conservée, familles et graisses du système. */
html .aimsib-gestion,
html .aimsib-g__fenetre,
html .aimsib-g__annonce {
	--aimsib-g-taille: var(--aimsib-equipe-taille);
	font-family: var(--font-body);
}
html .aimsib-gestion__titre,
html .aimsib-gestion-asso__titre,
html .aimsib-g__titre,
html .aimsib-g__intertitre,
html .aimsib-gestion-asso__intertitre,
html .aimsib-g__que-faire-titre,
html .aimsib-gestion :is(h1, h2, h3, h4),
html .aimsib-g__fenetre :is(h1, h2, h3, h4) {
	font-family: var(--font-heading);
	font-weight: 600;
	line-height: 1.25;
}
html .aimsib-gestion__titre { font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; }
html .aimsib-gestion__chiffre {
	font-family: var(--font-heading);
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}
html .aimsib-gestion__onglet { font-family: var(--font-body); font-weight: 500; }
html .aimsib-gestion__onglet[aria-selected="true"],
html .aimsib-gestion__onglet.is-active { font-weight: 600; }
html .aimsib-gestion__table th,
html .aimsib-g__etiquette,
html .aimsib-gestion__filtre-nom { font-weight: 600; }
html .aimsib-gestion__table td { font-variant-numeric: tabular-nums; }
html .aimsib-g__bouton { font-family: var(--font-body); font-weight: 600; }
html .aimsib-g__pastille { font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1; }

/* --- Les 21 styles --------------------------------------------------------- */
/* En dernier : une classe posée sur un élément l'emporte sur sa balise. */

.t-display { font-family: var(--font-heading); font-size: var(--fs-display); line-height: 1.05; font-weight: 700; letter-spacing: -0.015em; text-transform: none; }
.t-h1      { font-family: var(--font-heading); font-size: var(--fs-h1); line-height: 1.1; font-weight: 700; letter-spacing: -0.01em; text-transform: none; }
.t-h2      { font-family: var(--font-heading); font-size: var(--fs-h2); line-height: 1.15; font-weight: 700; letter-spacing: -0.005em; text-transform: none; }
.t-h3      { font-family: var(--font-heading); font-size: var(--fs-h3); line-height: 1.2; font-weight: 600; letter-spacing: 0; text-transform: none; }
.t-h4      { font-family: var(--font-heading); font-size: var(--fs-h4); line-height: 1.25; font-weight: 600; letter-spacing: 0; text-transform: none; }
.t-h5      { font-family: var(--font-heading); font-size: var(--fs-h5); line-height: 1.3; font-weight: 600; letter-spacing: 0; text-transform: none; }
.t-stat    { font-family: var(--font-heading); font-size: var(--fs-stat); line-height: 1; font-weight: 700; letter-spacing: 0; font-variant-numeric: tabular-nums; }

.t-lead    { font-family: var(--font-body); font-size: var(--fs-lead); line-height: 1.5; font-weight: 400; letter-spacing: 0; text-transform: none; }
.t-body-lg { font-family: var(--font-body); font-size: var(--fs-body-lg); line-height: 1.6; font-weight: 400; letter-spacing: 0; text-transform: none; }
.t-body    { font-family: var(--font-body); font-size: var(--fs-body); line-height: 1.6; font-weight: 400; letter-spacing: 0; text-transform: none; }
.t-body-sm { font-family: var(--font-body); font-size: var(--fs-body-sm); line-height: 1.55; font-weight: 400; letter-spacing: 0; text-transform: none; }
.t-caption { font-family: var(--font-body); font-size: var(--fs-caption); line-height: 1.45; font-weight: 400; letter-spacing: 0; text-transform: none; }
.t-eyebrow { font-family: var(--font-body); font-size: var(--fs-eyebrow); line-height: 1.3; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.t-legal   { font-family: var(--font-body); font-size: var(--fs-legal); line-height: 1.5; font-weight: 400; letter-spacing: 0; text-transform: none; }

.t-btn-lg  { font-family: var(--font-body); font-size: var(--fs-btn-lg); line-height: 1.25; font-weight: 600; letter-spacing: 0; text-transform: none; }
.t-btn     { font-family: var(--font-body); font-size: var(--fs-btn); line-height: 1.25; font-weight: 600; letter-spacing: 0; text-transform: none; }
.t-btn-sm  { font-family: var(--font-body); font-size: var(--fs-btn-sm); line-height: 1.25; font-weight: 600; letter-spacing: 0; text-transform: none; }
.t-nav     { font-family: var(--font-body); font-size: var(--fs-nav); line-height: 1.3; font-weight: 500; letter-spacing: 0; text-transform: none; }
.t-label   { font-family: var(--font-body); font-size: var(--fs-label); line-height: 1.3; font-weight: 600; letter-spacing: 0; text-transform: none; }
.t-input   { font-family: var(--font-body); font-size: var(--fs-input); line-height: 1.4; font-weight: 400; letter-spacing: 0; text-transform: none; }
.t-badge   { font-family: var(--font-body); font-size: var(--fs-badge); line-height: 1; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }

.t-nav[aria-current],
.t-nav.is-active,
.t-nav .current-menu-item > a,
.t-nav [aria-current="page"] { font-weight: 600; }

/* Une classe de texte posée sur un bloc s'applique à ses paragraphes et
   listes (le texte riche de Bricks enveloppe tout dans des <p>). */
:is(.t-lead, .t-body-lg, .t-body, .t-body-sm, .t-caption, .t-legal, .t-eyebrow, .t-label) :is(p, li, span) {
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
}
:is(.t-lead, .t-body-lg, .t-body, .t-body-sm, .t-caption, .t-legal) :is(strong, b) { font-weight: 600; }

/* Le texte d'un titre enveloppé dans un lien hérite de la classe. */
:is(.t-display, .t-h1, .t-h2, .t-h3, .t-h4, .t-h5, .t-stat) a { font: inherit; letter-spacing: inherit; }
