/* =====================================================================
   PC En Forme — Suivi client (front)
   Rendu aux couleurs du thème (clair & sombre via les variables du site).
   Repli inclus si le thème n'est pas actif.
   ===================================================================== */

.pcf-suivi {
	--pcf-bg:      var(--surface, #ffffff);
	--pcf-bg2:     var(--surface-2, #eef1f7);
	--pcf-ink:     var(--ink, #0e1726);
	--pcf-soft:    var(--ink-soft, #46536b);
	--pcf-faint:   var(--ink-faint, #7b8798);
	--pcf-line:    var(--line, #dde3ee);
	--pcf-line2:   var(--line-strong, #c7d0e0);
	--pcf-accent:  var(--signal, #22c55e);
	--pcf-accent-ink: #06230d;
	--pcf-shadow:  var(--shadow, 0 1px 2px rgba(14,23,38,.06), 0 12px 30px -18px rgba(14,23,38,.28));
	--pcf-mono:    var(--mono, ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace);
	--pcf-display: var(--display, "Segoe UI", system-ui, -apple-system, Arial, sans-serif);

	max-width: 680px;
	margin: 0 auto;
	color: var(--pcf-ink);
	font-family: var(--body, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
	line-height: 1.6;
}
.pcf-suivi *, .pcf-suivi *::before, .pcf-suivi *::after { box-sizing: border-box; }

/* ---------- En-tête ---------- */
.pcf-suivi-header { margin-bottom: 26px; }
.pcf-eyebrow {
	font-family: var(--pcf-mono);
	font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
	color: var(--pcf-faint); margin: 0 0 12px;
	display: flex; align-items: center; gap: 10px;
}
.pcf-eyebrow::before { content: ""; width: 26px; height: 1px; background: var(--pcf-accent); }
.pcf-suivi-header h2 {
	font-family: var(--pcf-display); font-weight: 800;
	font-size: clamp(1.7rem, 3.4vw, 2.15rem); letter-spacing: -.02em; line-height: 1.12;
	margin: 0 0 10px; color: var(--pcf-ink);
}
.pcf-sub { color: var(--pcf-soft); margin: 0; max-width: 52ch; }

/* ---------- Formulaire ---------- */
.pcf-suivi-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; }
.pcf-field { position: relative; flex: 1 1 240px; display: flex; align-items: center; }
.pcf-field-ic { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--pcf-faint); pointer-events: none; }
.pcf-suivi-form input[type="text"] {
	width: 100%; font: inherit; letter-spacing: .04em;
	padding: 14px 16px 14px 42px;
	border: 1px solid var(--pcf-line2); border-radius: 11px;
	background: var(--pcf-bg); color: var(--pcf-ink); transition: border-color .15s, box-shadow .15s;
}
.pcf-suivi-form input::placeholder { color: var(--pcf-faint); letter-spacing: normal; }
.pcf-suivi-form input:focus {
	outline: none; border-color: var(--pcf-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--pcf-accent) 24%, transparent);
}
.pcf-suivi-form button {
	flex: 0 0 auto; font: inherit; font-weight: 700; cursor: pointer;
	padding: 14px 24px; border: none; border-radius: 11px;
	background: var(--pcf-accent); color: var(--pcf-accent-ink);
	box-shadow: 0 10px 24px -12px var(--pcf-accent); transition: transform .15s, box-shadow .15s;
}
.pcf-suivi-form button:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -12px var(--pcf-accent); }
.pcf-suivi-form button:disabled { opacity: .6; cursor: default; transform: none; }
@media (max-width: 460px) { .pcf-suivi-form button { flex: 1 1 100%; } }

/* ---------- Messages ---------- */
.pcf-msg { margin-top: 20px; padding: 14px 18px; border-radius: 12px; font-size: .95rem; border: 1px solid var(--pcf-line); }
.pcf-info { background: var(--pcf-bg2); color: var(--pcf-soft); }
.pcf-error {
	background: color-mix(in srgb, #e5484d 12%, var(--pcf-bg));
	border-color: color-mix(in srgb, #e5484d 40%, transparent);
	color: #c0343a;
}
@media (prefers-color-scheme: dark) { .pcf-error { color: #ff8a8d; } }
:root[data-theme="dark"] .pcf-error { color: #ff8a8d; }

/* ---------- Carte résultat ---------- */
.pcf-card-result {
	margin-top: 22px; background: var(--pcf-bg); border: 1px solid var(--pcf-line);
	border-radius: 18px; box-shadow: var(--pcf-shadow); overflow: hidden;
}
.pcf-result-top {
	display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
	padding: 20px 24px; border-bottom: 1px solid var(--pcf-line); background: var(--pcf-bg2);
}
.pcf-code { font-family: var(--pcf-display); font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.pcf-device { color: var(--pcf-faint); font-size: .9rem; margin-top: 2px; }
.pcf-status-badge {
	color: #fff; font-family: var(--pcf-mono); font-size: .72rem; font-weight: 600; letter-spacing: .03em;
	padding: 6px 13px; border-radius: 100px; white-space: nowrap;
}
.pcf-result-body { padding: 24px; display: flex; flex-direction: column; gap: 24px; }

/* ---------- Barre de progression ----------
   Aucun défilement horizontal : les étapes se partagent la largeur,
   puis passent en colonne sur écran étroit. */
.pcf-progress { display: flex; padding: 4px 0; }
.pcf-step {
	flex: 1 1 0; min-width: 0;
	display: flex; flex-direction: column; align-items: center;
	text-align: center; position: relative;
}
.pcf-step:not(:last-child)::after {
	content: ""; position: absolute; top: 15px; left: 50%; width: 100%; height: 2px; background: var(--pcf-line); z-index: 0;
}
.pcf-step-dot {
	width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--pcf-line2);
	background: var(--pcf-bg); display: grid; place-items: center; position: relative; z-index: 1;
	font-size: .8rem; font-weight: 700; color: transparent; flex: none;
}
.pcf-step span {
	margin-top: 9px; font-size: .73rem; color: var(--pcf-faint); line-height: 1.3;
	max-width: 100%; padding: 0 4px; overflow-wrap: break-word;
}
.pcf-step.is-done .pcf-step-dot { background: var(--pcf-accent); border-color: var(--pcf-accent); color: var(--pcf-accent-ink); }
.pcf-step.is-done::after { background: var(--pcf-accent); }
.pcf-step.is-current .pcf-step-dot {
	background: var(--pcf-accent); border-color: var(--pcf-accent); color: var(--pcf-accent-ink);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--pcf-accent) 26%, transparent);
}
.pcf-step.is-done span, .pcf-step.is-current span { color: var(--pcf-ink); font-weight: 600; }

/* Écran étroit : étapes empilées, lecture verticale, rien à faire défiler. */
@media (max-width: 620px) {
	.pcf-progress { flex-direction: column; padding: 4px 0 0; }
	.pcf-step {
		flex: none; flex-direction: row; align-items: flex-start;
		text-align: left; gap: 14px; padding-bottom: 18px;
	}
	.pcf-step:last-child { padding-bottom: 0; }
	.pcf-step:not(:last-child)::after {
		top: 32px; left: 15px; width: 2px; height: calc(100% - 32px);
	}
	.pcf-step span {
		margin-top: 0; padding: 0; font-size: .88rem;
		line-height: 32px; text-align: left;
	}
}

/* ---------- Blocs d'info ---------- */
.pcf-info-block h4 {
	margin: 0 0 8px; font-family: var(--pcf-mono); font-size: .7rem; letter-spacing: .12em;
	text-transform: uppercase; color: var(--pcf-faint); font-weight: 600;
}
.pcf-info-block p { margin: 0; color: var(--pcf-soft); font-size: .96rem; }

/* ---------- Coût ---------- */
.pcf-cost {
	display: flex; align-items: center; justify-content: space-between; gap: 14px;
	padding: 16px 18px; border-radius: 12px;
	background: color-mix(in srgb, var(--pcf-accent) 10%, var(--pcf-bg));
	border: 1px solid color-mix(in srgb, var(--pcf-accent) 30%, transparent);
}
.pcf-cost-label { font-size: .85rem; color: var(--pcf-soft); font-weight: 600; }
.pcf-cost-value { font-family: var(--pcf-display); font-weight: 800; font-size: 1.35rem; color: var(--pcf-ink); }

/* ---------- Historique (timeline) ---------- */
.pcf-timeline { list-style: none; margin: 6px 0 0; padding: 0; }
.pcf-timeline li { position: relative; padding: 0 0 18px 24px; }
.pcf-timeline li::before {
	content: ""; position: absolute; left: 4px; top: 6px; width: 11px; height: 11px; border-radius: 50%;
	background: var(--dot, var(--pcf-accent)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot, var(--pcf-accent)) 20%, transparent);
}
.pcf-timeline li::after { content: ""; position: absolute; left: 9px; top: 16px; bottom: 0; width: 2px; background: var(--pcf-line); }
.pcf-timeline li:last-child { padding-bottom: 0; }
.pcf-timeline li:last-child::after { display: none; }
.pcf-tl-status { font-weight: 700; font-size: .95rem; }
.pcf-tl-date { display: block; font-family: var(--pcf-mono); font-size: .72rem; color: var(--pcf-faint); margin-top: 2px; }
.pcf-tl-note { margin: 6px 0 0; color: var(--pcf-soft); font-size: .9rem; }

/* ---------- Pied + annulé ---------- */
.pcf-result-foot {
	padding: 14px 24px; border-top: 1px solid var(--pcf-line); background: var(--pcf-bg2);
	font-family: var(--pcf-mono); font-size: .72rem; letter-spacing: .03em; color: var(--pcf-faint);
}
.pcf-cancelled-banner {
	padding: 14px 18px; border-radius: 12px; font-size: .95rem; font-weight: 600;
	background: color-mix(in srgb, #e5484d 12%, var(--pcf-bg));
	border: 1px solid color-mix(in srgb, #e5484d 40%, transparent); color: #c0343a;
}
@media (prefers-color-scheme: dark) { .pcf-cancelled-banner { color: #ff8a8d; } }
:root[data-theme="dark"] .pcf-cancelled-banner { color: #ff8a8d; }

@media (prefers-reduced-motion: reduce) {
	.pcf-suivi-form button, .pcf-suivi-form input { transition: none; }
}
