/* =========================================================================
   eSRED — feuille de style principale
   Palette tirée du sceau d'origine : le bois devient l'ambre d'accent,
   posé sur un bleu d'encre qui donne le sérieux attendu en fiscalité.
   ========================================================================= */

:root {
	/* Encre */
	--ink-900: #0d1c26;
	--ink-800: #10222e;
	--ink-700: #17303f;
	--ink-600: #234254;
	--ink-400: #4d6b7e;

	/* Ambre (le bois du sceau) */
	--amber-700: #9c5f26;
	--amber-600: #b8752f;
	--amber-500: #c98a3f;
	--amber-400: #dda75f;
	--amber-200: #f0cf9d;
	--amber-050: #fbf1e1;

	/* Papier */
	--paper: #fdfaf5;
	--paper-2: #f5eee3;
	--paper-3: #eae0d1;

	/* Texte */
	--text: #1c2f3b;
	--text-muted: #5a7183;
	--text-invert: #eef4f7;
	--text-invert-muted: #a9c0ce;

	--line: rgba(28, 47, 59, .14);
	--line-invert: rgba(240, 207, 157, .22);

	--font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
	--font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	--wrap: 1180px;
	--gutter: clamp(1.25rem, 4vw, 2.5rem);
	--radius: 14px;
	--radius-lg: 22px;

	--shadow-sm: 0 1px 2px rgba(13, 28, 38, .06), 0 4px 12px rgba(13, 28, 38, .05);
	--shadow-md: 0 2px 4px rgba(13, 28, 38, .06), 0 12px 32px rgba(13, 28, 38, .09);
	--shadow-lg: 0 24px 64px rgba(13, 28, 38, .16);

	--speed: .22s;
}

/* --- Réinitialisation mesurée ------------------------------------------ */

*,
*::before,
*::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	/* Le menu latéral est garé hors écran à droite ; « clip » l'empêche
	   d'allonger le défilement horizontal, sans créer de conteneur de
	   défilement — l'entête collante continue donc de fonctionner. */
	overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--text);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--amber-700); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--amber-600); }

h1, h2, h3, h4 {
	font-family: var(--font-display);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: -.015em;
	color: var(--ink-800);
	margin: 0 0 .5em;
	text-wrap: balance;
}

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

ul, ol { margin: 0 0 1.15em; padding-left: 1.35em; }
li { margin-bottom: .45em; }

:focus-visible {
	outline: 3px solid var(--amber-500);
	outline-offset: 3px;
	border-radius: 4px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
	white-space: nowrap; border: 0;
}

.skip-link {
	position: absolute;
	left: -9999px;
	z-index: 999;
	padding: .75rem 1.25rem;
	background: var(--ink-800);
	color: var(--text-invert);
	border-radius: 0 0 var(--radius) 0;
	text-decoration: none;
}
.skip-link:focus { left: 0; top: 0; }

.wrap {
	width: min(var(--wrap), 100% - (var(--gutter) * 2));
	margin-inline: auto;
}

