/* ============================================================
   VARIABLES
   ============================================================ */
:root {
	--font-main: 'Alexandria', sans-serif;
	--color-white: #ffffff;
	--color-black: #000000;
	--color-whatsapp: #25D366;
	--color-overlay: rgba(0, 0, 0, 0.62);
	--transition-slide: opacity 0.8s ease, transform 0.8s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html, body {
	width: 100%;
	height: 100%;
	overflow: hidden;
	font-family: var(--font-main);
}

/* ============================================================
   SLIDER WRAPPER
   ============================================================ */
#slider {
	position: relative;
	width: 100vw;
	height: 100vh;
}

/* ============================================================
   SLIDES — STATES
   ============================================================ */
.slide {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	display: flex;
	flex-direction: column;
	opacity: 0;
	pointer-events: none;
	transition: var(--transition-slide);
	will-change: opacity;
}

.slide.slide-active {
	opacity: 1;
	pointer-events: auto;
}

.slide.slide-exit {
	opacity: 0;
	pointer-events: none;
}

/* ============================================================
   SLIDE 1 — INTRO / LOADER
   ============================================================ */
#slide-1 {
	background-color: var(--color-black);
}

.slide-1__inner {
	width: 100%;
	height: 100%;
	gap: clamp(8px, 1vh, 12px) !important;
}

/* Logo Slide 1 */
.slide-1__logo {
	width: clamp(140px, 25vw, 220px);
	height: auto;
	animation: fadeIn 0.8s ease both;
}

/* Loader track — même largeur que le logo */
.loader-track {
	position: relative;
	width: clamp(140px, 25vw, 220px);
	height: 4px;
	border-radius: 100px;
	background-color: rgba(255, 255, 255, 0.15);
	overflow: hidden;
}

/* Loader fill — barre qui se remplit progressivement */
.loader-dot {
	position: absolute;
	top: 0;
	left: 0;
	width: 0%;
	height: 100%;
	border-radius: 100px;
	background-color: var(--color-white);
	animation: loaderFill 2.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* ============================================================
   SLIDE 2 — TEXTE ANIMÉ
   ============================================================ */
#slide-2 {
	background-color: var(--color-black);
}

/* Ellipse glow de fond */
.slide-2__bg-ellipse {
	display: none;
}

/* Header Slide 2 */
.slide-2__header {
	position: relative;
	z-index: 1;
	height: 84px;
	flex-shrink: 0;
	padding-top: 1.25rem;
}

.slide-2__logo {
	width: clamp(64px, 9vw, 106px);
	height: auto;
}

/* Texte zone */
.slide-2__inner {
	flex: 1;
	position: relative;
	z-index: 1;
}

/* Texte principal Slide 2 */
.slide-2__text {
	font-family: var(--font-main);
	font-weight: 800;
	font-size: clamp(36px, 5.2vw, 58px);
	line-height: 1.15;
	color: var(--color-white);
	letter-spacing: -0.02em;
}

/* Chaque groupe de mots — invisible par défaut */
.word-group {
	display: inline;
	opacity: 0;
	transform: translateY(12px);
	/* animation appliquée via JS avec délai */
	transition: opacity 0.8s ease, transform 0.8s ease;
}

.word-group.word-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Dernier groupe en surbrillance */
.word-group--highlight.word-visible {
	color: var(--color-white);
	background-color: transparent;
	padding: 0;
	border-radius: 0;
}

/* Pause visuelle — pulse subtle après animation */
.slide-2__inner.words-complete::after {
	content: '';
	position: absolute;
	bottom: 40px;
	left: 50%;
	transform: translateX(-50%);
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.4);
	animation: pausePulse 1.5s ease-in-out 5.8s infinite;
}

/* ============================================================
   SLIDE 3 — BIENTÔT DISPONIBLE
   ============================================================ */
#slide-3 {
	background-color: var(--color-black);
}

/* Background image */
.slide-3__bg {
	position: absolute;
	inset: 0;
	background-image: url('../images/bg-villa.png');
	background-size: cover;
	background-position: center;
	z-index: 0;
}

/* Overlay */
.slide-3__overlay {
	position: absolute;
	inset: 0;
	background-color: var(--color-overlay);
	z-index: 1;
}

/* Header */
.slide-3__header {
	z-index: 2;
	flex-shrink: 0;
	width: 100%;
	padding-left: clamp(1rem, 6vw, 4.8rem) !important;
	padding-right: clamp(1rem, 4vw, 3rem) !important;
}

.slide-3__logo {
	width: clamp(68px, 9vw, 110px);
	height: auto;
	animation: fadeIn 0.8s ease 0.2s both;
}

/* Main */
.slide-3__main {
	z-index: 2;
	align-items: flex-start !important;
	padding-left: clamp(1rem, 6vw, 4.8rem) !important;
	padding-right: clamp(1rem, 4vw, 3rem) !important;
}

.slide-3__main .text-center {
	width: 100%;
	max-width: 760px;
	text-align: left !important;
}

