/*
Theme Name: Alternatives Écologiques
Theme URI: https://www.alternativesecologiques.net/
Description: Thème éditorial sur mesure pour alternativesecologiques.net : rubriques colorées, cartes d'articles, lecture confortable. Sans dépendance externe (polices auto-hébergées, pas de jQuery).
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: altereco
*/

/* ==========================================================================
   1. Polices et variables
   ========================================================================== */

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
}

@font-face {
	font-family: "Fraunces";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("assets/fonts/fraunces-latin-wght-normal.woff2") format("woff2");
}

:root {
	--bg: #faf7f0;
	--surface: #ffffff;
	--ink: #1b2a23;
	--muted: #5b6a62;
	--line: #e7e1d4;
	--line-strong: #d6cebd;

	--green-900: #133528;
	--green-800: #184433;
	--green-700: #1f5a43;
	--green-500: #2f8a63;
	--green-100: #e4f0e2;
	--accent: #e39a3b;

	/* Couleurs de rubrique, surchargées en ligne par article */
	--cat: var(--green-700);
	--cat-tint: var(--green-100);

	--font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-display: "Fraunces", Georgia, "Times New Roman", serif;

	--radius: 16px;
	--radius-sm: 10px;
	--shadow: 0 1px 2px rgba(19, 53, 40, .05), 0 8px 24px -12px rgba(19, 53, 40, .18);
	--shadow-hover: 0 2px 4px rgba(19, 53, 40, .06), 0 18px 36px -14px rgba(19, 53, 40, .28);

	--container: 1180px;
	--gutter: clamp(16px, 4vw, 32px);
}

/* ==========================================================================
   2. Base
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-wrap: break-word;
}

img,
svg,
video,
iframe { max-width: 100%; }

img { height: auto; }

a {
	color: var(--green-700);
	text-decoration-thickness: 1px;
	text-underline-offset: .18em;
}

a:hover { color: var(--green-500); }

:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: 2px;
	border-radius: 4px;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -.01em;
	color: var(--green-900);
	margin: 0 0 .5em;
	text-wrap: balance;
}

p { margin: 0 0 1.2em; }

button,
input,
select,
textarea { font: inherit; color: inherit; }

.icon {
	width: 1.15em;
	height: 1.15em;
	max-width: none; /* sinon l'icône compte pour 0 dans la largeur minimale du lien */
	flex: none;
	vertical-align: -.2em;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: 16px;
	top: -60px;
	z-index: 100;
	padding: 10px 16px;
	background: var(--green-900);
	color: #fff;
	border-radius: 8px;
	transition: top .15s;
}

