/**
 * Page « Formations » (/formations-photo/).
 * Une fiche par formation : affiche à gauche, informations à droite (quand, où, pour qui),
 * et le lien vers la page détaillée. Deux groupes : les sessions datées et celles qui se
 * font sur demande — Anthony n'a qu'à déplacer une fiche d'un groupe à l'autre.
 */

/* --- Ouverture -------------------------------------------------------------------------- */

.aml-form-hero {
	position: sticky;
	top: 0;
	z-index: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: min(72vh, 740px);
	padding: clamp(120px, 14vw, 200px) clamp(16px, 2.5vw, 36px) clamp(36px, 4vw, 56px);
	background: var(--aml-ink);
	color: var(--aml-white);
	overflow: hidden;
	isolation: isolate;
}

.aml-form-hero__media,
.aml-form-hero__media img {
	position: absolute;
	inset: 0;
	z-index: -2;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center 35%;
}

.aml-form-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(to top, rgba(17, 17, 18, 0.78) 0%, rgba(17, 17, 18, 0.3) 45%, rgba(17, 17, 18, 0.15) 100%);
}

.aml-form-hero__grain {
	position: absolute;
	inset: -150%;
	z-index: 0;
	width: 400%;
	height: 400%;
	background-image: url('../img/grain.png');
	opacity: 0.07;
	pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
	.aml-form-hero__grain { animation: aml-grain 0.8s steps(1, end) infinite; }
}

.aml-form-hero__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 1920px;
	margin: 0 auto;
}

.aml-form-hero__kicker {
	margin: 0 0 14px;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: -0.04em;
	color: rgba(255, 255, 255, 0.7);
}

.aml-form-hero__h1 {
	margin: 0;
	max-width: 1171px;
	font-size: clamp(40px, 6.4vw, 92px);
	font-weight: 500;
	letter-spacing: -0.07em;
	line-height: 0.96;
}

@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.aml-form-hero {
			animation: aml-hero-efface linear both;
			animation-timeline: view();
			animation-range: exit 0% exit 100%;
		}
	}
}

/* --- Corps -------------------------------------------------------------------------------- */

.aml-form {
	position: relative;
	z-index: 1;
	background: var(--aml-white);
	color: var(--aml-ink);
	padding: clamp(56px, 6vw, 90px) clamp(16px, 2.5vw, 36px) clamp(96px, 11.1vw, 160px);
}

.aml-form__inner {
	width: 100%;
	max-width: 1920px;
	margin: 0 auto;
}

/* Même traitement que le chapô de Honeymoon : pleine largeur, deux lignes */
.aml-form__lead {
	margin: 0 0 clamp(56px, 7vw, 100px);
	max-width: none;
	font-size: clamp(20px, 1.72vw, 34px);
	font-weight: 500;
	letter-spacing: -0.05em;
	line-height: 1.25;
}

.aml-form__groupe + .aml-form__groupe { margin-top: clamp(64px, 8vw, 120px); }

.aml-form__groupe > h2 {
	margin: 0 0 clamp(28px, 3vw, 44px);
	padding-bottom: 14px;
	border-bottom: 1px solid rgba(17, 17, 18, 0.15);
	font-size: clamp(22px, 2vw, 28px);
	font-weight: 500;
	letter-spacing: -0.05em;
}

/* --- Une fiche de formation ------------------------------------------------------------------ */

.aml-form-fiche {
	display: grid;
	grid-template-columns: 444fr 889fr;
	gap: clamp(20px, 2.5vw, 40px);
	align-items: center;
	padding: clamp(20px, 2.4vw, 34px) 0;
	border-top: 1px solid rgba(17, 17, 18, 0.1);
}

.aml-form-fiche:first-of-type { border-top: 0; padding-top: 0; }

.aml-form-fiche__media {
	display: block;
	overflow: hidden;
	border-radius: 20px;
	aspect-ratio: 3 / 2;
	background: var(--aml-mist);
}

.aml-form-fiche__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.aml-form-fiche__media:hover img,
.aml-form-fiche__media:focus-visible img { transform: scale(1.04); }

.aml-form-fiche h3 {
	margin: 0 0 6px;
	font-size: clamp(24px, 2.6vw, 34px);
	font-weight: 500;
	letter-spacing: -0.06em;
	line-height: 1.1;
}

.aml-form-fiche__accroche {
	margin: 0 0 20px;
	font-size: clamp(17px, 1.45vw, 20px);
	font-weight: 500;
	letter-spacing: -0.04em;
	line-height: 1.4;
	color: rgba(17, 17, 18, 0.72);
}