/* --- Boutons ------------------------------------------------------------ */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	padding: .7rem 1.35rem;
	border: 1.5px solid transparent;
	border-radius: 999px;
	font-family: var(--font-body);
	font-size: .95rem;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: .01em;
	text-decoration: none;
	/* Un libellé de bouton coupé en deux (« Appelez-/nous ») donne un objet
	   bancal : on garde l'étiquette d'un seul tenant. */
	white-space: nowrap;
	cursor: pointer;
	transition: background var(--speed), color var(--speed), border-color var(--speed), transform var(--speed), box-shadow var(--speed);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--accent {
	background: var(--amber-600);
	border-color: var(--amber-600);
	color: #fff;
	box-shadow: 0 6px 18px rgba(184, 117, 47, .3);
}
.btn--accent:hover { background: var(--amber-700); border-color: var(--amber-700); color: #fff; }

.btn--ghost {
	background: transparent;
	border-color: currentColor;
	color: var(--ink-700);
}
.btn--ghost:hover { background: var(--ink-800); border-color: var(--ink-800); color: var(--text-invert); }

.btn--lg { padding: .95rem 1.9rem; font-size: 1.02rem; }

/* Sur fond sombre */
.hero .btn--ghost,
.cta-band .btn--ghost { color: var(--amber-200); }
.hero .btn--ghost:hover,
.cta-band .btn--ghost:hover { background: var(--amber-200); border-color: var(--amber-200); color: var(--ink-900); }

.icon { width: 1em; height: 1em; fill: currentColor; flex: none; }

/* --- Le sceau ----------------------------------------------------------- */

.stamp { color: inherit; }
.stamp__word { font-family: var(--font-display); font-weight: 600; }
.stamp__tagline { font-family: var(--font-display); font-weight: 500; }
.stamp__ring--hair { opacity: .5; }

/* --- Barre d'informations ---------------------------------------------- */

.topbar {
	background: var(--ink-900);
	color: var(--text-invert-muted);
	font-size: .85rem;
}
.topbar__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .5rem 1.5rem;
	min-height: 42px;
	padding-block: .35rem;
}
.topbar__pitch { margin: 0; letter-spacing: .02em; }
.topbar__contact { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.topbar__link {
	display: inline-flex;
	align-items: center;
	gap: .45em;
	color: var(--text-invert-muted);
	text-decoration: none;
	transition: color var(--speed);
}
.topbar__link:hover { color: var(--amber-200); }

@media (max-width: 720px) {
	.topbar__pitch { display: none; }
	.topbar__inner { justify-content: center; }
}

/* --- Sélecteur de langue ------------------------------------------------ */

.lang-switch { display: inline-flex; align-items: center; gap: 2px; }
.lang-switch__item {
	padding: .2rem .5rem;
	border-radius: 999px;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-decoration: none;
	color: inherit;
	opacity: .65;
	transition: opacity var(--speed), background var(--speed), color var(--speed);
}
.lang-switch__item:hover { opacity: 1; color: inherit; }
.lang-switch__item.is-current {
	opacity: 1;
	background: rgba(240, 207, 157, .16);
	color: var(--amber-200);
}
.lang-switch--nav { display: none; }
.lang-switch--footer { margin-top: 1rem; }
.lang-switch--footer .lang-switch__item.is-current { background: rgba(240, 207, 157, .18); }

/* --- Entête ------------------------------------------------------------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(253, 250, 245, .92);
	backdrop-filter: saturate(140%) blur(10px);
	border-bottom: 1px solid var(--line);
	transition: box-shadow var(--speed);
}
.site-header.is-stuck { box-shadow: var(--shadow-sm); }

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	min-height: 78px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: .7rem;
	text-decoration: none;
	color: var(--ink-800);
	flex: none;
}
.brand__stamp { width: 46px; height: 46px; color: var(--amber-600); transition: transform var(--speed); }
.brand:hover .brand__stamp { transform: rotate(-6deg); }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name {
	font-family: var(--font-display);
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -.01em;
}
.brand__tagline {
	font-size: .72rem;
	font-weight: 500;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--text-muted);
}

/* --- Navigation --------------------------------------------------------- */

.nav { display: flex; align-items: center; gap: 1.5rem; }

.nav__list {
	display: flex;
	align-items: center;
	gap: .25rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.nav__list li { margin: 0; position: relative; }

.nav__list > li > a {
	display: inline-block;
	padding: .55rem .8rem;
	border-radius: 8px;
	font-size: .95rem;
	font-weight: 500;
	color: var(--ink-700);
	text-decoration: none;
	white-space: nowrap;
	transition: background var(--speed), color var(--speed);
}
.nav__list > li > a:hover,
.nav__list > li.current-menu-item > a,
.nav__list > li.current-menu-ancestor > a {
	background: var(--amber-050);
	color: var(--amber-700);
}

.nav__toggle {
	position: absolute;
	right: -2px;
	top: 50%;
	transform: translateY(-50%);
	width: 22px;
	height: 22px;
	padding: 0;
	background: none;
	border: 0;
	cursor: pointer;
	display: none;
}
.nav__toggle span {
	display: block;
	width: 7px;
	height: 7px;
	margin-inline: auto;
	border-right: 1.6px solid currentColor;
	border-bottom: 1.6px solid currentColor;
	transform: rotate(45deg) translate(-2px, -2px);
	transition: transform var(--speed);
}

/* Sous-menus */
.nav__list ul {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	min-width: 210px;
	margin: 0;
	padding: .4rem;
	list-style: none;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow-md);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity var(--speed), transform var(--speed), visibility var(--speed);
}
.nav__list > li:hover > ul,
.nav__list > li:focus-within > ul,
.nav__list > li.is-open > ul {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.nav__list ul a {
	display: block;
	padding: .5rem .75rem;
	border-radius: 8px;
	font-size: .9rem;
	color: var(--ink-700);
	text-decoration: none;
	transition: background var(--speed), color var(--speed);
}
.nav__list ul a:hover { background: var(--amber-050); color: var(--amber-700); }

.nav__cta { display: flex; align-items: center; gap: .75rem; }

.nav-burger {
	display: none;
	width: 44px;
	height: 44px;
	padding: 0;
	background: none;
	border: 1px solid var(--line);
	border-radius: 10px;
	cursor: pointer;
	color: var(--ink-700);
}
.nav-burger span,
.nav-burger span::before,
.nav-burger span::after {
	display: block;
	width: 20px;
	height: 2px;
	margin-inline: auto;
	background: currentColor;
	border-radius: 2px;
	transition: transform var(--speed), opacity var(--speed);
}
.nav-burger span { position: relative; }
.nav-burger span::before,
.nav-burger span::after { content: ""; position: absolute; left: 0; }
.nav-burger span::before { top: -6px; }
.nav-burger span::after { top: 6px; }
.nav-burger[aria-expanded="true"] span { background: transparent; }
.nav-burger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* Sept entrées dont « Contactez-nous » et « CDAE-IA » : sous 1150 px la barre
   ne tient plus sur une ligne, on bascule sur le menu latéral avant que les
   libellés ne se coupent. Le JS suit le même seuil. */
@media (max-width: 1150px) {
	.nav-burger { display: block; }

	/* Un élément doté d'un `backdrop-filter` devient le référent des positions
	   fixes de ses descendants. Le menu latéral, enfant de l'entête, se
	   retrouvait donc confiné dans la hauteur de celle-ci — une bande de 128 px
	   au lieu de la pleine hauteur de l'écran. On retire le flou ici ; un fond
	   opaque est de toute façon préférable en petite largeur. */
	.site-header {
		backdrop-filter: none;
		background: var(--paper);
	}
	.lang-switch--top { display: none; }
	.lang-switch--nav { display: inline-flex; }
	.lang-switch--nav .lang-switch__item.is-current { background: var(--amber-050); color: var(--amber-700); }

	.nav {
		position: fixed;
		inset: 0 0 0 auto;
		width: min(360px, 86vw);
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding: 6rem 1.5rem 2rem;
		background: var(--paper);
		border-left: 1px solid var(--line);
		box-shadow: var(--shadow-lg);
		overflow-y: auto;
		transform: translateX(100%);
		visibility: hidden;
		transition: transform var(--speed) ease, visibility var(--speed);
	}
	.nav.is-open { transform: translateX(0); visibility: visible; }

	.nav__list { flex-direction: column; align-items: stretch; gap: 0; }
	.nav__list > li { border-bottom: 1px solid var(--line); }
	.nav__list > li > a { padding: .9rem .25rem; font-size: 1.05rem; border-radius: 0; }

	.nav__toggle { display: block; right: 4px; }
	.nav__list > li.is-open .nav__toggle span { transform: rotate(-135deg) translate(-2px, -2px); }

	.nav__list ul {
		position: static;
		min-width: 0;
		margin: 0 0 .5rem;
		padding: 0 0 .25rem .75rem;
		border: 0;
		border-left: 2px solid var(--amber-200);
		border-radius: 0;
		box-shadow: none;
		opacity: 1;
		visibility: visible;
		transform: none;
		display: none;
	}
	.nav__list > li.is-open > ul { display: block; }

	.nav__cta { margin-top: 1.5rem; flex-direction: column-reverse; align-items: stretch; }
	.nav__cta .btn { width: 100%; }

	body.nav-open { overflow: hidden; }
	.nav-scrim {
		position: fixed;
		inset: 0;
		z-index: 40;
		background: rgba(13, 28, 38, .45);
		opacity: 0;
		transition: opacity var(--speed);
	}
	.nav-scrim.is-visible { opacity: 1; }
}

/* --- Héros -------------------------------------------------------------- */

.hero {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(1100px 520px at 78% -8%, rgba(201, 138, 63, .28), transparent 62%),
		linear-gradient(158deg, var(--ink-800) 0%, var(--ink-900) 58%, #0a1720 100%);
	color: var(--text-invert);
	padding-block: clamp(3.5rem, 9vw, 7rem);
}

/* Grain discret, en rappel de la texture bois du logo d'origine */
.hero__grain {
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: .5;
	background-image:
		repeating-linear-gradient(96deg, rgba(240, 207, 157, .05) 0 2px, transparent 2px 7px),
		repeating-linear-gradient(84deg, rgba(240, 207, 157, .035) 0 1px, transparent 1px 5px);
	mask-image: radial-gradient(120% 90% at 70% 0%, #000 25%, transparent 78%);
}

.hero__inner {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
	align-items: center;
	gap: clamp(2rem, 6vw, 4.5rem);
}

.hero__eyebrow {
	margin: 0 0 1rem;
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--amber-200);
}

/* Variante « nom développé » : pas de majuscules forcées, sinon « eSRED »
   perdrait sa casse, et l'interlettrage large rendrait la phrase illisible. */
.hero__eyebrow--name {
	font-size: .92rem;
	font-weight: 400;
	letter-spacing: .01em;
	text-transform: none;
	line-height: 1.45;
	/* Pas de largeur maximale ici : la ligne doit rester d'un seul tenant tant
	   que la place le permet. Elle demande environ 484 px, le héros en offre
	   plus de 600 sur un écran d'ordinateur. */
	text-wrap: balance;
}
.hero__eyebrow--name strong {
	font-family: var(--font-display);
	font-size: 1.12rem;
	font-weight: 700;
	letter-spacing: -.01em;
	color: var(--amber-200);
}
.hero__eyebrow__sep { opacity: .55; }

@media (max-width: 640px) {
	/* Sous cette largeur la ligne ne tient plus : le nom passe au-dessus de sa
	   définition, ce qui vaut mieux qu'une coupure au milieu de la phrase. */
	.hero__eyebrow--name { font-size: .88rem; }
	.hero__eyebrow__sep { display: none; }
	.hero__eyebrow--name strong { display: block; margin-bottom: .15rem; }
}

.hero__title {
	margin: 0 0 1.1rem;
	color: #fff;
	font-size: clamp(2.6rem, 6.2vw, 4.4rem);
	line-height: 1.02;
	letter-spacing: -.03em;
}

.hero__lede {
	max-width: 56ch;
	margin: 0 0 2rem;
	color: var(--text-invert-muted);
	font-size: clamp(1.02rem, 1.5vw, 1.18rem);
}

.hero__actions { display: flex; flex-wrap: wrap; gap: .85rem; }

.hero__seal { display: grid; place-items: center; }
.hero__stamp {
	width: min(340px, 78%);
	height: auto;
	color: var(--amber-400);
	opacity: .95;
	filter: drop-shadow(0 18px 44px rgba(0, 0, 0, .45));
	animation: esred-seal 26s linear infinite;
}
@keyframes esred-seal {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
	.hero__stamp { animation: none; }
}

@media (max-width: 880px) {
	.hero__inner { grid-template-columns: 1fr; }
	.hero__seal { order: -1; }
	.hero__stamp { width: min(210px, 55%); }
}

/* --- Repères chiffrés --------------------------------------------------- */

.stats {
	background: var(--ink-900);
	color: var(--text-invert);
	border-top: 1px solid var(--line-invert);
}
/* La grille s'adapte au nombre de repères plutôt que d'en figer quatre : on
   peut en ajouter ou en retirer sans toucher au CSS. */
.stats__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
	gap: 1px;
	background: var(--line-invert);
	border-inline: 1px solid var(--line-invert);
}
.stat {
	padding: 1.75rem 1.5rem;
	background: var(--ink-900);
	text-align: center;
}
.stat__value {
	margin: 0 0 .35rem;
	font-family: var(--font-display);
	font-size: clamp(1.6rem, 3vw, 2.3rem);
	font-weight: 700;
	line-height: 1.1;
	color: var(--amber-400);
}

/* La juridiction se lit avec le taux, pas dans la phrase en dessous : c'est
   elle qui dit de quel crédit on parle.

   Disposition en ligne imposée : en flux normal, « 35 % du Canada » tenait sur
   une ligne et « 30 % du Québec » passait à la suivante, à un pixel près. Le
   bandeau paraissait bancal d'une case à l'autre. */
.stat__value {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: .4rem;
	white-space: nowrap;
}
.stat__where {
	font-family: var(--font-body);
	font-size: .7rem;
	font-weight: 600;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: var(--text-invert-muted);
}
.stat__label {
	margin: 0;
	font-size: .86rem;
	line-height: 1.45;
	color: var(--text-invert-muted);
	text-wrap: pretty;
}

@media (max-width: 420px) {
	/* Sous cette largeur, deux colonnes couperaient les libellés : on empile. */
	.stats__grid { grid-template-columns: 1fr; }
}

/* --- Entête des pages intérieures --------------------------------------- */

.page-hero {
	position: relative;
	padding-block: clamp(2.5rem, 6vw, 4.25rem) clamp(2rem, 4vw, 3rem);
	background:
		radial-gradient(760px 320px at 12% -30%, rgba(201, 138, 63, .16), transparent 60%),
		linear-gradient(180deg, var(--paper-2), var(--paper));
	border-bottom: 1px solid var(--line);
}
.page-hero__title {
	margin: 0;
	font-size: clamp(2rem, 4.6vw, 3.1rem);
	max-width: 22ch;
}
.page-hero__lede {
	max-width: 62ch;
	margin: .9rem 0 0;
	color: var(--text-muted);
	font-size: 1.1rem;
}
.page-hero__code {
	margin: 0 0 .5rem;
	font-family: var(--font-display);
	font-size: 3.5rem;
	font-weight: 700;
	line-height: 1;
	color: var(--amber-400);
}

.crumbs {
	margin-bottom: 1.1rem;
	font-size: .84rem;
	color: var(--text-muted);
	display: flex;
	flex-wrap: wrap;
	gap: .45rem;
}
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--amber-700); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink-700); font-weight: 500; }

