/* ==========================================================================
   Article page (template-parts/sections/single/*.php) — editorial layout in the blog's world:
   graphite wall with its gold kicker, the featured image laid across the wall and the
   porcelain reading area, a comfortable text column with an information panel beside it,
   the previous / next articles and "À lire aussi" with the site's article cards.
   ========================================================================== */

.ar {
	--ar-graphite: #121211;
	--ar-graphite-deep: #0c0c0b;
	--ar-porcelain: #f4f2ee;
	--ar-band: #ebe7df;
	--ar-ink: #141414;
	--ar-text: #34312c;
	--ar-muted: #7d7970;
	--ar-line: #e1dcd2;
	--ar-gold: #c99a3f;
	--ar-gold-soft: #e3c27a;
	--ar-gold-text: #8b6429;
	--ar-head: "Red Hat Display", var(--o-heading, sans-serif);
	--ar-body: var(--font, "Archivo", Arial, sans-serif);
	--ar-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--ar-col: 44rem;
	font-family: var(--ar-body);
	color: var(--ar-text);
}
.ar-wrap {
	width: min(1180px, 100% - 2 * var(--gutter, 20px));
	margin-inline: auto;
}
.ar svg {
	width: 1em;
	height: 1em;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* ------------------------------------------------------------ Hero */
.ar-hero {
	position: relative;
	overflow: hidden;
	color: #fff;
	background:
		radial-gradient(55% 90% at 85% 10%, #2a2621 0%, rgba(42, 38, 33, 0) 70%),
		linear-gradient(180deg, var(--ar-graphite-deep), var(--ar-graphite));
}
/* Grout joints of a tiled wall, fading towards the title. */
.ar-hero__joints {
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
		linear-gradient(180deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
	background-size: 120px 120px;
	background-position: right -1px top -1px;
	-webkit-mask-image: linear-gradient(100deg, transparent 35%, #000 85%);
	mask-image: linear-gradient(100deg, transparent 35%, #000 85%);
	pointer-events: none;
}
.ar-hero__inner {
	position: relative;
	padding: calc(var(--header-h, 76px) + clamp(48px, 6vw, 88px)) 0 clamp(40px, 5vw, 64px);
}
.ar-crumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 0;
	margin: 0 0 clamp(28px, 3.5vw, 44px);
	padding: 0;
	list-style: none;
	font-size: 0.8125rem;
	color: #a9a49a;
}
.ar-crumbs li + li::before {
	content: "/";
	margin: 0 10px;
	color: #5d5a54;
}
.ar-crumbs a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s;
}
.ar-crumbs a:hover,
.ar-crumbs a:focus-visible {
	color: #fff;
}
.ar-hero__cat {
	margin: 0 0 18px;
	font-family: var(--ar-head);
	font-size: 0.9375rem;
	font-weight: 600;
}
.ar-hero__cat a {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	color: var(--ar-gold-soft);
	text-decoration: none;
}
.ar-hero__cat a::before {
	content: "";
	width: 34px;
	height: 1px;
	background: var(--ar-gold);
}
.ar-hero__cat a:hover {
	color: #fff;
}
.ar-hero__title {
	max-width: 21ch;
	margin: 0;
	font-family: var(--ar-head);
	font-size: clamp(2rem, 1.1rem + 3.4vw, 4rem);
	font-weight: 650;
	line-height: 1.06;
	letter-spacing: -0.02em;
	color: #fff;
	text-wrap: balance;
	overflow-wrap: anywhere;
	hyphens: auto;
}
.ar-hero__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 0;
	margin: clamp(22px, 2.5vw, 30px) 0 0;
	font-size: 0.9375rem;
	color: #bdb8ae;
}
.ar-hero__meta > * + * {
	margin-left: 16px;
	padding-left: 16px;
	border-left: 1px solid #4a4741;
}

/* The featured image straddles the wall and the reading area. */
.ar-hero__band {
	position: relative;
	background: linear-gradient(180deg, transparent 0 58%, var(--ar-porcelain) 58%);
}
.ar-hero__media {
	margin: 0 auto;
	padding-bottom: clamp(8px, 1vw, 16px);
}
/* The frame follows the picture: full width, or narrower for a tall picture (never cropped). */
.ar-hero__img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: min(78vh, 860px);
	margin-inline: auto;
	border-radius: 6px;
	background: #1d1c1a;
	box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* One orchestrated arrival: title block, then the image. */
@media (prefers-reduced-motion: no-preference) {
	.ar-hero__inner > * {
		animation: ar-rise 0.9s var(--ar-ease) both;
	}
	.ar-hero__inner > :nth-child(2) { animation-delay: 0.06s; }
	.ar-hero__inner > :nth-child(3) { animation-delay: 0.12s; }
	.ar-hero__inner > :nth-child(4) { animation-delay: 0.2s; }
	.ar-hero__img {
		animation: ar-reveal 1.2s var(--ar-ease) 0.25s both;
	}
}
@keyframes ar-rise {
	from {
		opacity: 0;
		transform: translateY(18px);
	}
}
@keyframes ar-reveal {
	from {
		opacity: 0;
		clip-path: inset(8% 4% 0 4% round 6px);
	}
	to {
		opacity: 1;
		clip-path: inset(0 0 0 0 round 6px);
	}
}

/* ------------------------------------------------------------ Reading area */
.ar-body {
	position: relative;
	padding: clamp(40px, 6vw, 88px) 0 clamp(56px, 7vw, 104px);
	background: var(--ar-porcelain);
}
.ar-body__grid {
	display: grid;
	grid-template-columns: minmax(0, var(--ar-col));
	justify-content: center;
	gap: 36px;
}
@media (min-width: 1100px) {
	.ar-body__grid {
		grid-template-columns: 220px minmax(0, var(--ar-col));
		justify-content: space-between;
		column-gap: clamp(48px, 6vw, 96px);
		max-width: calc(220px + var(--ar-col) + 7vw + 96px);
	}
}

/* Reading progress, along the top of the screen. */
.ar-progress {
	position: fixed;
	top: var(--wp-admin--admin-bar--height, 0px);
	left: 0;
	right: 0;
	z-index: 120;
	height: 3px;
	pointer-events: none;
}
.ar-progress span {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, var(--ar-gold-deep, #8b6429), var(--ar-gold), var(--ar-gold-soft));
	transform: scaleX(var(--ar-read, 0));
	transform-origin: 0 50%;
}

/* Information panel */
.ar-aside__inner {
	display: grid;
	gap: 28px;
}
@media (min-width: 1100px) {
	.ar-aside__inner {
		position: sticky;
		top: calc(var(--header-h, 76px) + 40px);
	}
}
.ar-facts {
	display: grid;
	gap: 18px;
	margin: 0;
	padding: 0 0 26px;
	border-bottom: 1px solid var(--ar-line);
}
.ar-facts dt {
	margin: 0 0 4px;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--ar-muted);
}
.ar-facts dd {
	margin: 0;
	font-family: var(--ar-head);
	font-size: 1rem;
	font-weight: 600;
	color: var(--ar-ink);
}
.ar-facts a {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: var(--ar-gold);
	text-underline-offset: 0.25em;
}
.ar-share__title {
	margin: 0 0 12px;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	color: var(--ar-muted);
}
.ar-share__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.ar-share__btn {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--ar-line);
	border-radius: 50%;
	background: #fff;
	color: var(--ar-ink);
	font-size: 1.05rem;
	cursor: pointer;
	transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.ar-share__btn .icon,
.ar-share__btn svg {
	width: 18px;
	height: 18px;
}
.ar-share__btn:hover,
.ar-share__btn:focus-visible {
	border-color: var(--ar-ink);
	background: var(--ar-ink);
	color: #fff;
}
.ar-share__status {
	min-height: 1.2em;
	margin: 8px 0 0;
	font-size: 0.8125rem;
	color: var(--ar-gold-text);
}
.ar-back {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	width: fit-content;
	font-family: var(--ar-head);
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--ar-ink);
	text-decoration: none;
}
.ar-back svg {
	transition: transform 0.3s var(--ar-ease);
}
.ar-back:hover svg,
.ar-back:focus-visible svg {
	transform: translateX(-4px);
}
.ar-back span {
	background: linear-gradient(var(--ar-gold), var(--ar-gold)) 0 100% / 100% 1px no-repeat;
	padding-bottom: 2px;
}

@media (max-width: 1099px) {
	/* Panel above the text: facts in a row, sharing beside them; the hero already leads back. */
	.ar-aside__inner {
		grid-template-columns: 1fr auto;
		align-items: end;
		gap: 20px 28px;
		padding-bottom: 24px;
		border-bottom: 1px solid var(--ar-line);
	}
	.ar-facts {
		display: flex;
		flex-wrap: wrap;
		gap: 14px 32px;
		padding: 0;
		border: 0;
	}
	.ar-share__title {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
	}
	.ar-share__status {
		position: absolute;
	}
	.ar-aside .ar-back {
		display: none;
	}
}
@media (max-width: 599px) {
	.ar-aside__inner {
		grid-template-columns: 1fr;
	}
}

/* ------------------------------------------------------------ Article text */
.ar-prose {
	min-width: 0;
	font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
	line-height: 1.78;
	color: var(--ar-text);
	overflow-wrap: break-word;
}
/* Empty paragraphs and spacers left by the original page builder. */
.ar-prose p:empty,
.ar-prose p:has(> br:only-child):not(:has(img)) {
	display: none;
}
.ar-prose > :first-child {
	margin-top: 0;
}
.ar-prose > :last-child {
	margin-bottom: 0;
}
.ar-prose p,
.ar-prose ul,
.ar-prose ol,
.ar-prose table {
	margin: 0 0 1.2em;
}
/* Opening paragraph */
.ar-prose > p:first-child {
	font-size: clamp(1.1em, 1em + 0.5vw, 1.22em);
	line-height: 1.6;
	color: var(--ar-ink);
}
.ar-prose h2,
.ar-prose h3,
.ar-prose h4,
.ar-prose .ar-sub {
	font-family: var(--ar-head);
	color: var(--ar-ink);
	letter-spacing: -0.01em;
	text-wrap: balance;
}
.ar-prose h2 {
	position: relative;
	margin: 2.1em 0 0.75em;
	padding-top: 0.9em;
	font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem);
	font-weight: 650;
	line-height: 1.18;
}
/* A short gold joint above each section title. */
.ar-prose h2::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 40px;
	height: 2px;
	background: var(--ar-gold);
}
.ar-prose > h2:first-child {
	padding-top: 0;
}
.ar-prose > h2:first-child::before {
	display: none;
}
.ar-prose h3,
.ar-prose .ar-sub {
	margin: 1.8em 0 0.5em;
	font-size: 1.2em;
	font-weight: 650;
	line-height: 1.3;
}
.ar-prose h4 {
	margin: 1.6em 0 0.4em;
	font-size: 1.05em;
}
.ar-prose h2 + .ar-sub,
.ar-prose h2 + h3 {
	margin-top: 0.6em;
}
.ar-prose strong,
.ar-prose b {
	font-weight: 650;
	color: var(--ar-ink);
}
.ar-prose a {
	color: var(--ar-ink);
	text-decoration: underline;
	text-decoration-color: var(--ar-gold);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.22em;
	transition: color 0.2s, text-decoration-color 0.2s;
}
.ar-prose a:hover {
	color: var(--ar-gold-text);
}