/* Quand / Où / Pour qui : un libellé court, puis le détail */
.aml-form-fiche dl {
	display: grid;
	grid-template-columns: 92px 1fr;
	gap: 8px 16px;
	margin: 0 0 24px;
	font-size: 16px;
	line-height: 1.5;
	letter-spacing: -0.03em;
}

.aml-form-fiche dt {
	font-weight: 600;
	color: rgba(17, 17, 18, 0.5);
}

.aml-form-fiche dd {
	margin: 0;
	color: rgba(17, 17, 18, 0.78);
}

.aml-form-fiche dd ul {
	margin: 0;
	padding-left: 18px;
}

.aml-form-fiche__note {
	display: inline-block;
	margin-bottom: 18px;
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--aml-cream);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: -0.03em;
}

/* --- Tablette et mobile -------------------------------------------------------------- */

@media (max-width: 1199px) {
	.aml-form-fiche { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 809px) {
	.aml-form-fiche dl { grid-template-columns: 1fr; gap: 2px; }
	.aml-form-fiche dd { margin-bottom: 10px; }
	.aml-form-fiche__media { border-radius: 14px; }
}

/* =====================================================================================
 * Page de détail d'une formation — modèle unique, alimenté par page-formation-detail.php
 * ================================================================================== */

.aml-fo__inner {
	width: 100%;
	max-width: 1920px;
	margin: 0 auto;
}

.aml-fo__inner > * + * { margin-top: clamp(56px, 7vw, 100px); }

.aml-fo__lead {
	margin: 0;
	max-width: 944px;
	font-size: clamp(22px, 2.4vw, 32px);
	font-weight: 500;
	letter-spacing: -0.05em;
	line-height: 1.2;
}

/* En bref : quand, horaire, où, pour qui */
.aml-fo__bref {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	padding: clamp(24px, 3vw, 40px);
	border-radius: 20px;
	background: var(--aml-mist);
}

.aml-fo__bref div > span {
	display: block;
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: -0.02em;
	text-transform: uppercase;
	color: rgba(17, 17, 18, 0.5);
}

.aml-fo__bref div > p {
	margin: 0;
	font-size: clamp(16px, 1.3vw, 18px);
	font-weight: 500;
	letter-spacing: -0.04em;
	line-height: 1.45;
}

/* Blocs de texte et listes */
.aml-fo__bloc {
	display: grid;
	grid-template-columns: 338fr 1015fr;
	gap: 20px;
}

.aml-fo__bloc h2 {
	margin: 0;
	max-width: 300px;
	font-size: clamp(22px, 1.9vw, 26px);
	font-weight: 500;
	letter-spacing: -0.05em;
	line-height: 1.2;
}

.aml-fo__bloc p {
	margin: 0 0 18px;
	max-width: 820px;
	font-size: clamp(17px, 1.45vw, 20px);
	font-weight: 500;
	letter-spacing: -0.04em;
	line-height: 1.45;
	color: rgba(17, 17, 18, 0.72);
}

.aml-fo__bloc ul {
	margin: 0;
	padding: 0;
	max-width: 820px;
	list-style: none;
	font-size: clamp(16px, 1.35vw, 18px);
	font-weight: 500;
	letter-spacing: -0.04em;
	color: rgba(17, 17, 18, 0.78);
}

.aml-fo__bloc li {
	position: relative;
	padding: 11px 0 11px 26px;
	border-top: 1px solid rgba(17, 17, 18, 0.1);
}

.aml-fo__bloc li:first-child { border-top: 0; }

.aml-fo__bloc li::before {
	content: '';
	position: absolute;
	left: 2px;
	top: 20px;
	width: 7px;
	height: 7px;
	border-top: 1px solid var(--aml-ink);
	border-left: 1px solid var(--aml-ink);
}

/* Ce qui est compris / ce qui ne l'est pas, et le prix */
.aml-fo__tarif {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(20px, 2.5vw, 40px);
	padding: clamp(24px, 3vw, 44px);
	border: 1px solid var(--aml-line);
	border-radius: 20px;
}

.aml-fo__tarif h3 {
	margin: 0 0 14px;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: -0.04em;
	text-transform: uppercase;
	color: rgba(17, 17, 18, 0.55);
}

.aml-fo__tarif ul {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 16px;
	font-weight: 500;
	letter-spacing: -0.04em;
	line-height: 1.45;
	color: rgba(17, 17, 18, 0.78);
}

.aml-fo__tarif li { padding: 8px 0; border-top: 1px solid rgba(17, 17, 18, 0.08); }

.aml-fo__tarif li:first-child { border-top: 0; }

.aml-fo__prix {
	grid-column: 1 / -1;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-top: clamp(8px, 1vw, 16px);
	padding-top: clamp(20px, 2.4vw, 32px);
	border-top: 1px solid rgba(17, 17, 18, 0.12);
}

.aml-fo__prix strong {
	display: block;
	font-size: clamp(34px, 4vw, 54px);
	font-weight: 500;
	letter-spacing: -0.07em;
	line-height: 1;
}

.aml-fo__prix span {
	display: block;
	margin-top: 8px;
	max-width: 620px;
	font-size: 16px;
	font-weight: 500;
	letter-spacing: -0.04em;
	line-height: 1.45;
	color: rgba(17, 17, 18, 0.65);
}

@media (max-width: 1199px) {
	.aml-fo__bref { grid-template-columns: 1fr 1fr; }
	.aml-fo__bloc { grid-template-columns: 1fr; gap: 12px; }
	.aml-fo__bloc h2 { max-width: none; }
}

@media (max-width: 809px) {
	.aml-fo__bref { grid-template-columns: 1fr; }
	.aml-fo__tarif { grid-template-columns: 1fr; }
}

/* Titre du bandeau et retour vers la liste sur la même ligne, comme sur les albums */
.aml-form-hero__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px 32px;
}

