/*
 * Mise en forme des articles du blog (type de contenu « conseil »).
 * Chargé uniquement sur les articles, l'archive et les pages « public ».
 * Couleurs à ajuster ici si besoin.
 */
body.single-conseil,
body.post-type-archive-conseil,
body.tax-public_cible {
	--vr-navy: #191c37;
	--vr-accent: #a67b5b;
	--vr-text-width: 720px;
	--vr-wide-width: 1080px;
}

/* --- Bandeau du titre --- */
body.single-conseil .wp-block-post-title {
	font-size: clamp(1.9rem, 1.2rem + 2.2vw, 2.9rem);
	line-height: 1.15;
	max-width: 22em;
	margin-inline: auto;
	text-wrap: balance;
}

/* --- Image mise en avant : plus large que le texte --- */
body.single-conseil .wp-block-post-featured-image {
	max-width: var(--vr-wide-width) !important;
	margin-inline: auto;
	margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

body.single-conseil .wp-block-post-featured-image img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 4px;
}

/* --- Colonne de texte --- */
body.single-conseil .wp-block-post-content > * {
	max-width: var(--vr-text-width) !important;
	margin-inline: auto !important;
}

body.single-conseil .wp-block-post-content {
	padding-bottom: clamp(3rem, 7vw, 6rem);
}

body.single-conseil .wp-block-post-content > p,
body.single-conseil .wp-block-post-content > ul,
body.single-conseil .wp-block-post-content > ol {
	font-size: 1.125rem;
	line-height: 1.75;
	margin-block: 0 1.4em;
}

/* Premier paragraphe : chapeau */
body.single-conseil .wp-block-post-content > p:first-child {
	font-size: 1.3rem;
	line-height: 1.6;
	color: var(--vr-navy);
}

/* --- Intertitres --- */
body.single-conseil .wp-block-post-content > h2 {
	font-size: clamp(1.45rem, 1.1rem + 1vw, 1.85rem);
	line-height: 1.25;
	margin-block: 2.6em 0.8em;
	padding-top: 1.1em;
	border-top: 1px solid rgba(25, 28, 55, 0.12);
	text-wrap: balance;
}

body.single-conseil .wp-block-post-content > h3 {
	font-size: 1.3rem;
	line-height: 1.3;
	margin-block: 2em 0.6em;
}

/* --- Liens dans le texte --- */
body.single-conseil .wp-block-post-content a:not(.wp-block-button__link) {
	color: var(--vr-navy);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: var(--vr-accent);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.2em;
}

body.single-conseil .wp-block-post-content a:not(.wp-block-button__link):hover,
body.single-conseil .wp-block-post-content a:not(.wp-block-button__link):focus-visible {
	color: var(--vr-accent);
}

/* --- Encart d'appel à l'action : groupe de blocs avec la classe « vr-cta » --- */
body.single-conseil .wp-block-post-content > .vr-cta {
	margin-top: 3.5em !important;
	margin-bottom: 3.5em !important;
	padding: 2em 2.2em;
	background: #fff;
	border-left: 4px solid var(--vr-accent);
	box-shadow: 0 10px 30px rgba(25, 28, 55, 0.07);
	color: var(--vr-navy);
}

body.single-conseil .wp-block-post-content > .vr-cta:last-child {
	margin-bottom: 0 !important;
}

body.single-conseil .vr-cta p {
	font-size: 1.125rem;
	line-height: 1.75;
	margin: 0 0 1.4em;
}

body.single-conseil .vr-cta > :last-child {
	margin-bottom: 0;
}

@media (max-width: 600px) {
	body.single-conseil .wp-block-post-content > p,
	body.single-conseil .wp-block-post-content > ul,
	body.single-conseil .wp-block-post-content > ol {
		font-size: 1.05rem;
	}

	body.single-conseil .wp-block-post-content > p:first-child {
		font-size: 1.15rem;
	}

	body.single-conseil .wp-block-post-content > .vr-cta {
		padding: 1.5em 1.3em;
	}

	body.single-conseil .vr-cta p {
		font-size: 1.05rem;
	}
}

/* ==========================================================================
   Articles similaires : code court [virtuose_articles_similaires]
   ========================================================================== */

.vr-similaires {
	max-width: var(--vr-wide-width, 1080px);
	margin: 0 auto;
	padding: clamp(2.5rem, 6vw, 4.5rem) 1.25rem;
	border-top: 1px solid rgba(25, 28, 55, 0.12);
}

.vr-similaires__titre {
	margin: 0 0 1.5em;
	font-size: clamp(1.4rem, 1.1rem + 1vw, 1.8rem);
	text-align: center;
}

.vr-similaires ul {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: clamp(1.5rem, 3vw, 2.25rem);
	margin: 0;
	padding: 0;
	list-style: none;
}

.vr-similaires__image {
	display: block;
	overflow: hidden;
	border-radius: 4px;
	margin-bottom: 1rem;
	background: rgba(25, 28, 55, 0.06);
	aspect-ratio: 3 / 2;
}

.vr-similaires__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.vr-similaires li:hover .vr-similaires__image img {
	transform: scale(1.04);
}

.vr-similaires__public {
	margin: 0 0 0.4rem;
	font-size: 0.8rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	opacity: 0.65;
}

.vr-similaires h3 {
	margin: 0;
	font-size: 1.15rem;
	line-height: 1.3;
}

.vr-similaires h3 a {
	color: var(--vr-navy, #191c37);
	text-decoration: none;
}

.vr-similaires h3 a:hover,
.vr-similaires h3 a:focus-visible {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.2em;
}

@media (prefers-reduced-motion: reduce) {
	.vr-similaires__image img {
		transition: none;
		transform: none !important;
	}
}

/* ==========================================================================
   Filtre par public : code court [virtuose_filtre_publics]
   La grille de l'archive elle-même se règle dans l'éditeur de site.
   ========================================================================== */

.vr-filtre {
	margin: 0 auto clamp(2rem, 4vw, 3rem);
}

.vr-filtre ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.6rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.vr-filtre a {
	display: inline-block;
	padding: 0.55em 1.3em;
	border: 1px solid rgba(25, 28, 55, 0.25);
	border-radius: 999px;
	color: var(--vr-navy);
	font-size: 0.95rem;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.vr-filtre a:hover,
.vr-filtre a:focus-visible {
	border-color: var(--vr-navy);
}

.vr-filtre a[aria-current="page"] {
	background: var(--vr-navy);
	border-color: var(--vr-navy);
	color: #fff;
}
