/* DANKE OS — styles des apps natives (utilisent les tokens du skin actif). */
.fm, .set, .ed, .nt, .pg, .au, .vd, .im, .gm, .bk, .tk, .pl, .gv, .calc, .term { height: 100%; }
.sandbox-frame, .plug-host { width: 100%; height: 100%; border: 0; display: block; background: transparent; }
.plug-host { position: relative; }
select, input[type="color"] { font-family: inherit; }
input[type="range"] { accent-color: var(--accent); }
.switch { position: relative; display: inline-block; width: 40px; height: 22px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--panel-hi); border: 1px solid var(--line); transition: background 0.15s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--fg); transition: translate 0.18s var(--ease); }
.switch input:checked + span { background: var(--accent); border-color: var(--accent); }
.switch input:checked + span::after { translate: 18px 0; background: var(--on-accent); }
.switch input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---- Fichiers ---- */
.fm { display: flex; flex-direction: column; }
.fm-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.fm-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; font-size: 13px; padding: 0 6px; }
.fm-crumbs button { all: unset; cursor: pointer; padding: 2px 6px; border-radius: 6px; } .fm-crumbs button:hover { background: var(--panel-hi); } .fm-crumbs button:focus-visible { outline: 2px solid var(--focus); }
.fm-search { width: 150px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--fg); }
.fm-main { flex: 1; display: flex; min-height: 0; }
.fm-side { flex: none; width: 168px; padding: 10px 8px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; overflow: auto; }
.fm-place { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 0; background: none; color: var(--fg); border-radius: 8px; cursor: pointer; text-align: left; font-size: 14px; }
.fm-place:hover { background: var(--panel-hi); } .fm-place[aria-current="page"] { background: color-mix(in srgb, var(--accent) 22%, transparent); font-weight: 700; }
.fm-list { flex: 1; overflow: auto; padding: 6px; outline: none; }
.fm-head { display: grid; grid-template-columns: 28px minmax(120px, 1fr) 84px 140px 80px; gap: 8px; padding: 4px 10px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); position: sticky; top: -6px; background: var(--bg-2); z-index: 1; }
.fm-head button { all: unset; cursor: pointer; } .fm-head button:hover { color: var(--fg); }
.fm-row { display: grid; grid-template-columns: 28px minmax(120px, 1fr) 84px 140px 80px; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 8px; cursor: default; user-select: none; }
.fm-row:hover { background: var(--panel); } .fm-row[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.fm-ico { color: var(--accent); display: grid; } .fm-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.fm-c { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-rename { width: 100%; padding: 2px 6px; background: var(--bg); border: 1px solid var(--accent); border-radius: 6px; color: var(--fg); }
.fm-list[data-view="grid"] .fm-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; align-content: start; }
.fm-list[data-view="grid"] .fm-row { display: grid; grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 12px 6px; gap: 4px; } .fm-list[data-view="grid"] .fm-name { max-width: 100%; font-size: 12px; white-space: normal; word-break: break-all; }
.fm-status { padding: 6px 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
@container (max-width: 640px) { .fm-side { display: none; } .fm-head, .fm-row { grid-template-columns: 28px 1fr 70px; } .fm-row .fm-c:nth-of-type(n+2) { display: none; } .fm-head button:nth-of-type(n+3) { display: none; } }
.fp { display: grid; gap: 10px; } .fp-bar { display: flex; gap: 8px; align-items: center; } .fp-path { font-size: 13px; color: var(--muted); }
.fp-list { max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.fp-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border: 0; background: none; color: var(--fg); border-radius: 8px; cursor: pointer; text-align: left; } .fp-row:hover { background: var(--panel-hi); } .fp-row[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 24%, transparent); } .fp-row[disabled] { opacity: 0.4; cursor: default; }

/* ---- Réglages ---- */
.set { display: flex; } .set-nav { flex: none; width: 190px; padding: 12px 8px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; overflow: auto; }
.set-nav-i { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 0; background: none; color: var(--fg); border-radius: 8px; cursor: pointer; text-align: left; font-size: 14px; } .set-nav-i:hover { background: var(--panel-hi); } .set-nav-i[aria-current="page"] { background: color-mix(in srgb, var(--accent) 22%, transparent); font-weight: 700; }
.set-body { flex: 1; overflow: auto; padding: 20px 26px 40px; } .set-h { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 14px; }
.set-sec { display: grid; gap: 12px; margin-bottom: 26px; } .set-sec h3 { margin: 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.set-range { display: flex; align-items: center; gap: 10px; } .set-range input { width: 150px; }
@container (max-width: 640px) { .set { flex-direction: column; } .set-nav { width: auto; flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); } .set-nav-i { white-space: nowrap; } .set-row { flex-wrap: wrap; } }
.skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.skin-card { display: grid; gap: 6px; text-align: left; padding: 10px; border: 2px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--fg); cursor: pointer; } .skin-card:hover { border-color: var(--muted); } .skin-card[aria-checked="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.skin-card span { font-size: 12px; } .skin-thumb { width: 100%; height: auto; border-radius: 8px; display: block; }
.wp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.wp-sw-btn { display: grid; gap: 4px; padding: 5px; border: 2px solid transparent; border-radius: 12px; background: none; color: var(--fg); cursor: pointer; font-size: 12px; } .wp-sw-btn[aria-checked="true"] { border-color: var(--accent); }
.wallpaper.wp-sw { position: relative; inset: auto; height: 62px; border-radius: 8px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; } .seg button { padding: 6px 14px; border: 0; background: none; color: var(--fg); cursor: pointer; } .seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.swatches { display: flex; gap: 8px; align-items: center; } .swatch-btn { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; } .swatch-btn[aria-checked="true"] { outline: 2px solid var(--fg); outline-offset: 2px; }
.lang-list { display: flex; flex-wrap: wrap; gap: 8px; } .lang-item { display: grid; gap: 2px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--fg); cursor: pointer; text-align: left; } .lang-item[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.set-table { width: 100%; border-collapse: collapse; } .set-table td { padding: 8px 6px; border-bottom: 1px solid var(--line); } kbd { font-family: var(--font-mono); font-size: 12px; padding: 2px 8px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; background: var(--panel); }
.about { margin-bottom: 10px; }

/* ---- Éditeurs ---- */
.ed { display: flex; flex-direction: column; } .ed-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ed-area { flex: 1; width: 100%; resize: none; padding: 14px 16px; border: 0; outline: none; background: var(--bg-2); color: var(--fg); font-family: var(--font-mono); font-size: 14px; line-height: 1.6; tab-size: 2; }
.ed-status { padding: 5px 12px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.code-host { flex: 1; min-height: 0; overflow: hidden; } .code-host .cm-editor { height: 100%; }
.cm-content .tok-keyword, .tok-keyword { color: var(--violet-text); } .tok-string, .tok-string2 { color: var(--accent); } .tok-number, .tok-bool, .tok-atom { color: var(--danger); } .tok-comment { color: var(--muted); font-style: italic; } .tok-variableName2, .tok-propertyName, .tok-definition { color: var(--ok); } .tok-typeName, .tok-className { color: var(--fg); font-weight: 700; } .tok-operator, .tok-punctuation { color: var(--muted); } .tok-heading { font-weight: 800; color: var(--accent); } .tok-link, .tok-url { color: var(--violet-text); text-decoration: underline; } .tok-tagName { color: var(--violet-text); } .tok-attributeName { color: var(--ok); } .tok-meta { color: var(--muted); }
.nt { display: flex; } .nt-side { flex: none; width: 220px; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; } .nt-top { display: grid; gap: 8px; padding: 10px; } .nt-list { flex: 1; overflow: auto; padding: 0 6px 8px; display: grid; align-content: start; gap: 2px; }
.nt-item { display: grid; gap: 2px; text-align: left; padding: 8px 10px; border: 0; background: none; color: var(--fg); border-radius: 8px; cursor: pointer; overflow: hidden; } .nt-item b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .nt-item:hover { background: var(--panel-hi); } .nt-item[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 22%, transparent); } .nt-item span { font-size: 11px; }
.nt-main { flex: 1; min-width: 0; display: flex; flex-direction: column; } .nt-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.nt-split { flex: 1; display: grid; grid-template-columns: 1fr 1fr; min-height: 0; } .nt-ed { resize: none; border: 0; border-right: 1px solid var(--line); padding: 16px; background: var(--bg-2); color: var(--fg); font-family: var(--font-mono); font-size: 14px; line-height: 1.6; outline: none; } .nt-prev { overflow: auto; } .nt-img { max-width: 100%; border-radius: 8px; }
@container (max-width: 720px) { .nt-side { width: 150px; } .nt-split { grid-template-columns: 1fr; } .nt-prev { display: none; } }
.md { padding: 18px 22px; overflow-wrap: anywhere; } .md > :first-child { margin-top: 0; } .md h1, .md h2 { font-weight: 800; letter-spacing: -0.02em; padding-bottom: 6px; border-bottom: 1px solid var(--line); } .md code { font-family: var(--font-mono); font-size: 0.9em; background: var(--panel-hi); padding: 1px 6px; border-radius: 5px; } .md pre.md-code { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px; overflow: auto; } .md pre.md-code code { background: none; padding: 0; } .md blockquote { margin: 12px 0; padding: 2px 16px; border-left: 4px solid var(--accent); color: var(--muted); } .md a { color: var(--violet-text); } .md table { border-collapse: collapse; } .md th, .md td { border: 1px solid var(--line); padding: 5px 10px; }

/* ---- Playground ---- */
.pg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .pg-left, .pg-right { display: flex; flex-direction: column; min-width: 0; min-height: 0; } .pg-left { border-right: 1px solid var(--line); }
.pg-tabs { display: flex; gap: 2px; } .pg-tab { padding: 5px 14px; border: 0; background: none; color: var(--muted); border-radius: 8px; cursor: pointer; font-family: var(--font-mono); font-size: 12px; font-weight: 700; } .pg-tab[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.pg-eds { flex: 1; min-height: 0; position: relative; } .pg-ed { position: absolute; inset: 0; } .pg-ed .cm-editor { height: 100%; }
.pg-prev { flex: 1; min-height: 0; background: #fff; } .pg-prev iframe { width: 100%; height: 100%; border: 0; } .pg-console { height: 28%; overflow: auto; padding: 8px 12px; border-top: 1px solid var(--line); background: var(--bg); font-size: 12px; } .pg-line.error { color: var(--danger); } .pg-line.warn { color: var(--accent); }
@container (max-width: 760px) { .pg { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; } .pg-left { border-right: 0; border-bottom: 1px solid var(--line); } }

/* ---- Terminal ---- */
.term { background: color-mix(in srgb, var(--bg) 92%, #000); color: var(--fg); font-family: var(--font-mono); font-size: 13px; line-height: 1.55; padding: 10px 14px; overflow: auto; cursor: text; }
.tl { white-space: pre-wrap; word-break: break-word; } .tl.dim { color: var(--muted); } .tl.acc { color: var(--accent); } .tl.bad { color: var(--danger); } .tl.ok { color: var(--ok); } .tl.echo { color: var(--fg); opacity: 0.9; }
.term-line { display: flex; align-items: center; } .term-prompt { color: var(--ok); white-space: pre; } .term .term-in, .term input.term-in { flex: 1; width: auto; min-width: 0; padding: 0; border: 0; border-radius: 0; background: none; color: var(--fg); font: inherit; outline: none; caret-color: var(--accent); }

/* ---- Calculatrice ---- */
.calc { display: flex; flex-direction: column; padding: 14px; gap: 10px; outline: none; background: var(--bg-2); }
.calc-top { text-align: right; padding: 10px 12px; background: var(--bg); border-radius: 12px; border: 1px solid var(--line); } .calc-disp { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; overflow-x: auto; white-space: nowrap; } .calc-sub { color: var(--muted); min-height: 1.4em; }
.calc-hist { font-size: 11px; color: var(--muted); max-height: 64px; overflow: auto; text-align: right; } .calc-hist div { cursor: pointer; } .calc-bar { display: flex; gap: 6px; }
.calc-keys { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; } .ck { border: 1px solid var(--line); background: var(--panel); color: var(--fg); border-radius: 12px; font-size: 18px; font-weight: 700; cursor: pointer; min-height: 40px; } .ck:hover { background: var(--panel-hi); } .ck.op { color: var(--accent); } .ck.eq { background: var(--accent); color: var(--on-accent); border-color: var(--accent); } .ck.clr { color: var(--danger); }

/* ---- Médias ---- */
.au { display: flex; flex-direction: column; gap: 10px; padding: 16px; overflow: auto; } .au-viz { width: 100%; height: 120px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); } .au-title { font-weight: 800; font-size: 20px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-seekrow { display: flex; align-items: center; gap: 10px; } .au-seek { flex: 1; } .au-ctl { display: flex; align-items: center; gap: 6px; } .au-play { width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); cursor: pointer; display: grid; place-items: center; } .au-play.on { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); } .au-vol { width: 90px; }
.chip-btn[aria-pressed="true"] { color: var(--accent); background: var(--panel-hi); } .au-lhead { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; } .au-list { display: grid; gap: 2px; }
.au-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 0; background: none; color: var(--fg); border-radius: 8px; cursor: pointer; text-align: left; } .au-item:hover { background: var(--panel-hi); } .au-item[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 22%, transparent); font-weight: 700; }
.vd { display: flex; } .vd-stage { flex: 1; min-width: 0; background: #000; display: grid; place-items: center; position: relative; } .vd-video { width: 100%; height: 100%; max-height: 100%; background: #000; } .vd-empty { display: grid; gap: 12px; justify-items: center; color: var(--muted); } .vd-side { flex: none; width: 200px; padding: 10px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; overflow: auto; } .vd-list { display: grid; gap: 2px; }
@container (max-width: 640px) { .vd-side { display: none; } }
.im { position: relative; } .im-gal, .im-viewer { position: absolute; inset: 0; display: flex; flex-direction: column; } .im-gal[hidden], .im-viewer[hidden] { display: none; } .im-grid { flex: 1; overflow: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; padding: 12px; align-content: start; }
.im-th { position: relative; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); cursor: pointer; padding: 0; display: grid; place-items: center; color: var(--muted); } .im-th:hover { border-color: var(--accent); } .im-th img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; } .im-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 6px 4px; font-size: 11px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, 0.7)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-stage { flex: 1; overflow: hidden; display: grid; place-items: center; background: repeating-conic-gradient(var(--panel) 0 25%, transparent 0 50%) 0 0 / 20px 20px; cursor: grab; outline: none; touch-action: none; } .im-img { max-width: 100%; max-height: 100%; user-select: none; will-change: transform; } .im-sl { display: inline-flex; flex-direction: column; font-size: 10px; color: var(--muted); } .im-sl input { width: 80px; }