.page-body { padding-block: clamp(2.5rem, 6vw, 4rem); }

/* --- Prose -------------------------------------------------------------- */

.prose { max-width: 72ch; font-size: 1.07rem; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 {
	margin-top: 2.2em;
	font-size: clamp(1.45rem, 2.6vw, 1.85rem);
	padding-bottom: .35rem;
	border-bottom: 2px solid var(--amber-200);
}
.prose h3 { margin-top: 1.8em; font-size: 1.25rem; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul { padding-left: 0; list-style: none; }
.prose ul > li {
	position: relative;
	padding-left: 1.6rem;
}
.prose ul > li::before {
	content: "";
	position: absolute;
	left: .25rem;
	top: .68em;
	width: 7px;
	height: 7px;
	border-radius: 2px;
	background: var(--amber-500);
	transform: rotate(45deg);
}
.prose ol { padding-left: 1.3rem; }
.prose ol::marker, .prose li::marker { color: var(--amber-600); font-weight: 600; }
.prose a { font-weight: 500; overflow-wrap: anywhere; }
.prose strong { color: var(--ink-800); font-weight: 600; }

.prose blockquote,
.prose .wp-block-quote {
	margin: 1.8em 0;
	padding: 1.1rem 1.4rem;
	background: var(--amber-050);
	border-left: 3px solid var(--amber-500);
	border-radius: 0 var(--radius) var(--radius) 0;
	font-style: normal;
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose figure, .prose img { border-radius: var(--radius); }

/* Encadré « Mise à jour importante » — l'équivalent du surlignage jaune du
   document source : le tableau donne les taux en vigueur, ce bloc annonce la
   réforme qui les modifie. Il doit se distinguer du corps de la page sans
   crier. */
.update-notice {
	margin: 2.25em 0;
	padding: 1.5rem 1.6rem;
	background: linear-gradient(180deg, var(--amber-050), #fff);
	border: 1px solid var(--amber-200);
	border-left: 4px solid var(--amber-500);
	border-radius: 0 var(--radius) var(--radius) 0;
	box-shadow: var(--shadow-sm);
}
.update-notice > h2 {
	display: flex;
	align-items: center;
	gap: .55rem;
	margin-top: 0;
	margin-bottom: .8rem;
	padding-bottom: 0;
	border-bottom: 0;
	font-size: 1.2rem;
	color: var(--amber-700);
	text-transform: none;
}
.update-notice > h2::before {
	content: "";
	flex: none;
	width: 10px;
	height: 10px;
	border-radius: 2px;
	background: var(--amber-500);
	transform: rotate(45deg);
}
.update-notice p,
.update-notice li { font-size: .99rem; }
.update-notice > :last-child { margin-bottom: 0; }
.update-notice ul { margin-bottom: 1.1em; }

/* Schéma explicatif : un diagramme sur fond blanc, qu'un cadre discret sépare
   du texte sans l'enfermer. */
.prose .schema-figure {
	margin: 2em 0 .8em;
	padding: 1rem;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
}
.prose .schema-figure img {
	width: 100%;
	height: auto;
	border-radius: 4px;
}

.figure-legend {
	margin-top: 0;
	color: var(--text-muted);
	font-size: .93rem;
	line-height: 1.55;
}

.source-note {
	margin-top: 2.5em;
	padding-top: 1rem;
	border-top: 1px solid var(--line);
	font-size: .88rem;
	color: var(--text-muted);
}

/* Tableaux : défilables sur mobile plutôt que débordants */
.prose .wp-block-table,
.prose figure.wp-block-table { overflow-x: auto; margin-inline: 0; }
.prose table {
	width: 100%;
	min-width: 620px;
	border-collapse: collapse;
	font-size: .93rem;
	background: #fff;
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
}
.prose thead th, .prose tr:first-child td {
	background: var(--ink-800);
	color: var(--text-invert);
	font-weight: 600;
	text-align: left;
}
.prose th, .prose td {
	padding: .7rem .85rem;
	border: 1px solid var(--line);
	vertical-align: top;
}
.prose tbody tr:nth-child(even) td { background: var(--paper-2); }
.prose td strong { color: var(--ink-800); }
.prose sup { color: var(--amber-700); font-weight: 600; }

/* --- Simple / Détaillé -------------------------------------------------- */

.levels { max-width: 76ch; }
.levels__switch {
	display: inline-flex;
	gap: 4px;
	padding: 4px;
	margin-bottom: 1.75rem;
	background: var(--paper-2);
	border: 1px solid var(--line);
	border-radius: 999px;
}
.levels__btn {
	padding: .55rem 1.4rem;
	background: none;
	border: 0;
	border-radius: 999px;
	font-family: var(--font-body);
	font-size: .93rem;
	font-weight: 600;
	color: var(--text-muted);
	cursor: pointer;
	transition: background var(--speed), color var(--speed), box-shadow var(--speed);
}
.levels__btn:hover { color: var(--ink-700); }
.levels__btn.is-active {
	background: #fff;
	color: var(--amber-700);
	box-shadow: var(--shadow-sm);
}
.levels__panel[hidden] { display: none; }
.levels__nudge { margin-top: 2rem; }

/* --- Blocs de contenu de l'accueil -------------------------------------- */

.front-content > .wp-block-group { padding-block: clamp(3rem, 7vw, 5rem); }
.front-content > .wp-block-group.has-paper-background-color { background: var(--paper-2); }

/* L'éditeur de blocs enveloppe le contenu de chaque groupe dans un conteneur
   interne. Pour les sections de premier niveau, c'est lui qui porte la largeur
   de lecture — le groupe, lui, garde son fond sur toute la largeur. */
.front-content > .wp-block-group > .wp-block-group__inner-container {
	width: min(var(--wrap), 100% - (var(--gutter) * 2));
	margin-inline: auto;
}

/* Pour les groupes imbriqués, ce conteneur s'efface : nos mises en page (grille
   « à propos », colonne des tuiles, rythme de la prose) doivent voir les vrais
   enfants, pas l'emballage. */
.front-content .wp-block-group .wp-block-group > .wp-block-group__inner-container,
.prose > .wp-block-group__inner-container {
	display: contents;
}

.section-head { max-width: 62ch; margin-bottom: 2.5rem; }
.section-head .eyebrow {
	margin: 0 0 .6rem;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--amber-700);
}
.section-head h2 { font-size: clamp(1.9rem, 3.8vw, 2.6rem); margin-bottom: .4rem; }
.section-head p { color: var(--text-muted); font-size: 1.08rem; margin: 0; }

/* Cartes de services / crédits */
.tile {
	height: 100%;
	padding: 1.9rem 1.7rem;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	transition: transform var(--speed), box-shadow var(--speed), border-color var(--speed);
}
.tile:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-md);
	border-color: var(--amber-200);
}
.tile h3 {
	margin: 0 0 .6rem;
	font-size: 1.22rem;
	/* « précommercialisation » ne tenait qu'à quatre pixels près : en cas de
	   dépassement, on veut une césure avec trait d'union, pas un mot tranché
	   au milieu. La langue du document est déclarée, la césure est correcte. */
	hyphens: auto;
	display: flex;
	align-items: baseline;
	gap: .55rem;
}
.tile h3::before {
	content: "";
	flex: none;
	width: 9px;
	height: 9px;
	border-radius: 2px;
	background: var(--amber-500);
	transform: rotate(45deg);
}
.tile p { color: var(--text-muted); margin-bottom: 0; font-size: .99rem; }
.tile p + p { margin-top: .8rem; }
.tile a { font-weight: 600; }

.tile--credit {
	display: flex;
	flex-direction: column;
	background: linear-gradient(180deg, #fff, var(--amber-050));
}
/* --- Les taux d'une tuile de crédit ------------------------------------
   Un taux se lit « chiffre puis juridiction », sur une même ligne, comme les
   repères du haut de page. La RS&DE en porte deux (Canada et Québec) : ils
   s'empilent dans la même tuile.

   La zone des taux a une hauteur fixe, qu'il y en ait un ou deux. Sans cela,
   le titre de la RS&DE descendait d'une ligne et toute la rangée paraissait
   de travers. */

.tile--credit .rate {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: .4rem;
	font-family: var(--font-display);
	font-size: 1.72rem;
	font-weight: 700;
	line-height: 1.1;
	color: var(--amber-600);
	white-space: nowrap;
}

/* Hauteur commune : soit la pile, soit le taux unique la porte. */
.tile--credit .rate-stack,
.tile--credit > .wp-block-group__inner-container > .rate,
.tile--credit .rate:only-child {
	min-height: 4.4rem;
	margin-bottom: .5rem;
	align-content: center;
}

.rate-stack {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: .35rem;
}

/* Dans une pile, chaque taux garde sa hauteur naturelle : c'est la pile qui
   porte le gabarit. La marge est remise à zéro sur les deux axes — l'éditeur
   de blocs ajoute sinon un écart entre éléments frères, qui faisait dépasser
   la pile de sa hauteur réservée. */
.rate-stack .rate {
	min-height: 0;
	margin-block: 0;
	align-content: normal;
}

.rate__where {
	font-family: var(--font-body);
	font-size: .64rem;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--text-muted);
}
.tile--credit .tile__more { margin-top: auto; padding-top: 1.2rem; }

.front-content .wp-block-columns { gap: 1.4rem; }
.front-content .wp-block-column { display: flex; }
.front-content .wp-block-column > * { width: 100%; }

/* Quatre crédits (RS&DE, CDAE-IA, CRIC, multimédia) : une seule rangée quand la
   place le permet, deux par deux en dessous, empilés sur mobile.

   Le moteur de mise en page de WordPress verrouille ces colonnes en flex avec
   `flex-wrap: nowrap` et `flex-basis: 0`, via des classes générées dont le nom
   change à chaque modification du contenu — inutile d'essayer de les surcharger
   une par une. On bascule la grille de colonnes en `grid`, ce qui neutralise
   d'un coup les propriétés flex et rend la répartition prévisible. */
.front-content .section-credits .wp-block-columns {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
	gap: 1.4rem;
}
.front-content .section-credits .wp-block-column {
	flex-basis: auto;
	max-width: none;
}

@media (max-width: 430px) {
	.front-content .section-credits .wp-block-columns {
		grid-template-columns: 1fr;
	}
}

/* Bloc « à propos » */
.about {
	display: grid;
	grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
	gap: clamp(1.75rem, 5vw, 3.5rem);
	align-items: start;
}
.about__portrait {
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow-md);
	background: var(--paper-3);
}
.about__portrait img { width: 100%; }
@media (max-width: 780px) {
	.about { grid-template-columns: 1fr; }
	.about__portrait { max-width: 260px; }
}

