/*
 * MCT Contrôle — feuille principale.
 * Direction « Plaque & PV » : encre, bleu plaque, jaune signal ; Archivo variable
 * (largeur réduite pour les titres, normale pour le texte).
 */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
	--ink: #101b33;
	--ink-2: #1a2848;
	--ink-3: #2a3a60;
	--plate: #1d46c8;
	--plate-dark: #1537a3;
	--signal: #ffc21a;
	--signal-dark: #e5a800;
	--paper: #f4f6fa;
	--white: #fff;
	--line: #d8deea;
	--line-strong: #b7c1d6;
	--text: #18233d;
	--muted: #4f5d78;
	--on-ink: #e8ecf5;
	--on-ink-muted: #aab4ca;
	--ok: #1b7f48;
	--ok-bg: #e7f4ec;
	--major: #b45309;
	--major-bg: #fdf1e3;
	--critical: #c22a33;
	--critical-bg: #fbe9ea;

	--font: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--narrow: 78%;

	--fs-xs: .8125rem;
	--fs-s: .9375rem;
	--fs-m: 1.0625rem;
	--fs-l: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);
	--fs-xl: clamp(1.6rem, 1.3rem + 1.3vw, 2.25rem);
	--fs-2xl: clamp(2.1rem, 1.5rem + 2.8vw, 3.6rem);

	--r-s: 4px;
	--r-m: 8px;
	--r-l: 14px;
	--gutter: 16px;
	--max: 1180px;
	--header-h: 64px;
	--shadow: 0 1px 2px rgba(16, 27, 51, .06), 0 6px 20px rgba(16, 27, 51, .07);
	--focus: 0 0 0 3px var(--white), 0 0 0 6px var(--plate);
}

@media (min-width: 768px) {
	:root { --gutter: 32px; --header-h: 72px; }
}

/* ── Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--text);
	font-family: var(--font);
	font-size: var(--fs-m);
	line-height: 1.6;
	overflow-wrap: break-word;
	-webkit-font-smoothing: antialiased;
}

img, svg, video, iframe { max-width: 100%; }
img, video { height: auto; }
img { display: block; }

a { color: var(--plate); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--plate-dark); text-decoration-thickness: 2px; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--r-s); }

h1, h2, h3, h4, h5, h6 {
	margin: 1.6em 0 .5em;
	font-stretch: var(--narrow);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -.005em;
	color: var(--ink);
	text-wrap: balance;
}
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-l); }
h4 { font-size: var(--fs-m); }

p { margin: 0 0 1.1em; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	left: 12px; top: -100px;
	z-index: 1000;
	padding: 10px 16px;
	background: var(--signal);
	color: var(--ink);
	font-weight: 700;
	border-radius: var(--r-m);
}
.skip-link:focus { top: 12px; }

.wrap {
	width: 100%;
	max-width: calc(var(--max) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}
.wrap--text { max-width: calc(720px + 2 * var(--gutter)); }
.wrap--post { max-width: calc(1100px + 2 * var(--gutter)); }
.wrap--wide { max-width: calc(1180px + 2 * var(--gutter)); }

.site-main:focus { outline: none; }

/* ── Boutons ────────────────────────────────────────────── */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	min-height: 48px;
	padding: .7em 1.2em;
	border: 2px solid transparent;
	border-radius: var(--r-m);
	font: inherit;
	font-weight: 700;
	font-size: var(--fs-s);
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s, border-color .15s, color .15s;
}
.btn svg { width: 1.2em; height: 1.2em; flex: none; }
.btn--primary { background: var(--plate); color: var(--white); }
.btn--primary:hover { background: var(--plate-dark); color: var(--white); }
.btn--signal { background: var(--signal); color: var(--ink); }
.btn--signal:hover { background: var(--signal-dark); color: var(--ink); }
.btn--block { width: 100%; }

.icon-btn {
	display: inline-flex;
	align-items: center;
	gap: .45em;
	min-width: 44px;
	min-height: 44px;
	padding: 0 .6em;
	border: 0;
	border-radius: var(--r-m);
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: var(--fs-s);
	font-weight: 600;
	cursor: pointer;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: rgba(255, 255, 255, .08); }

.link-arrow {
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}
.link-arrow::after { content: ' ›'; }
.link-arrow:hover { text-decoration: underline; }

