/*
Theme Name: L’Envie Juste
Theme URI: https://lenviejuste.fr/
Author: L’Envie Juste
Author URI: https://lenviejuste.fr/
Description: Thème bloc éditorial, chaleureux et accessible pour le média L’Envie Juste.
Requires at least: 6.6
Requires PHP: 7.4
Version: 1.5.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lenviejuste
Tags: block-patterns, full-site-editing, wide-blocks, accessibility-ready, blog
*/

:root {
	--lej-radius: 10px;
	--lej-focus: #623b55;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}

a {
	text-underline-offset: 0.18em;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 3px solid var(--lej-focus);
	outline-offset: 3px;
}

.wp-site-blocks {
	min-height: 100vh;
}

.lej-site-header {
	backdrop-filter: blur(12px);
	background: color-mix(in srgb, var(--wp--preset--color--creme) 94%, transparent) !important;
	border-bottom: 1px solid var(--wp--preset--color--lin);
	position: sticky;
	top: 0;
	z-index: 50;
}

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

.lej-site-header > .wp-block-group {
	column-gap: clamp(1.5rem, 4vw, 3.5rem);
}

.lej-header-inner {
	min-height: 3.5rem;
}

.lej-brand {
	flex-shrink: 0;
	gap: 0 !important;
}

.lej-site-logo,
.lej-site-logo .custom-logo-link {
	display: flex;
	margin: 0;
}

.lej-site-logo img,
.lej-site-logo .custom-logo {
	display: block;
	height: auto;
	max-height: 3.5rem;
	max-width: clamp(10.5rem, 18vw, 13.75rem);
	object-fit: contain;
	object-position: left center;
	width: auto;
}

.lej-wordmark {
	flex-shrink: 0;
	letter-spacing: -0.025em;
	margin-block: 0;
}

.lej-wordmark a {
	color: inherit;
	text-decoration: none;
}

.lej-brand:has(.lej-site-logo img) .lej-wordmark {
	border: 0;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

.lej-eyebrow {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.lej-hero {
	overflow: hidden;
	padding-block: clamp(3.5rem, 7vw, 6rem);
	position: relative;
}

.lej-hero::after {
	background: var(--wp--preset--color--rose-argile);
	border-radius: 999px;
	content: "";
	height: 18rem;
	opacity: 0.48;
	position: absolute;
	right: -7rem;
	top: -8rem;
	width: 18rem;
	z-index: 0;
}

.lej-hero > * {
	position: relative;
	z-index: 1;
}

.lej-hero-layout {
	gap: clamp(2.5rem, 6vw, 5rem);
}

.lej-hero-copy {
	max-width: 46rem;
}

.lej-hero-copy .wp-block-buttons {
	margin-top: 2rem;
}

.lej-hero-visual {
	display: grid;
	gap: 0.75rem;
	grid-template-columns: 1.25fr 0.9fr;
	grid-template-rows: 1fr 0.72fr;
	min-height: clamp(20rem, 34vw, 30rem);
	transform: rotate(1deg);
}

.lej-visual-tile {
	align-items: center;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--prune) 13%, transparent);
	border-radius: var(--lej-radius);
	display: flex;
	justify-content: center;
	min-height: 8rem;
	overflow: hidden;
	padding: 1rem;
	position: relative;
	box-shadow: 0 16px 40px rgba(41, 36, 33, 0.08);
}

.lej-visual-tile::before {
	background: rgba(255, 255, 255, 0.32);
	border-radius: 999px;
	content: "";
	height: 7rem;
	position: absolute;
	right: -2rem;
	top: -2rem;
	width: 7rem;
}

.lej-visual-tile > * {
	position: relative;
}

.lej-visual-tile--one {
	background: var(--wp--preset--color--rose-argile);
	grid-row: 1 / 3;
}

.lej-visual-tile--two {
	background: var(--wp--preset--color--miel);
}

.lej-visual-tile--three {
	background: var(--wp--preset--color--bleu-brume);
}

.lej-visual-tile--four {
	background: var(--wp--preset--color--creme);
	display: none;
}

.lej-visual-note {
	color: var(--wp--preset--color--taupe);
	margin-top: 0.75rem;
}

.lej-home > .wp-block-group:not(.lej-hero) {
	padding-block: clamp(3rem, 6vw, 6rem) !important;
}

.lej-card,
.lej-product-card,
.lej-reassurance-card {
	height: 100%;
}

.lej-card,
.lej-product-card {
	border-color: color-mix(in srgb, var(--wp--preset--color--lin) 72%, transparent) !important;
	box-shadow: 0 6px 20px rgba(41, 36, 33, 0.035);
	overflow: hidden;
	transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.lej-card:hover,
.lej-product-card:hover {
	border-color: var(--wp--preset--color--prune);
	box-shadow: 0 12px 32px rgba(41, 36, 33, 0.08);
	transform: translateY(-2px);
}

.lej-placeholder {
	align-items: center;
	aspect-ratio: 4 / 3;
	display: flex;
	justify-content: center;
	min-height: 10rem;
	text-align: center;
}

.lej-product-card .lej-placeholder {
	aspect-ratio: 1;
	border-radius: 10px 10px 0 0;
	margin: -1rem -1rem 0;
	min-height: 15rem;
	width: calc(100% + 2rem);
}

.lej-badge {
	display: inline-block;
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	padding: 0.35rem 0.65rem;
	width: fit-content;
}

.lej-product-grid {
	align-items: stretch !important;
	gap: clamp(1.25rem, 3vw, 2rem);
}

.lej-product-card {
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
}

.lej-product-card > * {
	margin-block: 0;
}

.lej-product-card > .wp-block-button {
	margin-top: auto;
}

.lej-product-card .wp-block-button__link {
	width: 100%;
}

.lej-univers-grid {
	align-items: stretch !important;
	gap: clamp(1rem, 2.4vw, 1.75rem);
}

.lej-universe-card {
	background: var(--wp--preset--color--blanc);
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--lin) 72%, transparent);
	border-radius: var(--lej-radius);
	box-shadow: 0 6px 20px rgba(41, 36, 33, 0.035);
	height: 100%;
	overflow: hidden;
	transition: box-shadow 160ms ease, transform 160ms ease;
}

