/* ==========================================================================
 * Études de cas — /realisations/<client>/ (class-etudes.php, migration 070).
 * Chargée seulement sur les pages qui portent [helala_etude].
 *
 * Deux registres : les bandes « client » (héros, scène, mesures) prennent les
 * couleurs du site livré, passées en variables par le rendu (--e-fond,
 * --e-accent…) ; le reste suit la marque Helala (DM Sans, Syne, encre #212934,
 * gris #5B6677, bleu pâle #F3F6FB). L'accent du client n'écrit jamais de petit
 * texte sur fond blanc : il décore.
 *
 * Mouvement (design-system/01-fondations/mouvement.md) : transform et opacity,
 * aucune boucle, rien d'invisible au chargement dans le héros, états de départ
 * posés seulement par le script (.he-js), mouvement réduit = fondu court.
 * ======================================================================= */

@font-face { font-family: "HE Outfit"; font-weight: 600 900; font-display: swap; src: url("fonts/etudes/outfit-latin.woff2") format("woff2"); }
@font-face { font-family: "HE Tilt Neon"; font-weight: 400; font-display: swap; src: url("fonts/etudes/tilt-neon-latin.woff2") format("woff2"); }
@font-face { font-family: "HE Playfair"; font-weight: 600 700; font-display: swap; src: url("fonts/etudes/playfair-display-latin.woff2") format("woff2"); }
@font-face { font-family: "HE Inter"; font-weight: 400 600; font-display: swap; src: url("fonts/etudes/inter-latin.woff2") format("woff2"); }
@font-face { font-family: "HE Cairo"; font-weight: 200 1000; font-display: swap; src: url("fonts/etudes/cairo-arabic.woff2") format("woff2"); unicode-range: U+0600-06FF, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "HE Cairo"; font-weight: 200 1000; font-display: swap; src: url("fonts/etudes/cairo-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "HE Poppins"; font-weight: 700; font-display: swap; src: url("fonts/etudes/poppins-700-latin.woff2") format("woff2"); }

.he {
	--he-encre: #212934;
	--he-gris: #5B6677;
	--he-marine: #213A62;
	--he-bleu: #2862BD;
	--he-pale: #F3F6FB;
	--he-trait: #E2E2E2;
	--he-rayon: 28px;
	--he-ease: cubic-bezier(.2, .7, .2, 1);
	color: var(--he-encre);
	max-width: 1200px;
	margin: 0 auto;
}
.he *, .he *::before, .he *::after { box-sizing: border-box; }
.he img { max-width: 100%; height: auto; display: block; }
.he h2 {
	font-size: clamp(26px, 3.1vw, 38px) !important;
	line-height: 1.15 !important;
	margin: 0 0 24px !important;
	letter-spacing: -.015em;
}
.he h3 { font-size: 19px !important; line-height: 1.3 !important; margin: 0 0 8px !important; }
.he p, .he li, .he dd { font-size: 17px; line-height: 1.65; }
.he ul, .he ol { list-style: none; margin: 0; padding: 0; }
.he-bloc { margin-top: 96px; }

/* --- 1. Héros ----------------------------------------------------------- */
.he-heros {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
	gap: 44px;
	align-items: center;
	padding: 64px 56px;
	border-radius: var(--he-rayon);
	background:
		radial-gradient(60% 70% at 85% 20%, color-mix(in srgb, var(--e-accent) 26%, transparent), transparent 70%),
		radial-gradient(50% 60% at 0% 100%, color-mix(in srgb, var(--e-accent2) 16%, transparent), transparent 70%),
		var(--e-fond);
	color: var(--e-encre);
	overflow: hidden;
	isolation: isolate;
}
.he-heros::before {
	/* Trame fine : la texture d'un plan de travail, pas un motif. */
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image: linear-gradient(color-mix(in srgb, var(--e-encre) 6%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--e-encre) 6%, transparent) 1px, transparent 1px);
	background-size: 44px 44px;
	mask-image: radial-gradient(70% 80% at 70% 40%, #000, transparent 75%);
}
.he-surtitre {
	font-size: 13px !important;
	letter-spacing: .14em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--e-accent);
	margin: 0 0 18px !important;
}
.he-surtitre a { color: inherit; text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--e-accent) 50%, transparent); }
.he-surtitre a:hover { border-bottom-color: currentColor; }
.he .he-h1 {
	color: var(--e-encre) !important;
	font-size: clamp(32px, 3.5vw, 48px) !important;
	line-height: 1.06 !important;
	letter-spacing: -.02em;
	margin: 0 0 22px !important;
	max-width: none !important;
}
.he .he-chapo { color: var(--e-doux); font-size: 18px; line-height: 1.6; margin: 0 0 24px; }
.he-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px !important; }
.he-tags li {
	font-size: 13px !important;
	line-height: 1 !important;
	padding: 9px 14px;
	border-radius: 999px;
	border: 1px solid color-mix(in srgb, var(--e-accent) 45%, transparent);
	background: color-mix(in srgb, var(--e-accent) 10%, transparent);
	color: var(--e-encre);
}
.he-heros-liens { margin: 0 !important; }
.he-bouton {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 50px;
	padding: 0 26px;
	border-radius: 999px;
	background: var(--e-accent);
	color: var(--e-fond) !important;
	font-weight: 700;
	text-decoration: none !important;
	transition: transform .2s, box-shadow .2s;
}
.he-bouton:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -10px var(--e-accent); }
.he-bouton:focus-visible { outline: 3px solid var(--e-encre); outline-offset: 3px; }