.skip-link:focus { top: 12px; color: #fff; }

.container {
	width: 100%;
	max-width: calc(var(--container) + 2 * var(--gutter));
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.container--narrow { max-width: calc(780px + 2 * var(--gutter)); }

.eyebrow {
	display: inline-flex;
	align-items: center;
	gap: .45em;
	margin: 0 0 .9em;
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--green-500);
}

.btn,
.search-form__submit,
.wpcf7-submit,
input[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .5em;
	padding: .75em 1.4em;
	border: 0;
	border-radius: 999px;
	background: var(--green-700);
	color: #fff;
	font-weight: 600;
	font-size: .95rem;
	line-height: 1.2;
	cursor: pointer;
	transition: background .15s, transform .15s;
}

.btn:hover,
.search-form__submit:hover,
.wpcf7-submit:hover,
input[type="submit"]:hover { background: var(--green-900); color: #fff; }

/* ==========================================================================
   3. En-tête
   ========================================================================== */

.site-header {
	position: relative;
	z-index: 20;
	background: var(--surface);
	border-bottom: 1px solid var(--line);
}

.site-header__bar {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 72px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	color: var(--green-900);
	text-decoration: none;
	margin-right: auto;
}

.brand:hover { color: var(--green-900); }

.brand__mark {
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	border-radius: 14px 14px 14px 4px;
	background: var(--green-700);
	color: #fff;
	transition: transform .25s;
}

.brand:hover .brand__mark { transform: rotate(-8deg); }

.brand__mark .icon { width: 24px; height: 24px; }

.brand__name {
	font-family: var(--font-display);
	font-size: clamp(1.15rem, 1rem + .8vw, 1.45rem);
	font-weight: 600;
	letter-spacing: -.015em;
	line-height: 1.1;
}

.brand__name em {
	font-style: italic;
	font-weight: 500;
	color: var(--green-500);
}

.brand--logo img { max-height: 48px; width: auto; display: block; }

.site-nav__list {
	display: flex;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav__list a {
	display: block;
	padding: 8px 14px;
	border-radius: 999px;
	color: var(--ink);
	font-size: .95rem;
	font-weight: 500;
	text-decoration: none;
}

.site-nav__list a:hover,
.site-nav__list .current-menu-item > a,
.site-nav__list .current_page_item > a {
	background: var(--green-100);
	color: var(--green-900);
}

.site-header__tools { display: flex; gap: 6px; }

.icon-btn {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 1px solid var(--line);
	border-radius: 50%;
	background: var(--surface);
	color: var(--green-900);
	cursor: pointer;
	transition: background .15s, border-color .15s;
}

.icon-btn:hover,
.icon-btn[aria-expanded="true"] { background: var(--green-100); border-color: var(--green-100); }

.icon-btn .icon { width: 20px; height: 20px; }

.icon-btn--menu { display: none; }
.icon-btn--menu .icon--close { display: none; }
.icon-btn--menu[aria-expanded="true"] .icon--open { display: none; }
.icon-btn--menu[aria-expanded="true"] .icon--close { display: block; }

.site-search {
	border-top: 1px solid var(--line);
	background: var(--bg);
	padding: 16px 0;
}

/* Barre des rubriques */

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

.topics__list {
	display: flex;
	gap: 4px;
	margin: 0 calc(-1 * var(--gutter));
	padding: 8px var(--gutter);
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.topics__list::-webkit-scrollbar { display: none; }

.topics__list > li { flex: none; }

.topics__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 13px;
	border-radius: 999px;
	color: var(--ink);
	font-size: .9rem;
	font-weight: 500;
	white-space: nowrap;
	text-decoration: none;
	transition: background .15s, color .15s;
}

.topics__link .icon { color: var(--cat); }

.topics__link:hover,
.topics__link.is-current {
	background: var(--cat-tint);
	color: var(--cat);
}

.topics__link.is-current { font-weight: 600; }

/* ==========================================================================
   4. Formulaire de recherche
   ========================================================================== */

.search-form {
	position: relative;
	display: flex;
	align-items: center;
	max-width: 560px;
	padding: 5px;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	background: var(--surface);
	transition: border-color .15s, box-shadow .15s;
}

.search-form:focus-within {
	border-color: var(--green-500);
	box-shadow: 0 0 0 4px rgba(47, 138, 99, .15);
}

.search-form > .icon {
	margin-left: 14px;
	color: var(--muted);
}

.search-form__field {
	flex: 1;
	min-width: 0;
	padding: 10px 12px;
	border: 0;
	background: transparent;
	outline: none;
	font-size: 1rem;
}

.search-form__field::placeholder { color: #8a968f; }

/* ==========================================================================
   5. Accueil : hero
   ========================================================================== */

.hero {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(60% 80% at 100% 0%, rgba(227, 154, 59, .10), transparent 60%),
		linear-gradient(180deg, #f1f6ec 0%, var(--bg) 100%);
}

.hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
	align-items: center;
	gap: clamp(28px, 5vw, 72px);
	padding-block: clamp(40px, 7vw, 88px);
}

.hero__title {
	font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.6rem);
	font-weight: 600;
	line-height: 1.08;
	letter-spacing: -.025em;
	margin-bottom: .45em;
}

.hero__title em {
	font-style: italic;
	font-weight: 500;
	color: var(--green-500);
}

.hero__lead {
	max-width: 34em;
	font-size: clamp(1.05rem, 1rem + .35vw, 1.2rem);
	color: var(--muted);
	margin-bottom: 1.6em;
}

.hero__stats {
	margin: 1.4em 0 0;
	font-size: .92rem;
	color: var(--muted);
}

.hero__stats strong { color: var(--green-900); font-weight: 700; }
.hero__stats span { margin-inline: .5em; }

.hero__art { position: relative; }

.hero__art::before {
	content: "";
	position: absolute;
	inset: 18px -18px -18px 18px;
	border-radius: 120px 28px 120px 28px;
	background: var(--accent);
	opacity: .22;
}

.hero__art img {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 120px 28px 120px 28px;
	box-shadow: var(--shadow);
}

/* ==========================================================================
   6. Sections
   ========================================================================== */

.section { padding-block: clamp(40px, 6vw, 72px); }
.section--tight { padding-block: clamp(32px, 4vw, 48px) 0; }

.section__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 20px;
	margin-bottom: clamp(20px, 3vw, 32px);
}

.section__title {
	margin: 0;
	font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
}

.section__sub { color: var(--muted); font-weight: 400; font-size: .7em; }

.section__intro { margin: 0; color: var(--muted); }

/* Grille des rubriques */

.topic-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.topic-card {
	display: grid;
	grid-template-columns: auto 1fr;
	grid-template-rows: auto auto;
	column-gap: 12px;
	align-items: center;
	height: 100%;
	padding: 14px 16px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--ink);
	text-decoration: none;
	transition: transform .2s, box-shadow .2s, border-color .2s;
}

.topic-card:hover {
	transform: translateY(-3px);
	border-color: var(--cat);
	box-shadow: var(--shadow);
	color: var(--ink);
}

.topic-card__icon {
	grid-row: 1 / 3;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--cat-tint);
	color: var(--cat);
}

