:root {
	--primary-blue: #2563EB;
	--accent-green: #12BB6A;
	--dark-blue: #082A5E;
	--light-gray: #F1F5F9;
	--medium-gray: #64748B;
	--white: #FFFFFF;
	--text-dark: #0f172a;
	--text-muted: #475569;
	--border-color: #E2E8F0;
	/* aliases per design tokens */
	--light-background: var(--light-gray);
	--text-gray: var(--medium-gray);
	--border-light: var(--border-color);
}

.tcf-lesson-details-container {
	padding: 0 !important;
}

/* Base */
.tcf-exam-interface {
	/* background: var(--light-gray); */
	color: var(--text-dark);
	font-family: 'Poppins';
	overflow-x: hidden;
}

/* Assurer un sizing fiable à l'intérieur de l'interface */
.tcf-exam-interface * {
	box-sizing: border-box
}

.tcf-exam-container {
	max-width: 1500px;
	margin: 0 auto;
	background: var(--white);
	border: 1px solid var(--border-color);
	border-radius: 10px;
	box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .1);
	padding: 32px;
	font-family: 'Poppins';
}

/* Header */
.tcf-exam-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1.5rem;
}

.tcf-exam-title {
	display: flex;
	align-items: center;
	gap: .75rem;
}

.tcf-exam-title .title-icon {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	background: var(--primary-blue);
	color: var(--white);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.tcf-corrections-section .tcf-exam-title .title-icon {
	background: #10b981;
}

.tcf-exam-title .title-icon-letter {
	font-weight: 700
}

.tcf-exam-title h1 {
	font-size: 1.3rem;
	/* 24px */
	line-height: 2rem;
	font-weight: 600;
	margin: 0;
}

.tcf-exam-subtitle {
	display: flex;
	align-items: center;
	gap: 1rem;
	color: var(--medium-gray);
	font-size: .95rem;
	margin-top: -5px;
	font-family: 'Poppins';
}

.tcf-exam-subtitle .item {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	font-weight: 500;
}

.tcf-exam-subtitle .item i {
	width: 16px;
	height: 16px;
	color: var(--medium-gray)
}

/* Stepper */
.tcf-stepper-bar {
	background: var(--white);
	border: 1px solid var(--border-color);
	border-radius: 10px;
	padding: .75rem 1rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .1);
	margin-bottom: 1.25rem;
}

/* Tabs */
.tcf-tabs .tcf-tab-list {
	display: flex;
	align-items: center;
	gap: .6rem;
	flex-wrap: wrap;
	padding: 10px 20px;
}

.tcf-tab {
	background: #EEF2F7;
	color: var(--medium-gray);
	padding: .4rem .8rem;
	border-radius: 9999px;
	font-weight: 600;
	width: 35px;
	height: 35px;
	border-radius: 5px;
	display: flex;
	justify-content: center;
	align-items: center;
	font-weight: 400;
	font-size: 14px;
	font-weight: 500;
}

.tcf-tab.active {
	background: var(--primary-blue);
	color: var(--white);
	width: unset !important;
	border-radius: 5px;
	font-weight: 500;
}

/* Loading state for tabs */
.tcf-tab.is-loading {
	pointer-events: none;
	opacity: .9
}

.tcf-tab.is-loading::after {
	content: "";
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-left: .5rem;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 9999px;
	animation: tcf-spin .6s linear infinite;
	vertical-align: -2px
}

@keyframes tcf-spin {
	to {
		transform: rotate(360deg)
	}
}

.tcf-steps {
	display: flex;
	align-items: center;
	gap: .5rem;
}

.tcf-step {
	width: 34px;
	height: 34px;
	border-radius: 9999px;
	background: #eef2ff;
	color: var(--text-muted);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
}

.tcf-step.active {
	background: var(--primary-blue);
	color: var(--white);
}

.tcf-ready {
	color: var(--primary-blue);
	font-weight: 700;
}

