/* ─── CHROME FIXE ─────────────────────────────────────────────── */

.page-controls,
.editor-section-toolbar {
	position: fixed;
	z-index: 1;
	left: 0;
	right: 0;
	background: white;
}

.page-controls {
	bottom: 0;
	border-top: 1pt solid #EEE;
}

.editor-section-toolbar {
	top: 3.5rem;
	border-bottom: 1pt solid #EEE;
}

.page-controls p,
.editor-section-toolbar p {
	margin: auto;
	max-width: 50em;
	padding: 0 1.5em;
}

/* ─── SECTION PRINCIPALE ──────────────────────────────────────── */

.editor-section {
	margin: auto;
	max-width: 50em;
	padding: 7rem 1.5em 8rem 1.5em;
}

.editor-section .buttons:not(:last-child) {
	margin-bottom: 0;
}

.editor-section .doc-info > * {
	font-size: 0.85em;
	text-align: right;
	font-weight: bold;
	padding: 1pt;
	margin-right: 1em;
}

/* ─── BARRE DE PROGRESSION ACCORDÉON ─────────────────────────── */

#accordion-progress {
	display: none;
	background: #f0f7fb;
	border-bottom: 1px solid #d8e8f0;
	padding: 0.4rem 1rem;
}

.acc-progress-segments {
	display: flex;
	gap: 3px;
	margin-bottom: 3px;
}

.acc-progress-seg {
	height: 4px;
	flex: 1;
	background: #dde8ef;
	border-radius: 2px;
	transition: background 0.2s;
}

