/* =========================================================================
   Intermag 2 – feuille de style
   ========================================================================= */

:root {
	--im-ink: var(--wp--preset--color--ink);
	--im-muted: var(--wp--preset--color--muted);
	--im-line: var(--wp--preset--color--line);
	--im-paper: var(--wp--preset--color--paper);
	--im-paper-2: var(--wp--preset--color--paper-2);
	--im-primary: var(--wp--preset--color--primary);
	--im-primary-dark: var(--wp--preset--color--primary-dark);
	--im-secondary: var(--wp--preset--color--secondary);
	--im-accent: var(--wp--preset--color--accent);
	--im-night: var(--wp--preset--color--night);
	--im-sand: #d9c3a5;
	--im-radius: 14px;
	--im-shadow: 0 1px 2px rgba(28, 42, 49, .06), 0 10px 30px -14px rgba(28, 42, 49, .22);
	--im-topbar-h: 0px;
	--field: var(--im-primary);
}

/* Couleurs des champs d'analyse (cartes, rubriques, articles). */
.category-educatif, .im-field--educatif { --field: #496854; }
.category-culturel, .im-field--culturel { --field: #815735; }
.category-associatif-institutions, .im-field--associatif-institutions { --field: #2f6474; }
.category-socioeconomique, .im-field--socioeconomique { --field: #9f0038; }
.category-mediatique, .im-field--mediatique { --field: #85651a; }
.category-politique, .im-field--politique { --field: #233d49; }
.category-les-carnets, .im-field--les-carnets { --field: #5b7a50; }

/* ---------- Base ---------- */
html { scroll-padding-top: 110px; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body.im-menu-open { overflow: hidden; }
.wp-site-blocks > * { margin-block-start: 0; }
.im-main > * { margin-block: 0; }
:where(a) { text-underline-offset: .18em; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--im-accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: #e9dcc6; }
img { height: auto; }
.screen-reader-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important; }

.im-eyebrow {
	display: flex; align-items: center; gap: .6rem;
	font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--im-secondary);
	margin: 0 0 1rem;
}
.im-eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--im-accent); }
.im-lead { font-size: var(--wp--preset--font-size--large); color: var(--im-muted); line-height: 1.55; }

/* Boutons */
.wp-element-button, .wp-block-button__link { transition: background-color .15s ease, color .15s ease, border-color .15s ease; text-decoration: none; }
.wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: var(--im-ink); border: 1.5px solid currentColor; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--im-ink); color: #fff; border-color: var(--im-ink); }
.im-buttons { gap: .6rem; margin-top: 1.75rem; }

/* =========================================================================
   En-tête
   ========================================================================= */
.im-header {
	position: sticky; z-index: 100;
	top: calc(var(--wp-admin--admin-bar--height, 0px) - var(--im-topbar-h));
	background: #fff;
}
@media (max-width: 600px) { .admin-bar .im-header { top: calc(-1 * var(--im-topbar-h)); } }
.im-header > * { margin-block: 0 !important; }

.im-topbar { background: var(--im-night); color: rgba(255, 255, 255, .78); font-size: .8125rem; }
.im-topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: var(--im-topbar-h); }
.im-topbar a { color: #fff; text-decoration: none; }
.im-topbar a:hover { color: var(--im-sand); }
.im-topbar__links { display: flex; gap: 1.4rem; }
@media (max-width: 640px) { .im-topbar__inner > span:first-child { display: none; } .im-topbar__links { margin-left: auto; } }

.im-header__main { border-bottom: 1px solid var(--im-line); transition: box-shadow .2s ease; }
.im-header.is-scrolled .im-header__main { box-shadow: 0 6px 20px -12px rgba(28, 42, 49, .35); }
.im-header__bar { min-height: 78px; gap: 1.5rem; }

.im-brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; color: var(--im-ink); flex-shrink: 0; position: relative; z-index: 3; }
.im-brand__rta {
	display: block; width: 84px; height: 34px; background: var(--im-secondary);
	-webkit-mask: url(/images/stories/logos/LogoRTA_trans_blanc.png) left center / contain no-repeat;
	        mask: url(/images/stories/logos/LogoRTA_trans_blanc.png) left center / contain no-repeat;
}
.im-brand__text { display: flex; flex-direction: column; line-height: 1; border-left: 1px solid var(--im-line); padding-left: .85rem; }
.im-brand__name { font-family: var(--wp--preset--font-family--serif); font-weight: 600; font-size: 1.85rem; letter-spacing: -.02em; }
.im-brand__tag { font-size: .66rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--im-primary); margin-top: .35rem; }
.im-brand:hover .im-brand__name { color: var(--im-primary-dark); }
@media (max-width: 480px) {
	.im-brand__rta { width: 62px; height: 26px; }
	.im-brand__name { font-size: 1.5rem; }
	.im-brand__tag { display: none; }
}

/* Navigation */
.im-navwrap { display: flex; align-items: center; gap: .25rem; }
.im-menu { list-style: none; margin: 0; padding: 0; }
.im-menu a { text-decoration: none; }
.im-iconbtn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	min-width: 44px; height: 44px; padding: 0 .6rem; border: 0; border-radius: 999px;
	background: transparent; color: var(--im-ink); cursor: pointer; font: inherit; font-weight: 600; font-size: .9375rem;
	position: relative; z-index: 3;
}
.im-iconbtn:hover { background: var(--im-paper); }
.im-sub-toggle { border: 0; background: transparent; color: inherit; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.im-sub-toggle svg { transition: transform .2s ease; }
.im-menu__item.is-open > .im-sub-toggle svg { transform: rotate(180deg); }
.im-sub { list-style: none; margin: 0; padding: 0; }
.im-nav__search { display: none; }

.im-burger { position: relative; width: 20px; height: 14px; display: inline-block; }
.im-burger::before, .im-burger::after, .im-burger span { content: ""; position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s ease, opacity .2s ease, top .2s ease; }
.im-burger::before { top: 0; }
.im-burger span { top: 6px; }
.im-burger::after { top: 12px; }
.im-nav-toggle[aria-expanded="true"] .im-burger::before { top: 6px; transform: rotate(45deg); }
.im-nav-toggle[aria-expanded="true"] .im-burger::after { top: 6px; transform: rotate(-45deg); }
.im-nav-toggle[aria-expanded="true"] .im-burger span { opacity: 0; }

/* -- Bureau -- */
@media (min-width: 1080px) {
	.im-nav-toggle { display: none; }
	.im-menu { display: flex; align-items: center; gap: .15rem; }
	.im-menu__item { position: relative; display: flex; align-items: center; }
	.im-menu__link {
		display: block; padding: .6rem .7rem; border-radius: 8px;
		color: var(--im-ink); font-weight: 600; font-size: .9375rem; letter-spacing: -.005em; position: relative;
	}
	.im-menu__item.has-sub > .im-menu__link { padding-right: .3rem; }
	.im-menu__link:hover, .im-menu__item:hover > .im-menu__link { color: var(--im-primary-dark); }
	.im-menu__item.is-current > .im-menu__link::after {
		content: ""; position: absolute; left: .7rem; right: .7rem; bottom: .15rem; height: 2px; border-radius: 2px; background: var(--im-primary);
	}
	.im-menu__item.has-sub.is-current > .im-menu__link::after { right: .3rem; }
	.im-sub-toggle { width: 22px; height: 32px; margin-right: .3rem; color: var(--im-muted); border-radius: 6px; }
	.im-sub-toggle:hover { color: var(--im-ink); }
	.im-sub {
		position: absolute; top: 100%; left: 0; min-width: 270px; padding: .5rem;
		background: #fff; border: 1px solid var(--im-line); border-radius: 12px; box-shadow: var(--im-shadow);
		opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .15s ease, transform .15s ease, visibility 0s linear .15s;
		z-index: 10;
	}
	.im-sub::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
	.im-menu__item:hover > .im-sub,
	.im-menu__item:focus-within > .im-sub,
	.im-menu__item.is-open > .im-sub { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
	.im-sub a { display: block; padding: .55rem .8rem; border-radius: 8px; color: var(--im-ink); font-size: .9375rem; font-weight: 500; }
	.im-sub a:hover, .im-sub a[aria-current="page"] { background: var(--im-paper); color: var(--im-primary-dark); }
	.im-search-toggle { margin-left: .35rem; border: 1px solid var(--im-line); }
}

/* -- Mobile / tablette : panneau plein écran -- */
@media (max-width: 1079.98px) {
	.im-nav__panel {
		position: fixed; inset: 0; z-index: 2;
		padding: calc(var(--wp-admin--admin-bar--height, 0px) + 100px) clamp(1rem, 5vw, 2rem) 2.5rem;
		background: #fff; overflow-y: auto; overscroll-behavior: contain;
		opacity: 0; visibility: hidden; transform: translateY(-8px);
		transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
	}
	.im-menu-open .im-nav__panel { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
	.im-menu { max-width: 640px; margin: 0 auto; }
	.im-menu__item { display: flex; flex-wrap: wrap; align-items: center; border-bottom: 1px solid var(--im-line); }
	.im-menu__link { flex: 1; padding: 1rem 0; color: var(--im-ink); font-size: 1.1875rem; font-weight: 600; }
	.im-menu__item.is-current > .im-menu__link { color: var(--im-primary-dark); }
	.im-sub-toggle { width: 48px; height: 48px; border-radius: 10px; background: var(--im-paper); }
	.im-sub { display: none; flex-basis: 100%; padding: 0 0 .9rem .9rem; border-left: 2px solid var(--im-line); margin-bottom: .9rem; }
	.im-menu__item.is-open > .im-sub { display: block; }
	.im-sub a { display: block; padding: .55rem 0; color: var(--im-muted); font-weight: 500; }
	.im-sub a[aria-current="page"], .im-sub a:hover { color: var(--im-primary-dark); }
	.im-nav-toggle { border: 1px solid var(--im-line); padding: 0 .9rem 0 .8rem; }
	.im-menu-open .im-search-toggle { visibility: hidden; }
}
@media (max-width: 420px) { .im-nav-toggle__label { display: none; } .im-nav-toggle { padding: 0 .6rem; } }

/* Barre de recherche déroulante */
.im-searchbar {
	position: absolute; left: 0; right: 0; top: 100%;
	background: #fff; border-bottom: 1px solid var(--im-line); box-shadow: var(--im-shadow);
	padding: 1.1rem clamp(1rem, 4vw, 2rem);
}
.im-searchbar[hidden] { display: none; }
.im-searchbar__inner { max-width: 820px; margin: 0 auto; display: flex; gap: .5rem; align-items: center; }
.im-searchbar .im-searchform { flex: 1; }

.im-searchform { display: flex; align-items: center; gap: .25rem; background: #fff; border: 1.5px solid var(--im-line); border-radius: 999px; padding: 4px; transition: border-color .15s ease; }
.im-searchform:focus-within { border-color: var(--im-primary); }
.im-searchform input { flex: 1; min-width: 0; border: 0; background: transparent; padding: .65rem 1rem; font: inherit; font-size: 1rem; color: var(--im-ink); outline: none; }
.im-searchform button {
	display: inline-flex; align-items: center; gap: .45rem; border: 0; border-radius: 999px; cursor: pointer;
	background: var(--im-primary); color: #fff; padding: .7rem 1.15rem; font: inherit; font-weight: 600; font-size: .9375rem;
}
.im-searchform button:hover { background: var(--im-primary-dark); }
@media (max-width: 560px) { .im-searchform button span { display: none; } .im-searchform button { padding: .7rem; } }

/* =========================================================================
   Étiquettes, cartes, listes
   ========================================================================= */
.im-kicker { font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; line-height: 1.3; margin: 0 0 .7rem; }
.im-kicker a { color: var(--field); text-decoration: none; display: inline-flex; align-items: center; gap: .45rem; position: relative; z-index: 1; }
.im-kicker a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.im-kicker a:hover { text-decoration: underline; }
.im-kicker a ~ a, .im-kicker .wp-block-post-terms__separator { display: none; }

.im-authors { font-size: .8125rem; font-weight: 600; color: var(--im-ink); }
.im-authors a { color: inherit; text-decoration: none; position: relative; z-index: 1; }
.im-authors a:hover { color: var(--im-primary-dark); text-decoration: underline; }
.im-authors .wp-block-post-terms__prefix { font-weight: 400; color: var(--im-muted); }

/* Cartes */
.im-cards { list-style: none; padding: 0; margin: 0; gap: 1.5rem; }
ul.im-cards:not(.is-layout-grid) { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(17rem, 100%), 1fr)); }
.im-cards > li { display: flex; margin: 0; }
.im-card {
	position: relative; display: flex; flex-direction: column; gap: 0; width: 100%;
	background: #fff; border: 1px solid var(--im-line); border-radius: var(--im-radius);
	padding: 1.6rem 1.5rem 1.3rem;
	transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.im-card::before { content: ""; position: absolute; top: -1px; left: 1.5rem; width: 44px; height: 4px; border-radius: 0 0 4px 4px; background: var(--field); }
.im-card:hover { transform: translateY(-3px); box-shadow: var(--im-shadow); border-color: transparent; }
.im-card > * { margin: 0; }
.im-card__title { font-size: 1.3rem; line-height: 1.25; font-weight: 600; margin: 0 0 .7rem; }
.im-card__title a { color: var(--im-ink); text-decoration: none; }
.im-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.im-card:hover .im-card__title a { color: var(--im-primary-dark); }
.im-card__excerpt { color: var(--im-muted); font-size: .9375rem; line-height: 1.6; margin-bottom: 1.1rem; }
.im-card__excerpt p { margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.im-card__excerpt .wp-block-post-excerpt__more-text { display: none; }
.im-card__meta { margin-top: auto !important; padding-top: .9rem; border-top: 1px solid var(--im-line); gap: .2rem .9rem; align-items: baseline; }
.im-card__meta > * { margin: 0; }
.wp-block-post-date { font-size: .8125rem; color: var(--im-muted); }
.wp-block-post-date a { color: inherit; text-decoration: none; }

/* Listes compactes */
.im-list { list-style: none; padding: 0; margin: 0; }
.im-list > li { margin: 0; padding: 1.05rem 0; border-bottom: 1px solid var(--im-line); }
.im-list > li:first-child { padding-top: 0; }
.im-list > li:last-child { border-bottom: 0; }
.im-litem > * { margin: 0; }
.im-litem .im-kicker { margin-bottom: .4rem; }
.im-litem__title { font-size: 1.125rem; line-height: 1.3; font-weight: 600; margin: 0 0 .35rem; }
.im-litem__title a { color: var(--im-ink); text-decoration: none; }
.im-litem__title a:hover { color: var(--im-primary-dark); text-decoration: underline; }
.im-list--big > li { padding: 1.3rem 0; }
.im-list--big .im-litem__title { font-size: 1.375rem; }

/* En-têtes de section */
.im-sechead { margin-bottom: 1.75rem !important; gap: .5rem 1.5rem; }
.im-sechead__title { font-size: var(--wp--preset--font-size--x-large); margin: 0; }
.im-more { margin: 0; }
.im-more a, a.im-more { font-weight: 600; font-size: .9375rem; color: var(--im-primary-dark); text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; }
.im-more a:hover, a.im-more:hover { color: var(--im-accent); }

/* Sections */
.im-section { padding-block: var(--wp--preset--spacing--60); }
.im-band--paper { background: var(--im-paper); }
.im-band--green { background: var(--im-primary-dark); color: rgba(255, 255, 255, .85); }

/* =========================================================================
   Accueil
   ========================================================================= */
.im-hero { background: var(--im-paper); border-bottom: 1px solid var(--im-line); padding-top: clamp(2rem, 4vw, 3.25rem); padding-bottom: var(--wp--preset--spacing--50); }
.im-intro { gap: 1rem 3rem; padding-bottom: clamp(1.5rem, 3vw, 2.25rem); margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem) !important; border-bottom: 1px solid var(--im-line); }
.im-intro__title { font-size: clamp(1.75rem, 3.2vw, 2.5rem); max-width: 21ch; margin: 0; }
.im-intro__lead { max-width: 44ch; margin: 0; color: var(--im-muted); font-size: 1.0625rem; }
.im-hero__cols { margin-block: 0 !important; }
.im-hero__side { padding-top: .25rem; }

.im-featurelist { list-style: none; margin: 0; padding: 0; }
.im-feature {
	position: relative; background: #fff; border: 1px solid var(--im-line); border-radius: 18px;
	padding: clamp(1.5rem, 3.5vw, 2.75rem); box-shadow: var(--im-shadow);
}
.im-feature::before { content: ""; position: absolute; top: -1px; left: clamp(1.5rem, 3.5vw, 2.75rem); width: 64px; height: 5px; border-radius: 0 0 5px 5px; background: var(--field); }
.im-feature > * { margin: 0; }
.im-feature__title { font-size: clamp(1.75rem, 3.3vw, 2.75rem); line-height: 1.12; letter-spacing: -.02em; margin: .2rem 0 1rem; }
.im-feature__title a { color: var(--im-ink); text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 2px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .3s ease; }
.im-feature__title a:hover { background-size: 100% 2px; color: var(--im-ink); }
.im-feature__excerpt { font-size: 1.125rem; color: var(--im-muted); line-height: 1.6; margin-bottom: 1.25rem; }
.im-feature__excerpt p { margin: 0; }
.im-feature__excerpt .wp-block-post-excerpt__more-text { display: none; }
.im-feature .im-card__meta { border-top: 0; padding-top: 0; margin-bottom: 1.5rem; }
.im-readmore {
	display: inline-flex !important; align-items: center; gap: .5rem; width: auto !important;
	background: var(--im-primary); color: #fff !important; text-decoration: none; font-weight: 600; font-size: .9375rem;
	padding: .75rem 1.3rem; border-radius: 999px;
}
.im-readmore::after { content: "→"; transition: transform .2s ease; }
.im-readmore:hover { background: var(--im-primary-dark); }
.im-readmore:hover::after { transform: translateX(3px); }

/* Tuiles champs */
.im-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 900px) { .im-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .im-fields { grid-template-columns: 1fr; } }
.im-field {
	display: flex; flex-direction: column; gap: .35rem; padding: 1.35rem 1.4rem 1.2rem;
	border-radius: var(--im-radius); border: 1px solid var(--im-line); background: #fff; text-decoration: none; color: var(--im-ink);
	position: relative; overflow: hidden; transition: background-color .2s ease, color .2s ease, transform .2s ease, border-color .2s ease;
}
.im-field::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--field); }
.im-field__name { font-family: var(--wp--preset--font-family--serif); font-size: 1.375rem; font-weight: 600; line-height: 1.2; }
.im-field__desc { color: var(--im-muted); font-size: .9375rem; line-height: 1.5; }
.im-field__count { margin-top: .5rem; font-size: .8125rem; font-weight: 700; color: var(--field); display: inline-flex; align-items: center; gap: .4rem; }
.im-field__count svg { transition: transform .2s ease; }
.im-field:hover { background: var(--field); border-color: var(--field); color: #fff; transform: translateY(-2px); }
.im-field:hover .im-field__desc, .im-field:hover .im-field__count { color: rgba(255, 255, 255, .9); }
.im-field:hover .im-field__count svg { transform: translateX(3px); }

/* Bandeau Carnets */
.im-split { align-items: flex-start; margin-block: 0 !important; }
.im-split h2 { margin: 0 0 1rem; }
.im-split .im-lead { margin: 0; max-width: 40ch; }

/* Bandeau RTA */
.im-promos { margin-block: 0 !important; gap: 2rem clamp(1.5rem, 4vw, 3.5rem) !important; }
.im-promo { border-top: 1px solid rgba(255, 255, 255, .22); padding-top: 1.4rem; }
.im-promo h3 { font-size: var(--wp--preset--font-size--x-large); margin: 0 0 .75rem; }
.im-promo h3 a { color: #fff; text-decoration: none; }
.im-promo h3 a:hover { text-decoration: underline; }
.im-promo p { margin: 0 0 .9rem; line-height: 1.6; }
.im-promo__link a { color: var(--im-sand); font-weight: 600; text-decoration: none; }
.im-promo__link a:hover { color: #fff; }

/* =========================================================================
   En-têtes de pages et rubriques
   ========================================================================= */
.im-pagehead { background: var(--im-paper); border-bottom: 1px solid var(--im-line); padding-block: clamp(1.75rem, 4vw, 3rem) clamp(1.75rem, 4vw, 2.75rem); }
.im-pagehead__inner > * { margin-block: 0; }
.im-pagehead__title { font-size: clamp(2rem, 4.2vw, 3.25rem); line-height: 1.1; letter-spacing: -.02em; margin: .4rem 0 0 !important; max-width: 24ch; }
.im-pagehead--center { text-align: center; }
.im-pagehead--center .im-pagehead__title { margin-inline: auto !important; }
.im-pagehead--center .im-eyebrow { justify-content: center; }
.im-pagehead--center .im-buttons { justify-content: center; }
.im-pagehead--center .im-lead { margin: 1rem auto 1.5rem; max-width: 52ch; }

.im-breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem; font-size: .8125rem; color: var(--im-muted); }
.im-breadcrumb li { display: inline-flex; align-items: center; gap: .25rem; }
.im-breadcrumb li + li::before { content: "/"; opacity: .45; margin-right: .1rem; }
.im-breadcrumb a { color: var(--im-muted); text-decoration: none; }
.im-breadcrumb a:hover { color: var(--im-primary-dark); text-decoration: underline; }
.im-breadcrumb [aria-current] { color: var(--im-ink); }

/* Présentation de rubrique */
.im-termintro { margin-top: 1.25rem !important; max-width: 820px; color: var(--im-muted); font-size: 1.0625rem; line-height: 1.7; }
.im-termintro p { margin: 0 0 .9em; }
.im-termintro h1, .im-termintro h2, .im-termintro h3 { font-size: 1.25rem; color: var(--im-ink); margin: 1.2em 0 .5em; }
.im-termintro img { max-width: 100%; border-radius: 10px; }
.im-termintro.is-long[data-collapsed="true"] .im-termintro__body { max-height: 9.5em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent); }
.im-termintro__more { margin-top: .5rem; border: 0; background: none; padding: .3rem 0; cursor: pointer; font: inherit; font-size: .9375rem; font-weight: 600; color: var(--im-primary-dark); text-decoration: underline; text-underline-offset: .2em; }
.im-termintro__more [data-less], .im-termintro[data-collapsed="false"] .im-termintro__more [data-more] { display: none; }
.im-termintro[data-collapsed="false"] .im-termintro__more [data-less] { display: inline; }

/* Filtres par champ */
.im-chips { margin-top: 1.75rem !important; }
.im-chips ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.im-chip {
	display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .95rem; border-radius: 999px;
	background: #fff; border: 1px solid var(--im-line); color: var(--im-ink); font-size: .875rem; font-weight: 600; text-decoration: none;
	transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.im-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--field); }
.im-chip:hover { border-color: var(--field); color: var(--im-ink); }
.im-chip.is-active { background: var(--im-ink); border-color: var(--im-ink); color: #fff; }
.im-chip.is-active i { background: #fff; }

.im-listing { padding-top: var(--wp--preset--spacing--50); }
.im-empty { color: var(--im-muted); }

/* Pagination */
.im-pagination { margin-top: 3rem !important; gap: .4rem; font-weight: 600; font-size: .9375rem; }
.im-pagination a, .im-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 .8rem; border-radius: 999px; text-decoration: none; color: var(--im-ink); border: 1px solid var(--im-line); background: #fff; }
.im-pagination a:hover { border-color: var(--im-primary); color: var(--im-primary-dark); }
.im-pagination .page-numbers.current { background: var(--im-primary); border-color: var(--im-primary); color: #fff; }
.im-pagination .page-numbers.dots { border: 0; background: none; min-width: 0; padding: 0 .2rem; }
.im-pagination .wp-block-query-pagination-numbers { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: center; }

/* Recherche plein format */
.im-bigsearch { margin-top: 1.5rem !important; max-width: 640px; }
.im-pagehead--center .im-bigsearch { margin-inline: auto !important; }
.im-bigsearch .wp-block-search__inside-wrapper { background: #fff; border: 1.5px solid var(--im-line); border-radius: 999px; padding: 4px; }
.im-bigsearch .wp-block-search__inside-wrapper:focus-within { border-color: var(--im-primary); }
.im-bigsearch .wp-block-search__input { border: 0; background: transparent; padding: .7rem 1.1rem; font-size: 1rem; outline: none; }
.im-bigsearch .wp-block-search__button { margin: 0; border-radius: 999px; }

/* =========================================================================
   Article
   ========================================================================= */
.im-article { padding-bottom: var(--wp--preset--spacing--60); }
.im-articlehead { background: var(--im-paper); border-bottom: 1px solid var(--im-line); padding-block: clamp(1.75rem, 4vw, 3rem) clamp(1.75rem, 4vw, 2.5rem); margin-bottom: clamp(2rem, 4vw, 3rem) !important; }
.im-articlehead > * { margin-block: 0; }
.im-articlehead .im-kicker { margin-top: 1.5rem; }
.im-article__title { font-size: clamp(2rem, 4.4vw, 3.25rem); line-height: 1.1; letter-spacing: -.02em; margin-top: 0 !important; margin-bottom: 1.25rem !important; text-wrap: balance; }
.im-byline { gap: .4rem 1.1rem; align-items: center; font-size: .875rem; color: var(--im-muted); }
.im-byline > * { margin: 0; }
.im-byline .im-authors { font-size: .9375rem; }
.im-byline > * + *::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .45; vertical-align: middle; margin-right: 1.1rem; }
.im-byline .wp-block-post-date, .im-readtime { font-size: .875rem; color: var(--im-muted); }

/* Texte courant */
.im-prose { font-family: var(--wp--preset--font-family--serif); font-size: 1.1875rem; line-height: 1.75; color: #24323a; }
.im-prose > * { margin-block: 0 1.15em; }
.im-prose > p:first-child { font-size: 1.3rem; line-height: 1.6; color: var(--im-ink); }
.im-prose h2, .im-prose h3, .im-prose h4 { margin: 1.9em 0 .6em; line-height: 1.25; }
.im-prose h2 { font-size: 1.75rem; }
.im-prose h3 { font-size: 1.4rem; }
.im-prose h4 { font-size: 1.2rem; }
.im-prose a { color: var(--im-primary-dark); }
.im-prose a:hover { color: var(--im-accent); }
.im-prose ul, .im-prose ol { padding-left: 1.3em; }
.im-prose li { margin-bottom: .4em; }
.im-prose li::marker { color: var(--im-primary); }
.im-prose img { max-width: 100%; border-radius: 10px; }
.im-prose figure { margin-block: 1.75em; }
.im-prose blockquote { margin: 1.75em 0; padding: .25em 0 .25em 1.4em; border-left: 3px solid var(--im-primary); font-style: italic; color: var(--im-ink); }
.im-prose table { width: 100%; border-collapse: collapse; font-family: var(--wp--preset--font-family--sans); font-size: .9375rem; display: block; overflow-x: auto; }
.im-prose th, .im-prose td { border: 1px solid var(--im-line); padding: .55rem .75rem; text-align: left; vertical-align: top; }
.im-prose th { background: var(--im-paper); }
.im-prose hr { border: 0; border-top: 1px solid var(--im-line); margin: 2.5em 0; }
.im-prose iframe { max-width: 100%; }
/* Neutralise les mises en forme héritées de Joomla (polices, tailles, justification). */
.im-prose :is(p, span, div, li, td, font, strong, em)[style] { font-family: inherit !important; font-size: inherit !important; line-height: inherit !important; }
.im-prose [style*="justify"] { text-align: left !important; }
.im-prose font { font-family: inherit !important; font-size: inherit !important; }

/* Bouton PDF (div#pdf issu de Joomla) */
.im-prose #pdf { text-align: left !important; margin: 2rem 0; font-family: var(--wp--preset--font-family--sans); }
#pdf a {
	display: inline-flex; align-items: center; gap: .6rem; background: var(--im-primary); color: #fff !important;
	padding: .8rem 1.35rem; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .9375rem; line-height: 1.3;
}
#pdf a::before {
	content: ""; width: 1.1em; height: 1.1em; background: currentColor; flex-shrink: 0;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h8l6 6v14H6z' fill='none' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M12 11v7m-3-3 3 3 3-3' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h8l6 6v14H6z' fill='none' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M12 11v7m-3-3 3 3 3-3' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center/contain no-repeat;
}
#pdf a:hover { background: var(--im-primary-dark); }

/* Pied d'article */
.im-articlefoot { max-width: 720px; margin: 3rem auto 0 !important; padding-top: 1.5rem; border-top: 1px solid var(--im-line); display: flex; flex-direction: column; gap: 1rem; }
.im-articlefoot > * { margin: 0; }
.im-share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.im-share__label { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--im-muted); margin-right: .4rem; }
.im-share a, .im-share button {
	display: inline-flex; align-items: center; padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--im-line); background: #fff;
	color: var(--im-ink); font: inherit; font-size: .8125rem; font-weight: 600; text-decoration: none; cursor: pointer;
}
.im-share a:hover, .im-share button:hover { border-color: var(--im-primary); color: var(--im-primary-dark); }
.im-authors--tags { font-size: .875rem; }

.im-relatedwrap { padding-block: var(--wp--preset--spacing--60); }
.im-related ul.im-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .im-related ul.im-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .im-related ul.im-cards { grid-template-columns: 1fr; } }
.im-related .im-sechead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; }

