/*
Theme Name: Montrouant
Description: Thème du Château de Montrouant (camping, lodges et appartements à Gibles), en français, anglais et néerlandais avec Polylang.
Version: 1.0.0
Requires at least: 7.0
Requires PHP: 8.1
Text Domain: montrouant
*/

/* Couleurs, polices et tailles : theme.json. Ici : mises en page de la maquette et styles de blocs. */

:root {
	--mt-radius: 20px;
	--mt-radius-lg: 24px;
	--mt-soft-line: #E4E3DA;
	--mt-on-dark: #F4F3EE;
	--mt-on-dark-muted: #DCE3DA;
	--mt-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14'/%3E%3Cpath d='M13 6l6 6l-6 6'/%3E%3C/svg%3E");
	--mt-arrow-back: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5'/%3E%3Cpath d='M11 6l-6 6l6 6'/%3E%3C/svg%3E");
	--mt-warning: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l9 16H3z'/%3E%3Cpath d='M12 10v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E");
}

body {
	-webkit-font-smoothing: antialiased;
}

/* Place de la barre de défilement toujours réservée : l'en-tête ne bouge pas entre une page courte et une page longue. */
html {
	scrollbar-gutter: stable;
}

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

/* Mots longs (néerlandais surtout) : coupure avec trait d'union selon la langue de la page, en dernier recours ;
   si le navigateur n'a pas de dictionnaire de césure pour la langue, le mot est coupé plutôt que de déborder. */
:where(h1, h2, h3, h4),
.is-style-mt-tile .mt-tile__title,
.is-style-mt-tile .mt-tile__sub,
.wp-block-post-title,
.wp-block-post-title a {
	overflow-wrap: break-word;
	word-break: normal;
	hyphens: auto;
}

/* Adresses email, liens et mots très longs : passage à la ligne seulement s'ils ne tiennent pas (petits téléphones). */
.entry-content :where(p, li, td, figcaption),
.wp-block-button__link {
	overflow-wrap: break-word;
}

.wp-block-button__link {
	max-width: 100%;
	box-sizing: border-box;
}

.wp-block-table td {
	hyphens: auto;
}

/* Très petits téléphones (320 px) : boutons un peu plus compacts, l'adresse email tient sur une ligne. */
@media (max-width: 360px) {
	.wp-block-button__link {
		padding-inline: 0.875rem;
		font-size: 0.78125rem;
	}
}

/* WordPress affiche le lien des titres d'articles en bloc en ligne, ce qui empêche la coupure : texte en ligne simple. */
.wp-block-post-title a {
	display: inline;
}

:where(a, button, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--wine);
	outline-offset: 2px;
}

.wp-site-blocks > main,
.wp-site-blocks > footer {
	margin-block-start: 0;
}

.mt-main {
	padding-bottom: clamp(56px, 8vw, 96px);
}

.mt-page-title {
	margin-block: 48px 32px;
}

/* En-tête : même largeur que la zone élargie de l'accueil (2200 px), logo et nom calés à gauche sur toutes les pages. */

.mt-header {
	background: var(--wp--preset--color--cream);
	border-bottom: 1px solid var(--wp--preset--color--line);
}

.mt-header__inner {
	max-width: 2200px;
	margin: 0 auto;
	padding: 14px 24px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 32px;
}

.mt-header__brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 26px;
	line-height: 1.1;
	text-decoration: none;
	color: var(--wp--preset--color--ink);
}

/* Dessin du château (assets/logo/chateau.png) devant le nom. */
.mt-header__brand img {
	display: block;
	width: auto;
	height: 44px;
}

@media (max-width: 600px) {
	.mt-header__brand {
		gap: 10px;
		font-size: 23px;
	}

	.mt-header__brand img {
		height: 36px;
	}
}

.mt-header__tools {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 24px;
}

.mt-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0 24px;
	font-size: 15px;
	font-weight: 600;
}

.mt-nav a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	text-decoration: none;
	color: var(--wp--preset--color--ink);
}

.mt-nav a:hover,
.mt-nav a[aria-current="page"] {
	color: var(--wp--preset--color--wine);
}

