/**
 * Layout global — Musée Nelli
 */

.site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	padding-top: var(--header-height, 5rem);
}

.site--has-hero {
	padding-top: 0;
}

.site-main {
	flex: 1;
	padding: var(--space-8) 0 var(--space-12);
}

.site--has-hero .site-main {
	padding-top: 0;
	margin-top: 0;
}

.site--has-hero .front-hero-block {
	margin-top: 0;
}

body.single-post .site {
	padding-top: 0;
}

body.single-post .site-main {
	padding-top: 0;
	margin-top: 0;
}

/* Topbar optionnelle */
.topbar {
	background: var(--color-foreground);
	color: var(--color-background-100);
	padding: var(--space-2) 0;
	font-size: var(--text-xs);
}

.topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

/* Subheader optionnelle */
.subheader {
	background: var(--color-surface-200);
	border-bottom: 1px solid var(--color-surface-400);
	padding: var(--space-3) 0;
}

.subheader__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

/* Hero recherche — page d'accueil (subheader) */
.subheader-hero {
	position: relative;
	height: 50vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--color-surface-300);
	overflow: hidden;
}

.subheader-hero__bg {
	position: absolute;
	inset: -20%;
	width: 140%;
	height: 140%;
	background-image: var(--hero-bg-image, none);
	background-size: cover;
	background-position: center;
	will-change: transform;
	pointer-events: none;
}

.subheader-hero__overlay {
	position: absolute;
	inset: 0;
	background: rgba(28, 25, 23, 0.5);
	pointer-events: none;
}

.subheader-hero__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: min(var(--width-wide), 90vw);
	padding: var(--space-6) var(--space-4);
}

/* Formulaire bien visible sur l’image (fond semi-opaque) */
/* Formulaire Hero : fine, longue, en bas de la Hero */
.search-form--hero {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	align-items: center;
	justify-content: center;
	padding: var(--space-2) var(--space-4);
	background: rgba(255, 255, 255, 0.95);
	border-radius: 0;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
	width: 100%;
	max-width: min(640px, 92vw);
	margin: 0 auto;
}

.search-form__input--hero {
	width: 100%;
	min-width: 0;
	padding: var(--space-2) var(--space-4);
	font-size: var(--text-sm);
	line-height: 1.4;
	border: none;
	border-radius: 0;
	background: transparent;
	color: var(--color-foreground);
}

.search-form__input--hero::placeholder {
	color: var(--color-foreground-500);
}

.search-form__input--hero:focus {
	outline: none;
}

.search-form__submit--hero {
	padding: var(--space-2) var(--space-4);
	font-size: var(--text-xs);
	white-space: nowrap;
	flex-shrink: 0;
	border-radius: 0;
}

@media (min-width: 640px) {
	.search-form--hero {
		flex-wrap: nowrap;
	}

	.search-form__input--hero {
		width: auto;
		flex: 1;
	}
}

/* Conteneur principal */
.container {
	width: 100%;
	max-width: var(--width-wide);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--space-6);
	padding-right: var(--space-6);
}

@media (min-width: 1024px) {
	.container {
		padding-left: var(--space-10);
		padding-right: var(--space-10);
	}
}

.container--narrow {
	max-width: var(--width-content);
}

.container--full {
	max-width: none;
}

/* Grille générique */
.grid {
	display: grid;
	gap: var(--space-6);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
	.grid--2,
	.grid--3,
	.grid--4 {
		grid-template-columns: 1fr;
	}
}

/* Layout avec sidebar */
.layout-with-sidebar {
	display: grid;
	gap: var(--space-12);
}

@media (min-width: 1024px) {
	.layout-with-sidebar {
		grid-template-columns: 1fr 360px;
		gap: var(--space-16);
	}

	.layout-with-sidebar .sidebar-right {
		order: 2;
	}
}
