/* ===================== Module Cours ===================== */
[hidden] { display: none !important; }
textarea { display: block; width: 100%; margin-top: .3rem; padding: .55rem .7rem; font: inherit; border: 1px solid var(--border); border-radius: var(--radius-sm); resize: vertical; }
.card.narrow.wide { max-width: 680px; }
.container.wide { max-width: 1500px; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: .8rem; }
.crumbs a { text-decoration: none; }
.eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); margin: 0 0 .3rem; }
.row.nowrap { flex-wrap: nowrap; align-items: center; }
.btn.icon { padding: .2rem .5rem; }
.badge.blue { background: var(--blue-soft); color: var(--primary); }
.check { color: var(--green); font-weight: 700; }
.card.empty { text-align: center; padding: 2.5rem 1.5rem; }
ul.plain { list-style: none; padding: 0; margin: 0 0 .8rem; }
ul.plain li { padding: .25rem 0; display: flex; justify-content: space-between; gap: 1rem; }
kbd { font-family: var(--f-mono); font-size: .8em; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 0 .3em; background: var(--surface); }

/* Liste des chapitres */
.chapter-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.chapter-item { display: flex; align-items: center; gap: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1.1rem; }
.chapter-item.inactive { opacity: .55; }
.chapter-num { width: 2.2rem; height: 2.2rem; flex: none; border-radius: var(--radius-sm); background: var(--nav); color: var(--nav-ink); font-family: var(--f-mono); display: grid; place-items: center; font-weight: 700; }
.chapter-main { flex: 1; min-width: 0; }
.chapter-main p { margin: .15rem 0 0; }
.chapter-title { font-weight: 700; font-size: 1.05rem; text-decoration: none; color: var(--text); }
.chapter-title:hover { color: var(--primary); }
.chapter-side { display: flex; align-items: center; gap: .35rem; }
h1 .badge { vertical-align: middle; font-size: .75rem; }

/* Éditeur */
.editor-top { display: flex; gap: 1rem; align-items: center; margin-bottom: .6rem; }
.title-input { flex: 1; font-size: 1.35rem; font-weight: 700; margin: 0; }
#save-state.warn { color: var(--amber); } #save-state.ok { color: var(--green); } #save-state.err { color: var(--red); }
.toolbar { display: flex; flex-wrap: wrap; gap: .25rem; align-items: center; padding: .4rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius) 8px 0 0; border-bottom: 0; position: sticky; top: var(--topbar-h); z-index: 5; }
.toolbar button { border: 1px solid transparent; background: none; padding: .3rem .55rem; border-radius: 5px; cursor: pointer; font: inherit; font-size: .88rem; color: var(--text); }
.toolbar button:hover { background: var(--surface-2); border-color: var(--border); }
.toolbar .sep { width: 1px; height: 1.3rem; background: var(--border); margin: 0 .2rem; }
.toolbar .tb-help { margin-left: auto; font-size: .85rem; }
.toolbar .tb-def { color: var(--primary); } .toolbar .tb-ret { color: var(--green); } .toolbar .tb-att { color: var(--red); } .toolbar .tb-ex { color: var(--purple); }
.editor-split { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border); border-radius: 0 0 8px 8px; overflow: hidden; background: var(--surface); }
.pane { display: flex; flex-direction: column; min-width: 0; }
.pane + .pane { border-left: 1px solid var(--border); }
.pane-head { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: .35rem .8rem; border-bottom: 1px solid var(--border); background: var(--surface-2); }
#body { margin: 0; border: 0; border-radius: 0; min-height: 68vh; height: 68vh; resize: none; font: 14px/1.6 var(--f-mono); padding: 1rem; tab-size: 4; }
#body:focus { outline: none; }
#preview { padding: 1rem 1.4rem; overflow-y: auto; height: 68vh; }
.editor-bottom { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; margin-top: 1rem; align-items: start; }
.file-list { list-style: none; padding: 0; margin: 0 0 .5rem; }
.file-list li { display: flex; align-items: center; gap: .6rem; padding: .35rem 0; border-bottom: 1px solid var(--border); }
.file-list li a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-kind { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); width: 5.5rem; }
.table.cheat td { font-size: .85rem; padding: .4rem .6rem; }