.lej-universe-card:hover {
	box-shadow: 0 12px 32px rgba(41, 36, 33, 0.08);
	transform: translateY(-2px);
}

.lej-universe-media {
	align-items: center;
	aspect-ratio: 4 / 3;
	display: flex;
	justify-content: center;
	margin: 0;
	padding: 1rem;
}

.lej-universe-card--beauty .lej-universe-media {
	background: var(--wp--preset--color--rose-argile);
}

.lej-universe-card--home .lej-universe-media {
	background: var(--wp--preset--color--sauge);
}

.lej-universe-card--kitchen .lej-universe-media {
	background: var(--wp--preset--color--miel);
}

.lej-universe-card--creative .lej-universe-media {
	background: var(--wp--preset--color--bleu-brume);
}

.lej-universe-copy {
	padding: 1.25rem;
}

.lej-universe-copy > * {
	margin-block-start: 0;
}

.lej-universe-copy > *:last-child {
	margin-block-end: 0;
}

.lej-section-heading {
	max-width: 44rem;
}

.lej-reading-width {
	max-width: 48rem;
}

/* V1.5A: editable editorial pages, without an extra template H1. */
.lej-editorial-page {
	padding-block: clamp(2rem, 5vw, 4rem);
}

.lej-hub,
.lej-institutional {
	min-width: 0;
	overflow-wrap: anywhere;
}

@media (max-width: 360px) {
	.page-id-26 .lej-institutional h1 {
		font-size: clamp(2.25rem, 11vw, 2.625rem);
	}
}