/* ── Icônes ─────────────────────────────────────────────── */
.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -.2em; }

/* ── Marque ─────────────────────────────────────────────── */
.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--white);
	text-decoration: none;
	flex: 0 1 auto;
	min-width: 0;
}
.brand:hover { color: var(--white); }
.brand__plate {
	display: inline-flex;
	height: 30px;
	border: 2px solid var(--white);
	border-radius: 5px;
	overflow: hidden;
	background: var(--white);
}
.brand__eu { width: 10px; background: var(--plate); }
.brand__ct {
	display: grid;
	place-items: center;
	padding: 0 6px;
	color: var(--ink);
	font-weight: 900;
	font-stretch: 75%;
	font-size: 17px;
	letter-spacing: .04em;
}
.brand__name {
	font-weight: 800;
	font-stretch: var(--narrow);
	font-size: 1.15rem;
	line-height: 1.05;
	letter-spacing: .005em;
}
.brand--custom img { max-height: 44px; width: auto; }

/* ── En-tête ────────────────────────────────────────────── */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--ink);
	color: var(--on-ink);
	transition: box-shadow .2s;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }

.site-header__bar {
	display: flex;
	align-items: center;
	gap: 16px;
	min-height: var(--header-h);
}
.site-header__actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.icon-btn__label { font-size: var(--fs-xs); }
@media (max-width: 359px) {
	.icon-btn__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* Navigation */
.nav__list, .nav__list ul { list-style: none; margin: 0; padding: 0; }
.nav a, .nav__parent {
	display: flex;
	align-items: center;
	gap: .35em;
	min-height: 44px;
	padding: 0 .75em;
	border: 0;
	border-radius: var(--r-m);
	background: none;
	color: var(--on-ink);
	font: inherit;
	font-size: var(--fs-s);
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}
.nav a:hover, .nav__parent:hover { background: rgba(255, 255, 255, .08); color: var(--white); }
.nav [aria-current="page"] { color: var(--white); box-shadow: inset 0 -3px 0 var(--signal); border-radius: 0; }
.nav__parent svg { width: 14px; height: 14px; transition: transform .15s; }
.nav__parent[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav li.has-toggle { display: flex; flex-wrap: wrap; align-items: center; }
.nav li.has-toggle > a { flex: 1 1 auto; }
.nav li.has-toggle > .sub-menu { flex-basis: 100%; }

/* Mobile : panneau déroulant */
@media (max-width: 1023.98px) {
	.nav {
		position: fixed;
		inset: var(--header-h) 0 0 0;
		z-index: 99;
		overflow-y: auto;
		padding: 16px var(--gutter) 32px;
		background: var(--ink);
		border-top: 1px solid var(--ink-3);
	}
	.admin-bar .nav { top: calc(var(--header-h) + 46px); }
	.js .nav:not(.is-open) { display: none; }
	.nav__list > li { border-bottom: 1px solid var(--ink-3); }
	.nav a, .nav__parent { width: 100%; min-height: 52px; padding: 0 4px; font-size: var(--fs-m); justify-content: space-between; }
	.nav .sub-menu { padding: 0 0 12px 12px; }
	.nav .sub-menu a { min-height: 44px; font-weight: 500; color: var(--on-ink-muted); }
	.js .nav .sub-menu[hidden] { display: none; }
	.nav__extra { margin-top: 24px; }
	.icon-btn--search { display: none; }
	html.nav-open { overflow: hidden; }
}
@media (min-width: 1024px) {
	.nav { display: flex; align-items: center; margin-left: auto; }
	.nav__list { display: flex; align-items: center; gap: 2px; }
	.nav__list > li { position: relative; }
	.nav .sub-menu {
		position: absolute;
		top: calc(100% + 8px);
		left: 0;
		min-width: 260px;
		padding: 8px;
		background: var(--white);
		border-radius: var(--r-l);
		box-shadow: 0 12px 40px rgba(16, 27, 51, .22);
	}
	.nav .sub-menu[hidden], html:not(.js) .nav .sub-menu { display: none; }
	html:not(.js) .nav li:is(:hover, :focus-within) > .sub-menu { display: block; }
	.nav__sub-toggle { min-width: 32px; padding: 0 6px !important; margin-left: -8px; }
	.nav .sub-menu a { color: var(--text); min-height: 44px; }
	.nav .sub-menu a:hover { background: var(--paper); color: var(--plate); }
	.nav__extra, .icon-btn--menu { display: none; }
	.site-header__actions { margin-left: 8px; }
}

/* Burger */
.burger { position: relative; width: 20px; height: 14px; }
.burger::before, .burger::after, .burger span {
	content: '';
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
	transition: transform .2s, opacity .2s;
}
.burger::before { top: 0; }
.burger span { top: 6px; }
.burger::after { bottom: 0; }
[aria-expanded="true"] .burger::before { transform: translateY(6px) rotate(45deg); }
[aria-expanded="true"] .burger span { opacity: 0; }
[aria-expanded="true"] .burger::after { transform: translateY(-6px) rotate(-45deg); }

/* ── Fenêtre de recherche ──────────────────────────────── */
.search-dialog {
	width: min(640px, calc(100% - 24px));
	max-height: calc(100% - 48px);
	margin: 8vh auto auto;
	padding: 0;
	border: 0;
	border-radius: var(--r-l);
	background: var(--white);
	color: var(--text);
	box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}
.search-dialog::backdrop { background: rgba(10, 17, 33, .7); }
.search-dialog__inner { padding: 20px 20px 28px; }
.search-dialog__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.search-dialog__title { margin: 0; font-size: var(--fs-l); font-weight: 800; font-stretch: var(--narrow); color: var(--ink); }
.search-dialog__head .icon-btn:hover { background: var(--paper); }
.search-dialog__kicker { margin: 20px 0 8px; font-weight: 700; font-size: var(--fs-s); color: var(--muted); }

/* ── Plaque de recherche (élément signature) ───────────── */
.plate { position: relative; max-width: 640px; }
.plate__label { display: block; margin-bottom: 8px; font-weight: 700; font-size: var(--fs-s); }
.plate__row { display: flex; flex-wrap: wrap; gap: 10px; }
.plate__body {
	flex: 1 1 300px;
	display: flex;
	align-items: stretch;
	min-width: 0;
	height: 60px;
	background: var(--white);
	border: 3px solid var(--ink);
	border-radius: 9px;
	overflow: hidden;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6);
}
.plate__body:focus-within { box-shadow: 0 0 0 3px var(--signal); }
.plate__band {
	flex: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 40px;
	background: var(--plate);
	color: var(--white);
	font-weight: 800;
	font-size: 15px;
	line-height: 1;
}
.plate__stars { width: 20px; height: 20px; margin-bottom: 3px; color: var(--signal); }
.plate__dep {
	font-size: 16px;
	font-stretch: 75%;
	letter-spacing: .02em;
	transition: transform .18s;
}
.plate__dep:empty::before { content: ''; display: block; width: 18px; height: 3px; background: rgba(255, 255, 255, .45); border-radius: 2px; }
.plate__input {
	flex: 1;
	width: 100%;
	min-width: 0;
	padding: 0 14px;
	border: 0;
	background: transparent;
	color: var(--ink);
	font: inherit;
	font-size: 1.3rem;
	font-weight: 800;
	font-stretch: 85%;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.plate__input::placeholder { color: #8e99b0; font-weight: 600; text-transform: none; letter-spacing: 0; }
.plate__input:focus { outline: none; box-shadow: none; }
.plate__submit { flex: 1 1 auto; min-height: 60px; font-size: var(--fs-m); }
@media (min-width: 560px) { .plate__submit { flex: 0 0 auto; } }

.plate__list {
	position: absolute;
	z-index: 20;
	left: 0; right: 0;
	margin: 6px 0 0;
	padding: 6px;
	list-style: none;
	max-height: 320px;
	overflow-y: auto;
	background: var(--white);
	color: var(--text);
	border: 1px solid var(--line);
	border-radius: var(--r-l);
	box-shadow: 0 16px 40px rgba(16, 27, 51, .2);
}
.plate__option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 44px;
	padding: 8px 12px;
	border-radius: var(--r-m);
	cursor: pointer;
}
.plate__option[aria-selected="true"], .plate__option:hover { background: var(--paper); }
.plate__option[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--plate); }
.plate__option-name { font-weight: 700; }
.plate__option-cp { color: var(--muted); font-size: var(--fs-s); font-variant-numeric: tabular-nums; }
.plate__status { margin: 8px 0 0; font-size: var(--fs-s); min-height: 1.4em; }
.plate__status:empty { min-height: 0; margin: 0; }

.plate--hero .plate__label { color: var(--on-ink); }
.plate--hero .plate__body { height: 68px; border-color: var(--white); }
.plate--hero .plate__submit { min-height: 68px; }
.plate--hero .plate__input { font-size: clamp(1.25rem, 1rem + 1vw, 1.6rem); }
.plate--hero .plate__status { color: var(--on-ink); }

/* ── Accueil : hero ────────────────────────────────────── */
.hero {
	position: relative;
	background: var(--ink);
	color: var(--on-ink);
	padding: 40px 0 56px;
	overflow: hidden;
}
.hero::after { /* route : pointillé jaune en bas du hero */
	content: '';
	position: absolute;
	left: 0; right: 0; bottom: 18px;
	height: 4px;
	background: repeating-linear-gradient(90deg, var(--signal) 0 36px, transparent 36px 64px);
	opacity: .9;
}
.hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; align-items: center; }
@media (min-width: 1024px) {
	.hero { padding: 72px 0 96px; }
	.hero__grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 56px; }
}
.hero__title {
	margin: 0 0 16px;
	max-width: 17ch;
	color: var(--white);
	font-size: clamp(2.2rem, 1.4rem + 3.6vw, 4.1rem);
	font-weight: 900;
	font-stretch: 70%;
	line-height: 1;
	letter-spacing: -.01em;
}
.hero__lead { max-width: 56ch; margin-bottom: 28px; color: var(--on-ink-muted); font-size: var(--fs-m); }
.hero__links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 20px 0 0; font-size: var(--fs-s); }
.hero__links a { color: var(--white); font-weight: 600; }
.hero__links a:hover { color: var(--signal); }

