/* Cap : thème sombre */
:root {
  --bg: #242424;
  --bg2: #2c2c2c;
  --panel: #303030;
  --card: #393939;
  --card-h: #414141;
  --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.13);
  --text: #e8e7e4;
  --muted: #9b9a97;
  --faint: #6f6e6b;
  --accent: #9B6CF0;
  --danger: #E5534B;
  --ok: #3FB27F;
  --radius: 12px;
  --vh: 100dvh;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; -webkit-font-smoothing: antialiased; }
body { min-height: 100dvh; overscroll-behavior-y: none; }
body.modal-open { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i { display: inline-grid; place-items: center; line-height: 0; }

/* ---------- Coquille ---------- */
.shell { padding: calc(var(--safe-t) + 14px) 16px calc(var(--safe-b) + 40px); max-width: 1600px; margin: 0 auto; }
@media (min-width: 900px) { .shell { padding-left: 28px; padding-right: 28px; } }

/* ---------- En-tête ---------- */
.top { margin-bottom: 14px; }
.date-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.date-big { font-size: 28px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.1; }
.date-big::first-letter { text-transform: uppercase; }
.date-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.top-actions { display: flex; align-items: center; gap: 6px; padding-top: 2px; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); font-size: 19px; }
.icon-btn:hover, .icon-btn:active { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.sync { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--faint); padding: 0 4px; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); transition: background .3s; }
.sync[data-state="ok"] .sync-dot { background: var(--ok); }
.sync[data-state="pending"] .sync-dot, .sync[data-state="syncing"] .sync-dot { background: #E3B341; }
.sync[data-state="syncing"] .sync-dot { animation: pulse 1s infinite; }
.sync[data-state="error"] .sync-dot { background: var(--danger); }
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- Accordéons ---------- */
.acc { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; --c: var(--accent); }
.acc + .acc { margin-top: 8px; }
.acc-head { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 12px 11px 14px; min-height: 48px; text-align: left; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.acc-head .chev { color: var(--faint); font-size: 14px; transition: transform .2s; }
.acc.open .acc-head .chev { transform: rotate(90deg); }
.acc-ic { font-size: 17px; width: 22px; text-align: center; }
.acc-name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.count { font-size: 12px; color: var(--muted); background: rgba(255, 255, 255, 0.06); border-radius: 99px; padding: 1px 8px; min-width: 22px; text-align: center; }
.mini-btn { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); font-size: 16px; flex: none; }
.mini-btn:hover, .mini-btn:active { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.acc-body { display: none; padding: 0 10px 10px; }
.acc.open .acc-body { display: block; }
.deadlines { --c: #E3B341; background: linear-gradient(180deg, rgba(227, 179, 65, 0.16), rgba(227, 179, 65, 0.07)), var(--bg2); border-color: rgba(227, 179, 65, 0.3); }
.deadlines .acc-ic { color: #E3B341; }
.sub-title { font-size: 11px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 12px 4px 6px; }

/* ---------- Bandeau notifications ---------- */
.push-banner { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; padding: 12px 12px 12px 14px; border-radius: var(--radius); background: linear-gradient(90deg, rgba(155, 108, 240, 0.26), rgba(76, 141, 246, 0.18)); border: 1px solid rgba(155, 108, 240, 0.45); }
.push-banner .pb-ic { font-size: 20px; color: #c8b2ff; }
.push-banner .pb-txt { flex: 1; min-width: 0; font-size: 14px; line-height: 1.4; }
.push-banner .pb-txt b { display: block; font-size: 14.5px; }
.push-banner .btn { padding: 9px 14px; }

/* ---------- Bascule de vue ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; }
.seg { display: inline-flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; }
.seg button { padding: 7px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 700; letter-spacing: .07em; color: var(--muted); }
.seg button.on { background: var(--card-h); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .35); }

/* ---------- Kanban ---------- */
.board { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; align-items: flex-start; }
.board::-webkit-scrollbar { display: none; }
.col { --c: #888; flex: 0 0 84vw; max-width: 380px; scroll-snap-align: start; scroll-margin-left: 16px; background: color-mix(in srgb, var(--c) 17%, var(--bg2)); border: 1px solid color-mix(in srgb, var(--c) 34%, transparent); border-radius: 14px; padding: 8px 8px 6px; display: flex; flex-direction: column; position: relative; }
.col::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; border-radius: 14px 14px 0 0; background: var(--c); opacity: .85; }
@media (min-width: 600px) { .col { flex-basis: 300px; } }
@media (min-width: 900px) {
  .board { margin: 0; padding: 2px 0 6px; scroll-snap-type: none; }
  .col { flex: 1 1 0; min-width: 210px; max-width: none; }
  .board.proj .col { flex: 0 0 260px; }
}
.col-head { display: flex; align-items: center; gap: 8px; padding: 8px 6px 10px; user-select: none; -webkit-user-select: none; min-height: 40px; }
.col-ic { font-size: 18px; letter-spacing: -1px; white-space: nowrap; }
.col-name { font-size: 11.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; color: color-mix(in srgb, var(--c) 65%, white); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj .col-head { cursor: grab; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 20%, transparent); }
.cards { min-height: 46px; max-height: 64vh; overflow-y: auto; overscroll-behavior: contain; padding: 0 0 2px; border-radius: 10px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
@media (min-width: 900px) { .cards { max-height: 68vh; } }
.add-btn { display: flex; align-items: center; gap: 6px; width: 100%; padding: 9px 8px; border-radius: 9px; color: var(--faint); font-size: 14px; margin-top: 2px; }
.add-btn:hover, .add-btn:active { background: rgba(255, 255, 255, 0.05); color: var(--muted); }
.add-input { width: 100%; background: var(--card); border: 1px solid color-mix(in srgb, var(--c) 55%, transparent); border-radius: 10px; padding: 10px 12px; font-size: 16px; outline: none; margin-top: 2px; }
.add-col { flex: 0 0 200px; display: grid; place-items: center; border: 1.5px dashed var(--line2); border-radius: 14px; min-height: 120px; color: var(--faint); scroll-snap-align: start; gap: 6px; }
.add-col:hover { color: var(--text); border-color: var(--muted); }
.empty { color: var(--faint); font-size: 13px; text-align: center; padding: 14px 6px; }

/* ---------- Cartes ---------- */
.card { --c: #888; position: relative; display: flex; align-items: flex-start; gap: 10px; background: color-mix(in srgb, var(--c) 9%, var(--card)); border-radius: 10px; padding: 10px 8px 10px 10px; margin-bottom: 7px; cursor: pointer; border: 1px solid rgba(255, 255, 255, 0.045); box-shadow: 0 1px 2px rgba(0, 0, 0, .28); user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; transition: background .15s, transform .25s, opacity .25s; }
.card::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c); opacity: .9; }
.card:hover { background: color-mix(in srgb, var(--c) 12%, var(--card-h)); }
.card-title { flex: 1; min-width: 0; font-size: 15px; line-height: 1.38; overflow-wrap: anywhere; padding-top: 1px; }
.card-bell { color: color-mix(in srgb, var(--c) 70%, white); font-size: 13px; padding-top: 4px; opacity: .85; }
.card .pdot { width: 7px; height: 7px; border-radius: 50%; background: var(--k, #888); flex: none; margin-top: 8px; }
.chk { width: 21px; height: 21px; border-radius: 50%; border: 1.7px solid color-mix(in srgb, var(--c) 65%, #777); flex: none; display: grid; place-items: center; color: transparent; font-size: 13px; margin-top: 0; transition: background .15s, color .15s; }
.chk svg { stroke-width: 3; }
.chk:hover { background: color-mix(in srgb, var(--c) 22%, transparent); color: color-mix(in srgb, var(--c) 80%, white); }
.swap { width: 28px; height: 28px; margin: -3px -2px -3px 0; border-radius: 8px; display: grid; place-items: center; color: var(--faint); font-size: 15px; flex: none; }
.swap:hover, .swap:active { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.swap.to-urgent:hover, .swap.to-urgent:active { color: #E8833A; }
.card.completing .chk { background: var(--c); border-color: var(--c); color: #111; }
.card.completing .card-title { text-decoration: line-through; color: var(--muted); }
.card.leaving { opacity: 0; transform: translateX(26px) scale(.98); }
.ghost { opacity: .35; }
.chosen { box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
.sortable-fallback { opacity: .95 !important; transform: rotate(1.5deg); }
body.is-dragging .cards { outline: 1.5px dashed rgba(255,255,255,.08); outline-offset: -2px; }
.row-list .card { margin-bottom: 5px; background: var(--panel); }

/* ---------- Listes & notes ---------- */
.section { margin-top: 26px; }
.section-head { display: flex; align-items: center; gap: 8px; margin: 0 2px 10px; }
.section-head h2 { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0; flex: 1; }
.acc-grid { display: grid; gap: 8px; align-items: start; }
.acc-grid .acc + .acc { margin-top: 0; }
@media (min-width: 900px) { .acc-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); } }
.lists .acc { --c: #8C8C8C; background: color-mix(in srgb, var(--c) 17%, #f8f6f2); color: #1f1f1f; border: 1px solid color-mix(in srgb, var(--c) 32%, #e4e0d8); border-left: 4px solid var(--c); }
.lists .acc-head .chev { color: #6e6b66; }
.lists .count { background: rgba(0, 0, 0, 0.07); color: #55524d; }
.lists .mini-btn { color: #6e6b66; }
.lists .mini-btn:hover, .lists .mini-btn:active { background: rgba(0, 0, 0, 0.07); color: #111; }
.lists .row-list .card { background: #fff; color: #1f1f1f; border-color: rgba(0, 0, 0, 0.07); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.lists .row-list .card:hover { background: #fbfaf8; }
.lists .card-bell { color: color-mix(in srgb, var(--c) 75%, black); }
.lists .chk { border-color: color-mix(in srgb, var(--c) 75%, #555); }
.lists .chk:hover { color: color-mix(in srgb, var(--c) 80%, black); }
.lists .add-btn { color: #7a766f; }
.lists .add-btn:hover, .lists .add-btn:active { background: rgba(0, 0, 0, 0.05); color: #2b2b2b; }
.lists .add-input { background: #fff; color: #1f1f1f; }
.lists .empty { color: #8a867f; }
.lists .ghost { opacity: .45; }
.ghost-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px; border-radius: 10px; color: var(--faint); font-size: 14px; margin-top: 8px; }
.ghost-btn:hover, .ghost-btn:active { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.note-rows { display: grid; gap: 6px; min-height: 10px; }
@media (min-width: 900px) { .notes .note-rows { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } }
.note-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--bg2); border: 1px solid var(--line); border-radius: 11px; cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.note-row:hover { background: var(--panel); }
.note-row .ni { color: var(--muted); font-size: 16px; }
.note-row .nt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.note-row .nd { font-size: 12px; color: var(--faint); white-space: nowrap; }
.acc-body .note-row { background: var(--panel); }
.notes .note-row { background: #fff; color: #1f1f1f; border-color: rgba(0, 0, 0, 0.08); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18); }
.notes .note-row:hover { background: #f6f5f2; }
.notes .note-row .ni { color: #8a867f; }
.notes .note-row .nd { color: #9a968f; }
.sheet.paper { --panel: #ffffff; --text: #1f1f1f; --muted: #6b6862; --faint: #a19d96; --line: rgba(0, 0, 0, 0.08); --line2: rgba(0, 0, 0, 0.12); background: #fff; color: #1f1f1f; }
.sheet.paper .grab { background: rgba(0, 0, 0, 0.15); }
.sheet.paper .icon-btn:hover, .sheet.paper .icon-btn:active, .sheet.paper .ed-tools button:hover, .sheet.paper .ed-tools button:active { background: rgba(0, 0, 0, 0.06); color: #111; }
.sheet.paper .editor hr { background: rgba(0, 0, 0, 0.28); }
.sheet.paper .editor a { color: #1a5fd0; }
.up-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; cursor: pointer; font-size: 14px; }
.up-row:hover { background: rgba(255, 255, 255, 0.04); }
.up-row .when { color: #E3B341; font-size: 12.5px; white-space: nowrap; min-width: 112px; }
.up-row .what { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Feuilles (popups) ---------- */
.overlay { position: fixed; left: 0; right: 0; top: var(--vvt, 0px); height: var(--vh, 100dvh); z-index: 50; background: rgba(0, 0, 0, 0); display: flex; align-items: flex-end; justify-content: center; transition: background .2s; }
.overlay.show { background: rgba(0, 0, 0, 0.55); }
.sheet { width: 100%; background: var(--panel); border-radius: 18px 18px 0 0; border: 1px solid var(--line2); border-bottom: 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .5); transform: translateY(100%); transition: transform .26s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; max-height: calc(var(--vh) - var(--safe-t) - 10px); padding-bottom: var(--safe-b); }
.overlay.show .sheet { transform: none; }
.overlay.hide .sheet { transform: translateY(100%); }
.sheet.big { height: calc(var(--vh) - var(--safe-t) - 10px); }
@media (min-width: 760px) {
  .overlay { align-items: center; }
  .sheet { width: min(720px, 94vw); border-radius: 16px; border-bottom: 1px solid var(--line2); transform: translateY(12px) scale(.98); opacity: 0; transition: transform .2s, opacity .2s; max-height: 88vh; padding-bottom: 0; }
  .overlay.show .sheet { opacity: 1; }
  .overlay.hide .sheet { transform: translateY(12px) scale(.98); opacity: 0; }
  .sheet.big { height: min(86vh, 860px); }
  .sheet.small { width: min(420px, 94vw); }
}
.grab { width: 38px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.18); margin: 8px auto 0; flex: none; }
@media (min-width: 760px) { .grab { display: none; } }
.sheet-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px 0 14px; flex: none; }
.sheet-bar .crumb { flex: 1; font-size: 12.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; min-height: 0; padding: 4px 20px 20px; }
.sheet-title { width: 100%; background: none; border: 0; outline: none; resize: none; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; padding: 6px 0 4px; overflow: hidden; }
.sheet-title::placeholder { color: var(--faint); }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }
.pill { --c: #888; display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 99px; font-size: 13.5px; background: color-mix(in srgb, var(--c) 14%, rgba(255,255,255,.03)); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); color: var(--text); max-width: 100%; }
.pill.dim { --c: #777; color: var(--muted); }
.pill span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill:active { transform: scale(.97); }
.sheet-foot { display: flex; gap: 8px; padding: 10px 14px 12px; border-top: 1px solid var(--line); flex: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: 14.5px; background: rgba(255, 255, 255, 0.07); }
.btn:hover { background: rgba(255, 255, 255, 0.11); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ok { background: color-mix(in srgb, var(--ok) 85%, black); color: #fff; }
.btn.danger { color: #ff8a84; background: rgba(229, 83, 75, 0.12); }
.btn.grow { flex: 1; }
.btn:disabled { opacity: .5; }

/* ---------- Éditeur de notes ---------- */
.ed-tools { display: flex; gap: 4px; position: sticky; top: -4px; z-index: 2; background: var(--panel); padding: 6px 0; margin-bottom: 2px; border-bottom: 1px solid var(--line); }
.ed-tools button { height: 32px; min-width: 34px; padding: 0 9px; border-radius: 8px; color: var(--muted); font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.ed-tools button:hover, .ed-tools button:active { background: rgba(255, 255, 255, 0.07); color: var(--text); }
.ed-tools .lbl { font-size: 12.5px; }
.editor { outline: none; font-size: 16px; line-height: 1.6; min-height: 40vh; padding: 8px 0 30vh; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
.editor.is-empty::before { content: attr(data-placeholder); color: var(--faint); position: absolute; pointer-events: none; }
.editor a { color: #7fb0ff; text-decoration: underline; text-underline-offset: 2px; }
.editor hr { border: 0; height: 2px; background: rgba(255, 255, 255, 0.28); border-radius: 2px; margin: 14px 0; }
.editor .todo { position: relative; padding-left: 30px; min-height: 1.6em; }
.editor .todo::before { content: ""; position: absolute; left: 1px; top: .28em; width: 17px; height: 17px; border-radius: 5px; border: 1.7px solid var(--muted); box-sizing: border-box; cursor: pointer; }
.editor .todo[data-done="1"] { color: var(--faint); text-decoration: line-through; }
.editor .todo[data-done="1"]::before { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/13px no-repeat; border-color: var(--accent); }
.editor ul, .editor ol { padding-left: 22px; margin: 4px 0; }
.ed-wrap { position: relative; }

/* ---------- Menus & formulaires ---------- */
.menu-title { font-size: 13px; font-weight: 650; color: var(--muted); padding: 14px 18px 6px; letter-spacing: .02em; }
.menu { padding: 4px 8px 10px; overflow-y: auto; }
.menu-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 12px; border-radius: 10px; text-align: left; font-size: 15.5px; }
.menu-item:hover, .menu-item:active { background: rgba(255, 255, 255, 0.06); }
.menu-item .mi { width: 24px; text-align: center; font-size: 17px; }
.menu-item .tick { margin-left: auto; color: var(--accent); }
.menu-item.danger { color: #ff8a84; }
.menu-sep { height: 1px; background: var(--line); margin: 6px 10px; }
.form { padding: 6px 18px 16px; display: grid; gap: 12px; }
.field { display: grid; gap: 6px; }
.field > label, .lab { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.inp { width: 100%; background: var(--bg2); border: 1px solid var(--line2); border-radius: 10px; padding: 11px 12px; font-size: 16px; outline: none; }
.inp:focus { border-color: color-mix(in srgb, var(--accent) 70%, transparent); }
.inp.sm { width: auto; min-width: 70px; }
input[type="time"].inp, input[type="datetime-local"].inp, input[type="number"].inp { min-height: 44px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.seg2 { display: flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 11px; padding: 3px; }
.seg2 button { flex: 1; padding: 9px 6px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.seg2 button.on { background: var(--card-h); color: var(--text); }
.days { display: flex; gap: 5px; }
.days button { width: 38px; height: 38px; border-radius: 50%; background: var(--bg2); border: 1px solid var(--line2); font-size: 13px; font-weight: 600; color: var(--muted); }
.days button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.quick button { padding: 7px 11px; border-radius: 99px; background: var(--bg2); border: 1px solid var(--line2); font-size: 13px; color: var(--muted); }
.quick button:hover { color: var(--text); }
.preview { font-size: 13.5px; color: var(--muted); background: var(--bg2); border-radius: 10px; padding: 10px 12px; line-height: 1.5; }
.preview b { color: var(--text); font-weight: 600; }
.hint { font-size: 12.5px; color: var(--faint); line-height: 1.5; }
.swatches { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.sw { width: 28px; height: 28px; border-radius: 50%; background: var(--c); border: 2px solid transparent; box-shadow: 0 0 0 1px rgba(0,0,0,.4) inset; }
.sw.on { border-color: #fff; }
.sw-custom { position: relative; width: 28px; height: 28px; border-radius: 50%; overflow: hidden; background: conic-gradient(#E5534B, #E3B341, #3FB27F, #4C8DF6, #9B6CF0, #E05BA8, #E5534B); }
.sw-custom input { position: absolute; inset: -6px; width: 40px; height: 40px; opacity: 0; cursor: pointer; }

/* ---------- Réglages ---------- */
.set-sec { padding: 4px 18px 14px; }
.set-sec h3 { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 14px 0 10px; }
.set-card { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 10px; }
.set-card + .set-card { margin-top: 8px; }
.col-edit { --c: #888; display: grid; grid-template-columns: 56px 1fr; gap: 8px; align-items: center; }
.col-edit .inp.icon { text-align: center; padding: 10px 4px; }
.col-edit .swatches { grid-column: 1 / -1; gap: 5px; }
.col-edit .sw, .col-edit .sw-custom { width: 25px; height: 25px; }
.set-row { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.set-row .txt { font-size: 14.5px; }
.set-row .sub { font-size: 12.5px; color: var(--faint); margin-top: 2px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--bg); border: 1px solid var(--line2); border-radius: 8px; padding: 9px 10px; word-break: break-all; color: var(--muted); }
.proj-row { --c: #888; display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-radius: 9px; cursor: pointer; }
.proj-row:hover { background: rgba(255, 255, 255, 0.04); }
.arch-row { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.arch-row .t { flex: 1; min-width: 0; color: var(--muted); text-decoration: line-through; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.arch-row .d { font-size: 12px; color: var(--faint); white-space: nowrap; }

/* ---------- Connexion ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: radial-gradient(1200px 600px at 20% -10%, rgba(155, 108, 240, .14), transparent 60%), radial-gradient(900px 500px at 100% 110%, rgba(76, 141, 246, .12), transparent 60%), var(--bg); }
.auth-card { width: min(380px, 100%); display: grid; gap: 14px; text-align: center; }
.auth-card img { width: 84px; height: 84px; border-radius: 22px; margin: 0 auto 4px; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.auth-card h1 { margin: 0; font-size: 30px; letter-spacing: -0.02em; }
.auth-card p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.auth-card .inp { text-align: center; }
.auth-err { color: #ff8a84; font-size: 14px; min-height: 20px; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--safe-b) + 18px); z-index: 90; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 14px; background: #3a3a3a; color: var(--text); border: 1px solid var(--line2); border-radius: 12px; padding: 11px 14px; font-size: 14.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); transform: translateY(20px); opacity: 0; transition: transform .22s, opacity .22s; max-width: 520px; }
.toast.show { transform: none; opacity: 1; }
.toast button { color: #b99cff; font-weight: 700; }

/* ---------- Tags des listes ---------- */
.tagbar { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.tag { --t: #888; display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 99px; font-size: 13px; font-weight: 600; line-height: 1.2; background: color-mix(in srgb, var(--t) 13%, #fff); color: color-mix(in srgb, var(--t) 55%, #1f1f1f); border: 1px solid color-mix(in srgb, var(--t) 40%, transparent); }
.tag b { font-weight: 600; font-size: 11.5px; opacity: .6; }
.tag.on { background: var(--t); color: #fff; border-color: var(--t); box-shadow: 0 1px 3px rgba(0, 0, 0, .15); }
.tag.on b { opacity: .85; }
.tag.add { --t: #8a867f; background: transparent; border-style: dashed; color: #6e6b66; padding: 5px 9px; }
.tag.add:hover { color: #1f1f1f; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.mini-tag { --t: #888; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--t) 17%, #fff); color: color-mix(in srgb, var(--t) 55%, #1f1f1f); }
.sheet .tag { background: color-mix(in srgb, var(--t) 14%, transparent); color: color-mix(in srgb, var(--t) 55%, white); border-color: color-mix(in srgb, var(--t) 40%, transparent); }
.sheet .tag.on { background: var(--t); color: #fff; border-color: var(--t); }
.sheet .tag.add { color: var(--muted); border-color: var(--line2); }
.sheet .tag.add:hover { color: var(--text); }
.sheet-tags { margin: -4px 0 12px; }
.tag-edit { --t: #888; flex-wrap: nowrap; }
.tag-edit .dot { background: var(--t); }
.tag-edit .inp { flex: 1; min-width: 0; padding: 9px 11px; }
