/* =========================================================================
   La Maison Diev — styles du site
   Maquette de référence : 1920 px (ordinateur) et 390 px (mobile).
   ========================================================================= */

/* Polices — à remplacer par les fichiers .woff2 des licences web définitives. */
@font-face {
	font-family: "Relaate Narrow";
	src: url("../fonts/relaate-serif-narrow.otf") format("opentype");
	font-weight: 400;
	font-display: swap;
}
@font-face {
	font-family: "CoFo Gothic";
	src: url("../fonts/cofo-gothic-light.otf") format("opentype");
	font-weight: 300;
	font-display: swap;
}
@font-face {
	font-family: "CoFo Gothic";
	src: url("../fonts/cofo-gothic-regular.otf") format("opentype");
	font-weight: 400;
	font-display: swap;
}
@font-face {
	font-family: "CoFo Gothic";
	src: url("../fonts/cofo-gothic-medium.otf") format("opentype");
	font-weight: 500;
	font-display: swap;
}

:root {
	--noir: #0d0d0d;
	--or: #e6a000;
	--or-doux: #e1b93c;
	--or-sombre: #907626;
	--blanc: #fff;
	--gris: #3c3c3c;
	--gris-fonce: #2b2b2b;
	--champ: #3a3a3a;
	--erreur: #ef6b56;

	--titres: "Relaate Narrow", "Bodoni 72", "Didot", Georgia, serif;
	--texte: "CoFo Gothic", "Helvetica Neue", Arial, sans-serif;

	--marge: clamp(16px, 3vw, 58px);
	--entete-h: clamp(56px, 4.6vw, 88px);
	--filet: clamp(4px, 0.42vw, 8px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--noir);
	color: var(--blanc);
	font-family: var(--texte);
	font-weight: 300;
	font-size: clamp(15px, 1.05vw, 20px);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:hover { color: var(--or); }
:focus-visible { outline: 2px solid var(--or); outline-offset: 3px; }

.md-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.md-sr--focus:focus {
	clip: auto; width: auto; height: auto;
	z-index: 100; top: 8px; left: 8px;
	padding: 8px 14px; background: var(--or); color: var(--noir);
}

/* ---------- Étoiles et cadres ------------------------------------------- */

.md-etoile { width: 1em; height: 1em; fill: currentColor; flex: none; }

.md-ciel {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
	z-index: 0;
}
.md-ciel span {
	position: absolute;
	color: var(--or-sombre);
	opacity: 0.45;
	/* --t : taille de l'étoile sur la maquette 1920 px. */
	font-size: clamp(22px, calc(var(--t) * 0.052vw), calc(var(--t) * 1px));
	transform: translate(-50%, -50%);
}

/* Le tracé des cadres (coins creusés) est dessiné en SVG par main.js. */
[data-md-cadre] { position: relative; }
.md-cadre-svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
	pointer-events: none;
	fill: none;
}
.md-cadre-svg .ext { stroke: var(--or-doux); stroke-opacity: 0.64; }
.md-cadre-svg .int { stroke: var(--or-doux); }

/* ---------- En-tête des pages internes ---------------------------------- */

.md-entete {
	position: sticky;
	top: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	gap: clamp(16px, 2.6vw, 50px);
	height: calc(var(--entete-h) + var(--filet));
	padding: 0 var(--marge);
	background: var(--noir);
	border-bottom: var(--filet) solid var(--or);
}
.admin-bar .md-entete { top: 32px; }
@media (max-width: 782px) { .admin-bar .md-entete { top: 0; } }

.md-logo {
	display: flex;
	align-items: baseline;
	gap: 0.6em;
	text-decoration: none;
	color: var(--or);
	margin-right: auto;
	white-space: nowrap;
}
.md-logo__etoile { font-size: clamp(22px, 1.6vw, 32px); align-self: center; margin-right: 0.4em; }
.md-logo__nom {
	font-family: var(--titres);
	font-size: clamp(22px, 2.35vw, 45px);
	line-height: 1;
	text-transform: uppercase;
}
.md-logo__sous-titre {
	font-size: clamp(13px, 1.3vw, 25px);
	text-transform: uppercase;
	color: var(--or-doux);
}
.md-logo:hover { color: var(--or); }