.topic-card__icon .icon { width: 22px; height: 22px; }

.topic-card__name {
	align-self: end;
	font-weight: 600;
	font-size: .95rem;
	line-height: 1.25;
}

.topic-card__count {
	align-self: start;
	font-size: .8rem;
	color: var(--muted);
}

/* ==========================================================================
   7. Cartes d'articles
   ========================================================================== */

.card-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(18px, 2.4vw, 28px);
}

.card {
	position: relative;
	display: flex;
	flex-direction: column;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	overflow: hidden;
	transition: transform .2s, box-shadow .2s;
}

.card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-hover);
}

.card__media {
	display: block;
	aspect-ratio: 3 / 2;
	background: var(--cat-tint);
	overflow: hidden;
}

.media {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
}

.media--cover .media__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .5s;
}

.card:hover .media--cover .media__img { transform: scale(1.04); }

/* Petites images d'archive : présentées en vignette sur le fond de la rubrique */
.media--contain { padding: 22px; }

.media--contain .media__img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 8px;
	mix-blend-mode: multiply;
}

.media--placeholder {
	color: var(--cat);
	background:
		radial-gradient(circle at 80% 20%, rgba(255, 255, 255, .7), transparent 45%),
		var(--cat-tint);
}

.media--placeholder .icon {
	width: 64px;
	height: 64px;
	stroke-width: 1.25;
	opacity: .75;
}

.card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 10px;
	padding: 18px 20px 20px;
}

.chip {
	position: relative;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 6px;
	padding: 4px 11px 4px 9px;
	border-radius: 999px;
	background: var(--cat-tint);
	color: var(--cat);
	font-size: .76rem;
	font-weight: 600;
	letter-spacing: .01em;
	line-height: 1.5;
	text-decoration: none;
}

.chip:hover { background: var(--cat); color: #fff; }

.chip .icon { width: 14px; height: 14px; }

.chip-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 28px 0 0;
	padding: 0;
	list-style: none;
}

.card__title {
	margin: 0;
	font-size: 1.22rem;
	line-height: 1.25;
}

.card__title a {
	color: inherit;
	text-decoration: none;
}

/* Toute la carte est cliquable */
.card__title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.card:hover .card__title a { color: var(--green-700); }

.card__excerpt {
	margin: 0;
	color: var(--muted);
	font-size: .95rem;
	line-height: 1.55;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.card__meta time { text-transform: capitalize; }

.card__meta {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: auto 0 0;
	padding-top: 6px;
	color: var(--muted);
	font-size: .82rem;
}

.card__comments {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.card__comments .icon { width: 15px; height: 15px; }

.card__more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
	color: var(--green-700);
	font-weight: 600;
	font-size: .92rem;
}

.card__more .icon { transition: transform .2s; }
.card:hover .card__more .icon { transform: translateX(4px); }

/* Article mis en avant */

.card--feature {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	margin-bottom: clamp(18px, 2.4vw, 28px);
}

.card--feature .card__media {
	aspect-ratio: auto;
	min-height: 340px;
	height: 100%;
}

.card--feature .card__body {
	justify-content: center;
	gap: 14px;
	padding: clamp(22px, 3.4vw, 44px);
}

.card--feature .card__title { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); line-height: 1.15; }
.card--feature .card__excerpt { font-size: 1.05rem; -webkit-line-clamp: 4; }
.card--feature .card__meta { margin-top: 8px; }

