/* Elite Seminaire V2 — client app shell ("Mon espace") */

body.esc-app-body {
	background: #F1F5F9;
	margin: 0;
	overflow-x: hidden;
}
body.esc-app-body .esc-header,
body.esc-app-body .esc-footer { display: none !important; }

.esc-app {
	--app-sidebar-width: 264px;
	--app-topbar-height: 72px;
	display: grid;
	grid-template-columns: var(--app-sidebar-width) 1fr;
	min-height: 100vh;
	background: #F1F5F9;
}

.esc-app--gate {
	grid-template-columns: 1fr;
	place-items: center;
}
.esc-app__gate {
	background: #FFFFFF;
	padding: 56px 48px;
	border-radius: 16px;
	box-shadow: 0 12px 32px rgb(15 23 42 / 8%);
	text-align: center;
	max-width: 460px;
}
.esc-app__gate h1 { margin: 0 0 8px; font-size: 22px; }
.esc-app__gate p { margin: 0 0 24px; color: #64748B; }

/* ---------- Sidebar ---------- */
.esc-app__sidebar {
	background: #0F172A;
	color: #CBD5E1;
	display: flex;
	flex-direction: column;
	padding: 24px 16px;
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
	z-index: 30;
}
.esc-app__brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: #FFFFFF !important;
	font-weight: 700;
	font-size: 16px;
	text-decoration: none !important;
	padding: 8px 12px;
	border-radius: 10px;
	margin-bottom: 24px;
}
.esc-app__brand:hover { background: rgba(255,255,255,0.05); }
.esc-app__brand-icon { font-size: 22px; }