.md-nav ul { list-style: none; margin: 0; padding: 0; display: flex; }
.md-nav a {
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	transition: color 0.2s;
}
.md-nav--interne ul { gap: clamp(20px, 2.6vw, 52px); }
.md-nav--interne a { font-size: clamp(13px, 1.05vw, 20px); }
.md-nav .current-menu-item > a,
.md-nav .current_page_item > a,
.md-nav .current-menu-ancestor > a { color: var(--or); }

.md-entete__etoile { font-size: clamp(26px, 2vw, 40px); color: var(--or); }

.md-burger {
	display: none;
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: 8px;
	background: var(--or);
	cursor: pointer;
	position: relative;
	z-index: 60;
}
.md-burger__barres,
.md-burger__barres::before,
.md-burger__barres::after {
	position: absolute;
	left: 8px;
	right: 8px;
	height: 2px;
	background: var(--noir);
	border-radius: 2px;
	transition: transform 0.25s, opacity 0.25s;
}
.md-burger__barres { top: 16px; }
.md-burger__barres::before,
.md-burger__barres::after { content: ""; left: 0; right: 0; }
.md-burger__barres::before { top: -7px; }
.md-burger__barres::after { top: 7px; }
.md-burger[aria-expanded="true"] .md-burger__barres { background: transparent; }
.md-burger[aria-expanded="true"] .md-burger__barres::before { transform: translateY(7px) rotate(45deg); }
.md-burger[aria-expanded="true"] .md-burger__barres::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
	.md-burger { display: block; }
	.md-entete__etoile { display: none; }
	.md-entete { gap: 12px; }
	.md-logo { gap: 0.5em; }
	.md-logo__etoile { margin-right: 0.2em; }

	.md-nav--interne {
		position: fixed;
		inset: 0;
		z-index: 55;
		display: flex;
		align-items: center;
		justify-content: center;
		background: rgba(13, 13, 13, 0.98);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.25s, visibility 0.25s;
	}
	.md-menu-ouvert .md-nav--interne { opacity: 1; visibility: visible; }
	.md-menu-ouvert { overflow: hidden; }
	.md-nav--interne ul { flex-direction: column; align-items: center; gap: 28px; }
	.md-nav--interne a {
		font-family: var(--titres);
		font-size: clamp(48px, 14vw, 72px);
		line-height: 1;
		color: var(--or);
	}
	.md-nav--interne a:hover,
	.md-nav--interne .current-menu-item > a { color: var(--or-doux); }
}

/* ---------- Accueil ----------------------------------------------------- */

.md-accueil .md-main { position: relative; }

.md-entete-accueil {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 10;
	padding: clamp(14px, 2.2vh, 30px) 0 0 12.5vw;
}
.admin-bar .md-entete-accueil { top: 32px; }
@media (max-width: 782px) { .admin-bar .md-entete-accueil { top: 46px; } }
.md-nav--accueil ul { gap: clamp(18px, 2.2vw, 44px); }
.md-nav--accueil a {
	color: var(--or-doux);
	font-size: clamp(14px, 1.5vw, 28px);
}
.md-nav--accueil a:hover { color: var(--or); }

.md-accueil-hero {
	position: relative;
	height: 100vh;
	height: 100svh;
	min-height: 560px;
	overflow: hidden;
}