/* Carte « procès-verbal » */
.pv {
	position: relative;
	background: var(--white);
	color: var(--text);
	border-radius: var(--r-l);
	padding: 22px 20px 12px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
@media (min-width: 1024px) { .pv { transform: rotate(1.2deg); } }
.pv__head {
	margin: 0 0 8px;
	padding-bottom: 12px;
	border-bottom: 2px dashed var(--line-strong);
	font-weight: 800;
	font-stretch: var(--narrow);
	font-size: var(--fs-l);
	color: var(--ink);
	line-height: 1.15;
}
.pv__list { list-style: none; margin: 0; padding: 0; }
.pv__row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.pv__row:last-child { border-bottom: 0; }
.pv__icon { width: 32px; height: 32px; padding: 6px; border-radius: 50%; flex: none; }
.pv__row--ok .pv__icon { background: var(--ok-bg); color: var(--ok); }
.pv__row--major .pv__icon { background: var(--major-bg); color: var(--major); }
.pv__row--critical .pv__icon { background: var(--critical-bg); color: var(--critical); }
.pv__name { margin: 0 0 2px; font-weight: 800; }
.pv__row--ok .pv__name { color: var(--ok); }
.pv__row--major .pv__name { color: var(--major); }
.pv__row--critical .pv__name { color: var(--critical); }
.pv__text { margin: 0; font-size: var(--fs-s); color: var(--muted); line-height: 1.45; }

/* ── Sections de l'accueil ─────────────────────────────── */
.steps, .tools, .latest, .home-regions, .home-content, .related { padding: 56px 0; }
.section-title { margin: 0 0 24px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 24px; }
.section-head .section-title { margin: 0; }

.steps { background: var(--white); border-bottom: 1px solid var(--line); }
.steps__list { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 768px) { .steps__list { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.steps__list li { counter-increment: step; position: relative; padding-left: 56px; color: var(--muted); }
.steps__list li::before {
	content: counter(step);
	position: absolute;
	left: 0; top: -2px;
	display: grid;
	place-items: center;
	width: 40px; height: 40px;
	border: 2px solid var(--ink);
	border-radius: 50%;
	font-weight: 900;
	font-stretch: 75%;
	font-size: 1.2rem;
	color: var(--ink);
}
.steps__list strong { display: block; color: var(--ink); font-size: var(--fs-m); }

.tools__grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 768px) { .tools__grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.tool {
	position: relative;
	padding: 24px;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--r-l);
	transition: border-color .15s;
}
.tool:hover { border-color: var(--plate); }
.tool:focus-within { box-shadow: var(--focus); }
.tool__icon { width: 40px; height: 40px; color: var(--plate); margin-bottom: 12px; }
.tool__title { margin: 0 0 6px; font-size: var(--fs-l); }
.tool__link { color: var(--ink); text-decoration: none; }
.tool__link::after { content: ''; position: absolute; inset: 0; border-radius: var(--r-l); }
.tool__link:focus-visible { box-shadow: none; }
.tool__text { margin: 0; color: var(--muted); font-size: var(--fs-s); }

.home-regions { background: var(--white); border-block: 1px solid var(--line); }

/* ── Cartes d'articles ─────────────────────────────────── */
.cards { display: grid; gap: 24px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: var(--r-l);
	overflow: hidden;
}
.card:hover .card__title a { color: var(--plate); }
.card:focus-within { box-shadow: var(--focus); }
.card__media { aspect-ratio: 16 / 10; background: var(--ink-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__placeholder { display: grid; place-items: center; height: 100%; color: var(--on-ink-muted); }
.card__placeholder svg { width: 48px; height: 48px; }
.card__body { display: flex; flex-direction: column; flex: 1; padding: 18px 20px 20px; }
.card__cat { margin: 0 0 6px; font-size: var(--fs-xs); font-weight: 700; color: var(--plate); }
.card__title { margin: 0 0 8px; font-size: var(--fs-l); line-height: 1.2; }
.card__link { color: var(--ink); text-decoration: none; }
.card__link::after { content: ''; position: absolute; inset: 0; }
.card__link:focus-visible { box-shadow: none; }
.card__excerpt { color: var(--muted); font-size: var(--fs-s); }
.card__meta { display: flex; gap: 16px; margin: auto 0 0; font-size: var(--fs-xs); color: var(--muted); }

/* ── En-têtes de pages ─────────────────────────────────── */
.page-head { padding: 28px 0 32px; background: var(--white); border-bottom: 1px solid var(--line); }
.page-head__title { margin: 12px 0 8px; max-width: 26ch; }
.page-head__kicker { margin: 12px 0 0; font-weight: 700; color: var(--plate); }
.page-head__lead { max-width: 65ch; color: var(--muted); font-size: var(--fs-m); }
.page-head__lead p:last-child { margin-bottom: 0; }
.page-head__meta { margin-top: 8px; color: var(--muted); font-weight: 600; }
.page-head__search { margin-top: 20px; max-width: 560px; }

.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0; padding: 0; list-style: none; font-size: var(--fs-xs); color: var(--muted); }
.crumbs li + li::before { content: '/'; margin: 0 8px; color: var(--line-strong); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--plate); }
.crumbs [aria-current] { color: var(--text); font-weight: 600; }

.list-wrap { padding-block: 40px 64px; }
.empty { padding: 32px; background: var(--white); border: 1px dashed var(--line-strong); border-radius: var(--r-l); }

/* ── Contenu éditorial ─────────────────────────────────── */
.entry-content { padding-block: 32px 56px; }
.entry-content > :first-child { margin-top: 0; }
.entry-content h2 { margin-top: 1.8em; padding-top: .2em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .35em; }
.entry-content li::marker { color: var(--plate); font-weight: 700; }
.entry-content blockquote {
	margin: 1.6em 0;
	padding: 16px 20px;
	border-left: 4px solid var(--signal);
	background: var(--white);
	border-radius: 0 var(--r-m) var(--r-m) 0;
}
.entry-content blockquote p:last-child { margin: 0; }
.entry-content img { border-radius: var(--r-m); }
.entry-content figure { margin: 1.6em 0; }
.entry-content figcaption { margin-top: 8px; font-size: var(--fs-xs); color: var(--muted); }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: var(--fs-s); background: var(--white); }
.entry-content th, .entry-content td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry-content th { background: var(--paper); color: var(--ink); font-weight: 700; }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.entry-content iframe { max-width: 100%; }
.entry-content .alignwide { max-width: none; }
.entry-content .aligncenter { margin-inline: auto; }
@media (min-width: 640px) {
	.entry-content .alignleft { float: left; margin: .3em 1.5em 1em 0; max-width: 50%; }
	.entry-content .alignright { float: right; margin: .3em 0 1em 1.5em; max-width: 50%; }
}
.entry-content .wp-block-button__link { border-radius: var(--r-m); background: var(--plate); color: var(--white); font-weight: 700; text-decoration: none; }
.entry-content .wp-block-button__link:hover { background: var(--plate-dark); }
.entry-content details { margin: 12px 0; padding: 12px 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-m); }
.entry-content summary { font-weight: 700; cursor: pointer; }

