:root {
	--ink: #141a2e;
	--ink-soft: #3c4459;
	--muted: #6b7285;
	--line: #e6e8ef;
	--bg: #ffffff;
	--bg-alt: #f5f6fa;
	--accent: #ef4b4b;
	--accent-dark: #d63a3a;
	--hero-from: #141a2e;
	--hero-to: #2c3c6b;
	--footer-bg: #1c2029;
	--footer-text: #b9bfcc;
	--radius: 14px;
	--radius-sm: 10px;
	--shadow: 0 10px 30px rgba(20, 26, 46, 0.08);
	--shadow-lg: 0 24px 60px rgba(20, 26, 46, 0.22);
	--container: 1200px;
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.6;
	color: var(--ink);
	background: var(--bg);
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: var(--accent);
}

h1, h2, h3 {
	line-height: 1.2;
	margin: 0 0 0.5em;
}

.container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 24px;
}

.container--narrow {
	max-width: 800px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.skip-link:focus {
	position: fixed !important;
	top: 8px;
	left: 8px;
	width: auto;
	height: auto;
	clip: auto;
	z-index: 1000;
	padding: 8px 16px;
	background: #fff;
	color: var(--ink);
	border-radius: var(--radius-sm);
}

.button {
	display: inline-block;
	padding: 0.8rem 1.6rem;
	border-radius: var(--radius-sm);
	background: var(--accent);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	border: 0;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
}

.button:hover {
	background: var(--accent-dark);
}

.button--light {
	background: #fff;
	color: var(--accent);
}

.button--light:hover {
	background: #fff5f5;
	transform: translateY(-1px);
}

/* ---------- Header ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: saturate(180%) blur(8px);
	border-bottom: 1px solid var(--line);
}

.admin-bar .site-header {
	top: 32px;
}

.site-header__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 72px;
}

.site-brand {
	flex: 0 0 auto;
}

.site-brand__name {
	font-size: 1.4rem;
	font-weight: 800;
	letter-spacing: -0.02em;
	color: var(--ink);
	text-decoration: none;
}

.custom-logo {
	max-height: 48px;
	width: auto;
}

.site-nav {
	display: flex;
	align-items: center;
	gap: 24px;
	margin-left: auto;
}

.primary-nav__list {
	display: flex;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.primary-nav__list a {
	display: block;
	padding: 8px 14px;
	border-radius: 8px;
	color: var(--ink-soft);
	font-weight: 600;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.primary-nav__list a:hover,
.primary-nav__list .current-menu-item > a,
.primary-nav__list .current_page_parent > a {
	background: var(--bg-alt);
	color: var(--ink);
}

.lang-switcher {
	display: flex;
	gap: 2px;
	list-style: none;
	margin: 0;
	padding: 3px;
	background: var(--bg-alt);
	border-radius: 999px;
}

.lang-switcher a {
	display: block;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--muted);
	text-decoration: none;
}

.lang-switcher a.is-active {
	background: #fff;
	color: var(--ink);
	box-shadow: 0 1px 3px rgba(20, 26, 46, 0.12);
}

.nav-toggle {
	display: none;
	margin-left: auto;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: var(--radius-sm);
	background: var(--bg-alt);
	cursor: pointer;
	position: relative;
}

.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
	position: absolute;
	left: 12px;
	width: 20px;
	height: 2px;
	background: var(--ink);
	border-radius: 2px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle__bars {
	top: 21px;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
	content: "";
	left: 0;
}

.nav-toggle__bars::before {
	top: -6px;
}

.nav-toggle__bars::after {
	top: 6px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
	background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
	transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
	transform: translateY(-6px) rotate(-45deg);
}

/* ---------- Hero ---------- */
.hero {
	position: relative;
	padding: 96px 0 104px;
	color: #fff;
	background:
		radial-gradient(circle at 85% 15%, rgba(239, 75, 75, 0.35), transparent 45%),
		radial-gradient(circle at 10% 90%, rgba(99, 132, 255, 0.25), transparent 40%),
		linear-gradient(135deg, var(--hero-from), var(--hero-to));
	/* Not `overflow: hidden`: the brand autocomplete dropdown must be able to extend below the hero. */
	overflow-x: clip;
	overflow-y: visible;
}

.hero--image {
	background:
		linear-gradient(135deg, rgba(20, 26, 46, 0.85), rgba(44, 60, 107, 0.6)),
		var(--hero-image) center / cover no-repeat;
}

.hero__inner {
	position: relative;
	text-align: center;
}

.hero__title {
	max-width: 820px;
	margin: 0 auto 16px;
	font-size: clamp(2rem, 4.5vw, 3.25rem);
	font-weight: 800;
	letter-spacing: -0.03em;
	color: #fff;
}

.hero__subtitle {
	max-width: 640px;
	margin: 0 auto 40px;
	font-size: 1.15rem;
	color: rgba(255, 255, 255, 0.8);
}

/* Search card (markup from [grape_search]) */
.grape-search {
	display: grid;
	grid-template-columns: 1.1fr 1fr 1.2fr auto;
	gap: 12px;
	align-items: end;
	max-width: 1000px;
	margin: 0 auto;
	padding: 20px;
	background: #fff;
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
	text-align: left;
}

.grape-search__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.grape-search__field label {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--muted);
}

