/* ==========================================================================
   Home — Section projets (phase 1)
   ========================================================================== */

.home-projets {
	width: 100%;
}

/* --------------------------------------------------------------------------
   Projet item — chaque projet occupe 100vh
   -------------------------------------------------------------------------- */

.home-projets__item {
	position: relative;
	height: 100vh;
	width: 100%;
	overflow: hidden;
	background-color: var(--color-black);
}

.home-projets__lien-global {
	display: block;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.home-projets__frame {
	position: relative;
	height: 100%;
	width: 100%;
	overflow: hidden;
}

/* --------------------------------------------------------------------------
   Image de couverture
   -------------------------------------------------------------------------- */

.home-projets__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 50%;
	display: block;
	transform: scale(1.15);
	transform-origin: center center;
	will-change: transform, object-position;
}

/* --------------------------------------------------------------------------
   Placeholder (pas d'image uploadée)
   -------------------------------------------------------------------------- */

.home-projets__placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--color-gray-200);
}

.home-projets__placeholder span {
	font-family: var(--font-display), var(--font-body), sans-serif;
	font-size: 80px;
	font-weight: var(--font-weight-book);
	text-transform: uppercase;
	color: var(--color-black);
	opacity: 0.2;
}

/* --------------------------------------------------------------------------
   Overlay (pills + nom du projet)
   -------------------------------------------------------------------------- */

.home-projets__overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
	padding: calc(var(--header-padding-y) + 48px) var(--header-padding-x) 48px;
	background: rgba(0, 0, 0, 0.3);
	pointer-events: none;
}

/* --------------------------------------------------------------------------
   Pills (catégories)
   -------------------------------------------------------------------------- */

.home-projets__pills {
	display: flex;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.home-projets__pill {
	position: relative;
	font-family: var(--font-body);
	font-size: 12px;
	font-weight: var(--font-weight-medium);
	color: var(--color-white);
	text-transform: uppercase;
	line-height: 1;
	padding: var(--space-xs);
	padding-left: 20px;
	border-radius: var(--radius-sm);
	background-color: var(--glass-bg);
	backdrop-filter: var(--glass-blur);
	-webkit-backdrop-filter: var(--glass-blur);
	border: none;
	border-top: 1px solid var(--glass-border);
	box-shadow: var(--glass-shadow);
}

.home-projets__pill::before {
	content: "";
	position: absolute;
	left: 8px;
	top: 50%;
	transform: translateY(-50%);
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background-color: var(--color-white);
}

/* --------------------------------------------------------------------------
   Nom du projet (centré)
   -------------------------------------------------------------------------- */

.home-projets__nom {
	font-family: var(--font-display), var(--font-body), sans-serif;
	font-size: 56px;
	font-weight: var(--font-weight-book);
	line-height: 0.8;
	letter-spacing: 0.06em;
	color: var(--color-white);
	text-align: center;
	text-transform: uppercase;
	margin: 0;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

/* --------------------------------------------------------------------------
   Cursor follower (phase 3A)
   -------------------------------------------------------------------------- */

.home-projets__cursor {
	position: fixed;
	top: 0;
	left: 0;
	width: 338px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	pointer-events: none;
	z-index: 100;
	opacity: 0;
	transition: opacity 300ms ease-out;
	will-change: transform;
}

.home-projets__cursor--visible {
	opacity: 1;
}

.home-projets__cursor-image-wrapper {
	position: relative;
	width: 100%;
	height: 358px;
	overflow: hidden;
	border-radius: 16px;
	box-shadow: 0 16px 24px rgba(0, 0, 0, 0.25);
	background-color: var(--color-gray-200);
}

/* Chaque moitie clippe la portion visible de son image */
.home-projets__cursor-half {
	position: absolute;
	left: 0;
	width: 100%;
	overflow: hidden;
}

.home-projets__cursor-half--top {
	top: 0;
	height: 100%;
}

.home-projets__cursor-half--bottom {
	bottom: 0;
	height: 0;
}

/* Les images gardent la taille complete du carre (358px) pour eviter la deformation */
.home-projets__cursor-image {
	width: 100%;
	height: 358px;
	object-fit: cover;
	display: block;
	transform: scale(1.4);
	will-change: transform;
}

/* Image du haut : ancree en haut du carre */
.home-projets__cursor-image--top {
	position: absolute;
	top: 0;
	left: 0;
}

/* Image du bas : ancree en bas du carre (sa partie basse reste visible quand la moitie grandit) */
.home-projets__cursor-image--bottom {
	position: absolute;
	bottom: 0;
	left: 0;
}

.home-projets__cursor-label {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-family: var(--font-body);
	font-size: 16px;
	font-weight: var(--font-weight-medium);
	line-height: 1;
	text-transform: uppercase;
	color: var(--color-white);
}

.home-projets__cursor-arrow {
	display: inline-flex;
	width: 20px;
	height: 20px;
}

.home-projets__cursor-arrow svg {
	width: 100%;
	height: 100%;
	stroke: currentColor;
	fill: none;
}

/* Desactive sur tactile (le cursor n'a pas de sens) */
@media (hover: none) {
	.home-projets__cursor {
		display: none;
	}
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
	.home-projets__overlay {
		padding: 24px;
	}

	.home-projets__nom {
		font-size: 36px;
	}

	.home-projets__placeholder span {
		font-size: 48px;
	}
}