/* Pages */
.im-pagebody { padding-block: clamp(2rem, 4vw, 3rem) var(--wp--preset--spacing--60); }
.im-page .im-prose > p:first-child { font-size: inherit; color: inherit; }
.im-lead.im-lead, .im-prose .im-lead { font-family: var(--wp--preset--font-family--sans); font-size: 1.25rem; color: var(--im-ink); line-height: 1.55; border-left: 3px solid var(--im-primary); padding-left: 1.1rem; }
.im-pagehead .im-lead, .im-split .im-lead { border: 0; padding: 0; color: var(--im-muted); }

/* =========================================================================
   Pied de page
   ========================================================================= */
.im-footer-wrap { margin-top: 0 !important; }
.im-footer { background: var(--im-night); color: rgba(255, 255, 255, .75); font-size: .9375rem; padding-block: clamp(3rem, 6vw, 4.5rem) 1.5rem; }
.im-footer a { color: #fff; text-decoration: none; }
.im-footer a:hover { color: var(--im-sand); text-decoration: underline; }
.im-footer__cols { gap: 2.5rem clamp(1.5rem, 4vw, 3.5rem) !important; margin-block: 0 3rem !important; }
.im-footer__brand { display: inline-flex; align-items: center; gap: .9rem; margin-bottom: 1rem; }
.im-footer__brand img { width: 96px; height: auto; opacity: .95; }
.im-footer__brand span { font-family: var(--wp--preset--font-family--serif); font-size: 1.75rem; font-weight: 600; color: #fff; padding-left: .9rem; border-left: 1px solid rgba(255, 255, 255, .25); line-height: 1; }
.im-footer__about { max-width: 36ch; line-height: 1.65; margin: 0; }
.im-footer__title { font-family: var(--wp--preset--font-family--sans); font-size: .75rem !important; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--im-sand); margin: .4rem 0 1rem; }
.im-footer__list { list-style: none; padding: 0; margin: 0; }
.im-footer__list li { margin: 0 0 .55rem; }
.im-footer__address { line-height: 1.75; margin: 0; }
.im-footer__legal { border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 1.25rem; font-size: .8125rem; color: rgba(255, 255, 255, .6); gap: .5rem 1.5rem; }
.im-footer__legal p { margin: 0; }

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 781px) {
	.im-hero__side { margin-top: 1rem; }
	.im-intro__lead { font-size: 1rem; }
	.im-card { padding: 1.4rem 1.25rem 1.15rem; }
	.im-prose { font-size: 1.125rem; }
	.im-prose > p:first-child { font-size: 1.1875rem; }
	.im-split > .wp-block-column:last-child { margin-top: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
	.im-header, .im-footer, .im-relatedwrap, .im-share { display: none !important; }
	.im-prose { font-size: 12pt; }
}

/* =========================================================================
   Illustrations (v2.1)
   ========================================================================= */
/* Bandeaux photo historiques */
.im-banner { margin: 0; }
.im-banner img { display: block; width: 100%; height: auto; aspect-ratio: 790 / 190; object-fit: cover; border-radius: 12px; box-shadow: var(--im-shadow); }
@media (min-width: 900px) {
	.im-pagehead__inner.alignwide:has(> .im-banner) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); column-gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
	.im-pagehead__inner.alignwide:has(> .im-banner) > * { grid-column: 1; }
	.im-pagehead__inner.alignwide:has(> .im-banner) > .im-banner { grid-column: 2; grid-row: 1 / span 6; align-self: center; }
}
.im-pagehead__inner:not(.alignwide) > .im-banner, .im-articlehead > .im-banner { margin-bottom: 1.5rem !important; }
@media (max-width: 899.98px) { .im-pagehead__inner > .im-banner { margin-bottom: 1.25rem !important; } }