/* Task cards grid */
.tcf-tasks-section {
	margin-top: 2rem;
}

.tcf-tasks-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem
}

.tcf-task-card {
	background: var(--white);
	border: 1px solid var(--border-color);
	/* border-left-width: 6px; */
	border-radius: 10px;
	box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .1);
	padding: 24px;
	/* display: grid; */
	grid-template-rows: auto 1fr auto;
	transition: transform .3s ease, box-shadow .3s ease;
	padding-bottom: 18px;
	font-family: 'Poppins';
}

.tcf-task-card.full-span {
	grid-column: 1/-1
}

.tcf-task-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, .1);
}

.tcf-task-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	color: var(--medium-gray);
	font-weight: 600;
	border: 0px !important;
	padding: 0 !important
}

.tcf-task-h-left {
	display: inline-flex;
	align-items: center;
	gap: .5rem
}

.tcf-task-header .task-icon {
	width: 18px;
	height: 18px
}

.tcf-task-label {
	color: #0f172a
}

.tcf-task-header.tcf-color-blue .task-icon {
	color: var(--primary-blue)
}

.tcf-task-header.tcf-color-green .task-icon {
	color: var(--accent-green)
}

.tcf-task-title-row {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: .75rem;
	margin-top: .25rem
}

.tcf-task-title {
	font-size: 0.8rem !important;
	font-weight: 500 !important;
	margin: 0;
	color: var(--text-muted) !important;
}

.tcf-badge {
	padding: .28rem .8rem;
	border-radius: 5px;
	font-weight: 600;
	font-size: .7rem;
	white-space: nowrap;
	text-transform: capitalize;
}

.tcf-badge.badge-blue,
.tcf-task-icon-container.badge-blue {
	background: #eff6ff;
	color: var(--primary-blue)
}

.tcf-badge.badge-green,
.tcf-task-icon-container.badge-green {
	background: #ecfdf5;
	color: var(--accent-green)
}

.tcf-task-desc {
	color: var(--medium-gray) !important;
	font-size: 1rem;
	margin: .5rem 0 0;
	background: #F9FAFB;
	padding: 8px 15px;
	border-radius: 8px;
	font-weight: 500;
	margin-top: 0px;
	line-height: 1.5;
}

.tcf-task-h-right {
	display: flex;
	flex-direction: column;
}

.tcf-task-icon-container {
	width: 35px;
	height: 35px;
	display: flex;
	justify-content: center;
	align-items: center;
	border-radius: 7px;
	margin-top: -7px;
}

.tcf-task-footer {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	color: var(--medium-gray);
	margin-top: .75rem;
	/* font-size: .9rem; */
	width: 100%;

	text-transform: uppercase;
	font-size: 12px;
	font-weight: 600;
}

.tcf-task-footer svg {
	width: 184x;
}

.tcf-task-footer .tcf-site {
	margin-left: auto;
	/* color: #2563EB; */
	text-transform: uppercase;
	font-weight: 600;
	/* display: none; */
}

/* Documents */
.tcf-docs-section {
	margin-top: 2rem
}

.tcf-docs-title {
	display: flex;
	align-items: center;
	gap: .5rem;
	font-size: .95rem;
	font-weight: 700;
	margin: 0 0 .75rem;
	text-transform: uppercase;
	margin-bottom: 20px;
}

.tcf-docs-title svg {
	width: 18px;
}


.tcf-docs-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	margin-bottom: 20px;
}

.tcf-doc-card {
	background: var(--white);
	border: 1px solid var(--border-color);
	border-radius: 10px;
	/* box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .1); */
	padding: 24px;
	background: #F9FAFB;
}

.tcf-doc-card .doc-number {
	width: 28px;
	height: 28px;
	border-radius: 9999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	margin-bottom: .5rem;
	background: #eef2ff;
	color: var(--primary-blue);
}