/* --- Bandeau d'appel ---------------------------------------------------- */

.cta-band {
	background:
		radial-gradient(700px 320px at 88% 120%, rgba(201, 138, 63, .3), transparent 60%),
		var(--ink-800);
	color: var(--text-invert);
	padding-block: clamp(2.75rem, 6vw, 4.25rem);
}
.cta-band__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1.75rem;
}
.cta-band__title { margin: 0 0 .35rem; color: #fff; font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.cta-band__lede { margin: 0; color: var(--text-invert-muted); max-width: 52ch; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: .85rem; }

/* --- Pied de page ------------------------------------------------------- */

.site-footer {
	background: var(--ink-900);
	color: var(--text-invert-muted);
	font-size: .95rem;
}
.site-footer__grid {
	display: grid;
	grid-template-columns: auto repeat(3, minmax(0, 1fr));
	gap: clamp(1.75rem, 4vw, 3rem);
	padding-block: clamp(2.5rem, 6vw, 4rem);
}
.site-footer__stamp { width: 132px; height: 132px; color: var(--amber-500); opacity: .9; }
.site-footer__title {
	margin: 0 0 .9rem;
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--amber-200);
	font-family: var(--font-body);
}
.site-footer__address { display: flex; flex-direction: column; gap: .3rem; font-style: normal; }
.site-footer a { color: var(--text-invert-muted); text-decoration: none; transition: color var(--speed); }
.site-footer a:hover { color: var(--amber-200); text-decoration: underline; }