/* Accueil : bandeau dans l'introduction */
.im-intro { flex-wrap: nowrap !important; align-items: center !important; }
.im-intro__text { flex: 1 1 auto; }
.im-intro__text > * { margin: 0; }
.im-intro__text .im-intro__lead { margin-top: 1rem; }
.im-intro > .im-banner { flex: 0 1 520px; min-width: 0; }
@media (max-width: 900px) { .im-intro { flex-wrap: wrap !important; } .im-intro > .im-banner { flex-basis: 100%; } }

/* Vignettes des cartes */
.im-card__media { margin: -1.6rem -1.5rem 1.2rem !important; aspect-ratio: 16 / 9; overflow: hidden; border-radius: calc(var(--im-radius) - 1px) calc(var(--im-radius) - 1px) 0 0; background: var(--im-paper); }
.im-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.im-card:hover .im-card__media img { transform: scale(1.03); }
.im-card::before { z-index: 2; }
@media (max-width: 781px) { .im-card__media { margin: -1.4rem -1.25rem 1.1rem !important; } }
.im-feature .im-card__media { margin: 0 0 1.5rem !important; border-radius: 12px; aspect-ratio: 2 / 1; }

/* À la une chez RTA (articles épinglés) */
.im-newsgrid { list-style: none; padding: 0; margin: 0; gap: 1.5rem; align-items: start; }
.im-newsgrid > li { margin: 0; }
.im-newscard { background: #fff; border: 1px solid var(--im-line); border-radius: var(--im-radius); padding: 1.5rem; overflow: hidden; }
.im-newscard__body { font-size: .9375rem; line-height: 1.6; text-align: center; }
.im-newscard__body > * { margin-block: 0 .8em; }
.im-newscard__body :is(p, span, div, td, a, strong, em, font)[style] { font-family: inherit !important; font-size: inherit !important; }
.im-newscard__body h1, .im-newscard__body h2 { font-size: 1.25rem; line-height: 1.3; margin: .5em 0; }
.im-newscard__body h3 { font-size: 1.0625rem; line-height: 1.35; margin: 1em 0 .4em; }
.im-newscard__body h1:empty, .im-newscard__body h2:empty, .im-newscard__body h1:has(> br:only-child) { display: none; }
.im-newscard__body img { max-width: 100%; height: auto; border-radius: 8px; display: block; margin: 0 auto; }
.im-newscard__body table { width: 100% !important; max-width: 100%; border: 0; }
.im-newscard__body td { padding: 0; border: 0; }
.im-newscard__body hr { border: 0; border-top: 1px solid var(--im-line); }
.im-newscard__body p:has(> br:only-child), .im-newscard__body p:empty { display: none; }

/* Logo Fédération Wallonie-Bruxelles */
.im-footer__fwb { display: inline-flex; flex-direction: column; gap: .5rem; margin-top: 1.5rem; font-size: .75rem; color: rgba(255, 255, 255, .6) !important; text-decoration: none !important; }
.im-footer__fwb img { width: 180px; height: auto; display: block; }

/* Vignettes : image mise en avant (souvent verticale) et bandeau de champ en repli */
.im-card__media--featured img { object-position: center 25%; }
.im-card__media--banner { aspect-ratio: 790 / 190; }
.im-feature .im-card__media--banner { aspect-ratio: 790 / 190; }
.im-feature .im-card__media--featured { aspect-ratio: 16 / 9; }

/* Image mise en avant sur la page de l'article */
.im-article__image { margin-block: 0 clamp(2rem, 4vw, 2.75rem) !important; }
.im-article__image img { display: block; width: 100%; height: auto; border-radius: 12px; box-shadow: var(--im-shadow); }
