/* ── ARTICLE DE BLOG (single.php) ────────────────────────────────────────────
 * Couleurs = variables du thème (clair/sombre). Seuls les éléments de marque
 * (bandeau de couverture, blocs de code) restent navy dans les deux thèmes.
 * ────────────────────────────────────────────────────────────────────────── */

.art {
	--art-ink: var(--text);          /* titres, gras */
	--art-body: var(--light);        /* texte courant */
	--art-soft: var(--muted);        /* méta, légendes */
	--art-rule: var(--border);
	--art-panel: var(--surface);
	--art-accent: #F5A623;           /* ambre : marqueurs, filets */
	--art-link: #ffc15e;             /* liens et libellés ambre, lisibles sur fond sombre */
	--art-brand: #072638;            /* navy de marque constant */
	--art-brand-2: #0d3a52;

	max-width: 760px;
	margin: 0 auto;
	padding: 3rem 1.5rem 5rem;
	color: var(--art-body);
}
.art--toc { max-width: 1060px; }

/* Ambre foncé en thème clair : l'ambre pur n'atteint pas 4,5:1 sur fond clair. */
[data-theme="light"] .art { --art-link: #9a5a00; }

/* ── En-tête ───────────────────────────────────────────────────────────── */
.art-head { max-width: 700px; }

.art-crumbs {
	display: flex;
	align-items: center;
	gap: .5rem;
	margin-bottom: 1.6rem;
	font-size: .85rem;
	color: var(--art-soft);
}
.art-crumbs a { color: var(--art-soft); }
.art-crumbs a:hover { color: var(--art-link); }

.art-cat {
	display: inline-block;
	margin-bottom: 1rem;
	padding: .3rem .8rem;
	border-radius: 50px;
	background: rgba(245, 166, 35, .14);
	color: var(--art-link);
	font-size: .8rem;
	font-weight: 700;
}

.art-title {
	max-width: 22ch;
	margin: 0 0 1rem;
	font-family: Georgia, serif;
	font-size: clamp(2rem, 4.4vw, 3.15rem);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -.01em;
	color: var(--art-ink);
	text-wrap: balance;
}

.art-lead {
	max-width: 62ch;
	margin: 0 0 1.4rem;
	font-size: 1.22rem;
	line-height: 1.6;
	color: var(--art-body);
}

.art-meta {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem 1.4rem;
	font-size: .88rem;
	color: var(--art-soft);
}
.art-meta span { display: inline-flex; align-items: center; gap: .4rem; }
.art-meta svg { flex-shrink: 0; }

/* ── Couverture ────────────────────────────────────────────────────────── */
.art-cover {
	margin: 2.2rem 0 3rem;
	border-radius: 20px;
	overflow: hidden;
}
.art-cover img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

/* Sans image : bandeau de marque, navy dans les deux thèmes. */
.art-cover--brand {
	position: relative;
	display: flex;
	align-items: center;
	gap: 1.1rem;
	min-height: 180px;
	padding: 2.2rem 2.4rem;
	background: linear-gradient(120deg, var(--art-brand) 0%, var(--art-brand-2) 100%);
}
/* Cercles concentriques : évoque un cylindre de serrure, sans surcharger. */
.art-cover--brand::after {
	content: "";
	position: absolute;
	top: 50%;
	right: -70px;
	width: 300px;
	height: 300px;
	border: 1px solid rgba(245, 166, 35, .28);
	border-radius: 50%;
	box-shadow: 0 0 0 42px rgba(245, 166, 35, .05), 0 0 0 84px rgba(245, 166, 35, .03);
	transform: translateY(-50%);
	pointer-events: none;
}
.art-cover--brand .art-cover-logo {
	width: 56px;
	height: 56px;
	aspect-ratio: auto;
	border-radius: 50%;
	flex-shrink: 0;
}
.art-cover-cat {
	position: relative;
	font-family: Georgia, serif;
	font-size: clamp(1.4rem, 2.6vw, 2rem);
	font-weight: 700;
	color: #ffffff;
}

/* ── Corps : colonne de lecture + sommaire ─────────────────────────────── */
.art-content { max-width: 700px; }

@media (min-width: 1100px) {
	.art--toc .art-body {
		display: grid;
		grid-template-columns: minmax(0, 700px) 250px;
		gap: 4rem;
		align-items: start;
	}
	.art--toc .art-content { grid-column: 1; grid-row: 1; }
	.art--toc .art-aside {
		grid-column: 2;
		grid-row: 1;
		position: sticky;
		top: 100px;
	}
}

/* Sommaire : encart repliable en mobile, liste latérale sur grand écran. */
.art-toc {
	margin: 0 0 2rem;
	border: 1px solid var(--art-rule);
	border-radius: 14px;
	background: var(--art-panel);
}
.art-toc summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: .9rem 1.1rem;
	list-style: none;
	font-size: .92rem;
	font-weight: 700;
	color: var(--art-ink);
	cursor: pointer;
}
.art-toc summary::-webkit-details-marker { display: none; }
.art-toc summary::after {
	content: "";
	width: .45rem;
	height: .45rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform .2s;
}
.art-toc[open] summary::after { transform: rotate(-135deg); }
.art-toc ol {
	margin: 0;
	padding: 0 1.1rem 1rem;
	list-style: none;
}
.art-toc li + li { margin-top: .15rem; }
.art-toc a {
	display: block;
	padding: .35rem 0 .35rem .8rem;
	border-left: 2px solid var(--art-rule);
	font-size: .9rem;
	line-height: 1.4;
	color: var(--art-soft);
}
.art-toc a:hover { color: var(--art-ink); }
.art-toc a[aria-current] {
	border-left-color: var(--art-accent);
	color: var(--art-ink);
	font-weight: 600;
}