.tcf-doc-card.variant-2 .doc-number {
	background: #ecfdf5;
	color: var(--accent-green);
}

.tcf-task-footer svg {
	width: 15px;
}

.tcf-doc-card .doc-title {
	font-weight: 500;
	margin: 0 0 .25rem;
	color: var(--text-dark);
	font-size: 15px;
	text-transform: capitalize;
	margin-bottom: 10px;
}

.tcf-doc-card .doc-text {
	font-weight: 500;
    color: var(--medium-gray) !important;
    font-size: 0.95rem;
}

/* Actions */
.tcf-actions {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: .75rem;
	margin-top: 40px;
}

.tcf-actions .tcf-btn {
	text-transform: uppercase;
}

.tcf-btn {
	display: inline-flex;
	align-items: center;
	gap: .5rem;
	border-radius: .625rem;
	padding: .65rem 1rem;
	font-weight: 700;
	border: 1px solid transparent;
	cursor: pointer;
	transition: background .3s ease, color .3s ease, border-color .3s ease, transform .2s ease;
}

.tcf-btn .btn-icon {
	width: 18px;
	height: 18px;
}

.tcf-btn-primary {
	background: var(--primary-blue);
	color: var(--white);
}

.tcf-btn-primary:hover {
	filter: brightness(0.95);
	transform: translateY(-1px);
}

.tcf-btn-green {
	background: var(--accent-green);
	color: var(--white);
}

.tcf-btn-green:hover {
	filter: brightness(0.95);
	transform: translateY(-1px);
}

.tcf-btn-outline {
	background: transparent;
	color: var(--primary-blue);
	border-color: var(--primary-blue);
}

.tcf-btn-outline:hover {
	background: rgba(8, 42, 94, .05);
	transform: translateY(-1px);
}

/* Footer */
.tcf-exam-footer {
	margin-top: 1rem;
	padding: .75rem;
	color: var(--medium-gray);
	font-size: .9rem;
	display: flex;
	align-items: center;
	justify-content: center
}

.tcf-exam-footer .footer-icon {
	color: var(--accent-green);
	margin-right: .5rem
}

/* Corrections section */
.tcf-corrections-section {
	display: none;
	/* margin-top: 1.5rem; */
}

.tcf-no-correction {
	background: #fff7ed;
	border: 1px solid #fed7aa;
	border-radius: .75rem;
	padding: 1rem;
	margin-top: .75rem;
	text-align: center;
}

.tcf-no-correction .nc-title {
	color: #c2410c;
	font-weight: 700;
	margin-bottom: .25rem;
}

.tcf-no-correction .nc-text {
	color: #7c2d12;
	margin: 0 0 .75rem;
}

.tcf-corrections-title {
	display: flex;
	align-items: center;
	gap: .5rem;
	font-size: 1.1rem;
	font-weight: 700;
	margin: 0 0 .75rem;
	font-family: "Montserrat", sans-serif !important;
}

.tcf-corrections-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
}

.corr-title {
	font-size: 17px;
	font-weight: 500;
}

.tcf-correction-card {
	background: #DCFCE7;
	border: 1px solid #10b981;
	border-radius: 8px;
	padding: 1.5rem;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .08);
}

.tcf-correction-card .corr-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.tcf-correction-card .corr-badge {
	background: #10b981;
	color: #fff;
	border-radius: 5px;
	padding: .25rem .8rem;
	font-weight: 500;
	font-size: .7rem;
	display: flex;
	justify-content: center;
	align-items: center;
	font-family: 'poppins';
	line-height: 1.8;
}

.tcf-correction-card .corr-title {
	font-weight: 700;
	margin: 0 0 .35rem;
	font-family: "Montserrat", sans-serif !important;
}

.tcf-correction-card .corr-meta {
	color: #059669;
	font-weight: 600;
	font-size: .9rem;
	margin-bottom: .5rem;
	margin-top: 10px !important;
}