.md-cadre--accueil {
	position: absolute !important;
	top: 7.8%;
	left: 4.6%;
	right: 4.6%;
	bottom: 7.5%;
	z-index: 0;
	--cadre-r: clamp(60px, 5.6vw, 108px);
	--cadre-ecart: clamp(18px, 1.6vw, 31px);
	--cadre-trait: 2.5;
}
.md-cadre__etoile {
	position: absolute;
	font-size: clamp(36px, 3.4vw, 66px);
	color: var(--or-doux);
	transform: translate(-50%, -50%);
}
.md-cadre__etoile--hg { left: 0; top: 0; }
.md-cadre__etoile--hd { left: 100%; top: 0; }
.md-cadre__etoile--bg { left: 0; top: 100%; }
.md-cadre__etoile--bd { left: 100%; top: 100%; }

.md-accueil-hero__titre {
	position: absolute;
	z-index: 2;
	left: 7.6%;
	top: 50%;
	transform: translateY(-50%);
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	font-weight: 400;
	color: var(--or);
	text-align: center;
	pointer-events: none;
}
.md-accueil-hero__ligne {
	font-family: var(--titres);
	font-size: clamp(64px, 10.2vw, 200px);
	line-height: 0.86;
	text-transform: uppercase;
}
.md-accueil-hero__sous-titre {
	font-size: clamp(14px, 1.8vw, 35px);
	font-weight: 300;
	color: var(--or-doux);
	text-transform: uppercase;
	margin: 0.1em 0 0.45em;
	line-height: 1;
}

/* La photo est calée sur la hauteur de l'écran : les personnages occupent ~80 %
   de la hauteur et finissent près du bord droit, comme sur la maquette. */
.md-accueil-hero__photo {
	position: absolute;
	z-index: 1;
	top: 3%;
	height: 93%;
	right: calc(2vw - 43svh);
	aspect-ratio: 2400 / 1347;
}
.md-accueil-hero__photo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}
.md-photo--masque {
	-webkit-mask: url("../img/accueil-masque.png") center / 100% 100% no-repeat;
	mask: url("../img/accueil-masque.png") center / 100% 100% no-repeat;
}

@media (max-width: 760px) {
	.md-entete-accueil { padding: 18px 16px 0; }
	.md-nav--accueil ul { justify-content: space-between; gap: 8px; }
	.md-nav--accueil a { font-size: 15px; }

	.md-cadre--accueil {
		top: 70px;
		left: 20px;
		right: 20px;
		bottom: 20px;
		--cadre-r: 44px;
		--cadre-ecart: 12px;
	}
	.md-cadre__etoile { font-size: 26px; }

	.md-accueil-hero__titre {
		left: 50%;
		top: 120px;
		transform: translateX(-50%);
		width: 100%;
	}
	.md-accueil-hero__ligne { font-size: clamp(56px, 17vw, 96px); }
	.md-accueil-hero__sous-titre { font-size: 13px; margin: 0.15em 0 0.35em; }

	/* Photo plus large que l'écran, centrée sur les personnages (sans recadrage, pour garder le masque aligné). */
	.md-accueil-hero__photo {
		left: 50%;
		right: auto;
		top: auto;
		bottom: 5%;
		height: auto;
		width: 140%;
		/* Les personnages occupent 4 % → 74 % de la largeur de la photo : on centre leur milieu (39 %). */
		transform: translateX(-39%);
	}
}

/* ---------- Grande photo des pages internes ----------------------------- */

.md-hero {
	position: relative;
	height: calc(100vh - var(--entete-h) - var(--filet));
	height: calc(100svh - var(--entete-h) - var(--filet));
	min-height: 420px;
	max-height: 1000px;
	border-bottom: var(--filet) solid var(--or);
	overflow: hidden;
	display: flex;
	align-items: center;
	background: #000;
}
.md-hero__photo { position: absolute; inset: 0; }
.md-hero__photo img { width: 100%; height: 100%; object-fit: cover; }

.md-hero__titre {
	position: relative;
	z-index: 2;
	margin: 0 0 0 var(--marge);
	font-family: var(--titres);
	font-weight: 400;
	font-size: clamp(72px, 10.4vw, 200px);
	line-height: 0.88;
	color: var(--or);
	text-transform: uppercase;
	text-shadow: 0 0 40px rgba(0, 0, 0, 0.35);
}