/* ==========================================================================
   8. Bandeaux
   ========================================================================== */

.band {
	background: var(--green-900);
	color: #dfeae2;
}

.band .section__title { color: #fff; }
.band .section__intro { color: #a9c2b3; }

.band--soft {
	background: #f1eee4;
	color: var(--ink);
}

.band--soft .section__title { color: var(--green-900); }

.rank {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: clamp(16px, 2.4vw, 28px);
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: rank;
}

.rank__item {
	position: relative;
	counter-increment: rank;
	padding-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, .18);
}

.rank__item::before {
	content: counter(rank, decimal-leading-zero);
	display: block;
	margin-bottom: 10px;
	font-family: var(--font-display);
	font-size: 2.4rem;
	font-weight: 500;
	font-style: italic;
	line-height: 1;
	color: var(--accent);
}

.rank__cat {
	position: relative;
	z-index: 2;
	font-size: .76rem;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #8fc4a8;
	text-decoration: none;
}

.rank__cat:hover { color: #fff; }

.rank__title {
	margin: 6px 0 10px;
	font-size: 1.2rem;
	color: #fff;
}

.rank__title a { color: inherit; text-decoration: none; }
.rank__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.rank__item:hover .rank__title a { text-decoration: underline; text-decoration-color: var(--accent); }

.rank__meta {
	margin: 0;
	font-size: .85rem;
	color: #a9c2b3;
}

/* ==========================================================================
   9. En-tête d'archive
   ========================================================================== */

.page-head {
	background: linear-gradient(180deg, var(--cat-tint), var(--bg));
	padding-block: clamp(32px, 5vw, 60px) clamp(8px, 2vw, 20px);
}

.page-head__inner {
	display: flex;
	align-items: flex-start;
	gap: clamp(16px, 2.5vw, 28px);
}

.page-head__icon {
	display: grid;
	place-items: center;
	flex: none;
	width: clamp(56px, 8vw, 84px);
	height: clamp(56px, 8vw, 84px);
	border-radius: 24px 24px 24px 8px;
	background: var(--cat);
	color: #fff;
}

.page-head__icon .icon { width: 46%; height: 46%; }

.page-head .eyebrow { color: var(--cat); margin-bottom: .4em; }

.page-head__title {
	margin: 0 0 .2em;
	font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3rem);
	letter-spacing: -.02em;
}

.page-head__desc { max-width: 46em; color: var(--muted); }
.page-head__desc p { margin-bottom: .4em; }

.page-head__count { margin: 0; color: var(--muted); font-size: .92rem; }

/* Pagination */

.pagination { margin-top: clamp(28px, 4vw, 48px); }

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.page-numbers {
	display: grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--surface);
	color: var(--ink);
	font-weight: 600;
	font-size: .95rem;
	text-decoration: none;
}

a.page-numbers:hover { border-color: var(--green-500); color: var(--green-700); }

.page-numbers.current {
	background: var(--green-700);
	border-color: var(--green-700);
	color: #fff;
}

.page-numbers.dots { border-color: transparent; background: none; }

.empty {
	max-width: 620px;
	margin-inline: auto;
	padding: 40px 24px;
	text-align: center;
	color: var(--muted);
}

.empty .search-form { margin-inline: auto; text-align: left; }

/* ==========================================================================
   10. Article
   ========================================================================== */

.entry-head {
	background: linear-gradient(180deg, var(--cat-tint), var(--bg));
	padding-block: clamp(28px, 4vw, 52px) clamp(20px, 3vw, 32px);
}

.entry--page .entry-head { background: linear-gradient(180deg, var(--green-100), var(--bg)); }

.breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 18px;
	font-size: .85rem;
	color: var(--muted);
}

.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--green-700); text-decoration: underline; }

.entry-title {
	margin: 14px 0 .35em;
	font-size: clamp(2rem, 1.3rem + 3vw, 3.2rem);
	line-height: 1.1;
	letter-spacing: -.025em;
}