.grape-search__hint {
	text-transform: none;
	font-weight: 400;
	letter-spacing: normal;
}

/* Autocomplete marque (multi-valeurs, voir grape-connector/assets/js/brand-autocomplete.js) */
.grape-brand-autocomplete {
	position: relative;
}

.grape-brand-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.grape-brand-chips:not(:empty) {
	margin-bottom: 6px;
}

.grape-brand-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 8px;
	border-radius: 999px;
	background: var(--bg-alt);
	border: 1px solid var(--line);
	font-size: 0.85rem;
	color: var(--ink);
}

.grape-brand-chip__remove {
	border: 0;
	background: transparent;
	color: var(--muted);
	cursor: pointer;
	font-size: 1rem;
	line-height: 1;
	padding: 0 2px;
}

.grape-brand-chip__remove:hover {
	color: var(--accent);
}

.grape-brand-autocomplete__suggestions {
	position: absolute;
	z-index: 20;
	top: 100%;
	left: 0;
	right: 0;
	margin: 4px 0 0;
	padding: 6px;
	list-style: none;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow);
	max-height: 220px;
	overflow-y: auto;
	/* Explicit: the form sits in .hero, whose `color: #fff` would otherwise be inherited. */
	color: var(--ink);
	text-align: left;
}

.grape-brand-autocomplete__suggestions li {
	padding: 8px 10px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 0.9rem;
}

.grape-brand-autocomplete__suggestions li:hover,
.grape-brand-autocomplete__suggestions li.is-active {
	background: var(--bg-alt);
}

.grape-search__field select,
.grape-search__field input {
	width: 100%;
	height: 50px;
	padding: 0 14px;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--bg-alt);
	font: inherit;
	color: var(--ink);
	transition: border-color 0.15s ease, background 0.15s ease;
}

.grape-search__field select:focus,
.grape-search__field input:focus {
	outline: none;
	border-color: var(--accent);
	background: #fff;
}

.grape-search__submit {
	height: 50px;
	padding: 0 28px;
	border: 0;
	border-radius: var(--radius-sm);
	background: var(--accent);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s ease;
}

.grape-search__submit:hover {
	background: var(--accent-dark);
}

/* ---------- Sections ---------- */
.section {
	padding: 80px 0;
}

.section--alt {
	background: var(--bg-alt);
}

.section--stats {
	padding: 48px 0;
	background: var(--bg-alt);
}

.section__title {
	font-size: clamp(1.6rem, 3vw, 2.1rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	text-align: center;
	margin-bottom: 40px;
}

.section__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 32px;
}

.section__head .section__title {
	text-align: left;
	margin: 0;
}

.link-arrow {
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
}