.aml-form-hero__bottom .aml-form-hero__h1 { flex: 1 1 520px; }

.aml-form-hero__retour { padding-bottom: 8px; }

/* Les deux liens de bas de page ne doivent pas se toucher */
.aml-fo__liens {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 48px;
}

/* Les deux actions des pages Workshop : réserver sa place, ou d'abord un appel */
.aml-fo__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 28px;
	margin-top: 8px;
}

/* --- Photos des pages de formation ------------------------------------------------------
 * Ajoutées le 14/10 : une image après la présentation, une après le programme, et deux
 * pour le lieu. Cliquables, elles s'ouvrent dans la visionneuse (bp-lightbox.js).
 */

.aml-fo__figure {
	display: block;
	margin: clamp(36px, 4vw, 64px) 0;
	overflow: hidden;
	border-radius: 20px;
	background: var(--aml-mist);
}

.aml-fo__figure img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.aml-fo__figure:hover img,
.aml-fo__figure:focus-visible img { transform: scale(1.04); }

/* Les deux photos du lieu, côte à côte et à la même hauteur */
.aml-fo__duo {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(16px, 1.8vw, 24px);
	margin: clamp(24px, 3vw, 40px) 0 clamp(36px, 4vw, 64px);
}

.aml-fo__duo .aml-fo__figure {
	margin: 0;
	aspect-ratio: 3 / 2;
}

.aml-fo__duo .aml-fo__figure img { height: 100%; object-fit: cover; }

.aml-fo__lieu-coord p { margin: 0 0 6px; }

@media (max-width: 809px) {
	.aml-fo__duo { grid-template-columns: 1fr; }
	.aml-fo__figure { border-radius: 14px; }
}

/* --- Plaques vidéo -----------------------------------------------------------------------
 * Une image et un bouton de lecture ; le lecteur Vimeo n'arrive qu'à l'ouverture de la
 * fenêtre (inc/videos.php).
 */

.aml-video { margin: clamp(36px, 4vw, 64px) 0; }

.aml-video__plaque {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	border-radius: 20px;
	overflow: hidden;
	background: var(--aml-ink);
	cursor: pointer;
}

.aml-video--portrait .aml-video__plaque { max-width: 420px; }

.aml-video__plaque img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
}

.aml-video__plaque:hover img,
.aml-video__plaque:focus-visible img { transform: scale(1.03); opacity: 0.86; }

.aml-video__play {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 84px;
	height: 84px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.34);
	backdrop-filter: blur(6px);
	transform: translate(-50%, -50%);
	transition: transform 0.45s cubic-bezier(0.34, 1.35, 0.64, 1), background-color 0.3s ease;
}

.aml-video__play::before {
	content: '';
	position: absolute;
	left: 54%;
	top: 50%;
	width: 0;
	height: 0;
	border: 13px solid transparent;
	border-left: 20px solid var(--aml-white);
	transform: translate(-50%, -50%);
}

.aml-video__plaque:hover .aml-video__play,
.aml-video__plaque:focus-visible .aml-video__play {
	background: rgba(255, 255, 255, 0.5);
	transform: translate(-50%, -50%) scale(1.08);
}

.aml-video__legende {
	margin: 12px 0 0;
	font-size: 15px;
	font-weight: 500;
	letter-spacing: -0.03em;
	color: rgba(17, 17, 18, 0.55);
}

/* --- Témoignages ------------------------------------------------------------------------- */

