/* Voltrix — Paiement en plusieurs fois (simulateur visuel) */

.vpep-root {
	--vpep-accent: #FA5757;          /* couleur d'accent (réglages) */
	--vpep-alma: var(--vpep-accent); /* Alma : suit l'accent */
	--vpep-younited: #6C3FF5;        /* Younited : violet */
	--vpep-dark: #1c1c20;
	--vpep-radius: 14px;
	font-family: inherit;
	box-sizing: border-box;
}
.vpep-root *,
.vpep-root *::before,
.vpep-root *::after { box-sizing: border-box; }

/* ---------- Bloc déclencheur ---------- */
.vpep-teaser {
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	max-width: 520px;
	margin: 16px 0;
	padding: 12px 18px;
	background: var(--vpep-dark);
	color: #fff;
	border: 0;
	border-radius: var(--vpep-radius);
	cursor: pointer;
	text-align: left;
	transition: transform .12s ease, box-shadow .12s ease;
}
.vpep-teaser:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0,0,0,.18); }
.vpep-teaser:focus-visible { outline: 2px solid var(--vpep-accent); outline-offset: 2px; }

.vpep-teaser-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 11px;
	background: var(--vpep-accent);
	color: #fff;
	flex: 0 0 auto;
}
.vpep-teaser-text { display: flex; flex-direction: column; line-height: 1.25; flex: 1 1 auto; }
.vpep-teaser-amount { font-size: 15px; }
.vpep-teaser-amount strong { font-weight: 700; }
.vpep-teaser-sub { font-size: 12px; color: rgba(255,255,255,.6); }
.vpep-teaser-cta { color: var(--vpep-accent); font-weight: 600; font-size: 14px; white-space: nowrap; flex: 0 0 auto; }

/* ---------- Popup ---------- */
.vpep-modal[hidden] { display: none; }
.vpep-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.vpep-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(20,20,25,.55);
	backdrop-filter: blur(1px);
}
.vpep-modal-card {
	position: relative;
	width: 100%;
	max-width: 460px;
	background: #fff;
	color: #15151a;
	border-radius: 18px;
	border-top: 4px solid var(--vpep-accent);
	padding: 26px 26px 22px;
	box-shadow: 0 24px 60px rgba(0,0,0,.28);
	animation: vpep-pop .18s ease;
}
@keyframes vpep-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

.vpep-close {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 50%;
	background: #efeff2;
	color: #555;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}
.vpep-close:hover { background: #e3e3e8; }

.vpep-head { display: flex; align-items: center; gap: 9px; color: #15151a; }
.vpep-head-icon { color: var(--vpep-dark); display: inline-flex; }
.vpep-head-title { font-size: 16px; font-weight: 600; }

.vpep-pill {
	display: inline-block;
	margin-top: 12px;
	padding: 5px 12px;
	font-size: 12px;
	font-weight: 600;
	color: var(--vpep-accent);
	background: rgba(250,87,87,.12);
	border-radius: 999px;
}

.vpep-pay { margin-top: 18px; }
.vpep-pay-label { display: block; font-size: 12px; letter-spacing: .08em; color: #9a9aa2; font-weight: 600; }
.vpep-pay-amount { font-size: 34px; font-weight: 800; line-height: 1.1; }
.vpep-pay-suffix { font-size: 18px; font-weight: 600; color: #15151a; }

/* ---------- Sélecteur d'échéances ---------- */
.vpep-slider { margin: 26px 3px 18px; }
.vpep-track {
	position: relative;
	height: 4px;
	background: #e7e7ec;
	border-radius: 999px;
	margin: 0 0 16px;
	cursor: pointer;
}
.vpep-track-fill {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 0;
	background: var(--vpep-accent);
	border-radius: 999px;
	transition: width .18s ease, background .18s ease;
}
/* Poignée dynamique */
.vpep-handle {
	position: absolute;
	top: 50%;
	left: 0;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid var(--vpep-accent);
	box-shadow: 0 1px 5px rgba(0,0,0,.28);
	transform: translate(-50%, -50%);
	transition: left .18s ease, border-color .18s ease;
	cursor: grab;
	touch-action: none;
}
.vpep-handle:active { cursor: grabbing; }
.vpep-handle:focus-visible { outline: 2px solid var(--vpep-accent); outline-offset: 2px; }
.vpep-slider.is-younited .vpep-handle { border-color: var(--vpep-younited); }

.vpep-steps { position: relative; height: 20px; }
.vpep-step {
	position: absolute;
	top: 0;
	transform: translateX(-50%);
	border: 0;
	background: none;
	-webkit-appearance: none;
	appearance: none;
	color: #b6b6bf;
	font-size: 14px;
	font-weight: 600;
	padding: 0 2px;
	cursor: pointer;
	white-space: nowrap;
}
.vpep-step:hover:not(.is-disabled) { color: #6b6b75; }
.vpep-step.is-active { color: var(--vpep-accent); }
.vpep-step.is-active[data-provider="younited"] { color: var(--vpep-younited); }
.vpep-step.is-disabled { color: #d6d6dc; cursor: not-allowed; }
.vpep-step:focus-visible { outline: 2px solid var(--vpep-accent); outline-offset: 1px; border-radius: 4px; }

/* couleur de la barre selon le financeur actif */
.vpep-slider.is-younited .vpep-track-fill { background: var(--vpep-younited); }

/* ---------- Détail ---------- */
.vpep-rows { border-top: 1px solid #eee; padding-top: 14px; }
.vpep-row { display: flex; justify-content: space-between; align-items: baseline; padding: 7px 0; font-size: 15px; }
.vpep-row-label { color: #45454d; }
.vpep-row-value { font-weight: 600; }
.vpep-row-value.is-free { color: #1faa59; font-weight: 600; }
.vpep-row--total { font-size: 16px; }
.vpep-row--total .vpep-row-value { font-weight: 800; }

.vpep-funded { margin-top: 16px; font-size: 14px; color: #6b6b75; }
.vpep-provider { font-weight: 800; text-transform: lowercase; }
.vpep-provider--alma { color: var(--vpep-alma); }
.vpep-provider--younited { color: var(--vpep-younited); }

.vpep-legal { margin: 14px 0 0; font-size: 11px; line-height: 1.45; color: #9a9aa2; }

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
	.vpep-modal-card { padding: 22px 18px 18px; }
	.vpep-pay-amount { font-size: 30px; }
	.vpep-step { font-size: 13px; }
}

/* Verrouillage du scroll quand la popup est ouverte */
body.vpep-modal-open { overflow: hidden; }
