/**
 * Beatrice headless — all rules scoped under body.beatrice-headless.
 * Load order: after theme (enqueue priority 200).
 */

/* Resolve “primary” from block theme, Elementor, Astra, Woodmart, etc. */
body.beatrice-headless {
	--beatrice-accent: var(--wp--preset--color--primary, var(--e-global-color-primary, var(--color-primary, var(--ast-global-color-0, var(--wd-primary-color, #4f46e5)))));
}

/* Pagination is NOT the site menu; themes often style [role="navigation"] as a second header bar. */
body.beatrice-headless .beatrice-pagination[role="navigation"] {
	position: static !important;
	inset: auto !important;
	top: auto !important;
	left: auto !important;
	right: auto !important;
	bottom: auto !important;
	width: auto !important;
	max-width: none !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	z-index: auto !important;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1rem;
}

/* The7 / themes: duplicate .thhf-masthead renders a second “header bar”. */
body.beatrice-headless .thhf-masthead ~ .thhf-masthead {
	display: none !important;
}

/* ——— Shell (inherit fonts from the WordPress theme) ——— */
body.beatrice-headless main.beatrice-headless {
	display: block;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 6vw, 5rem);
	background: #f8fafc;
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	box-sizing: border-box;
}

body.beatrice-headless main.beatrice-headless *,
body.beatrice-headless main.beatrice-headless *::before,
body.beatrice-headless main.beatrice-headless *::after {
	box-sizing: border-box;
}

body.beatrice-headless .beatrice-headless__inner {
	width: 100%;
	max-width: 73.5rem;
	margin-left: auto;
	margin-right: auto;
	padding-left: clamp(1rem, 4vw, 1.75rem);
	padding-right: clamp(1rem, 4vw, 1.75rem);
}

/* ——— Archive /blog ——— */
body.beatrice-headless .beatrice-archive__intro {
	margin-bottom: 2.5rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid #e2e8f0;
}

body.beatrice-headless .beatrice-archive__title {
	margin: 0;
	font-family: inherit;
	font-size: clamp(2rem, 4vw, 2.75rem);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: inherit;
}

body.beatrice-headless .beatrice-archive__empty {
	margin: 3rem 0 0;
	padding: 3rem 1.5rem;
	text-align: center;
	color: #64748b;
	background: #f1f5f9;
	border-radius: 1rem;
}

body.beatrice-headless .beatrice-archive__list {
	list-style: none;
	margin: 2.5rem 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 20.5rem), 1fr));
	gap: clamp(1.25rem, 3vw, 1.75rem);
}

body.beatrice-headless .beatrice-archive__card {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 1rem;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
	transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

body.beatrice-headless .beatrice-archive__card:hover {
	box-shadow: 0 12px 40px -12px rgba(15, 23, 42, 0.15);
	transform: translateY(-3px);
	border-color: #cbd5e1;
}

body.beatrice-headless .beatrice-archive__thumb {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #f1f5f9;
	flex-shrink: 0;
}

body.beatrice-headless .beatrice-archive__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.35s ease;
}

body.beatrice-headless .beatrice-archive__card:hover .beatrice-archive__thumb img {
	transform: scale(1.04);
}

body.beatrice-headless .beatrice-archive__post-title {
	margin: 0;
	padding: 1.25rem 1.35rem 0.65rem;
	font-family: inherit;
	font-size: 1.125rem;
	font-weight: 600;
	line-height: 1.35;
}

body.beatrice-headless .beatrice-archive__post-title a {
	color: inherit;
	text-decoration: none;
	transition: color 0.15s ease;
}

body.beatrice-headless .beatrice-archive__post-title a:hover {
	color: var(--beatrice-accent);
}

body.beatrice-headless .beatrice-archive__excerpt {
	margin: 0;
	padding: 0.35rem 1.35rem 1.5rem;
	font-size: 0.9375rem;
	line-height: 1.55;
	color: #64748b;
	flex-grow: 1;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

body.beatrice-headless .beatrice-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 1rem 1.5rem;
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid #e2e8f0;
}

body.beatrice-headless .beatrice-pagination a {
	display: inline-flex;
	align-items: center;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--beatrice-accent);
	text-decoration: none;
	padding: 0.55rem 1.15rem;
	border-radius: 9999px;
	border: 0;
	background: transparent;
	transition: opacity 0.15s ease, text-decoration 0.15s ease;
}

body.beatrice-headless .beatrice-pagination a:hover {
	opacity: 0.85;
	text-decoration: underline;
	text-underline-offset: 3px;
}

body.beatrice-headless .beatrice-pagination__status {
	font-size: 0.8125rem;
	color: #64748b;
	font-variant-numeric: tabular-nums;
}