.md-fil {
	position: absolute;
	z-index: 2;
	top: clamp(16px, 2vw, 36px);
	left: var(--marge);
	font-size: clamp(12px, 0.95vw, 18px);
	text-transform: uppercase;
}
.md-fil a { text-decoration: none; }

.md-scroll {
	display: none;
	position: absolute;
	z-index: 2;
	bottom: 18px;
	left: 50%;
	transform: translateX(-50%);
	padding: 3px 14px;
	border-radius: 20px;
	background: rgba(70, 70, 70, 0.85);
	font-size: 13px;
	text-transform: uppercase;
	text-decoration: none;
	white-space: nowrap;
}

/* Projets : liste des zones à droite du titre. */
.md-hero__zones {
	position: absolute;
	z-index: 2;
	right: 12%;
	top: 50%;
	transform: translateY(-50%);
}
.md-zones-liste {
	list-style: none;
	margin: 0;
	padding: 0;
	text-align: center;
	display: grid;
	gap: clamp(10px, 1.5vw, 30px);
}
.md-zones-liste a {
	text-decoration: none;
	text-transform: uppercase;
	font-size: clamp(15px, 1.3vw, 25px);
}

/* Zone : photo centrée sur fond noir. */
.md-hero--zone .md-hero__photo img { object-fit: contain; object-position: 58% center; }

@media (max-width: 760px) {
	.md-hero { align-items: flex-end; padding-bottom: 72px; }
	.md-scroll { display: block; }
	.md-hero__titre { font-size: clamp(64px, 19vw, 110px); }

	.md-hero--projets { flex-direction: column; justify-content: flex-end; align-items: flex-start; }
	.md-hero__zones {
		position: absolute;
		top: 22px;
		left: var(--marge);
		right: auto;
		transform: none;
	}
	.md-hero__zones .md-zones-liste { text-align: left; gap: 10px; }
	.md-hero__zones a { font-size: 20px; color: var(--or); }

	.md-hero--zone .md-hero__photo img { object-fit: cover; object-position: center; }
	.md-hero--zone .md-fil { top: 14px; }
}

/* ---------- Sections et textes ------------------------------------------ */

.md-section {
	position: relative;
	padding: clamp(40px, 5.2vw, 100px) var(--marge) clamp(56px, 6.5vw, 130px);
}
.md-section > *:not(.md-ciel) { position: relative; z-index: 1; }
.md-section--etoilee { overflow: hidden; }

.md-titre-section {
	margin: 0 0 clamp(20px, 2.4vw, 46px);
	font-size: clamp(28px, 3.1vw, 60px);
	font-weight: 300;
	line-height: 1.1;
	color: var(--or-doux);
	text-transform: uppercase;
}
.md-titre-section:not(:first-of-type) { margin-top: clamp(56px, 6vw, 120px); }

.md-texte {
	max-width: 1320px;
	margin-left: clamp(0px, 8.4vw, 162px);
	font-size: clamp(16px, 1.3vw, 25px);
	line-height: 2.1;
}
.md-texte p { margin: 0 0 1.6em; }
.md-texte > :last-child { margin-bottom: 0; }
.md-texte a { color: var(--or); }
.md-texte h2,
.md-texte h3 { color: var(--or-doux); font-weight: 300; text-transform: uppercase; line-height: 1.3; }

@media (max-width: 760px) {
	.md-texte { line-height: 1.85; }
}

/* Résident·e : portrait encadré et plaque au nom. */
.md-resident {
	margin: 0 auto;
	width: min(560px, 88%);
	display: flex;
	flex-direction: column;
	align-items: center;
}
.md-resident__portrait { width: 100%; }
.md-plaque {
	margin-top: -4px;
	padding: 0.35em 1.4em 0.25em;
	font-family: var(--titres);
	font-size: clamp(26px, 2.35vw, 45px);
	line-height: 1;
	color: var(--or);
	text-transform: uppercase;
	--cadre-r: 12px;
	--cadre-ecart: 5px;
	--cadre-trait: 2;
}
.md-plaque span { position: relative; z-index: 1; }