.mt-nav a[aria-current="page"] {
	box-shadow: inset 0 -2px 0 var(--wp--preset--color--wine);
}

.mt-cta {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 22px;
	border-radius: 999px;
	background: var(--wp--preset--color--wine);
	color: var(--wp--preset--color--white);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}

.mt-cta:hover {
	background: var(--wp--preset--color--forest);
	color: var(--wp--preset--color--white);
}

.mt-lang {
	display: flex;
	margin: 0;
	padding: 3px;
	list-style: none;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
}

.mt-lang a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 38px;
	padding: 0 12px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	color: var(--wp--preset--color--ink);
}

.mt-lang a[aria-current] {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--cream);
}

/* Pied de page */

.mt-footer {
	background: var(--wp--preset--color--forest);
	color: var(--mt-on-dark);
	line-height: 1.6;
}

.mt-footer a {
	color: var(--mt-on-dark);
}

.mt-footer__inner {
	max-width: 2200px;
	margin: 0 auto;
	padding: 56px 24px 32px;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 40px 64px;
}

.mt-footer__brand {
	flex: 1 1 280px;
}

.mt-footer__name {
	margin: 0;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 34px;
	line-height: 1.05;
}

.mt-footer__tagline {
	margin: 10px 0 0;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--wp--preset--color--sage);
}

.mt-footer h2 {
	margin: 0 0 8px;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.6;
}

.mt-footer__find {
	flex: 1 1 240px;
	font-size: 15px;
	color: var(--mt-on-dark-muted);
}

.mt-footer__find p {
	margin: 0;
}

.mt-footer__find a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}

.mt-footer__explore {
	flex: 1 1 280px;
}

.mt-footer__explore ul {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 24px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 15px;
}

.mt-footer__explore a {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	text-decoration: none;
	color: var(--mt-on-dark-muted);
}

.mt-footer__explore a:hover {
	color: var(--mt-on-dark);
	text-decoration: underline;
}

.mt-footer__legal {
	max-width: 2200px;
	margin: 0 auto;
	padding: 20px 24px 28px;
	border-top: 1px solid rgba(244, 243, 238, 0.2);
	font-size: 13px;
	color: var(--wp--preset--color--sage);
}

/* Sections de page */

.entry-content > .mt-section,
.entry-content > .is-style-mt-hero + * {
	margin-block-start: clamp(40px, 6vw, 72px);
}

.mt-section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 16px;
	margin-bottom: 20px;
}

.mt-section-head > * {
	margin: 0;
}

.mt-hint {
	font-size: 14px;
	color: var(--wp--preset--color--muted);
}

/* En-tête de page : texte à gauche, photo à droite */

.wp-block-columns.is-style-mt-hero {
	gap: 40px 64px;
	padding-top: 48px;
	align-items: center;
}

.is-style-mt-hero h1 {
	margin: 8px 0 20px;
}

.is-style-mt-hero .wp-block-image,
.is-style-mt-hero .wp-block-image img {
	margin: 0;
	width: 100%;
}

.is-style-mt-hero .wp-block-image img {
	height: clamp(280px, 38vw, 440px);
	object-fit: cover;
	border-radius: var(--mt-radius-lg);
}

.is-style-mt-hero .mt-tall img {
	height: clamp(320px, 45vw, 560px);
}

/* Cartes */

.is-style-mt-card,
.is-style-mt-card-dark {
	border-radius: var(--mt-radius);
	padding: clamp(24px, 3vw, 32px);
}

.is-style-mt-card {
	background: var(--wp--preset--color--paper);
}

.is-style-mt-card-dark {
	background: var(--wp--preset--color--forest);
	color: var(--mt-on-dark);
}

.is-style-mt-card-dark p {
	color: var(--mt-on-dark-muted);
}

.is-style-mt-card-dark :where(h1, h2, h3, h4),
.is-style-mt-card-dark a:not(.wp-element-button) {
	color: var(--mt-on-dark);
}

.is-style-mt-card > :first-child,
.is-style-mt-card-dark > :first-child {
	margin-top: 0;
}

.is-style-mt-card :where(h2, h3),
.is-style-mt-card-dark :where(h2, h3) {
	font-size: clamp(1.75rem, 2.4vw, 2.25rem);
}