/* ---- Jeux ---- */
.gm { display: flex; flex-direction: column; } .gm-stage { flex: 1; display: grid; place-items: center; align-content: center; gap: 10px; padding: 12px; overflow: auto; } .gm-stage > * { max-width: 100%; } .gm-canvas { max-width: 100%; height: auto; border: 2px solid var(--line); border-radius: 12px; outline: none; } .gm-canvas:focus-visible { border-color: var(--accent); } .gm-info { font-size: 12px; color: var(--muted); text-align: center; }
.g48 { display: grid; grid-template-columns: repeat(4, 76px); gap: 8px; padding: 10px; background: var(--panel-hi); border-radius: 14px; outline: none; } .g48:focus-visible { box-shadow: 0 0 0 2px var(--accent); } .g48-c { width: 76px; height: 76px; display: grid; place-items: center; border-radius: 10px; background: var(--panel); font-weight: 800; font-size: 26px; color: var(--fg); }
.g48-c[data-v="2"] { background: #3a3526; } .g48-c[data-v="4"] { background: #4d4328; } .g48-c[data-v="8"] { background: #e8c33a; color: #0c0b08; } .g48-c[data-v="16"] { background: #ff9a3d; color: #0c0b08; } .g48-c[data-v="32"] { background: #ff5a1f; color: #0c0b08; } .g48-c[data-v="64"] { background: #e23a3a; color: #fff; } .g48-c[data-v="128"], .g48-c[data-v="256"], .g48-c[data-v="512"] { background: #7c4dff; color: #fff; font-size: 22px; } .g48-c[data-v="1024"], .g48-c[data-v="2048"], .g48-c[data-v="4096"] { background: #3ad6a0; color: #0c0b08; font-size: 18px; }
.mn-grid { display: grid; grid-template-columns: repeat(9, 34px); gap: 3px; } .mn-c { width: 34px; height: 34px; border: 0; border-radius: 6px; background: var(--panel-hi); color: var(--fg); font-weight: 800; cursor: pointer; font-family: var(--font-mono); } .mn-c[data-o="1"] { background: var(--panel); cursor: default; } .mn-c[data-m="1"] { background: var(--danger); color: #000; }
.mn-c[data-n="1"] { color: #4aa8ff; } .mn-c[data-n="2"] { color: #3ad6a0; } .mn-c[data-n="3"] { color: #ff5a1f; } .mn-c[data-n="4"] { color: #7c4dff; } .mn-c[data-n="5"] { color: #e8c33a; } .mn-c[data-n="6"], .mn-c[data-n="7"], .mn-c[data-n="8"] { color: #ff5fa2; }
.gv { display: grid; gap: 14px; justify-items: center; padding: 18px; align-content: center; } .gv-head { text-align: center; } .gv-card { position: relative; width: 360px; max-width: 100%; height: 200px; border-radius: 16px; overflow: hidden; border: 3px solid var(--fg); box-shadow: 6px 7px 0 rgba(0, 0, 0, 0.35); background: var(--paper); color: var(--ink); } .gv-under { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 6px; text-align: center; padding: 14px; } .gv-under svg { width: 56px; color: #0c0b08; } .gv-prize { font-family: var(--font-display); font-size: 24px; line-height: 1.1; } .gv-sub { font-size: 10px; opacity: 0.6; } .gv-canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; } .gv-confetti { position: absolute; left: 0; top: 0; width: 100%; pointer-events: none; }

/* ---- Book-Killer, tâches, plugins ---- */
.bk { display: flex; flex-direction: column; padding: 14px 18px; gap: 10px; overflow: auto; } .bk-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .bk-search { width: 220px; } .bk-sec h3 { margin: 4px 0 8px; font-size: 18px; letter-spacing: -0.01em; } .bk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 14px; } .bk-card { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--fg); text-decoration: none; } .bk-card:hover { border-color: var(--accent); background: var(--panel-hi); } .bk-title { font-weight: 800; display: flex; justify-content: space-between; gap: 8px; } .bk-card p { margin: 0; font-size: 13px; color: var(--muted); } .bk-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.tk { padding: 14px; display: grid; gap: 12px; align-content: start; overflow: auto; } .tk-top { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; } .tk-top > div { padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); } .tk-top b { font-size: 20px; }
.pl { padding: 16px 20px; overflow: auto; } .pl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; } .pl-list { display: grid; gap: 10px; } .pl-card { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); } .pl-card summary { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; list-style: none; } .pl-card summary::-webkit-details-marker { display: none; } .pl-card summary .app-ico { width: 34px; height: 34px; } .pl-body { padding: 4px 16px 16px; border-top: 1px solid var(--line); } .pl-ex { display: grid; gap: 8px; } .pl-ex-i { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 12px; }
.plug-perm { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.grow { flex: 1; }

/* ---- Colonnes étroites (téléphone, tuiles) : les mises en page à deux volets s'empilent ---- */
@container (max-width: 560px) {
  .nt { flex-direction: column; } .nt-side { width: auto; height: 168px; border-right: 0; border-bottom: 1px solid var(--line); } .nt-split { grid-template-columns: 1fr; } .nt-ed { border-right: 0; }
  .au { padding: 12px; } .gm-stage { padding: 6px; }
}

/* =================== P2 : bureautique et outils =================== */
.sh, .dc, .sl, .pd, .cal, .kb, .ct, .dw, .ck, .dt, .vt, .zp, .rp { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.sh-sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.link-btn { all: unset; cursor: pointer; font-weight: 600; } .link-btn:hover { text-decoration: underline; } .link-btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
/* ---- Tableur ---- */
.sh-bar { gap: 4px; } .sh-bar select { padding: 4px 8px; min-height: 32px; } .sh-colors { display: inline-flex; gap: 3px; } .sh-color { width: 18px; height: 18px; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; padding: 0; }
.sh-fbar { display: flex; align-items: center; gap: 8px; padding: 4px 10px; border-bottom: 1px solid var(--line); } .sh-name { width: 80px; padding: 4px 8px; font-family: var(--font-mono); } .sh-fx { font-style: italic; color: var(--muted); font-family: serif; } .sh-f { flex: 1; font-family: var(--font-mono); padding: 4px 8px; }
.sh-wrap { flex: 1; overflow: auto; background: var(--bg); } .sh-wrap:focus-within { outline: none; }
.sh-grid { border-collapse: separate; border-spacing: 0; font-size: 13px; outline: none; table-layout: fixed; }
.sh-grid th { position: sticky; top: 0; z-index: 2; background: var(--bg-3); color: var(--muted); font-weight: 600; font-size: 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 3px 8px; user-select: none; }
.sh-grid th.sh-rh { position: sticky; left: 0; top: auto; z-index: 1; min-width: 44px; width: 44px; text-align: center; } .sh-grid th.sh-corner { left: 0; z-index: 3; min-width: 44px; width: 44px; }
.sh-grid td { height: 26px; padding: 0 8px; border-right: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--bg-2); cursor: cell; max-width: 320px; }
.sh-grid td.num { text-align: right; font-variant-numeric: tabular-nums; } .sh-grid td.a-l { text-align: left; } .sh-grid td.a-c { text-align: center; } .sh-grid td.a-r { text-align: right; } .sh-grid td.b { font-weight: 800; } .sh-grid td.err { color: var(--danger); font-weight: 700; }
.sh-grid td.sel { background: color-mix(in srgb, var(--accent) 22%, var(--bg-2)); } .sh-grid td.cur { outline: 2px solid var(--accent); outline-offset: -2px; background: color-mix(in srgb, var(--accent) 12%, var(--bg-2)); }
.sh-edit { width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: var(--bg); color: var(--fg); font: inherit; outline: 2px solid var(--accent); min-height: 0 !important; }
.sh-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); } .sh-chart .sh-svg { width: 100%; height: auto; }
/* ---- Traitement de texte ---- */
.dc-bar { gap: 3px; } .dc-bar select { padding: 4px 8px; min-height: 32px; } .dc-b { min-width: 30px; font-size: 14px; }
.dc-desk { flex: 1; overflow: auto; background: color-mix(in srgb, var(--bg) 70%, #000); padding: 24px 16px; }
.dc-page { max-width: 794px; min-height: 1000px; margin: 0 auto; padding: 56px 64px; background: #fff; color: #1a1a1a; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35); outline: none; font: 16px/1.6 Georgia, "Times New Roman", serif; }
.dc-page:focus-visible { outline: 2px solid var(--accent); } .dc-page h1 { font-size: 2em; line-height: 1.2; } .dc-page h2 { font-size: 1.5em; } .dc-page h3 { font-size: 1.2em; } .dc-page a { color: #0b57d0; } .dc-page blockquote { border-left: 4px solid #e8c33a; margin: 1em 0; padding-left: 1em; color: #444; } .dc-page pre { background: #f1efe6; padding: 0.8em; border-radius: 6px; font: 13px/1.5 "JetBrains Mono", monospace; overflow: auto; } .dc-page table { border-collapse: collapse; width: 100%; margin: 1em 0; } .dc-page td, .dc-page th { border: 1px solid #bbb; padding: 6px 10px; min-width: 40px; } .dc-page img { max-width: 100%; height: auto; }
@container (max-width: 700px) { .dc-page { padding: 24px 18px; min-height: 600px; } .dc-desk { padding: 8px; } }
.print-root { display: none; }
@media print {
  html.printing body > *:not(.print-root) { display: none !important; }
  html.printing .print-root { display: block !important; position: static; color: #000; background: #fff; }
  html.printing .dc-print { font: 12pt/1.5 Georgia, serif; padding: 0; } html.printing .dc-print table { border-collapse: collapse; } html.printing .dc-print td, html.printing .dc-print th { border: 1px solid #888; padding: 4px 8px; }
  html.printing-slides .sl-print .sl-slide { width: 100%; page-break-after: always; break-after: page; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { margin: 14mm; }
}
/* ---- Présentations ---- */
.sl-main { flex: 1; display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1fr); min-height: 0; } .sl-thumbs { overflow-y: auto; padding: 8px; display: grid; gap: 8px; align-content: start; border-right: 1px solid var(--line); background: var(--bg); }
.sl-th { position: relative; border: 2px solid transparent; border-radius: 8px; padding: 0; background: none; cursor: pointer; overflow: hidden; } .sl-th[aria-selected="true"] { border-color: var(--accent); } .sl-n { position: absolute; left: 4px; top: 2px; z-index: 2; font-size: 10px; color: #fff; text-shadow: 0 0 3px #000; } .sl-slide.sm { pointer-events: none; } .sl-slide.sm .sl-in { width: 90%; }
.sl-center { display: grid; grid-template-rows: 1fr auto; align-content: center; gap: 8px; padding: 12px; min-width: 0; background: var(--bg); } .sl-stage { align-self: center; } .sl-stage .sl-slide { border-radius: 8px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.4); } .sl-notes { font-size: 13px; color: var(--muted); min-height: 1.4em; }
.sl-ed { border-left: 1px solid var(--line); min-width: 0; overflow: hidden; } .sl-ed .cm-editor { height: 100%; }
@container (max-width: 860px) { .sl-main { grid-template-columns: 110px 1fr; } .sl-ed { display: none; } }
.sl-present { position: fixed; inset: 0; z-index: 2000; background: #000; display: grid; place-items: center; cursor: none; outline: none; } .sl-present .sl-slide { width: min(100vw, calc(100vh * 16 / 9)); } .sl-pcount { position: fixed; right: 14px; bottom: 10px; color: #fff; opacity: 0.4; font-size: 12px; }
/* ---- PDF ---- */
.pd-body { flex: 1; min-height: 0; position: relative; } .pd-view { position: absolute; inset: 0; overflow: auto; padding: 14px; background: color-mix(in srgb, var(--bg) 60%, #000); display: grid; justify-items: center; align-content: start; gap: 12px; outline: none; } .pd-pg { background: #fff; box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45); } .pd-pg canvas { display: block; } .pd-view.dark canvas { filter: invert(0.92) hue-rotate(180deg); }
.pd-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); } .pd-page { width: 52px; text-align: center; padding: 4px; min-height: 30px; } .pd-zoom { min-width: 46px; text-align: center; }
/* ---- Calendrier ---- */
.cal-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 250px; min-height: 0; } .cal-body { overflow: auto; padding: 10px; } .cal-side { border-left: 1px solid var(--line); padding: 14px; overflow: auto; display: grid; gap: 8px; align-content: start; } .cal-side h3 { margin: 0; font-size: 15px; text-transform: capitalize; } .cal-title { margin: 0 10px; font-size: 18px; text-transform: capitalize; font-weight: 800; }
.cal-month { display: grid; gap: 4px; height: 100%; grid-template-rows: auto 1fr; } .cal-wd { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); text-align: center; } .cal-cells { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: repeat(6, minmax(70px, 1fr)); gap: 4px; }
.cal-day { padding: 4px 5px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); display: grid; gap: 2px; align-content: start; overflow: hidden; cursor: pointer; min-width: 0; } .cal-day.out { opacity: 0.45; } .cal-day.sel { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); } .cal-day.today .cal-dn { background: var(--accent); color: var(--on-accent); } .cal-day:focus-visible { outline: 2px solid var(--focus); }
.cal-dn { font-size: 12px; font-weight: 700; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; } .cal-ev { all: unset; box-sizing: border-box; display: block; width: 100%; padding: 1px 5px; font-size: 11px; border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); border-radius: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; } .cal-ev:focus-visible { outline: 2px solid var(--focus); } .cal-more { font-size: 10px; color: var(--muted); }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(110px, 1fr)); gap: 6px; height: 100%; } .cal-col { border: 1px solid var(--line); border-radius: 10px; padding: 6px; display: grid; gap: 4px; align-content: start; background: var(--panel); } .cal-col.today { border-color: var(--accent); } .cal-colh { all: unset; cursor: pointer; font-weight: 700; text-transform: capitalize; font-size: 13px; padding: 2px 4px; }
.cal-agenda section { margin-bottom: 14px; } .cal-agenda h3 { margin: 0 0 6px; font-size: 14px; text-transform: capitalize; } .cal-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; } .cal-bar { width: 4px; align-self: stretch; border-radius: 2px; min-height: 18px; }
@container (max-width: 700px) { .cal-main { grid-template-columns: 1fr; } .cal-side { border-left: 0; border-top: 1px solid var(--line); max-height: 36%; } .cal-cells { grid-template-rows: repeat(6, minmax(46px, 1fr)); } .cal-ev b { display: none; } .cal-week { grid-template-columns: repeat(7, 120px); overflow-x: auto; } }
/* ---- Kanban ---- */
.kb-sel { max-width: 220px; } .kb-cols { flex: 1; display: flex; gap: 12px; padding: 12px; overflow: auto; align-items: flex-start; } .kb-col { flex: none; width: 270px; max-height: 100%; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; } .kb-col > header { display: flex; align-items: center; gap: 8px; padding: 10px 12px 4px; }
.kb-list { padding: 6px 10px; overflow-y: auto; display: grid; gap: 8px; align-content: start; min-height: 40px; flex: 1; border-radius: 8px; } .kb-list.over { background: color-mix(in srgb, var(--accent) 12%, transparent); } .kb-card { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); cursor: grab; display: grid; gap: 6px; outline: none; } .kb-card:focus-visible, .kb-card:hover { border-color: var(--accent); } .kb-card.drag { opacity: 0.4; }
.kb-t { font-weight: 700; overflow-wrap: anywhere; } .kb-t.done { text-decoration: line-through; opacity: 0.6; } .kb-d { font-size: 12px; color: var(--muted); } .kb-meta { display: flex; align-items: center; gap: 6px; } .kb-labels { display: flex; gap: 4px; } .kb-lb { width: 28px; height: 6px; border-radius: 3px; } .kb-add { margin: 6px 10px 10px; } .kb-addcol { flex: none; align-self: flex-start; white-space: nowrap; }
/* ---- Contacts / Coffre ---- */
.ct-main { flex: 1; display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 0; } .ct-list, .ct-listwrap { overflow-y: auto; padding: 6px; border-right: 1px solid var(--line); display: grid; align-content: start; gap: 1px; } .ct-listwrap { padding: 0; display: block; } .ct-listwrap .vt-list { padding: 6px; display: grid; gap: 1px; align-content: start; }
.ct-letter { padding: 8px 10px 2px; font-size: 11px; color: var(--muted); } .ct-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 0; background: none; color: var(--fg); border-radius: 8px; cursor: pointer; text-align: left; min-width: 0; } .ct-item:hover { background: var(--panel-hi); } .ct-item[aria-selected="true"] { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.ct-av { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 800; } .ct-av.big { width: 52px; height: 52px; font-size: 22px; } .ct-n { display: grid; min-width: 0; } .ct-n small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-form, .vt-form { overflow-y: auto; padding: 18px 22px; display: grid; gap: 12px; align-content: start; } .ct-head { display: flex; align-items: center; gap: 14px; }
@container (max-width: 640px) { .ct-main { grid-template-columns: 1fr; grid-template-rows: 40% 60%; } .ct-list, .ct-listwrap { border-right: 0; border-bottom: 1px solid var(--line); } }
.vt-lock { margin: auto; width: min(380px, 92%); display: grid; gap: 12px; justify-items: stretch; text-align: center; padding: 20px; } .vt-lock > svg { justify-self: center; color: var(--accent); } .vt-lock h2 { margin: 0; } .vt-lock .field { text-align: left; }
.vt-meter { position: relative; height: 22px; border-radius: 6px; background: var(--panel-hi); overflow: hidden; } .vt-meter i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--danger); } .vt-meter.mid i { background: var(--accent); } .vt-meter.strong i { background: var(--ok); } .vt-meter span { position: relative; z-index: 1; font-size: 11px; padding: 0 8px; line-height: 22px; color: var(--fg); mix-blend-mode: normal; text-shadow: 0 0 2px var(--bg); }
/* ---- Dessin ---- */
.dw-bar { gap: 4px; } .dw-bar .swatch-btn { width: 20px; height: 20px; } .dw-stage { flex: 1; overflow: auto; padding: 12px; background: color-mix(in srgb, var(--bg) 60%, #000); display: grid; place-items: center; } .dw-paper { position: relative; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45); max-width: 100%; line-height: 0; } .dw-canvas, .dw-overlay { display: block; width: min(100%, 1280px); height: auto; touch-action: none; cursor: crosshair; background: #fff; } .dw-overlay { position: absolute; inset: 0; background: none; pointer-events: none; } .dw-tool[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
/* ---- Horloge ---- */
.ck-panel { flex: 1; overflow: auto; padding: 20px; } .ck-center { display: grid; gap: 16px; justify-items: center; align-content: center; min-height: 100%; } .ck-time { font-size: clamp(44px, 12cqw, 92px); font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; } .ck-big { font-size: 28px; font-weight: 800; } .ck-num { width: 74px; text-align: center; font-size: 22px; } .ck-laps { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; width: min(320px, 90%); max-height: 180px; overflow: auto; }
.ck-world { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; } .ck-zones { display: grid; gap: 8px; } .ck-zone { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); } .ck-zone > div { flex: 1; } .ck-analog { width: 200px; height: 200px; }
.ck-alarm { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; flex-wrap: wrap; } .ck-days { display: inline-flex; gap: 2px; } .ck-day { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: none; color: var(--muted); cursor: pointer; font-size: 12px; } .ck-day[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
/* ---- Outils dev ---- */
.dt-tabs { display: flex; gap: 2px; padding: 6px 10px; border-bottom: 1px solid var(--line); overflow-x: auto; flex: none; } .dt-tab { flex: none; padding: 6px 12px; border: 0; background: none; color: var(--muted); border-radius: 8px; cursor: pointer; font-weight: 600; } .dt-tab[aria-selected="true"] { background: var(--accent); color: var(--on-accent); } .dt-body { flex: 1; overflow: auto; padding: 14px; }
.dt-grid { display: grid; gap: 10px; align-content: start; } .dt-ta { width: 100%; resize: vertical; padding: 10px; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; } .dt-err { color: var(--danger); font-size: 13px; min-height: 1.2em; } .dt-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .dt-hashes div { display: grid; gap: 2px; margin-bottom: 8px; } .dt-hashes code { overflow-wrap: anywhere; font-size: 12px; color: var(--muted); }
.dt-res { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px; max-height: 240px; overflow: auto; font-size: 13px; } .dt-res mark { background: color-mix(in srgb, var(--accent) 45%, transparent); color: inherit; } .dt-diff { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px; white-space: pre-wrap; font-size: 12px; } .dt-d.add { background: color-mix(in srgb, var(--ok) 22%, transparent); } .dt-d.del { background: color-mix(in srgb, var(--danger) 22%, transparent); }
.dt-sw { width: 56px; height: 36px; border-radius: 8px; border: 1px solid var(--line); } .dt-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); } .dt-row code { flex: 1; min-width: 0; overflow-wrap: anywhere; }
@container (max-width: 560px) { .dt-two { grid-template-columns: 1fr; } }
/* ---- Archives / Réparer ---- */
.zp-body { flex: 1; overflow: auto; padding: 14px; } .zp-list { max-height: none; } .zp-log { padding: 8px 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); min-height: 2.2em; }
.rp { padding: 18px 22px; overflow: auto; display: block; } .rp section { margin-bottom: 22px; display: grid; gap: 10px; } .rp-act { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); } .rp-log { max-height: 160px; overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 12px; min-height: 52px; } .rp-log .bad { color: var(--danger); } .rp-log .ok { color: var(--ok); }
/* ---- Tetris : pavé tactile ---- */
.gm-pad { display: none; gap: 10px; margin-top: 4px; } html[data-touch="1"] .gm-pad { display: flex; } .gm-pad button { width: 64px; height: 56px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); border-radius: 12px; font-size: 22px; } .gm-pad button:active { background: var(--accent); color: var(--on-accent); }

/* a11y : lignes de grille ARIA transparentes pour la mise en page, cibles ≥ 24 px */
.cal-rw { display: contents; }
.sh-color { width: 24px !important; height: 24px !important; }