/* Lecture d'une leçon */
.preview-banner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--amber-soft); border: 1px solid var(--amber-line); border-radius: var(--radius); padding: .55rem .9rem; margin-bottom: 1rem; font-size: .9rem; }
.lesson-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.lesson-layout.single { grid-template-columns: minmax(0, 1fr); }
.lesson-toc { position: sticky; top: calc(var(--topbar-h) + 1rem); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; font-size: .92rem; }
.lesson-toc ol { margin: 0; padding-left: 1.2rem; }
.lesson-toc li { padding: .3rem 0; }
.lesson-toc li.current > a { font-weight: 700; color: var(--text); text-decoration: none; }
.lesson-toc { max-height: calc(100vh - var(--topbar-h) - 2rem); overflow-y: auto; }
.toc-current { font-weight: 700; margin: 0 0 .4rem; }
/* Sommaire des sous-titres de la leçon en cours */
.toc-sections { margin: .45rem 0 .3rem; }
.toc-sections ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.toc-sections li { padding: 0; }
.toc-sections a { display: block; padding: .28rem .6rem .28rem .8rem; margin-left: -2px; border-left: 2px solid transparent;
  color: var(--muted); text-decoration: none; font-size: .86rem; line-height: 1.35; font-weight: 400; }
.toc-sections li.lvl-3 a { padding-left: 1.6rem; font-size: .82rem; }
.toc-sections a:hover { color: var(--text); background: var(--surface-2); }
.toc-sections a.active { color: var(--primary); border-left-color: var(--primary); font-weight: 600; background: var(--primary-soft); }
.lesson-content h2, .lesson-content h3 { scroll-margin-top: calc(var(--topbar-h) + 1rem); }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.lesson-page { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem 2.4rem; max-width: 860px; width: 100%; margin-bottom: 1rem; }
.lesson-page > h1 { font-size: 1.9rem; margin-bottom: 1.2rem; }
.lesson-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.prevnext { display: flex; gap: .5rem; flex-wrap: wrap; }
.resources { margin-top: 2rem; padding: 1rem 1.2rem; background: var(--surface-2); border-radius: var(--radius); }
.resources h2 { font-size: 1rem; } .resources ul { margin: 0; padding-left: 1.2rem; }