.is-style-mt-card-wine {
	background: var(--wp--preset--color--wine);
	color: #FBF6F4;
	border-radius: var(--mt-radius-lg);
	padding: clamp(28px, 5vw, 64px);
	margin-top: 24px;
}

.is-style-mt-card-wine p,
.is-style-mt-card-wine a {
	color: #F0E4E5;
}

.is-style-mt-card-wine .wp-block-columns.is-style-mt-hero {
	padding-top: 0;
}

.is-style-mt-card-wine .is-style-mt-eyebrow {
	color: #F0D9DC;
}

.is-style-mt-card-wine .is-style-mt-lead {
	color: #F0E4E5;
}

/* Paragraphes */

.is-style-mt-lead {
	max-width: 560px;
	font-size: var(--wp--preset--font-size--lead);
	line-height: 1.55;
	color: var(--wp--preset--color--muted);
}

.is-style-mt-eyebrow {
	margin-bottom: 0.25rem;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--wine);
}

.is-style-mt-card-dark .is-style-mt-eyebrow {
	color: var(--wp--preset--color--sage);
}

.is-style-mt-eyebrow + * {
	margin-top: 0.25rem;
}

.is-style-mt-back {
	margin: 0;
}

.is-style-mt-back a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 44px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	color: var(--wp--preset--color--muted);
}

.is-style-mt-card-wine .is-style-mt-back a {
	color: #F0D9DC;
}

.is-style-mt-back a::before {
	content: "";
	width: 16px;
	height: 16px;
	background: currentColor;
	-webkit-mask: var(--mt-arrow-back) center / contain no-repeat;
	mask: var(--mt-arrow-back) center / contain no-repeat;
}

.is-style-mt-chip {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	width: fit-content;
	padding: 8px 16px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	background: var(--wp--preset--color--paper);
	font-size: 14px;
	font-weight: 600;
}

.is-style-mt-chip.mt-warning::before {
	content: "";
	flex: 0 0 18px;
	height: 18px;
	background: var(--wp--preset--color--wine);
	-webkit-mask: var(--mt-warning) center / contain no-repeat;
	mask: var(--mt-warning) center / contain no-repeat;
}

.mt-chips {
	gap: 12px;
}

.mt-chips .is-style-mt-chip {
	margin: 0;
	border-color: transparent;
	font-size: 15px;
}

.is-style-mt-figure {
	margin: 0;
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(2.5rem, 4vw, 3.25rem);
	line-height: 1;
	color: var(--wp--preset--color--wine);
}

.is-style-mt-card-dark .is-style-mt-figure {
	color: var(--wp--preset--color--sage);
}

.mt-price {
	margin: 0;
}

.mt-price strong {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 2.75rem;
	font-weight: 400;
	line-height: 1;
	color: var(--wp--preset--color--ink);
}

.is-style-mt-card-dark .mt-price strong {
	color: var(--mt-on-dark);
}

/* Listes */

ul.is-style-mt-lines,
ol.is-style-mt-steps,
ol.is-style-mt-timeline {
	margin: 0;
	padding: 0;
	list-style: none;
}

.is-style-mt-lines li {
	padding: 9px 0;
	border-bottom: 1px solid var(--mt-soft-line);
}

.is-style-mt-card-dark .is-style-mt-lines li {
	border-color: rgba(244, 243, 238, 0.2);
	color: var(--mt-on-dark);
}

.is-style-mt-lines li strong {
	display: block;
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--sage);
}

.is-style-mt-card .is-style-mt-lines li strong {
	color: var(--wp--preset--color--wine);
}

.is-style-mt-steps {
	counter-reset: mt-step;
}

.is-style-mt-steps li {
	counter-increment: mt-step;
	display: flex;
	align-items: flex-start;
	gap: 18px;
	padding: 16px 0;
	border-bottom: 1px solid var(--mt-soft-line);
	font-size: 18px;
}

.is-style-mt-steps li::before {
	content: counter(mt-step);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 40px;
	height: 40px;
	margin-top: -6px;
	border-radius: 999px;
	background: var(--wp--preset--color--forest);
	color: var(--mt-on-dark);
	font-size: 16px;
	font-weight: 700;
}

