/*
 * Aries — article-builder.css
 * ---------------------------------------------------------------------------
 * Habillage des blocs éditoriaux du CPT `publication` (titre, texte,
 * texte-photo, image, citation), du single, de l'archive et des pages
 * catégorie.
 *
 * ⚠️ FICHIER ÉCRIT À LA MAIN — VOLONTAIREMENT HORS DU BUILD VITE.
 * Le thème compile Tailwind 4 en JIT et `node_modules` n'est pas versionné :
 * introduire de nouvelles classes utilitaires imposerait un
 * `npm install && npm run build` sur un site en production. On écrit donc du
 * CSS pur, enqueue directement depuis `assets/` (cf. inc/enqueue.php), en
 * réutilisant les tokens de la charte déclarés dans `assets/css/app.css`
 * (`--primary`, `--ink`, `--muted`, `--line`, `--accent`…).
 *
 * Ce fichier n'est PAS une entrée de `vite.config.js` : un futur
 * `npm run build` ne le touche pas et ne le supprime pas (emptyOutDir ne vide
 * que `dist/`). Si un jour le build redevient possible, l'importer depuis
 * app.css et retirer l'enqueue dédié.
 *
 * Breakpoints alignés sur app.css : 980px et 560px.
 */

/* ---------------------------------------------------------------------------
 * En-tête d'article (single)
 * ------------------------------------------------------------------------- */
.art-hero {
	padding: 56px 0 0;
}
.art-hero__inner {
	max-width: 780px;
}
.art-hero__back {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	font-weight: 700;
	font-size: .9rem;
	color: var(--primary);
	text-decoration: none;
	margin-bottom: 22px;
}
.art-hero__back .arw {
	transition: transform .2s ease;
}
.art-hero__back:hover .arw {
	transform: translateX(-5px);
}
.art-hero h1 {
	font-size: clamp(1.9rem, 3.8vw, 2.9rem);
	font-weight: 700;
	letter-spacing: -.01em;
	margin: 14px 0 0;
}
.art-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 20px;
	font-size: .88rem;
	color: var(--muted);
}
.art-meta time {
	font-weight: 600;
}
.art-meta .dot {
	opacity: .45;
}
.art-meta a {
	color: var(--primary);
	font-weight: 700;
	text-decoration: none;
}
.art-meta a:hover {
	color: var(--primary-dark);
}
.art-hero__cover {
	margin-top: 36px;
	border-radius: 22px;
	overflow: hidden;
	box-shadow: var(--shadow);
	background: var(--secondary-soft);
	aspect-ratio: 16 / 8;
}
.art-hero__cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ---------------------------------------------------------------------------
 * Corps de l'article — rythme vertical commun aux blocs du builder
 * ------------------------------------------------------------------------- */
.art-body {
	padding: 12px 0 84px;
}
.art-block {
	padding: 22px 0;
}
.art-block + .art-block {
	padding-top: 0;
}

/* Colonne de lecture : mesure confortable (~68 caractères). */
.art-measure {
	max-width: 780px;
	margin-left: auto;
	margin-right: auto;
}
.art-measure--wide {
	max-width: 1020px;
}

/* ---------------------------------------------------------------------------
 * Bloc « Titre »
 * ------------------------------------------------------------------------- */
.art-titre {
	padding-top: 34px;
}
.art-titre__sur {
	display: block;
	margin-bottom: 10px;
}
.art-titre h2 {
	font-size: clamp(1.5rem, 2.6vw, 2rem);
	font-weight: 600;
	margin: 0;
}
.art-titre h3 {
	font-size: clamp(1.22rem, 2vw, 1.5rem);
	font-weight: 600;
	margin: 0;
}
.art-titre .accent-word,
.art-titre em {
	color: var(--primary);
	font-style: normal;
}

/* ---------------------------------------------------------------------------
 * Typographie de contenu (WYSIWYG) — partagée par « Texte » et « Texte + photo »
 * ------------------------------------------------------------------------- */