/* Lists: gold tile markers (as elsewhere on the site), numbered steps for ordered lists. */
.ar-prose ul,
.ar-prose ol {
	padding: 0;
	list-style: none;
}
.ar-prose li {
	position: relative;
	padding-left: 1.7em;
}
.ar-prose li + li {
	margin-top: 0.55em;
}
.ar-prose li > p {
	margin: 0;
}
.ar-prose ul > li::before {
	content: "";
	position: absolute;
	top: 0.68em;
	left: 0.25em;
	width: 7px;
	height: 7px;
	border: 1.5px solid var(--ar-gold);
	transform: rotate(45deg);
}
.ar-prose ol {
	counter-reset: ar;
}
.ar-prose ol > li {
	counter-increment: ar;
	padding-left: 2.3em;
}
.ar-prose ol > li::before {
	content: counter(ar, decimal-leading-zero);
	position: absolute;
	top: 0.05em;
	left: 0;
	font-family: var(--ar-head);
	font-size: 0.85em;
	font-weight: 700;
	color: var(--ar-gold-text);
}

/* Quotes */
.ar-prose blockquote {
	position: relative;
	margin: 2em 0;
	padding: 0.2em 0 0.2em 1.4em;
	border-left: 2px solid var(--ar-gold);
	font-family: var(--ar-head);
	font-size: 1.3em;
	font-weight: 500;
	line-height: 1.45;
	color: var(--ar-ink);
}
.ar-prose blockquote p:last-child {
	margin-bottom: 0;
}
.ar-prose blockquote cite {
	display: block;
	margin-top: 0.8em;
	font-family: var(--ar-body);
	font-size: 0.7em;
	font-style: normal;
	color: var(--ar-muted);
}