.esc-app__nav {
	display: flex;
	flex-direction: column;
	gap: 4px;
	flex: 1;
}
.esc-app__nav-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border-radius: 10px;
	color: #CBD5E1 !important;
	text-decoration: none !important;
	font-size: 14.5px;
	font-weight: 500;
	transition: background .15s ease, color .15s ease;
}
.esc-app__nav-item:hover {
	background: rgba(255,255,255,0.06);
	color: #FFFFFF !important;
}
.esc-app__nav-item.is-active {
	background: linear-gradient(135deg, #6366F1, #4F46E5);
	color: #FFFFFF !important;
	box-shadow: 0 4px 12px rgb(79 70 229 / 35%);
}
.esc-app__nav-item.is-active .esc-app__nav-icon svg {
	stroke: #FFFFFF;
}
.esc-app__nav-item--muted { color: #94A3B8 !important; }

.esc-app__nav-icon {
	width: 20px;
	height: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.esc-app__nav-icon svg {
	width: 18px;
	height: 18px;
	stroke: currentColor;
}

.esc-app__sidebar-footer {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid rgba(255,255,255,0.08);
}
.esc-app__user {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	margin-bottom: 8px;
}
.esc-app__avatar {
	width: 36px;
	height: 36px;
	border-radius: 999px;
	background: linear-gradient(135deg, #6366F1, #0EA5E9);
	color: #FFFFFF;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	flex-shrink: 0;
}
.esc-app__user-info { display: flex; flex-direction: column; min-width: 0; }
.esc-app__user-info strong {
	color: #FFFFFF;
	font-size: 14px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.esc-app__user-info small {
	color: #64748B;
	font-size: 12px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ---------- Mobile menu trigger ---------- */
.esc-app__menu {
	display: none;
	position: fixed;
	top: 16px; left: 16px;
	z-index: 50;
	background: #FFFFFF;
	border: 1px solid #E2E8F0;
	border-radius: 10px;
	width: 44px;
	height: 44px;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.esc-app__menu svg { width: 22px; height: 22px; stroke: #0F172A; }

/* ---------- Topbar ---------- */
.esc-app__topbar {
	position: sticky;
	top: 0;
	z-index: 20;
	background: rgba(255,255,255,0.92);
	backdrop-filter: saturate(140%) blur(8px);
	-webkit-backdrop-filter: saturate(140%) blur(8px);
	border-bottom: 1px solid #E2E8F0;
	padding: 18px 32px;
	height: var(--app-topbar-height);
	display: flex;
	align-items: center;
	gap: 24px;
}
.esc-app__topbar-title h1 {
	margin: 0;
	font-size: 22px;
	letter-spacing: -0.01em;
	color: #0F172A;
}
.esc-app__topbar-sub {
	margin: 2px 0 0;
	color: #64748B;
	font-size: 13px;
}
.esc-app__topbar-actions {
	margin-left: auto;
	display: flex;
	gap: 10px;
}

/* ---------- Main ---------- */
.esc-app__main { min-width: 0; display: flex; flex-direction: column; }
.esc-app__content {
	padding: 32px;
	flex: 1;
}
@media (max-width: 720px) {
	.esc-app__content { padding: 20px 16px; }
}

/* ---------- Overview ---------- */
.esc-overview { display: grid; gap: 24px; }

.esc-overview__continue {
	background: linear-gradient(135deg, #4F46E5 0%, #0EA5E9 100%);
	border-radius: 20px;
	padding: 36px;
	color: #FFFFFF;
	background-size: cover;
	background-position: center;
	min-height: 220px;
	display: flex;
	align-items: stretch;
}
.esc-overview__continue * { color: #FFFFFF !important; }
.esc-overview__continue-inner {
	display: flex;
	flex-direction: column;
	gap: 8px;
	width: 100%;
	max-width: 720px;
}
.esc-overview__continue h2 {
	margin: 0;
	font-size: 28px;
	letter-spacing: -0.02em;
}
.esc-eyebrow--light { color: rgba(255,255,255,0.8) !important; }
.esc-progress--light { background: rgba(255,255,255,0.18) !important; }
.esc-progress--light .esc-progress__bar {
	background: linear-gradient(90deg, #FFFFFF, #DBEAFE) !important;
}
.esc-overview__continue-cta {
	margin-top: auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	padding-top: 12px;
}
.esc-btn-on-dark {
	background: #FFFFFF !important;
	color: #4F46E5 !important;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.esc-btn-on-dark svg { width: 16px; height: 16px; stroke: #4F46E5; }
.esc-btn-on-dark:hover { background: #F1F5F9 !important; }

.esc-overview__metrics {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}
@media (max-width: 920px) {
	.esc-overview__metrics { grid-template-columns: repeat(2, 1fr); }
}
.esc-metric {
	background: #FFFFFF;
	border: 1px solid #E2E8F0;
	border-radius: 14px;
	padding: 20px;
	text-decoration: none !important;
	color: #0F172A !important;
	transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
	display: block;
}
.esc-metric:hover {
	transform: translateY(-2px);
	border-color: #C7D2FE;
	box-shadow: 0 12px 24px rgb(15 23 42 / 8%);
}
.esc-metric__value {
	font-size: 32px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: #0F172A;
}
.esc-metric__label {
	color: #64748B;
	font-size: 13px;
	margin-top: 4px;
}

.esc-overview__split {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 24px;
}
@media (max-width: 920px) {
	.esc-overview__split { grid-template-columns: 1fr; }
}

/* Soft cards used in app */
.esc-card-soft {
	background: #FFFFFF;
	border: 1px solid #E2E8F0;
	border-radius: 16px;
	padding: 24px;
}
.esc-card-soft__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
}
.esc-card-soft__header h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: #0F172A;
}
.esc-card-soft__header a {
	font-size: 13px;
	color: #4F46E5 !important;
	text-decoration: none !important;
}

.esc-formation-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.esc-formation-list a {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: center;
	gap: 16px;
	padding: 12px;
	border-radius: 10px;
	color: #0F172A !important;
	text-decoration: none !important;
	transition: background .15s ease;
}
.esc-formation-list a:hover { background: #F8FAFC; }
.esc-formation-list__title { font-weight: 500; }
.esc-formation-list__meta { display: flex; align-items: center; gap: 12px; }
.esc-formation-list__progress {
	display: inline-block;
	width: 100px;
	height: 6px;
	border-radius: 999px;
	background: #E2E8F0;
	overflow: hidden;
}
.esc-formation-list__progress span {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, #6366F1, #4F46E5);
}

.esc-activity { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.esc-activity li {
	display: grid;
	grid-template-columns: 12px 1fr;
	gap: 12px;
	align-items: start;
	padding: 8px 0;
}
.esc-activity strong { display: block; color: #0F172A; font-size: 14px; font-weight: 500; }
.esc-activity small { color: #64748B; font-size: 12px; }
.esc-activity__dot {
	width: 10px; height: 10px;
	border-radius: 999px;
	margin-top: 6px;
	background: #6366F1;
}
.esc-activity__dot--success { background: #16A34A; }
.esc-activity__dot--warning { background: #F59E0B; }

/* ---------- Tables ---------- */
.esc-table-wrap {
	background: #FFFFFF;
	border: 1px solid #E2E8F0;
	border-radius: 16px;
	/* Was overflow:hidden, which clipped columns on 375px. Scroll horizontally
	   instead so all columns stay reachable on narrow screens. */
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
.esc-table {
	width: 100%;
	min-width: 520px;
	border-collapse: collapse;
}
.esc-table th, .esc-table td {
	padding: 14px 20px;
	text-align: left;
	border-bottom: 1px solid #F1F5F9;
}
.esc-table th {
	background: #F8FAFC;
	color: #64748B;
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-weight: 600;
}
.esc-table tr:last-child td { border-bottom: none; }
.esc-table tbody tr:hover td { background: #F8FAFC; }

/* Doc list refresh */
.esc-doc-list__body { display: flex; flex-direction: column; min-width: 0; }
.esc-doc-list__body strong { color: #0F172A; }
.esc-doc-list__body small { color: #64748B; }

/* Profile keyvals */
.esc-keyvals {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 8px 24px;
	margin: 0 0 16px;
}
.esc-keyvals dt { color: #64748B; font-size: 13px; }
.esc-keyvals dd { margin: 0; color: #0F172A; }
@media (max-width: 540px) {
	.esc-keyvals { grid-template-columns: 1fr; gap: 4px 0; }
	.esc-keyvals dd { margin-bottom: 8px; }
}

/* ---------- Mobile drawer ---------- */
@media (max-width: 920px) {
	.esc-app { grid-template-columns: 1fr; }
	.esc-app__menu { display: inline-flex; }
	.esc-app__sidebar {
		position: fixed;
		top: 0; left: 0; bottom: 0;
		width: 280px;
		transform: translateX(-100%);
		transition: transform .25s ease;
		box-shadow: 0 12px 32px rgb(0 0 0 / 30%);
	}
	.esc-app[data-open="1"] .esc-app__sidebar {
		transform: translateX(0);
	}
	.esc-app__topbar { padding: 18px 16px 18px 76px; }
}

/* ------------------------------------------------------------------ */
/* Parcours d'évaluation (pré-test → formation → post-test)            */
/* ------------------------------------------------------------------ */
.esc-eval-intro {
	max-width: 720px;
	color: #475569;
	margin: 0 0 20px;
	line-height: 1.6;
}
.esc-eval {
	background: #FFFFFF;
	border: 1px solid #E2E8F0;
	border-radius: 16px;
	padding: 24px;
	margin-bottom: 20px;
}
.esc-eval__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 18px;
}
.esc-eval__head h3 { margin: 0; font-size: 18px; }
.esc-eval__head h3 a { color: #0F172A; text-decoration: none; }
.esc-eval__head h3 a:hover { color: #4F46E5; }

.esc-eval__steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 10px;
}
.esc-eval__step {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px 16px;
	border: 1px solid #E2E8F0;
	border-radius: 12px;
	background: #F8FAFC;
}
.esc-eval__step.is-done { background: #F0FDF4; border-color: #BBF7D0; }
.esc-eval__step.is-locked { opacity: .55; }
.esc-eval__num {
	flex: 0 0 34px;
	width: 34px;
	height: 34px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 14px;
	background: #EEF2FF;
	color: #4F46E5;
}
.esc-eval__step.is-done .esc-eval__num { background: #DCFCE7; color: #166534; }
.esc-eval__body { flex: 1 1 auto; min-width: 0; }
.esc-eval__body strong { display: block; color: #0F172A; }
.esc-eval__body small { display: block; color: #64748B; margin-top: 2px; line-height: 1.45; }
.esc-eval__state {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	justify-content: flex-end;
}
.esc-eval__delta {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 18px;
	padding: 14px 16px;
	border-radius: 12px;
	background: linear-gradient(90deg, #EEF2FF, #E0F2FE);
	color: #0F172A;
}
.esc-eval__delta-arrow { color: #4F46E5; font-weight: 700; }

/* Inline quiz runner (QSM rendered in-page) */
.esc-eval-runner {
	background: #FFFFFF;
	border: 1px solid #E2E8F0;
	border-radius: 16px;
	padding: 24px;
}
.esc-eval-runner__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	padding-bottom: 16px;
	margin-bottom: 16px;
	border-bottom: 1px solid #E2E8F0;
}
.esc-eval-runner__head strong { display: block; color: #0F172A; }
.esc-eval-runner__head small { display: block; margin-top: 2px; }

@media (max-width: 640px) {
	.esc-eval__step { flex-wrap: wrap; }
	.esc-eval__state { width: 100%; justify-content: flex-start; }
}