.art-aside-cta { display: none; }

@media (min-width: 1100px) {
	.art-toc { margin-bottom: 1.8rem; border: 0; background: none; }
	.art-toc summary { padding: 0 0 .7rem; }
	.art-toc ol { padding: 0; }

	.art-aside-cta {
		display: block;
		padding: 1.2rem;
		border: 1px solid var(--art-rule);
		border-radius: 14px;
		background: var(--art-panel);
	}
	.art-aside-cta p {
		margin: 0 0 .9rem;
		font-size: .88rem;
		line-height: 1.5;
		color: var(--art-body);
	}
	.art-aside-cta .btn-p { padding: .6rem 1.1rem; font-size: .82rem; }
}

/* ── Contenu de l'éditeur ──────────────────────────────────────────────── */
.art-content {
	font-size: 1.125rem;
	line-height: 1.75;
	color: var(--art-body);
	overflow-wrap: break-word;
}
.art-content > * { margin-top: 0; margin-bottom: 0; }
.art-content > * + * { margin-top: 1.25em; }

.art-content h2 {
	margin-top: 2.4em;
	font-family: Georgia, serif;
	font-size: clamp(1.45rem, 2.4vw, 1.8rem);
	line-height: 1.25;
	color: var(--art-ink);
	scroll-margin-top: 100px;
}
.art-content h3 {
	margin-top: 2em;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--art-ink);
	scroll-margin-top: 100px;
}
.art-content h4 {
	margin-top: 1.8em;
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--art-ink);
}
.art-content > h2 + *,
.art-content > h3 + *,
.art-content > h4 + * { margin-top: .6em; }

.art-content strong,
.art-content b { font-weight: 700; color: var(--art-ink); }

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

.art-content ul { list-style: disc; padding-left: 1.3em; }
.art-content ol { list-style: decimal; padding-left: 1.4em; }
.art-content li + li { margin-top: .45em; }
.art-content li::marker { color: var(--art-accent); font-weight: 700; }

.art-content blockquote {
	margin-left: 0;
	margin-right: 0;
	padding: .2em 0 .2em 1.2em;
	border-left: 2px solid var(--art-rule);
	font-family: Georgia, serif;
	font-size: 1.22rem;
	line-height: 1.55;
	color: var(--art-ink);
}
.art-content blockquote p + p { margin-top: .8em; }
.art-content blockquote cite {
	display: block;
	margin-top: .6em;
	font-family: 'DM Sans', sans-serif;
	font-size: .9rem;
	font-style: normal;
	color: var(--art-soft);
}

.art-content figure { margin-left: 0; margin-right: 0; }
.art-content img { border-radius: 14px; }
.art-content figcaption {
	margin-top: .6em;
	font-size: .88rem;
	color: var(--art-soft);
	text-align: center;
}

.art-content hr {
	margin: 2.6em 0;
	border: 0;
	border-top: 1px solid var(--art-rule);
}

.art-content .wp-block-table { overflow-x: auto; }
.art-content table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.art-content th,
.art-content td {
	padding: .7em .9em;
	border-bottom: 1px solid var(--art-rule);
	text-align: left;
	vertical-align: top;
}
.art-content th { font-weight: 700; color: var(--art-ink); background: var(--art-panel); }

.art-content code {
	padding: .1em .35em;
	border: 1px solid var(--art-rule);
	border-radius: 6px;
	background: var(--art-panel);
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: .88em;
	color: var(--art-ink);
}
.art-content pre {
	padding: 1.1em 1.3em;
	border-radius: 14px;
	background: var(--art-brand);
	font-size: .9rem;
	line-height: 1.6;
	color: #e8eef2;
	overflow-x: auto;
}
.art-content pre code { padding: 0; border: 0; background: none; font-size: inherit; color: inherit; }

/* Bloc « Préformaté » utilisé pour du texte : affiché comme de la prose, pas comme du code. */
.art-content pre.wp-block-preformatted {
	padding: 0;
	border-radius: 0;
	background: none;
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	color: inherit;
	white-space: pre-wrap;
	overflow: visible;
}

