/* Questions Examen Civique — styles du module quiz.
   Palette du site : bleu-vert pétrole, ambre, contrastes AA. */
.qec {
	--qec-blue: #0E5A6B;
	--qec-blue-dark: #0A4452;
	--qec-blue-soft: #E6F0F2;
	--qec-accent: #F4B740;
	--qec-ok: #1d7a46;
	--qec-ok-soft: #e4f4ea;
	--qec-ko: #b42318;
	--qec-ko-soft: #fdecea;
	--qec-line: #D5DCE0;
	--qec-muted: #4A5361;
	margin: 1.5em 0;
	font-size: 1.0625rem;
	line-height: 1.55;
}
.qec-card {
	border: 1px solid var(--qec-line);
	border-radius: 12px;
	padding: 1.25em 1.25em 1.5em;
	background: #fff;
	color: #1B1F27;
}
.qec-head {
	display: flex;
	justify-content: space-between;
	gap: 1em;
	font-size: .9em;
	color: var(--qec-muted);
	margin-bottom: .5em;
}
.qec-progress { height: 6px; background: var(--qec-blue-soft); border-radius: 3px; overflow: hidden; margin-bottom: 1em; }
.qec-progress-fill { height: 100%; background: var(--qec-blue); transition: width .3s; }
.qec-title { font-weight: 700; font-size: 1.15em; margin: 0 0 .5em; }
.qec-subtitle { font-weight: 700; margin: 1.5em 0 .5em; }
.qec-meta { font-size: .85em; color: var(--qec-muted); margin: 0 0 .25em; }
.qec-question { font-weight: 600; font-size: 1.1em; margin: 0 0 1em; }
.qec-answers { display: grid; gap: .6em; }
.qec-answer {
	display: flex;
	align-items: flex-start;
	gap: .75em;
	width: 100%;
	text-align: left;
	padding: .75em 1em;
	border: 1px solid var(--qec-line);
	border-radius: 10px;
	background: #fff;
	color: inherit;
	font: inherit;
	cursor: pointer;
	transition: border-color .15s, background .15s;
}
.qec-answer:hover:not(:disabled) { border-color: var(--qec-blue); background: var(--qec-blue-soft); }
.qec-answer:focus-visible { outline: 3px solid var(--qec-blue); outline-offset: 2px; }
.qec-answer:disabled { cursor: default; }
.qec-letter {
	flex: 0 0 auto;
	width: 1.8em;
	height: 1.8em;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: .85em;
	background: var(--qec-blue-soft);
	color: var(--qec-blue);
}
.qec-answer.is-selected { border-color: var(--qec-blue); background: var(--qec-blue-soft); }
.qec-answer.is-selected .qec-letter { background: var(--qec-blue); color: #fff; }
.qec-answer.is-correct { border-color: var(--qec-ok); background: var(--qec-ok-soft); }
.qec-answer.is-correct .qec-letter { background: var(--qec-ok); color: #fff; }
.qec-answer.is-wrong { border-color: var(--qec-ko); background: var(--qec-ko-soft); }
.qec-answer.is-wrong .qec-letter { background: var(--qec-ko); color: #fff; }
.qec-feedback:not(:empty) { margin-top: 1em; }
.qec-verdict { font-weight: 700; margin: 0 0 .5em; }
.qec-verdict.is-ok, .qec-big.is-ok { color: var(--qec-ok); }
.qec-verdict.is-ko, .qec-big.is-ko { color: var(--qec-ko); }
.qec-expl { border-left: 3px solid var(--qec-blue); padding: .25em 0 .25em 1em; margin: .5em 0 1em; }
.qec-expl-text { margin: 0 0 .5em; }
.qec-expl-tr { margin: .5em 0; font-size: 1.05em; }
.qec-sources { font-size: .85em; color: var(--qec-muted); margin: .5em 0 0; }
.qec-source-link { font-weight: 600; }
.qec-sources a { color: var(--qec-blue); }
.qec-link-btn { background: none; border: 0; padding: 0; color: var(--qec-blue); text-decoration: underline; cursor: pointer; font: inherit; font-size: .9em; }
.qec-btn {
	display: inline-block;
	padding: .65em 1.2em;
	border-radius: 999px;
	border: 1px solid var(--qec-line);
	background: #fff;
	color: inherit;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	margin: .25em .5em .25em 0;
}
.qec-btn { min-height: 48px; box-sizing: border-box; }
.qec-btn:disabled { opacity: .45; cursor: default; }
.qec-btn-primary { background: var(--qec-blue); border-color: var(--qec-blue); color: #fff; }
.qec-btn-end { border-color: var(--qec-ko); color: var(--qec-ko); }
.qec-btn:focus-visible { outline: 3px solid var(--qec-blue); outline-offset: 2px; }
.qec-nav { display: flex; flex-wrap: wrap; align-items: center; margin-top: 1em; }
.qec-nav .qec-btn-end { margin-left: auto; }
.qec-warn { color: var(--qec-ko); font-size: .9em; margin: .5em 0 0; }
.qec-timer { font-variant-numeric: tabular-nums; font-weight: 600; }
.qec-timer.is-low { color: var(--qec-ko); }
.qec-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: .75em; margin: .5em 0 1em; }
.qec-field { display: flex; flex-direction: column; gap: .25em; font-size: .9em; color: var(--qec-muted); }
.qec-field select { font: inherit; min-height: 48px; padding: .45em; border-radius: 8px; border: 1px solid var(--qec-line); color: #1B1F27; background: #fff; }
.qec-info { font-size: .9em; color: var(--qec-muted); }
.qec-big { font-size: 2.2em; font-weight: 800; margin: 0; }
.qec-missed { padding-left: 1.2em; }
.qec-missed li { margin-bottom: .4em; }
.qec-review { border-top: 1px solid var(--qec-line); padding-top: .75em; margin-top: .75em; }
.qec-review p { margin: .2em 0; }
.qec-review.is-ok > p:nth-child(2) { color: var(--qec-ok); }
.qec-review.is-ko > p:nth-child(2) { color: var(--qec-ko); }
.qec-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .75em; margin-bottom: 1em; }
.qec-stat { border: 1px solid var(--qec-line); border-radius: 10px; padding: .75em; text-align: center; }
.qec-stat-n { display: block; font-size: 1.6em; font-weight: 800; color: var(--qec-blue); }
.qec-stat-l { font-size: .85em; color: var(--qec-muted); }
@media (max-width: 480px) {
	.qec-card { padding: 1em; }
	.qec-nav .qec-btn-end { margin-left: 0; }
}

/* ---------- v1.1 : thèmes à revoir, progression par matière ---------- */
.qec-revoir { margin: 1.25em 0; }
.qec-revoir-liste { list-style: none; padding: 0; margin: .5em 0 1em; }
.qec-revoir-liste li {
	display: flex; justify-content: space-between; align-items: center; gap: 1em;
	padding: .75em 1em; margin-bottom: .5em; min-height: 48px; box-sizing: border-box;
	border: 1px solid var(--qec-line); border-left: 4px solid var(--qec-accent); border-radius: 10px; background: #fff;
}
.qec-revoir-nom { font-weight: 600; color: var(--qec-blue); }
.qec-revoir-score { color: var(--qec-muted); font-size: .95em; white-space: nowrap; }
a.qec-btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.qec-matieres { list-style: none; padding: 0; margin: .5em 0 1.25em; }
.qec-matieres li { margin-bottom: .9em; }
.qec-matiere-top { display: flex; justify-content: space-between; gap: 1em; margin-bottom: .3em; font-size: .95em; }
.qec-matiere-nom { font-weight: 600; color: #1B1F27; }
a.qec-matiere-nom { color: var(--qec-blue); }
.qec-matiere-pct { color: var(--qec-muted); white-space: nowrap; }
.qec-matieres .is-weak .qec-progress-fill { background: var(--qec-accent); }
.qec-matieres .is-weak .qec-matiere-pct::before { content: "⚠ "; }
.qec-matieres .is-good .qec-progress-fill { background: var(--qec-ok); }
.qec-btn-primary:hover { background: var(--qec-blue-dark); }

/* ---------- v1.2 : page Questions et réponses ---------- */
.qec-qr { margin: 1.5em 0; }
.qec-qr-outils { background: #F3F6F7; border-radius: 14px; padding: 1em 1.25em; margin-bottom: 1.5em; }
.qec-qr-champ { display: flex; flex-direction: column; gap: .3em; font-weight: 600; }
.qec-qr-recherche { font: inherit; font-weight: 400; min-height: 48px; padding: .5em .9em; border: 1px solid #D5DCE0; border-radius: 10px; background: #fff; width: 100%; box-sizing: border-box; }
.qec-qr-recherche:focus-visible { outline: 3px solid #F4B740; outline-offset: 1px; }
.qec-qr-mentions { border: 0; padding: 0; margin: .9em 0 0; display: flex; flex-wrap: wrap; gap: .5em; }
.qec-qr-mentions legend { font-weight: 600; margin-bottom: .4em; width: 100%; }
.qec-qr-mentions label { display: inline-flex; align-items: center; gap: .4em; min-height: 44px; padding: 0 .9em; border: 1px solid #D5DCE0; border-radius: 999px; background: #fff; cursor: pointer; font-size: .95em; }
.qec-qr-mentions label:has(input:checked) { border-color: #0E5A6B; background: #E6F0F2; color: #0A4452; font-weight: 600; }
.qec-qr-compte { margin: .7em 0 0; font-size: .9em; color: #4A5361; }
.qec-qr-sommaire { margin: 0 0 1.5em; }
.qec-qr-sommaire-titre { font-weight: 600; margin: 0 0 .4em; }
.qec-qr-sommaire ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5em; }
.qec-qr-sommaire a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 .9em; border: 1px solid #0E5A6B; border-radius: 999px; color: #0E5A6B; text-decoration: none; font-weight: 600; font-size: .95em; }
.qec-qr-sommaire a span { font-weight: 400; margin-left: .25em; }
.qec-qr-groupe { margin-top: 2em; scroll-margin-top: 120px; }
.qec-qr-entrainer { margin: .25em 0 1em; }
.qec-qr-item { border: 1px solid #D5DCE0; border-radius: 12px; padding: 1em 1.2em; margin-bottom: .9em; background: #fff; scroll-margin-top: 120px; }
.qec-qr-question { font-size: 1.1em; margin: 0 0 .5em; line-height: 1.35; }
.qec-qr-reponse { margin: 0 0 .5em; padding: .5em .8em; background: #E4F4EA; border-left: 4px solid #1D7A46; border-radius: 6px; }
.qec-qr-explication { margin: 0 0 .5em; }
.qec-qr-sources { margin: 0; font-size: .9em; color: #4A5361; }
.qec-qr-sources a { color: #0E5A6B; font-weight: 600; }
.qec-qr-tags { font-weight: 600; letter-spacing: .02em; }
.qec-qr-aucun { padding: 1em; background: #FDECEA; border-radius: 10px; }

/* ---------- v2.0 : expérience façon appli (maquette mobile validée) ---------- */
.qec-card { border-radius: 18px; box-shadow: 0 2px 10px rgba(16, 40, 48, .05); }
.qec-question { font-size: 1.2em; line-height: 1.4; }
.qec-answer { min-height: 56px; border-width: 1.5px; border-radius: 14px; font-weight: 500; align-items: center; }
.qec-letter { width: 2em; height: 2em; border-radius: 9px; }
.qec-btn { border-radius: 14px; }
.qec-btn-block { display: flex; width: 100%; justify-content: center; align-items: center; margin: 0; min-height: 52px; font-size: 1.05em; font-weight: 800; text-decoration: none; }
.qec-expl { border-left: 0; padding: 1em; border-radius: 14px; background: var(--qec-blue-soft); }
.qec-feedback .qec-verdict { font-size: 1.05em; }

/* Badges matière / difficulté */
.qec-meta { display: flex; flex-wrap: wrap; gap: .4em; margin: 0 0 .75em; }
.qec-badge { display: inline-flex; align-items: center; min-height: 26px; padding: 0 .7em; border-radius: 999px; font-size: .8em; font-weight: 700; background: var(--qec-blue-soft); color: var(--qec-blue); }
.qec-badge-facile { background: var(--qec-ok-soft); color: var(--qec-ok); }
.qec-badge-moyen { background: #FFF4E0; color: #8A4B00; }
.qec-badge-difficile { background: var(--qec-ko-soft); color: var(--qec-ko); }
.qec-badge-ms { background: #EEF0F3; color: #3B4250; }

/* Parcours : étapes et choix */
.qec-step { border: 0; margin: 0 0 1.4em; padding: 0; min-width: 0; }
.qec-step-title { font-size: .8em; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--qec-muted); margin: 0 0 .7em; padding: 0; }
.qec-choices { display: grid; gap: .6em; }
.qec-choices-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qec-choice {
	display: flex; align-items: center; justify-content: space-between; gap: .75em;
	width: 100%; min-height: 60px; padding: .75em 1em; box-sizing: border-box;
	border: 1.5px solid var(--qec-line); border-radius: 14px; background: #fff; color: #1B1F27;
	font: inherit; text-align: left; cursor: pointer; transition: background .15s, border-color .15s;
}
.qec-choices-2 .qec-choice { flex-direction: column; align-items: flex-start; justify-content: flex-start; min-height: 92px; }
.qec-choice:hover { border-color: var(--qec-blue); }
.qec-choice:focus-visible { outline: 3px solid var(--qec-accent); outline-offset: 2px; }
.qec-choice.is-on { background: var(--qec-blue); border-color: var(--qec-blue); color: #fff; }
.qec-choice-txt { display: flex; flex-direction: column; gap: .15em; }
.qec-choice-label { font-weight: 700; font-size: 1.02em; }
.qec-choice-sub { font-size: .85em; opacity: .85; line-height: 1.35; }
.qec-choice-side { font-size: .85em; font-weight: 700; white-space: nowrap; }
.qec-cta { margin-top: 1.25em; }
@media (max-width: 781px) {
	.qec-parcours .qec-cta { position: sticky; bottom: 76px; z-index: 5; margin: 1.25em -1em -1em; padding: .75em 1em; background: #fff; border-top: 1px solid var(--qec-line); border-radius: 0 0 18px 18px; }
}

/* Résultat */
.qec-result { display: flex; align-items: center; gap: 1.1em; padding: 1.25em; border-radius: 18px; background: var(--qec-blue); color: #fff; margin-bottom: 1.25em; }
.qec-result.is-ko { background: #3B4250; }
.qec-ring { --qec-p: 0; flex: 0 0 auto; width: 96px; height: 96px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
	background: conic-gradient(var(--qec-accent) calc(var(--qec-p) * 1%), rgba(255, 255, 255, .22) 0); }
.qec-ring-in { width: 76px; height: 76px; border-radius: 50%; background: inherit; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.25em; }
.qec-result .qec-ring-in { background: var(--qec-blue); }
.qec-result.is-ko .qec-ring-in { background: #3B4250; }
.qec-result-txt { display: flex; flex-direction: column; gap: .2em; }
.qec-result-label { font-size: .85em; opacity: .85; }
.qec-result .qec-big { color: #fff; font-size: 1.9em; line-height: 1.1; }
.qec-result-msg { font-size: .95em; opacity: .95; }
.qec-bars { margin: 0 0 1em; }
.qec-bar-row { margin-bottom: .8em; }
.qec-bar-top { display: flex; justify-content: space-between; gap: 1em; font-size: .95em; margin-bottom: .3em; }
.qec-bar-row .qec-progress { height: 8px; border-radius: 99px; margin: 0; }
.qec-bar-row.is-weak .qec-progress-fill { background: var(--qec-accent); }
.qec-actions { display: grid; gap: .6em; margin-top: 1em; }
.qec-actions .qec-btn { width: 100%; margin: 0; }
.qec-revoir a.qec-btn { width: 100%; margin: .25em 0 0; border-color: var(--qec-blue); color: var(--qec-blue); }

/* Espace Entretien */
.qec-hub { display: flex; flex-direction: column; gap: .75em; }
.qec-tile { display: flex; flex-direction: column; gap: .25em; width: 100%; padding: 1em 1.1em; box-sizing: border-box; border: 1px solid var(--qec-line); border-radius: 16px; background: #fff; color: #1B1F27; font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.qec-tile:hover { border-color: var(--qec-blue); }
.qec-tile:focus-visible { outline: 3px solid var(--qec-accent); outline-offset: 2px; }
.qec-tile-primary { background: var(--qec-blue); border-color: var(--qec-blue); color: #fff; }
.qec-tile-primary:hover { background: var(--qec-blue-dark); }
.qec-tile-title { font-size: 1.1em; font-weight: 800; }
.qec-tile-sub { font-size: .9em; opacity: .85; }
.qec-hub .qec-step-title { margin-top: .75em; }
.qec-parts { display: grid; gap: .5em; }
.qec-part { display: flex; justify-content: space-between; align-items: center; gap: 1em; min-height: 52px; padding: 0 1em; border: 1px solid var(--qec-line); border-radius: 12px; background: #fff; color: #1B1F27; font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.qec-part:hover { border-color: var(--qec-blue); }
.qec-part:focus-visible { outline: 3px solid var(--qec-accent); outline-offset: 2px; }
.qec-part-n { font-size: .85em; font-weight: 400; color: var(--qec-muted); white-space: nowrap; }

/* Questions et réponses : numéro de question */
.qec-qr-id { display: inline-block; vertical-align: .1em; margin-right: .35em; padding: .1em .5em; border-radius: 7px; font-size: .72em; font-weight: 800; letter-spacing: .02em; background: #E6F0F2; color: #0E5A6B; white-space: nowrap; }

/* ---------- v2.1 : bloc Actualités ---------- */
.qec-actus { margin: 0; }
.qec-actus-titre-bloc { margin: 0 0 .6em; }
.qec-actus-liste { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.qec-actus-liste li { margin: 0; }
.qec-actus-carte { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid #D5DCE0; border-radius: 14px; background: #fff; color: #1B1F27; text-decoration: none; }
.qec-actus-carte:hover { border-color: #0E5A6B; }
.qec-actus-carte:hover .qec-actus-titre { color: #0E5A6B; text-decoration: underline; }
.qec-actus-carte:focus-visible { outline: 3px solid #F4B740; outline-offset: 2px; }
.qec-actus-titre { font-weight: 700; line-height: 1.35; }
.qec-actus-date { font-size: .85rem; color: #4A5361; }
.qec-actus-tout { margin: 12px 0 0; }
.qec-actus-tout a { font-weight: 700; color: #0E5A6B; }
.qec-actus-vide { color: #4A5361; }
@media (min-width: 782px) { .qec-actus-liste { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* v2.1.1 — réserve la place avant le chargement du JS (évite le décalage de mise en page / CLS) */
.qec-wait.qec-m-parcours { min-height: 900px; }
.qec-wait.qec-m-entretien { min-height: 680px; }
@media (min-width: 600px) {
	.qec-wait.qec-m-parcours { min-height: 830px; }
	.qec-wait.qec-m-entretien { min-height: 650px; }
}

/* v2.2.0 — sommaire des thèmes [qec_themes] */
.qec-themes { list-style: none; margin: 1.5em 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.qec-themes li { margin: 0; }
.qec-theme-carte { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--qec-line); border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit; background: #fff; transition: box-shadow .2s, border-color .2s; }
.qec-theme-carte:hover, .qec-theme-carte:focus-visible { border-color: var(--qec-blue); box-shadow: 0 4px 14px rgba(14, 90, 107, .15); }
.qec-theme-img { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; }
.qec-theme-nom { display: block; padding: 12px 16px 4px; font-weight: 700; font-size: 1.1em; color: var(--qec-blue-dark); }
.qec-theme-cta { display: block; padding: 0 16px 14px; font-size: .9em; color: var(--qec-blue); }
