/* JS – Étapes — v1.1.0
 * Architecture anti-débordement de la suite. Frise : connecteurs pointillés
 * ENTRE les marqueurs (jamais après le dernier), bascule en fil vertical
 * ≤767px portée par le plugin. Accent en dégradé statique un seul span
 * (sûr Safari). AA sur les trois designs.
 */

@font-face {
	font-family: 'Dancing Script JS';
	src: url('../fonts/dancing-script-js-600.woff2') format('woff2');
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'Dancing Script JS';
	src: url('../fonts/dancing-script-js-700.woff2') format('woff2');
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

.js-e {
	--js-pad-x: 0px;
	--js-e-accent: #4a7326;
	--js-e-accent2: #3e6d2c;
	--js-e-soft: #eaf2df;
	--js-e-title: #000101;
	--js-e-text: #5b6a56;
	--js-e-connector: rgba(0,1,1, .16);

	position: relative;
	max-width: 100%;
	overflow-x: clip;
	padding-left: var(--js-pad-x);
	padding-right: var(--js-pad-x);
	font-family: 'Noto Sans', sans-serif;
	color: var(--js-e-text);
}
.js-e :where(h1, h2, h3, h4, h5, h6, p, ol, ul, li) {
	margin: 0; padding: 0; letter-spacing: normal; text-transform: none; clear: none;
	list-style: none;
}
.js-e :where(*) { min-width: 0; }
.js-e :where(p, span, li) { overflow-wrap: anywhere; }

.js-e--sauge { background: #f1f5ec; border-radius: 26px; padding-top: 54px; padding-bottom: 54px; }
.js-e--sauge:not([style*="--js-pad-x"]) { --js-pad-x: 34px; }
.js-e--nuit {
	background: linear-gradient(160deg, #000101, #0d1a0b);
	border-radius: 26px;
	padding-top: 54px;
	padding-bottom: 54px;
	color: #c3cbbd;
	--js-e-connector: rgba(255, 255, 255, .2);
}
.js-e--nuit:not([style*="--js-pad-x"]) { --js-pad-x: 34px; }

/* ---------- En-tête signature ---------- */
.js-e__header { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.js-e .js-e__surtitle {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-family: 'Dancing Script JS', cursive;
	font-weight: 700;
	font-size: 26px;
	line-height: 1.2;
	color: var(--js-e-accent);
	margin-bottom: 10px;
}
.js-e--nuit .js-e__surtitle { color: #9fd36d; }
.js-e__decor { display: inline-flex; color: #9fd36d; flex: 0 0 auto; }
.js-e__decor .js-e__branch { width: 40px; height: 22px; }
.js-e__decor i, .js-e__decor svg { font-size: 22px; width: 22px; height: 22px; line-height: 1; }
.js-e__decor svg { fill: currentColor; }
.js-e__decor--img img { display: block; height: 30px; width: auto; max-width: 90px; object-fit: contain; }
.js-e__surtitle-text { min-width: 0; }
.js-e .js-e__title {
	font-family: 'Montserrat', sans-serif;
	font-weight: 700;
	font-size: 40px;
	line-height: 1.18;
	color: var(--js-e-title);
	margin-bottom: 14px;
}
.js-e--nuit .js-e__title { color: #ffffff; }
.js-e__accent {
	background: linear-gradient(180deg, var(--js-e-accent), var(--js-e-accent2));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.js-e--nuit .js-e__accent { background: linear-gradient(180deg, #c6ea9e, #9fd36d); -webkit-background-clip: text; background-clip: text; }
.js-e .js-e__intro { font-size: 16px; line-height: 1.75; }
@media (max-width: 1024px) { .js-e .js-e__title { font-size: 33px; } }
@media (max-width: 767px)  { .js-e .js-e__title { font-size: 27px; } .js-e .js-e__surtitle { font-size: 23px; } }

/* ---------- Marqueurs communs ---------- */
.js-e__dot {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--js-e-accent), var(--js-e-accent2));
	color: #ffffff;
	font-family: 'Montserrat', sans-serif;
	font-weight: 700;
	font-size: 21px;
	box-shadow: 0 8px 18px rgba(62,109,44, .28), inset 0 1px 0 rgba(255, 255, 255, .25);
	flex: 0 0 auto;
	position: relative;
	z-index: 1;
}
.js-e__dot i, .js-e__dot i::before, .js-e__dot svg { line-height: 1 !important; vertical-align: middle; font-size: 22px; }
.js-e__dot svg { width: 22px; height: 22px; fill: currentColor; }
.js-e .js-e__step-num {
	display: block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1.6px;
	text-transform: uppercase;
	color: var(--js-e-accent2);
	margin-bottom: 5px;
}
.js-e--nuit .js-e__step-num { color: #9fd36d; }
.js-e .js-e__step-title {
	display: block;
	font-family: 'Montserrat', sans-serif;
	font-weight: 700;
	font-size: 18px;
	line-height: 1.3;
	color: var(--js-e-title);
	margin-bottom: 7px;
}
.js-e--nuit .js-e__step-title { color: #ffffff; }
.js-e .js-e__step-text { display: block; font-size: 14.5px; line-height: 1.7; }
.js-e--nuit .js-e__step-text { color: #c3cbbd; }

/* ---------- Mode FRISE HORIZONTALE ---------- */
.js-e--frise .js-e__list {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(0, 1fr);
	gap: 0 26px;
}
.js-e--frise .js-e__item { display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.js-e--frise .js-e__marker {
	display: flex;
	align-items: center;
	width: 100%;
	margin-bottom: 16px;
}
.js-e--frise .js-e__marker::before {
	content: '';
	flex: 1 1 auto;
	border-top: 2px dashed var(--js-e-connector);
}
.js-e--frise .js-e__connector { flex: 1 1 auto; border-top: 2px dashed var(--js-e-connector); }
/* Pas de trait avant le premier ni après le dernier. */
.js-e--frise .js-e__item:first-child .js-e__marker::before { border-top-color: transparent; }
.js-e--frise .js-e__item:last-child .js-e__connector { border-top-color: transparent; }
.js-e--frise .js-e__body { padding: 0 4px; }

/* ---------- Mode FIL VERTICAL ---------- */
.js-e--fil .js-e__list { display: block; max-width: 680px; margin: 0 auto; }
.js-e--fil .js-e__item { display: flex; align-items: stretch; }
.js-e--fil .js-e__marker {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-right: 22px !important;
	flex: 0 0 auto;
}
.js-e--fil .js-e__connector {
	flex: 1 1 auto;
	border-left: 2px dashed var(--js-e-connector);
	min-height: 22px;
	margin-top: 6px;
	margin-bottom: 6px;
}
.js-e--fil .js-e__item:last-child .js-e__connector { display: none; }
.js-e--fil .js-e__body { padding: 8px 0 30px; min-width: 0; }
.js-e--fil .js-e__item:last-child .js-e__body { padding-bottom: 0; }

/* ---------- Mode CARTES ---------- */
.js-e--cartes .js-e__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	counter-reset: js-e;
}
.js-e--cartes .js-e__item {
	position: relative;
	display: flex;
	align-items: flex-start;
	background: #ffffff;
	border: 1px solid #e4ebdd;
	border-radius: 18px;
	padding: 24px 22px;
	overflow: hidden;
	box-shadow: 0 3px 14px rgba(0,1,1, .06);
	counter-increment: js-e;
	transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.js-e--cartes .js-e__item:hover { transform: translateY(-4px); border-color: #a7c894; box-shadow: 0 14px 30px rgba(0,1,1, .12); }
.js-e--cartes .js-e__item::after {
	content: counter(js-e, decimal-leading-zero);
	position: absolute;
	top: 4px;
	right: 14px;
	font-family: 'Montserrat', sans-serif;
	font-weight: 700;
	font-size: 52px;
	line-height: 1;
	color: rgba(0,1,1, .06);
	pointer-events: none;
}
.js-e--nuit.js-e--cartes .js-e__item { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .1); }
.js-e--nuit.js-e--cartes .js-e__item::after { color: rgba(255, 255, 255, .07); }
.js-e--nuit.js-e--cartes .js-e__item:hover { border-color: rgba(198,234,158, .5); }
.js-e--cartes .js-e__marker { margin-right: 18px !important; flex: 0 0 auto; }
.js-e--cartes .js-e__connector { display: none; }
.js-e--cartes .js-e__dot { width: 52px; height: 52px; font-size: 19px; }
.js-e--cartes .js-e__body { min-width: 0; }

/* ---------- Mode CHEVRONS DE PROGRESSION ---------- */
.js-e--chevrons .js-e__list {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(0, 1fr);
	gap: 0 22px;
}
.js-e--chevrons .js-e__item {
	position: relative;
	background: #ffffff;
	border: 1px solid #e4ebdd;
	border-radius: 16px;
	padding: 22px 18px 20px;
	min-width: 0;
	box-shadow: 0 3px 14px rgba(0,1,1, .06);
	transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.js-e--chevrons .js-e__item:hover { transform: translateY(-4px); border-color: #a7c894; box-shadow: 0 14px 30px rgba(0,1,1, .12); }
.js-e--nuit.js-e--chevrons .js-e__item { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .1); }
.js-e--nuit.js-e--chevrons .js-e__item:hover { border-color: rgba(198,234,158, .5); }
.js-e--chevrons .js-e__marker { display: block; margin-bottom: 12px; }
.js-e--chevrons .js-e__dot { width: 46px; height: 46px; font-size: 17px; }
/* Chevron pointé vers l'étape suivante — DANS l'espace inter-colonnes (jamais
 * hors racine : le dernier est masqué). */
.js-e--chevrons .js-e__connector {
	position: absolute;
	top: 50%;
	right: -17px;
	width: 13px;
	height: 13px;
	border-top: 3px solid var(--js-e-accent);
	border-right: 3px solid var(--js-e-accent);
	transform: translateY(-50%) rotate(45deg);
	border-left: 0;
	min-height: 0;
	margin: 0 !important;
}
.js-e--nuit.js-e--chevrons .js-e__connector { border-top-color: #9fd36d; border-right-color: #9fd36d; }
.js-e--chevrons .js-e__item:last-child .js-e__connector { display: none; }

/* ---------- Mode TIMELINE ALTERNÉE ---------- */
.js-e--alterne .js-e__list { position: relative; max-width: 920px; margin: 0 auto; }
.js-e--alterne .js-e__list::before {
	content: '';
	position: absolute;
	top: 10px;
	bottom: 10px;
	left: 50%;
	border-left: 2px dashed var(--js-e-connector);
	transform: translateX(-1px);
}
.js-e--alterne .js-e__item {
	position: relative;
	width: 50%;
	box-sizing: border-box;
	padding-right: 52px;
	padding-bottom: 30px;
	text-align: right;
	min-width: 0;
}
.js-e--alterne .js-e__item:nth-child(even) {
	margin-left: 50%;
	padding-right: 0;
	padding-left: 52px;
	text-align: left;
}
.js-e--alterne .js-e__item:last-child { padding-bottom: 0; }
/* Pastille posée SUR le fil central (moitié dans l'item, moitié vers le
 * centre — jamais vers l'extérieur de la racine). */
.js-e--alterne .js-e__marker { position: absolute; top: 0; right: -29px; }
.js-e--alterne .js-e__item:nth-child(even) .js-e__marker { right: auto; left: -29px; }
.js-e--alterne .js-e__connector { display: none; }
.js-e--alterne .js-e__body { display: block; padding-top: 8px; }

/* ---------- Mode CARTES FEUILLE (hérite de cartes) ---------- */
.js-e--feuille .js-e__item {
	border-radius: 30px 30px 30px 8px; /* arrondi signature */
	border-left: 4px solid #9fd36d;
	transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease, border-radius .34s ease;
}
.js-e--feuille .js-e__item:hover { border-radius: 30px 8px 30px 30px; } /* inversion au survol */
.js-e--feuille .js-e__item::after { content: none; } /* pas de filigrane : le liseré signe déjà la carte */
.js-e--feuille .js-e__dot { border-radius: 18px 18px 18px 5px; }

/* ---------- Bascule mobile : la frise devient un fil (portée par le plugin). ---------- */
@media (max-width: 767px) {
	.js-e--frise .js-e__list { display: block; }
	.js-e--frise .js-e__item { flex-direction: row; align-items: stretch; text-align: left; }
	.js-e--frise .js-e__marker {
		flex-direction: column;
		width: auto;
		margin-right: 20px !important;
		margin-bottom: 0;
		flex: 0 0 auto;
	}
	.js-e--frise .js-e__marker::before { display: none; }
	.js-e--frise .js-e__connector {
		border-top: 0;
		border-left: 2px dashed var(--js-e-connector);
		min-height: 22px;
		margin-top: 6px;
		margin-bottom: 6px;
	}
	.js-e--frise .js-e__item:last-child .js-e__connector { display: none; }
	.js-e--frise .js-e__body { padding: 8px 0 26px; }
	.js-e--frise .js-e__item:last-child .js-e__body { padding-bottom: 0; }
	.js-e--frise .js-e__dot { width: 50px; height: 50px; font-size: 18px; }
	.js-e--cartes .js-e__list { grid-template-columns: minmax(0, 1fr); }

	/* Chevrons : empilés, flèche vers le bas entre les blocs. */
	.js-e--chevrons .js-e__list { grid-auto-flow: row; grid-auto-columns: unset; gap: 26px 0; }
	.js-e--chevrons .js-e__connector {
		top: auto;
		right: auto;
		bottom: -20px;
		left: 50%;
		transform: translateX(-50%) rotate(135deg);
	}

	/* Timeline alternée : fil rabattu à gauche, tout à droite du fil. */
	.js-e--alterne .js-e__list::before { left: 28px; transform: none; }
	.js-e--alterne .js-e__item,
	.js-e--alterne .js-e__item:nth-child(even) {
		width: 100%;
		margin-left: 0;
		padding-left: 78px;
		padding-right: 0;
		text-align: left;
	}
	.js-e--alterne .js-e__marker,
	.js-e--alterne .js-e__item:nth-child(even) .js-e__marker { right: auto; left: 0; }
	.js-e--alterne .js-e__dot { width: 56px; height: 56px; }
}

/* ---------- Bouton ---------- */
.js-e__actions { text-align: center; margin-top: 36px; }
.js-e__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	padding: 15px 32px;
	border-radius: 12px;
	font-family: 'Montserrat', sans-serif;
	font-size: 15.5px;
	font-weight: 700;
	text-decoration: none;
	overflow-wrap: break-word;
	transition: background .25s ease, color .25s ease, transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.js-e__btn--plein {
	background: linear-gradient(135deg, var(--js-e-accent), var(--js-e-accent2));
	color: #ffffff;
	box-shadow: 0 8px 20px rgba(62,109,44, .28), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.js-e__btn--plein:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(62,109,44, .34), inset 0 1px 0 rgba(255, 255, 255, .22); color: #ffffff; }
.js-e__btn--contour { background: transparent; color: var(--js-e-accent2); border: 2px solid var(--js-e-accent); }
.js-e__btn--contour:hover { background: var(--js-e-accent); color: #ffffff; transform: translateY(-2px); }
.js-e--nuit .js-e__btn--contour { color: #c6ea9e; border-color: #c6ea9e; }
.js-e--nuit .js-e__btn--contour:hover { background: #c6ea9e; color: #2f5421; }
.js-e__btn--nuit-or { background: #000101; color: #c6ea9e; box-shadow: inset 0 0 0 1.5px #9fd36d; }
.js-e__btn--nuit-or:hover { background: #0d1a0b; transform: translateY(-2px); color: #c6ea9e; }
.js-e__btn:focus-visible { outline: 2px solid var(--js-e-title); outline-offset: 3px; }
.js-e--nuit .js-e__btn:focus-visible { outline-color: #ffffff; }

@media (prefers-reduced-motion: reduce) {
	.js-e *, .js-e *::before, .js-e *::after { transition: none !important; animation: none !important; }
}
