/**
 * Accueil — projet à la une.
 * Mise en page éditoriale sophistiquée : texte respiré, image juste suffisante.
 */

.ed-case-study {
	position: relative;
	z-index: 2;
	background: #f4f2ee;
	color: #1c1a18;
}

.ed-case-study__inner {
	box-sizing: border-box;
	max-width: 1680px;
	margin: 0 auto;
	padding: 168px 96px 112px;
}

.ed-case-study__counter {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 48px;
	padding-bottom: 24px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
	font-family: var(--o3w-font-heading, system-ui, sans-serif);
	font-size: var(--o3w-kicker-size);
	font-weight: var(--o3w-kicker-weight);
	letter-spacing: var(--o3w-kicker-tracking);
	line-height: var(--o3w-kicker-leading);
	text-transform: uppercase;
	color: rgba(28, 26, 24, 0.58);
}

.ed-case-study__counter-link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
	color: rgba(28, 26, 24, 0.58);
	text-decoration: none;
	transition: color 0.3s var(--o3w-ease), gap 0.35s var(--o3w-ease);
}

.ed-case-study__counter-link:hover {
	gap: 16px;
	color: var(--o3w-vert, #2f4a3e);
}

.ed-case-study__stage {
	position: relative;
	overflow: visible;
}

.ed-case-study__grid {
	display: grid;
	grid-template-columns: minmax(0, 0.55fr) minmax(0, 1fr);
	column-gap: 64px;
	align-items: center;
}

/* ——— Colonne gauche ——— */
.ed-case-study__copy {
	max-width: 620px;
	padding-right: 24px;
}

/* Label — typo unifiée via home-section-ui.css */
.ed-case-study__label {
	margin: 0 0 40px;
	color: rgba(28, 26, 24, 0.78);
}

.ed-case-study__title {
	margin: 0 0 32px;
	max-width: 18ch;
	font-family: var(--o3w-font-display, var(--o3w-font-heading, system-ui, sans-serif));
	font-size: clamp(2.5rem, 4.6vw, 4.75rem);
	font-weight: 500;
	line-height: 0.98;
	letter-spacing: -0.035em;
	color: #1c1a18;
	text-wrap: balance;
}

.ed-case-study__title em {
	font-style: normal;
	font-weight: inherit;
}

.ed-case-study__lede {
	margin: 0;
	max-width: 30rem;
	font-family: var(--o3w-font-body, system-ui, sans-serif);
	font-size: 17px;
	line-height: 1.62;
	letter-spacing: -0.005em;
	color: rgba(28, 26, 24, 0.66);
}

/* Prestations — petite typographie tabulaire, pas une liste à puces */
.ed-case-study__project {
	display: grid;
	grid-template-columns: auto 1fr;
	column-gap: 40px;
	align-items: start;
	margin-top: 48px;
	padding-top: 28px;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.ed-case-study__project-label {
	margin: 0;
	font-family: var(--o3w-font-heading, system-ui, sans-serif);
	font-size: 10.5px;
	font-weight: 500;
	letter-spacing: 0.22em;
	line-height: 1.4;
	text-transform: uppercase;
	color: rgba(28, 26, 24, 0.5);
}

.ed-case-study__project-list {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ed-case-study__project-list li {
	font-family: var(--o3w-font-body, system-ui, sans-serif);
	font-size: 14.5px;
	line-height: 1.45;
	letter-spacing: -0.003em;
	color: rgba(28, 26, 24, 0.78);
}

/* Lien — micro-direction artistique sur le filet */
.ed-case-study__link {
	display: inline-flex;
	align-items: center;
	gap: 16px;
	width: fit-content;
	margin-top: 48px;
	padding: 8px 0;
	font-family: var(--o3w-font-body, system-ui, sans-serif);
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.02em;
	line-height: 1;
	color: #1c1a18;
	text-decoration: none;
	transition: color 0.35s var(--o3w-ease), gap 0.45s var(--o3w-ease);
}

.ed-case-study__link-line {
	position: relative;
	flex-shrink: 0;
	width: 40px;
	height: 14px;
	background: none;
	overflow: visible;
}

.ed-case-study__link-line::before {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: calc(100% - 5px);
	height: 1px;
	background: rgba(28, 26, 24, 0.55);
	transform: translateY(-50%);
	transition: width 0.45s var(--o3w-ease), background 0.35s ease;
}

.ed-case-study__link-line::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 0;
	width: 6px;
	height: 6px;
	border-top: 1px solid currentColor;
	border-right: 1px solid currentColor;
	transform: translateY(-50%) rotate(45deg);
	transform-origin: center center;
	opacity: 0;
	transition: opacity 0.35s ease 0.05s, transform 0.45s var(--o3w-ease);
	color: var(--o3w-vert, #2f4a3e);
}

.ed-case-study__link:hover {
	color: var(--o3w-vert-deep, #243830);
	gap: 22px;
}

.ed-case-study__link:hover .ed-case-study__link-line {
	width: 60px;
}

.ed-case-study__link:hover .ed-case-study__link-line::before {
	width: calc(100% - 5px);
	background: var(--o3w-vert, #2f4a3e);
}

.ed-case-study__link:hover .ed-case-study__link-line::after {
	opacity: 1;
	transform: translateY(-50%) rotate(45deg) translateX(1px);
}

/* ——— Colonne droite — mockup MacBook Pro (PNG) + scroll dans l’écran ——— */
.ed-case-study__visual {
	position: relative;
	z-index: 1;
	min-width: 0;
	align-self: center;
	justify-self: end;
	width: 100%;
	max-width: min(920px, 54vw);
	margin-top: 0;
}

.ed-case-study__device {
	--device-screen-top: 6.1%;
	--device-screen-left: 12.05%;
	--device-screen-width: 76.2%;
	--device-screen-height: 77.42%;
	--device-screen-radius: 0;

	position: relative;
	width: 100%;
	max-width: min(920px, 54vw);
	margin-left: auto;
	margin-right: 0;
	line-height: 0;
}

.ed-case-study__device-shell {
	display: block;
	width: 100%;
	height: auto;
}

.ed-case-study__screen {
	position: absolute;
	top: var(--device-screen-top);
	left: var(--device-screen-left);
	width: var(--device-screen-width);
	height: var(--device-screen-height);
	overflow: hidden;
	border-radius: var(--device-screen-radius);
	background: #faf9f7;
}

.ed-case-study__screen-track {
	will-change: transform;
}

.ed-case-study__screen-track picture,
.ed-case-study__screen-img {
	display: block;
	width: 100%;
	min-width: 100%;
	height: auto;
	border-radius: 0;
	vertical-align: top;
}

.ed-case-study__screen-fade {
	position: absolute;
	inset: auto 0 0;
	z-index: 1;
	height: 14%;
	pointer-events: none;
	background: linear-gradient(to top, rgba(10, 10, 10, 0.45) 0%, transparent 100%);
}

/* Motion réduite / mobile : image fixe en haut de l’écran */
@media (prefers-reduced-motion: reduce) {
	.ed-case-study__screen-track {
		transform: none !important;
	}

	.ed-case-study__screen-img {
		object-fit: cover;
		object-position: top center;
		height: 100%;
	}
}

.ed-case-study__stage.is-static .ed-case-study__screen-track {
	transform: none !important;
}

.ed-case-study__stage.is-static .ed-case-study__screen-img {
	object-fit: cover;
	object-position: top center;
	height: 100%;
}

.ed-home > .ed-approche + .ed-case-study {
	margin-top: 0;
}

@media (max-width: 1300px) {
	.ed-case-study__inner {
		padding: 144px 72px 112px;
	}

	.ed-case-study__grid {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		column-gap: 56px;
	}

	.ed-case-study__visual,
	.ed-case-study__device {
		max-width: min(780px, 58vw);
	}
}

@media (max-width: 1100px) {
	.ed-case-study__inner {
		padding: 120px 48px 128px;
	}

	.ed-case-study__grid {
		column-gap: 48px;
	}
}

@media (max-width: 900px) {
	.ed-case-study__inner {
		padding: 96px 24px 104px;
	}

	.ed-case-study__counter {
		flex-wrap: wrap;
		margin-bottom: 40px;
	}

	.ed-case-study__counter-link {
		flex-basis: 100%;
		margin-left: 0;
	}

	.ed-case-study__grid {
		grid-template-columns: 1fr;
		row-gap: 48px;
		align-items: start;
	}

	.ed-case-study__copy {
		max-width: 100%;
		padding-right: 0;
	}

	.ed-case-study__title {
		font-size: clamp(2rem, 8.4vw, 2.875rem);
		max-width: 100%;
		margin-bottom: 24px;
	}

	.ed-case-study__lede {
		max-width: 100%;
		font-size: 16px;
	}

	.ed-case-study__project {
		grid-template-columns: 1fr;
		row-gap: 18px;
		margin-top: 48px;
	}

	.ed-case-study__visual,
	.ed-case-study__device {
		justify-self: start;
		max-width: 100%;
		margin-right: auto;
	}
}