.empty {
	color: var(--muted);
}

/* Steps */
.steps {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.step {
	padding: 32px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
}

.step__number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-bottom: 20px;
	border-radius: 12px;
	background: #fdecec;
	color: var(--accent);
	font-weight: 800;
	font-size: 1.1rem;
}

.step__title {
	font-size: 1.2rem;
}

.step p {
	margin: 0;
	color: var(--muted);
}

/* Stats (markup from [grape_stats]) */
.grape-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 24px;
}

.grape-stat {
	text-align: center;
}

.grape-stat__number {
	display: block;
	font-size: 2.2rem;
	font-weight: 800;
	color: var(--ink);
}

.grape-stat__label {
	color: var(--muted);
}

/* Cards */
.card-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	overflow: hidden;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
	transform: translateY(-3px);
	box-shadow: 0 16px 40px rgba(20, 26, 46, 0.12);
}

.card__media {
	display: block;
	aspect-ratio: 16 / 9;
	background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
}

.card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 24px;
}

.card__date {
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.card__title {
	margin: 8px 0;
	font-size: 1.2rem;
}

.card__title a {
	color: var(--ink);
	text-decoration: none;
}

.card__excerpt {
	flex: 1;
	margin: 0 0 16px;
	color: var(--muted);
}

.card__more {
	font-weight: 700;
	text-decoration: none;
}

/* Results (markup from [grape_results]) */
.grape-results {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
}

.grape-result-card {
	padding: 24px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
}

.grape-result-card h3 {
	font-size: 1.1rem;
}

.grape-result-card p {
	margin: 4px 0;
	color: var(--muted);
}

.grape-notice {
	padding: 20px 24px;
	border: 1px solid #fde2c4;
	border-radius: var(--radius);
	background: #fff8ef;
	color: #8a4b0f;
	text-align: center;
}

.grape-result-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* Prefixed by the container to beat `.entry-content h2/h3 { margin-top }`, declared later. */
.grape-results .grape-result-card h3 {
	margin: 0;
}

.grape-result-card__details {
	align-self: flex-start;
	margin-top: auto;
	padding: 0.55rem 1.2rem;
	font-size: 0.9rem;
}

/* Shop detail (?shop=<id> on the [grape_results] page) */
.grape-shop__back {
	margin: 0 0 24px;
}

.grape-shop__back a {
	font-weight: 700;
	text-decoration: none;
}

.grape-shop {
	max-width: 860px;
	padding: 32px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: #fff;
	box-shadow: var(--shadow);
}

.grape-shop__header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
}

.grape-shop .grape-shop__title {
	margin: 0;
	font-size: 1.75rem;
}

.grape-shop__summary {
	margin: 0 0 16px;
	font-size: 1.1rem;
	color: var(--ink-soft);
}

.grape-shop__description {
	margin-bottom: 24px;
}

.grape-shop__tags {
	padding-top: 20px;
	border-top: 1px solid var(--line);
}

.grape-shop .grape-shop__tags h3 {
	margin: 0 0 12px;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--muted);
}

.grape-shop__tag-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
}

.grape-shop__tag-list li {
	padding: 4px 12px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--bg-alt);
	font-size: 0.9rem;
}

@media (max-width: 640px) {
	.grape-shop {
		padding: 20px;
	}
}

/* CTA */
.cta {
	padding: 64px 0;
	background: linear-gradient(135deg, var(--accent), #f47b52);
	color: #fff;
}

.cta__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
}

.cta__title {
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 800;
	color: #fff;
}

.cta p {
	margin: 0;
	max-width: 620px;
	color: rgba(255, 255, 255, 0.9);
}

/* ---------- Inner pages ---------- */
.page-hero {
	padding: 64px 0;
	background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
	color: #fff;
}