.aml-fo__temoin {
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: clamp(20px, 2.4vw, 32px);
	align-items: start;
	margin: clamp(28px, 3vw, 44px) 0;
	padding: clamp(24px, 2.6vw, 36px);
	border-radius: 20px;
	background: var(--aml-mist);
}

.aml-fo__temoin img {
	display: block;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	object-fit: cover;
}

.aml-fo__temoin blockquote {
	margin: 0;
	font-size: clamp(17px, 1.45vw, 20px);
	font-weight: 500;
	letter-spacing: -0.04em;
	line-height: 1.5;
	color: rgba(17, 17, 18, 0.82);
}

.aml-fo__temoin cite {
	display: block;
	margin-top: 14px;
	font-style: normal;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: -0.03em;
	color: var(--aml-ink);
}

@media (max-width: 809px) {
	.aml-fo__temoin { grid-template-columns: 1fr; }
	.aml-video--portrait .aml-video__plaque { max-width: none; }
}

/* --- Mise en page des pages de workshop (revue le 18/10) ---------------------------------
 * Anthony trouvait la page « brute » : des photos et des vidéos empilées en pleine largeur
 * avec un titre dessous. On regroupe : la vidéo de présentation en vis-à-vis du texte, les
 * photos par paires déséquilibrées, les films en grille.
 */

.aml-fo__presentation {
	display: grid;
	grid-template-columns: 1fr 360px;
	gap: clamp(24px, 3vw, 48px);
	align-items: start;
}

.aml-fo__presentation-video .aml-video { margin: 0; }
.aml-fo__presentation-video .aml-video--portrait .aml-video__plaque { max-width: none; }

/* Deux photos, l'une plus large que l'autre */
.aml-fo__paire {
	display: grid;
	grid-template-columns: 1.45fr 1fr;
	gap: clamp(16px, 1.8vw, 24px);
}

.aml-fo__paire .aml-fo__figure {
	margin: 0;
	height: 100%;
	aspect-ratio: auto;
}

.aml-fo__paire .aml-fo__figure img {
	height: 100%;
	object-fit: cover;
}

/* Les films : quatre vignettes plutôt que quatre pleines largeurs */
.aml-fo__films {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(20px, 2.2vw, 32px);
}

.aml-fo__films .aml-video { margin: 0; }

/* Les deux témoignages côte à côte, la vidéo dessous */
.aml-fo__temoins {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(16px, 1.8vw, 24px);
}

.aml-fo__temoins .aml-fo__temoin { margin: 0; height: 100%; }

.aml-fo__temoin-video { margin-top: clamp(20px, 2.2vw, 32px); }
.aml-fo__temoin-video .aml-video { margin: 0; max-width: 620px; }

/* Palmarès court */
.aml-fo__palmares {
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}

.aml-fo__palmares li {
	position: relative;
	padding-left: 26px;
	margin-bottom: 10px;
	font-size: clamp(16px, 1.3vw, 18px);
	font-weight: 500;
	letter-spacing: -0.03em;
	line-height: 1.5;
	color: rgba(17, 17, 18, 0.78);
}

.aml-fo__palmares li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.62em;
	width: 12px;
	height: 1px;
	background: var(--aml-ink);
}

/* Partenaires : une ligne discrète, logos en niveaux de gris */
.aml-fo__partenaires {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 32px;
	padding-top: clamp(24px, 3vw, 40px);
	border-top: 1px solid var(--aml-line);
}

.aml-fo__partenaires p {
	margin: 0;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: rgba(17, 17, 18, 0.42);
}

.aml-fo__partenaires > div {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 28px 40px;
}

.aml-fo__partenaires img {
	display: block;
	width: auto;
	height: 26px;
	filter: grayscale(1);
	opacity: 0.65;
	transition: filter 0.3s ease, opacity 0.3s ease;
}

.aml-fo__partenaires a:hover img,
.aml-fo__partenaires a:focus-visible img { filter: none; opacity: 1; }

/* Formulaire Fotostudio en bas de page */
.aml-fo__formulaire {
	display: block;
	width: 100%;
	max-width: none;
	min-height: 950px;
	margin: 24px 0 8px;
	border: 0;
	transition: height 0.3s ease;
}

@media (max-width: 1199px) {
	.aml-fo__presentation { grid-template-columns: 1fr 300px; }
}

@media (max-width: 809px) {
	.aml-fo__presentation,
	.aml-fo__paire,
	.aml-fo__films,
	.aml-fo__temoins { grid-template-columns: 1fr; }
	.aml-fo__presentation-video { max-width: 420px; }
	.aml-fo__formulaire { min-height: 1050px; }
}
