/* =========================================================
   EEP – Réalisations — Version: 1.0.0
   Charte Landscop : vert anis #97b545 / vert foncé #0f3714 / doré #f4be29
   ========================================================= */

.eepr {
	--eep-primary: #97b545;
	--eep-dark: #0f3714;
	--eep-accent: #f4be29;
	--eep-pad-x: 24px;
	--eep-gap: 20px;
	--eep-radius: 14px;
	--eep-ease: cubic-bezier(.22, .61, .36, 1);

	box-sizing: border-box;
	width: 100%;
	padding-left: var(--eep-pad-x);
	padding-right: var(--eep-pad-x);
}

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

.eepr [hidden] { display: none !important; }

/* ---------------------- En-tête ---------------------- */
.eepr-head { margin-bottom: 26px; }

.eepr-eyebrow {
	display: flex;
	align-items: center;
	margin: 0 0 10px;
	color: var(--eep-dark);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .15em;
	text-transform: uppercase;
}

.eepr-rule {
	display: inline-block;
	width: 36px;
	height: 1px;
	margin: 0 12px 0 0 !important;
	flex: 0 0 auto;
	background-color: var(--eep-accent);
}

.eepr .eepr-titre {
	margin: 0;
	color: var(--eep-dark);
	font-size: clamp(28px, 3.6vw, 42px);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -.015em;
	text-transform: none;
}

/* ---------------------- Grille ---------------------- */
.eepr-grille {
	--eep-cols: 3;
	display: grid;
	grid-template-columns: repeat(var(--eep-cols), minmax(0, 1fr));
	grid-gap: var(--eep-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.eepr-item {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* mosaïque : colonnes CSS, hauteurs naturelles */
.eepr.layout-mosaique .eepr-grille {
	display: block;
	columns: var(--eep-cols);
	column-gap: var(--eep-gap);
}

.eepr.layout-mosaique .eepr-item {
	break-inside: avoid;
	margin-bottom: var(--eep-gap);
}

/* ---------------------- Cartes ---------------------- */
.eepr-carte {
	position: relative;
	margin: 0;
	cursor: default;
}

.eepr-carte[data-lightbox] { cursor: zoom-in; }

.eepr-media {
	position: relative;
	display: block;
	overflow: hidden;
	border-radius: var(--eep-radius);
	background-color: #eef1e8;
}

/* format imposé (grille et carrousel) */
.eepr.layout-grille .eepr-media,
.eepr.layout-carrousel .eepr-media { aspect-ratio: 4 / 3; }
.eepr.ratio-1-1 .eepr-media { aspect-ratio: 1 / 1 !important; }
.eepr.ratio-3-4 .eepr-media { aspect-ratio: 3 / 4 !important; }
.eepr.ratio-16-9 .eepr-media { aspect-ratio: 16 / 9 !important; }
.eepr.layout-mosaique .eepr-media { aspect-ratio: auto !important; }

.eepr .eepr-media .eepr-img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	border: 0 !important;
	object-fit: cover;
	object-position: center;
	transition: transform .8s var(--eep-ease);
}

.eepr.layout-mosaique .eepr-media .eepr-img { height: auto !important; }

.eepr-carte:hover .eepr-media .eepr-img { transform: scale(1.045); }

/* cadre intérieur fin au survol — signature luxe */
.eepr-media::after {
	content: "";
	position: absolute;
	inset: 10px;
	border: 1px solid rgba(255, 255, 255, .65);
	border-radius: 8px;
	opacity: 0;
	transform: scale(1.02);
	transition: opacity .35s ease, transform .45s var(--eep-ease);
	pointer-events: none;
}

.eepr-carte:hover .eepr-media::after {
	opacity: 1;
	transform: none;
}

/* voile + loupe */
.eepr-voile {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .35) 100%);
	opacity: 0;
	transition: opacity .35s ease;
	pointer-events: none;
}

.eepr-carte:hover .eepr-voile { opacity: 1; }

.eepr-loupe {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, .94);
	color: var(--eep-dark);
	transform: translateY(8px);
	transition: transform .35s var(--eep-ease);
}

.eepr-loupe svg { width: 20px; height: 20px; }

.eepr-carte:hover .eepr-loupe { transform: none; }

/* légende sous l'image */
.eepr-legende {
	display: block;
	margin: 12px 2px 0;
}

.eepr .eepr-carte-titre {
	color: var(--eep-dark);
	font-size: 15.5px;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: -.005em;
	text-transform: none;
}

/* légende au survol, sur la photo */
.eepr-surlegende {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	padding: 40px 16px 14px;
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .62) 100%);
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .35s ease, transform .4s var(--eep-ease);
	pointer-events: none;
}

.eepr.legende-survol .eepr-carte:hover .eepr-surlegende,
.eepr.legende-survol .eepr-carte:focus-visible .eepr-surlegende {
	opacity: 1;
	transform: none;
}

.eepr-surlegende .eepr-carte-titre {
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
}

/* en légende survol, pas de voile-loupe concurrent */
.eepr.legende-survol .eepr-voile {
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0) 100%);
}

/* =========================================================
   Carrousel — scroll-snap maison
   ========================================================= */
.eepr-carrousel { position: relative; }

.eepr.layout-carrousel .eepr-grille {
	display: flex;
	grid-gap: 0;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding-bottom: 4px;
}

.eepr.layout-carrousel .eepr-grille::-webkit-scrollbar { display: none; }

.eepr.layout-carrousel .eepr-item {
	flex: 0 0 calc((100% - (var(--eep-cols) - 1) * var(--eep-gap)) / var(--eep-cols));
	margin: 0 var(--eep-gap) 0 0 !important;
	scroll-snap-align: start;
}

