/* ============================================================
   Résineo Guides — archive / index (page 212)
   Hero + filter bar + card grid. Depends on guides-common.css
   design tokens (:root). Scoped under .guide-archive.

   NB: the site root font-size is 10px (62.5%), so font sizes
   here are set in px (matching the guides convention) — never
   rem, which would render at 62.5% of the intended size.
   ============================================================ */

/* Container — mirror the guides-common override so content lines up
   with the top bar / header and never overflows on mobile. */
.guide-archive .container {
	width: 100% !important;
	max-width: var(--container) !important;
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--pad-x);
	padding-right: var(--pad-x);
	box-sizing: border-box;
}
@media (min-width: 1024px) {
	.guide-archive .container {
		padding-left: var(--pad-x-lg);
		padding-right: var(--pad-x-lg);
	}
}

/* ─── Hero ───────────────────────────────────────────────── */
/* Light beige background (--c-brown #C9BBA0, per design). Title text is
   the mockup anthracite (--c-btn #4E4E4E ≈ 4.2:1 on the beige) — large
   heading text, so it clears WCAG AA (3:1). White would be 1.89:1. */
.guide-archive__hero {
	background: #C9BBA0;
	padding: 64px 0 72px;
	text-align: center;
}
.guide-archive__title {
	margin: 0 0 28px;
	color: var(--c-btn);
	line-height: 1.05;
}
.guide-archive__title-top {
	display: block;
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: clamp(28px, 5vw, 44px);
	letter-spacing: -0.01em;
}
.guide-archive__title-em {
	display: block;
	font-family: var(--font-serif);
	font-style: italic;
	font-weight: 400;
	font-size: clamp(30px, 5.5vw, 50px);
}
.guide-archive__cta {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: #fff;
	color: var(--c-btn);
	font-family: var(--font-heading);
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 11px 11px 11px 22px;
	border-radius: 999px;
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.guide-archive__cta:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
	color: var(--c-btn);
}
.guide-archive__cta-arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--c-brown-dark);
	color: #fff;
}
.guide-archive__cta-arrow svg {
	width: 13px;
	height: 13px;
}

/* ─── Body ───────────────────────────────────────────────── */
.guide-archive__body {
	padding: 48px 0 64px;
}

/* ─── Filter bar ─────────────────────────────────────────── */
.guide-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin: 0 0 40px;
}
.guide-filter {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: transparent;
	color: var(--c-btn);
	border: 1px solid var(--c-border);
	font-family: var(--font-heading);
	font-weight: 600;
	font-size: 13px;
	padding: 7px 7px 7px 16px;
	border-radius: 999px;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.guide-filter:hover {
	border-color: var(--c-brown-dark);
	color: var(--c-brown-dark);
}
.guide-filter__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--c-sand);
	color: var(--c-btn);
	transition: background 0.2s ease, color 0.2s ease;
}
.guide-filter__arrow svg {
	width: 11px;
	height: 11px;
}
.guide-filter.is-active {
	background: var(--c-btn);
	color: #fff;
	border-color: var(--c-btn);
}
.guide-filter.is-active .guide-filter__arrow {
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
}

/* ─── Card grid ──────────────────────────────────────────── */
.guide-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px 28px;
}
@media (max-width: 900px) {
	.guide-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 600px) {
	.guide-grid {
		grid-template-columns: 1fr;
	}
	/* Filtres en carrousel horizontal (effet peek) sur mobile */
	.guide-filters {
		flex-wrap: nowrap;
		justify-content: flex-start;
		overflow-x: auto;
		scroll-snap-type: x proximity;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		padding-bottom: 4px;
	}
	.guide-filters::-webkit-scrollbar { display: none; }
	.guide-filter {
		flex: 0 0 auto;
		scroll-snap-align: start;
	}
}
.guide-card {
	display: flex;
}
.guide-card[hidden] {
	display: none;
}
.guide-card__link {
	display: flex;
	flex-direction: column;
	width: 100%;
	text-decoration: none;
	color: inherit;
}
.guide-card__link:hover .guide-card__img {
	transform: scale(1.04);
}
.guide-card__link:hover .guide-card__arrow {
	background: var(--c-brown-dark);
	color: #fff;
}
.guide-card__link:hover .guide-card__title {
	color: var(--c-brown-dark);
}

/* Media */
.guide-card__media {
	position: relative;
	aspect-ratio: 4 / 3;
	border-radius: 14px;
	overflow: hidden;
	background: var(--c-sand-light);
}
.guide-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}
.guide-card__media--fallback {
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--c-cream) 0%, var(--c-sand) 100%);
}
.guide-card__fallback-logo {
	width: 45%;
	max-width: 150px;
	height: auto;
	opacity: 0.45;
}
.guide-card__arrow {
	position: absolute;
	right: 12px;
	bottom: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #fff;
	color: var(--c-brown-dark);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	transition: background 0.2s ease, color 0.2s ease;
}
.guide-card__arrow svg {
	width: 14px;
	height: 14px;
}

/* Body */
.guide-card__body {
	padding: 16px 4px 0;
}
.guide-card__title {
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 17px;
	line-height: 1.3;
	color: var(--c-heading);
	margin: 0 0 8px;
	transition: color 0.2s ease;
}
.guide-card__excerpt {
	font-family: var(--font-sans);
	font-size: 14px;
	line-height: 1.55;
	/* Darker than --c-body (#71797d, 4.43:1) to clear WCAG AA 4.5:1 on white. */
	color: #5b6266;
	margin: 0;
}

/* Empty state (no card in the active filter) */
.guide-grid__empty {
	text-align: center;
	color: #5b6266;
	font-family: var(--font-sans);
	font-size: 15px;
	padding: 32px 0;
}
.guide-grid__empty[hidden] {
	display: none;
}

/* ─── Focus visibility (WCAG 2.4.7) ──────────────────────── */
/* OceanWP zeroes outlines globally; restore a clear keyboard focus
   ring on every interactive element of the archive. */
.guide-filter:focus-visible,
.guide-card__link:focus-visible {
	outline: 3px solid var(--c-brown-dark);
	outline-offset: 2px;
}
/* The CTA is a white pill on the light beige hero — use a dark ring. */
.guide-archive__cta:focus-visible {
	outline: 3px solid var(--c-btn);
	outline-offset: 3px;
}

/* ─── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
	.guide-card__img,
	.guide-card__arrow,
	.guide-archive__cta,
	.guide-filter,
	.guide-filter__arrow {
		transition: none;
	}
	.guide-card__link:hover .guide-card__img {
		transform: none;
	}
}