/* ── Article ───────────────────────────────────────────── */
.reading-progress { position: fixed; top: 0; left: 0; right: 0; z-index: 101; height: 3px; pointer-events: none; }
.reading-progress span { display: block; height: 100%; width: 100%; background: var(--signal); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.admin-bar .reading-progress { top: 32px; }

.post-head { padding: 28px 0 8px; background: var(--white); border-bottom: 1px solid var(--line); }
.post-head__cat { margin: 16px 0 0; font-weight: 700; font-size: var(--fs-s); }
.post-head__cat a { text-decoration: none; }
.post-head__title { margin: 8px 0 16px; max-width: 24ch; font-size: clamp(2rem, 1.4rem + 2.6vw, 3.3rem); font-weight: 900; font-stretch: 72%; line-height: 1.02; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin: 0 0 24px; color: var(--muted); font-size: var(--fs-s); }
.meta__item { display: inline-flex; align-items: center; gap: 6px; }
.meta__item--updated { display: inline; }
.meta__item svg { width: 18px; height: 18px; color: var(--plate); }
.post-head__media { margin: 0 auto; padding-bottom: 24px; }
.post-head__media img { width: 100%; border-radius: var(--r-l); aspect-ratio: 2 / 1; object-fit: cover; }

.post-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 56px; }
.post-body { max-width: 720px; min-width: 0; font-size: 1.125rem; line-height: 1.7; }
@media (min-width: 1100px) {
	.post-layout:has(> .toc:not([hidden])) { grid-template-columns: 240px minmax(0, 720px); }
	.toc { position: sticky; top: calc(var(--header-h) + 32px); align-self: start; margin-top: 32px; }
}
.toc { margin: 24px 0 0; padding: 16px 20px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-l); }
.toc__title { margin: 0 0 8px; font-weight: 800; font-stretch: var(--narrow); font-size: var(--fs-m); color: var(--ink); }
.toc__list { margin: 0; padding: 0; list-style: none; font-size: var(--fs-s); line-height: 1.35; }
.toc__list a { display: block; padding: 6px 0 6px 12px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; }
.toc__list a:hover { color: var(--plate); }
.toc__list a[aria-current="true"] { border-left-color: var(--plate); color: var(--ink); font-weight: 700; }
@media (min-width: 1100px) { .toc { max-height: calc(100vh - var(--header-h) - 64px); overflow-y: auto; } }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0 0; padding: 0; list-style: none; }
.tags a { display: inline-block; padding: 4px 12px; background: var(--white); border: 1px solid var(--line); border-radius: 99px; font-size: var(--fs-xs); text-decoration: none; }

