/**
 * Page « Le projet » — Asonha (direction « Canopy », palette Bleu & Vert).
 *
 * Portage fidèle du prototype (classes ip-hero / ipj-* → cn-projet-*).
 * Réutilise les variables, utilitaires (.wrap, .kicker, .lede) et l'animation
 * .reveal de main.css. Style appliqué au front comme à l'aperçu du bloc dans
 * l'éditeur (SSR).
 *
 * À ne pas confondre avec les classes .cn-project / .cn-proj-* de home.css,
 * qui habillent la *section* « Le projet » de la page d'accueil.
 *
 * Sept sections, dans l'ordre du rendu :
 *   1. héros en pleine largeur sur image assombrie ;
 *   2. présentation : frise des quatre phases ;
 *   3. l'aménagement : caractéristiques + panneau vert « le site » ;
 *   4. la construction : jauge d'avancement + frise des jalons ;
 *   5. avant / après : deux vues du chantier ;
 *   6. les ouvrages : cartes illustrées ;
 *   7. l'exploitation : cartes sur fond vert profond.
 *
 * Deux états sont pilotés par le contenu (et non par un nth-child figé comme
 * dans la maquette) : .is-current sur la phase en cours et sur le dernier
 * ouvrage de la cascade, .is-done sur les jalons atteints.
 */

/* ================================ 1. Héros ============================== */

.cn-projet-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: clamp(70px, 12vw, 140px) 0 clamp(48px, 7vw, 86px);
}

.cn-projet-hero-bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	z-index: -2;
}

.cn-projet-hero::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(160deg, rgba(10, 28, 34, .5), rgba(10, 28, 34, .22));
}

/* Sans image choisie, le dégradé seul serait presque transparent : on pose un
 * aplat sombre de repli pour que le texte blanc reste lisible. */
.cn-projet-hero:not(:has(.cn-projet-hero-bg)) {
	background: var(--forest);
}

.cn-projet-hero .wrap { position: relative; }

