/* ==========================================================================
   LM Theme — page d'un projet
   Chargée uniquement sur les réalisations.

   Sommaire
   1. Hero
   2. Capture principale et fiche
   3. Récit
   4. Captures d'écran
   5. Encart « Le projet est en ligne »
   6. Projet précédent / suivant
   ========================================================================== */

/* 1. Hero
   ========================================================================== */

.lm-hero--projet {
	min-height: 0;
}

.lm-hero--projet .lm-hero__in {
	padding-bottom: clamp(200px, 21vw, 330px);
}

/* Le motif de lignes part sous le titre ; le script affine sa position selon la hauteur du titre. */
.lm-hero--projet .lm-lignes--projet {
	top: 58%;
	height: auto;
}

/* 2. Capture principale et fiche
   ========================================================================== */

.lm-projet {
	padding: 0 0 clamp(72px, 9vw, 130px);
	background-image: var(--halo-blanc);
}

.lm-apercu,
.lm-fiche,
.lm-projet__captures,
.lm-projet__enligne {
	max-width: 1160px;
	margin-inline: auto;
}

/* Aperçu : une fenêtre de navigateur qui remonte sur le hero, et dans laquelle
   on fait défiler la page complète du site. */
.lm-apercu {
	position: relative;
	z-index: 3;
	margin-top: calc(-1 * clamp(140px, 15vw, 250px));
	overflow: hidden;
	border-radius: 14px;
	background: var(--blanc);
	box-shadow: 0 0 0 1px rgba(16, 33, 54, .08), 0 40px 90px rgba(9, 33, 58, .3);
}

.lm-apercu__barre {
	display: grid;
	grid-template-columns: 1fr minmax(0, auto) 1fr;
	align-items: center;
	gap: 12px;
	height: 48px;
	padding: 0 14px;
	border-bottom: 1px solid #E3E8EF;
	background: #F3F5F8;
}

.lm-apercu__points {
	display: flex;
	gap: 7px;
}

.lm-apercu__points i {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #C9D3DF;
}

.lm-apercu__adresse {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
	width: min(420px, 46vw);
	height: 30px;
	padding: 0 14px;
	overflow: hidden;
	border: 1px solid #E3E8EF;
	border-radius: 999px;
	background: var(--blanc);
	font-size: 12.5px;
	color: #4A5A70;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.lm-apercu__adresse svg {
	flex: none;
}

.lm-apercu__ouvrir {
	display: flex;
	align-items: center;
	justify-content: center;
	justify-self: end;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	color: var(--marine);
	transition: background-color .25s;
}

.lm-apercu__ouvrir:hover {
	background: #E3E8EF;
	color: var(--marine);
}

/* La page reprend son défilement quand la capture arrive en bout de course
   (pas d'overscroll-behavior: contain). */
.lm-apercu__ecran {
	position: relative;
	height: clamp(340px, 64vh, 700px);
	overflow-y: auto;
	background: var(--blanc);
	outline-offset: -3px;
	scrollbar-width: thin;
	scrollbar-color: #C9D3DF transparent;
}

.lm-apercu__ecran:focus-visible {
	outline: 3px solid var(--bleu);
}

.lm-apercu__ecran img {
	display: block;
	width: 100%;
	height: auto;
}

/* Sans capture complète : l'image à la une, fixe, sans défilement. */
.lm-apercu__ecran--fixe {
	height: auto;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.lm-apercu__ecran--fixe img {
	height: 100%;
	object-fit: cover;
	object-position: top;
}

/* Invitation à défiler : collée en bas de la zone, elle s'efface dès qu'on fait défiler
   (classe posée par assets/js/main.js). */
.lm-apercu__invite {
	position: sticky;
	bottom: 18px;
	display: flex;
	justify-content: center;
	height: 0;
	pointer-events: none;
}

.lm-apercu__invite span {
	position: absolute;
	bottom: 0;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 10px 16px 10px 13px;
	border-radius: 999px;
	background: rgba(16, 33, 54, .9);
	box-shadow: 0 10px 24px rgba(9, 33, 58, .25);
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--blanc);
	white-space: nowrap;
	transition: opacity .35s, transform .35s;
}

.lm-apercu__ecran.a-defile .lm-apercu__invite span {
	opacity: 0;
	transform: translateY(10px);
}

@media (prefers-reduced-motion: no-preference) {
	.lm-apercu__invite svg {
		animation: lm-invite 1.8s ease-in-out infinite;
	}
}

@keyframes lm-invite {
	0%, 100% { transform: translateY(-2px); }
	50% { transform: translateY(3px); }
}