/* Contenu Markdown rendu */
.lesson-content { font-size: 1.02rem; line-height: 1.7; }
.lesson-content h2 { font-size: 1.4rem; margin: 2rem 0 .7rem; padding-bottom: .3rem; border-bottom: 2px solid var(--border); }
.lesson-content h3 { font-size: 1.15rem; margin: 1.5rem 0 .5rem; }
.lesson-content > :first-child { margin-top: 0; }
.lesson-content img { max-width: 100%; height: auto; border-radius: 6px; display: block; margin: 1rem auto; }
.lesson-content code { font-size: .9em; }
.lesson-content blockquote { margin: 1rem 0; padding: .3rem 1rem; border-left: 4px solid var(--border); color: var(--muted); }
.lesson-content .table-wrap { overflow-x: auto; margin: 1rem 0; }
.lesson-content table { border-collapse: collapse; min-width: 50%; }
.lesson-content th, .lesson-content td { border: 1px solid var(--border); padding: .45rem .75rem; text-align: left; }
.lesson-content th { background: var(--surface-2); }
.code { margin: 1.1rem 0; border: 1px solid var(--code-line); border-radius: var(--radius); overflow: hidden; background: var(--code-bg); color: var(--code-ink); }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: .3rem .5rem .3rem .8rem; background: var(--code-head); border-bottom: 1px solid var(--code-line); font: 500 .72rem var(--f-mono); color: var(--code-muted); text-transform: uppercase; letter-spacing: .08em; }
.code-actions { display: flex; gap: .3rem; }
.code-btn { border: 1px solid var(--code-line); background: transparent; border-radius: var(--radius-sm); padding: .18rem .6rem; font: 500 .75rem var(--f-sans); text-transform: none; letter-spacing: 0; cursor: pointer; color: var(--code-ink); }
.code-btn:hover { border-color: var(--code-ok); color: var(--code-ok); }
.code-btn.run { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.code-btn.run:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-ink); }
.code-btn:disabled { opacity: .6; cursor: wait; }
.run-panel { margin: -.6rem 0 1.1rem; border: 1px solid var(--border); border-top: 0; border-radius: 0 0 8px 8px; background: var(--code-bg); }
.run-head { display: flex; justify-content: space-between; align-items: center; padding: .3rem .6rem; color: var(--code-ink); }
.run-panel .console-out { margin: 0; border-radius: 0 0 8px 8px; max-height: 260px; }
.code pre { margin: 0; padding: .85rem 1rem; overflow-x: auto; font: 14px/1.6 var(--f-mono); tab-size: 4; color: var(--code-ink); background: transparent; }
.code pre code, pre code, .console-out code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; border-radius: 0; }
.callout { margin: 1.1rem 0; border-radius: var(--radius-sm); border: 1px solid; border-top-width: 3px; padding: .7rem 1rem; }
.callout-title { font: 500 .74rem var(--f-mono); text-transform: uppercase; letter-spacing: .1em; margin-bottom: .3rem; }
.callout-body > :first-child { margin-top: 0; } .callout-body > :last-child { margin-bottom: 0; }
.callout-definition { background: var(--primary-soft); border-color: var(--primary-line); border-left-color: var(--primary); } .callout-definition .callout-title { color: var(--primary); }
.callout-retenir { background: var(--green-soft); border-color: var(--green-line); border-left-color: var(--green); } .callout-retenir .callout-title { color: var(--green); }
.callout-attention { background: var(--red-soft); border-color: var(--red-line); border-left-color: var(--red); } .callout-attention .callout-title { color: var(--red); }
.callout-exemple { background: var(--purple-soft); border-color: var(--purple-line); border-left-color: var(--purple); } .callout-exemple .callout-title { color: var(--purple); }
.callout-info { background: var(--surface-2); border-color: var(--border); border-left-color: var(--muted); } .callout-info .callout-title { color: var(--muted); }