.he-ecrans { position: relative; padding: 0 0 48px 0; }
.he-navigateur {
	margin: 0;
	border-radius: 14px;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7), 0 0 0 1px color-mix(in srgb, var(--e-encre) 14%, transparent);
	transform: perspective(1400px) rotateY(-8deg) rotateX(3deg);
	transform-origin: left center;
	animation: he-pose-ecran 1.1s var(--he-ease) both;
}
.he-navigateur-barre {
	display: flex;
	align-items: center;
	gap: 6px;
	height: 30px;
	padding: 0 12px;
	background: #E9ECF1;
}
.he-navigateur-barre i { width: 9px; height: 9px; border-radius: 50%; background: #C9CED6; }
.he-navigateur-barre i:first-child { background: #FF6159; }
.he-navigateur-barre i:nth-child(2) { background: #FFBD2E; }
.he-navigateur-barre i:nth-child(3) { background: #28C941; }
.he-navigateur-barre b { margin-left: 10px; padding: 3px 12px; border-radius: 6px; background: #fff; font: 500 11px/1.4 system-ui, sans-serif; color: #5B6677; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.he-telephone {
	position: absolute;
	right: -6px;
	bottom: 0;
	width: 27%;
	margin: 0;
	border-radius: 26px;
	border: 6px solid #0C0C0E;
	overflow: hidden;
	background: #0C0C0E;
	box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8);
	transform: rotate(-4deg);
	animation: he-pose-telephone 1.3s .15s var(--he-ease) both;
}
@keyframes he-pose-ecran { from { transform: perspective(1400px) rotateY(-16deg) rotateX(6deg) translateY(20px); } }
@keyframes he-pose-telephone { from { transform: rotate(4deg) translateY(40px); } }
@supports (animation-timeline: view()) {
	.he-telephone { animation: he-pose-telephone 1.3s .15s var(--he-ease) both, he-flotte linear both; animation-timeline: auto, view(); animation-range: normal, exit 0% exit 100%; }
	@keyframes he-flotte { to { translate: 0 -40px; } }
}

/* --- 2. En bref --------------------------------------------------------- */
.he-bref dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; }
.he-bref dl > div { padding: 24px 26px; border-radius: 20px; background: var(--he-pale); border: 1px solid #E5EBF4; }
.he-bref dt { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--he-gris); margin-bottom: 8px; }
.he-bref dd { margin: 0; color: var(--he-encre); }

/* --- 3. Ce qui a été construit ------------------------------------------ */
.he-cartes { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 16px; }
.he-cartes li {
	position: relative;
	padding: 28px 26px;
	border-radius: 22px;
	background: #fff;
	border: 1px solid var(--he-trait);
	transition: transform .3s var(--he-ease), box-shadow .3s, border-color .3s;
}
.he-cartes li:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -24px rgba(33, 58, 98, .35); border-color: color-mix(in srgb, var(--e-accent) 60%, var(--he-trait)); }
.he-cartes p { color: var(--he-gris); margin: 0; font-size: 16px; }
.he-ico {
	width: 48px;
	height: 48px;
	padding: 11px;
	margin-bottom: 18px;
	border-radius: 14px;
	background: var(--e-fond);
	fill: none;
	stroke: var(--e-accent);
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: transform .3s var(--he-ease);
}
.he-cartes li:hover .he-ico { transform: rotate(-6deg) scale(1.06); }

/* --- 4. Scène WhatsApp -------------------------------------------------- */
.he-scene {
	margin-top: 96px;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 48px 56px;
	align-items: center;
	padding: 56px;
	border-radius: var(--he-rayon);
	background: radial-gradient(70% 90% at 100% 50%, color-mix(in srgb, var(--e-accent) 18%, transparent), transparent 70%), var(--e-fond);
	color: var(--e-encre);
}
.he-scene h2 { color: var(--e-encre) !important; }
.he-etapes { counter-reset: none; display: grid; gap: 12px; }
.he-etapes li {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 18px;
	border-radius: 16px;
	background: color-mix(in srgb, var(--e-encre) 5%, transparent);
	border: 1px solid color-mix(in srgb, var(--e-encre) 10%, transparent);
	color: var(--e-encre);
	font-size: 16px !important;
	transition: background-color .4s, border-color .4s, transform .4s var(--he-ease);
}
.he-num {
	flex: none;
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	font-weight: 800;
	font-size: 14px;
	background: color-mix(in srgb, var(--e-encre) 12%, transparent);
	color: var(--e-encre);
	transition: background-color .4s, color .4s;
}
.he-etapes li.he-on { background: color-mix(in srgb, var(--e-accent) 16%, transparent); border-color: color-mix(in srgb, var(--e-accent) 55%, transparent); transform: translateX(6px); }
.he-etapes li.he-on .he-num { background: var(--e-accent); color: var(--e-fond); }
.he-rejouer {
	margin-top: 20px;
	padding: 10px 18px;
	border-radius: 999px;
	border: 1px solid color-mix(in srgb, var(--e-encre) 30%, transparent);
	background: transparent;
	color: var(--e-encre);
	font: inherit;
	font-size: 14px;
	cursor: pointer;
}
.he-rejouer:hover { border-color: var(--e-accent); color: var(--e-accent); }
.he-rejouer:focus-visible { outline: 3px solid var(--e-accent); outline-offset: 3px; }

.he-mobile {
	border-radius: 34px;
	border: 8px solid #050506;
	background: #0B141A;
	overflow: hidden;
	box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8);
	min-height: 440px;
	display: flex;
	flex-direction: column;
}
.he-mobile-tete { display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px; background: #202C33; color: #E9EDEF; }
.he-mobile-tete svg { width: 26px; height: 26px; color: #25D366; flex: none; }
.he-mobile-tete b { font-size: 15px; }
.he-mobile-tete small { margin-left: auto; font-size: 11px; color: #8696A0; }
.he-fil {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 10px;
	padding: 18px 14px 22px;
	background-color: #0B141A;
	background-image: radial-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px);
	background-size: 14px 14px;
}
.he-ecrit { align-self: flex-end; display: none; gap: 4px; padding: 12px 14px; border-radius: 14px; background: #005C4B; margin: 0; }
.he-ecrit i { width: 7px; height: 7px; border-radius: 50%; background: #9FD8CB; }
.he-message {
	position: relative;
	align-self: flex-end;
	max-width: 92%;
	margin: 0;
	padding: 10px 12px 20px;
	border-radius: 14px 14px 4px 14px;
	background: #005C4B;
	color: #E9EDEF;
	font-size: 14px !important;
	line-height: 1.5 !important;
	box-shadow: 0 2px 2px rgba(0, 0, 0, .25);
}
.he-message b { color: #fff; }
.he-message [dir="rtl"] { display: block; font-family: "HE Cairo", sans-serif; font-size: 16px; text-align: right; }
.he-heure { position: absolute; right: 10px; bottom: 4px; font-size: 11px; color: #53BDEB; letter-spacing: -2px; }
.he-barre { display: inline-block; vertical-align: middle; width: 3.4em; height: .62em; border-radius: 4px; background: rgba(233, 237, 239, .35); }
.he-scene-note { grid-column: 1 / -1; margin: 0 !important; font-size: 14px !important; color: var(--e-doux); }

/* --- 5. Identité -------------------------------------------------------- */
.he-intro { max-width: 760px; color: var(--he-gris); margin: 0 0 36px !important; }
.he-charte { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.he-palette, .he-polices { padding: 28px; border-radius: 22px; border: 1px solid var(--he-trait); background: #fff; }
.he-palette { display: flex; flex-wrap: wrap; gap: 22px 18px; align-content: flex-start; }
.he-palette li { display: grid; justify-items: center; gap: 4px; width: 92px; text-align: center; }
.he-pastille {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	background: var(--c);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08), 0 14px 26px -14px var(--c);
	margin-bottom: 6px;
	transition: transform .3s var(--he-ease);
}
.he-palette li:hover .he-pastille { transform: translateY(-4px) scale(1.06); }
.he-palette b { font-size: 13px; line-height: 1.3; color: var(--he-encre); }
.he-palette code { font-size: 12px; color: var(--he-gris); background: none; padding: 0; }
.he-polices { display: grid; gap: 18px; }
.he-polices li { display: grid; gap: 2px; padding-bottom: 16px; border-bottom: 1px dashed var(--he-trait); }
.he-polices li:last-child { border-bottom: 0; padding-bottom: 0; }
.he-specimen { font-size: 34px; line-height: 1.15; color: var(--he-encre); }
.he-polices small { font-size: 13px; color: var(--he-gris); }
.he-police-outfit { font-family: "HE Outfit", sans-serif; font-weight: 900; text-transform: uppercase; letter-spacing: -.01em; }
.he-police-tilt-neon { font-family: "HE Tilt Neon", sans-serif; color: #FF6A1A; text-shadow: 0 0 18px rgba(255, 106, 26, .45); }
.he-police-playfair-display { font-family: "HE Playfair", serif; font-weight: 700; }
.he-police-inter { font-family: "HE Inter", sans-serif; font-weight: 500; }
.he-police-cairo { font-family: "HE Cairo", sans-serif; font-weight: 800; text-align: right; }
.he-police-poppins { font-family: "HE Poppins", sans-serif; font-weight: 700; }
.he--hamza-detailing .he-police-outfit { text-transform: none; font-weight: 800; }

.he-visuels { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 20px; }
.he-visuels figure {
	margin: 0;
	display: grid;
	grid-template-rows: 1fr auto;
	border-radius: 22px;
	overflow: hidden;
	background: radial-gradient(80% 80% at 50% 30%, color-mix(in srgb, var(--e-accent) 14%, transparent), transparent 70%), var(--e-fond);
}
.he-visuels img { width: 100%; height: 240px; object-fit: contain; padding: 26px; transition: transform .5s var(--he-ease); }
.he-visuels figure:hover img { transform: scale(1.05); }
.he-visuels figcaption { padding: 12px 18px; font-size: 13px; color: var(--e-encre); background: color-mix(in srgb, var(--e-encre) 8%, var(--e-fond)); }
.he--ouafae-services .he-visuels figure { background: #FBF7EC; }
.he--ouafae-services .he-visuels figcaption { background: #EFE3CB; color: #3B4A3B; }

/* Imprimés de Naghma : la carte se retourne, les stickers se posent. */
.he-imprimes { margin-top: 28px; padding: 40px; border-radius: var(--he-rayon); background: radial-gradient(60% 70% at 50% 40%, rgba(201, 162, 75, .2), transparent 70%), var(--e-fond); color: var(--e-encre); }
.he-imprimes h3 { color: var(--e-encre) !important; font-size: 24px !important; }
.he-imprimes > p { color: var(--e-doux); max-width: 720px; margin: 0 0 32px !important; font-size: 16px; }
.he-imprimes-scene { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 36px 28px; align-items: center; }
.he-carte-flip {
	grid-column: 1 / 4;
	display: grid;
	gap: 12px;
	justify-items: center;
	padding: 0;
	border: 0;
	background: none;
	color: var(--e-doux);
	cursor: pointer;
	perspective: 1600px;
	font: inherit;
}
.he-carte-flip small { font-size: 13px; }
.he-carte-flip:focus-visible { outline: 3px solid var(--e-accent); outline-offset: 8px; border-radius: 8px; }
.he-carte-in { position: relative; display: block; width: 100%; aspect-ratio: 85 / 55; transform-style: preserve-3d; transition: transform .9s var(--he-ease); }
.he-carte-flip[aria-pressed="true"] .he-carte-in { transform: rotateY(180deg); }
.he-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 10px; overflow: hidden; box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .85), 0 0 0 1px rgba(201, 162, 75, .25); }
.he-verso { transform: rotateY(180deg); }
.he-face img { width: 100%; height: 100%; object-fit: cover; }
.he-imp { margin: 0; display: grid; gap: 10px; justify-items: center; }
.he-imp img { filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .6)); transition: transform .4s var(--he-ease); }
.he-imp:hover img { transform: rotate(0deg) scale(1.04) !important; }
.he-imp figcaption { font-size: 13px; color: var(--e-doux); }
.he-imp-ar { grid-column: 4 / 7; }
.he-imp-ar img { border-radius: 10px; transform: rotate(3deg); width: 92%; }
.he-imp-rond { grid-column: span 1; }
.he-imp-rond img { width: 100%; max-width: 220px; transform: rotate(-8deg); }
.he-imp-rond2 img { transform: rotate(7deg); }
.he-imp-rond:not(.he-imp-rond2) { grid-column: 1 / 3; }
.he-imp-rond2 { grid-column: 3 / 5; }
.he-imp-maint { grid-column: 5 / 7; }
.he-imp-maint img { width: 100%; transform: rotate(-2deg); }

/* --- 6. Vente ----------------------------------------------------------- */
.he-vente ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.he-vente li {
	position: relative;
	padding: 30px 28px 28px;
	border-radius: 22px;
	background: var(--he-pale);
	overflow: hidden;
}
.he-vente li::after { content: ""; position: absolute; left: 28px; right: 28px; top: 0; height: 4px; border-radius: 0 0 4px 4px; background: var(--e-accent); transform-origin: left; transition: transform .6s var(--he-ease); }
.he-vente .he-num { width: auto; height: auto; display: block; background: none; border-radius: 0; font-size: 44px; line-height: 1; font-weight: 800; color: var(--he-marine); opacity: .18; margin-bottom: 14px; }
.he-vente p { margin: 0; color: var(--he-gris); font-size: 16px; }

/* --- 7. Technique ------------------------------------------------------- */
.he-tech ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 32px; }
.he-tech li { position: relative; padding-left: 34px; color: var(--he-encre); }
.he-tech li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .35em;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--he-bleu) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

/* --- 8. Mesures --------------------------------------------------------- */
.he-mesures { padding: 56px; border-radius: var(--he-rayon); background: var(--e-fond); color: var(--e-encre); }
.he-mesures h2 { color: var(--e-encre) !important; }
.he-mesures dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0; }
.he-mesures dl > div { padding: 24px 22px; border-radius: 20px; background: color-mix(in srgb, var(--e-encre) 6%, transparent); border: 1px solid color-mix(in srgb, var(--e-encre) 10%, transparent); }
.he-mesures dt { font-size: 13px; line-height: 1.4; color: var(--e-doux); margin-bottom: 14px; min-height: 2.8em; }
.he-mesures dd { margin: 0; color: var(--e-encre); }
.he-mesures strong { font-size: clamp(30px, 3.4vw, 44px); line-height: 1; font-weight: 800; color: var(--e-accent); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.he-mesures dd > span { font-size: 16px; color: var(--e-doux); }
.he-mesures .he-sep { font-size: .45em; font-weight: 600; color: var(--e-doux); }
.he-comparaison { display: grid; gap: 18px; margin-top: 28px; padding: 26px; border-radius: 20px; background: color-mix(in srgb, var(--e-encre) 5%, transparent); }
.he-comp-ligne { display: grid; grid-template-columns: 80px 1fr; gap: 8px 16px; align-items: center; }
.he-comp-titre { grid-row: span 2; font-weight: 700; color: var(--e-encre); }
.he-comp-barre { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 12px; height: 36px; padding: 0 14px; border-radius: 10px; width: max(var(--l), 220px); font-size: 14px; overflow: hidden; transform-origin: left; transition: transform 1.1s var(--he-ease); }
.he-comp-barre b { font-weight: 600; white-space: nowrap; }
.he-comp-barre em { font-style: normal; font-weight: 700; white-space: nowrap; }
.he-comp-avant { background: color-mix(in srgb, var(--e-encre) 14%, transparent); color: var(--e-encre); }
.he-comp-apres { background: var(--e-accent); color: var(--e-fond); }
.he .he-note { margin: 18px 0 0 !important; font-size: 14px !important; color: var(--e-doux); }

/* --- 9 à 11. Suite, autres réalisations, appel, fraîcheur --------------- */
.he-suite p { max-width: 760px; color: var(--he-gris); }
.he-autres ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.he-autres li a { position: relative; display: block; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--e-fond); text-decoration: none !important; isolation: isolate; }
.he-autres img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s var(--he-ease); z-index: -1; }
.he-autres li a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, color-mix(in srgb, var(--e-fond) 92%, transparent) 78%); z-index: -1; }
.he-autres span { position: absolute; left: 22px; right: 22px; bottom: 20px; display: grid; gap: 4px; }
.he-autres small { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--e-accent); }
.he-autres b { font-size: 22px; color: #fff; }
.he-autres li a:hover img { transform: scale(1.06); }
.he-autres li a:focus-visible { outline: 3px solid var(--he-bleu); outline-offset: 3px; }
.he-autres > p { margin-top: 20px !important; }
.he-autres > p a { font-weight: 700; color: var(--he-bleu); }
.he .he-cta { max-width: none; margin-top: 96px; }
.he-maj { margin-top: 28px !important; font-size: 13px !important; color: var(--he-gris); }

/* --- Apparitions au défilement (posées par etudes.js) -------------------- */
.he-js .he-attente { opacity: 0; transform: translateY(28px); }
.he-js .he-attente :is(.he-cartes li, .he-vente li, .he-palette li, .he-visuels figure, .he-autres li) { opacity: 0; transform: translateY(18px); }
.he-js .he-attente .he-vente li::after { transform: scaleX(0); }
.he-js .he-vu { opacity: 1; transform: none; transition: opacity .6s var(--he-ease), transform .6s var(--he-ease); }
.he-js .he-vu :is(.he-cartes li, .he-vente li, .he-palette li, .he-visuels figure, .he-autres li) { opacity: 1; transform: none; transition: opacity .5s var(--he-ease), transform .5s var(--he-ease), box-shadow .3s, border-color .3s; transition-delay: calc(min(var(--i, 0), 6) * 80ms); }
.he-js .he-vu .he-vente li::after { transition-delay: calc(var(--i, 0) * 120ms + 300ms); }
.he-js .he-mesures.he-attente .he-comp-barre { transform: scaleX(.05); }
.he-js .he-mesures.he-vu .he-comp-barre { transform: none; }
.he-js .he-mesures.he-vu .he-comp-apres { transition-delay: .5s; }

/* Imprimés : posés l'un après l'autre. */
.he-js .he-identite.he-attente .he-imp { opacity: 0; transform: translateY(-30px) rotate(-6deg); }
.he-js .he-identite.he-vu .he-imp { opacity: 1; transform: none; transition: opacity .5s, transform .8s cubic-bezier(.3, 1.4, .5, 1); }
.he-js .he-identite.he-vu .he-imp:nth-child(2) { transition-delay: .25s; }
.he-js .he-identite.he-vu .he-imp:nth-child(3) { transition-delay: .4s; }
.he-js .he-identite.he-vu .he-imp:nth-child(4) { transition-delay: .55s; }
.he-js .he-identite.he-vu .he-imp:nth-child(5) { transition-delay: .7s; }

/* Scène : en attente, la bulle est cachée et les étapes éteintes. */
.he-js .he-scene.he-joue .he-message { opacity: 0; transform: translateY(14px) scale(.96); transform-origin: bottom right; }
.he-js .he-scene.he-ecriture .he-ecrit { display: flex; }
.he-js .he-scene.he-ecriture .he-ecrit i { animation: he-point .9s ease-in-out 3; }
.he-js .he-scene.he-ecriture .he-ecrit i:nth-child(2) { animation-delay: .15s; }
.he-js .he-scene.he-ecriture .he-ecrit i:nth-child(3) { animation-delay: .3s; }
.he-js .he-scene.he-envoye .he-message { opacity: 1; transform: none; transition: opacity .45s, transform .55s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes he-point { 50% { transform: translateY(-4px); opacity: .5; } }

/* --- Mobile ------------------------------------------------------------- */
@media (max-width: 1024px) {
	.he-heros { grid-template-columns: 1fr; padding: 44px 32px; }
	.he-scene { grid-template-columns: 1fr; padding: 40px 28px; }
	.he-mobile { max-width: 340px; width: 100%; justify-self: center; }
	.he-mesures dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.he-charte { grid-template-columns: 1fr; }
	.he-imprimes-scene { grid-template-columns: 1fr 1fr; }
	.he-carte-flip, .he-imp-ar, .he-imp-maint { grid-column: 1 / -1 !important; max-width: 520px; justify-self: center; width: 100%; }
	.he-imp-rond:not(.he-imp-rond2) { grid-column: 1 / 2; }
	.he-imp-rond2 { grid-column: 2 / 3; }
}
@media (max-width: 640px) {
	.he-bloc, .he-scene, .he .he-cta { margin-top: 64px; }
	.he-heros { padding: 32px 20px; border-radius: 22px; }
	.he-scene, .he-mesures, .he-imprimes { padding: 32px 20px; border-radius: 22px; }
	.he-bref dl, .he-tech ul, .he-autres ul { grid-template-columns: 1fr; }
	.he-mesures dl { grid-template-columns: 1fr 1fr; gap: 10px; }
	.he-mesures dl > div { padding: 18px 16px; }
	.he-palette li { width: 78px; }
	.he-pastille { width: 60px; height: 60px; }
	.he-specimen { font-size: 28px; }
	.he-navigateur { transform: none; animation: none; }
	.he-comp-ligne { grid-template-columns: 1fr; }
	.he-comp-titre { grid-row: auto; }
	.he-comp-barre { width: max(var(--l), 190px); }
}

/* --- Revue visuelle du 12 oct. (tour 1) ------------------------------- */
/* « .he ul » (0,1,1) annulait le padding des cartes palette et polices (0,1,0) :
 * spécimens et pastilles touchaient la bordure. */
.he .he-palette, .he .he-polices { padding: 28px; }
.he .he-polices .he-police-cairo { padding-inline-end: 0; }
.he-charte { align-items: stretch; gap: 24px; }
.he-pastille { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .14), 0 14px 26px -14px var(--c); }
/* Le héros ne colle plus à l'en-tête. */
.he-heros { margin-top: 32px; }
/* Gouttières : 16–18 px → 24 px. */
.he-bref dl, .he-cartes, .he-visuels { gap: 24px; }
@media (max-width: 640px) {
	.he .he-palette, .he .he-polices { padding: 20px; }
	.he-heros { margin-top: 16px; }
	.he-surtitre { margin-bottom: 8px !important; }
	.he-ico { margin-bottom: 12px; }
	.he-bref dl, .he-cartes, .he-visuels { gap: 16px; }
}

/* --- Tour 2 ---------------------------------------------------------- */
/* Rail des autres réalisations : la légende chevauchait le texte des
 * captures et le surtitre Ouafae tombait à ≈ 2,2:1 sur son vert clair. Voile
 * sombre commun, quel que soit le thème du client ; surtitre en blanc doux. */
.he-autres li a::after { background: linear-gradient(180deg, transparent 22%, rgba(12, 16, 24, .80) 56%, rgba(12, 16, 24, .94) 80%); }
.he-autres small { color: rgba(255, 255, 255, .86); }
/* Une seule gouttière partout. */
.he-vente ol, .he-autres ul, .he-mesures dl { gap: 24px; }
/* Palette centrée, libellés réservés sur deux lignes ; typographies sans
 * vide entre spécimen et légende. */
.he .he-palette { justify-content: center; align-content: center; align-items: start; }
.he-palette b { min-height: 2.6em; }
.he .he-polices { align-content: space-evenly; }
.he-polices li { align-content: start; }
/* « Ce qui a été construit » : textes d'une rangée alignés. */
@media (min-width: 641px) {
	.he-cartes li { display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 0; align-content: start; }
}
@media (max-width: 640px) {
	.he-vente ol, .he-autres ul, .he-mesures dl { gap: 16px; }
	.he .he-cta .helala-etude-lien-clair { text-align: left; margin-inline-start: 0; }
	.he .he-maj { margin-bottom: 0 !important; }
}

/* --- Décisions du 12 oct. (Bachir : « choisis ce qui est le mieux ») --- */
/* Un appel vers Helala dès le héros : le seul bouton menait chez le client. */
.he .he-heros-liens { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }
.he-lien-audit { color: var(--e-encre) !important; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, var(--e-accent) 70%, transparent); }
.he-lien-audit:hover { text-decoration-color: currentColor; }
/* Palette de six couleurs : 3 + 3 plutôt que 5 + 1 orpheline. */
.he .he-palette:has(> li:nth-child(6):last-child) > li { width: calc((100% - 36px) / 3); }
/* Logo Ouafae : le fichier porte un blanc à gauche ; l'encre est recentrée. */
.he--ouafae-services .he-visuels figure:nth-child(2) img { translate: -16% 0; }

/* --- Mouvement réduit : le fondu reste, le déplacement tombe ------------- */
@media (prefers-reduced-motion: reduce) {
	.he *, .he *::before, .he *::after { animation: none !important; }
	.he-js .he-attente, .he-js .he-attente * { transform: none !important; }
	.he-js .he-vu, .he-js .he-vu * { transition-duration: .15s !important; transition-delay: 0s !important; }
	.he-navigateur { transform: none; }
	.he-telephone { transform: none; }
	.he-carte-in { transition: none; }
}