.tcf-correction-card .corr-text {
	color: #1f2937;
	font-size: 0.95rem;
	background: #F0FDF4;
	border: 1px solid #D3FBE0;
	border-radius: 8px;
	padding: 1rem;
	margin-top: 10px;
	line-height: 1.75;
}

.word__count {
	text-transform: capitalize;
	margin-top: 75px;
	font-weight: 600;
	color: #10b981;
	margin-top: 15px !important;
	font-size: 0.85rem;
}

.signature {
	width: 100%;
	margin-top: 20px;
	margin-bottom: 0;
	text-align: right;
	text-transform: uppercase;
	font-weight: 700;
	font-size: 11px;
	color: #059669;
}


@media (min-width: 1024px) {
	.tcf-tasks-grid {
		grid-template-columns: repeat(2, 1fr)
	}
}

/* Mobile buttons stacked */
@media (max-width: 768px) {

	/* .tcf-tasks-grid {
		grid-template-columns: repeat(2, 1fr)
	} */

	/* .tcf-docs-grid {
		grid-template-columns: repeat(2, 1fr)
	} */
	.corr-title {
		font-size: 1rem;
	}
	
	.tcf-actions {
		flex-direction: column;
		align-items: stretch
	}

	.tcf-exam-container {
		padding: 20px
	}
	.tcf-correction-card .corr-badge {
		display: none;
	}

	.tcf-correction-card .corr-header {
		flex-wrap: wrap;
		padding: 10px;
	}
	.tcf-correction-card {
		padding: 1rem;;
	}
	.tcf-correction-card .corr-text {
		font-size: 0.9rem;
	}

	.tcf-task-card {
		padding: 16px
	}

	.tcf-task-title-row {
		flex-wrap: wrap;
		gap: .5rem
	}

	.tcf-task-title {
		flex: 1 1 100%
	}

	.tcf-badge {
		margin-top: .25rem
	}

	.tcf-task-footer {
		flex-wrap: wrap;
		gap: .35rem .5rem;
		/* padding-left: 15px; */
		;
	}

	.tcf-tabs .tcf-tab-list {
		padding: 10px;
	}

	.tcf-task-footer .tcf-site {
		margin-left: 0;
		width: 100%;
		overflow-wrap: anywhere;
		display: none;
	}

	.tcf-doc-card {
		padding: 0;
		border: 0;
	}

	.tcf-docs-title svg {
		width: 50px;
	}

	.tcf-docs-title {
		font-size: .9rem;
		font-weight: 600;
	}
}

/* Header mobile improvements */
@media (max-width: 640px) {
	.tcf-exam-header {
		align-items: flex-start
	}

	.tcf-exam-title {
		gap: .5rem
	}

	.tcf-exam-title .title-icon {
		width: 75px;
		;
		/* height: 32px */
	}

	.tcf-exam-title {
		align-items: flex-start;
	}

	.tcf-exam-title h1 {
		font-size: 1.25rem;
		line-height: 1.6rem;
		word-break: break-word;
		margin-bottom: .15rem
	}

	.tcf-exam-subtitle {
		display: flex;
		flex-wrap: wrap;
		gap: 1rem;
		font-size: .875rem
	}

	.tcf-stepper-bar {
		padding: .5rem .75rem;
		gap: .5rem;
		flex-wrap: wrap
	}

	/* .tcf-tabs .tcf-tab-list {
		flex-wrap: nowrap
	} */

	.tcf-tab {
		padding: .35rem .7rem
	}

	.tcf-ready {
		margin-left: auto;
		display: none;
	}
}

/* Style pour le message d'avertissement */
.tcf-warning-message {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 16px;
	background-color: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 6px;
	color: #dc2626;
	font-size: 14px;
	font-weight: 500;
}

.tcf-warning-message .warning-icon {
	width: 18px;
	height: 18px;
	color: #dc2626;
	flex-shrink: 0;
}