.acc-progress-seg.done    { background: #186488; }
.acc-progress-seg.current { background: #5ab4d4; }

.acc-progress-label {
	font-size: 0.68rem;
	color: #888;
}

/* ─── ACCORDÉON SECTIONS ──────────────────────────────────────── */

.accordion-item {
	border: 1px solid #d8e8f0;
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 0.5rem;
}

.accordion-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.55rem 0.75rem;
	background: #186488;
	cursor: pointer;
	user-select: none;
	transition: background 0.15s;
}

.accordion-header:hover    { background: #145a78; }
.accordion-header.is-open  { background: #0f4a62; }

.accordion-header-title {
	font-size: 0.82rem;
	font-weight: 700;
	color: white;
}

.accordion-header-meta {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.accordion-badge {
	font-size: 0.65rem;
	background: rgba(255,255,255,0.2);
	color: white;
	padding: 0.1rem 0.45rem;
	border-radius: 1rem;
}

.accordion-badge.is-done {
	background: rgba(34,197,94,0.3);
	color: #a7f3d0;
}

.accordion-chevron {
	color: rgba(255,255,255,0.8);
	font-size: 0.75rem;
	transition: transform 0.2s;
}

.accordion-chevron.is-open { transform: rotate(180deg); }

/* ─── INDICATEURS COACH (vue étudiant) ──────────────────────── */

.acc-coach-flags {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
}

.accordion-body {
	display: none;
	padding: 0.75rem;
	background: white;
	border-top: 1px solid #d8e8f0;
}

.accordion-body.is-open { display: block; }

.accordion-nav {
	display: flex;
	justify-content: space-between;
	padding-top: 0.75rem;
	margin-top: 0.5rem;
	border-top: 1px solid #eee;
	gap: 0.5rem;
}

.accordion-nav-btn {
	padding: 0.4rem 0.85rem;
	border-radius: 6px;
	border: 1.5px solid #186488;
	background: white;
	color: #186488;
	font-size: 0.8rem;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 0.35rem;
	transition: background 0.15s;
}

.accordion-nav-btn:hover           { background: #e8f4f8; }
.accordion-nav-btn:disabled        { opacity: 0.35; cursor: default; }
.accordion-nav-btn.is-next         { background: #186488; color: white; margin-left: auto; }
.accordion-nav-btn.is-next:hover   { background: #145a78; }

/* ─── DOCUMENT — TYPOGRAPHIE COMPACTE ────────────────────────── */

.editor-section .document h1 {
	font-size: 1.1rem;
	font-weight: 800;
	color: #1a3a4a;
	margin-bottom: 0.5rem;
}

.editor-section .document h2 {
	display: none; /* remplacé par accordion-header */
}

.editor-section .document label {
	display: block;
}

@media screen and (min-width: 600px) {
	.editor-section .document label {
		display: inline-block;
		width: 10em;
	}
}

.editor-section .document p {
	margin: 0.4em 0;
	font-size: 0.85rem;
	color: #333;
	line-height: 1.4;
}

.editor-section .document table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 0.4rem;
	font-size: 0.78rem;
}

.editor-section .document table th {
	background: #f0f6fa;
	padding: 0.2rem 0.35rem;
	font-size: 0.72rem;
	font-weight: 700;
	color: #555;
	border: 1px solid #dde8ef;
	text-align: left;
}

.editor-section .document table td {
	border: 1px solid #e4edf2;
	padding: 0.18rem 0.35rem;
	vertical-align: middle;
}

/* ─── DOCUMENT — CHAMPS ───────────────────────────────────────── */

.editor-section .document *[readonly],
.editor-section .document *[disabled] {
	background: #eef3f6;
	color: #555;
}

.editor-section .document *[required] {
	background: lightgoldenrodyellow;
}

.editor-section .notation .global-comment-for-student,
.editor-section .document textarea.coach-comment {
	color: #1a4a9c;
	font-style: italic;
	background: #fffbf0;
	border-left: 2px solid #f5a623;
}

.editor-section .notation .global-comment-for-student,
.editor-section .document input,
.editor-section .document textarea {
	-webkit-appearance: none;
	padding: 0.3em 0.4em;
	font-size: 0.82rem;
	border: 1.5px solid #d0dde5;
	border-radius: 4px;
	font-family: "CourierPrime", monospace;
}

.editor-section .document input:focus,
.editor-section .document textarea:focus {
	border-color: #186488;
	outline: none;
}

.editor-section .document input {
	width: 14em;
}

.editor-section .document input[type=checkbox] {
	width: initial;
	-webkit-appearance: checkbox;
}

.editor-section .document input[type=number] {
	width: 4em;
	text-align: center;
}

.editor-section .document input[type=date] {
	min-height: 2em;
}

.editor-section .document textarea {
	width: 100%;
	height: 5em;
}

.editor-section .document textarea.big {
	height: calc(100vh - 25em);
}

/* ─── INPUTS TACTILES ±1 ─────────────────────────────────────── */

.tactile-num {
	display: inline-flex;
	align-items: center;
	gap: 0;
	vertical-align: middle;
}

.tactile-num input[type=number] {
	width: 2.8em;
	text-align: center;
	border-radius: 0;
	border-left: none;
	border-right: none;
	padding: 0.25em 0;
	font-size: 0.82rem;
	font-weight: 700;
	color: #186488;
}

.tactile-num button {
	width: 2em;
	height: 2em;
	border: 1.5px solid #d0dde5;
	background: white;
	font-size: 1rem;
	font-weight: 700;
	color: #186488;
	cursor: pointer;
	line-height: 1;
	padding: 0;
	transition: background 0.1s;
}

.tactile-num button:hover    { background: #e8f4f8; }
.tactile-num button:active   { background: #d0eaf5; }
.tactile-num button:first-child { border-radius: 4px 0 0 4px; }
.tactile-num button:last-child  { border-radius: 0 4px 4px 0; }

/* ─── PANNEAU NOTATION ────────────────────────────────────────── */

@media screen and (max-width: 1199px) {
	.editor-section .notation {
		background: #F7F7F7;
		padding: 1em;
		padding-top: 0.5em;
		margin-top: 2em;
		border: solid 1pt #EEE;
		border-radius: 2pt;
	}
}

@media screen and (min-width: 1200px) {
	.editor-section .notation {
		z-index: 2;
		position: fixed;
		right: 0;
		top: 3.5rem;
		bottom: 0;
		background: #F7F7F7;
		border-left: solid 1pt #EEE;
		width: calc(100% - 50em);
		max-width: 35em;
	}

	.editor-section .notation .media-content,
	.editor-section .notation form {
		height: 100%;
	}

	.editor-section .notation form {
		padding: 1em;
		padding-top: 0;
		overflow: auto;
	}

	.go-left { margin: 0; }
}

@media screen and (min-width: 1450px) {
	.go-left { margin-left: 5em; }
}

@media screen and (min-width: 1550px) {
	.editor-section .notation { max-width: 40em; }
}

@media screen and (min-width: 1850px) {
	.editor-section .notation { max-width: 50em; }
}

.editor-section .notation table       { margin-top: 1em; }
.editor-section .notation table td    { padding-bottom: 0.5em; }
.editor-section .notation table td:nth-child(2n+1) { width: 100%; }
.editor-section .notation .field .control:last-child a { width: 4em; }
.editor-section .notation input[type="number"] { width: 6em; }
.editor-section .notation input[type="text"]   { width: 4em; }
.editor-section .notation table label          { line-height: 2.5em; }
.editor-section .notation .checkfield         { display: inline-block; min-width: 6em; }
.editor-section .notation input[type=checkbox] { width: 2em; transform: scale(1.5); }

/* ─── MOBILE ──────────────────────────────────────────────────── */

@media screen and (max-width: 599px) {
	.page-controls,
	.editor-section-toolbar {
		padding: 0.5rem;
	}

	.editor-section {
		padding-top: 5rem;
	}
}