.is-style-mt-timeline {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	column-gap: 24px;
	border-top: 1px solid var(--wp--preset--color--ink);
}

.is-style-mt-timeline li {
	padding: 24px 0;
	border-bottom: 1px solid var(--wp--preset--color--line);
	color: var(--wp--preset--color--muted);
}

.is-style-mt-timeline li strong {
	display: block;
	margin-bottom: 8px;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 2.25rem;
	font-weight: 400;
	line-height: 1.05;
	color: var(--wp--preset--color--wine);
}

/* Tarifs */

.wp-block-table.is-style-mt-prices {
	margin: 0;
}

.wp-block-table.is-style-mt-prices table {
	table-layout: auto;
	border-collapse: collapse;
}

.wp-block-table.is-style-mt-prices td {
	padding: 12px 0;
	border: 0;
	border-bottom: 1px solid var(--mt-soft-line);
}

.wp-block-table.is-style-mt-prices td:last-child {
	padding-left: 16px;
	text-align: right;
	white-space: nowrap;
	font-weight: 700;
}

.mt-low-season {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 32px;
}

.mt-low-season .is-style-mt-figure {
	color: var(--mt-on-dark);
}

.mt-low-season > p:last-child {
	flex: 1 1 320px;
	margin: 0;
}

/* Images et galeries */

.entry-content .wp-block-image img {
	border-radius: 16px;
}

.entry-content .wp-block-image figcaption {
	margin-top: 10px;
	text-align: left;
}

.mt-figures .wp-block-image img {
	width: 100%;
	max-width: 360px;
	height: 220px;
	object-fit: cover;
}

.wp-block-gallery.has-nested-images figure.wp-block-image img {
	border-radius: 14px;
}

.wp-block-gallery.is-style-mt-masonry {
	display: block;
	columns: 260px 4;
	column-gap: 14px;
}

.wp-block-gallery.is-style-mt-masonry.has-nested-images figure.wp-block-image:not(#individual-image) {
	display: block;
	width: 100%;
	margin: 0 0 14px;
	break-inside: avoid;
}

.wp-block-gallery.is-style-mt-masonry.has-nested-images figure.wp-block-image:not(#individual-image) img {
	height: auto;
}

.wp-block-gallery.is-style-mt-featured.has-nested-images {
	gap: 8px;
}

.wp-block-gallery.is-style-mt-featured.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) {
	width: calc(20% - 8px * 4 / 5);
	flex-grow: 0;
}

.entry-content .wp-block-gallery.is-style-mt-featured.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) {
	height: 64px;
}

.entry-content .wp-block-gallery.is-style-mt-featured.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) img {
	height: 100%;
	border-radius: 8px;
}

.wp-block-gallery.is-style-mt-featured.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image):first-child {
	width: 100%;
}

.entry-content .wp-block-gallery.is-style-mt-featured.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image):first-child {
	height: clamp(220px, 26vw, 300px);
}

.entry-content .wp-block-gallery.is-style-mt-featured.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image):first-child img {
	border-radius: 0;
}

/* Boutons */

.wp-block-button.is-style-outline > .wp-block-button__link {
	padding: calc(0.75rem - 1px) calc(1.5rem - 1px);
	border: 1px solid currentColor;
	background: transparent;
	color: var(--wp--preset--color--ink);
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--cream);
}

.is-style-mt-card-dark .wp-block-button.is-style-outline > .wp-block-button__link {
	color: var(--mt-on-dark);
}

.mt-more a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	font-weight: 600;
	text-decoration: none;
}

.mt-more a::after {
	content: "";
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: var(--mt-arrow) center / contain no-repeat;
	mask: var(--mt-arrow) center / contain no-repeat;
}

/* Accueil */

@keyframes mt-ken-burns {
	from { transform: scale(1); }
	to { transform: scale(1.1); }
}

.mt-main .mt-home-hero {
	position: relative;
	display: flex;
	align-items: center;
	/* Proportions du panorama (2560 × 627), entre 480 et 720 px de haut (place pour le texte et le bouton). */
	height: clamp(480px, 24.5vw, 720px);
	margin-top: 0;
	overflow: hidden;
	background: var(--wp--preset--color--forest);
	color: var(--mt-on-dark);
}

