:root { --bg:#0f1720; --panel:#17212d; --panel2:#1d2a39; --fg:#e6edf5; --muted:#9db0c4; --accent:#3b82f6; --accent2:#22c55e; --warn:#f59e0b; --danger:#ef4444; --line:#2a394b; --r:10px; }
@media (prefers-color-scheme: light) { :root { --bg:#f5f7fa; --panel:#fff; --panel2:#eef2f7; --fg:#1b2633; --muted:#5b6b7d; --line:#d8e0ea; } }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
.sp { flex: 1; }
.muted { color: var(--muted); }
header.top { display: flex; align-items: center; gap: 1rem; padding: .6rem 1.2rem; background: var(--panel); border-bottom: 1px solid var(--line); }
header.top .brand { font-weight: 700; color: var(--fg); text-decoration: none; }
header.top nav { display: flex; gap: 1rem; } header.top nav a { color: var(--muted); text-decoration: none; }
.langs a { margin: 0 .2rem; color: var(--muted); text-decoration: none; font-size: .85rem; } .langs a[aria-current] { color: var(--fg); font-weight: 700; }
.ghost { color: var(--muted); background: none; border: 0; cursor: pointer; text-decoration: none; font: inherit; }
main { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.2rem 4rem; } main.wide { max-width: none; padding: 0; width: 100%; margin: 0; flex: 1; min-height: 0; }
.btn { display: inline-block; background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: .55rem 1.1rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.1); } .btn:disabled { opacity: .6; cursor: wait; }
.btn.alt { background: var(--panel2); color: var(--fg); border: 1px solid var(--line); } .btn.danger { background: var(--danger); }
.btn.small { padding: .3rem .7rem; font-size: .88rem; } .btn.big { padding: .8rem 1.7rem; font-size: 1.1rem; }
.hero { padding: 1.5rem 0 1rem; } .hero h1, .labpage h1 { margin: 0 0 .3rem; font-size: 2rem; } .lead { color: var(--muted); font-size: 1.1rem; margin: .2rem 0 1rem; }
.quota { color: var(--muted); font-size: .92rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1rem; }
.card.lab { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.1rem; color: var(--fg); text-decoration: none; transition: transform .12s, border-color .12s; }
.card.lab:hover { transform: translateY(-2px); border-color: var(--accent); } .card.lab h2 { margin: .6rem 0 .3rem; font-size: 1.15rem; } .card.lab p { margin: 0; color: var(--muted); font-size: .95rem; }
.row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.tag { display: inline-block; font-size: .75rem; font-weight: 700; padding: .12rem .55rem; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line); }
.tag.premium { background: rgba(245,158,11,.15); color: var(--warn); border-color: rgba(245,158,11,.4); }
.tags span { color: var(--muted); font-size: .8rem; margin-right: .5rem; }
.launch { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 1.2rem 0 1.5rem; }
.crumb a { color: var(--muted); text-decoration: none; } .outline { color: var(--muted); }
.prose { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: .3rem 1.2rem 1rem; margin: 1rem 0; }
.prose img, .content img { max-width: 100%; }
code { background: var(--panel2); padding: .08rem .35rem; border-radius: 4px; font: .9em ui-monospace, Menlo, Consolas, monospace; }
.code { position: relative; margin: .8rem 0; } .code pre { margin: 0; padding: .8rem 4.2rem .8rem .9rem; background: #0b1118; color: #d6e2ef; border-radius: 8px; overflow: auto; border: 1px solid var(--line); }
.code pre code { background: none; padding: 0; color: inherit; } .code-cmd pre code::before { content: "$ "; color: var(--accent2); user-select: none; }
.code .copy { position: absolute; top: .4rem; right: .4rem; font-size: .75rem; padding: .2rem .55rem; background: var(--panel2); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; cursor: pointer; } .code .copy.ok { color: var(--accent2); }
blockquote { margin: .8rem 0; padding: .1rem 1rem; border-left: 3px solid var(--accent); background: var(--panel2); border-radius: 0 8px 8px 0; }
.modal { position: fixed; inset: 0; background: rgba(5,10,18,.7); display: grid; place-items: center; z-index: 50; padding: 1rem; } .modal[hidden] { display: none; }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1.4rem 1.6rem; max-width: 460px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.box h2 { margin-top: 0; } .actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: 1rem; }
/* Page du lab : terminal à gauche, guide à droite */
body.runpage { height: 100vh; overflow: hidden; display: flex; flex-direction: column; } body.runpage header.top { display: none; }
.run { display: flex; flex-direction: column; height: 100vh; }
.bar { display: flex; align-items: center; gap: .8rem; padding: .45rem .9rem; background: var(--panel); border-bottom: 1px solid var(--line); flex: none; }
.bar .back { text-decoration: none; color: var(--muted); font-size: 1.2rem; } .bar .links a { margin-right: .8rem; font-size: .9rem; }
.timer { font-variant-numeric: tabular-nums; color: var(--muted); } .timer.low { color: var(--danger); font-weight: 700; }
.split { --left: 62%; flex: 1; min-height: 0; display: grid; grid-template-columns: var(--left) 8px 1fr; } .split.drag { user-select: none; } .split.drag iframe { pointer-events: none; }
.pane { min-width: 0; min-height: 0; position: relative; } .term { background: #000; } .term iframe { width: 100%; height: 100%; border: 0; display: block; }
.wait { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); background: #0b1118; z-index: 1; } .wait[hidden] { display: none; }
.gutter { background: var(--line); cursor: col-resize; } .gutter:hover { background: var(--accent); }
.guide { display: flex; flex-direction: column; background: var(--panel); }
.steps { display: flex; gap: .3rem; align-items: center; padding: .5rem .8rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.steps button { width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--line); background: var(--panel2); color: var(--fg); cursor: pointer; font-weight: 600; }
.steps button.done { background: var(--accent2); color: #04210f; border-color: var(--accent2); } .steps button[aria-current="true"] { outline: 2px solid var(--accent); outline-offset: 1px; }
.content { flex: 1; overflow: auto; padding: .4rem 1.2rem 1rem; } .content h2 { font-size: 1.25rem; margin-top: .8rem; }
.check { display: flex; gap: .5rem; align-items: center; margin-top: 1.4rem; padding: .6rem .8rem; background: var(--panel2); border-radius: 8px; cursor: pointer; }
.pager { display: flex; justify-content: space-between; padding: .6rem .9rem; border-top: 1px solid var(--line); }
.over { position: absolute; inset: 0; background: rgba(5,10,18,.85); display: grid; place-items: center; z-index: 60; } .over[hidden] { display: none; }
.tabs { display: none; }
@media (max-width: 860px) {
  .tabs { display: flex; flex: none; background: var(--panel); border-bottom: 1px solid var(--line); } .tabs button { flex: 1; padding: .6rem; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; border-bottom: 3px solid transparent; }
  .tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
  .split { display: block; position: relative; } .split > .pane { position: absolute; inset: 0; } .gutter { display: none; }
  .split[data-show="term"] #pane-guide, .split[data-show="guide"] #pane-term { visibility: hidden; pointer-events: none; }
  .bar .links, .bar .name { display: none; }
}
