/**
 * Services Showcase — front-end styles.
 *
 * Layout deux colonnes :
 *   - Gauche  : label entête + titre (ADAM) + liste (Ubuntu) + info service
 *   - Droite  : images pleine hauteur avec transition opacity au survol
 *
 * @package RHM_Atelier_Latitude_Portfolio
 */

/* ==========================================================================
   Wrapper principal
   ========================================================================== */

.alp-services-showcase {
	display: flex;
	align-items: stretch;
	height: 85vh;
	overflow: hidden;
}

@media (min-width: 769px) {
	.alp-services-showcase {
		gap: 6rem;
	}
}

/* ==========================================================================
   Colonne gauche
   ========================================================================== */

.alp-ss-left {
	flex: 0 0 42%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: clamp(1.8rem, 3.5vw, 3.5rem) clamp(1.8rem, 3.5vw, 3.5rem);
	background-color: var(--wp--preset--color--base, #F9F8F5);
	box-sizing: border-box;
	gap: clamp(1.2rem, 2.5vw, 2rem);
}

/* ─── Entête ─── */

.alp-ss-label {
	margin: 0 0 1rem;
	font-family: var(--wp--preset--font-family--body, sans-serif);
	font-size: 0.62rem;
	font-weight: 500;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--wp--preset--color--muted, #999);
}

/* Titre : police ADAM uniquement */
.alp-ss-title {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading, sans-serif);
	font-size: clamp(2.2rem, 4.5vw, 4rem);
	font-weight: 400;
	line-height: 1.05;
	color: var(--wp--preset--color--contrast, #111);
}


/* ─── Liste des services ─── */

.alp-ss-list {
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0;
}

.alp-ss-item {
	display: flex;
	align-items: baseline;
	gap: 1em;
	padding: 0.42em 0;
	cursor: pointer;
	border-top: 1px solid transparent;
	transition: border-color 0.2s ease;
	outline: none;
}

.alp-ss-item:focus-visible {
	outline: 2px solid var(--wp--preset--color--contrast, #111);
	outline-offset: 2px;
}

/* Numéro */
.alp-ss-num {
	font-family: var(--wp--preset--font-family--body, sans-serif);
	font-size: 0.58rem;
	font-weight: 500;
	line-height: 1;
	color: var(--wp--preset--color--muted, #bbb);
	transition: color 0.3s ease;
	flex-shrink: 0;
	position: relative;
	top: -0.1em;
	letter-spacing: 0.02em;
}

/* Titre du service : police Ubuntu (body) */
.alp-ss-item-title {
	font-family: var(--wp--preset--font-family--body, sans-serif);
	font-size: clamp(0.88rem, 1.4vw, 1.05rem);
	font-weight: 400;
	color: var(--wp--preset--color--muted, #bbb);
	transition: color 0.3s ease, font-weight 0.3s ease, font-size 0.3s ease;
	line-height: 1.3;
}

/* Lien optionnel sur le titre */
.alp-ss-item-link {
	color: inherit;
	text-decoration: none;
}

/* ─── État actif ─── */

.alp-ss-item.is-active {
	border-top-color: var(--wp--preset--color--contrast, #111);
}

.alp-ss-item.is-active .alp-ss-num {
	color: var(--wp--preset--color--contrast, #111);
	font-weight: 700;
}

.alp-ss-item.is-active .alp-ss-item-title {
	color: var(--wp--preset--color--contrast, #111);
	font-size: clamp(1rem, 1.6vw, 1.2rem);
	font-weight: 600;
}

/* Underline au hover sur items avec lien */
.alp-ss-item:hover .alp-ss-item-link,
.alp-ss-item.is-active .alp-ss-item-link {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ─── Panneau info bas ─── */

/*
 * Toutes les descriptions occupent la même cellule grid.
 * La hauteur du wrapper est celle de la description la plus longue,
 * fixée une fois pour toutes au chargement — zéro layout shift au hover.
 */
.alp-ss-info-wrap {
	display: grid;
}

.alp-ss-info {
	grid-area: 1 / 1;
	opacity: 0;
	transition: opacity 0.4s ease;
	pointer-events: none;
}

.alp-ss-info.is-visible {
	opacity: 1;
	pointer-events: auto;
}

.alp-ss-info-label {
	margin: 0 0 0.35em;
	font-family: var(--wp--preset--font-family--body, sans-serif);
	font-size: 0.62rem;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--contrast, #111);
}

.alp-ss-info-desc {
	margin: 0;
	font-family: var(--wp--preset--font-family--body, sans-serif);
	font-size: 0.82rem;
	line-height: 1.6;
	color: var(--wp--preset--color--muted, #777);
	max-width: 100%;
}

/* ==========================================================================
   Colonne droite — images
   ========================================================================== */

.alp-ss-right {
	flex: 1;
	position: relative;
	overflow: hidden;
	background-color: #e8e6e1;
}

.alp-ss-image {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.65s ease;
}

.alp-ss-image.is-active {
	opacity: 1;
}

.alp-ss-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

/* ==========================================================================
   Responsive — tablette
   ========================================================================== */

@media (max-width: 1024px) {
	.alp-ss-left {
		flex: 0 0 48%;
	}
}

/* ==========================================================================
   Responsive — mobile
   ========================================================================== */

@media (max-width: 768px) {
	.alp-services-showcase {
		flex-direction: column-reverse;
		height: auto;
	}

	.alp-ss-left {
		flex: none;
		padding: 2rem 1.5rem;
		gap: 1.5rem;
	}

	.alp-ss-right {
		height: 45vw;
		min-height: 200px;
		max-height: 320px;
		flex: none;
	}

	.alp-ss-item-title {
		font-size: 0.9rem;
	}

	.alp-ss-item.is-active .alp-ss-item-title {
		font-size: 1rem;
	}

	.alp-ss-title {
		font-size: clamp(2rem, 9vw, 3rem);
	}
}