.mt-home-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(90deg, rgba(16, 26, 20, 0.9) 0%, rgba(16, 26, 20, 0.74) 24%, rgba(16, 26, 20, 0.12) 40%, rgba(16, 26, 20, 0) 48%);
}

.mt-home-hero > .wp-block-image {
	position: absolute;
	inset: 0;
	margin: 0;
	overflow: hidden;
}

/* Panorama du château (le château occupe 35 à 73 % de sa largeur). Sur ordinateur, il remplit l'accroche :
   en dessous de 1960 px de large, les côtés sont rognés, cadrés à 38 % pour garder le château à droite du texte. */
.entry-content .mt-home-hero > .wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 38% 40%;
	border-radius: 0;
	transform-origin: 54% 45%;
	animation: mt-ken-burns 16s ease-in-out infinite alternate;
}

@media (prefers-reduced-motion: reduce) {
	.entry-content .mt-home-hero > .wp-block-image img {
		animation: none;
	}
}

/* Tablette en largeur et petit ordinateur : le texte occupe plus de la moitié de l'écran et passe sur la façade claire,
   voile plus large derrière lui. */
@media (min-width: 782px) and (max-width: 1279px) {
	.mt-home-hero::before {
		background: linear-gradient(90deg, rgba(16, 26, 20, 0.9) 0%, rgba(16, 26, 20, 0.8) 34%, rgba(16, 26, 20, 0.45) 50%, rgba(16, 26, 20, 0) 64%);
	}
}

.mt-home-hero__content {
	position: relative;
	z-index: 2;
	box-sizing: content-box;
	max-width: 440px;
	padding: 28px clamp(24px, 4vw, 56px);
}

.mt-home-hero__content > * {
	margin: 0;
}

.mt-home-hero .mt-hero-eyebrow {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 12px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--wp--preset--color--sage);
}

.mt-home-hero .mt-hero-eyebrow::before {
	content: "";
	width: 40px;
	height: 1px;
	background: currentColor;
}

.mt-home-hero h1 {
	margin-bottom: 10px;
	font-size: clamp(3.5rem, 6.2vw, 6rem);
	line-height: 0.92;
	letter-spacing: -0.03em;
}

.mt-home-hero h1 br {
	display: none;
}

.mt-home-hero h1 em {
	display: block;
	font-size: clamp(1.625rem, 2.6vw, 2.375rem);
	letter-spacing: 0;
	color: #E9D9D2;
}

.mt-home-hero .mt-hero-sub {
	margin-bottom: 10px;
	font-family: var(--wp--preset--font-family--serif);
	font-style: italic;
	font-size: clamp(1.3125rem, 1.9vw, 1.6875rem);
	line-height: 1.2;
	color: #E9D9D2;
}

.mt-home-hero__content > p:not(.mt-hero-eyebrow):not(.mt-hero-sub) {
	color: var(--mt-on-dark-muted);
}

.mt-home-hero__content > .mt-hero-actions {
	margin-top: 28px;
}

.mt-home-hero .wp-block-button.is-style-outline > .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	box-sizing: border-box;
	border-color: rgba(244, 243, 238, 0.6);
	color: var(--mt-on-dark);
}

.mt-home-hero .wp-block-button.is-style-outline > .wp-block-button__link::after {
	content: "";
	width: 18px;
	height: 18px;
	background: currentColor;
	-webkit-mask: var(--mt-arrow) center / contain no-repeat;
	mask: var(--mt-arrow) center / contain no-repeat;
	transform: rotate(90deg);
}

.mt-home-hero .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--mt-on-dark);
	color: var(--wp--preset--color--ink);
}

.mt-tiles {
	scroll-margin-top: 24px;
}

html {
	scroll-behavior: smooth;
}

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

/* Téléphone et tablette en hauteur : bandeau du panorama en haut, château entier (62 % de la largeur de l'écran
   de haut = château sur 94 % de la largeur), fondu vers le sapin, texte en dessous. */