.cn-projet-hero .kicker { color: #fff; }
.cn-projet-hero .kicker::before { background: var(--lime); }

.cn-projet-hero h1 {
	color: #fff;
	font-size: clamp(2.4rem, 5.2vw, 4rem);
	margin-top: 16px;
	max-width: 16ch;
}

.cn-projet-hero .lede {
	color: rgba(255, 255, 255, .86);
	margin-top: 18px;
	max-width: 60ch;
}

/* ==================== En-tête de section (partagé) ====================== */

.cn-projet-sec-head {
	max-width: 760px;
	margin-bottom: clamp(28px, 4vw, 44px);
}

.cn-projet-sec-head h2 {
	font-size: clamp(1.6rem, 2.8vw, 2.4rem);
	letter-spacing: -.02em;
	margin-top: 14px;
}

.cn-projet-sec-head p {
	font-size: 1.02rem;
	line-height: 1.7;
	color: var(--ink-soft);
	margin-top: 16px;
}

/* Variante posée sur fond vert profond (section « exploitation »). */
.cn-projet-sec-head-light .kicker { color: #fff; }
.cn-projet-sec-head-light .kicker::before { background: #fff; }

/* ===================== 2. Présentation (frise) ========================== */

/* Le prototype laisse cette section sur le fond beige de la page ; la
 * « feuille » Canopy du thème étant blanche, on teinte explicitement. */
.cn-projet-intro {
	padding: clamp(40px, 6vw, 76px) 0;
	background: var(--bg);
}

.cn-projet-intro .kicker { color: var(--lime); }
.cn-projet-intro .kicker::before { background: var(--lime); }

.cn-projet-frise {
	list-style: none;
	margin: clamp(24px, 3vw, 34px) 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: clamp(14px, 2vw, 22px);
}

.cn-projet-fr {
	position: relative;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 18px;
	padding: 22px 20px;
}

.cn-projet-fr.is-current {
	border-color: var(--lime);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 12%, transparent);
}

.cn-projet-fr-top {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
}

.cn-projet-fr-ic {
	flex: none;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 13px;
	background: rgba(13, 101, 130, .1);
	color: var(--lime);
}

.cn-projet-fr-ic svg { width: 24px; height: 24px; }

.cn-projet-fr.is-current .cn-projet-fr-ic {
	background: var(--lime);
	color: #fff;
}

.cn-projet-fr-line {
	flex: 1;
	height: 2px;
	border-radius: 2px;
	background: var(--line);
}

.cn-projet-fr:last-child .cn-projet-fr-line { display: none; }

.cn-projet-fr-yr {
	display: block;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .08em;
	color: var(--muted);
}

.cn-projet-fr b {
	display: block;
	font-family: var(--font-display);
	font-size: 1.2rem;
	letter-spacing: -.01em;
	color: var(--lime);
	margin-top: 4px;
}

.cn-projet-fr-d {
	display: block;
	font-size: .92rem;
	line-height: 1.55;
	color: var(--ink-soft);
	margin-top: 8px;
}

/* ======================== 3. L'aménagement ============================== */

.cn-projet-tech {
	padding: clamp(40px, 6vw, 76px) 0;
	background: var(--surface);
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
}

.cn-projet-tech-intro {
	max-width: 70ch;
	margin-top: 12px;
	font-size: .92rem;
	line-height: 1.6;
	color: var(--muted);
}

.cn-projet-tech-grid {
	display: grid;
	grid-template-columns: 1.1fr .9fr;
	gap: clamp(28px, 4vw, 56px);
	align-items: start;
}

/* ---- Caractéristiques techniques ---- */

.cn-projet-specs {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 10px;
}

.cn-projet-specs li {
	display: flex;
	align-items: baseline;
	gap: 16px;
	background: var(--bg);
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 14px 18px;
}

.cn-projet-specs b {
	font-family: var(--font-display);
	font-size: 1.08rem;
	color: var(--forest);
	flex: none;
	min-width: 130px;
}

.cn-projet-specs span {
	font-size: .94rem;
	color: var(--ink-soft);
	line-height: 1.45;
}

/* ---- Panneau « le site » : la cascade des trois barrages ---- */

.cn-projet-site {
	background: var(--forest);
	color: #eef3e9;
	border-radius: 20px;
	padding: clamp(24px, 3vw, 34px);
}

.cn-projet-site h3 {
	color: #fff;
	font-size: 1.15rem;
	letter-spacing: -.01em;
}

.cn-projet-cascade {
	list-style: none;
	margin: 22px 0 0;
	padding: 0;
	position: relative;
}

.cn-projet-cascade::before {
	content: '';
	position: absolute;
	left: 6px;
	top: 10px;
	bottom: 10px;
	width: 2px;
	background: rgba(255, 255, 255, .2);
}

.cn-projet-cascade li {
	position: relative;
	padding: 0 0 18px 28px;
}

.cn-projet-cascade li:last-child { padding-bottom: 0; }

.cn-projet-cascade-dot {
	position: absolute;
	left: 0;
	top: 5px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .3);
}

.cn-projet-cascade .is-current .cn-projet-cascade-dot {
	background: #fff;
	box-shadow: 0 0 0 4px rgba(255, 255, 255, .22);
}

.cn-projet-cascade b {
	display: block;
	color: #fff;
	font-size: 1rem;
}

.cn-projet-cascade span {
	display: block;
	font-size: .86rem;
	color: rgba(238, 243, 233, .75);
	margin-top: 3px;
}

.cn-projet-site-note {
	font-size: .84rem;
	color: rgba(238, 243, 233, .7);
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid rgba(255, 255, 255, .16);
	line-height: 1.5;
}

/* ---- Notes complémentaires (facultatives) ---- */

.cn-projet-notes {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 22px;
}

.cn-projet-note {
	font-size: .9rem;
	color: var(--ink-soft);
	background: var(--bg);
	border: 1px solid var(--line);
	border-left: 3px solid var(--forest);
	border-radius: 10px;
	padding: 11px 16px;
}

/* ======================== 4. La construction ============================ */

/* Sections « construction » et « ouvrages » : fond beige de la page. */
.cn-projet-works {
	padding: clamp(40px, 6vw, 76px) 0;
	background: var(--bg);
}

.cn-projet-works .kicker { color: var(--lime); }
.cn-projet-works .kicker::before { background: var(--lime); }

.cn-projet-progress {
	margin-top: clamp(32px, 4vw, 52px);
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 24px;
	padding: clamp(24px, 3vw, 38px);
}

.cn-projet-prog-head h3 {
	font-size: 1.35rem;
	letter-spacing: -.01em;
	margin-top: 12px;
}

.cn-projet-prog-bar { margin-top: 22px; }

.cn-projet-prog-top {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	font-size: .92rem;
	color: var(--muted);
	margin-bottom: 10px;
}

.cn-projet-prog-top b {
	font-family: var(--font-display);
	font-size: 1.6rem;
	color: var(--lime);
}

.cn-projet-bar {
	height: 10px;
	border-radius: 99px;
	background: var(--bg);
	border: 1px solid var(--line);
	overflow: hidden;
}

.cn-projet-bar i {
	display: block;
	height: 100%;
	border-radius: 99px;
	background: linear-gradient(90deg, #0a4d66, var(--lime));
}

/* ---- Frise des jalons ---- */

.cn-projet-miles {
	list-style: none;
	margin: 28px 0 0;
	padding: 26px 0 0;
	border-top: 1px solid var(--line);
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 18px;
}

.cn-projet-miles li {
	position: relative;
	padding-top: 20px;
}

/* Trait et pastille : gris par défaut, colorés sur les jalons atteints. */
.cn-projet-miles li::before {
	content: '';
	position: absolute;
	top: 5px;
	left: 0;
	right: 0;
	height: 2px;
	background: var(--line);
}

.cn-projet-miles li::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--line);
}

.cn-projet-miles li.is-done::before,
.cn-projet-miles li.is-done::after {
	background: var(--lime);
}

.cn-projet-miles b {
	display: block;
	font-family: var(--font-display);
	font-size: 1.1rem;
	color: var(--lime);
}