.site-footer__menu { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .3rem; }
.site-footer__menu li { margin: 0; }

.site-footer__badges { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .3rem; }
.site-footer__badges li { margin: 0; }

.site-footer__legal {
	padding-block: 1.15rem;
	border-top: 1px solid var(--line-invert);
	font-size: .85rem;
}
.site-footer__legal p { margin: 0; }

@media (max-width: 900px) {
	.site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.site-footer__brand { grid-column: 1 / -1; }
	.site-footer__stamp { width: 104px; height: 104px; }
}
@media (max-width: 520px) {
	.site-footer__grid { grid-template-columns: 1fr; }
}

/* --- Formulaires (Contact Form 7) --------------------------------------- */

.searchform { display: flex; gap: .6rem; flex-wrap: wrap; }
.searchform__input { flex: 1 1 220px; }

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="number"],
select,
textarea {
	width: 100%;
	padding: .78rem 1rem;
	background: #fff;
	border: 1.5px solid var(--line);
	border-radius: 10px;
	font-family: inherit;
	font-size: 1rem;
	color: var(--text);
	transition: border-color var(--speed), box-shadow var(--speed);
}
input:focus, select:focus, textarea:focus {
	border-color: var(--amber-500);
	box-shadow: 0 0 0 3px rgba(201, 138, 63, .16);
	outline: none;
}
textarea { min-height: 150px; resize: vertical; }

