/* Miroir de single.php */

.afrotheme-article__header {
	max-width: var(--content-width);
	margin-inline: auto;
	padding-block: var(--space-lg) var(--space-md);
	text-align: center;
}

/* Sans taille propre, ce titre hérite du h1 global (--text-4xl, 48px) à toutes les
   largeurs — sur mobile un H1 serif de 48px enchaîne souvent 3-4 lignes et écrase le
   reste du header d'article. On démarre plus petit et on grandit à partir de 782px,
   même logique que .afrotheme-hero__title (hero.css). */
.afrotheme-article__title {
	margin-block: var(--space-xs) var(--space-sm);
	font-size: var(--text-3xl);
}

@media (min-width: 782px) {
	.afrotheme-article__title {
		font-size: var(--text-4xl);
	}
}

.afrotheme-article__meta {
	display: flex;
	justify-content: center;
	gap: var(--space-sm);
	flex-wrap: wrap;
}

.afrotheme-article__thumbnail {
	max-width: var(--wide-width);
	margin-inline: auto;
	margin-block-end: var(--space-lg);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow-card);
}

.afrotheme-article__thumbnail img {
	width: 100%;
	border-radius: 0;
}

.afrotheme-article__content {
	max-width: var(--content-width);
	margin-inline: auto;
	font-size: var(--text-lg);
	line-height: 1.75;
}

.afrotheme-article__content > * {
	margin-block-end: var(--space-md);
}

/* --- Titres internes au corps d'article --- */
.afrotheme-article__content h2,
.afrotheme-article__content h3,
.afrotheme-article__content h4,
.afrotheme-article__content h5,
.afrotheme-article__content h6 {
	margin-block: var(--space-lg) var(--space-sm);
}

.afrotheme-article__content h2:first-child,
.afrotheme-article__content h3:first-child {
	margin-block-start: 0;
}

/* --- Liens --- */
.afrotheme-article__content a {
	color: var(--color-accent-hover);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

.afrotheme-article__content a:hover {
	color: var(--color-accent);
}

/* --- Emphase --- */
.afrotheme-article__content strong {
	color: var(--color-text);
	font-weight: 700;
}

/* --- Listes --- */
.afrotheme-article__content ul,
.afrotheme-article__content ol {
	padding-inline-start: 1.25em;
}

.afrotheme-article__content li + li {
	margin-block-start: 0.4em;
}

.afrotheme-article__content li > ul,
.afrotheme-article__content li > ol {
	margin-block-start: 0.4em;
}

/* --- Séparateur --- */
.afrotheme-article__content hr {
	margin-block: var(--space-lg);
	border: none;
	border-block-start: var(--border-width) solid var(--color-border);
}

/* --- Citations --- */
.afrotheme-article__content blockquote {
	margin-inline: 0;
	padding-inline-start: var(--space-md);
	border-inline-start: 3px solid var(--color-accent);
	font-style: italic;
	color: var(--color-text-2);
}

.afrotheme-article__content blockquote cite {
	display: block;
	margin-block-start: var(--space-xs);
	font-style: normal;
	font-size: var(--text-sm);
	color: var(--color-text-3);
}

/* --- Code --- */
.afrotheme-article__content code {
	padding: 0.15em 0.4em;
	border-radius: var(--radius-sm);
	background: var(--color-bg-secondary);
	font-size: 0.85em;
}

.afrotheme-article__content pre {
	padding: var(--space-md);
	border-radius: var(--radius-sm);
	background: var(--color-bg-secondary);
	overflow-x: auto;
	font-size: var(--text-sm);
	line-height: 1.6;
}

.afrotheme-article__content pre code {
	padding: 0;
	background: none;
}

/* --- Tableaux --- */
.afrotheme-article__content table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--text-base);
}

.afrotheme-article__content th,
.afrotheme-article__content td {
	padding: var(--space-xs) var(--space-sm);
	border-block-end: var(--border-width) solid var(--color-border);
	text-align: start;
}

.afrotheme-article__content th {
	font-family: var(--font-heading);
	color: var(--color-text);
}

/* --- Images, légendes, alignements --- */
.afrotheme-article__content img {
	border-radius: var(--radius);
}

.afrotheme-article__content figure {
	margin-inline: 0;
}

.afrotheme-article__content figcaption {
	margin-block-start: var(--space-xs);
	font-size: var(--text-sm);
	color: var(--color-text-3);
	text-align: center;
}

.afrotheme-article__content .alignwide {
	max-width: var(--wide-width);
	margin-inline: calc(50% - 50vw + var(--gutter-mobile));
	width: calc(100vw - 2 * var(--gutter-mobile));
}

@media (min-width: 782px) {
	.afrotheme-article__content .alignwide {
		margin-inline: calc(50% - min(var(--wide-width), 100vw) / 2);
		width: min(var(--wide-width), 100vw);
	}
}

.afrotheme-article__content .alignfull {
	max-width: none;
	width: 100vw;
	margin-inline: calc(50% - 50vw);
}

.afrotheme-article__content .alignleft {
	float: left;
	margin-inline-end: var(--space-md);
	margin-block-end: var(--space-xs);
}

.afrotheme-article__content .alignright {
	float: right;
	margin-inline-start: var(--space-md);
	margin-block-end: var(--space-xs);
}

.afrotheme-article__content .aligncenter {
	margin-inline: auto;
}

/* --- Embeds (vidéos etc.) : toujours responsive --- */
.afrotheme-article__content iframe,
.afrotheme-article__content embed,
.afrotheme-article__content video {
	max-width: 100%;
	border-radius: var(--radius-sm);
}

.afrotheme-related-posts {
	max-width: var(--wide-width);
	margin-inline: auto;
}

.afrotheme-related-posts__title {
	text-align: center;
}