.art-prose {
	color: var(--ink);
	font-size: 1.05rem;
	line-height: 1.75;
}
.art-prose > :first-child {
	margin-top: 0;
}
.art-prose > :last-child {
	margin-bottom: 0;
}
.art-prose p {
	margin: 0 0 1.15em;
}
.art-prose h2,
.art-prose h3,
.art-prose h4 {
	font-family: var(--font-display);
	color: var(--ink);
	line-height: 1.25;
	margin: 1.9em 0 .6em;
}
.art-prose h2 {
	font-size: 1.55rem;
	font-weight: 600;
}
.art-prose h3 {
	font-size: 1.28rem;
	font-weight: 600;
}
.art-prose h4 {
	font-size: 1.08rem;
	font-weight: 700;
}
.art-prose strong {
	font-weight: 700;
	color: var(--ink);
}
.art-prose em {
	font-style: italic;
}
.art-prose a {
	color: var(--primary);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: rgba(60, 110, 131, .35);
	transition: color .2s ease, text-decoration-color .2s ease;
}
.art-prose a:hover {
	color: var(--accent);
	text-decoration-color: var(--accent);
}
.art-prose ul,
.art-prose ol {
	margin: 0 0 1.15em;
	padding-left: 1.35em;
}
.art-prose ul {
	list-style: none;
	padding-left: 0;
}
.art-prose ul li {
	position: relative;
	padding-left: 1.6em;
	margin-bottom: .5em;
}
.art-prose ul li::before {
	content: "";
	position: absolute;
	left: .25em;
	top: .62em;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--accent);
}
.art-prose ol {
	list-style: decimal;
}
.art-prose ol li {
	margin-bottom: .5em;
	padding-left: .25em;
}
.art-prose ol li::marker {
	color: var(--primary);
	font-weight: 700;
}
.art-prose blockquote {
	margin: 1.6em 0;
	padding: 4px 0 4px 22px;
	border-left: 3px solid var(--accent);
	font-family: var(--font-display);
	font-style: italic;
	font-size: 1.14rem;
	color: var(--primary-dark);
}
.art-prose blockquote p:last-child {
	margin-bottom: 0;
}
.art-prose img {
	max-width: 100%;
	height: auto;
	border-radius: 14px;
	display: block;
	margin: 1.6em 0;
}
.art-prose hr {
	border: 0;
	border-top: 1px solid var(--line);
	margin: 2.2em 0;
}
.art-prose table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.6em 0;
	font-size: .96rem;
}
.art-prose th,
.art-prose td {
	border: 1px solid var(--line);
	padding: 10px 14px;
	text-align: left;
}
.art-prose th {
	background: var(--secondary-soft);
	font-weight: 700;
	color: var(--primary-dark);
}

/* ---------------------------------------------------------------------------
 * Bloc « Texte + photo »
 * ------------------------------------------------------------------------- */
.art-tp__grid {
	display: grid;
	grid-template-columns: .92fr 1.08fr;
	gap: 44px;
	align-items: center;
}
.art-tp__grid--right .art-tp__media {
	order: 2;
}
.art-tp__media {
	margin: 0; /* <figure> — neutralise la marge UA. */
	border-radius: 20px;
	overflow: hidden;
	box-shadow: var(--shadow);
	background: var(--secondary-soft);
	aspect-ratio: 4 / 3;
}
.art-tp__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	/* Neutralise les marges de .art-prose img si l'image est héritée. */
	margin: 0;
	border-radius: 0;
}
.art-tp__title {
	font-size: 1.35rem;
	font-weight: 600;
	margin: 0 0 14px;
}

/* ---------------------------------------------------------------------------
 * Bloc « Image »
 * ------------------------------------------------------------------------- */
.art-figure {
	margin: 0;
}
.art-figure__media {
	border-radius: 20px;
	overflow: hidden;
	box-shadow: var(--shadow);
	background: var(--secondary-soft);
}
.art-figure__media img {
	width: 100%;
	height: auto;
	display: block;
}
.art-figure figcaption {
	margin-top: 12px;
	font-size: .88rem;
	color: var(--muted);
	line-height: 1.5;
	text-align: center;
}

/* ---------------------------------------------------------------------------
 * Bloc « Citation »
 * ------------------------------------------------------------------------- */
.art-quote {
	margin: 0;
	background: var(--secondary-soft);
	border-radius: 22px;
	padding: 40px 44px;
	position: relative;
}
.art-quote::before {
	content: "”";
	position: absolute;
	top: 6px;
	left: 24px;
	font-family: var(--font-display);
	font-size: 5rem;
	line-height: 1;
	color: var(--primary);
	opacity: .18;
	pointer-events: none;
}
.art-quote blockquote {
	margin: 0;
	position: relative;
	font-family: var(--font-display);
	font-style: italic;
	font-weight: 400;
	font-size: 1.32rem;
	line-height: 1.55;
	color: var(--primary-dark);
}
.art-quote figcaption {
	margin-top: 18px;
	font-family: var(--font-body);
	font-weight: 700;
	font-size: .8rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--primary);
}