.fold { margin: 1rem 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.fold > summary { cursor: pointer; padding: .55rem 1rem; font-weight: 600; font-size: .92rem; list-style: none; display: flex; align-items: center; gap: .5rem; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::before { content: "▸"; transition: transform .15s; color: var(--muted); }
.fold[open] > summary::before { transform: rotate(90deg); }
.fold-correction > summary { color: var(--green); } .fold-indice > summary { color: var(--amber); }
.fold-body { padding: 0 1rem .8rem; border-top: 1px solid var(--border); }
.fold-body > :first-child { margin-top: .8rem; }
.lesson-content h3 + p .diff, .lesson-content .meta { color: var(--muted); }

/* ===================== Exercices / devoirs ===================== */
select { display: block; width: 100%; margin-top: .3rem; padding: .5rem .6rem; font: inherit; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.ex-settings { display: grid; grid-template-columns: 2fr 1.3fr .8fr 1.3fr 1.3fr; gap: .2rem 1rem; align-items: end; padding: 1rem 1.2rem .4rem; }
.ex-settings label { margin-bottom: .6rem; font-size: .88rem; }
.ex-settings .check-label { display: flex; align-items: center; gap: .5rem; font-weight: 500; grid-column: 1 / 3; }
.ex-settings .check-label input { width: auto; margin: 0; }
.ex-settings .span-all { grid-column: 3 / -1; margin: 0 0 .6rem; }
.starter { margin-top: 1rem; }
.code-input { font: 14px/1.55 var(--f-mono); tab-size: 4; background: var(--surface-2); }
h2.sub { font-size: 1.1rem; margin: 1.6rem 0 .7rem; }
.due.soon strong, .due.soon { color: var(--amber); }
.due.past, .due.past strong { color: var(--muted); }
.ex-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.5rem; align-items: start; }
.ex-side { position: sticky; top: calc(var(--topbar-h) + 1rem); }
.ex-side .card h2 { font-size: 1rem; }
.due-big { font-size: .98rem; margin: 0 0 .5rem; }
.ex-list { display: grid; gap: .7rem; }
.ex-card { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--primary); border-radius: var(--radius); padding: .9rem 1.2rem; text-decoration: none; color: var(--text); }
.ex-card:hover { border-color: var(--primary); }
.ex-card h3 { margin: 0; font-size: 1.05rem; }
.ex-card .eyebrow { margin-bottom: .15rem; }
.ex-card.soon { border-left-color: var(--amber); }
.ex-card.past { border-left-color: var(--border); opacity: .75; }
.ex-card-due { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; font-size: .88rem; text-align: right; }
.linked-ex { margin-top: 2rem; padding: 1rem 1.2rem; border: 1px solid var(--primary-line); background: var(--primary-soft); border-radius: var(--radius); }
.linked-ex h2 { font-size: 1rem; margin: 0 0 .5rem; }
.linked-ex ul { margin: 0; padding-left: 1.2rem; }
.linked-ex li { padding: .2rem 0; }
@media (max-width: 1100px) { .ex-settings { grid-template-columns: 1fr 1fr; } .ex-settings .check-label, .ex-settings .span-all { grid-column: 1 / -1; } }
@media (max-width: 900px) { .ex-layout { grid-template-columns: 1fr; } .ex-side { position: static; } }

/* ===================== Laboratoire Python ===================== */
.row-between { display: flex; justify-content: space-between; align-items: center; gap: .6rem; }
.ws-card h2 { margin-bottom: .7rem; }
.ws-bar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .6rem; }
.save-state { margin-left: auto; }
.save-state.warn { color: var(--amber); } .save-state.ok { color: var(--green); } .save-state.err { color: var(--red); }
.ws-split { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ws-pane { display: flex; flex-direction: column; min-width: 0; background: var(--surface); }
.ws-pane + .ws-pane { border-left: 1px solid var(--border); background: var(--code-bg); }
.ws-pane + .ws-pane .pane-head { background: var(--code-head); color: var(--code-ink); border-color: var(--code-line); }
.code-editor { margin: 0; border: 0; border-radius: 0; height: 52vh; min-height: 320px; resize: vertical; padding: .9rem 1rem;
  font: 14px/1.6 var(--f-mono); tab-size: 4; white-space: pre; overflow: auto; background: var(--code-bg); color: var(--code-ink); caret-color: var(--code-ok); }
.code-editor:focus { outline: none; background: var(--code-bg); }
.console-out { flex: 1; margin: 0; padding: .8rem 1rem; min-height: 120px; overflow: auto; white-space: pre-wrap; word-break: break-word;
  font: 13.5px/1.55 var(--f-mono); color: var(--code-ink); background: var(--code-bg); }
.console-out.static { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 6px; max-height: 320px; }
.console-out .c-err { color: var(--code-err); }
.console-out .c-hint { color: var(--code-hint); }
.console-out .c-muted { color: var(--code-muted); font-style: italic; }
.run-status { color: var(--code-muted); font-weight: 500; text-transform: none; letter-spacing: 0; }
.stdin-box { border-top: 1px solid var(--code-line); color: var(--code-ink); }
.stdin-box summary { padding: .35rem .8rem; font-size: .8rem; cursor: pointer; }
.stdin-box textarea { margin: 0; border: 0; border-radius: 0; background: var(--code-head); color: var(--code-ink); font: 13px/1.5 var(--f-mono); }
#sub-run .stdin-box { border: 1px solid var(--border); border-radius: 6px; color: var(--text); margin: .6rem 0; }
#sub-run .stdin-box textarea { background: var(--surface); color: var(--text); }
#sub-run .console-out { border-radius: 6px; min-height: 80px; }
.ws-help { margin: .5rem 0 0; }
.submit-zone { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.submit-form { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.file-label { margin: 0; font-size: .9rem; }
.btn.big { padding: .65rem 1.3rem; font-size: 1.02rem; font-weight: 600; }
.history { list-style: none; padding: 0; margin: 0; }
.history li { padding: .45rem 0; border-bottom: 1px solid var(--border); }
.history summary { cursor: pointer; }
.history pre { margin-top: .5rem; }
.badge.red { background: var(--red-soft); color: var(--red); }
.sub-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.2rem; align-items: start; }
@media (max-width: 900px) {
  .ws-split, .sub-layout { grid-template-columns: 1fr; }
  .ws-pane + .ws-pane { border-left: 0; border-top: 1px solid var(--border); }
  .code-editor { height: 40vh; }
}

/* ===================== Corrections ===================== */
.badge.purple { background: var(--purple-soft); color: var(--purple); }
.stat.highlight { border-color: var(--purple); box-shadow: inset 4px 0 0 var(--purple); }
.correction-card form label { font-size: .9rem; }
.correction-card textarea { font-size: .92rem; }
.stack { display: grid; gap: .5rem; margin-bottom: .6rem; }
.stack .check-label { display: flex; gap: .4rem; align-items: center; font-weight: 500; margin: 0; }
.stack .check-label input { width: auto; margin: 0; }
.grade-big { font-size: 1.7rem; font-weight: 800; color: var(--purple); margin: 0; }
.grade { font-size: 1.15rem; font-weight: 800; color: var(--purple); }
.feedback { border-left: 5px solid var(--purple); }
.feedback-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.feedback-card { border-left-color: var(--purple); }

/* Espace élève : grille de cours */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.course-card h2 { font-size: 1.2rem; }
.progress { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; margin-top: .6rem; }
.progress span { display: block; height: 100%; background: var(--green); }
.lesson-links { padding-left: 1.2rem; margin: .4rem 0 0; }
.lesson-links li { padding: .25rem 0; }
.lesson-links .badge, .lesson-links .check { margin-left: .4rem; font-size: .72rem; }

@media (max-width: 900px) {
  .editor-split { grid-template-columns: 1fr; }
  .pane + .pane { border-left: 0; border-top: 1px solid var(--border); }
  #body, #preview { height: 50vh; min-height: 50vh; }
  .lesson-layout { grid-template-columns: 1fr; }
  .lesson-toc { position: static; max-height: none; }
  .lesson-page { padding: 1.3rem; }
}

/* ===================== Charte Circuit : compléments ===================== */
.ws-pane:first-child { background: var(--code-bg); }
.ws-pane:first-child .pane-head { background: var(--code-head); color: var(--code-muted); border-color: var(--code-line); }
.pane-head { font-family: var(--f-mono); }
.code-input { background: var(--code-bg); color: var(--code-ink); caret-color: var(--code-ok); border-color: var(--code-line); }
.out .ok, .run-status { font-family: var(--f-mono); }
.console-out .c-ok { color: var(--code-ok); }
.lesson-page > h1, .ex-card h3, .chapter-title { letter-spacing: -.015em; }
.eyebrow { font-family: var(--f-mono); font-weight: 500; letter-spacing: .1em; color: var(--accent); }
.grade-big, .grade { font-family: var(--f-mono); font-weight: 500; }
.due strong { font-variant-numeric: tabular-nums; }
.progress span { background: var(--primary); }
.toc-sections a.active { color: var(--primary); border-left-color: var(--primary); background: var(--primary-soft); }
.lesson-content th { font-weight: 600; }

/* ===================== Corrigé ===================== */
.solution { border-top: 3px solid var(--green); }
.solution h2 { margin: 0; }
.solution-soon { margin: 0 0 1rem; }
.solution-edit textarea { margin-top: .4rem; }

/* ===================== Cellules « # %% » ===================== */
.cells { display: grid; gap: .8rem; }
.cell { border: 1px solid var(--code-line); border-left: 3px solid var(--code-line); border-radius: var(--radius); background: var(--code-bg); overflow: hidden; }
.cell.ok { border-left-color: var(--code-ok); }
.cell.err { border-left-color: var(--code-err); }
.cell-head { display: flex; align-items: center; gap: .6rem; padding: .35rem .5rem .35rem .8rem; background: var(--code-head); border-bottom: 1px solid var(--code-line); }
.cell-n { font: 500 .78rem var(--f-mono); color: var(--code-muted); }
.cell-title { font-weight: 600; font-size: .9rem; color: var(--code-ink); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell .run-status { color: var(--code-muted); }
.cell.ok .run-status { color: var(--code-ok); } .cell.err .run-status { color: var(--code-err); }
.cell-code { display: block; width: 100%; margin: 0; border: 0; border-radius: 0; resize: none; overflow: hidden; min-height: 3.2em;
  padding: .75rem 1rem; font: 14px/1.6 var(--f-mono); tab-size: 4; white-space: pre; overflow-x: auto;
  background: var(--code-bg); color: var(--code-ink); caret-color: var(--code-ok); }
.cell-code:focus { outline: none; box-shadow: inset 0 0 0 1px var(--code-line); }
.cell-out { border-top: 1px dashed var(--code-line); max-height: 280px; min-height: 0; }
.cells .stdin-box { border: 1px solid var(--code-line); border-radius: var(--radius); background: var(--code-head); }
.cells-summary { margin-left: .4rem; color: var(--muted); }

/* ===================== Numéros de ligne ===================== */
.code-body { display: flex; align-items: stretch; min-width: 0; }
.code-body pre.highlight { flex: 1; min-width: 0; }
.code-body pre.ln, .ed-ln {
  margin: 0; flex: none; min-width: 2.9em; text-align: right; user-select: none; -webkit-user-select: none;
  color: var(--code-muted); opacity: .75; border-right: 1px solid var(--code-line);
  font: 14px/1.6 var(--f-mono); font-variant-numeric: tabular-nums; background: transparent; }
.code-body pre.ln { padding: .85rem .6rem .85rem .7rem; }
.ed-wrap { display: flex; align-items: stretch; background: var(--code-bg); min-width: 0; }
.ed-wrap > textarea { flex: 1; min-width: 0; }
/* contain: size : la colonne ne grandit pas avec le nombre de lignes, elle prend la hauteur de l'éditeur */
.ed-ln { overflow: hidden; padding: 0 .6rem 0 .7rem; contain: size; width: 3.6em; min-width: 0; }
.ed-wrap.for-editor .ed-ln { padding-top: .9rem; }
.ed-wrap.for-cell .ed-ln { padding-top: .75rem; }
.ed-wrap.for-input { margin-top: .3rem; border: 1px solid var(--code-line); border-radius: var(--radius-sm); overflow: hidden; }
.ed-wrap.for-input > textarea { margin: 0; border: 0; border-radius: 0; }
.ed-wrap.for-input .ed-ln { padding-top: calc(.55rem + 1px); }
.run-panel + .code, .code + .run-panel { margin-top: 0; }
.stdin-box summary code { background: transparent; border-color: var(--code-line); color: inherit; }