/* Photos */
.ar-prose img {
	display: block;
	max-width: 100%;
	height: auto;
	border-radius: 4px;
}
.ar-prose > img,
.ar-prose figure {
	margin: 2.2em 0;
}
.ar-prose figure img {
	width: 100%;
}
.ar-prose figcaption {
	margin-top: 0.7em;
	font-size: 0.8125rem;
	color: var(--ar-muted);
}
.ar-prose img[data-ar-zoom] {
	cursor: zoom-in;
}
/* Several photos in a row: a gallery of tiles. */
.ar-gallery {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin: 2.2em 0;
}
.ar-gallery--3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}
.ar-gallery figure,
.ar-gallery > img {
	margin: 0;
}
.ar-gallery img {
	width: 100%;
	height: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform 0.6s var(--ar-ease), filter 0.3s;
}
.ar-gallery figure {
	overflow: hidden;
	border-radius: 4px;
}
.ar-gallery figure:hover img {
	transform: scale(1.03);
}
@media (max-width: 599px) {
	.ar-gallery--3 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* Tables */
.ar-prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9em;
}
.ar-prose th,
.ar-prose td {
	padding: 0.6em 0.8em;
	border-bottom: 1px solid var(--ar-line);
	text-align: left;
}
.ar-prose th {
	font-family: var(--ar-head);
	color: var(--ar-ink);
}
.ar-prose iframe,
.ar-prose video {
	max-width: 100%;
}