/* ---------- Projets : carrousel des zones ------------------------------- */

.md-zones__grille {
	display: grid;
	grid-template-columns: minmax(180px, 22%) 1fr minmax(0, 22%);
	align-items: center;
}
.md-zones__onglets {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: clamp(10px, 1.5vw, 28px);
	justify-items: start;
}
.md-zones__onglets button {
	all: unset;
	cursor: pointer;
	text-transform: uppercase;
	font-size: clamp(15px, 1.3vw, 25px);
	transition: color 0.2s;
}
.md-zones__onglets button:hover,
.md-zones__onglets [aria-selected="true"] { color: var(--or); }
.md-zones__onglets button:focus-visible { outline: 2px solid var(--or); outline-offset: 4px; }

.md-zones__scene {
	position: relative;
	width: min(100%, 760px);
	margin: 0 auto;
}

.md-zones__piste {
	position: relative;
	z-index: 1;
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	overscroll-behavior-x: contain;
}
.md-zones__piste::-webkit-scrollbar { display: none; }

.md-carte {
	flex: 0 0 100%;
	scroll-snap-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none;
	background: var(--noir);
}
.md-carte__visuel { width: 100%; }
.md-carte__titre {
	margin-top: clamp(6px, 1vw, 16px);
	font-family: var(--titres);
	font-size: clamp(32px, 3vw, 56px);
	line-height: 1;
	color: var(--or);
	text-transform: uppercase;
	white-space: nowrap;
}
.md-carte:hover .md-carte__titre { color: var(--or-doux); }

.md-zones__fleche {
	position: absolute;
	z-index: 2;
	top: 50%;
	display: none;
	width: 40px;
	height: 40px;
	border: 1px solid var(--or-sombre);
	border-radius: 50%;
	background: rgba(13, 13, 13, 0.8);
	color: var(--or);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}
.md-zones__fleche--prec { left: -6px; }
.md-zones__fleche--suiv { right: -6px; }

/* Ordinateur : défilement vertical. La carte active est au centre ; la précédente
   et la suivante dépassent au-dessus et en dessous, estompées. */