@media (max-width: 700px) {
	.lm-hero--projet .lm-hero__in {
		padding-bottom: 150px;
	}

	.lm-apercu {
		margin-top: -110px;
		border-radius: 10px;
	}

	.lm-apercu__barre {
		height: 40px;
		padding: 0 10px;
	}

	.lm-apercu__points i {
		width: 8px;
		height: 8px;
	}

	.lm-apercu__adresse {
		height: 26px;
		font-size: 11.5px;
	}

	.lm-apercu__ecran {
		height: min(62vh, 460px);
	}

	.lm-apercu__invite span {
		padding: 8px 13px 8px 11px;
		font-size: 11.5px;
	}
}

.lm-fiche {
	display: grid;
	grid-template-columns: repeat(var(--colonnes, 4), minmax(0, 1fr));
	margin-top: clamp(40px, 5vw, 70px);
	margin-bottom: 0;
	border-block: 1px solid var(--filet);
}

.lm-fiche div {
	padding: 22px 20px 24px 0;
}

.lm-fiche div + div {
	padding-left: 24px;
	border-left: 1px solid var(--filet);
}

.lm-fiche dt {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--bleu-fonce);
}

.lm-fiche dd {
	margin: 8px 0 0;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.35;
}

/* 3. Récit
   ========================================================================== */

.lm-projet__recit {
	max-width: var(--lecture);
	margin: clamp(56px, 7vw, 100px) auto 0;
}

.lm-projet__titre {
	display: flex;
	align-items: baseline;
	gap: 16px;
	margin: clamp(44px, 5vw, 70px) 0 20px;
	font-size: clamp(26px, 3vw, 40px);
	font-weight: 800;
	font-stretch: 112%;
	letter-spacing: -.035em;
	line-height: 1.05;
	text-transform: uppercase;
}

.lm-projet__titre:first-child {
	margin-top: 0;
}

.lm-projet__titre small {
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .12em;
	color: var(--bleu);
}

/* 4. Captures d'écran
   ========================================================================== */

.lm-projet__captures {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(20px, 2.4vw, 34px);
	margin-top: clamp(36px, 4.4vw, 56px);
}

.lm-projet__captures figure {
	margin: 0;
}

.lm-projet__captures figcaption {
	margin-top: 12px;
	font-size: 14px;
	font-style: italic;
	line-height: 1.5;
	color: var(--gris-texte);
}

/* 5. Encart « Le projet est en ligne »
   ========================================================================== */

.lm-projet__enligne {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	margin-top: clamp(64px, 8vw, 110px);
	padding: clamp(40px, 5vw, 72px) 24px;
	border-radius: var(--rayon-encart);
	background: var(--marine);
	color: var(--blanc);
	text-align: center;
}

.lm-projet__enligne .lm-surtitre {
	margin: 0;
	color: var(--surtitre-sombre);
}

.lm-projet__enligne .lm-h2 .lm-t2 {
	color: var(--bleu-clair);
}

.lm-projet__enligne .lm-btn {
	margin-top: 10px;
}

.lm-projet__enligne .lm-btn svg {
	transition: transform .35s var(--courbe);
}

.lm-projet__enligne .lm-btn:hover svg {
	transform: translate(3px, -3px);
}

/* 6. Projet précédent / suivant
   ========================================================================== */

.lm-voisins {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	border-bottom: 1px solid rgba(255, 255, 255, .14);
	background: var(--marine);
	color: var(--blanc);
}

.lm-voisins a {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: clamp(36px, 5vw, 72px) var(--marge);
	transition: background-color .35s;
}

.lm-voisins a:hover {
	background: #0B3357;
}

/* Le projet suivant reste à droite, même s'il est seul. */
.lm-voisins__suivant {
	grid-column: 2;
	align-items: flex-end;
	border-left: 1px solid rgba(255, 255, 255, .14);
	text-align: right;
}

.lm-voisins small {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .14em;
	line-height: 1.4;
	text-transform: uppercase;
	color: var(--surtitre-sombre);
}

.lm-voisins__precedent svg {
	transform: rotate(180deg);
}

.lm-voisins b {
	font-size: clamp(20px, 2.6vw, 36px);
	font-weight: 800;
	font-stretch: 112%;
	letter-spacing: -.03em;
	line-height: 1.05;
	text-transform: uppercase;
}

/* Paliers
   ========================================================================== */

@media (max-width: 980px) {
	.lm-fiche {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.lm-fiche div,
	.lm-fiche div + div {
		padding: 18px 16px 18px 0;
		border-top: 1px solid var(--filet);
		border-left: 0;
	}

	.lm-fiche div:nth-child(-n+2) {
		border-top: 0;
	}
}

@media (max-width: 700px) {
	.lm-projet__captures,
	.lm-voisins {
		grid-template-columns: minmax(0, 1fr);
	}

	.lm-projet__enligne .lm-btn {
		align-self: stretch;
	}

	.lm-voisins__suivant {
		grid-column: auto;
		border-top: 1px solid rgba(255, 255, 255, .14);
		border-left: 0;
	}

	.lm-voisins__precedent + .lm-voisins__suivant {
		border-top: 1px solid rgba(255, 255, 255, .14);
	}
}