.wpcf7-form label { display: block; margin-bottom: 1rem; font-weight: 500; color: var(--ink-700); }
.wpcf7-form label > span, .wpcf7-form label > input, .wpcf7-form label > textarea { font-weight: 400; margin-top: .35rem; }
.wpcf7-form input[type="submit"] {
	width: auto;
	padding: .9rem 1.9rem;
	background: var(--amber-600);
	border: 0;
	border-radius: 999px;
	color: #fff;
	font-weight: 600;
	font-size: 1rem;
	cursor: pointer;
	transition: background var(--speed);
}
.wpcf7-form input[type="submit"]:hover { background: var(--amber-700); }
.wpcf7-not-valid-tip { color: #b3261e; font-size: .88rem; }
.wpcf7-response-output {
	margin: 1.5rem 0 0 !important;
	padding: .9rem 1.1rem !important;
	border-width: 1.5px !important;
	border-radius: 10px !important;
}

/* Bloc coordonnées de la page contact */
.contact-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
	gap: clamp(2rem, 5vw, 3.5rem);
	align-items: start;
}
.contact-card {
	padding: 1.75rem;
	background: var(--ink-800);
	color: var(--text-invert);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-md);
}
.contact-card h2 { color: #fff; font-size: 1.3rem; margin-bottom: 1rem; }
.contact-card a { color: var(--amber-200); }
.contact-card address { font-style: normal; display: flex; flex-direction: column; gap: .45rem; }
@media (max-width: 820px) {
	.contact-grid { grid-template-columns: 1fr; }
}

/* --- Listes de cartes (archives) ---------------------------------------- */

.card-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.4rem; }
.card {
	padding: 1.6rem;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
}
.card__title { font-size: 1.2rem; margin-bottom: .5rem; }
.card__title a { color: var(--ink-800); text-decoration: none; }
.card__title a:hover { color: var(--amber-700); }
.card__excerpt { color: var(--text-muted); margin: 0; font-size: .96rem; }

/* --- Impression --------------------------------------------------------- */

@media print {
	.topbar, .site-header, .cta-band, .site-footer, .levels__switch, .skip-link { display: none !important; }
	body { background: #fff; font-size: 11pt; }
	.hero { background: none; color: #000; }
	.prose { max-width: none; }
	a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