.entry-lead {
	font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem);
	line-height: 1.5;
	color: var(--muted);
	margin-bottom: 1em;
}

.entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 22px;
	margin: 18px 0 0;
	padding: 0;
	list-style: none;
	font-size: .88rem;
	color: var(--muted);
}

.entry-meta li {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}

.entry-meta .icon { width: 16px; height: 16px; color: var(--cat); }
.entry-meta a { color: inherit; }

.entry-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: clamp(32px, 5vw, 64px);
	padding-block: clamp(20px, 3vw, 36px) clamp(40px, 6vw, 72px);
}

.entry-main { min-width: 0; max-width: 780px; }

.entry--page .entry-content { padding-block: clamp(16px, 3vw, 28px) clamp(40px, 6vw, 72px); }

.entry-hero { margin: 0 0 clamp(24px, 3vw, 36px); }

.entry-hero__img {
	display: block;
	width: 100%;
	max-height: 460px;
	object-fit: cover;
	border-radius: var(--radius);
}

/* Contenu rédactionnel */

.entry-content {
	font-size: clamp(1.05rem, 1rem + .25vw, 1.14rem);
	line-height: 1.75;
}

.entry-content::after { content: ""; display: table; clear: both; }

.entry-content > * { margin-block: 0 1.25em; }

.entry-content p:empty { display: none; }

.entry-content h1,
.entry-content h2 {
	margin: 1.8em 0 .6em;
	font-size: clamp(1.45rem, 1.2rem + 1vw, 1.9rem);
}

.entry-content h3 { margin: 1.6em 0 .5em; font-size: clamp(1.2rem, 1.1rem + .5vw, 1.4rem); }

.entry-content h4 {
	margin: 1.8em 0 .5em;
	font-size: 1.2rem;
}

.entry-content h5,
.entry-content h6 { margin: 1.5em 0 .4em; font-size: 1.05rem; }

/* Les anciens articles s'ouvrent sur un titre servant de chapô */
.entry-content > h3:first-child {
	margin-top: 0;
	padding-left: 18px;
	border-left: 3px solid var(--cat);
	font-family: var(--font-body);
	font-size: clamp(1.12rem, 1.05rem + .4vw, 1.28rem);
	font-weight: 500;
	line-height: 1.5;
	letter-spacing: 0;
	color: var(--ink);
	text-wrap: pretty;
}

.entry-content > h1:first-child { display: none; } /* titre déjà affiché dans l'en-tête */

.entry-content a { font-weight: 500; }

.entry-content ul,
.entry-content ol { padding-left: 1.3em; }

.entry-content li { margin-bottom: .45em; }
.entry-content li::marker { color: var(--cat); font-weight: 600; }

.entry-content blockquote {
	margin-inline: 0;
	padding: 4px 0 4px 22px;
	border-left: 3px solid var(--accent);
	font-family: var(--font-display);
	font-size: 1.2em;
	font-style: italic;
	color: var(--green-900);
}

.entry-content blockquote p:last-child { margin-bottom: 0; }

.entry-content hr {
	border: 0;
	height: 1px;
	background: var(--line-strong);
	margin-block: 2.2em;
}

.entry-content img { border-radius: var(--radius-sm); }

.entry-content figure { margin-inline: 0; }

.entry-content figcaption,
.entry-content .wp-caption-text {
	margin-top: .6em;
	font-size: .85rem;
	color: var(--muted);
	text-align: center;
}

.entry-content .wp-caption { max-width: 100%; }

.entry-content .alignleft,
.entry-content .wp-block-image .alignleft {
	float: left;
	max-width: min(46%, 320px);
	margin: .3em 1.6em 1em 0;
}

.entry-content .alignright,
.entry-content .wp-block-image .alignright {
	float: right;
	max-width: min(46%, 320px);
	margin: .3em 0 1em 1.6em;
}

.entry-content .aligncenter,
.entry-content .wp-block-image .aligncenter {
	display: block;
	margin-inline: auto;
	text-align: center;
}

.entry-content .aligncenter img { margin-inline: auto; }

.entry-content .wp-block-gallery { gap: 12px; }

.entry-content h2,
.entry-content h3,
.entry-content h4 { clear: none; }