@keyframes mt-ken-burns-phone {
	from { transform: scale(1); }
	to { transform: scale(1.06); }
}

@media (max-width: 781px) {
	.mt-main .mt-home-hero {
		display: block;
		height: auto;
	}

	.mt-home-hero::before {
		bottom: auto;
		height: 62vw;
		background: linear-gradient(180deg, rgba(16, 26, 20, 0) 60%, var(--wp--preset--color--forest) 100%);
	}

	.mt-home-hero > .wp-block-image {
		position: relative;
		height: 62vw;
	}

	.entry-content .mt-home-hero > .wp-block-image img {
		object-position: 54% 50%;
		transform-origin: 54% 50%;
		animation-name: mt-ken-burns-phone;
	}

	.mt-home-hero__content {
		padding: 8px 24px 40px;
	}
}

/* Vignettes et actualités de l'accueil : la zone s'élargit avec l'écran (jusqu'à 2200 px) et les vignettes grandissent avec elle. */
.entry-content > .mt-home-main {
	max-width: min(2200px, 100%);
	gap: clamp(24px, 2vw, 40px);
}

/* 4 vignettes par ligne si la place le permet, sinon 2 (jamais 3 : 8 vignettes, pas d'orpheline). */
.mt-home-main > .wp-block-column:first-child {
	container-type: inline-size;
}

.entry-content .mt-tiles.is-layout-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(16px, 1.2vw, 24px);
}

@container (min-width: 760px) {
	.entry-content .mt-tiles.is-layout-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.is-style-mt-tile {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0;
	overflow: hidden;
	border-radius: 16px;
	background: var(--wp--preset--color--paper);
	padding: 0 40px 16px 0;
}

.is-style-mt-tile > * {
	margin: 0;
}

.is-style-mt-tile > .wp-block-image {
	margin-right: -40px;
}

.entry-content .is-style-mt-tile .wp-block-image img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 0;
}

.is-style-mt-tile .mt-tile__title {
	margin: 14px 0 0 16px;
	font-family: var(--wp--preset--font-family--serif);
	font-size: clamp(22px, 1.5vw, 30px);
	line-height: 1.1;
}

.is-style-mt-tile .mt-tile__title a {
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}

.is-style-mt-tile .mt-tile__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.is-style-mt-tile:hover .mt-tile__title a {
	color: var(--wp--preset--color--wine);
}

.is-style-mt-tile:focus-within {
	outline: 3px solid var(--wp--preset--color--wine);
	outline-offset: 2px;
}

.is-style-mt-tile .mt-tile__title a:focus-visible {
	outline: none;
}

.is-style-mt-tile .mt-tile__sub {
	margin: 3px 0 0 16px;
	font-size: 13px;
	line-height: 1.4;
	color: var(--wp--preset--color--muted);
}

.is-style-mt-tile::after {
	content: "";
	position: absolute;
	right: 16px;
	bottom: 18px;
	width: 20px;
	height: 20px;
	background: var(--wp--preset--color--ink);
	-webkit-mask: var(--mt-arrow) center / contain no-repeat;
	mask: var(--mt-arrow) center / contain no-repeat;
}

.mt-news .wp-block-post-template {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mt-news .wp-block-post-template > li {
	margin: 0;
}

.mt-news .wp-block-post {
	padding: 12px 0;
	border-top: 1px solid var(--wp--preset--color--line);
}

.mt-news .wp-block-post-title {
	margin: 0;
	font-family: var(--wp--preset--font-family--sans);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.4;
}

.mt-news .wp-block-post-title a {
	text-decoration: none;
}

.mt-news .wp-block-post > * {
	margin: 0;
}

.mt-news .wp-block-post-date {
	font-size: 13px;
	color: var(--wp--preset--color--muted);
}

/* Titre de la carte vidéo (« Voici nos nouvelles tentes ! ») : taille de la maquette, plus discrète que les titres de section. */
.mt-home-main .is-style-mt-card-dark h3 {
	font-size: clamp(1.5rem, 1.6vw, 1.75rem);
	line-height: 1.15;
}

.mt-video .wp-block-video {
	margin: 0;
}

.mt-video video {
	display: block;
	width: 100%;
	border-radius: 14px;
}

/* Onglets (page Photos) */

.wp-block-tabs .wp-block-tab-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 28px;
}