/* ------------------------------------------------------------ Previous / next */
.ar-pager {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin-top: clamp(48px, 6vw, 80px);
	padding-top: clamp(28px, 3vw, 40px);
	border-top: 1px solid var(--ar-line);
}
.ar-pager__link {
	display: grid;
	gap: 10px;
	padding: 22px 24px;
	border: 1px solid var(--ar-line);
	border-radius: 8px;
	background: #fff;
	color: var(--ar-ink);
	text-decoration: none;
	transition: border-color 0.3s, box-shadow 0.4s var(--ar-ease), transform 0.4s var(--ar-ease);
}
.ar-pager__link--next {
	grid-column: 2;
	text-align: right;
}
.ar-pager__link--next .ar-pager__label {
	justify-content: flex-end;
}
.ar-pager__link:hover,
.ar-pager__link:focus-visible {
	border-color: var(--ar-gold);
	box-shadow: 0 18px 40px -24px rgba(20, 20, 20, 0.35);
}
.ar-pager__label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--ar-gold-text);
}
.ar-pager__title {
	font-family: var(--ar-head);
	font-size: 1.0625rem;
	font-weight: 650;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
@media (max-width: 699px) {
	.ar-pager {
		grid-template-columns: 1fr;
	}
	.ar-pager__link--next {
		grid-column: auto;
	}
}

/* ------------------------------------------------------------ À lire aussi */
.ar-related {
	padding: clamp(56px, 7vw, 104px) 0;
	background: var(--ar-band);
}
.ar-related__head {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	justify-content: space-between;
	gap: 16px 32px;
	margin-bottom: clamp(28px, 3.5vw, 44px);
}
.ar-related__title {
	margin: 0;
	font-family: var(--ar-head);
	font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem);
	font-weight: 650;
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: var(--ar-ink);
}
.ar-related__all {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	padding: 0 22px;
	border: 1px solid var(--ar-ink);
	border-radius: 999px;
	font-family: var(--ar-head);
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--ar-ink);
	text-decoration: none;
	transition: background-color 0.25s, color 0.25s;
}
.ar-related__all:hover,
.ar-related__all:focus-visible {
	background: var(--ar-ink);
	color: #fff;
}
.ar-related .pc-grid {
	align-items: stretch;
}
@media (max-width: 1023px) {
	.ar-related .pc-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.ar-related .pc:nth-child(3) {
		display: none;
	}
}
@media (max-width: 639px) {
	.ar-related .pc-grid {
		grid-template-columns: 1fr;
	}
	.ar-related .pc:nth-child(3) {
		display: flex;
	}
}

/* ------------------------------------------------------------ Enlarged photo */
.ar-lightbox {
	width: min(1200px, 94vw);
	max-height: 92vh;
	padding: 0;
	border: 0;
	background: transparent;
	overflow: visible;
}
.ar-lightbox::backdrop {
	background: rgba(12, 12, 11, 0.88);
}
.ar-lightbox img {
	display: block;
	max-width: 100%;
	max-height: 88vh;
	margin: 0 auto;
	border-radius: 4px;
}
.ar-lightbox__close {
	position: absolute;
	top: -52px;
	right: 0;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	background: transparent;
	color: #fff;
	font-size: 1.1rem;
	cursor: pointer;
}
.ar-lightbox__close svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
}

/* Focus */
.ar a:focus-visible,
.ar button:focus-visible,
.ar-lightbox button:focus-visible {
	outline: 2px solid var(--ar-gold);
	outline-offset: 3px;
}