/* Tableaux */

.entry-content table {
	display: block;
	width: 100%;
	overflow-x: auto;
	border-collapse: collapse;
	font-size: .92rem;
	line-height: 1.45;
}

.entry-content th,
.entry-content td {
	padding: 10px 14px;
	border: 1px solid var(--line-strong);
	text-align: left;
	vertical-align: top;
}

.entry-content th {
	background: var(--green-100);
	color: var(--green-900);
	font-weight: 600;
}

.entry-content tbody tr:nth-child(even) td { background: rgba(255, 255, 255, .6); }

/* Listes de définitions (calendriers des fruits et légumes de saison) */

.entry-content dl {
	display: grid;
	grid-template-columns: minmax(120px, auto) 1fr;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	overflow: hidden;
}

.entry-content dt,
.entry-content dd {
	margin: 0;
	padding: 12px 18px;
	border-bottom: 1px solid var(--line);
}

.entry-content dt {
	font-weight: 600;
	background: #fcfbf7;
	white-space: nowrap;
}

.entry-content dt:last-of-type,
.entry-content dd:last-of-type { border-bottom: 0; }

/* Formulaires (Contact Form 7, commentaires) */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="search"]:not(.search-form__field),
textarea,
select {
	width: 100%;
	max-width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius-sm);
	background: var(--surface);
	transition: border-color .15s, box-shadow .15s;
}

input:focus,
textarea:focus,
select:focus {
	outline: none;
	border-color: var(--green-500);
	box-shadow: 0 0 0 4px rgba(47, 138, 99, .15);
}

.search-form__field:focus { box-shadow: none; }

label { font-weight: 500; font-size: .95rem; }

.wpcf7 form p { margin-bottom: 1em; }
.wpcf7-not-valid-tip { font-size: .85rem; }

.wpcf7 form .wpcf7-response-output {
	margin: 1.5em 0 0;
	padding: 12px 16px;
	border-radius: var(--radius-sm);
}

/* Évaluation (extension MarcTV) */

.hreview {
	margin-top: 2em;
	padding: 16px 20px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	font-size: .95rem;
}

/* Pied d'article */

.entry-tags {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin-top: 36px;
	padding-top: 24px;
	border-top: 1px solid var(--line);
	color: var(--muted);
}

.entry-tags > .icon { margin-top: 6px; }

.tag-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tag-list a {
	display: block;
	padding: 3px 11px;
	border: 1px solid var(--line-strong);
	border-radius: 999px;
	color: var(--muted);
	font-size: .82rem;
	text-decoration: none;
}

.tag-list a:hover { border-color: var(--green-500); color: var(--green-700); }

.post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-top: 36px;
}

.post-nav__link {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 18px 20px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	text-decoration: none;
	transition: border-color .15s, box-shadow .15s;
}

.post-nav__link:hover { border-color: var(--cat); box-shadow: var(--shadow); }

.post-nav__link--next { text-align: right; align-items: flex-end; }

.post-nav__label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--muted);
}

.post-nav__title {
	font-family: var(--font-display);
	font-size: 1.1rem;
	font-weight: 600;
	line-height: 1.25;
	color: var(--green-900);
}

.page-links { display: flex; gap: 10px; margin-top: 2em; font-weight: 600; }

/* ==========================================================================
   11. Colonne latérale
   ========================================================================== */

.sidebar {
	display: flex;
	flex-direction: column;
	gap: 20px;
	align-self: start;
	min-width: 0;
	font-size: .95rem;
}

.widget {
	padding: 20px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	overflow: hidden;
}

/* Bloc publicitaire : pas d'habillage, et rien du tout tant qu'il est vide */
.widget_block:has(.adsbygoogle),
.widget_block:has(.pub-placeholder) {
	padding: 0;
	border: 0;
	background: none;
	border-radius: 0;
}

.widget__title,
.widget h2,
.widget h3 {
	margin: 0 0 14px;
	font-size: 1.1rem;
}

.widget ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.widget li {
	padding: 8px 0;
	border-bottom: 1px solid var(--line);
	line-height: 1.4;
	color: var(--muted);
}

.widget li:last-child { border-bottom: 0; padding-bottom: 0; }
.widget li:first-child { padding-top: 0; }

