/* === Custom styles that complement Tailwind === */

/* Smooth scrollbar */
::-webkit-scrollbar {
	width: 6px;
}

::-webkit-scrollbar-track {
	background: transparent;
}

::-webkit-scrollbar-thumb {
	background: rgba(24, 191, 239, 0.3);
	border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
	background: rgba(24, 191, 239, 0.5);
}

/* Prevent FOUC */
[x-cloak] {
	display: none !important;
}

/* Masonry grid */
.masonry-grid {
	columns: 3;
	column-gap: 8px;
}

@media (max-width: 1024px) {
	.masonry-grid {
		columns: 2;
	}
}

@media (max-width: 640px) {
	.masonry-grid {
		columns: 1;
		column-gap: 6px;
	}
}

.masonry-item {
	break-inside: avoid;
	margin-bottom: 8px;
}

@media (max-width: 640px) {
	.masonry-item {
		margin-bottom: 6px;
	}
}

/* Parallax hero image */
.hero-bg {
	will-change: transform;
	transition: transform 0.15s ease-out;
}

/* Reveal animations — elements hidden by default */
.reveal {
	opacity: 0;
	transform: translateY(40px);
}

.reveal.revealed {
	animation: revealUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes revealUp {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.reveal-delay-1 {
	animation-delay: 0.1s;
}

.reveal-delay-2 {
	animation-delay: 0.2s;
}

.reveal-delay-3 {
	animation-delay: 0.3s;
}

.reveal-delay-4 {
	animation-delay: 0.4s;
}

/* Lightbox */
.lightbox-open {
	overflow: hidden;
}

/* Video responsive */
.video-container {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	border-radius: 0.75rem;
}

.video-container iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.video-container .youtube-lazy {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	cursor: pointer;
}

/* Scrolling image wall (landing pages) */
.scrolling-wrapper {
	overflow: hidden;
	white-space: nowrap;
	position: relative;
	width: 100%;
	padding: 1rem 0;
	border-radius: 0.75rem;
	background: rgba(255, 255, 255, 0.02);
	border: 1px solid rgba(255, 255, 255, 0.06);
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.scrolling-track {
	display: inline-flex;
	width: max-content;
	animation: scroll-wall-left 70s linear infinite;
}

.scrolling-track.reverse {
	animation: scroll-wall-right 65s linear infinite;
}

.scrolling-wrapper:hover .scrolling-track {
	animation-play-state: paused;
}

.scrolling-track img {
	height: 200px;
	width: auto;
	margin: 0 7.5px;
	border-radius: 0.5rem;
	vertical-align: middle;
	pointer-events: none;
	user-select: none;
	-webkit-user-drag: none;
}

@keyframes scroll-wall-left {
	0% { transform: translateX(0); }
	100% { transform: translateX(-50%); }
}

@keyframes scroll-wall-right {
	0% { transform: translateX(-50%); }
	100% { transform: translateX(0); }
}

@media screen and (max-width: 736px) {
	.scrolling-track img { height: 140px; }
	.scrolling-wrapper { gap: 10px; }
}

/* Client logos marquee ("Ils m'ont fait confiance") */
.logo-marquee-wrapper {
	overflow: hidden;
	white-space: nowrap;
	position: relative;
	width: 100%;
}

.logo-marquee-track {
	display: inline-flex;
	align-items: center;
	width: max-content;
	animation: scroll-wall-left 30s linear infinite;
}

.logo-marquee-wrapper:hover .logo-marquee-track {
	animation-play-state: paused;
}

.logo-marquee-track .logo-item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	margin: 0 1.25rem;
	padding: 1rem 1.75rem;
	height: 90px;
	width: 160px;
	background: rgba(255, 255, 255, 0.9);
	border-radius: 0.75rem;
}

.logo-marquee-track .logo-item img {
	max-height: 56px;
	max-width: 120px;
	width: auto;
	height: auto;
	object-fit: contain;
	filter: grayscale(100%);
	opacity: 0.75;
	transition: filter 0.3s ease, opacity 0.3s ease;
}

.logo-marquee-track .logo-item:hover img {
	filter: grayscale(0%);
	opacity: 1;
}

@media screen and (max-width: 736px) {
	.logo-marquee-track .logo-item { height: 70px; width: 130px; padding: 0.75rem 1.25rem; margin: 0 0.75rem; }
	.logo-marquee-track .logo-item img { max-height: 44px; max-width: 100px; }
}

/* Review carousel */
.carousel-track {
	display: flex;
	transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Image protection */
.protected-img {
	pointer-events: none;
	user-select: none;
	-webkit-user-drag: none;
}

/* Gradient text */
.gradient-text {
	background: linear-gradient(135deg, #18bfef 0%, #83e8ff 50%, #18bfef 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

/* Nav active link underline */
.nav-link {
	position: relative;
}

.nav-link::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 0;
	height: 2px;
	background: #18bfef;
	transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
	width: 100%;
}

/* Prestations dropdown (desktop nav) — CSS fallback so it opens on hover
   and keyboard focus even if JavaScript fails to load. */
.nav-dropdown:hover > .nav-dropdown-panel,
.nav-dropdown:focus-within > .nav-dropdown-panel {
	display: block;
}

/* Keep the dropdown panel fully legible whatever scrolls behind it:
   solid dark background + blur are declared here with concrete values so
   they never depend on the Tailwind build being in sync with the markup. */
.nav-dropdown-panel > ul,
#mobile-menu {
	background-color: #0a0a0a; /* fallback if rgba / backdrop-filter unsupported */
	background-color: rgba(10, 10, 10, 0.97);
	-webkit-backdrop-filter: blur(24px);
	backdrop-filter: blur(24px);
}

.nav-dropdown-panel > ul {
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 0.75rem;
}

/* Light mode overrides */
html:not(.dark) body {
	background: #f8f9fa;
}
