.oci-tl {
	--oci-size: 44px;
	--oci-gap: 56px;
	--oci-content-gap: 24px;
	--oci-line-w: 3px;
	--oci-dur: .7s;
	--oci-active: #55569f;
	--oci-active-text: #fff;
	--oci-inactive: #cfd0e4;
	--oci-inactive-text: #fff;
	--oci-line-active: #55569f;
	--oci-line-inactive: #55569f;
	position: relative;
}

.oci-tl__item {
	position: relative;
	display: grid;
	grid-template-columns: var(--oci-size) minmax(0, 1fr);
	column-gap: var(--oci-content-gap);
	padding-bottom: var(--oci-gap);
}

.oci-tl__item:last-child {
	padding-bottom: 0;
}

/* Pastille */
.oci-tl__marker {
	position: relative;
	z-index: 2;
	grid-column: 1;
	grid-row: 1;
	width: var(--oci-size);
	height: var(--oci-size);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: calc(var(--oci-size) * .45);
	font-weight: 700;
	line-height: 1;
	background: var(--oci-inactive);
	color: var(--oci-inactive-text);
	transition: background-color .45s ease, color .45s ease;
}

.oci-tl__item.is-active .oci-tl__marker {
	background: var(--oci-active);
	color: var(--oci-active-text);
}

/* Contenu */
.oci-tl__content {
	grid-column: 2;
	grid-row: 1;
	min-width: 0;
}

.oci-tl__title {
	margin: 0;
	min-height: var(--oci-size);
	display: flex;
	align-items: center;
	font-size: 1.5rem;
	font-weight: 500;
	line-height: 1.25;
}

.oci-tl__text {
	margin-top: 8px;
}

.oci-tl__text > :first-child { margin-top: 0; }
.oci-tl__text > :last-child  { margin-bottom: 0; }

/* Ligne : du centre de la pastille au centre de la suivante */
.oci-tl__line {
	position: absolute;
	z-index: 1;
	top: calc(var(--oci-size) / 2);
	left: calc(var(--oci-size) / 2 - var(--oci-line-w) / 2);
	width: var(--oci-line-w);
	height: 100%;
	pointer-events: none;
}

.oci-tl__item:last-child .oci-tl__line {
	display: none;
}

.oci-tl__line::before,
.oci-tl__line::after {
	content: "";
	position: absolute;
	inset: 0;
}

/* Tracé « à venir » */
.oci-tl__line::before {
	background: repeating-linear-gradient(
		to bottom,
		var(--oci-line-inactive) 0 6px,
		transparent 6px 12px
	);
}

.oci-tl--line-solid .oci-tl__line::before {
	background: var(--oci-line-inactive);
}

/* Tracé « parcouru » */
.oci-tl__line::after {
	background: var(--oci-line-active);
	transform: scaleY(var(--fill, 0));
	transform-origin: top;
	transition: transform .12s linear;
}

/* Sans JS (ou progression désactivée) : tout est parcouru */
.oci-tl:not(.oci-tl--js) .oci-tl__marker {
	background: var(--oci-active);
	color: var(--oci-active-text);
}
.oci-tl:not(.oci-tl--js) .oci-tl__line::after {
	transform: scaleY(1);
}

/* Animation d'apparition */
.oci-tl--js .oci-tl__content {
	transition: opacity var(--oci-dur) ease, transform var(--oci-dur) cubic-bezier(.22, 1, .36, 1);
}

.oci-tl--js[data-anim="fade"] .oci-tl__item:not(.is-visible) .oci-tl__content,
.oci-tl--js[data-anim="fade-up"] .oci-tl__item:not(.is-visible) .oci-tl__content,
.oci-tl--js[data-anim="fade-left"] .oci-tl__item:not(.is-visible) .oci-tl__content,
.oci-tl--js[data-anim="fade-right"] .oci-tl__item:not(.is-visible) .oci-tl__content,
.oci-tl--js[data-anim="zoom"] .oci-tl__item:not(.is-visible) .oci-tl__content {
	opacity: 0;
}

.oci-tl--js[data-anim="fade-up"]    .oci-tl__item:not(.is-visible) .oci-tl__content { transform: translateY(28px); }
.oci-tl--js[data-anim="fade-left"]  .oci-tl__item:not(.is-visible) .oci-tl__content { transform: translateX(32px); }
.oci-tl--js[data-anim="fade-right"] .oci-tl__item:not(.is-visible) .oci-tl__content { transform: translateX(-32px); }
.oci-tl--js[data-anim="zoom"]       .oci-tl__item:not(.is-visible) .oci-tl__content { transform: scale(.94); }

/* Petit « pop » de la pastille à l'activation */
.oci-tl--js[data-anim]:not([data-anim="none"]) .oci-tl__item.is-active .oci-tl__marker {
	animation: oci-tl-pop .5s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes oci-tl-pop {
	0%   { transform: scale(.8); }
	100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
	.oci-tl .oci-tl__content,
	.oci-tl .oci-tl__marker,
	.oci-tl .oci-tl__line::after {
		transition: none !important;
		animation: none !important;
	}
}
