/*
Theme Name: Mémoire de Diebling — Blocs
Theme URI: https://memoiredediebling.fr/
Author: Les Mémoires de Diebling
Description: Thème à blocs patrimonial pour Les Mémoires de Diebling. Conçu pour fonctionner avec l’extension Mémoire de Diebling — Fonctionnalités.
Version: 1.0.3
Requires at least: 6.8
Requires PHP: 7.4
Text Domain: memoire-de-diebling
*/

:root {
	--md-shadow: 0 24px 60px rgb(24 17 14 / 12%);
	--md-border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
}

html {
	scroll-behavior: smooth;
}

body {
	text-rendering: optimizeLegibility;
}

a {
	text-underline-offset: 0.18em;
}

.md-site-header {
	border-bottom: 3px solid var(--wp--preset--color--rouge);
	position: relative;
	z-index: 50;
}

.md-header-inner {
	min-height: 88px;
}

.md-brand-lockup,
.md-brand-lockup a {
	text-decoration: none;
}

.md-logo-wrap {
	position: relative;
	width: 52px;
	height: 52px;
	flex: 0 0 52px;
}

.md-logo-wrap .wp-block-site-logo,
.md-logo-wrap .custom-logo-link,
.md-logo-wrap img {
	width: 52px;
	height: 52px;
	display: block;
}

.md-logo-wrap img {
	object-fit: contain;
}

.md-logo-fallback {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	border: 1px solid var(--wp--preset--color--or);
	color: var(--wp--preset--color--or);
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.1rem;
	font-weight: 700;
}

.md-logo-wrap:has(img) .md-logo-fallback {
	display: none;
}

.md-site-name {
	line-height: 1.05;
}

.md-site-tagline {
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.md-main-nav .wp-block-navigation-item__content {
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.md-search-pill {
	white-space: nowrap;
}

.md-hero {
	position: relative;
	overflow: hidden;
	min-height: min(760px, calc(100vh - 88px));
	display: flex;
	align-items: center;
	background:
		radial-gradient(circle at 78% 22%, rgb(192 159 91 / 14%), transparent 34%),
		linear-gradient(125deg, #0f0d0c 0%, #171311 58%, #0b0a09 100%);
}

.md-hero::before {
	content: "Mémoire\A histoire,\A un village";
	white-space: pre;
	position: absolute;
	left: 6vw;
	top: 12%;
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(4.5rem, 10vw, 10rem);
	font-weight: 700;
	line-height: 0.84;
	color: rgb(255 255 255 / 1.8%);
	pointer-events: none;
}

.md-eyebrow {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	color: var(--wp--preset--color--or-clair);
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.md-eyebrow::before {
	content: "";
	width: 34px;
	height: 2px;
	background: var(--wp--preset--color--rouge);
}

.md-hero-search .wp-block-search__inside-wrapper {
	background: var(--wp--preset--color--ivoire);
	padding: 8px;
}

.md-hero-search .wp-block-search__input {
	border: 0;
	background: transparent;
	min-height: 54px;
	padding-inline: 1rem;
}

.md-hero-search .wp-block-search__button {
	border: 0;
	background: var(--wp--preset--color--rouge);
	color: #fff;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding-inline: 1.4rem;
}

.md-section {
	padding-block: clamp(4.5rem, 9vw, 8rem);
}

.md-section--compact {
	padding-block: clamp(3rem, 6vw, 5rem);
}

.md-section-heading {
	max-width: 850px;
}

.md-section-heading h2 {
	font-size: clamp(2.3rem, 5.2vw, 5rem);
	line-height: 0.98;
	margin-block: 0.35em 0.3em;
}

.md-participate-strip {
	position: relative;
	overflow: hidden;
}

.md-participate-strip::after {
	content: "MD";
	position: absolute;
	right: 4vw;
	top: 50%;
	transform: translateY(-50%);
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(5rem, 12vw, 11rem);
	font-weight: 700;
	color: rgb(255 255 255 / 5%);
	pointer-events: none;
}

.md-card,
.md-query-card {
	height: 100%;
	border-top: 3px solid var(--wp--preset--color--rouge);
	background: var(--wp--preset--color--blanc);
	box-shadow: var(--md-shadow);
	transition: transform 180ms ease, box-shadow 180ms ease;
}

.md-card:hover,
.md-query-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 30px 70px rgb(24 17 14 / 17%);
}

.md-query-card .wp-block-post-featured-image img,
.md-card img {
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.md-query-card__body {
	padding: 1.35rem;
}

.md-taxonomy-header {
	background: var(--wp--preset--color--noir);
	color: var(--wp--preset--color--blanc);
	padding-block: clamp(4rem, 8vw, 7rem);
}

.md-content-shell {
	padding-block: clamp(3rem, 7vw, 6rem);
}

.md-document-hero .wp-block-post-featured-image img,
.md-singular-hero .wp-block-post-featured-image img {
	max-height: 720px;
	width: 100%;
	object-fit: cover;
}

.md-footer {
	border-top: 3px solid var(--wp--preset--color--rouge);
}

.md-footer a {
	color: inherit;
}

@media (max-width: 1100px) {
	.md-header-inner {
		min-height: 76px;
	}

	.md-search-pill {
		display: none;
	}
}

@media (max-width: 781px) {
	.md-hero {
		min-height: auto;
		padding-block: 4rem;
	}

	.md-hero .wp-block-columns {
		gap: 3.5rem;
	}

	.md-brand-copy {
		display: none;
	}

	.md-section-heading h2 {
		font-size: clamp(2.35rem, 13vw, 3.6rem);
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	.md-card,
	.md-query-card {
		transition: none;
	}
}