/* ——— Single article ——— */
body.beatrice-headless .beatrice-article__intro {
	margin-bottom: 2rem;
}

body.beatrice-headless .beatrice-article__page-title {
	margin: 0 0 0.75rem;
	font-family: inherit;
	font-size: 52px;
	line-height: 1.2;
	font-weight: 800;
	letter-spacing: -0.03em;
	color: inherit;
}

@media (max-width: 640px) {
	body.beatrice-headless .beatrice-article__page-title {
		font-size: clamp(2rem, 8vw, 52px);
	}
}

body.beatrice-headless .beatrice-article__meta {
	font-family: inherit;
	font-size: 0.9375rem;
	color: inherit;
	opacity: 0.8;
}

body.beatrice-headless .beatrice-article__meta time {
	font-variant-numeric: tabular-nums;
}

body.beatrice-headless .beatrice-article__tags {
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

body.beatrice-headless .beatrice-article__tags li {
	font-family: inherit;
	font-size: 0.8125rem;
	font-weight: 500;
	text-transform: capitalize;
	padding: 0.25rem 0.75rem;
	background: #f1f5f9;
	color: inherit;
	opacity: 0.85;
	border-radius: 9999px;
	border: 1px solid #e2e8f0;
}

body.beatrice-headless .beatrice-article__hero {
	margin: 0 0 2.5rem;
	border-radius: 1rem;
	overflow: hidden;
	box-shadow: 0 10px 40px -15px rgba(15, 23, 42, 0.2);
}

body.beatrice-headless .beatrice-article__hero img {
	width: 100%;
	height: auto;
	display: block;
}

/* CMS body: heading sizes only; font family from theme */
body.beatrice-headless .beatrice-article__body {
	font-family: inherit;
	font-size: 1.125rem;
	line-height: 1.75;
	color: inherit;
	max-width: none;
}

body.beatrice-headless .beatrice-article__body > *:first-child {
	margin-top: 0;
}

body.beatrice-headless .beatrice-article__body > *:last-child {
	margin-bottom: 0;
}

body.beatrice-headless .beatrice-article__body h1 {
	font-family: inherit !important;
	font-size: 52px !important;
	line-height: 1.2 !important;
	font-weight: 800 !important;
	margin: 1.25em 0 0.5em;
	color: inherit !important;
	letter-spacing: -0.02em;
}

body.beatrice-headless .beatrice-article__body h2 {
	font-family: inherit !important;
	font-size: 40px !important;
	line-height: 1.25 !important;
	font-weight: 700 !important;
	margin: 1.5em 0 0.5em;
	color: inherit !important;
	letter-spacing: -0.02em;
	padding-bottom: 0.35em;
	border-bottom: 1px solid #e2e8f0;
}

body.beatrice-headless .beatrice-article__body h3 {
	font-family: inherit !important;
	font-size: 32px !important;
	line-height: 1.3 !important;
	font-weight: 700 !important;
	margin: 1.25em 0 0.5em;
	color: inherit !important;
}

body.beatrice-headless .beatrice-article__body h4 {
	font-family: inherit !important;
	font-size: 1.25rem !important;
	font-weight: 600 !important;
	margin: 1.25em 0 0.5em;
	color: inherit !important;
}

body.beatrice-headless .beatrice-article__body p {
	margin: 1.25em 0;
}

body.beatrice-headless .beatrice-article__body a {
	color: var(--beatrice-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
}

body.beatrice-headless .beatrice-article__body a:hover {
	opacity: 0.88;
}

body.beatrice-headless .beatrice-article__body ul,
body.beatrice-headless .beatrice-article__body ol {
	margin: 1.25em 0;
	padding-left: 1.5em;
}

body.beatrice-headless .beatrice-article__body li {
	margin: 0.35em 0;
}

body.beatrice-headless .beatrice-article__body blockquote {
	margin: 1.5em 0;
	padding: 0.75em 0 0.75em 1em;
	border-left: 4px solid var(--beatrice-accent);
	background: #f8fafc;
	border-radius: 0 0.5rem 0.5rem 0;
	color: #475569;
}

body.beatrice-headless .beatrice-article__body img {
	max-width: 100%;
	height: auto;
	border-radius: 0.75rem;
	margin: 1.5em 0;
}

body.beatrice-headless .beatrice-article__body pre {
	background: #1e293b;
	color: #e2e8f0;
	padding: 1rem 1.25rem;
	border-radius: 0.75rem;
	overflow-x: auto;
	font-size: 0.875em;
	line-height: 1.6;
}

body.beatrice-headless .beatrice-article__body code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.9em;
	background: #f1f5f9;
	padding: 0.15em 0.4em;
	border-radius: 0.25rem;
}

body.beatrice-headless .beatrice-article__body pre code {
	background: transparent;
	padding: 0;
	color: inherit;
}

body.beatrice-headless .beatrice-article__body table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375em;
	margin: 1.5em 0;
	font-family: inherit;
}

