* { box-sizing: border-box; }

body {
  margin: 0;
  background: #f0f2f5;
  color: #1d2125;
  font-family: Roboto, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

/* En-tête */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 18px 40px 28px 52px;
}
.title-wrap { display: flex; align-items: center; gap: 12px; }
.quiz-icon {
  width: 56px; height: 56px; border-radius: 6px;
  background: #e8559b;
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.page-header h1 { margin: 0; font-size: 34px; font-weight: 700; word-break: break-all; }
.breadcrumb { text-align: right; color: #0f6cbf; max-width: 640px; flex: 0 1 auto; min-width: 0; }
.breadcrumb span { white-space: nowrap; }
.breadcrumb .sep { color: #8f959e; margin: 0 8px; }
.breadcrumb .current { color: #1d2125; }

/* Page */
.page {
  background: #fff;
  border-radius: 8px;
  max-width: 1160px;
  margin: 24px auto 40px;
  padding: 28px 40px 40px;
}
button { font: inherit; cursor: pointer; border: 0; border-radius: 8px; padding: 9px 14px; }
.btn-grey { background: #ced4da; color: #1d2125; }
.btn-grey:hover { background: #b8c0c8; }
.btn-blue { background: #2b4e85; color: #fff; padding: 10px 16px; }
.btn-blue:hover { background: #213d69; }
#retour { margin-bottom: 28px; }

.summary {
  border: 1px solid #dee2e6;
  border-radius: 6px;
  margin-bottom: 28px;
  overflow: hidden;
}
.summary table { width: 100%; border-collapse: collapse; }
.summary th, .summary td { padding: 9px 14px; text-align: left; border-bottom: 1px solid #dee2e6; }
.summary tr:last-child th, .summary tr:last-child td { border-bottom: 0; }
.summary th { width: 220px; background: #f8f9fa; font-weight: 700; }

/* Question */
.que { display: flex; gap: 24px; margin-bottom: 28px; }
.info {
  flex: 0 0 118px;
  align-self: flex-start;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 3px;
  padding: 8px;
  font-size: 13px;
}
.info .no { font-weight: 700; margin: 0 0 6px; }
.info .no b { font-size: 19px; }
.info p { margin: 0 0 8px; }
.flag { color: #0f6cbf; background: none; padding: 0; font-size: 13px; text-align: left; text-decoration: underline; border-radius: 0; }
.flag svg { vertical-align: -2px; margin-right: 4px; }
.flag.on svg path { fill: #ca3120; stroke: #ca3120; }

.content { flex: 1; min-width: 0; }
.formulation {
  background: #e7f3f5;
  border-radius: 8px;
  padding: 18px 22px 18px;
}
.formulation p { margin: 0 0 12px; }
.formulation .red { color: #ff0000; font-size: 16px; }
.formulation .func { font-weight: 600; }
.ablock { margin-top: 26px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ablock input {
  font: inherit;
  flex: 1;
  min-width: 200px;
  max-width: 660px;
  padding: 8px 12px;
  border: 1px solid #8f959e;
  border-radius: 8px;
  background: #fff;
  color: #1d2125;
}
.ablock input.short { flex: 0 1 300px; }
.ablock input:focus { outline: 0; border-color: #0f6cbf; box-shadow: 0 0 0 3px rgba(15,108,191,.25); }
.ablock input:disabled { background: #e9ecef; color: #495057; }
.mark { font-size: 20px; line-height: 1; font-weight: 700; }
.mark.ok { color: #357a32; }
.mark.ko { color: #ca3120; }

.feedback {
  background: #fcefdc;
  color: #8e662e;
  border-radius: 8px;
  padding: 20px 22px;
  margin-top: 18px;
}

.actions { display: flex; justify-content: flex-end; gap: 12px; }

@media (max-width: 700px) {
  .page-header { flex-direction: column; padding: 16px; }
  .breadcrumb { text-align: left; }
  .page { padding: 20px 16px; border-radius: 0; }
  .que { flex-direction: column; gap: 10px; }
  .info { flex-basis: auto; width: 100%; }
}

/* QCM */
.prompt { margin: 22px 0 6px; }
.answer-list { display: flex; flex-direction: column; gap: 4px; }
.answer-list label { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 4px; cursor: pointer; }
.answer-list input { width: 16px; height: 16px; margin: 0; accent-color: #0f6cbf; }
.answer-list label.ok { background: #d7ead3; }
.answer-list label.ko { background: #f7d7d3; }
.answer-list .mark { margin-left: 6px; }
.clear-choice { color: #0f6cbf; background: none; padding: 0; font-size: 14px; text-decoration: underline; border-radius: 0; margin-top: 6px; align-self: flex-start; }


/* Gestion de projets : vérification par question */
.consigne { margin: 0 0 22px; }
.consigne b { text-decoration: underline; }
.progress { position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 1px solid #dee2e6; padding: 10px 0; margin-bottom: 22px; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 14px; }
.progress .bar { flex: 1 1 200px; height: 8px; background: #e9ecef; border-radius: 4px; overflow: hidden; }
.progress .bar span { display: block; height: 100%; width: 0; background: #2b4e85; transition: width .2s; }
.info .ch { color: #495057; font-size: 12px; }
.answer-list label.miss { background: #fff3cd; }
.answer-list label.miss .mark { color: #8e662e; }
.qbtns { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.qbtns button { padding: 7px 14px; font-size: 14px; }
.feedback.ok { background: #d7ead3; color: #1e4d1c; }
.feedback.ko { background: #f7d7d3; color: #7a1f14; }
.feedback .verdict { font-weight: 700; margin: 0 0 6px; }
.feedback p { margin: 0 0 6px; }
.feedback p:last-child { margin: 0; }
.hint { color: #ca3120; font-size: 14px; margin-top: 8px; }
.que.done .info { border-color: #adb5bd; }
