/* facmed — charte de contenu UdeM (validée sur pathologie le 2026-11-03) : couleurs du contenu, filets de section,
   cartes blanches, titres équilibrés, flèche des boutons externes. Agit sur tout le contenu : chargée seulement si
   l'option facmed_charte_contenu est active, pour l'étendre site par site. */
/* Évite les mots orphelins en fin de paragraphe dans le contenu. */
main p,
main li {
	text-wrap: pretty;
}
/* Titres de section répartis sur des lignes de longueur égale. */
main h2.wp-block-heading {
	text-wrap: balance;
}
/* ======================================================================
   Couleurs du contenu (charte UdeM) — validé le 2026-11-03.
   Ne touche pas au bandeau d'en-tête (1er bloc de la page).
   1. Fond alternatif : bleu principal 10 % au lieu du gris Ollie (hors charte).
   2. Bleu principal pour les actions et chiffres clés.
   3. Couleur thématique de la section en touches : filet des h2, puces.
   ==================================================================== */
body { --section-accent: var(--wp--preset--color--primary-alt); }
body.section-etudes, body.section-nous-joindre { --section-accent: #ffca40; --section-accent-texte: #805c00; }
body.section-recherche { --section-accent: #52b782; --section-accent-texte: #2d7a52; }
body.section-departement { --section-accent: #f04e24; --section-accent-texte: #c63a15; }
body.section-ressources { --section-accent: var(--wp--preset--color--primary-alt); }
.wp-block-post-content > *:not(:first-child) :is(.has-tertiary-background-color, .has-custom-bleu-principal-1-background-color, .has-main-accent-background-color) .has-base-background-color:not(.is-layout-constrained):not(.wp-block-accordion-item) {
	box-shadow: 0 1px 2px rgba(11, 17, 58, .06), 0 4px 16px rgba(11, 17, 58, .05);
}
.wp-block-post-content > *:not(:first-child) .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background) {
	background-color: var(--wp--preset--color--primary-alt);
}
.wp-block-post-content > *:not(:first-child) .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background):hover {
	background-color: var(--wp--preset--color--primary);
}
.wp-block-post-content > *:not(:first-child) .wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color) {
	color: var(--wp--preset--color--primary-alt);
	border-color: var(--wp--preset--color--primary-alt);
}
.wp-block-post-content > *:not(:first-child) p.has-xx-large-font-size:not(.has-text-color),
.wp-block-post-content > *:not(:first-child) p.has-xx-large-font-size:not(.has-text-color) strong {
	color: var(--wp--preset--color--primary-alt) !important;
}
.wp-block-post-content > *:not(:first-child) h2.wp-block-heading::before {
	content: "";
	display: block;
	width: 3rem;
	height: 4px;
	margin-bottom: .9rem;
	border-radius: 2px;
	background: var(--section-accent);
}
/* Le filet suit l'alignement du titre. */
.wp-block-post-content > *:not(:first-child) h2.wp-block-heading.has-text-align-center::before { margin-inline: auto; }
.wp-block-post-content > *:not(:first-child) h2.wp-block-heading.has-text-align-right::before { margin-left: auto; }
/* Titre précédé d'un surtitre (petit texte) : le surtitre tient déjà ce rôle, pas de filet coincé entre les deux. */
.wp-block-post-content > *:not(:first-child) p:is(.has-small-font-size, .has-x-small-font-size) + h2.wp-block-heading::before { display: none; }
.wp-block-post-content > *:not(:first-child) .wp-block-list:not(.liste-liens) li::marker {
	color: var(--section-accent-texte, var(--section-accent));
}
/* Surtitres de cartes : couleur de la section (version lisible sur blanc). */
.wp-block-post-content > *:not(:first-child) p.has-custom-rouge-orange-color.has-small-font-size {
	color: var(--section-accent-texte, var(--wp--preset--color--primary-alt)) !important;
}
/* Cartes blanches dans une section alternée de premier niveau. */
.wp-block-post-content > *:not(:first-child):is(.has-tertiary-background-color, .has-custom-bleu-principal-1-background-color, .has-main-accent-background-color) .has-base-background-color:not(.is-layout-constrained):not(.wp-block-accordion-item) {
	box-shadow: 0 1px 2px rgba(11, 17, 58, .06), 0 4px 16px rgba(11, 17, 58, .05);
}
/* Cartes de programmes (facmed-programmes-udem) sur une section bleu pâle : fond blanc pour rester visibles. */
.wp-block-post-content :is(.has-tertiary-background-color, .has-custom-bleu-principal-1-background-color, .has-main-accent-background-color) .pu__card:not(:hover):not(:focus-visible) {
	background-color: var(--wp--preset--color--base);
}
/* Boutons menant hors du site (classe ajoutée par functions.php) : flèche ↗ après le libellé. */
.wp-block-button__link.bouton-externe { display: inline-flex; align-items: center; justify-content: center; gap: .4em; }
.wp-block-button__link.bouton-externe::after {
	content: "";
	width: 1.15em;
	height: 1.15em;
	flex: none;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27none%27 stroke=%27%23000%27 stroke-width=%271.9%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M4.5 11.5l7-7M5.5 4.5h6v6%27/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 viewBox=%270 0 16 16%27 fill=%27none%27 stroke=%27%23000%27 stroke-width=%271.9%27 stroke-linecap=%27round%27 stroke-linejoin=%27round%27%3E%3Cpath d=%27M4.5 11.5l7-7M5.5 4.5h6v6%27/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform .25s cubic-bezier(.16, 1, .3, 1);
}
/* Bouton qui a déjà son icône (réglage du bloc) : pas de seconde flèche. */
:is(.tw-has-icon, [class*="has-icon__"]) > .wp-block-button__link.bouton-externe::after { display: none; }
.wp-block-button__link.bouton-externe:hover::after,
.wp-block-button__link.bouton-externe:focus-visible::after { transform: translate(2px, -2px); }
@media (prefers-reduced-motion: reduce) {
.wp-block-button__link.bouton-externe::after { transition: none; }
}