.widget li a {
	color: var(--ink);
	font-weight: 500;
	text-decoration: none;
}

.widget li a:hover { color: var(--green-700); text-decoration: underline; }

.widget .search-form { border-radius: var(--radius-sm); }
.widget .search-form__submit { padding: .65em .9em; border-radius: 8px; font-size: .85rem; }
.widget .search-form > .icon { display: none; }

/* Emplacement publicitaire matérialisé (beta uniquement, à la place d'AdSense) */
.pub-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 250px;
	padding: 12px;
	border: 2px dashed #dc3545;
	border-radius: var(--radius-sm);
	background-color: rgba(220, 53, 69, .08);
	color: #dc3545;
	font-size: .875rem;
	font-weight: 600;
	letter-spacing: .03em;
	text-align: center;
	text-transform: uppercase;
}

.pub-placeholder--banner { min-height: 120px; }

/* Emplacements intégrés au thème (sous le bandeau d'accueil, fin d'article) */
.encart { margin-top: clamp(24px, 4vw, 40px); }
.encart:empty { display: none; }

/* ==========================================================================
   12. Commentaires
   ========================================================================== */

.comments {
	margin-top: 48px;
	padding-top: 36px;
	border-top: 1px solid var(--line);
}

.comments__title { font-size: 1.5rem; margin-bottom: 1em; }

.comment-list,
.comment-list .children {
	margin: 0;
	padding: 0;
	list-style: none;
}

.comment-list .children {
	margin-left: clamp(14px, 3vw, 32px);
	padding-left: clamp(14px, 3vw, 24px);
	border-left: 2px solid var(--line);
}

.comment-body {
	margin-bottom: 16px;
	padding: 18px 20px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
}