/* Titre */
.slide-3__title {
	font-family: var(--font-main);
	font-weight: 700;
	font-size: 55px;
	line-height: normal;
	color: #ffffff;
	animation: fadeInUp 0.8s ease 0.4s both;
}

/* Sous-titre */
.slide-3__subtitle {
	font-family: var(--font-main);
	font-weight: 300;
	font-size: 16px;
	line-height: normal;
	color: #ffffff;
	animation: fadeInUp 0.8s ease 0.6s both;
}

/* Contacts */
.slide-3__contacts {
	animation: fadeInUp 0.8s ease 0.8s both;
	gap: clamp(1.4rem, 4vw, 4rem) !important;
	align-items: flex-start !important;
	justify-content: flex-start !important;
}

.contact-icon {
	display: none;
}

.contact-label {
	font-size: clamp(14px, 1.1vw, 18px);
	font-weight: 700;
	color: var(--color-white);
	margin-bottom: 0.15rem;
	text-transform: none;
	letter-spacing: 0;
	line-height: 1.1;
}

.contact-link {
	font-size: clamp(13px, 1vw, 16px);
	font-weight: 400;
	color: var(--color-white);
	text-decoration: none;
	transition: color 0.25s ease;
	line-height: 1.3;
}

.contact-link:hover {
	color: var(--color-whatsapp);
}

.contact-divider {
	display: none !important;
}

/* Bouton WhatsApp */
.btn-whatsapp {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 10px 22px;
	background-color: var(--color-white);
	color: var(--color-whatsapp);
	font-family: var(--font-main);
	font-weight: 700;
	font-size: clamp(18px, 1.35vw, 22px);
	border-radius: 30px;
	text-decoration: none;
	box-shadow: 0 4px 14px rgba(37, 211, 102, 0.2);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	animation: fadeInUp 0.8s ease 1s both;
}

.btn-whatsapp:hover {
	transform: scale(1.05);
	box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
	color: var(--color-whatsapp);
	text-decoration: none;
}

.btn-whatsapp:active {
	transform: scale(0.97);
}

.btn-whatsapp__icon {
	width: 22px;
	height: 22px;
	flex-shrink: 0;
}

/* Footer */
.slide-3__footer {
	z-index: 2;
	flex-shrink: 0;
	border-top: 0;
	animation: fadeIn 0.8s ease 1.2s both;
	padding-top: 0 !important;
	width: 100%;
	padding-left: clamp(1rem, 6vw, 4.8rem) !important;
	padding-right: clamp(1rem, 4vw, 3rem) !important;
}

.copyright {
	font-family: var(--font-main);
	font-size: 14px;
	font-weight: 300;
	font-style: normal;
	line-height: normal;
	color: #ffffff;
	margin: 0;
}

/* Social links */
.social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.1);
	color: var(--color-white);
	font-size: 0.72rem;
	text-decoration: none;
	transition: transform 0.25s ease, opacity 0.25s ease, background-color 0.25s ease;
}

.social-link:hover {
	transform: scale(1.15);
	opacity: 0.9;
	background-color: rgba(255, 255, 255, 0.25);
	color: var(--color-white);
}

/* ============================================================
   KEYFRAMES
   ============================================================ */

/* Loader : barre qui se remplit progressivement */
@keyframes loaderFill {
	0%   { width: 0%; }
	10%  { width: 8%; }
	30%  { width: 35%; }
	60%  { width: 65%; }
	80%  { width: 85%; }
	100% { width: 100%; }
}

/* Mot qui remonte et s'affiche (appliqué via JS class) */
@keyframes fadeInWord {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Entrée depuis le bas */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(28px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Simple fade */
@keyframes fadeIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}

/* Pause pulse — indicateur subtil d'attente */
@keyframes pausePulse {
	0%, 100% { opacity: 0.3; }
	50% { opacity: 0.8; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Mobile : contacts empilés */
@media (max-width: 767.98px) {
	.slide-3__contacts {
		flex-direction: column;
		align-items: flex-start;
	}

	.slide-3__main {
		padding-top: 1rem;
		padding-bottom: 1rem;
		align-items: flex-start !important;
	}

	.slide-3__title {
		font-size: 34px;
	}

	.slide-3__subtitle {
		font-size: 13px;
	}

	.contact-label {
		font-size: 14px;
	}
	.contact-link {
		font-size: 13px;
	}

	.copyright {
		font-size: 12px;
	}

	.social-link {
		width: 26px;
		height: 26px;
		font-size: 0.68rem;
	}

	.btn-whatsapp {
		width: 100%;
		max-width: 320px;
		justify-content: center;
	}

	.loader-track {
		width: clamp(140px, 25vw, 220px);
	}
}

/* Très petits écrans */
@media (max-width: 380px) {
	.slide-2__text {
		font-size: 22px;
	}
}

/* ============================================================
   ACCESSIBILITÉ
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

a:focus-visible,
.social-link:focus-visible,
.btn-whatsapp:focus-visible {
	outline: 2px solid var(--color-whatsapp);
	outline-offset: 3px;
}