.wp-block-tabs .wp-block-tab-list [role="tab"] {
	min-height: 44px;
	padding: 0 20px;
	border: 1px solid var(--wp--preset--color--ink);
	border-radius: 999px;
	background: transparent;
	color: var(--wp--preset--color--ink);
	font: 600 15px/1 var(--wp--preset--font-family--sans);
	cursor: pointer;
}

.wp-block-tabs .wp-block-tab-list [role="tab"][aria-selected="true"] {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--cream);
}

/* Liens utiles */

.mt-link-card {
	position: relative;
	overflow: hidden;
	padding: 0 0 24px;
}

.entry-content .mt-link-card .wp-block-image img {
	width: 100%;
	height: 240px;
	object-fit: cover;
	border-radius: 0;
}

.mt-link-card > :not(.wp-block-image) {
	margin-inline: 28px;
}

.mt-link-card .wp-block-image {
	margin: 0 0 20px;
}

.mt-link-card .mt-tile__title {
	margin-bottom: 0;
	font-family: var(--wp--preset--font-family--serif);
	font-size: 28px;
	line-height: 1.15;
}

.mt-link-card .mt-tile__title a {
	text-decoration: none;
}

.mt-link-card .mt-tile__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.mt-link-card .mt-tile__sub {
	margin-top: 6px;
	font-size: 14px;
	color: var(--wp--preset--color--muted);
}

.mt-link-card:hover .mt-tile__title a {
	color: var(--wp--preset--color--wine);
}

/* Appartements */

.mt-apartment {
	overflow: hidden;
	padding: 0;
}

.mt-apartment > :not(.wp-block-gallery) {
	margin-inline: 28px;
}

.mt-apartment .mt-apartment__head {
	margin-block: 20px 24px;
	align-items: flex-end;
}

.mt-apartment__head h2 {
	margin: 0;
	font-size: 2rem;
}

.mt-apartment__head p {
	margin: 4px 0 0;
}

.mt-apartment .wp-block-gallery {
	margin: 0;
	padding: 0 0 0;
}

.mt-apartment .wp-block-gallery figure.wp-block-image:not(:first-child) {
	margin-top: 0;
}

.mt-apartment .wp-block-gallery.is-style-mt-featured.has-nested-images {
	padding: 0 28px 0;
	row-gap: 8px;
}

.mt-apartment .wp-block-gallery.is-style-mt-featured.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image):first-child {
	margin: 0 -28px 8px;
	width: calc(100% + 56px);
	max-width: none;
}

/* Contact et accès */

.mt-contact-card .wp-block-buttons {
	margin-top: 8px;
}

.mt-serif {
	font-family: var(--wp--preset--font-family--serif);
	font-size: 1.75rem;
	line-height: 1.2;
}

.is-style-mt-card-dark .mt-serif,
.is-style-mt-card-wine .mt-serif {
	color: var(--mt-on-dark);
}

/* Articles */

.mt-news-list .wp-block-post-title a {
	text-decoration: none;
}

/* Petits écrans */

@media (max-width: 781px) {
	.wp-block-columns.is-style-mt-hero {
		padding-top: 24px;
	}
}

@media (max-width: 600px) {
	.is-style-mt-tile {
		padding-right: 32px;
	}

	.is-style-mt-tile > .wp-block-image {
		margin-right: -32px;
	}

	.is-style-mt-tile .mt-tile__title {
		margin-left: 12px;
		font-size: 20px;
	}

	.is-style-mt-tile .mt-tile__sub {
		margin-left: 12px;
		font-size: 12px;
	}

	.is-style-mt-tile::after {
		right: 12px;
		width: 16px;
		height: 16px;
	}

	.wp-block-gallery.is-style-mt-featured.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) {
		width: calc(25% - 8px * 3 / 4);
	}
}

.mt-footer__legal a {
	color: var(--wp--preset--color--sage);
}

/* Mentions légales et confidentialité */

.mt-legal {
	max-width: 760px;
}

