/* NOVERIS – Réalisations */

:root {
	--nvr-bleu: #6c8cc1;
	--nvr-anthracite: #2a2a2a;
	--nvr-texte: "APTOS", Arial, sans-serif;
	--nvr-titre: "APTOS Display Bold", "APTOS Display", "APTOS", Arial, sans-serif;
	--nvr-ombre: 0 30px 65px -30px rgba(0, 0, 0, 0.35);
}

/* Page Réalisations : une tuile photo par catégorie
   (colonne Divi « nvr-tuile » contenant une image « nvr-tuile__image » et un texte « nvr-tuile__titre ») */

.nvr-tuile {
	position: relative;
	overflow: hidden;
	box-shadow: var(--nvr-ombre);
}

.nvr-tuile .nvr-tuile__image {
	width: 100%;
	margin: 0 !important;
}

.nvr-tuile .nvr-tuile__image a,
.nvr-tuile .nvr-tuile__image .et_pb_image_wrap {
	display: block;
	width: 100%;
}

.nvr-tuile .nvr-tuile__image img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform 0.6s ease;
}

.nvr-tuile:hover .nvr-tuile__image img,
.nvr-tuile:focus-within .nvr-tuile__image img {
	transform: scale(1.04);
}

.nvr-tuile .nvr-tuile__titre {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	margin: 0 !important;
	padding: 90px 28px 26px !important;
	background: linear-gradient(to top, rgba(42, 42, 42, 0.9) 0%, rgba(42, 42, 42, 0.55) 55%, rgba(42, 42, 42, 0) 100%);
	pointer-events: none;
}

.nvr-tuile .nvr-tuile__titre h3 {
	margin: 0;
	padding: 0 0 0 14px;
	border-left: 6px solid var(--nvr-bleu);
	line-height: 1.15;
}

/* Classes répétées : passe devant la couleur de titre que Divi écrit en !important. */
html body .nvr-tuile.nvr-tuile .nvr-tuile__titre.nvr-tuile__titre h3,
html body .nvr-tuile.nvr-tuile .nvr-tuile__titre.nvr-tuile__titre h3 a {
	color: #fff !important;
	text-decoration: none;
}

/* Pages catégories : vignettes des projets */

.nvr-projets {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 30px;
}

.nvr-projet {
	position: relative;
	margin: 0;
	background: #fff;
	box-shadow: var(--nvr-ombre);
	font-family: var(--nvr-texte);
}

.nvr-projet__ouvrir {
	position: relative;
	display: block;
	width: 100%;
	min-height: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: 0;
	background: #dcdddf;
	box-shadow: none;
	font: inherit;
	line-height: 0;
	cursor: zoom-in;
}

.nvr-projet__ouvrir:disabled {
	cursor: default;
}

.nvr-projet__ouvrir:focus-visible {
	outline: 3px solid var(--nvr-bleu);
	outline-offset: 3px;
}

.nvr-projet__image {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform 0.6s ease;
}

.nvr-projet:hover .nvr-projet__image,
.nvr-projet:focus-within .nvr-projet__image {
	transform: scale(1.04);
}

.nvr-projet__badge {
	display: none;
	position: absolute;
	right: 12px;
	bottom: 12px;
	padding: 6px 10px;
	background: rgba(42, 42, 42, 0.85);
	color: #fff;
	font-size: 13px;
	line-height: 1;
}

.nvr-projet__infos {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 22px 24px;
	overflow: hidden;
	border-left: 6px solid var(--nvr-bleu);
	background: rgba(42, 42, 42, 0.92);
	color: #fff;
	font-size: 14px;
	line-height: 1.45;
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}

.nvr-projet:hover .nvr-projet__infos,
.nvr-projet:focus-within .nvr-projet__infos {
	opacity: 1;
}

.nvr-projet__infos dl {
	margin: 0;
	padding: 0;
}

.nvr-projet__ligne {
	margin: 0 0 3px;
}

.nvr-projet__ligne dt,
.nvr-projet__ligne dd {
	display: inline;
	margin: 0;
	padding: 0;
}

.nvr-projet__ligne dt {
	font-weight: 700;
}

