:root {
  color-scheme: light;
  --text: #183547;
  --muted: #48606a;
  --accent: #076054;
  --deep: #17384a;
  --background: #edf4f1;
  --paper: #fff;
  --border: #c5d8d0;
  --focus: #946300;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 1rem/1.58 system-ui, sans-serif;
}
[hidden] { display: none !important; }
a { color: var(--accent); font-weight: 640; text-underline-offset: .15em; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible,
summary:focus-visible, [contenteditable]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.wrap { width: min(71rem, calc(100% - 2rem)); margin-inline: auto; }
.page-header { background: var(--deep); color: #fff; padding: 1.5rem 0 2.1rem; }
.page-header a { color: #e1f6ef; }
.page-header p { max-width: 66ch; margin: .4rem 0 0; }
.page-header .context { color: #d1ebe4; font-weight: 650; }
.page-header nav { margin-top: 1rem; display: flex; flex-wrap: wrap; gap: .55rem 1.15rem; }
h1 { font-size: clamp(2rem, 5vw, 3.7rem); line-height: 1.08; margin: .52rem 0 .65rem; letter-spacing: -.035em; }
h2 { font-size: clamp(1.3rem, 3vw, 1.65rem); line-height: 1.22; margin: 0 0 .65rem; }
h3 { font-size: 1.05rem; line-height: 1.38; margin-top: 1.05rem; }
main { padding: 1.25rem 0 3.2rem; }
.start, .panel, .step, .question {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: .7rem;
}
.start, .panel, .question { padding: clamp(.9rem, 3vw, 1.5rem); margin-bottom: 1rem; }
.start p, .panel p { margin: .5rem 0; }
.steps { display: flex; flex-wrap: wrap; gap: .45rem; padding: .22rem 0; margin: 1rem 0; }
.steps a { padding: .4rem .64rem; border: 1px solid var(--border); background: #fff; border-radius: .4rem; }
.steps .start-action { background: var(--accent); color: #fff; border-color: var(--accent); }
.matinee { padding-inline-start: 1.3rem; }
.matinee li + li { margin-top: .45rem; }
.step { margin: .7rem 0; overflow-wrap: anywhere; scroll-margin-top: .8rem; }
.step > summary { padding: .85rem clamp(.8rem, 3vw, 1.45rem); cursor: pointer; font-size: 1.05rem; font-weight: 750; }
.step[open] > summary { border-bottom: 1px solid var(--border); background: #f5faf8; border-radius: .7rem .7rem 0 0; }
.step-content { padding: .8rem clamp(.8rem, 3vw, 1.45rem) 1.35rem; }
.step-content > p:first-child { margin-top: .3rem; }
.appui { margin: .85rem 0; padding: .55rem .8rem; border: 1px solid var(--border); border-radius: .4rem; }
.appui summary { cursor: pointer; font-weight: 650; }
.appui p, .appui ul { margin: .45rem 0; }
.appui ul { padding-inline-start: 1.25rem; }
.appui li + li { margin-top: .3rem; }
.data { max-width: 100%; overflow: auto; margin: 1rem 0; }
table { border-collapse: collapse; width: 100%; text-align: left; }
caption { margin-bottom: .3rem; text-align: left; font-weight: 700; }
th, td { padding: .42rem .52rem; border-bottom: 1px solid var(--border); vertical-align: top; }
thead { background: #e9f2ee; }
tbody th { white-space: nowrap; }
.task { background: #eaf3ee; border-inline-start: 4px solid var(--accent); padding: .65rem .85rem; }
.field { margin: 1rem 0; min-width: 0; }
.field > label, .file-label { display: block; margin-bottom: .35rem; font-weight: 720; }
.field small { display: block; max-width: 65ch; color: var(--muted); margin: .25rem 0 .55rem; }
input, textarea, button { color: inherit; font: inherit; }
input[type=text], input[type=password], textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: .38rem;
  background: #fff;
  padding: .55rem .65rem;
}
#code-sujet { max-width: 22rem; }
input[type=file] { max-width: 100%; }
textarea { min-height: 7rem; resize: vertical; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: .76rem 0 .25rem; }
button {
  cursor: pointer;
  background: #fff;
  border: 1px solid #9cbab0;
  border-radius: .4rem;
  padding: .42rem .68rem;
}
.primary {
  display: inline-block;
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  font-weight: 650;
  border-radius: .4rem;
  padding: .53rem .76rem;
}
.status { color: var(--muted); font-size: .92rem; }
.alert { color: #872d1d; }
.moteur-editeur {
  border: 1px solid #9cbab0;
  border-radius: .45rem;
  overflow-wrap: anywhere;
  background: #fff;
}
.outils-editeur {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  padding: .42rem;
  background: #edf4f1;
  border-bottom: 1px solid var(--border);
}
.outils-editeur button { font-size: .85rem; border-color: var(--border); padding: .24rem .49rem; }
.texte-editeur [contenteditable] { min-height: 8.3rem; padding: .65rem .8rem; line-height: 1.58; }
.texte-editeur [contenteditable] > :first-child { margin-top: 0; }
.texte-editeur [contenteditable] > :last-child { margin-bottom: 0; }
.texte-editeur p { margin: 0 0 .56rem; }
.copy-end { margin-top: 1.15rem; }
.paper-grid { display: grid; gap: 1rem; align-items: start; }
.exam-reading { margin: 0; }
.exam-reading td:first-child { white-space: nowrap; }
.question .field { margin-bottom: 0; }
@media (min-width: 65rem) {
  .paper-grid { grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); }
  .exam-reading { position: sticky; top: .7rem; max-height: calc(100vh - 1.4rem); overflow: auto; }
}
@media (max-width: 34rem) {
  .wrap { width: min(100% - 1rem, 71rem); }
  th, td { padding: .35rem .32rem; }
}
@media print {
  body { background: #fff; font-size: 10pt; }
  .wrap { width: 100%; }
  .page-header { background: #fff; color: var(--text); padding: 0 0 .6rem; }
  .page-header .context { color: var(--text); }
  h1 { font-size: 24pt; }
  main { padding: 0; }
  .start, .step { border: 0; margin: .9rem 0; padding: 0; }
  .step[open] summary { font-size: 14pt; background: #fff; border: 0; padding: .35rem 0; list-style: none; }
  summary::-webkit-details-marker { display: none; }
  .step-content { padding: 0; }
  nav, .actions, .nexus-seance, .field, .status { display: none !important; }
  .data { overflow: visible; }
  caption, h2, h3, summary { break-after: avoid; }
  tr { break-inside: avoid; }
}