.art-content iframe { max-width: 100%; border: 0; }
/* Vidéos verticales hébergées sur le site (tutoriels d'installation) */
.art-content .wp-block-video.lky-video-vertical { max-width: 380px; margin: 1.6rem auto; }
.art-content .wp-block-video.lky-video-vertical video { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: 18px; background: #072638; }
.art-content .wp-block-video.lky-video-vertical figcaption { text-align: center; }

.art-content .wp-block-embed.is-type-video iframe {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	border-radius: 14px;
}

.art-content .wp-block-buttons { display: flex; flex-wrap: wrap; gap: .8rem; }
.art-content .wp-block-button__link {
	display: inline-block;
	padding: .75em 1.4em;
	border-radius: 50px;
	background: var(--art-accent);
	color: var(--art-brand);
	font-weight: 700;
	text-decoration: none;
}

/* Encadré inséré dans un article (groupe de classe « cta-inline »). */
.art-content .cta-inline {
	padding: 1.6rem;
	border: 1px solid var(--art-rule);
	border-radius: 18px;
	background: var(--art-panel);
}
.art-content .cta-inline > :first-child { margin-top: 0; }

/* ── Appel à l'action de fin d'article ─────────────────────────────────── */
.art-cta {
	max-width: 700px;
	margin-top: 3.5rem;
	padding: 2.2rem 2.2rem 2.4rem;
	border: 1px solid var(--art-rule);
	border-radius: 20px;
	background: var(--art-panel);
}
.art-cta h2 {
	margin: 0 0 .6rem;
	font-family: Georgia, serif;
	font-size: clamp(1.4rem, 2.4vw, 1.75rem);
	color: var(--art-ink);
}
.art-cta p {
	max-width: 52ch;
	margin: 0 0 1.4rem;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--art-body);
}
.art-cta-btns { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ── Pied d'article : sujets + partage ─────────────────────────────────── */
.art-foot {
	max-width: 700px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 2.4rem;
	padding-top: 1.4rem;
	border-top: 1px solid var(--art-rule);
}
.art-tags {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}
.art-tags a {
	display: inline-block;
	padding: .3rem .75rem;
	border: 1px solid var(--art-rule);
	border-radius: 50px;
	font-size: .82rem;
	color: var(--art-soft);
}
.art-tags a:hover { border-color: var(--art-accent); color: var(--art-ink); }

.art-share { display: flex; gap: .6rem; margin-left: auto; }
.art-share-btn {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	padding: .5rem 1rem;
	border: 1px solid var(--art-rule);
	border-radius: 50px;
	background: none;
	font: inherit;
	font-size: .85rem;
	font-weight: 600;
	color: var(--art-ink);
	cursor: pointer;
}
.art-share-btn:hover { border-color: var(--art-accent); }

/* ── À lire aussi ──────────────────────────────────────────────────────── */
.art-related { margin-top: 4.5rem; }
.art-related h2 {
	margin: 0 0 1.4rem;
	font-family: Georgia, serif;
	font-size: 1.5rem;
	color: var(--art-ink);
}
.art-related-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.6rem;
}
.art-rel { display: flex; flex-direction: column; gap: .5rem; color: inherit; }
.art-rel-img {
	display: block;
	aspect-ratio: 16 / 10;
	border: 1px solid var(--art-rule);
	border-radius: 14px;
	background: var(--art-panel);
	overflow: hidden;
}
.art-rel-img img { width: 100%; height: 100%; object-fit: cover; }
.art-rel-img--brand {
	border: 0;
	background: linear-gradient(120deg, var(--art-brand), var(--art-brand-2));
}
.art-rel-cat { margin-top: .3rem; font-size: .8rem; font-weight: 700; color: var(--art-link); }
.art-rel-title {
	font-family: Georgia, serif;
	font-size: 1.12rem;
	line-height: 1.35;
	color: var(--art-ink);
}
.art-rel:hover .art-rel-title {
	text-decoration: underline;
	text-decoration-color: var(--art-accent);
	text-underline-offset: .2em;
}

/* ── Accessibilité ─────────────────────────────────────────────────────── */
.art a:focus-visible,
.art button:focus-visible,
.art summary:focus-visible {
	outline: 2px solid var(--art-accent);
	outline-offset: 3px;
	border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.art-toc summary::after { transition: none; }
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
	.art-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
	.art { padding: 2rem 1.15rem 4rem; }
	.art-content { font-size: 1.06rem; }
	.art-cover { margin: 1.6rem 0 2.2rem; border-radius: 16px; }
	.art-cover--brand { min-height: 130px; padding: 1.6rem; }
	.art-cta { padding: 1.6rem 1.3rem 1.8rem; }
	.art-related-grid { grid-template-columns: 1fr; }
	.art-share { margin-left: 0; }
}