.author-box { display: flex; gap: 16px; margin: 40px 0 0; padding: 20px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-l); font-size: var(--fs-s); }
.author-box__avatar { border-radius: 50%; flex: none; }
.author-box__name { margin: 0 0 4px; font-weight: 800; color: var(--ink); }
.author-box__bio { margin: 0; color: var(--muted); }

.cta-plate { margin: 40px 0 0; padding: 24px; background: var(--ink); color: var(--on-ink); border-radius: var(--r-l); }
.cta-plate__title { margin: 0 0 12px; color: var(--white); font-weight: 800; font-stretch: var(--narrow); font-size: var(--fs-l); line-height: 1.15; }
.cta-plate .plate__label, .cta-plate .plate__status { color: var(--on-ink); }
.cta-plate .plate__body { border-color: var(--white); }

.related { background: var(--white); border-top: 1px solid var(--line); }

/* ── Pages prix-ct (communes, centres, départements…) ─── */
.ct-hero { background: var(--ink); color: var(--white); padding: 28px 0 32px; }
.ct-hero__title { margin: 0; max-width: 28ch; color: var(--white); font-weight: 900; font-stretch: 72%; }
.ct-hero:not(:has(h1)) { display: none; }
.entry-content--ct { padding-top: 24px; }

/*
 * Re-skin du plugin par ses variables : aucune règle du plugin n'est réécrite,
 * seules ses couleurs, rayons et ombres suivent la charte du thème.
 */