.eepr.layout-carrousel .eepr-item:last-child { margin-right: 0 !important; }

.eepr-nav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 22px;
}

.eepr-puces { display: flex; align-items: center; }

.eepr-puce {
	width: 8px;
	height: 8px;
	margin: 0 8px 0 0 !important;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: rgba(15, 55, 20, .18);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color .25s ease, width .25s ease;
}

.eepr-puce.is-active {
	width: 22px;
	border-radius: 999px;
	background-color: var(--eep-primary);
}

.eepr-fleches { display: flex; margin-left: auto; }

.eepr-nav-btn {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0 0 0 10px !important;
	padding: 0;
	border: 1px solid var(--eep-accent);
	border-radius: 50%;
	background-color: var(--eep-accent);
	color: var(--eep-dark);
	box-shadow: 0 8px 20px rgba(244, 190, 41, .35);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color .25s ease, border-color .25s ease, color .25s ease;
}

.eepr-nav-btn svg { width: 18px; height: 18px; }

.eepr-nav-btn:hover {
	border-color: var(--eep-dark);
	background-color: var(--eep-dark);
	color: #fff;
}

.eepr-nav-btn[disabled] {
	opacity: .35;
	pointer-events: none;
}

/* ---------------------- Lightbox ---------------------- */
.eepr-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 56px 72px;
	background-color: rgba(6, 24, 10, .90);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	animation: eepr-fade .3s ease;
}

@keyframes eepr-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.eepr-lb-figure {
	position: relative;
	max-width: min(1100px, 100%);
	max-height: 100%;
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.eepr .eepr-lb-img {
	display: block !important;
	max-width: 100% !important;
	max-height: calc(100vh - 240px) !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 10px;
	box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .8);
	animation: eepr-zoom .35s var(--eep-ease);
}

@keyframes eepr-zoom {
	from { opacity: 0; transform: scale(.965); }
	to   { opacity: 1; transform: none; }
}

.eepr-lb-legende {
	display: flex;
	align-items: center;
	margin-top: 16px;
	color: #fff;
}

.eepr-lb-titre {
	font-size: 16px;
	font-weight: 700;
}

.eepr-lb-fermer,
.eepr-lb-nav {
	position: absolute;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 50%;
	background-color: rgba(255, 255, 255, .06);
	color: #fff;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color .25s ease, border-color .25s ease;
}

.eepr-lb-fermer:hover,
.eepr-lb-nav:hover {
	background-color: var(--eep-primary);
	border-color: var(--eep-primary);
}

.eepr-lb-fermer { top: 20px; right: 22px; }
.eepr-lb-fermer svg { width: 18px; height: 18px; }

.eepr-lb-nav { top: 50%; transform: translateY(-50%); }
.eepr-lb-nav svg { width: 20px; height: 20px; }
.eepr-lb-prev { left: 18px; }
.eepr-lb-next { right: 18px; }

/* bande de vignettes en bas de la lightbox */
.eepr-lb-vignettes {
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	max-width: min(720px, calc(100% - 32px));
	padding: 6px;
	border-radius: 12px;
	background-color: rgba(255, 255, 255, .06);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	overflow-x: auto;
	scrollbar-width: none;
}

.eepr-lb-vignettes::-webkit-scrollbar { display: none; }

.eepr-lb-vignettes:empty { display: none; }

.eepr-lb-vignette {
	flex: 0 0 auto;
	width: 56px;
	height: 42px;
	margin: 0 6px 0 0 !important;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 8px;
	overflow: hidden;
	background: none;
	cursor: pointer;
	opacity: .45;
	-webkit-appearance: none;
	appearance: none;
	transition: opacity .25s ease, border-color .25s ease;
}

.eepr-lb-vignette:last-child { margin-right: 0 !important; }

.eepr-lb-vignette:hover { opacity: .8; }

.eepr-lb-vignette.is-active {
	border-color: var(--eep-accent);
	opacity: 1;
}

.eepr .eepr-lb-vignette img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	border: 0 !important;
	object-fit: cover;
}

.eepr-lb-compteur {
	position: absolute;
	top: 26px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, .55);
	font-size: 13px;
	font-variant-numeric: tabular-nums;
	letter-spacing: .1em;
}

/* ---------------------- Responsive ---------------------- */
/* Filet de sécurité si le CSS Elementor n'est pas (re)généré :
   les réglages responsive du widget priment (spécificité supérieure). */
@media (max-width: 1024px) {
	.eepr-grille { --eep-cols: 2; }
}

@media (max-width: 767px) {
	.eepr-grille { --eep-cols: 1; }
}

@media (max-width: 767px) {
	.eepr { --eep-pad-x: 16px; }

	.eepr-lightbox { padding: 64px 12px 56px; }
	.eepr-lb-nav { width: 40px; height: 40px; }
	.eepr-lb-vignettes { bottom: 10px; }
	.eepr-lb-vignette { width: 46px; height: 34px; }
	.eepr-lb-prev { left: 8px; }
	.eepr-lb-next { right: 8px; }
	.eepr .eepr-lb-img { max-height: calc(100vh - 250px) !important; }
}

/* ---------------------- Accessibilité ---------------------- */
@media (prefers-reduced-motion: reduce) {
	.eepr-item,
	.eepr-media .eepr-img,
	.eepr-media::after,
	.eepr-voile,
	.eepr-loupe { transition: none; }

	.eepr-carte:hover .eepr-media .eepr-img { transform: none; }
	.eepr-lightbox,
	.eepr .eepr-lb-img { animation: none; }
}