@media (min-width: 901px) {
	.md-zones__scene {
		--piste-h: min(calc(100svh - var(--entete-h) - 16px), 1100px);
		--carte-h: calc(var(--piste-h) * 0.68);
		width: 100%;
	}
	.md-zones__piste {
		flex-direction: column;
		align-items: center;
		height: var(--piste-h);
		/* Marges haut et bas : la première et la dernière carte peuvent aussi être centrées. */
		padding-block: calc((var(--piste-h) - var(--carte-h)) / 2);
		overflow-x: hidden;
		overflow-y: auto;
		scroll-snap-type: y mandatory;
		overscroll-behavior: auto;
		-webkit-mask: linear-gradient(transparent, #000 10%, #000 90%, transparent);
		mask: linear-gradient(transparent, #000 10%, #000 90%, transparent);
	}
	.md-carte {
		flex: 0 0 var(--carte-h);
		width: calc(var(--carte-h) / 1.14);
		max-width: 100%;
		min-height: 0;
		scroll-snap-align: center;
		scroll-snap-stop: always;
		background: transparent;
		opacity: 0.3;
		transform: scale(0.86);
		transition: opacity 0.4s, transform 0.4s;
	}
	/* Cartes rapprochées : la place du titre (masqué sur les cartes voisines) laisse voir leur photo. */
	.md-carte + .md-carte { margin-top: calc(var(--carte-h) * -0.1); }
	.md-carte .md-carte__titre { transition: opacity 0.4s; }
	.md-carte:not(.est-active) .md-carte__titre { opacity: 0; }
	.md-carte.est-active { opacity: 1; transform: none; position: relative; z-index: 1; }
	.md-carte__visuel { flex: 1 1 0; min-height: 0; width: 100%; object-fit: contain; }

	.md-zones__fleche { display: block; left: auto; right: -64px; transform: rotate(90deg); }
	.md-zones__fleche--prec { top: 44%; }
	.md-zones__fleche--suiv { top: 56%; }
}

@media (max-width: 900px) {
	.md-zones__grille { grid-template-columns: minmax(0, 1fr); gap: 28px; }
	/* Mobile : la liste passe à la ligne au lieu d'être coupée. */
	.md-zones__onglets {
		display: flex;
		flex-wrap: wrap;
		gap: 10px 22px;
	}
	.md-zones__onglets button { white-space: nowrap; font-size: 18px; color: var(--or-doux); }
	.md-zones__onglets [aria-selected="true"] { color: var(--or); text-decoration: underline; text-underline-offset: 6px; }
	.md-zones__fleche { display: block; }
}

/* ---------- Galerie d'une zone ------------------------------------------ */

.md-galerie-zone__liste {
	list-style: none;
	margin: 0;
	padding: 0;
	columns: 2;
	column-gap: clamp(14px, 2.2vw, 42px);
}
.md-galerie-zone__item {
	break-inside: avoid;
	margin-bottom: clamp(14px, 2.2vw, 42px);
	border: 3px solid var(--or);
	background: #000;
}
.md-galerie-zone__item a { display: block; cursor: zoom-in; }
.md-galerie-zone__item img,
.md-galerie-zone__item video { width: 100%; }

@media (max-width: 760px) {
	.md-galerie-zone__liste { columns: 1; }
}

.md-vide { color: var(--or-doux); font-size: clamp(16px, 1.3vw, 25px); }
.md-retour { margin-top: 40px; }
.md-retour a { text-decoration: none; text-transform: uppercase; color: var(--or-doux); }

/* Visionneuse */
.md-visionneuse {
	padding: 0;
	border: 0;
	background: transparent;
	max-width: 100vw;
	max-height: 100vh;
}
.md-visionneuse::backdrop { background: rgba(0, 0, 0, 0.92); }
.md-visionneuse img { max-width: 94vw; max-height: 92vh; width: auto; border: 3px solid var(--or); }
.md-visionneuse button {
	position: fixed;
	top: 14px;
	right: 18px;
	border: 0;
	background: none;
	color: var(--or);
	font-size: 40px;
	line-height: 1;
	cursor: pointer;
}

/* ---------- Rendez-vous ------------------------------------------------- */

.md-rdv {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 38%) minmax(0, 1fr);
	gap: clamp(24px, 4vw, 80px);
	padding: clamp(40px, 5vw, 96px) var(--marge) clamp(56px, 6vw, 120px);
}
.md-rdv > *:not(.md-ciel) { position: relative; z-index: 1; }
.md-rdv__titre {
	position: sticky !important;
	top: calc(var(--entete-h) + 15vh);
	align-self: start;
	margin: 0;
	font-family: var(--titres);
	font-weight: 400;
	font-size: clamp(72px, 10.4vw, 200px);
	line-height: 0.92;
	color: var(--or);
	text-transform: uppercase;
}
.md-rdv__contenu { max-width: 940px; }
.md-rdv__intro { margin: 0 0 2em; font-size: inherit; line-height: 1.7; }

.md-rdv__erreurs,
.md-rdv__merci {
	padding: 18px 22px;
	margin-bottom: 28px;
	border: 1px solid var(--erreur);
	border-radius: 10px;
	background: rgba(239, 107, 86, 0.08);
}
.md-rdv__erreurs p { margin: 0 0 6px; }
.md-rdv__erreurs ul { margin: 0; padding-left: 1.2em; }
.md-rdv__merci { border-color: var(--or); background: rgba(230, 160, 0, 0.06); }
.md-rdv__merci h2 { margin: 0 0 8px; font-family: var(--titres); font-weight: 400; font-size: clamp(40px, 3.6vw, 70px); line-height: 1; color: var(--or); text-transform: uppercase; }

.md-form { font-size: clamp(14px, 0.95vw, 18px); }
.md-form__bloc { margin: 0 0 clamp(28px, 3vw, 56px); padding: 0; border: 0; min-width: 0; }
.md-form__bloc legend {
	padding: 0;
	margin-bottom: 18px;
	font-size: clamp(22px, 1.85vw, 35px);
	color: var(--or-doux);
}

.md-form__grille--identite {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 12px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--or-sombre);
}
.md-champ--prenom { grid-column: span 3; }
.md-champ--nom { grid-column: span 4; }
.md-champ--pronoms { grid-column: span 3; }
.md-champ--age { grid-column: span 2; }
.md-champ--ville { grid-column: span 3; }
.md-champ--mail { grid-column: span 5; }
.md-champ--portable { grid-column: span 4; }

