/*
 * Eco Santé Afrique : couche de design du site.
 * Référence : cahier des charges, section « Identité visuelle ».
 *   Bleu nuit #0C0D3E (principale : en-tête, pied de page, titres)  Rouge #E41D2F (sous-titres, boutons d'action)
 *   Vert #09705B (boutons des formations)  Bleu #0069B3 (une section de l'accueil)  Blanc / blanc-gris #FAFAFF (fonds)
 *   Domine 600 pour les titres H1 à H6, Poppins 400-500 pour le texte et l'interface.
 * Chargée en dernier (après le CSS additionnel) ; « html:root » et « body » servent à passer devant les réglages existants.
 */

/* ---------- 1. Jetons ---------- */
html:root {
	--esa-nuit: #0C0D3E;
	--esa-rouge: #E41D2F;
	--esa-rouge-fonce: #C31626;
	--esa-vert: #09705B;
	--esa-vert-fonce: #075A49;
	--esa-blanc-gris: #FAFAFF;
	--esa-texte: #57586E;
	--esa-bord: #E3E3EC;

	/* Thème Tutor Starter : titres en Domine 600, interlignes lisibles (le H1 était à 2,5). */
	--heading-font: Domine;
	--link-color: #0C0D3E;
	--sticky-menu-bg-color: rgba(255, 255, 255, .97);
	--h1-font-weight: 600; --h2-font-weight: 600; --h3-font-weight: 600;
	--h4-font-weight: 600; --h5-font-weight: 600; --h6-font-weight: 600;
	--h1-font-lineheight: 1.15em; --h1-font-lineheight-tablet: 1.15em; --h1-font-lineheight-mobile: 1.15em;
	--h2-font-lineheight: 1.2em;  --h2-font-lineheight-tablet: 1.2em;  --h2-font-lineheight-mobile: 1.2em;
	--h3-font-lineheight: 1.25em; --h3-font-lineheight-tablet: 1.25em; --h3-font-lineheight-mobile: 1.25em;
	--h4-font-lineheight: 1.3em;  --h4-font-lineheight-tablet: 1.3em;  --h4-font-lineheight-mobile: 1.3em;
	--h5-font-lineheight: 1.35em; --h5-font-lineheight-tablet: 1.35em; --h5-font-lineheight-mobile: 1.35em;
	--h6-font-lineheight: 1.4em;  --h6-font-lineheight-tablet: 1.4em;  --h6-font-lineheight-mobile: 1.4em;

	/* Tutor LMS : le survol passait au turquoise #1BDABD, hors charte. */
	--tutor-color-primary-hover: #075A49;
	--tutor-color-primary-hover-rgb: 7, 90, 73;
}

/* ---------- 2. Titres : Domine 600 partout (hors modules qui ont leur propre maquette) ---------- */
body :is(h1, h2, h3, h4, h5, h6):not(.esa-annuaire *):not(.esa-toasts *):not(.esa-confirmer *):not(.tutor-dashboard *):not(.tutor-modal *) {
	font-family: "Domine", Georgia, serif !important;
	font-weight: 600 !important;
	letter-spacing: 0 !important;
}
/* Accueil, sur la photo : la ligne d'appel et le sous-titre sont des phrases d'accompagnement, en Poppins ; seul « Économie de la santé » est un titre. */
body.home .elementor[data-elementor-type="wp-page"] > .elementor-section:first-child h2 {
	font-family: "Poppins", sans-serif !important;
	font-weight: 500 !important;
}
/* Titres des cartes de cours : un cran plus serrés pour rester sur deux lignes. */
body .tutor-course-card .tutor-course-name { line-height: 1.35 !important; }

/* ---------- 3. En-tête ---------- */
body .navbar-brand img { height: 46px !important; max-height: none !important; width: auto !important; max-width: none !important; }
@media (max-width: 990px) {
	body .navbar-brand img { height: 36px !important; width: auto !important; }
}

