/**
 * Guide styles — loaded only on guide pages (archive + single).
 */

/* ===== Guide grid ===== */
.od-guide-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
	gap: var(--wp--preset--spacing--40);
	list-style: none;
	padding: 0;
}

/* ===== Guide card ===== */
.od-guide-card {
	border: 1px solid #e2e8f0;
	border-radius: var(--wp--custom--border-radius--card);
	overflow: hidden;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.1);
	transition: box-shadow var(--wp--custom--transition--fast), transform var(--wp--custom--transition--fast);
	background: var(--wp--preset--color--white);
}

.od-guide-card:hover {
	box-shadow: var(--wp--custom--shadow--card-hover);
	transform: translateY(-2px);
}

/* Overlay link: covers entire card for click, avoids wpautop <a><div> corruption */
.od-guide-card {
	position: relative;
}
.od-guide-card__link {
	position: absolute;
	inset: 0;
	z-index: 1;
	text-decoration: none;
}
.od-guide-card a {
	text-decoration: none;
	color: inherit;
}

.od-guide-card__image {
	aspect-ratio: 16/9;
	background: var(--wp--preset--color--surface);
	overflow: hidden;
}

.od-guide-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.od-guide-card__body {
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	flex: 1;
}

.od-guide-card {
	display: flex;
	flex-direction: column;
}

.od-guide-card__title {
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	color: var(--wp--preset--color--primary);
	margin: 0 0 0.5rem;
	line-height: 1.3;
}

.od-guide-card__excerpt {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	margin: 0 0 0.75rem;
	line-height: 1.5;
}

.od-guide-card__meta {
	font-size: 0.75rem;
	color: var(--wp--preset--color--muted);
	margin-top: auto;
}

/* ===== Guide article ===== */
.od-guide-article {
	max-width: 800px;
	margin: 0 auto;
	line-height: 1.7;
	font-size: clamp(1.0625rem, 1.5vw, 1.125rem);
}

/* Heading hierarchy — clear visual distinction */
.od-guide-article h2 {
	font-size: 1.5rem;
	margin-top: 2.5rem;
	margin-bottom: 1rem;
	line-height: 1.25;
}

.od-guide-article h3 {
	font-size: 1.25rem;
	margin-top: 2rem;
	margin-bottom: 0.75rem;
	line-height: 1.3;
}

.od-guide-article p {
	margin-bottom: 1rem;
}

/* ===== Guide featured image ===== */
.od-guide-featured {
	aspect-ratio: 16/9;
	border-radius: var(--wp--custom--border-radius--card);
	overflow: hidden;
	margin-bottom: var(--wp--preset--spacing--40);
}

.od-guide-featured img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ===== Guide CTA ===== */
.od-guide-cta {
	background: var(--wp--preset--color--surface);
	border-radius: var(--wp--custom--border-radius--card);
	padding: var(--wp--preset--spacing--50);
	text-align: center;
	margin: var(--wp--preset--spacing--50) 0;
}

.od-guide-cta h3 {
	margin: 0 0 0.75rem;
	color: var(--wp--preset--color--primary);
}

.od-guide-cta p {
	margin: 0 0 1rem;
	color: var(--wp--preset--color--muted);
}

/* ===== Related guides ===== */
.od-related-guides {
	border-top: 1px solid var(--wp--preset--color--surface);
	padding-top: var(--wp--preset--spacing--50);
	margin-top: var(--wp--preset--spacing--50);
}

.od-related-guides .od-guide-grid {
	margin-top: var(--wp--preset--spacing--30);
	grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 600px) {
	.od-related-guides .od-guide-grid {
		grid-template-columns: 1fr;
	}
}

/* ===== Back link ===== */
.od-guide-back {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--secondary);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	margin-bottom: var(--wp--preset--spacing--30);
}

.od-guide-back:hover {
	color: var(--wp--preset--color--primary);
}

/* ===== Reading time ===== */
.od-reading-time {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	margin-bottom: var(--wp--preset--spacing--30);
}

/* ===== Table of contents ===== */
.od-guide-toc {
	background: var(--wp--preset--color--surface, #F7FAFC);
	border-radius: var(--wp--custom--border-radius--card, 8px);
	padding: 1.25rem 1.5rem;
	margin-bottom: var(--wp--preset--spacing--50);
}
.od-guide-toc__title {
	font-weight: 700;
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--primary);
	margin: 0 0 0.75rem;
}
.od-guide-toc ol {
	margin: 0;
	padding-left: 1.25rem;
	list-style: decimal;
}
.od-guide-toc li {
	margin-bottom: 0.35rem;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.5;
}
.od-guide-toc a {
	color: var(--wp--preset--color--secondary);
	text-decoration: none;
}
.od-guide-toc a:hover {
	text-decoration: underline;
}

/* ===== "À retenir" callout box ===== */
.od-guide-callout {
	background: #EDF2F7;
	border: 1px solid #CBD5E0;
	border-left: 4px solid var(--wp--preset--color--accent, #2c7a7b);
	border-radius: 0 var(--wp--custom--border-radius--badge, 4px) var(--wp--custom--border-radius--badge, 4px) 0;
	padding: 1rem 1.25rem;
	margin: 1.5rem 0;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.6;
}
.od-guide-callout strong:first-child {
	display: block;
	color: var(--wp--preset--color--accent, #2c7a7b);
	margin-bottom: 0.25rem;
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

/* ===== Guide article: measure (68-72 chars) ===== */
.od-guide-article p,
.od-guide-article li {
	max-width: 65ch;
}

/* ===== Publication date ===== */
.od-guide-date {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	margin-bottom: var(--wp--preset--spacing--20);
}