.md-form__ligne {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	padding: 16px 0;
	border-bottom: 1px solid var(--or-sombre);
}
.md-form__question { font-weight: 500; }
.md-form__question--taille { margin-left: auto; }
.md-form__aide { flex: 1 1 260px; }
.md-form__aide--pleine { flex-basis: 100%; padding-left: clamp(0px, 7vw, 110px); }
.md-form__ligne--projet .md-champ--emplacement { flex: 1 1 200px; }
.md-form__ligne--projet .md-champ--largeur,
.md-form__ligne--projet .md-champ--longueur { flex: 0 1 140px; }
.md-form__ligne--description { align-items: flex-start; }
.md-form__ligne--description .md-form__question { flex: 0 0 auto; padding-top: 8px; }

.md-champ input,
.md-form textarea,
.md-fichiers__bouton,
.md-choix span {
	display: block;
	width: 100%;
	padding: 7px 16px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: var(--champ);
	color: var(--blanc);
	font: inherit;
	font-weight: 300;
}
.md-champ input::placeholder,
.md-fichiers__bouton { font-style: italic; color: rgba(255, 255, 255, 0.85); }
.md-champ input:focus,
.md-form textarea:focus { outline: none; border-color: var(--or); }
.md-champ input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.md-champ input::-webkit-outer-spin-button,
.md-champ input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.md-form textarea { flex: 1 1 320px; min-height: 120px; resize: vertical; }

.md-choix { display: inline-flex; gap: 8px; }
.md-choix label { position: relative; cursor: pointer; }
.md-choix input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.md-choix span { width: auto; padding: 5px 16px; text-align: center; transition: background 0.2s, color 0.2s; }
.md-choix input:checked + span { background: var(--or); color: var(--noir); font-weight: 400; }
.md-choix input:focus-visible + span { outline: 2px solid var(--or); outline-offset: 2px; }