.cn-projet-miles span {
	display: block;
	font-size: .88rem;
	line-height: 1.5;
	color: var(--ink-soft);
	margin-top: 6px;
}

/* ========================= 5. Avant / après ============================= */

.cn-projet-compare {
	padding: clamp(40px, 6vw, 76px) 0;
	background: var(--surface);
	border-top: 1px solid var(--line);
}

.cn-projet-compare .kicker {
	color: #6a872b;
	background-color: #eaeee2;
}

.cn-projet-compare .kicker::before { background: #6a872b; }

.cn-projet-compare-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: clamp(18px, 2.4vw, 28px);
}

.cn-projet-shot { margin: 0; }

.cn-projet-shot-img {
	position: relative;
	aspect-ratio: 4 / 3;
	border-radius: 20px;
	overflow: hidden;
	background: var(--bg);
	border: 1px solid var(--line);
}

.cn-projet-shot-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.cn-projet-shot figcaption {
	display: flex;
	align-items: baseline;
	gap: 14px;
	margin-top: 16px;
}

.cn-projet-shot figcaption b {
	font-family: var(--font-display);
	font-size: 1.6rem;
	letter-spacing: -.02em;
	color: #4d7d46;
	flex: none;
}

.cn-projet-shot figcaption span {
	font-size: .96rem;
	color: var(--ink-soft);
	line-height: 1.5;
}

/* ========================== 6. Les ouvrages ============================= */

.cn-projet-works-t {
	font-size: clamp(1.4rem, 2.4vw, 2rem);
	letter-spacing: -.02em;
	/* Marge haute reprise du prototype : elle sépare « Les ouvrages » du bloc
	 * d'avancement de la section précédente, qui est contiguë. */
	margin: clamp(36px, 5vw, 56px) 0 clamp(20px, 2.6vw, 28px);
}

.cn-projet-works-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 18px;
}

.cn-projet-work {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 20px;
	overflow: hidden;
	transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s;
}

.cn-projet-work:hover {
	transform: translateY(-4px);
	box-shadow: 0 24px 54px -34px rgba(10, 24, 16, .5);
}

.cn-projet-work-img {
	position: relative;
	aspect-ratio: 16 / 10;
	background: var(--bg);
	border-bottom: 1px solid var(--line);
}

.cn-projet-work-img img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.cn-projet-work-body { padding: clamp(22px, 2.4vw, 28px); }

.cn-projet-work-ic {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: 14px;
	background: rgba(13, 101, 130, .1);
	color: var(--lime);
}

.cn-projet-work-ic svg { width: 28px; height: 28px; }

.cn-projet-work h3 {
	font-size: 1.12rem;
	letter-spacing: -.01em;
	margin-top: 16px;
}

.cn-projet-work p {
	font-size: .94rem;
	line-height: 1.6;
	color: var(--ink-soft);
	margin-top: 10px;
}

/* ========================= 7. L'exploitation ============================ */

.cn-projet-ops {
	padding: clamp(44px, 6vw, 84px) 0 clamp(56px, 8vw, 100px);
	background: var(--forest);
	color: #eef3e9;
}

.cn-projet-ops .cn-projet-sec-head h2 { color: #fff; }
.cn-projet-ops .cn-projet-sec-head p { color: rgba(238, 243, 233, .82); }

.cn-projet-ops-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

.cn-projet-op {
	background: rgba(255, 255, 255, .07);
	border: 1px solid rgba(255, 255, 255, .14);
	border-radius: 18px;
	padding: 24px;
}

.cn-projet-op-ic {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: 14px;
	background: rgba(255, 255, 255, .12);
	border: 1px solid rgba(255, 255, 255, .2);
	color: #fff;
}

.cn-projet-op-ic svg { width: 28px; height: 28px; }

.cn-projet-op b {
	display: block;
	color: #fff;
	font-size: 1.08rem;
	margin-top: 16px;
	letter-spacing: -.01em;
}

.cn-projet-op-t {
	display: block;
	font-size: .92rem;
	line-height: 1.6;
	color: rgba(238, 243, 233, .78);
	margin-top: 8px;
}

/* ============================== Responsive ============================== */

@media (max-width: 1000px) {
	.cn-projet-frise { grid-template-columns: repeat(2, 1fr); }
	.cn-projet-fr:nth-child(2n) .cn-projet-fr-line { display: none; }
	.cn-projet-works-grid { grid-template-columns: repeat(2, 1fr); }
	.cn-projet-ops-grid { grid-template-columns: repeat(2, 1fr); }
	.cn-projet-miles { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
	.cn-projet-tech-grid { grid-template-columns: 1fr; gap: 28px; }
	.cn-projet-frise { grid-template-columns: 1fr; gap: 22px; }
	.cn-projet-fr-line { display: none; }
	.cn-projet-compare-grid { grid-template-columns: 1fr; }
	.cn-projet-works-grid { grid-template-columns: 1fr; }
	.cn-projet-ops-grid { grid-template-columns: 1fr; }
	.cn-projet-miles { grid-template-columns: 1fr; }
	.cn-projet-specs li { flex-direction: column; gap: 4px; }
	.cn-projet-specs b { min-width: 0; }
}