.plugin-controle-technique {
	--ct-orange: var(--plate);
	--ct-orange-dark: var(--plate-dark);
	--ct-orange-soft: rgba(29, 70, 200, .1);
	--ct-glow: 0 0 0 3px rgba(29, 70, 200, .18);
	--ct-night-900: var(--ink);
	--ct-night-800: var(--ink-2);
	--ct-night-700: var(--ink-3);
	--ct-night-600: #3a4c74;
	--ct-steel-100: var(--paper);
	--ct-steel-200: var(--line);
	--ct-steel-300: var(--line-strong);
	--ct-text: var(--text);
	--ct-text-light: var(--muted);
	--ct-green: var(--ok);
	--ct-red: var(--critical);
	--ct-radius-sm: var(--r-s);
	--ct-radius-md: var(--r-m);
	--ct-radius-lg: var(--r-l);
	--ct-radius-xl: var(--r-l);
	--ct-shadow-sm: 0 1px 2px rgba(16, 27, 51, .06);
	--ct-shadow-md: var(--shadow);
	--ct-shadow-lg: 0 16px 40px rgba(16, 27, 51, .14);
}
/* Typographie du thème dans les blocs du plugin (l'id l'emporte sur ses sélecteurs). */
#main .plugin-controle-technique,
#main .plugin-controle-technique :is(h1, h2, h3, h4, h5, p, a, li, span, label, button, input, select, td, th, strong, small, div) {
	font-family: var(--font);
}
#main .plugin-controle-technique :is(h1, h2, h3, h4) {
	text-transform: none;
	letter-spacing: -.005em;
	font-weight: 800;
	font-stretch: var(--narrow);
}
/* Bloc régions de l'accueil (rendu par le plugin hors de son conteneur) */
#main .ct-home-regions { margin: 0; padding: 0; background: none; border-radius: 0; box-shadow: none; overflow: visible; }
#main .ct-home-regions::before { content: none; }
#main .ct-home-regions h2 { margin: 0 0 12px; font-family: var(--font); font-size: var(--fs-xl); font-weight: 800; font-stretch: var(--narrow); text-transform: none; letter-spacing: -.005em; color: var(--ink); }
#main .ct-home-regions > p { max-width: 70ch; margin: 0 0 24px; color: var(--muted); font-size: var(--fs-m); }
#main .ct-home-regions > p a { color: var(--plate); border: 0; text-decoration: underline; }
#main .ct-home-regions-grid a::after { content: '›'; color: var(--plate); font-weight: 700; }
#main .ct-home-regions-grid { list-style: none; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
#main .ct-home-regions-grid a {
	display: flex;
	align-items: center;
	min-height: 48px;
	padding: 8px 14px;
	border: 1px solid var(--line);
	border-radius: var(--r-m);
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font);
	font-weight: 600;
	text-decoration: none;
	justify-content: space-between;
	box-shadow: none;
	transform: none;
}
#main .ct-home-regions-grid a:hover { border-color: var(--plate); color: var(--plate); background: var(--white); }