/* ---------- 4. Bandeau des pages intérieures : filet rouge sous le titre, comme sur le certificat ---------- */
body:not(.home) .elementor[data-elementor-type="wp-page"] > .elementor-section:first-child .elementor-widget-heading:first-child .elementor-heading-title::after {
	content: "";
	display: block;
	width: 56px;
	height: 3px;
	margin: 16px auto 0;
	border-radius: 2px;
	background: var(--esa-rouge);
}

/* ---------- 5. Pied de page : bleu nuit, comme le prévoit le cahier ---------- */
body section.footer-widgets { background-color: var(--esa-nuit) !important; color: #fff; }
body section.footer-widgets .widget-title { color: #fff !important; font-size: 17px !important; margin-bottom: 14px; }
body section.footer-widgets .widget_nav_menu li { margin: 0 0 8px; }
body section.footer-widgets .widget_nav_menu a { color: rgba(255, 255, 255, .78) !important; font-size: 14.5px; text-decoration: none; }
body section.footer-widgets .widget_nav_menu a:hover,
body section.footer-widgets .widget_nav_menu li:hover a { color: #fff !important; text-decoration: underline; text-underline-offset: 3px; }
body section.footer-widgets #block-17 p { color: rgba(255, 255, 255, .85) !important; }
/* Même logo, même taille sur toutes les pages (il était géant sur les pages de cours). */
body section.footer-widgets #block-27 .wp-block-gallery { display: block; margin: 0; }
body section.footer-widgets #block-27 figure.wp-block-image { width: auto !important; margin: 0 !important; }
body section.footer-widgets #block-27 img { width: 170px !important; height: auto !important; max-width: 100%; object-fit: contain !important; }
/* Réseaux sociaux : pastilles blanches cerclées, identiques partout, rouges au survol. */
body section.footer-widgets .wp-block-social-links { gap: 10px !important; }
body section.footer-widgets .wp-social-link { width: 40px !important; height: 40px !important; margin: 0 !important; border-radius: 50% !important; background: transparent !important; border: 1px solid rgba(255, 255, 255, .4); transition: background-color .15s, border-color .15s; }
body section.footer-widgets .wp-social-link a { display: grid; place-items: center; width: 100%; height: 100%; padding: 0 !important; color: #fff !important; }
body section.footer-widgets .wp-social-link svg { width: 18px !important; height: 18px !important; fill: #fff !important; }
body section.footer-widgets .wp-social-link:hover { background: var(--esa-rouge) !important; border-color: var(--esa-rouge); }

/* ---------- 6. Correctifs ---------- */
/* Bordure rouge de débogage restée dans le CSS additionnel. */
body .post-data.entry-content { border: 0 !important; }

/* Cartes de cours : prix au-dessus, bouton « Ajouter au panier » sur une seule ligne et pleine largeur. */
body .tutor-course-card .tutor-card-footer > .tutor-d-flex { flex-wrap: wrap; gap: 10px; }
body .tutor-course-card .tutor-card-footer .add_to_cart_button,
body .tutor-course-card .tutor-card-footer .tutor-btn { flex: 1 1 100%; white-space: nowrap; justify-content: center; }

/* Formulaire de contact (WPForms) : champs pleine largeur, bouton d'action rouge comme les autres. */
body .wpforms-container .wpforms-field input:not([type="checkbox"]):not([type="radio"]),
body .wpforms-container .wpforms-field textarea {
	width: 100% !important; max-width: 100% !important;
	border: 1px solid #D5D6E0 !important; border-radius: 8px !important; padding: 10px 12px !important;
	font-family: "Poppins", sans-serif !important; font-size: 15px !important; color: var(--esa-nuit) !important;
}
body .wpforms-container .wpforms-field input:focus,
body .wpforms-container .wpforms-field textarea:focus { border-color: var(--esa-nuit) !important; box-shadow: 0 0 0 3px rgba(12, 13, 62, .12) !important; outline: 0; }
body .wpforms-container .wpforms-field-label { color: var(--esa-nuit) !important; font-family: "Poppins", sans-serif !important; font-weight: 500 !important; }
body .wpforms-container button.wpforms-submit {
	background: var(--esa-rouge) !important; border: 0 !important; border-radius: 50px !important;
	padding: 12px 30px !important; height: auto !important; color: #fff !important;
	font: 500 15px/1.2 "Poppins", sans-serif !important;
}
body .wpforms-container button.wpforms-submit:hover { background: var(--esa-rouge-fonce) !important; }

body .wpforms-container .wpforms-required-label { color: var(--esa-rouge) !important; }

/* ---------- 7. Page Contact : formulaire à gauche, coordonnées à droite en bleu nuit lisible ---------- */
body .elementor-658 .elementor-element.elementor-element-65d923f1 { margin-top: 64px !important; margin-bottom: 88px !important; }
/* Les deux colonnes partent du haut (elles étaient centrées verticalement, d'où un décalage). */
body .elementor-658 .elementor-element.elementor-element-65d923f1 > .elementor-container > .elementor-column > .elementor-widget-wrap { align-content: flex-start !important; align-items: flex-start !important; }
body .elementor-658 .elementor-element-2aae88c1 > .elementor-widget-wrap { border-left: 1px solid var(--esa-bord); padding: 8px 0 8px 56px !important; align-content: flex-start; }
body .elementor-658 .elementor-element-37d446ea .wpforms-container { margin-top: 0 !important; padding-top: 0 !important; }
body .elementor-658 .elementor-element-37d446ea .wpforms-field:first-child { padding-top: 0 !important; }
body .elementor-658 .elementor-element-2aae88c1 .elementor-widget-heading { margin-bottom: 6px !important; }
body .elementor-658 .elementor-element-2aae88c1 .elementor-heading-title { color: var(--esa-nuit) !important; font-size: 21px !important; line-height: 1.3 !important; }
body .elementor-658 .elementor-element-2aae88c1 .elementor-widget-text-editor { margin-bottom: 30px !important; }
body .elementor-658 .elementor-element-2aae88c1 .elementor-widget-text-editor,
body .elementor-658 .elementor-element-2aae88c1 .elementor-widget-text-editor p,
body .elementor-658 .elementor-element-2aae88c1 .elementor-widget-text-editor a,
body .elementor-658 .elementor-element-2aae88c1 .elementor-widget-text-editor span {
	margin: 0; color: var(--esa-nuit) !important;
	font-family: "Poppins", sans-serif !important; font-size: 17px !important; font-weight: 400 !important; line-height: 1.6 !important; letter-spacing: 0 !important;
}
body .elementor-658 .elementor-element-2aae88c1 .elementor-widget-text-editor a { text-decoration: underline; text-decoration-color: rgba(12, 13, 62, .3); text-underline-offset: 4px; }
body .elementor-658 .elementor-element-2aae88c1 .elementor-widget-text-editor a:hover { color: var(--esa-rouge) !important; text-decoration-color: currentColor; }
@media (max-width: 767px) {
	body .elementor-658 .elementor-element.elementor-element-65d923f1 { margin-top: 40px !important; margin-bottom: 56px !important; }
	body .elementor-658 .elementor-element-2aae88c1 > .elementor-widget-wrap { border-left: 0; border-top: 1px solid var(--esa-bord); margin-top: 32px; padding: 32px 0 0 !important; }
}

/* Repère de focus visible au clavier (blanc sur les fonds bleu nuit). */
body a:focus-visible, body button:focus-visible, body input:focus-visible, body select:focus-visible, body textarea:focus-visible {
	outline: 3px solid var(--esa-nuit);
	outline-offset: 2px;
}
body section.footer-widgets a:focus-visible { outline-color: #fff; }

@media (prefers-reduced-motion: reduce) {
	body section.footer-widgets .wp-social-link { transition: none; }
}
