/* =============================================
   RENOVINTÉRIEUR — RÉALISATIONS / GALLERY
   ============================================= */

/* ---- Parent theme overrides ---- */
body.page-template-page-realisations .page_content_wrap {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

body.page-template-page-realisations .content_wrap,
body.page-template-page-realisations .content_wrap_fullscreen {
	width: 100% !important;
	max-width: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

body.page-template-page-realisations .content {
	width: 100% !important;
	max-width: none !important;
	padding: 0 !important;
	overflow: hidden;
}

body.page-template-page-realisations .sidebar,
body.page-template-page-realisations .footer_wrap,
body.page-template-page-realisations .page_title_wrap,
body.page-template-page-realisations .breadcrumbs_wrap,
body.page-template-page-realisations .sc_layouts_title {
	display: none !important;
}

body.page-template-page-realisations .top_panel .elementor-element-bac0228 {
	display: none !important;
}

/* ---- Header overlay ---- */
body.page-template-page-realisations .top_panel {
	position: absolute !important;
	top: 0;
	left: 0;
	right: 0;
	z-index: 100;
	background: transparent !important;
	box-shadow: none !important;
}

body.page-template-page-realisations .top_panel .sc_layouts_row {
	background: transparent !important;
}

body.page-template-page-realisations .top_panel .sc_layouts_row_type_compact {
	background: rgba(19, 36, 50, 0.3) !important;
	backdrop-filter: blur(8px);
}

body.page-template-page-realisations .top_panel a,
body.page-template-page-realisations .top_panel .sc_layouts_item,
body.page-template-page-realisations .top_panel .menu_main_nav > li > a {
	color: #fff !important;
}

/* ---- HERO ---- */
.ri-real-hero {
	position: relative;
	min-height: 420px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	background: linear-gradient(135deg, #132432 0%, #1d3548 55%, #243e54 100%);
	overflow: hidden;
}

.ri-real-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at 20% 80%, rgba(168, 94, 53, 0.15), transparent 50%),
		radial-gradient(circle at 80% 20%, rgba(168, 94, 53, 0.1), transparent 40%);
}

.ri-real-hero__inner {
	position: relative;
	z-index: 2;
	max-width: 700px;
	padding: 120px 24px 60px;
}

.ri-real-hero .ri-svc-hero__badge {
	display: inline-flex;
	align-items: center;
	padding: 0.45rem 0.85rem;
	margin-bottom: 1.2rem;
	border-radius: 999px;
	background: rgba(168, 94, 53, 0.2);
	border: 1px solid rgba(168, 94, 53, 0.3);
	color: #f4cdb2;
	font-size: 0.82rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ri-real-hero h1 {
	font-family: var(--ri-font-heading);
	font-size: clamp(2rem, 4vw, 3rem);
	font-weight: 700;
	line-height: 1.1;
	color: #fff;
	margin: 0 0 1rem;
}

.ri-real-hero p {
	font-size: 1.1rem;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.75);
	margin: 0;
}

.ri-real-hero .ri-svc-divider {
	display: block;
	width: 48px;
	height: 3px;
	margin: 0 auto 1.2rem;
	border-radius: 2px;
	background: var(--ri-color-accent);
}

/* ---- FILTERS ---- */
.ri-real-filters {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--ri-color-surface);
	border-bottom: 1px solid var(--ri-color-border);
}

.ri-real-filters__inner {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
	max-width: 1200px;
	margin: 0 auto;
	padding: 1rem 1.5rem;
}

.ri-real-filter {
	padding: 0.55rem 1.1rem;
	border-radius: 999px;
	border: 1px solid var(--ri-color-border);
	background: transparent;
	font-family: var(--ri-font-body);
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--ri-color-text);
	cursor: pointer;
	transition: all 0.25s ease;
}

.ri-real-filter:hover {
	border-color: var(--ri-color-accent);
	color: var(--ri-color-accent);
}

.ri-real-filter--active {
	background: var(--ri-color-ink);
	border-color: var(--ri-color-ink);
	color: #fff;
}

.ri-real-filter--active:hover {
	background: var(--ri-color-accent-dark);
	border-color: var(--ri-color-accent-dark);
	color: #fff;
}

/* ---- GALLERY GRID ---- */
.ri-real-gallery {
	max-width: 1400px;
	margin: 0 auto;
	padding: 2rem 1.5rem 3rem;
}

.ri-real-grid {
	columns: 4;
	column-gap: 12px;
}

.ri-real-item {
	display: block;
	position: relative;
	break-inside: avoid;
	margin-bottom: 12px;
	border-radius: 12px;
	overflow: hidden;
	cursor: pointer;
	text-decoration: none;
}