/* Grilles des simulateurs (plugin greenlog-sim-ct) : colonnes compressibles. */
#main .scv-grid > * { min-width: 0; }

/* Contrastes AA des simulateurs et du hub (gris des plugins trop clairs) */
#main :is(.scv-lead, .scv-section-lead, .scv-defect-detail, .sct-step-ind:not(.active), #resultats-placeholder > p) { color: var(--muted); }
#main .plugin-controle-technique .ct-placeholder { opacity: 1; }
#main .scv-sev-critical.scv-severity { color: var(--critical); background: var(--critical-bg); }
#main .scv-sev-medium.scv-severity { color: #92400e; background: var(--major-bg); }
#main .scv-sev-low.scv-severity { color: var(--muted); }

/* ── Formulaires ───────────────────────────────────────── */
input[type="text"], input[type="search"], input[type="email"], input[type="url"], input[type="tel"], input[type="number"], input[type="password"], textarea, select {
	max-width: 100%;
	min-height: 48px;
	padding: 10px 12px;
	border: 1px solid var(--line-strong);
	border-radius: var(--r-m);
	background: var(--white);
	color: var(--text);
	font: inherit;
	font-size: 1rem;
}
textarea { width: 100%; }
input:focus-visible, textarea:focus-visible, select:focus-visible { border-color: var(--plate); }
label { font-weight: 600; }