/* ---------------------------------------------------------------------------
 * Pied d'article — partage + navigation entre articles
 * ------------------------------------------------------------------------- */
.art-foot {
	max-width: 780px;
	margin: 48px auto 0;
	padding-top: 28px;
	border-top: 1px solid var(--line);
}
.art-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
}
.art-nav__link {
	display: block;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 16px;
	padding: 18px 22px;
	text-decoration: none;
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.art-nav__link:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow-sm);
	border-color: var(--secondary);
}
.art-nav__link--next {
	text-align: right;
}
.art-nav__label {
	display: block;
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--accent);
	margin-bottom: 6px;
}
.art-nav__title {
	display: block;
	font-family: var(--font-display);
	font-weight: 600;
	font-size: 1rem;
	color: var(--ink);
	line-height: 1.35;
}

/* ---------------------------------------------------------------------------
 * Archive & catégories
 * ------------------------------------------------------------------------- */
.art-archive__head {
	max-width: 720px;
}
.art-archive__head h1 {
	margin-top: 14px;
}
.art-archive__head .lead {
	margin-top: 16px;
}
.art-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 34px 0 0;
	padding: 0;
	list-style: none;
}
.art-filters a {
	display: inline-flex;
	align-items: center;
	font-family: var(--font-body);
	font-weight: 700;
	font-size: .86rem;
	padding: 9px 18px;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: var(--surface);
	color: var(--primary);
	text-decoration: none;
	transition: all .2s ease;
}
.art-filters a:hover {
	border-color: var(--secondary);
	background: var(--secondary-soft);
}
.art-filters a[aria-current="page"] {
	background: var(--primary);
	border-color: var(--primary);
	color: #fff;
}

/* Carte d'aperçu : complète `.ncard` d'app.css avec un extrait et une
   catégorie, sans en modifier le socle. */
.ncard .nmeta {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}
.ncard .ncat {
	display: inline-block;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--primary);
	background: var(--secondary-soft);
	border-radius: 999px;
	padding: 4px 11px;
}
.ncard .nexc {
	margin: 10px 0 0;
	font-size: .93rem;
	color: var(--muted);
	line-height: 1.6;
}
.ncard .nmore {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	margin-top: 16px;
	font-weight: 700;
	font-size: .9rem;
	color: var(--primary);
}
.ncard:hover .nmore .arw {
	transform: translateX(5px);
}

/* Pagination WordPress (`the_posts_pagination`). */
.art-pagination {
	margin-top: 52px;
}
.art-pagination .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
/* `.nav-links` est aussi la classe du menu principal (app.css) : on neutralise
   le soulignement animé `.nav-links a::after` sur la pagination. */
.art-pagination .nav-links a::after {
	content: none;
}
.art-pagination .nav-links {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.art-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 12px;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: var(--surface);
	color: var(--primary);
	font-weight: 700;
	font-size: .93rem;
	text-decoration: none;
	transition: all .2s ease;
}
.art-pagination .page-numbers:hover {
	border-color: var(--secondary);
	background: var(--secondary-soft);
}
.art-pagination .page-numbers.current {
	background: var(--primary);
	border-color: var(--primary);
	color: #fff;
}
.art-pagination .page-numbers.dots {
	border-color: transparent;
	background: none;
}

/* Message « aucun article ». */
.art-empty {
	text-align: center;
	max-width: 520px;
	margin: 0 auto;
	padding: 56px 0;
}
.art-empty p {
	color: var(--muted);
	margin-top: 12px;
}

/* ---------------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------------- */
@media (max-width: 980px) and (min-width: 561px) {
	/* `.news` d'app.css passe de 3 à 1 colonne dès 980px : sur les listings
	   de publications on garde une étape à 2 colonnes. */
	.art-archive .news {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 980px) {
	.art-hero {
		padding-top: 40px;
	}
	.art-hero__cover {
		aspect-ratio: 16 / 10;
		border-radius: 18px;
	}
	.art-tp__grid {
		grid-template-columns: 1fr;
		gap: 26px;
	}
	.art-tp__grid--right .art-tp__media {
		order: 0; /* en colonne unique, l'image repasse toujours au-dessus. */
	}
	.art-body {
		padding-bottom: 64px;
	}
}

@media (max-width: 560px) {
	.art-quote {
		padding: 30px 26px;
	}
	.art-quote blockquote {
		font-size: 1.14rem;
	}
	.art-nav {
		grid-template-columns: 1fr;
	}
	.art-nav__link--next {
		text-align: left;
	}
	.art-prose {
		font-size: 1rem;
	}
}
