/* Global shell: header, navigation and footer. */

.site-header {
	position: sticky;
	top: 0;
	z-index: 30;
	height: var(--header-height);
	border-bottom: 1px solid var(--color-line);
	background: rgb(247 243 237 / 96%);
	backdrop-filter: none;
}

.site-header .site-container {
	position: relative;
	display: flex;
	height: 100%;
	align-items: center;
	justify-content: space-between;
	gap: 1.75rem;
}

.site-title {
	flex: 0 0 auto;
	color: var(--color-ink);
	font-size: 1.375rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
}

.site-title:hover {
	color: var(--color-ink);
}

.primary-navigation {
	margin-left: auto;
}

.primary-menu,
.secondary-menu,
.action-menu,
.footer-menu {
	display: flex;
	align-items: center;
	gap: 1.75rem;
	padding: 0;
	margin: 0;
	list-style: none;
}

.primary-menu a,
.secondary-menu a,
.action-menu a,
.footer-menu a {
	font-size: 0.9375rem;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
}

.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.35rem;
}

.action-menu a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.5rem;
	padding: 0.5rem 0.9375rem;
	border: 1px solid var(--color-ink);
	border-radius: 3px;
	background: var(--color-ink);
	color: var(--color-light);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.2;
}

.action-menu a:hover {
	border-color: var(--color-terra-text);
	background: var(--color-terra-text);
	color: #fff;
}

.desktop-navigation {
	display: flex;
	align-items: center;
	gap: 1.75rem;
	margin-left: auto;
}

.menu-toggle,
.mobile-navigation {
	display: none;
}

.site-footer {
	padding: 3.5rem 0 2.125rem;
	background: var(--color-dark);
	color: var(--color-light);
}

.footer-grid {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 2.5rem;
	padding-bottom: 2.875rem;
	border-bottom: 1px solid rgb(255 255 255 / 14%);
}

.footer-brand {
	font-size: 1.375rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.footer-navigation .footer-menu {
	display: block;
}

.footer-navigation .footer-menu li {
	margin-bottom: 0.5rem;
}

.footer-navigation a {
	color: #ded7cf;
}

.footer-navigation a:hover {
	color: var(--color-terra-dark);
}

.footer-bottom {
	display: flex;
	justify-content: space-between;
	gap: 1.5rem;
	padding-top: 1.5rem;
	color: #aaa19a;
	font-size: 0.8125rem;
}

/* Accueil V2 shell overrides — intentionally scoped to the front page. */
.home .site-header {
	height: 4.625rem;
	border-bottom-color: rgb(41 39 36 / 15%);
	background: rgb(247 243 237 / 96%);
	backdrop-filter: none;
}

.home .site-title {
	font-size: 1.25rem;
	font-weight: 600;
	letter-spacing: 0.08em;
}

.home .desktop-navigation,
.home .primary-menu,
.home .action-menu {
	gap: 1.875rem;
}

.home .primary-menu a,
.home .action-menu a {
	font-size: 0.875rem;
	font-weight: 400;
}

.home .action-menu a {
	min-height: auto;
	padding: 0 0 0.25rem;
	border: 0;
	border-bottom: 1px solid var(--color-ink);
	border-radius: 0;
	background: transparent;
	color: var(--color-ink);
	font-weight: 400;
}

.home .action-menu a:hover {
	border-color: var(--color-terra-text);
	background: transparent;
	color: var(--color-terra-text);
}

.site-footer--home {
	padding: 3.875rem 0 2.125rem;
	background: #2b2a28;
	color: #f5f1eb;
}

.home-footer-word {
	margin-bottom: 2.875rem;
	font-size: clamp(2.625rem, 6vw, 4.875rem);
	font-weight: 600;
	letter-spacing: 0.045em;
	line-height: 1;
}

.home-footer-rule {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr;
	gap: 1.75rem;
	padding-top: 1.5rem;
	border-top: 1px solid rgb(255 255 255 / 30%);
	font-size: 0.8125rem;
}

.home-footer-col {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.home-footer-col a {
	color: inherit;
	text-decoration: none;
}

.home-footer-col a:hover {
	color: var(--color-terra-dark);
}

@media (max-width: 47.5rem) {
	.home .site-header {
		position: relative;
		height: 4rem;
	}

	.home .site-title {
		font-size: 1.125rem;
	}
}

@media (max-width: 65.625rem) {
	.desktop-navigation {
		gap: 1.125rem;
	}

	.primary-menu,
	.action-menu {
		gap: 1.125rem;
	}

	.primary-menu a,
	.action-menu a {
		font-size: 0.875rem;
	}

	.action-menu a {
		padding-inline: 0.75rem;
	}
}

@media (max-width: 53.75rem) {
	.site-header {
		position: relative;
		height: 4rem;
		backdrop-filter: none;
	}

	.desktop-navigation {
		display: none;
	}

	.menu-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 2.75rem;
		min-height: 2.75rem;
		padding: 0.625rem;
		border: 0;
		background: transparent;
		color: var(--color-ink);
		cursor: pointer;
	}

	.mobile-navigation.is-open {
		position: absolute;
		top: 4rem;
		right: 0;
		left: 0;
		z-index: 40;
		display: block;
		padding: 1.125rem var(--gutter) 1.625rem;
		border-bottom: 1px solid var(--color-line);
		background: var(--color-paper);
	}

	.mobile-navigation .primary-menu,
	.mobile-navigation .secondary-menu,
	.mobile-navigation .action-menu {
		display: block;
	}

	.mobile-navigation li {
		margin: 0;
	}

	.mobile-navigation a {
		display: block;
		padding: 0.625rem 0;
		font-weight: 500;
		text-decoration: none;
	}

	.mobile-navigation .secondary-menu {
		padding-top: 0.625rem;
		margin-top: 0.625rem;
		border-top: 1px solid var(--color-line);
	}

	.mobile-navigation .action-menu {
		margin-top: 1rem;
	}

	.mobile-navigation .action-menu a {
		display: inline-flex;
		padding: 0.6875rem 1.125rem;
		color: var(--color-light);
	}

	.footer-grid {
		grid-template-columns: 1fr 1fr;
		gap: 1.875rem;
	}

	.footer-brand {
		grid-column: 1 / -1;
	}
}

@media (max-width: 40rem) {
	.site-footer {
		padding-top: 2.875rem;
	}

	.site-footer--home {
		padding: 2.875rem 0 1.75rem;
	}

	.home-footer-word {
		margin-bottom: 2.125rem;
		font-size: 2.9375rem;
	}

	.home-footer-rule {
		grid-template-columns: 1fr 1fr;
		gap: 1.75rem;
	}

	.home-footer-rule > div:first-child {
		grid-column: 1 / -1;
	}

	.footer-bottom {
		display: block;
	}

	.footer-bottom span {
		display: block;
		margin-bottom: 0.375rem;
	}
}

/* The frozen Accueil V2 keeps the desktop header through 761px. */
@media (min-width: 47.5625rem) and (max-width: 53.75rem) {
	.home .site-header {
		position: sticky;
		height: 4.625rem;
	}

	.home .desktop-navigation {
		display: flex;
	}

	.home .menu-toggle,
	.home .mobile-navigation {
		display: none;
	}
}