body.beatrice-headless .beatrice-article__body th,
body.beatrice-headless .beatrice-article__body td {
	border: 1px solid #e2e8f0;
	padding: 0.65em 0.85em;
}

body.beatrice-headless .beatrice-article__body th {
	background: #f1f5f9;
	font-weight: 600;
}

body.beatrice-headless .beatrice-article__body hr {
	border: 0;
	border-top: 1px solid #e2e8f0;
	margin: 2.5em 0;
}

/* Single: main column + sticky “Lire aussi” aside (desktop) */
body.beatrice-headless .beatrice-single__wrap {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	align-items: start;
}

body.beatrice-headless .beatrice-single__main {
	min-width: 0;
}

@media (min-width: 1024px) {
	body.beatrice-headless .beatrice-single__wrap--with-aside {
		grid-template-columns: minmax(0, 1fr) minmax(17rem, 20.5rem);
		gap: clamp(1.5rem, 3vw, 2.5rem);
	}

	body.beatrice-headless .beatrice-single__aside-inner {
		position: sticky;
		top: clamp(5rem, 12vh, 7rem);
	}
}

body.beatrice-headless .beatrice-single__aside {
	min-width: 0;
}

body.beatrice-headless .beatrice-related__title {
	margin: 0 0 1rem;
	font-family: inherit;
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1.25;
	color: inherit;
}

body.beatrice-headless .beatrice-related__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

body.beatrice-headless .beatrice-related__link {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	padding: 0.5rem 0;
	text-decoration: none;
	color: inherit;
	transition: opacity 0.15s ease;
	border-radius: 0.5rem;
}

body.beatrice-headless .beatrice-related__link:hover {
	opacity: 0.88;
}

body.beatrice-headless .beatrice-related__thumb {
	flex-shrink: 0;
	width: 4.25rem;
	height: 4.25rem;
	border-radius: 0.5rem;
	overflow: hidden;
	background: #f1f5f9;
}

body.beatrice-headless .beatrice-related__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

body.beatrice-headless .beatrice-related__text {
	min-width: 0;
	flex: 1;
}

body.beatrice-headless .beatrice-related__post-title {
	display: block;
	font-family: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.4;
	color: inherit;
}

/* FAQ — no top margin (spacing from border/padding only) */
body.beatrice-headless .beatrice-faq {
	margin-top: 0;
	padding-top: 2rem;
	border-top: 1px solid #e2e8f0;
}

body.beatrice-headless .beatrice-faq__title {
	margin: 0 0 1.25rem;
	font-family: inherit;
	font-size: 1.5rem;
	font-weight: 700;
	color: inherit;
}

body.beatrice-headless .beatrice-faq__item {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 0.75rem;
	margin-bottom: 0.65rem;
	overflow: hidden;
}

body.beatrice-headless .beatrice-faq__item summary {
	cursor: pointer;
	list-style: none;
	padding: 1rem 1.15rem;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	color: inherit;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

body.beatrice-headless .beatrice-faq__item summary::-webkit-details-marker {
	display: none;
}

body.beatrice-headless .beatrice-faq__item summary::after {
	content: "";
	width: 0.5rem;
	height: 0.5rem;
	border-right: 2px solid #64748b;
	border-bottom: 2px solid #64748b;
	transform: rotate(45deg);
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

body.beatrice-headless .beatrice-faq__item[open] summary::after {
	transform: rotate(-135deg);
}

body.beatrice-headless .beatrice-faq__item p {
	margin: 0;
	padding: 1.15rem;
	font-size: 0.9375rem;
	line-height: 1.65;
	color: #475569;
	border-top: 1px solid #f1f5f9;
}

body.beatrice-headless .beatrice-back {
	margin: 2.75rem 0 0;
	padding-top: 1.5rem;
	border-top: 1px solid #e2e8f0;
}

body.beatrice-headless .beatrice-back a {
	font-size: 0.9375rem;
	font-weight: 500;
	color: #64748b;
	text-decoration: none;
	transition: color 0.15s ease;
}

body.beatrice-headless .beatrice-back a:hover {
	color: var(--beatrice-accent);
}

@media (prefers-reduced-motion: reduce) {
	body.beatrice-headless .beatrice-archive__card,
	body.beatrice-headless .beatrice-archive__thumb img {
		transition: none;
	}
	body.beatrice-headless .beatrice-archive__card:hover {
		transform: none;
	}
}
