/* --------------------------------------------------------------------------
   1. En-tête d'article avec image à la une
   -------------------------------------------------------------------------- */

#header.has-thumbnail{
	padding-top: 0 !important
}
#header.has-thumbnail article {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: clamp(280px, 55vh, 560px);
	overflow: hidden;
	isolation: isolate;
}

#header.has-thumbnail .header-thumbnail {
	position: absolute;
	inset: 0;
	z-index: -2;
	margin: 0;
}

#header.has-thumbnail .header-thumbnail img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Dégradé pour garantir la lisibilité du titre quelle que soit l'image */
#header.has-thumbnail article::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(to top, rgb(0 0 0 / 0.7) 0%, rgb(0 0 0 / 0.25) 55%, rgb(0 0 0 / 0) 100%);
}

#header.has-thumbnail .header-content {
	width: 100%;
	padding-block: 2.5em;
	color: #fff;
}

#header.has-thumbnail > article .header-content h1, #header.has-thumbnail > article .header-content .h1-like{
	margin: 0;
	color: #fff;
	text-wrap: balance;
}


/* --------------------------------------------------------------------------
   2. Fil d'Ariane SEOPress
   Vérifie le markup généré : SEOPress produit en général
   <nav><ol class="breadcrumb"><li class="breadcrumb-item">…
   avec le séparateur choisi dans ses réglages.
   -------------------------------------------------------------------------- */

#header.has-thumbnail .breadcrumb {color: #fff;}



/* --------------------------------------------------------------------------
   3. Méta de l'article (temps de lecture, dates)
   -------------------------------------------------------------------------- */

.post-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4em 1.2em;
	margin: 0 0 2.5em;
	padding-bottom: 1.2em;
	border-bottom: 1px solid rgb(0 0 0 / 0.1);
	color: var(--onk-text-muted);
	font-size: 0.875em;
}

.post-meta > span {
	display: inline-flex;
	align-items: center;
	gap: 0.3em;
}

/* Point de séparation entre les éléments */
.post-meta > span + span::before {
	content: "";
	width: 0.3em;
	height: 0.3em;
	margin-right: 0.9em;
	border-radius: 50%;
	background-color: currentColor;
	opacity: 0.5;
}

.post-meta__reading {
	color: var(--onk-accent);
	font-weight: 600;
}


/* --------------------------------------------------------------------------
   4. Bloc auteur
   -------------------------------------------------------------------------- */

.author-box {
	display: flex;
	align-items: flex-start;
	gap: 1.5em;
	margin-top: 3em;
	padding: 1.8em;
	border-left: 4px solid var(--onk-accent);
	border-radius: 0 var(--onk-radius) var(--onk-radius) 0;
	background-color: var(--onk-surface);
}

.author-box__avatar {
	flex-shrink: 0;
}

.author-box__avatar img {
	display: block;
	width: 5em;
	height: 5em;
	border-radius: 50%;
	object-fit: cover;
}

.author-box__content > * {
	margin: 0;
}

.author-box__label {
	color: var(--onk-text-muted);
	font-size: 0.8em;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.author-box__name {
	margin-bottom: 0.5em;
	font-size: 1.15em;
	font-weight: 700;
}

.author-box__name a {
	color: inherit;
	text-decoration: none;
}

.author-box__name a:hover,
.author-box__name a:focus-visible {
	color: var(--onk-accent);
}

.author-box__bio {
	font-size: 0.95em;
}

.author-box__bio p {
	margin: 0;
}

.author-box__bio p + p {
	margin-top: 0.6em;
}

@media (max-width: 575px) {
	.author-box {
		flex-direction: column;
		gap: 1em;
		padding: 1.4em;
	}
}


/* --------------------------------------------------------------------------
   5. « À lire également »
   -------------------------------------------------------------------------- */

#next-prev-links {
	padding-block: 3em;
}

#next-prev-links .h2-like {
	margin-bottom: 1.2em;
}

#next-prev-links article:empty {
	display: none; /* article vide servant à équilibrer la grille */
}

#next-prev-links article {
	display: flex;
	flex-direction: column;
	padding: 1.4em;
	border-radius: var(--onk-radius);
	background-color: var(--onk-surface);
	transition: transform 0.2s, box-shadow 0.2s;
}