.mt-legal h3 {
	margin-top: 2rem;
	font-size: 1.75rem;
}

.mt-legal mark {
	background: #F6E7A8;
	color: var(--wp--preset--color--ink);
}

/* Actualités : bandeau du château (liste et articles) */

.mt-news-main {
	padding-bottom: clamp(56px, 8vw, 96px);
}

.mt-news-hero {
	position: relative;
	display: flex;
	align-items: center;
	height: clamp(300px, 24vw, 440px);
	overflow: hidden;
	background: var(--wp--preset--color--forest);
	color: var(--mt-on-dark);
}

.mt-news-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(90deg, rgba(16, 26, 20, 0.9) 0%, rgba(16, 26, 20, 0.72) 30%, rgba(16, 26, 20, 0.15) 52%, rgba(16, 26, 20, 0) 62%);
}

.mt-news-hero__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	/* Le château occupe 27 à 60 % de la hauteur de la photo : bande visible centrée dessus. */
	object-position: 47% 38%;
	transform-origin: 47% 43%;
	animation: mt-ken-burns 24s ease-in-out infinite alternate;
}

@media (prefers-reduced-motion: reduce) {
	.mt-news-hero__image {
		animation: none;
	}
}

.mt-news-hero__content {
	position: relative;
	z-index: 2;
	box-sizing: content-box;
	max-width: 560px;
	padding: 0 clamp(24px, 4vw, 56px) 40px;
}

.mt-news-hero__content > * {
	margin: 0;
}

.mt-news-hero .mt-hero-eyebrow {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 14px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: var(--wp--preset--color--sage);
}

.mt-news-hero .mt-hero-eyebrow::before {
	content: "";
	width: 40px;
	height: 1px;
	background: currentColor;
}

.mt-news-hero .mt-hero-eyebrow a {
	color: inherit;
	text-decoration: none;
}

.mt-news-hero .mt-hero-eyebrow a:hover {
	color: var(--mt-on-dark);
	text-decoration: underline;
}

.mt-news-hero h1 {
	font-size: clamp(2.5rem, 4.6vw, 4.25rem);
	line-height: 1;
	letter-spacing: -0.02em;
	color: var(--mt-on-dark);
}

.mt-news-hero__date {
	margin-top: 14px;
	font-family: var(--wp--preset--font-family--serif);
	font-style: italic;
	font-size: 1.375rem;
	color: #E9D9D2;
}

/* Article : carte qui chevauche le bas du bandeau */

.mt-main .mt-article {
	position: relative;
	z-index: 3;
	max-width: 760px;
	box-sizing: border-box;
	margin: -48px auto 0;
	padding: clamp(28px, 4vw, 48px);
	box-shadow: 0 18px 48px rgba(30, 42, 35, 0.12);
}

.mt-article .wp-block-post-content > :first-child {
	margin-top: 0;
}

.mt-article .is-style-mt-back {
	margin-top: 32px;
	padding-top: 16px;
	border-top: 1px solid var(--wp--preset--color--line);
}

/* Liste des actualités sous le bandeau */

.mt-news-wrap {
	position: relative;
	z-index: 3;
	margin-top: -48px;
}

.mt-news-list .is-style-mt-card {
	height: 100%;
	box-sizing: border-box;
	box-shadow: 0 18px 48px rgba(30, 42, 35, 0.1);
}

@media (max-width: 781px) {
	.mt-news-hero {
		height: auto;
		min-height: 320px;
		align-items: flex-end;
	}

	.mt-news-hero::before {
		background: linear-gradient(180deg, rgba(16, 26, 20, 0.3) 0%, rgba(16, 26, 20, 0.88) 70%);
	}

	.mt-news-hero__content {
		padding-bottom: 72px;
	}

	.mt-main .mt-article {
		margin-inline: 16px;
	}
}

/* Icônes des cartes (page Le vin) : registre d'icônes du thème, en bordeaux */
.mt-point-icon {
	margin-bottom: 4px;
	color: var(--wp--preset--color--wine);
}

.entry-content .wp-block-icon.mt-point-icon svg {
	display: block;
	width: 52px;
	height: 52px;
	fill: currentColor;
}