.searchform { display: flex; gap: 8px; }
.searchform__input { flex: 1; min-width: 0; }
@media (max-width: 479.98px) { .searchform__submit span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); } }

.comments { padding-top: 32px; border-top: 1px solid var(--line); margin-top: 40px; }
.comments__list { padding-left: 0; list-style: none; }
.comments__list .comment-body { padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment-form p { margin-bottom: 16px; }
.comment-form label { display: block; margin-bottom: 4px; }
.comment-form input:not([type="checkbox"]):not([type="submit"]) { width: 100%; }
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: start; }
.comment-form-cookies-consent label { font-weight: 400; }

/* Pagination */
.pager { margin-top: 40px; }
.pager .nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pager .page-numbers {
	display: inline-grid;
	place-items: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid var(--line);
	border-radius: var(--r-m);
	background: var(--white);
	color: var(--ink);
	font-weight: 700;
	text-decoration: none;
}
.pager .page-numbers:hover { border-color: var(--plate); color: var(--plate); }
.pager .page-numbers.current { background: var(--ink); border-color: var(--ink); color: var(--white); }
.pager .dots { border: 0; background: none; }

/* ── 404 ───────────────────────────────────────────────── */
.e404 { padding: 56px 0 80px; }
.e404__stamp {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 16px;
	padding: 6px 14px;
	border: 3px solid var(--critical);
	border-radius: var(--r-m);
	color: var(--critical);
	font-weight: 900;
	font-stretch: 75%;
	font-size: 1.4rem;
	transform: rotate(-3deg);
}
.e404__stamp svg { width: 24px; height: 24px; }
.e404__title { margin: 0 0 12px; }
.e404__lead { color: var(--muted); margin-bottom: 28px; }
.e404__alt { margin: 32px 0 8px; font-weight: 700; }
.e404__home { margin-top: 32px; }

/* ── Pied de page ──────────────────────────────────────── */
.site-footer { background: var(--ink); color: var(--on-ink-muted); font-size: var(--fs-s); }
.site-footer a { color: var(--on-ink); text-decoration: none; }
.site-footer a:hover { color: var(--signal); text-decoration: underline; }
.site-footer__grid { display: grid; gap: 40px; padding-block: 56px 40px; }
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .site-footer__grid { grid-template-columns: 1.1fr 1.6fr 1fr; } }
.site-footer__disclaimer { margin: 16px 0 0; max-width: 42ch; line-height: 1.55; }
.site-footer__title { margin: 0 0 12px; color: var(--white); font-size: var(--fs-m); }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer__regions { columns: 2; column-gap: 24px; }
.site-footer__regions li, .site-footer__list li { break-inside: avoid; }
.site-footer__regions a, .site-footer__list a { display: inline-block; padding: 5px 0; }
.site-footer__bottom { border-top: 1px solid var(--ink-3); }
.site-footer__bottom-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 20px; }
.site-footer__bottom p { margin: 0; }
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer .widget-title, .site-footer .widget h2 { color: var(--white); font-size: var(--fs-m); margin-top: 0; }

/* ── Mouvement réduit ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
	.reading-progress { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
	html { scroll-behavior: smooth; }
	.plate__dep.is-new { animation: dep-in .25s ease-out; }
	@keyframes dep-in { from { transform: translateY(6px); opacity: 0; } }
}

/* ── Impression ────────────────────────────────────────── */
@media print {
	.site-header, .site-footer, .toc, .reading-progress, .cta-plate, .related, .search-dialog, .skip-link { display: none !important; }
	body { background: #fff; }
}