.lej-hub-hero {
	border-bottom: 1px solid var(--wp--preset--color--lin);
	padding-block: 1rem 2rem;
}

.lej-hub-hero > p {
	font-size: var(--wp--preset--font-size--lead);
}

.lej-hub-section {
	margin-block-start: clamp(2rem, 5vw, 3.5rem);
}

.lej-hub-grid {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
}

.lej-hub-grid > .lej-hub-card {
	margin: 0;
	min-width: 0;
}

.lej-hub-card,
.lej-hub-signature,
.lej-affiliate-disclosure {
	border: 1px solid var(--wp--preset--color--lin);
	border-radius: var(--lej-radius);
	padding: clamp(1rem, 3vw, 1.5rem);
}

.lej-hub-card {
	background: var(--wp--preset--color--blanc);
}

.lej-hub-signature,
.lej-affiliate-disclosure {
	background: var(--wp--preset--color--sauge);
	color: var(--wp--preset--color--encre);
	margin-block-start: 2rem;
}

.lej-breadcrumb {
	font-size: var(--wp--preset--font-size--small);
}

.lej-breadcrumb a,
.lej-site-footer li a {
	align-items: center;
	display: inline-flex;
	min-height: 44px;
}

.lej-breadcrumb span[aria-hidden] {
	margin-inline: 0.4rem;
}

.lej-pending {
	color: var(--wp--preset--color--taupe);
	font-size: var(--wp--preset--font-size--small);
}

/* Small terracotta labels need the darker existing brand color. */
.lej-eyebrow.has-terracotta-color {
	color: var(--wp--preset--color--prune) !important;
}

.lej-site-footer :focus-visible,
.has-encre-background-color :focus-visible {
	outline-color: var(--wp--preset--color--creme);
}

.lej-brand:has(.lej-site-logo img) .lej-wordmark:focus-within {
	clip: auto;
	clip-path: none;
	height: auto;
	position: static;
	white-space: normal;
	width: auto;
}

.lej-brand {
	max-width: 100%;
}

.lej-wordmark {
	min-width: 0;
	overflow-wrap: anywhere;
}

.lej-site-header .wp-block-navigation__responsive-container-open,
.lej-site-header .wp-block-navigation__responsive-container-close {
	min-height: 44px;
	min-width: 44px;
}

.lej-meta {
	color: var(--wp--preset--color--taupe);
	font-size: var(--wp--preset--font-size--small);
}

.lej-site-footer a {
	color: inherit;
}

.lej-site-footer .wp-block-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.lej-site-footer .wp-block-list li + li {
	margin-top: 0.55rem;
}

.lej-site-footer h2,
.lej-site-footer h3 {
	margin-bottom: 1rem;
}

.lej-footer-brand {
	margin-bottom: 1rem;
}

.lej-footer-brand a {
	text-decoration: none;
}

.lej-site-footer .wp-block-separator {
	margin-block: 2.5rem 1.5rem;
}

.wp-block-button .wp-block-button__link {
	align-items: center;
	display: inline-flex;
	justify-content: center;
	min-height: 44px;
}

.wp-block-navigation a {
	align-items: center;
	display: inline-flex;
	min-height: 44px;
	text-decoration: none;
}

.lej-site-header .wp-block-navigation__container {
	column-gap: clamp(1rem, 2vw, 1.75rem);
}

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

	.lej-site-header {
		backdrop-filter: none;
	}

	.lej-site-logo img,
	.lej-site-logo .custom-logo {
		max-height: 3rem;
		max-width: 11.5rem;
	}

	.lej-hero::after {
		height: 9rem;
		right: -4rem;
		top: -4rem;
		width: 9rem;
	}

	.lej-hero-layout {
		gap: 2.5rem;
	}

	.lej-hero-visual {
		min-height: 20rem;
		transform: none;
	}

	.lej-home > .wp-block-group:not(.lej-hero) {
		padding-block: clamp(3rem, 9vw, 4rem) !important;
	}

	.lej-desktop-only {
		display: none !important;
	}
}