.page-hero__title {
	margin: 0;
	font-size: clamp(1.8rem, 4vw, 2.6rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	color: #fff;
}

.page-hero__back {
	display: inline-block;
	margin-bottom: 16px;
	color: rgba(255, 255, 255, 0.75);
	text-decoration: none;
	font-weight: 600;
}

.page-hero__meta {
	display: block;
	margin-top: 12px;
	color: rgba(255, 255, 255, 0.75);
}

.entry-thumbnail {
	margin: 0 0 32px;
}

.entry-thumbnail img {
	border-radius: var(--radius);
}

.entry-content {
	font-size: 1.05rem;
	color: var(--ink-soft);
}

.entry-content > * + * {
	margin-top: 1.2em;
}

.entry-content h2,
.entry-content h3 {
	color: var(--ink);
	margin-top: 1.8em;
}

.pagination {
	margin-top: 48px;
}

.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.pagination .page-numbers {
	padding: 8px 14px;
	border-radius: 8px;
	background: var(--bg-alt);
	color: var(--ink);
	text-decoration: none;
	font-weight: 600;
}

.pagination .page-numbers.current {
	background: var(--ink);
	color: #fff;
}

/* ---------- Footer ---------- */
.site-footer {
	background: var(--footer-bg);
	color: var(--footer-text);
	font-size: 0.95rem;
}

.site-footer__grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1fr;
	gap: 48px;
	padding-top: 72px;
	padding-bottom: 56px;
}

.footer-col--brand {
	padding-right: 48px;
	border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .site-brand__name {
	color: #fff;
}

.footer-brand .custom-logo {
	filter: brightness(0) invert(1);
}

.footer-col--brand p {
	margin: 16px 0 0;
}

.footer-col__title {
	margin-bottom: 20px;
	font-size: 1rem;
	font-weight: 700;
	color: #fff;
}

.footer-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.footer-menu li + li {
	margin-top: 10px;
}

.footer-menu a {
	color: var(--footer-text);
	text-decoration: none;
	transition: color 0.15s ease;
}

.footer-menu a:hover {
	color: #fff;
}

.footer-menu--buttons li:last-child a {
	display: inline-block;
	margin-top: 4px;
	padding: 10px 18px;
	border-radius: var(--radius-sm);
	background: var(--accent);
	color: #fff;
	font-weight: 700;
}

.footer-menu--buttons li:last-child a:hover {
	background: var(--accent-dark);
}

.footer-contact {
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-style: normal;
}

.footer-contact strong {
	color: #fff;
}

.footer-contact a {
	color: var(--footer-text);
}

.site-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 0.85rem;
}

.site-footer__bottom-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-top: 20px;
	padding-bottom: 20px;
}

.site-footer .lang-switcher {
	background: rgba(255, 255, 255, 0.06);
}

.site-footer .lang-switcher a {
	color: var(--footer-text);
}

.site-footer .lang-switcher a.is-active {
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	box-shadow: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
	.nav-toggle {
		display: block;
	}

	.site-nav {
		display: none;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
		padding: 16px 24px 24px;
		background: #fff;
		border-bottom: 1px solid var(--line);
		box-shadow: var(--shadow);
	}

	.site-nav.is-open {
		display: flex;
	}

	.primary-nav__list {
		flex-direction: column;
	}

	.lang-switcher {
		align-self: flex-start;
	}

	.grape-search {
		grid-template-columns: 1fr 1fr;
	}

	.grape-search__submit {
		grid-column: 1 / -1;
	}

	.steps,
	.card-grid {
		grid-template-columns: 1fr 1fr;
	}

	.site-footer__grid {
		grid-template-columns: 1fr 1fr;
	}

	.footer-col--brand {
		grid-column: 1 / -1;
		padding-right: 0;
		padding-bottom: 32px;
		border-right: 0;
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	}
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

@media (max-width: 640px) {
	.hero {
		padding: 64px 0 72px;
	}

	.section {
		padding: 56px 0;
	}

	.grape-search,
	.steps,
	.card-grid,
	.site-footer__grid {
		grid-template-columns: 1fr;
	}

	.section__head,
	.cta__inner,
	.site-footer__bottom-inner {
		flex-direction: column;
		align-items: flex-start;
	}
}