.md-fichiers { position: relative; flex: 0 1 300px; cursor: pointer; }
.md-fichiers input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.md-fichiers input:focus-visible + .md-fichiers__bouton { outline: 2px solid var(--or); }
.md-fichiers__bouton { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.md-champ--erreur input,
.md-champ--erreur textarea,
.md-champ--erreur .md-fichiers__bouton,
.md-fichiers.md-champ--erreur .md-fichiers__bouton { border-color: var(--erreur); }
.md-consentement.md-champ--erreur span { color: var(--erreur); }

.md-consentement {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	font-size: 0.9em;
	line-height: 1.5;
	cursor: pointer;
}
.md-consentement input { margin-top: 3px; accent-color: var(--or); width: 18px; height: 18px; flex: none; }
.md-consentement a { color: var(--or); }

.md-form__envoi { display: flex; justify-content: flex-end; margin-top: 28px; }
.md-bouton {
	padding: 6px 22px 4px;
	border: 0;
	border-radius: 8px;
	background: #3b3415;
	color: var(--or);
	font-family: var(--titres);
	font-size: clamp(26px, 1.85vw, 36px);
	line-height: 1.1;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}
.md-bouton:hover,
.md-bouton:focus-visible { background: var(--or); color: var(--noir); }

.md-piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

[data-md-si][hidden] { display: none !important; }

@media (max-width: 900px) {
	.md-rdv { grid-template-columns: 1fr; padding-top: 0; }
	.md-rdv__titre {
		position: relative !important;
		top: auto;
		min-height: calc(100svh - var(--entete-h) - var(--filet));
		display: flex;
		flex-direction: column;
		justify-content: center;
		font-size: clamp(72px, 21vw, 130px);
	}
	.md-form__grille--identite { grid-template-columns: repeat(12, minmax(0, 1fr)); }
	.md-champ--prenom { grid-column: span 8; order: 1; }
	.md-champ--pronoms { grid-column: span 4; order: 2; }
	.md-champ--nom { grid-column: span 8; order: 3; }
	.md-champ--age { grid-column: span 4; order: 4; }
	.md-champ--ville,
	.md-champ--mail,
	.md-champ--portable { grid-column: span 12; order: 5; }
	.md-form__question--taille { margin-left: 0; }
	.md-form__aide--pleine { padding-left: 0; }
	/* Mobile : Emplacement, puis la consigne photos, puis Taille sur sa propre ligne. */
	.md-form__ligne--projet .md-champ--emplacement { flex: 1 0 calc(100% - 140px); }
	.md-form__ligne--projet .md-form__aide--pleine { order: 1; }
	.md-form__ligne--projet .md-form__question--taille,
	.md-form__ligne--projet .md-champ--largeur,
	.md-form__ligne--projet .md-champ--longueur { order: 2; }
	.md-form__ligne--projet .md-champ--largeur,
	.md-form__ligne--projet .md-champ--longueur { flex: 1 1 90px; }
	.md-fichiers { flex: 1 1 100%; }
	.md-form__envoi { justify-content: stretch; }
	.md-bouton { width: 100%; }
}

/* ---------- Pages simples ----------------------------------------------- */

.md-page__titre {
	margin: 0 0 clamp(24px, 3vw, 56px);
	font-family: var(--titres);
	font-weight: 400;
	font-size: clamp(48px, 6vw, 120px);
	line-height: 0.95;
	color: var(--or);
	text-transform: uppercase;
}
.md-texte--page { margin-left: 0; max-width: 900px; font-size: clamp(15px, 1.05vw, 20px); line-height: 1.8; }
.md-page__404 { margin-left: 0; }

/* ---------- Pied de page ------------------------------------------------ */

.md-pied { background: var(--gris); }
.md-pied__acces { padding: clamp(32px, 3.4vw, 64px) var(--marge) clamp(28px, 3vw, 56px); }
.md-pied__titre {
	margin: 0 0 clamp(20px, 2vw, 36px);
	font-size: clamp(20px, 1.85vw, 35px);
	font-weight: 300;
	text-transform: uppercase;
}
.md-pied__colonnes {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(20px, 3vw, 60px);
}
.md-pied__bloc h3 {
	margin: 0 0 0.3em;
	font-size: clamp(15px, 1.05vw, 20px);
	font-weight: 300;
	text-transform: uppercase;
}
.md-pied__bloc p { margin: 0; font-size: clamp(14px, 1.05vw, 20px); line-height: 1.9; }

.md-pied__bas {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px 28px;
	padding: 12px var(--marge);
	background: var(--gris-fonce);
	font-size: clamp(13px, 0.85vw, 16px);
}
.md-pied__bas a { text-decoration: none; }

@media (max-width: 760px) {
	.md-pied__colonnes { grid-template-columns: 1fr; gap: 22px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}