#next-prev-links article:has(a:hover),
#next-prev-links article:has(a:focus-visible) {
	transform: translateY(-3px);
	box-shadow: 0 0.6em 1.5em rgb(0 0 0 / 0.08);
}

#next-prev-links article > a {
	display: flex;
	flex-direction: column-reverse; /* image au-dessus du titre visuellement, titre en premier dans le DOM */
	gap: 1em;
	color: inherit;
	text-decoration: none;
}

#next-prev-links article img {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	border-radius: calc(var(--onk-radius) / 1.5);
	object-fit: cover;
}

#next-prev-links .post-title {
	margin: 0;
	font-size: 1.15em;
	transition: color 0.2s;
}

#next-prev-links article > a:hover .post-title,
#next-prev-links article > a:focus-visible .post-title {
	color: var(--onk-accent);
}

#next-prev-links article p {
	margin: 0.6em 0 0;
	color: var(--onk-text-muted);
	font-size: 0.9em;
}


/* --------------------------------------------------------------------------
   6. Cartes articles (page Blog)
   -------------------------------------------------------------------------- */
 
#article-grid > article {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border-radius: var(--onk-radius);
	background-color: var(--onk-surface);
	transition: transform 0.25s, box-shadow 0.25s;
}
 
#article-grid > article:has(a:hover),
#article-grid > article:has(a:focus-visible) {
	transform: translateY(-4px);
	box-shadow: 0 0.8em 2em rgb(0 0 0 / 0.08);
}
 
#article-grid > article > a {
	display: block;
	color: inherit;
	text-decoration: none;
}
 
#article-grid > article > a:focus-visible {
	outline: 2px solid var(--onk-accent);
	outline-offset: -2px;
}
 
/* Image : ratio fixe pour aligner toutes les cartes, léger zoom au survol */
#article-grid .post-thumbnail {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	transition: transform 0.4s ease;
}
 
#article-grid > article > a:hover .post-thumbnail {
	transform: scale(1.04);
}
 
#article-grid .post-title {
	margin: 0;
	padding: 1.2em 1.4em 0;
	font-size: 1.2em;
	line-height: 1.3;
	text-wrap: balance;
	transition: color 0.2s;
	text-transform: none;
}
 
#article-grid > article > a:hover .post-title,
#article-grid > article > a:focus-visible .post-title {
	color: var(--onk-accent);
}
 
/* L'extrait pousse vers le bas : les cartes d'une même ligne ont la même hauteur */
#article-grid > article .post-container{
	flex-grow: 1;
	padding: 0.6em 1.4em 1.4em;
}
 
#article-grid .excerpt {
	color: var(--onk-text-muted);
	font-size: 0.9em;
	line-height: 1.55;
}
 
/* Pagination */
.article-pagination {
	margin-top: 3em;
}
 
.article-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.5em;
}
 
.article-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.6em;
	height: 2.6em;
	padding: 0 0.8em;
	border: 1px solid rgb(0 0 0 / 0.15);
	border-radius: 999px;
	color: inherit;
	text-decoration: none;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
 
.article-pagination a.page-numbers:hover,
.article-pagination a.page-numbers:focus-visible {
	border-color: var(--onk-accent);
	color: var(--onk-accent);
}
 
.article-pagination .page-numbers.current {
	border-color: var(--onk-accent);
	background-color: var(--onk-accent);
	color: #fff;
}
 
.article-pagination .page-numbers.dots {
	border-color: transparent;
}
 
 
/* --------------------------------------------------------------------------
   Accessibilité : pas d'animation si l'utilisateur l'a désactivée
   -------------------------------------------------------------------------- */
 
@media (prefers-reduced-motion: reduce) {
	#next-prev-links article,
	#header .breadcrumb a,
	#next-prev-links .post-title,
	#article-grid > article,
	#article-grid .post-thumbnail,
	#article-grid .post-title {
		transition: none;
	}
 
	#next-prev-links article:has(a:hover),
	#article-grid > article:has(a:hover),
	#article-grid > article > a:hover .post-thumbnail {
		transform: none;
	}
}



/* --------------------------------------------------------------------------
   7. Page auteur
   -------------------------------------------------------------------------- */
 
.author-box--archive {
	align-items: center;
	margin-top: 0;
}
 
.author-box--archive .author-box__avatar img {
	width: 8em;
	height: 8em;
}
 
.author-box--archive .author-box__bio {
	font-size: 1em;
}
 