.ri-real-item img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 0.4s ease;
}

.ri-real-item__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(19, 36, 50, 0);
	transition: background 0.3s ease;
	color: #fff;
}

.ri-real-item__overlay svg {
	opacity: 0;
	transform: scale(0.7);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.ri-real-item:hover img {
	transform: scale(1.05);
}

.ri-real-item:hover .ri-real-item__overlay {
	background: rgba(19, 36, 50, 0.35);
}

.ri-real-item:hover .ri-real-item__overlay svg {
	opacity: 1;
	transform: scale(1);
}

/* Hide filtered-out items */
.ri-real-item[data-hidden="true"] {
	display: none;
}

.ri-real-empty {
	text-align: center;
	color: var(--ri-color-soft);
	padding: 3rem 1rem;
	font-size: 1.1rem;
}

/* ---- LIGHTBOX ---- */
.ri-lightbox {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(10, 20, 30, 0.92);
	backdrop-filter: blur(12px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ri-lightbox[aria-hidden="false"] {
	opacity: 1;
	visibility: visible;
}

.ri-lightbox__content {
	position: relative;
	max-width: 90vw;
	max-height: 85vh;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.ri-lightbox__content img {
	max-width: 90vw;
	max-height: 80vh;
	object-fit: contain;
	border-radius: 8px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
	transition: opacity 0.25s ease;
}

.ri-lightbox__caption {
	margin-top: 0.75rem;
	color: rgba(255, 255, 255, 0.7);
	font-size: 0.95rem;
	text-align: center;
}

.ri-lightbox__caption:empty {
	display: none;
}

.ri-lightbox__close {
	position: absolute;
	top: 20px;
	right: 24px;
	z-index: 10;
	width: 48px;
	height: 48px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	font-size: 2rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ri-lightbox__close:hover {
	background: rgba(255, 255, 255, 0.2);
}

.ri-lightbox__prev,
.ri-lightbox__next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 10;
	width: 52px;
	height: 52px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	font-size: 2.2rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ri-lightbox__prev {
	left: 20px;
}

.ri-lightbox__next {
	right: 20px;
}

.ri-lightbox__prev:hover,
.ri-lightbox__next:hover {
	background: rgba(255, 255, 255, 0.2);
}

.ri-lightbox__counter {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, 0.5);
	font-size: 0.85rem;
	font-weight: 500;
}

/* ---- Disable parent theme lightbox on this page ---- */
body.page-template-page-realisations .fancybox-container,
body.page-template-page-realisations .fancybox-overlay,
body.page-template-page-realisations .fancybox-wrap,
body.page-template-page-realisations .pswp,
body.page-template-page-realisations .mfp-wrap,
body.page-template-page-realisations .mfp-bg,
body.page-template-page-realisations .popup_wrap {
	display: none !important;
	visibility: hidden !important;
	z-index: -1 !important;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1100px) {
	.ri-real-grid {
		columns: 3;
	}
}

@media (max-width: 768px) {
	.ri-real-grid {
		columns: 2;
		column-gap: 8px;
	}

	.ri-real-item {
		margin-bottom: 8px;
		border-radius: 8px;
	}

	.ri-real-hero {
		text-align: center !important;
	}

	.ri-real-hero__inner {
		padding: 90px 20px 36px;
		text-align: center !important;
	}

	.ri-real-hero h1 {
		font-size: 1.7rem;
		text-align: center !important;
	}

	.ri-real-hero p {
		font-size: 0.98rem;
		text-align: center !important;
	}

	.ri-real-hero .ri-svc-hero__badge {
		margin-left: auto;
		margin-right: auto;
	}

	.ri-real-hero .ri-svc-divider {
		margin-left: auto;
		margin-right: auto;
	}

	.ri-real-filters__inner {
		justify-content: center;
		padding: 0.75rem 1rem;
		gap: 0.4rem;
	}

	.ri-real-filter {
		padding: 0.5rem 0.9rem;
		font-size: 0.84rem;
	}

	.ri-real-gallery {
		padding: 1.25rem 0.75rem 2rem;
	}

	.ri-lightbox__prev,
	.ri-lightbox__next {
		width: 40px;
		height: 40px;
		font-size: 1.6rem;
	}

	.ri-lightbox__prev {
		left: 8px;
	}

	.ri-lightbox__next {
		right: 8px;
	}

	.ri-lightbox__close {
		top: 12px;
		right: 12px;
		width: 40px;
		height: 40px;
		font-size: 1.6rem;
	}
}