@media (min-width: 1100px) {
	.lej-visual-tile--four {
		display: flex;
	}

	.lej-hero-visual {
		grid-template-columns: 1.2fr 0.8fr;
		grid-template-rows: 1fr 0.8fr 0.7fr;
	}

	.lej-visual-tile--one {
		grid-row: 1 / 4;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}

/* V1.2 — compositions éditoriales et home raccourcie. */
.lej-hero {
	padding-block: clamp(3rem, 6vw, 5rem);
}

.lej-hero-copy h1 {
	font-size: clamp(2.85rem, 5.8vw, 4.75rem);
	letter-spacing: -0.035em;
	max-width: 12ch;
}

.lej-hero-collage {
	height: clamp(19rem, 32vw, 27rem);
	position: relative;
}

.lej-collage-image {
	align-items: center;
	border: 1px solid rgba(98, 59, 85, 0.12);
	border-radius: var(--lej-radius);
	box-shadow: 0 18px 42px rgba(41, 36, 33, 0.1);
	display: flex;
	justify-content: center;
	overflow: hidden;
	padding: 1rem;
	position: absolute;
}

.lej-collage-image--main {
	background: var(--wp--preset--color--rose-argile);
	bottom: 4%;
	left: 0;
	top: 0;
	transform: rotate(-2deg);
	width: 67%;
}

.lej-collage-image--detail {
	background: var(--wp--preset--color--miel);
	height: 47%;
	right: 0;
	top: 8%;
	transform: rotate(2.5deg);
	width: 39%;
}

.lej-collage-image--object {
	background: var(--wp--preset--color--bleu-brume);
	bottom: 2%;
	height: 40%;
	right: 4%;
	transform: rotate(-1deg);
	width: 34%;
}

.lej-editorial-layout {
	align-items: stretch !important;
	gap: clamp(1.25rem, 3vw, 2.5rem);
	margin-top: clamp(2rem, 4vw, 3rem);
}

.lej-feature-card,
.lej-mini-feature {
	background: var(--wp--preset--color--blanc);
	border: 1px solid rgba(98, 59, 85, 0.12);
	border-radius: var(--lej-radius);
	box-shadow: 0 8px 28px rgba(41, 36, 33, 0.05);
	overflow: hidden;
}

.lej-feature-card {
	height: 100%;
}

.lej-feature-image {
	align-items: center;
	aspect-ratio: 16 / 10;
	background: var(--wp--preset--color--rose-argile);
	display: flex;
	justify-content: center;
}

.lej-feature-copy {
	padding: clamp(1.25rem, 3vw, 2rem);
}

.lej-editorial-stack {
	display: flex;
	flex-direction: column;
	gap: clamp(1rem, 2.5vw, 1.5rem);
}

.lej-mini-feature {
	align-items: center;
	flex: 1;
	gap: 0 !important;
}

.lej-mini-image {
	align-items: center;
	align-self: stretch;
	display: flex;
	flex: 0 0 42%;
	justify-content: center;
	min-height: 10rem;
	padding: 1rem;
}

.lej-mini-image--one {
	background: var(--wp--preset--color--sauge);
}

.lej-mini-image--two {
	background: var(--wp--preset--color--miel);
}

.lej-mini-copy {
	padding: 1.25rem;
}

.lej-mini-copy h3 {
	font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.lej-universe-mosaic {
	display: grid;
	gap: clamp(1rem, 2.5vw, 1.75rem);
	grid-template-columns: repeat(12, 1fr);
	margin-top: clamp(2rem, 4vw, 3rem);
}

.lej-universe-mosaic .lej-universe-card--large {
	grid-column: span 6;
}

.lej-universe-mosaic .lej-universe-card--compact {
	align-items: stretch;
	display: grid;
	grid-column: span 6;
	grid-template-columns: minmax(10rem, 0.8fr) 1.2fr;
}

.lej-universe-mosaic .lej-universe-card--large .lej-universe-media {
	aspect-ratio: 16 / 9;
}

.lej-universe-mosaic .lej-universe-card--compact .lej-universe-media {
	aspect-ratio: auto;
	min-height: 12rem;
}

.lej-product-mosaic {
	display: grid;
	gap: clamp(1rem, 2.5vw, 1.75rem);
	grid-template-columns: repeat(6, 1fr);
	margin-top: clamp(2rem, 4vw, 3rem);
}

.lej-product-mosaic .lej-product-card {
	border: 1px solid rgba(98, 59, 85, 0.12);
	border-radius: var(--lej-radius);
	grid-column: span 2;
	padding: 1rem;
}

.lej-product-mosaic .lej-product-card--featured {
	grid-column: span 3;
	grid-row: span 2;
}

.lej-product-mosaic .lej-product-card--featured .lej-placeholder {
	min-height: 22rem;
}

.lej-product-mosaic .lej-product-card--secondary {
	display: grid;
	grid-column: span 3;
	grid-template-columns: minmax(8rem, 0.8fr) 1.2fr;
	grid-template-rows: auto auto auto 1fr auto;
}

.lej-product-mosaic .lej-product-card--secondary .lej-placeholder {
	grid-row: 1 / 6;
	height: 100%;
	margin: -1rem 0 -1rem -1rem;
	min-height: 13rem;
	width: auto;
}

.lej-product-mosaic .lej-product-card--secondary .wp-block-button__link {
	width: auto;
}

.lej-gift-finder {
	padding-block: clamp(3rem, 6vw, 5rem) !important;
}

.lej-gift-inner {
	max-width: 64rem;
}

.lej-gift-links {
	gap: 0.75rem !important;
	margin-block: 1.75rem;
}

.lej-gift-links p {
	margin: 0;
}

.lej-gift-links a {
	align-items: center;
	background: var(--wp--preset--color--blanc);
	border: 1px solid rgba(98, 59, 85, 0.18);
	border-radius: 999px;
	color: var(--wp--preset--color--encre);
	display: inline-flex;
	font-weight: 600;
	min-height: 44px;
	padding: 0.55rem 1rem;
	text-decoration: none;
}

.lej-gift-links a:hover {
	border-color: var(--wp--preset--color--prune);
	color: var(--wp--preset--color--prune);
}

.lej-detail-juste {
	padding-block: clamp(3rem, 6vw, 5.5rem) !important;
}

.lej-detail-layout {
	gap: clamp(2rem, 5vw, 4.5rem);
}

.lej-detail-image {
	align-items: center;
	aspect-ratio: 4 / 3;
	background: var(--wp--preset--color--bleu-brume);
	border-radius: var(--lej-radius);
	color: var(--wp--preset--color--encre);
	display: flex;
	justify-content: center;
	transform: rotate(-1deg);
}

.lej-detail-juste a {
	color: var(--wp--preset--color--miel);
}

.lej-trust-strip {
	border-block: 1px solid var(--wp--preset--color--lin);
	padding-block: 1.5rem !important;
}

.lej-trust-inner {
	gap: 1rem 2rem !important;
}

.lej-trust-inner p {
	margin: 0;
}

.lej-trust-inner strong {
	color: var(--wp--preset--color--prune);
}

.lej-gift-self-panel {
	border-radius: var(--lej-radius);
	height: 100%;
	padding: clamp(1.5rem, 3vw, 2.5rem);
}

.lej-gift-self-panel--gift {
	background: var(--wp--preset--color--rose-argile);
}

.lej-gift-self-panel--self {
	background: var(--wp--preset--color--sauge);
}

@media (max-width: 1023px) {
	.lej-product-mosaic .lej-product-card--featured {
		grid-column: 1 / -1;
	}

	.lej-product-mosaic .lej-product-card--secondary {
		grid-column: span 3;
		grid-template-columns: 1fr;
	}

	.lej-product-mosaic .lej-product-card--secondary .lej-placeholder {
		grid-row: auto;
		margin: -1rem -1rem 0;
		width: calc(100% + 2rem);
	}
}

@media (max-width: 781px) {
	.lej-hero-copy h1 {
		font-size: clamp(2.65rem, 12vw, 3.75rem);
	}

	.lej-hero-collage {
		height: clamp(18rem, 82vw, 25rem);
		margin-top: 0.5rem;
	}

	.lej-editorial-stack {
		margin-top: 1rem;
	}

	.lej-universe-mosaic,
	.lej-product-mosaic {
		grid-template-columns: 1fr;
	}

	.lej-universe-mosaic .lej-universe-card--large,
	.lej-universe-mosaic .lej-universe-card--compact,
	.lej-product-mosaic .lej-product-card,
	.lej-product-mosaic .lej-product-card--featured,
	.lej-product-mosaic .lej-product-card--secondary {
		grid-column: 1;
	}

	.lej-universe-mosaic .lej-universe-card--compact,
	.lej-product-mosaic .lej-product-card--secondary {
		display: block;
	}

	.lej-universe-mosaic .lej-universe-card--compact .lej-universe-media {
		aspect-ratio: 4 / 3;
	}

	.lej-detail-image {
		transform: none;
	}

	.lej-trust-inner {
		align-items: flex-start;
		flex-direction: column;
	}
}

@media (max-width: 480px) {
	.lej-mini-feature {
		align-items: stretch;
		flex-direction: column;
	}

	.lej-mini-image {
		aspect-ratio: 16 / 9;
		min-height: 0;
		width: 100%;
	}

	.lej-product-mosaic .lej-product-card--featured .lej-placeholder {
		min-height: 18rem;
	}
}

/* V1.3 — slots d’images réelles et fallbacks éditoriaux. */
.lej-image-slot {
	align-items: center;
	display: flex;
	isolation: isolate;
	justify-content: center;
	overflow: hidden;
	position: relative;
}

.lej-image-slot > p {
	color: color-mix(in srgb, var(--wp--preset--color--encre) 72%, transparent);
	font-size: 0.75rem !important;
	letter-spacing: 0.04em;
	line-height: 1.45;
	margin: 0;
	padding: 0.75rem;
	text-transform: uppercase;
	z-index: 1;
}

.lej-image-slot > p strong {
	color: var(--wp--preset--color--prune);
	font-size: 0.8rem;
	letter-spacing: 0.08em;
}

.lej-image-slot.wp-block-image {
	display: block;
	margin: 0;
	padding: 0;
}

.lej-image-slot img,
.lej-image-slot.wp-block-image img {
	display: block;
	height: 100%;
	margin: 0;
	object-fit: cover;
	width: 100%;
}

.lej-image-slot--select-01 {
	aspect-ratio: 16 / 10;
}

.lej-image-slot--select-02,
.lej-image-slot--select-03 {
	aspect-ratio: 4 / 3;
}

.lej-image-slot--universe-beauty,
.lej-image-slot--universe-home {
	aspect-ratio: 16 / 9;
}

.lej-image-slot--universe-kitchen,
.lej-image-slot--universe-creative {
	aspect-ratio: 4 / 3;
}

.lej-image-slot--product {
	aspect-ratio: 1;
	height: auto;
}

.lej-product-mosaic .lej-product-card--secondary .lej-image-slot--product {
	align-self: start;
	height: auto;
}

.lej-image-slot--detail {
	aspect-ratio: 4 / 3;
}

@media (max-width: 480px) {
	.lej-mini-image.lej-image-slot--selection {
		aspect-ratio: 4 / 3;
	}
}