.bypostauthor > .comment-body { border-color: var(--green-500); background: #f7fbf6; }

.comment-head {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
}

.comment-avatar { border-radius: 50%; display: block; }

.comment-author { display: block; font-weight: 600; line-height: 1.3; }
.comment-author a { color: inherit; text-decoration: none; }

.comment-date { font-size: .8rem; color: var(--muted); text-decoration: none; }

.comment-text { font-size: .98rem; line-height: 1.65; }
.comment-text p:last-child { margin-bottom: 0; }

.comment-pending { color: var(--muted); font-style: italic; }

.comment-actions {
	display: flex;
	gap: 16px;
	margin-top: 10px;
	font-size: .85rem;
	font-weight: 600;
}

.comment-actions:empty { display: none; }
.comment-actions a { text-decoration: none; }

.comments__closed { color: var(--muted); font-style: italic; }

.comment-respond {
	margin-top: 32px;
	padding: clamp(20px, 3vw, 32px);
	border-radius: var(--radius);
	background: #f1eee4;
}

.comment-respond .comments__title { margin-bottom: .4em; }
.comment-respond small { font-family: var(--font-body); font-size: .85rem; font-weight: 500; margin-left: 10px; }

.comment-form { display: grid; gap: 14px; }
.comment-form p { margin: 0; }
.comment-form label { display: block; margin-bottom: 5px; }
.comment-notes,
.logged-in-as { font-size: .88rem; color: var(--muted); }

.comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.comment-form-cookies-consent input { margin-top: 5px; }
.comment-form-cookies-consent label { margin: 0; font-weight: 400; font-size: .88rem; }

.comments .comment-navigation,
.comments .pagination { margin-block: 20px; }

/* ==========================================================================
   13. 404
   ========================================================================== */

.notfound { text-align: center; }
.notfound .search-form { margin-inline: auto; text-align: left; }
.notfound .chip-list { justify-content: center; }

.notfound__icon {
	display: inline-grid;
	place-items: center;
	width: 88px;
	height: 88px;
	margin-bottom: 20px;
	border-radius: 50%;
	background: var(--green-100);
	color: var(--green-700);
}

.notfound__icon .icon { width: 42px; height: 42px; }

/* ==========================================================================
   14. Pied de page
   ========================================================================== */

.site-footer {
	background: var(--green-900);
	color: #b9cdc1;
	font-size: .95rem;
}

.site-main:has(> .band:last-child:not(.band--soft)) + .site-footer .site-footer__grid { border-top: 1px solid rgba(255, 255, 255, .12); }

.site-footer__grid {
	display: grid;
	grid-template-columns: 1.3fr 1.4fr .8fr;
	gap: clamp(28px, 5vw, 72px);
	padding-block: clamp(40px, 6vw, 64px);
}

.brand--light,
.brand--light:hover { color: #fff; }
.brand--light .brand__mark { background: var(--green-500); }
.brand--light .brand__name em { color: #9bd3b5; }

.site-footer__about p { max-width: 30em; margin: 18px 0 0; }

.site-footer__title {
	margin: 0 0 16px;
	font-family: var(--font-body);
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: #8fc4a8;
}

.site-footer__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__list--2col { columns: 2; column-gap: 24px; }

.site-footer__list li { margin-bottom: 9px; break-inside: avoid; }

.site-footer a { color: #e5efe8; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.site-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 10px 24px;
	padding-block: 20px;
	border-top: 1px solid rgba(255, 255, 255, .12);
	font-size: .85rem;
}

.site-footer__bottom p { margin: 0; }

/* ==========================================================================
   15. Adaptation aux écrans
   ========================================================================== */

@media (max-width: 1020px) {
	.card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.rank { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.entry-layout { grid-template-columns: minmax(0, 1fr); }
	.entry-main { margin-inline: auto; width: 100%; }
	.sidebar {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
		max-width: 780px;
		width: 100%;
		margin-inline: auto;
	}
}

@media (max-width: 860px) {
	.icon-btn--menu { display: grid; }

	.site-nav {
		display: none;
		position: absolute;
		top: 72px;
		left: 0;
		right: 0;
		padding: 10px var(--gutter) 16px;
		background: var(--surface);
		border-top: 1px solid var(--line);
		border-bottom: 1px solid var(--line);
		box-shadow: var(--shadow);
		z-index: 30;
	}

	.site-nav.is-open { display: block; }
	.site-nav__list { flex-direction: column; }
	.site-nav__list a { padding: 12px 14px; border-radius: var(--radius-sm); font-size: 1rem; }

	.hero__inner { grid-template-columns: minmax(0, 1fr); }
	.hero__art { order: -1; max-width: 520px; margin-right: 18px; }
	.hero__art img { aspect-ratio: 16 / 9; border-radius: 64px 20px 64px 20px; }
	.hero__art::before { border-radius: 64px 20px 64px 20px; inset: 12px -12px -12px 12px; }

	.card--feature { grid-template-columns: minmax(0, 1fr); }
	.card--feature .card__media { min-height: 0; aspect-ratio: 16 / 10; }

	.site-footer__grid { grid-template-columns: 1fr 1fr; }
	.site-footer__about { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
	body { font-size: 1rem; }

	.site-header__bar { min-height: 64px; gap: 12px; }
	.site-nav { top: 64px; }
	.brand__mark { width: 36px; height: 36px; border-radius: 12px 12px 12px 4px; }
	.brand__mark .icon { width: 20px; height: 20px; }
	.icon-btn { width: 40px; height: 40px; }

	.card-grid { grid-template-columns: minmax(0, 1fr); }
	.rank { grid-template-columns: minmax(0, 1fr); }
	.topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.topic-card { grid-template-columns: 1fr; row-gap: 8px; padding: 14px; }
	.topic-card__icon { grid-row: auto; }

	.search-form__submit { padding: .7em 1em; font-size: .88rem; }
	.search-form > .icon { display: none; }
	.search-form__field { padding-left: 14px; }

	.entry-content .alignleft,
	.entry-content .alignright,
	.entry-content .wp-block-image .alignleft,
	.entry-content .wp-block-image .alignright { max-width: 42%; }

	.entry-content dl { grid-template-columns: minmax(0, 1fr); }
	.entry-content dt { border-bottom: 0; padding-bottom: 2px; background: none; }
	.entry-content dd { padding-top: 0; }

	.post-nav { grid-template-columns: minmax(0, 1fr); }
	.post-nav__link--next { text-align: left; align-items: flex-start; }
	.post-nav > span:empty { display: none; }

	.site-footer__grid { grid-template-columns: minmax(0, 1fr); }
}

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

@media print {
	.site-header,
	.site-footer,
	.sidebar,
	.band,
	.post-nav,
	.comment-respond { display: none !important; }
	body { background: #fff; }
}