.nvr-projet__ligne--nom {
	margin-bottom: 10px;
	font-family: var(--nvr-titre);
	font-size: 16px;
	line-height: 1.3;
}

.nvr-projet__voir {
	margin-top: 14px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #fff;
}

.nvr-projet__voir::after {
	content: " →";
}

.nvr-vide {
	font-family: var(--nvr-texte);
	font-size: 18px;
}

/* Tablette et téléphone : les infos s'affichent sous la photo.
   « any-hover » et non « hover » : un ordinateur à écran tactile qui a aussi
   une souris ou un pavé tactile garde l'affichage au survol. */
@media (max-width: 980px), (any-hover: none) {
	.nvr-projet__infos {
		position: static;
		padding: 18px 20px 20px;
		border-left: 0;
		border-top: 5px solid var(--nvr-bleu);
		background: #fff;
		color: var(--nvr-anthracite);
		opacity: 1;
	}

	.nvr-projet__voir {
		display: none;
	}

	.nvr-projet__badge {
		display: block;
	}

	.nvr-projet:hover .nvr-projet__image,
	.nvr-projet:focus-within .nvr-projet__image {
		transform: none;
	}
}

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

@media (max-width: 767px) {
	.nvr-projets {
		grid-template-columns: minmax(0, 1fr);
	}

	.nvr-tuile .nvr-tuile__titre {
		padding: 70px 20px 20px !important;
	}
}

/* Diaporama */

.nvr-diapo-ouvert,
.nvr-diapo-ouvert body {
	overflow: hidden;
}

.nvr-diapo {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(20, 20, 24, 0.97);
	font-family: var(--nvr-texte);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.nvr-diapo[hidden] {
	display: none;
}

.nvr-diapo--visible {
	opacity: 1;
}

.nvr-diapo__scene {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 70px 96px 40px;
}

.nvr-diapo__image {
	display: block;
	width: auto;
	height: auto;
	max-width: min(100%, 1600px);
	max-height: calc(100vh - 170px);
	object-fit: contain;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.nvr-diapo__image--chargee {
	opacity: 1;
}

.nvr-diapo__legende {
	display: flex;
	gap: 18px;
	align-items: baseline;
	margin-top: 18px;
	color: #fff;
	font-size: 15px;
	line-height: 1.4;
	text-align: center;
}

.nvr-diapo__titre {
	font-family: var(--nvr-titre);
	font-size: 17px;
}

.nvr-diapo__compteur {
	opacity: 0.7;
}

.nvr-diapo__btn {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: rgba(255, 255, 255, 0.1);
	box-shadow: none;
	color: #fff;
	cursor: pointer;
	transition: background 0.2s ease;
}

.nvr-diapo__btn:hover,
.nvr-diapo__btn:focus-visible {
	background: var(--nvr-bleu);
}

.nvr-diapo__btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.nvr-diapo__btn svg {
	width: 26px;
	height: 26px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.nvr-diapo__precedent {
	top: 50%;
	left: 22px;
	transform: translateY(-50%);
}

.nvr-diapo__suivant {
	top: 50%;
	right: 22px;
	transform: translateY(-50%);
}

.nvr-diapo__fermer {
	top: 16px;
	right: 22px;
}

.nvr-diapo--unique .nvr-diapo__precedent,
.nvr-diapo--unique .nvr-diapo__suivant,
.nvr-diapo--unique .nvr-diapo__compteur {
	display: none;
}

@media (max-width: 767px) {
	.nvr-diapo__scene {
		padding: 70px 12px 100px;
	}

	.nvr-diapo__image {
		max-height: calc(100vh - 230px);
	}

	.nvr-diapo__legende {
		flex-direction: column;
		gap: 4px;
		align-items: center;
	}

	.nvr-diapo__precedent,
	.nvr-diapo__suivant {
		top: auto;
		bottom: 24px;
		transform: none;
	}

	.nvr-diapo__precedent {
		left: calc(50% - 64px);
	}

	.nvr-diapo__suivant {
		right: calc(50% - 64px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.nvr-tuile .nvr-tuile__image img,
	.nvr-projet__image,
	.nvr-projet__infos,
	.nvr-diapo,
	.nvr-diapo__image {
		transition: none;
	}
}
