/* Dragon : thème sombre */
:root {
  --ov: 255, 255, 255;
  --bg: #161616;
  --bg2: #2c2c2c;
  --panel: #303030;
  --card: #393939;
  --card-h: #414141;
  --line: rgba(var(--ov), 0.08);
  --line2: rgba(var(--ov), 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: grid; grid-template-columns: 1fr auto; grid-template-areas: "tabs actions" "date date"; align-items: center; column-gap: 12px; row-gap: 14px; margin-bottom: 14px; }
.date-row .mode-tabs { grid-area: tabs; justify-self: start; }
.date-row .top-actions { grid-area: actions; }
.date-row .date-block { grid-area: date; min-width: 0; }
.date-big { font-size: 28px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.1; }
.date-big::first-letter { text-transform: uppercase; }
.date-big .d-year { display: none; }
@media (min-width: 900px) {
  .date-row { grid-template-columns: 1fr auto 1fr; grid-template-areas: "tabs date actions"; }
  .date-block { text-align: center; }
  .top-actions { justify-self: end; }
  .date-big .d-year { display: inline; }
  .date-sub .d-year-sub { display: none; }
}
.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(var(--ov), 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(var(--ov), 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(var(--ov), 0.07); color: var(--text); }
.acc-body { display: none; padding: 0 10px 10px; }
.acc.open .acc-body { display: block; }
.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: color-mix(in srgb, var(--accent) 60%, #fff); }
.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); }
.toolbar { min-width: 0; }
.seg.tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; gap: 2px; }
.seg.tabs::-webkit-scrollbar { display: none; }
.seg.tabs button { white-space: nowrap; flex: none; }
/* Téléphone : tous les projets visibles, sur plusieurs lignes */
@media (max-width: 899px) {
  .toolbar { align-items: flex-start; }
  .seg.tabs { flex-wrap: wrap; overflow: visible; flex: 1; min-width: 0; row-gap: 4px; }
  .seg.tabs { gap: 0; }
  .seg.tabs button { padding: 7px 9px; font-size: 12px; letter-spacing: .03em; }
  .seg .ptab { gap: 6px; }
  .seg .ptab-add { padding: 7px 9px; }
}
.seg .ptab { --c: #888; display: inline-flex; align-items: center; gap: 7px; }
.seg .ptab .dot { width: 8px; height: 8px; box-shadow: none; }
.seg .ptab.on { background: color-mix(in srgb, var(--c) 32%, var(--card-h)); color: #fff; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 60%, transparent); }
.seg .ptab-add { padding: 7px 10px; font-size: 14px; display: inline-grid; place-items: center; }
.tb-edit { flex: none; }
.board.single { justify-content: center; }
.board.single .col.pcol-single { flex: 1 1 100%; max-width: none; }
@media (min-width: 900px) { .board.single .col.pcol-single { flex: 0 1 760px; } }
.card-where { font-size: 13px; letter-spacing: -1px; white-space: nowrap; opacity: .85; flex: none; padding: 0 2px; }

/* ---------- Kanban ---------- */
.board { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; 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-snap-stop: always; 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 (max-width: 899px) { .board { overflow-y: hidden; transition: height .18s ease; } }
@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; }
}
.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; padding: 0 0 2px; border-radius: 10px; }
/* Sur ordinateur, une colonne très longue défile à l'intérieur ; sur téléphone, c'est la page qui défile */
@media (min-width: 900px) { .cards { max-height: 68vh; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(var(--ov), .12) transparent; } }
.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(var(--ov), 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; scroll-snap-stop: always; 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(var(--ov), 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; }
/* Pictos regroupés à droite, serrés */
.card-icons { display: flex; align-items: center; gap: 0; flex: none; margin: -2px -5px -2px -4px; min-height: 24px; }
.card-icons > span { height: 24px; min-width: 18px; display: grid; place-items: center; flex: none; }
.card-note { color: var(--muted); font-size: 13px; }
.card-icons > .card-todo { display: inline-flex; gap: 3px; padding: 0 4px; color: var(--muted); font-size: 11.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.card-todo .i { font-size: 13px; }
.card-todo.all { color: var(--ok, #3fb37f); }
.card.is-prio .card-todo { color: rgba(255, 255, 255, 0.85); }
.lists .card-todo { color: #8a867f; }
.card.is-prio .card-note { color: rgba(255, 255, 255, 0.8); }
.lists .card-note { color: #8a867f; }
.card-bell { color: color-mix(in srgb, var(--c) 70%, white); font-size: 12.5px; opacity: .85; }
.card .pdot { width: 7px; height: 7px; border-radius: 50%; background: var(--k, #888); flex: none; margin-top: 8px; }
.chk { width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--c) 65%, #777); flex: none; display: grid; place-items: center; color: transparent; font-size: 10px; margin-top: 2px; transition: background .15s, color .15s; }
.chk svg { stroke-width: 3; }
.chk { position: relative; }
.chk::after { content: ""; position: absolute; inset: -9px; border-radius: 50%; }
.chk:hover { background: color-mix(in srgb, var(--c) 22%, transparent); color: color-mix(in srgb, var(--c) 80%, white); }
.swap { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: var(--faint); font-size: 14px; flex: none; }
.swap:hover, .swap:active { background: rgba(var(--ov), 0.07); color: var(--text); }
.swap.to-urgent:hover, .swap.to-urgent:active { color: #E8833A; }
.prio { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-size: 14px; flex: none; color: #c9c7c2; opacity: .75; transition: color .2s, opacity .2s, transform .15s; }
.prio:hover, .prio:active { opacity: 1; background: rgba(var(--ov), 0.08); transform: scale(1.12); }
.prio.on { color: #ff6a5f; opacity: 1; }
.prio.on .flag-cloth { fill: currentColor; }
/* Tâches au drapeau rouge : elles ressortent */
.card.is-prio { background: color-mix(in srgb, #ff5247 28%, var(--card)); border-color: rgba(255, 92, 80, 0.8); box-shadow: 0 0 0 1px rgba(255, 82, 71, 0.22), 0 3px 10px rgba(0, 0, 0, 0.35); }
.card.is-prio:hover { background: color-mix(in srgb, #ff5247 32%, var(--card-h)); }
.card.is-prio::before { background: #ff5247; width: 4px; top: 7px; bottom: 7px; opacity: 1; }
.card.is-prio .card-title { font-weight: 650; color: #fff; }
.card.flash { animation: rise 1.2s ease-out; }
@keyframes rise { 0% { box-shadow: 0 0 0 2px var(--c), 0 0 22px color-mix(in srgb, var(--c) 70%, transparent); transform: translateY(-2px); } 100% { box-shadow: 0 1px 2px rgba(0, 0, 0, .28); transform: none; } }
.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(var(--ov), .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(var(--ov), 0.05); }
.note-rows { display: grid; gap: 6px; min-height: 10px; }
@media (min-width: 900px) { .notes-acc .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-acc { background: #e9e8e5; border-color: #d6d4cf; color: #1f1f1f; }
.notes-acc .acc-head .chev, .notes-acc .acc-ic { color: #6e6b66; }
.notes-acc .count { background: rgba(0, 0, 0, 0.07); color: #55524d; }
.notes-acc .mini-btn { color: #6e6b66; }
.notes-acc .mini-btn:hover, .notes-acc .mini-btn:active { background: rgba(0, 0, 0, 0.07); color: #111; }
.notes-acc .empty { color: #8a867f; }
.notes-acc .note-row { background: #fff; color: #1f1f1f; border-color: rgba(0, 0, 0, 0.07); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.notes-acc .note-row:hover { background: #f8f7f5; }
.notes-acc .note-row .ni { color: #8a867f; }
.notes-acc .note-row .nd { color: #9a968f; }
.sheet.paper, .nx-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, .nx-paper .icon-btn:hover, .nx-paper .icon-btn:active, .sheet.paper .ed-tools button:hover, .sheet.paper .ed-tools button:active, .nx-paper .ed-tools button:hover, .nx-paper .ed-tools button:active { background: rgba(0, 0, 0, 0.06); color: #111; }
.sheet.paper .editor hr, .nx-paper .editor hr { background: rgba(0, 0, 0, 0.3); }
.sheet.paper .editor a, .nx-paper .editor a { color: #1a5fd0; }

/* ---------- 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(var(--ov), .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(var(--ov), 0.07); }
.btn:hover { background: rgba(var(--ov), 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(var(--ov), 0.07); color: var(--text); }
.ed-tools .lbl { font-size: 12.5px; }
.ed-tools button.main { color: var(--text); }
.ed-tools { flex-wrap: wrap; }
.ed-palette { display: none; flex-basis: 100%; gap: 8px; padding: 6px 2px 4px; align-items: center; flex-wrap: wrap; }
.ed-palette.on { display: flex; }
.ed-tools .ed-palette .sw { width: 30px; height: 30px; min-width: 0; padding: 0; border-radius: 50%; display: grid; place-items: center; font-weight: 750; font-size: 15px; border: 1px solid var(--line2); color: var(--text); }
.ed-tools .ed-palette .sw.ink { color: var(--sw); }
.ed-tools .ed-palette .sw.mark { background: var(--sw); border-color: rgba(0, 0, 0, 0.06); }
.ed-tools .ed-palette .sw.none:empty { background: linear-gradient(135deg, transparent 46%, #d93025 46%, #d93025 54%, transparent 54%); }
.ed-tools .ed-palette .sw:hover { transform: scale(1.08); }
.editor span[style*="background"] { border-radius: 3px; padding: 0 1px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
@media (max-width: 600px) { .ed-tools button:not(.main) .lbl { display: none; } }
.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: 1px; background: rgba(255, 255, 255, 0.3); margin: 12px 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(var(--ov), 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(var(--ov), 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: color-mix(in srgb, var(--accent) 62%, #fff); 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; }

/* ---------- Bloc-notes ---------- */
.pad-wrap { --panel: #fff; background: #fff; border-radius: 10px; border: 1px solid rgba(0, 0, 0, 0.07); padding: 2px 14px 6px; color: #1f1f1f; --muted: #6b6862; --faint: #a19d96; --line: rgba(0, 0, 0, 0.08); --text: #1f1f1f; }
.pad-wrap .ed-tools { position: static; }
.pad-wrap .ed-tools button:hover, .pad-wrap .ed-tools button:active { background: rgba(0, 0, 0, 0.06); color: #111; }
.pad-wrap .editor { min-height: 160px; padding: 12px 0 12px; }
.pad-wrap .editor hr { background: rgba(0, 0, 0, 0.3); }
.pad-wrap .editor a { color: #1a5fd0; }

/* ---------- Onglets To-Do / Calendar ---------- */
.mode-tabs { gap: 2px; }
.mode-tabs button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; font-size: 13px; letter-spacing: .02em; }
.mode-tabs button .i { font-size: 14px; }
.mode-tabs button.on { background: color-mix(in srgb, var(--accent) 30%, var(--card-h)); color: #fff; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent); }
/* Téléphone : onglets en icônes seules */
@media (max-width: 899px) {
  .mode-tabs .mt-lbl { display: none; }
  .mode-tabs button { padding: 8px 15px; }
  .mode-tabs button .i { font-size: 18px; }
}
body.mode-cal #toolbar, body.mode-cal #board, body.mode-cal #lists { display: none; }
body:not(.mode-cal) #cal { display: none; }
.i.flip { transform: rotate(180deg); }
.icon-btn.sm { width: 34px; height: 34px; font-size: 16px; }

/* ---------- Calendrier : barre ---------- */
.cal { --ev: #4C8DF6; }
.cal-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "title views" "nav tools"; align-items: center; gap: 10px 8px; margin: 2px 0 12px; }
.cal-title { grid-area: title; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cal-t1 { font-size: 18px; font-weight: 750; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-t2 { font-size: 12.5px; color: var(--muted); }
.cal-views { grid-area: views; justify-self: end; }
.cal-views button { padding: 7px 11px; letter-spacing: .03em; }
.cal-nav { grid-area: nav; display: flex; align-items: center; gap: 4px; }
.today-btn { padding: 7px 12px; border-radius: 9px; font-size: 13px; font-weight: 650; color: var(--text); background: var(--bg2); border: 1px solid var(--line2); }
.today-btn:hover { background: var(--card); }
.cal-tools { grid-area: tools; display: flex; align-items: center; gap: 8px; justify-self: end; }
.rem-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 600; color: var(--faint); border: 1px solid var(--line2); }
.rem-toggle.on { color: #f1cf72; background: rgba(227, 179, 65, 0.12); border-color: rgba(227, 179, 65, 0.4); }
.add-ev { padding: 8px 12px; font-size: 13.5px; }
/* Téléphone : boutons en icône seule pour tout faire tenir */
@media (max-width: 599px) {
  .rem-toggle { width: 36px; height: 36px; padding: 0; justify-content: center; font-size: 15px; }
  .rem-toggle span:not(.i) { display: none; }
  .add-ev { width: 40px; height: 36px; padding: 0; font-size: 17px; }
  .add-ev span:not(.i) { display: none; }
}
@media (min-width: 900px) {
  .cal-bar { grid-template-columns: auto minmax(0, 1fr) auto auto; grid-template-areas: "nav title views tools"; gap: 14px; }
  .cal-title { flex-direction: row; align-items: baseline; gap: 10px; }
  .cal-t1 { font-size: 22px; }
}

/* ---------- Vue mois ---------- */
.mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.mwd { padding: 8px 6px 7px; font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); text-align: center; border-bottom: 1px solid var(--line); }
.mwd .l { display: none; }
@media (min-width: 600px) { .mwd .l { display: inline; } .mwd .s { display: none; } }
/* Une ligne par semaine : fonds des jours (.mcell) sur toute la hauteur, puis numéros, barres et pastilles par-dessus */
.mweek { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 2px; min-height: 76px; }
.mcell { grid-row: 1 / -1; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); cursor: pointer; min-width: 0; transition: background .12s; }
.mcell:nth-child(7n + 7) { border-right: 0; }
.mcell.we { background: rgba(var(--ov), 0.018); }
.mcell.out { background: rgba(0, 0, 0, 0.14); }
.mnum.out { color: var(--faint); opacity: .7; }
.mcell:hover { background: rgba(var(--ov), 0.035); }
.mcell.sel { background: color-mix(in srgb, var(--accent) 12%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent); }
.mnum { grid-row: 1; position: relative; pointer-events: none; font-size: 12.5px; font-weight: 650; color: var(--muted); text-align: center; padding: 5px 0 0; }
.mnum span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 99px; padding: 0 3px; }
.mnum.today span { background: var(--accent); color: #fff; }
.mchips { position: relative; pointer-events: none; display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 0 3px 5px; }
.mchips .mchip { pointer-events: auto; }
/* Événement sur la journée entière ou sur plusieurs jours : une seule barre d'un jour à l'autre */
.mbar { --c: var(--ev); position: relative; z-index: 1; display: flex; align-items: center; gap: 4px; min-width: 0; margin: 0 3px; text-align: left; font-size: 10.5px; font-weight: 600; line-height: 1.25; padding: 2px 5px; border-radius: 5px; background: color-mix(in srgb, var(--c) 72%, #222); color: #fff; }
.mbar.cont-l { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.mbar.cont-r { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.mbar .mt { display: none; opacity: .85; font-variant-numeric: tabular-nums; flex: none; }
.mbar .mx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mchip { --c: var(--ev); display: flex; align-items: center; gap: 3px; width: 100%; min-width: 0; text-align: left; font-size: 10.5px; line-height: 1.25; padding: 2px 4px; border-radius: 5px; color: color-mix(in srgb, var(--c) 30%, white); background: color-mix(in srgb, var(--c) 20%, transparent); }
.mchip.solid { background: color-mix(in srgb, var(--c) 72%, #222); color: #fff; }
.mchip.rem { background: transparent; color: color-mix(in srgb, var(--c) 45%, white); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent); }
.mchip .i { font-size: 9px; flex: none; }
.mchip .mt { display: none; color: color-mix(in srgb, var(--c) 25%, white); opacity: .8; font-variant-numeric: tabular-nums; flex: none; }
.mchip .mx { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mmore { font-size: 10.5px; color: var(--muted); padding: 0 4px; font-weight: 600; }
@media (min-width: 600px) {
  .mweek { min-height: 112px; }
  .mnum { text-align: left; padding: 6px 0 0 7px; }
  .mchips { padding: 0 5px 6px; }
  .mchip { font-size: 12px; padding: 2px 6px; }
  .mchip .mt { display: inline; }
  .mbar { font-size: 12px; padding: 2px 7px; margin: 0 5px; }
  .mbar .mt { display: inline; }
}

/* ---------- Agenda du jour (sous le mois) ---------- */
.agenda { margin-top: 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 6px 8px 8px; }
.ag-head { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 8px; }
.ag-day { flex: 1; font-weight: 700; font-size: 15px; }
.ag-day.today { color: color-mix(in srgb, var(--accent) 55%, white); }
.ag-row { --c: var(--ev); width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: 10px; text-align: left; }
.ag-row:hover, .ag-row:active { background: rgba(var(--ov), 0.05); }
.ag-time { width: 96px; flex: none; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.ag-bar { width: 4px; align-self: stretch; border-radius: 4px; background: var(--c); flex: none; }
.ag-row.rem .ag-bar { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); }
.ag-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; font-size: 15px; }
.ag-title > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-title .i { color: #E3B341; font-size: 13px; }
.ag-rep { color: var(--faint); font-size: 13px; }

/* ---------- Vue semaine ---------- */
.cal-week { --hh: 46px; --gut: 40px; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
@media (min-width: 900px) { .cal-week { --hh: 50px; --gut: 54px; } }
.wk-scroll { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; position: relative; scrollbar-width: thin; scrollbar-color: rgba(var(--ov), .14) transparent; }
.wk-sticky { position: sticky; top: 0; z-index: 3; background: var(--bg2); border-bottom: 1px solid var(--line2); box-shadow: 0 4px 10px rgba(0, 0, 0, .25); }
.wk-head, .wk-allday, .wk-body { display: grid; grid-template-columns: var(--gut) repeat(7, minmax(0, 1fr)); }
.wk-dh { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 0 6px; min-width: 0; }
.wk-dh .wd { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.wk-dh .dn { font-size: 17px; font-weight: 700; min-width: 30px; height: 30px; border-radius: 99px; display: grid; place-items: center; color: var(--text); }
.wk-dh.we .dn { color: var(--muted); }
.wk-dh.today .wd { color: color-mix(in srgb, var(--accent) 60%, white); }
.wk-dh.today .dn { background: var(--accent); color: #fff; }
.wk-gut { font-size: 10px; color: var(--faint); display: grid; place-items: center; }
.wk-allday { border-top: 1px solid var(--line); padding: 3px 0; row-gap: 2px; }
.wk-adc { min-width: 0; }
.wad { --c: var(--ev); position: relative; z-index: 1; min-width: 0; margin: 0 2px; font-size: 10.5px; font-weight: 600; line-height: 1.3; text-align: left; padding: 2px 4px; border-radius: 5px; background: color-mix(in srgb, var(--c) 72%, #222); color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-height: 18px; }
.wad.cont-l { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; }
.wad.cont-r { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.wk-body { position: relative; }
.wk-hours { position: relative; height: calc(var(--hh) * 24); }
.wk-hr { height: var(--hh); position: relative; }
.wk-hr span { position: absolute; top: -7px; right: 6px; font-size: 10px; color: var(--faint); font-variant-numeric: tabular-nums; }
.wk-col { position: relative; height: calc(var(--hh) * 24); border-left: 1px solid var(--line); cursor: pointer;
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px), linear-gradient(to bottom, rgba(var(--ov), .025) 1px, transparent 1px);
  background-size: 100% var(--hh), 100% calc(var(--hh) / 2); background-position: 0 0, 0 calc(var(--hh) / 2); }
.wk-col.we { background-color: rgba(var(--ov), 0.015); }
.wk-col.today { background-color: color-mix(in srgb, var(--accent) 6%, transparent); }
.wev { --c: var(--ev); position: absolute; z-index: 1; display: flex; flex-direction: column; align-items: stretch; gap: 1px; overflow: hidden; text-align: left; padding: 3px 4px; border-radius: 6px; font-size: 10.5px; line-height: 1.22;
  background: color-mix(in srgb, var(--c) 34%, #262626); color: #fff; border-left: 3px solid var(--c); box-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.wev:hover { background: color-mix(in srgb, var(--c) 44%, #262626); z-index: 2; }
.wev .wt { font-weight: 650; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; word-break: normal; overflow-wrap: normal; }
.wev.narrow { padding-left: 3px; padding-right: 1px; }
.wev.narrow .wt { display: block; white-space: nowrap; text-overflow: clip; }
.wev.narrow .wh { display: none; }
.wev .wh { color: color-mix(in srgb, var(--c) 25%, white); opacity: .85; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wev.short { flex-direction: row; align-items: center; padding-top: 1px; padding-bottom: 1px; }
.wev.short .wt { -webkit-line-clamp: 1; display: block; white-space: nowrap; text-overflow: ellipsis; }
.wev.rem { background: color-mix(in srgb, var(--c) 14%, #232323); border: 1px dashed color-mix(in srgb, var(--c) 60%, transparent); border-left: 1px dashed color-mix(in srgb, var(--c) 60%, transparent); flex-direction: row; align-items: center; gap: 3px; color: color-mix(in srgb, var(--c) 35%, white); }
.wev.rem .i { font-size: 9px; color: #E3B341; flex: none; }
.now-line { position: absolute; left: -1px; right: 0; height: 2px; background: #ff5a4f; z-index: 2; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: #ff5a4f; }
@media (min-width: 900px) {
  .wk-dh { flex-direction: row; justify-content: center; gap: 8px; padding: 9px 0; }
  .wk-dh .wd { font-size: 11.5px; }
  .wev, .wad { font-size: 12px; padding-left: 6px; }
}

/* ---------- Fiche d'un événement ---------- */
.ev-sum { --c: var(--ev); font-size: 13.5px; color: var(--muted); margin: 2px 0 12px; padding-left: 10px; border-left: 3px solid var(--c); line-height: 1.45; }
.ev-sum::first-letter { text-transform: uppercase; }
.ev-form { display: grid; gap: 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.ev-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ev-row.top { align-items: flex-start; }
.ev-row.top label { padding-top: 6px; }
.ev-row > label { width: 72px; flex: none; font-size: 13px; color: var(--muted); font-weight: 600; }
.ev-row .inp { padding: 9px 10px; min-width: 0; flex: 1; }
.ev-row .inp.tm { flex: 0 0 104px; }
@media (min-width: 600px) { .ev-row .inp.tm { flex-basis: 132px; } .ev-row > label { width: 84px; } }
.ev-row select.inp { flex: 1; }
.ev-hint { font-size: 12.5px; color: var(--faint); flex: none; }
.ev-row .swatches { flex: 1; }
.ev-notes { margin-top: 14px; }
input[type="date"].inp, input[type="time"].inp { -webkit-appearance: none; appearance: none; min-height: 42px; }

/* ---------- Agendas Google ---------- */
.ev-row .ev-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; margin-right: -2px; }
.ev-note { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--muted); line-height: 1.4; padding: 2px 2px; }
.ev-note .i { color: var(--faint); margin-top: 2px; }
.ev-links { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 12px; }
.ev-links:empty { display: none; }
.ev-link { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 99px; font-size: 13px; font-weight: 600; color: var(--text); background: var(--bg2); border: 1px solid var(--line2); text-decoration: none; }
.ev-link.meet { color: #fff; background: color-mix(in srgb, #1a73e8 70%, #222); border-color: transparent; }
.ev-badge { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 99px; font-size: 12px; font-weight: 650; color: var(--muted); background: rgba(var(--ov), 0.06); }
.ev-badge.wait { color: #f1cf72; background: rgba(227, 179, 65, 0.12); }
.ev-err { width: 100%; font-size: 12.5px; color: #ff8a84; background: rgba(229, 83, 75, 0.1); border-radius: 8px; padding: 8px 10px; }
.seg2.off { opacity: .55; pointer-events: none; }
.ev-form select:disabled, .ev-form input:disabled { opacity: .6; }
.gacc-block { display: grid; gap: 6px; padding: 4px 0 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.gacc-block:last-of-type { border-bottom: 0; }
.gacc-mail { font-size: 12.5px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.gcal-list { display: grid; gap: 2px; }
.gcal-row { --c: #4C8DF6; display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 9px; cursor: pointer; font-size: 14.5px; }
.gcal-row:hover { background: rgba(var(--ov), 0.04); }
.gcal-row input { width: 18px; height: 18px; accent-color: var(--c); flex: none; margin: 0; }
.gcal-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.gcal-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gcal-tag { font-size: 11px; color: var(--faint); border: 1px solid var(--line2); border-radius: 99px; padding: 1px 7px; flex: none; }
.sub.err { color: #ff8a84; }
.set-card > .txt { font-size: 14.5px; }
.set-card > .sub { font-size: 12.5px; color: var(--faint); line-height: 1.45; }
.set-card > .btn { justify-self: start; }

/* ---------- En-tête : accordéons | minuteur | rappels du jour ---------- */
.top-grid { display: grid; gap: 8px; }
.top-left { display: grid; gap: 8px; align-content: start; min-width: 0; }
.top-left .acc + .acc { margin-top: 0; }
.top-side { display: grid; gap: 8px; align-content: start; min-width: 0; }
@media (min-width: 900px) {
  .top-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 540px); align-items: start; gap: 10px; }
  .top-side { grid-template-columns: 220px minmax(0, 1fr); gap: 10px; }
}
.side-card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 10px 10px; min-width: 0; }
.side-head { display: flex; align-items: center; gap: 8px; min-height: 28px; margin-bottom: 6px; }
.side-title { flex: 1; display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.side-title .i { font-size: 13px; }

/* Minuteur */
.tmr { --c: #3FB27F; }
.tmr .side-title .i { color: var(--c); }
.tmr-presets { display: flex; gap: 3px; }
.chip { padding: 3px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 650; color: var(--muted); border: 1px solid var(--line2); }
.chip.on { color: #fff; background: color-mix(in srgb, var(--c) 40%, transparent); border-color: color-mix(in srgb, var(--c) 70%, transparent); }
.tmr-main { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.tmr-time { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; line-height: 1.1; text-align: center; flex: 1; }
.tmr.run .tmr-time { color: color-mix(in srgb, var(--c) 45%, white); }
.tmr.paused .tmr-time { color: #f1cf72; }
.tmr-adj { width: 34px; height: 34px; border-radius: 10px; font-size: 20px; font-weight: 600; color: var(--muted); background: rgba(var(--ov), 0.05); flex: none; }
.tmr-adj:hover { color: var(--text); background: rgba(var(--ov), 0.09); }
.tmr-adj:disabled { opacity: .3; cursor: default; }
.tmr-bar { height: 3px; border-radius: 3px; background: rgba(var(--ov), 0.06); margin: 7px 0 8px; overflow: hidden; }
.tmr-bar span { display: block; height: 100%; width: 0; background: var(--c); border-radius: 3px; transition: width .9s linear; }
.tmr-actions { display: flex; gap: 6px; }
.tmr-go { flex: 1; padding: 8px 10px; background: color-mix(in srgb, var(--c) 80%, black); }
.tmr.run .tmr-go { background: rgba(var(--ov), 0.09); color: var(--text); }
.tmr-go .i { font-size: 13px; }
.tmr-reset { padding: 8px 11px; }
/* Pas de minuteur sur téléphone */
@media (max-width: 899px) { .tmr { display: none; } }

/* Rappels du jour */
.hab-list { display: grid; gap: 3px; }
.hab-row { --c: #4C8DF6; width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 6px; border-radius: 10px; text-align: left; background: color-mix(in srgb, var(--c) 9%, transparent); border: 1px solid color-mix(in srgb, var(--c) 18%, transparent); }
.hab-row:hover { background: color-mix(in srgb, var(--c) 15%, transparent); }
.hab-row.full { background: color-mix(in srgb, var(--c) 22%, transparent); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.hab-name { flex: 1; min-width: 0; font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hab-row.full .hab-name { color: #fff; }
.hab-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.hab-streak { font-size: 12px; color: #f5a25d; flex: none; font-weight: 650; }
.hab-ring { width: 24px; height: 24px; flex: none; display: grid; }
.hab-ring svg { width: 24px; height: 24px; transform: rotate(-90deg); }
.hab-ring circle { fill: none; stroke-width: 3.6; }
.hab-ring .bg { stroke: rgba(var(--ov), 0.1); }
.hab-ring .fg { stroke: var(--c); stroke-linecap: round; transition: stroke-dasharray .3s; }
.hab-ring .ok { fill: none; stroke: #fff; stroke-width: 3; transform: rotate(90deg); transform-origin: 18px 18px; }
.hab-sheet { gap: 10px; }
.hab-title { font-size: 18px; font-weight: 700; }
.hab-sub { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.hab-week { --c: #4C8DF6; display: flex; gap: 5px; }
.hab-day { flex: 1; text-align: center; padding: 6px 0; border-radius: 8px; font-size: 11.5px; font-weight: 700; color: var(--faint); background: rgba(var(--ov), 0.04); }
.hab-day.part { color: var(--text); background: color-mix(in srgb, var(--c) 22%, transparent); }
.hab-day.full { color: #fff; background: var(--c); }
.hab-day.today { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 70%, white); }
.hab-items { --c: #4C8DF6; display: grid; gap: 4px; }
.hab-item { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 4px; border-radius: 10px; background: var(--bg2); }
.hab-chk { width: 26px; height: 26px; border-radius: 8px; border: 2px solid color-mix(in srgb, var(--c) 60%, #777); display: grid; place-items: center; color: transparent; flex: none; font-size: 14px; }
.hab-chk svg { stroke-width: 3; }
.hab-item.on .hab-chk { background: var(--c); border-color: var(--c); color: #fff; }
.hab-text { flex: 1; font-size: 15px; cursor: text; padding: 4px 0; text-align: left; min-width: 0; }
.hab-text:hover { color: var(--accent); }
.hab-item.on .hab-text { color: var(--muted); text-decoration: line-through; }
.hab-item .sm-inp { flex: 1; padding: 7px 9px; font-size: 15px; }
.hab-add .inp { flex: 1; }

/* ---------- Calendrier sur téléphone : Semaine / Mois à droite de la date ---------- */
.top-views { display: none; }
.cal-short { font-size: 13px; font-weight: 650; color: var(--muted); margin-left: 6px; white-space: nowrap; }
@media (max-width: 899px) {
  body.mode-cal .date-row { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "tabs . actions" "date date views"; }
  body.mode-cal .top-views { display: inline-flex; grid-area: views; justify-self: end; align-self: center; }
  body.mode-cal .top-views button { padding: 7px 10px; }
  body.mode-cal .date-row { column-gap: 8px; }
  body.mode-cal .date-row .top-actions { justify-self: end; }
  .cal-bar .cal-title, .cal-bar .cal-views { display: none; }
  .cal-bar { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "nav tools"; margin-top: -2px; }
  body.mode-cal .date-big { font-size: 22px; }
}
@media (min-width: 900px) { .cal-short { display: none; } }

/* Cadres colorés : Pause (vert) et Chaque jour (violet) */
.side-card.tmr { background: #646464; border-color: rgba(255, 255, 255, 0.18); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(var(--ov), 0.05); }
.side-card.tmr, .side-card.habits { --muted: #dcdcdc; --faint: #c4c4c4; }
.side-card.tmr .side-title { color: #b4f5d6; }
.side-card.tmr .tmr-adj { background: rgba(0, 0, 0, 0.18); }
.side-card.tmr .tmr-bar { background: rgba(0, 0, 0, 0.22); }
.side-card.tmr .chip { border-color: rgba(63, 178, 127, 0.35); }
.side-card.habits { background: #646464; border-color: rgba(255, 255, 255, 0.18); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(var(--ov), 0.05); }
.side-card.habits .side-title { color: #e2d6ff; }
.side-card.habits .side-title .i { color: #b896ff; }
.side-card.habits .mini-btn { color: #cdb7ff; }
.side-card.habits .hab-row { background: color-mix(in srgb, var(--c) 16%, rgba(0, 0, 0, 0.2)); border-color: color-mix(in srgb, var(--c) 30%, transparent); }
.side-card.habits .hab-row:hover { background: color-mix(in srgb, var(--c) 24%, rgba(0, 0, 0, 0.2)); }
.side-card.habits .hab-row.full { background: color-mix(in srgb, var(--c) 34%, rgba(0, 0, 0, 0.15)); border-color: color-mix(in srgb, var(--c) 60%, transparent); }
.side-card.tmr .tmr-go { background: color-mix(in srgb, #3FB27F 82%, black); color: #fff; }
.side-card.tmr.run .tmr-go { background: rgba(0, 0, 0, 0.22); color: var(--text); }

/* Sélection d'un créneau dans la semaine */
.wk-col { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.wk-sel { position: absolute; left: 1px; right: 2px; z-index: 3; pointer-events: none; border-radius: 6px; background: color-mix(in srgb, var(--accent) 38%, transparent); border: 1.5px solid color-mix(in srgb, var(--accent) 85%, white); box-shadow: 0 2px 10px rgba(0, 0, 0, .35); overflow: hidden; }
.wk-sel span { display: block; padding: 2px 4px; font-size: 10.5px; font-weight: 700; color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (min-width: 900px) { .wk-sel span { font-size: 12px; padding: 3px 6px; } }

/* Choix de l'agenda avec couleurs */
.ag-pick { flex: 1; min-width: 0; display: grid; gap: 6px; }
.ag-btn { display: flex; align-items: center; gap: 9px; text-align: left; cursor: pointer; width: 100%; color: var(--text); }
.ag-btn:disabled { cursor: default; }
.ag-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 0 2px rgba(var(--ov), 0.1); }
.ag-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-acc { font-size: 11.5px; color: var(--faint); flex: none; }
.ag-chev { color: var(--faint); transform: rotate(90deg); transition: transform .15s; flex: none; }
.ag-pick.open .ag-chev { transform: rotate(-90deg); }
.ag-menu { display: grid; gap: 2px; background: var(--bg); border: 1px solid var(--line2); border-radius: 10px; padding: 4px; max-height: 280px; overflow-y: auto; }
.ag-opt { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 8px; text-align: left; font-size: 14.5px; color: var(--text); }
.ag-opt:hover { background: rgba(var(--ov), 0.05); }
.ag-opt.on { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.ag-opt .i { color: color-mix(in srgb, var(--accent) 60%, white); flex: none; }

/* Bouton Valider de la fiche */
.sheet-foot { flex: none; padding: 10px 16px 12px; border-top: 1px solid var(--line); background: var(--panel); }
.sheet-foot .btn { width: 100%; justify-content: center; padding: 12px; font-size: 15.5px; gap: 8px; }
@media (max-width: 899px) { .wk-sel span { white-space: normal; line-height: 1.25; } }
.gcal-ren { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--faint); flex: none; font-size: 13px; }
.gcal-ren:hover { color: var(--text); background: rgba(var(--ov), 0.06); }

/* Déplacer un événement en le faisant glisser */
.wev.movable, .wad.movable, .mchip.movable, .mbar.movable { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.wev.moving, .wad.moving, .mchip.moving, .mbar.moving { opacity: .35; }
/* Pendant un glisser, les barres laissent passer le pointeur pour trouver le jour visé */
body.ev-dragging .mbar, body.ev-dragging .wad, body.ev-dragging .mchip { pointer-events: none; }
.wev.wev-ghost { z-index: 4; left: 1px !important; width: calc(100% - 3px) !important; pointer-events: none; background: color-mix(in srgb, var(--c) 62%, #262626); box-shadow: 0 6px 18px rgba(0, 0, 0, .5), 0 0 0 1.5px color-mix(in srgb, var(--c) 70%, white); }
.wev.wev-ghost { overflow: visible; }
.wev.wev-ghost .wt { display: block; -webkit-line-clamp: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wev-badge { position: absolute; bottom: calc(100% + 5px); left: -3px; padding: 3px 8px; border-radius: 7px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; line-height: 1.2; white-space: nowrap; font-variant-numeric: tabular-nums; box-shadow: 0 4px 12px rgba(0, 0, 0, .45); }
.wev-badge.r { left: auto; right: -3px; }
.wev-badge.below { bottom: auto; top: calc(100% + 5px); }
.drag-chip { position: fixed; left: 0; top: 0; z-index: 1000; pointer-events: none; max-width: 180px; padding: 4px 8px; border-radius: 7px; font-size: 12px; font-weight: 650; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: color-mix(in srgb, var(--c) 72%, #222); box-shadow: 0 6px 18px rgba(0, 0, 0, .5); }
.mcell.drop-target, .wk-adc.drop-target { background: color-mix(in srgb, var(--accent) 18%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 70%, transparent); }
body.ev-dragging, body.ev-dragging * { cursor: grabbing !important; }
body.ev-dragging .wev:not(.wev-ghost):hover { background: color-mix(in srgb, var(--c) 34%, #262626); }

/* ---------- Rappels récurrents ---------- */
.hab-ring-btn { display: grid; flex: none; border-radius: 50%; }
.hab-ring-btn.tap { cursor: pointer; margin: -6px; padding: 6px; }
.hab-ring-btn.tap:hover .hab-ring .bg { stroke: rgba(255, 255, 255, 0.28); }
.hab-bell { flex: none; display: grid; color: var(--muted); font-size: 13px; }
.hab-bell svg { width: 14px; height: 14px; }
.hab-later-title { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin: 6px 2px 1px; }
.hab-row.later { opacity: .72; }
.side-card.habits .hab-row.later { background: rgba(0, 0, 0, 0.16); border-color: rgba(var(--ov), 0.08); }
.hab-row.later .hab-name { font-weight: 550; }
.hab-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin: 0 7px; flex: none; }
.hab-sep { height: 1px; background: var(--line); margin: 4px 0; }
.hab-lab { margin-top: 2px; }
.hab-day.off { opacity: .35; background: transparent; }
.hab-notdue { font-size: 13px; color: var(--muted); background: var(--bg2); border-radius: 10px; padding: 9px 12px; }
.hab-items.off .hab-chk { opacity: .5; pointer-events: none; }
.hab-big { --c: #4C8DF6; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 13px; border-radius: 12px; font-size: 15.5px; font-weight: 650; background: color-mix(in srgb, var(--c) 14%, var(--bg2)); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.hab-big.on { background: var(--c); border-color: var(--c); color: #fff; }
.hab-big.on .hab-chk { border-color: #fff; color: #fff; }
.hab-big[disabled] { opacity: .45; }
.hab-nday .inp { width: 74px; text-align: center; }
.hab-nday span { font-size: 14px; color: var(--muted); }
.hab-alarm .inp { width: auto; min-width: 110px; }
.hab-alarm span { font-size: 14px; color: var(--muted); }
.mdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.mdays button { height: 36px; border-radius: 9px; background: var(--bg2); border: 1px solid var(--line2); font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.mdays button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.quick.mend button.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Onglet Notes ---------- */
body.mode-notes #cal, body.mode-inbox #cal { display: block !important; }
body.mode-notes .top-grid, body.mode-notes #toolbar, body.mode-notes #board, body.mode-notes #lists,
body.mode-inbox .top-grid, body.mode-inbox #toolbar, body.mode-inbox #board, body.mode-inbox #lists { display: none !important; }
.nb { max-width: 820px; margin: 0 auto; padding: 4px 2px 40px; display: grid; gap: 12px; }
.nb-head { display: flex; align-items: center; gap: 10px; }
.nb-head h2 { margin: 0; font-size: 22px; font-weight: 750; }
.nb-n { font-size: 13px; color: var(--faint); font-weight: 650; }
.nb-head .grow { flex: 1; }
.nb-new { padding: 9px 14px; }
.nb-search { font-size: 15px; padding: 10px 12px; }
.nb-empty { grid-column: 1 / -1; color: var(--faint); font-size: 14px; text-align: center; padding: 26px 8px; }


/* ---------- Notes : liste des titres et hashtags ---------- */
.nl-tools { display: flex; gap: 8px; }
.nl-tools .nb-search { flex: 1; min-width: 0; }
.nl-sort { width: auto; flex: none; font-size: 14px; padding: 9px 10px; }
.ntag-bar, .ntag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.ntag-row { margin: 8px 0 2px; }
.ntag { --t: #8C8C8C; display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; line-height: 1.2;
  color: color-mix(in srgb, var(--t) 45%, var(--text)); background: color-mix(in srgb, var(--t) 14%, transparent); border: 1px solid color-mix(in srgb, var(--t) 35%, transparent); }
.ntag.on { background: var(--t); border-color: var(--t); color: #fff; }
.ntag.all { --t: var(--accent); }
.ntag.add { --t: #8C8C8C; background: transparent; border-style: dashed; color: var(--muted); }
.ntag.add .i { font-size: 12px; }
.ntag.mini { padding: 1px 7px; font-size: 11.5px; }
.sheet.paper .ntag, .nx-paper .ntag { color: color-mix(in srgb, var(--t) 70%, black); }
.sheet.paper .ntag.on, .nx-paper .ntag.on { color: #fff; }
.ntag-edit .ntag-hash { font-weight: 700; color: var(--t); font-size: 17px; }
.ntag-edit .inp { flex: 1; }
.nl-list { display: grid; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.nl-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; text-align: left; border-top: 1px solid var(--line); min-width: 0; }
.nl-row:first-child { border-top: 0; }
.nl-row:hover { background: rgba(var(--ov), 0.04); }
.nl-t { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nl-t.dim { color: var(--muted); font-weight: 500; }
.nl-tags { display: flex; gap: 4px; flex: none; max-width: 45%; overflow: hidden; }
.nl-d { flex: none; font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.nl-list .nb-empty { padding: 22px 10px; }
.nl-lock { flex: none; font-size: 15px; color: var(--faint); margin-right: -4px; }
.nl-row.locked .nl-t.dim { font-style: italic; }
.nb-lock { flex: none; }
.nb-lock.open { color: var(--accent); }
.vault-crumb { display: inline-flex; align-items: center; gap: 6px; }
.vault-agree { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.45; color: var(--muted); cursor: pointer; }
.vault-agree input { margin-top: 3px; flex: none; width: 18px; height: 18px; accent-color: var(--accent); }

/* ---------- Dossiers de notes ---------- */
.folder-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line2); font-size: 12.5px; font-weight: 600; color: var(--muted); max-width: 220px; flex: none; }
.folder-chip .i { font-size: 14px; }
.folder-chip span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-chip:hover { color: var(--text); background: rgba(var(--ov), 0.05); }
.nb-folder { padding: 5px 10px; font-size: 13px; }
.nb-folder.on { border-color: var(--accent); color: var(--accent); }
.nl-f { flex: none; max-width: 30%; font-size: 12px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ntag-edit .fic { color: var(--accent); font-size: 18px; }

/* ---------- Notes sur ordinateur : menu à gauche, note à droite ---------- */
body.nx-on .shell { padding-bottom: 20px; }
.nx { display: grid; grid-template-columns: var(--nx-f, 220px) 10px var(--nx-w, 300px) 10px minmax(0, 1fr); gap: 0; height: calc(100dvh - var(--nx-top, 140px) - 20px); min-height: 440px; }
.nx-side, .nx-list { display: flex; flex-direction: column; gap: 10px; min-height: 0; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 12px 6px; }
.nx-head { display: flex; align-items: center; gap: 4px; }
.nx-head h2 { margin: 0 4px 0 2px; font-size: 19px; font-weight: 750; }
.nx-head .grow { flex: 1; }
.nx-head .icon-btn { width: 34px; height: 34px; font-size: 18px; }
.nx-new { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 18px; margin-left: 2px; }
.nx-tools { display: flex; gap: 6px; }
.nx-tools .nb-search { flex: 1; min-width: 0; padding: 8px 10px; font-size: 14px; }
.nx-tools .nl-sort { font-size: 12.5px; padding: 8px 4px; max-width: 118px; }
.nx-side .ntag-bar { gap: 5px; }
.nx-side .ntag { padding: 3px 9px; font-size: 12px; }
.nx-tree { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -6px; padding: 2px 2px 10px; }
.nx-row { display: flex; align-items: center; gap: 7px; width: 100%; padding: 7px 8px; border-radius: 8px; text-align: left; font-size: 14px; min-width: 0; cursor: pointer; }
.nx-row:hover { background: rgba(var(--ov), 0.05); }
.nx-row.sel { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.nx-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-t.dim { color: var(--muted); font-style: italic; }
.nx-c { flex: none; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.nx-folder { font-weight: 650; }
.nx-folder .chev { font-size: 12px; color: var(--faint); transition: transform 0.15s; }
.nx-folder.open .chev { transform: rotate(90deg); }
.nx-folder .fic { color: var(--accent); font-size: 16px; }
.nx-more { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; color: var(--muted); font-size: 16px; opacity: 0; flex: none; }
.nx-folder:hover .nx-more, .nx-more:focus-visible { opacity: 1; }
.nx-more:hover { background: rgba(var(--ov), 0.08); color: var(--text); }
.nx-note.in { padding-left: 31px; }
.nx-note .nl-lock { margin: 0; font-size: 13px; }
.nx-none { padding: 4px 8px 6px 31px; font-size: 12.5px; color: var(--faint); }
.nx-sep { height: 1px; background: var(--line); margin: 6px 8px; }
.nx-add { color: var(--faint); font-size: 13px; margin-top: 4px; }
.nx-add:hover { color: var(--text); }
.nx-main { min-height: 0; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.nx-wrap { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.nx-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px 0 24px; flex: none; }
.nx-bar .crumb { font-size: 12.5px; color: var(--faint); white-space: nowrap; }
.nx-bar .grow { flex: 1; }
.nx-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 24px 0; }
.nx-doc { max-width: 780px; margin: 0 auto; }
.nx-doc .editor { padding-bottom: 20vh; }
.nx-empty { margin: auto; text-align: center; color: var(--faint); font-size: 14px; display: grid; gap: 14px; justify-items: center; padding: 30px; }
.nx-empty > .i { font-size: 34px; }
@media (max-width: 899px) { .nl-tags { max-width: 38%; } .nl-row { padding: 11px 12px; } }

/* ---------- Échéances ---------- */
.dl-acc { --c: var(--accent); }
.dl-acc .acc-ic { color: #E5534B; }
.dl-acc .acc-head .count { margin-right: 2px; }
.dl-list { display: grid; gap: 4px; }
.dl-row { --c: var(--accent); display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); text-align: left; }
.dl-row:hover { background: var(--card-h); }
.dl-t { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dl-t .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.dl-name { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-date { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.dl-left { font-size: 12.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: rgba(var(--ov), 0.07); white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 44px; text-align: center; }
.dl-row.soon .dl-left { background: rgba(232, 131, 58, 0.18); color: #f0a061; }
.dl-row.late .dl-left { background: rgba(229, 83, 75, 0.2); color: #ff8a84; }
.dl-when { display: flex; align-items: flex-end; gap: 12px; margin: 10px 0; }
.dl-big { font-size: 20px; font-weight: 750; padding-bottom: 8px; white-space: nowrap; }
.dl-big.late { color: #ff8a84; }
.sheet-scroll > .field { margin-bottom: 10px; }
@media (max-width: 899px) { .dl-date { display: none; } }

/* ---------- Téléphone : onglets des projets soulignés, sans cadre ---------- */
@media (max-width: 899px) {
  .toolbar { align-items: center; margin: 12px 0 10px; }
  .toolbar .seg.tabs { flex: 1; flex-wrap: nowrap; overflow-x: auto; background: none; border: 0; border-radius: 0; padding: 0; gap: 2px; border-bottom: 1px solid var(--line);
    -webkit-mask-image: linear-gradient(to right, #000 88%, transparent); mask-image: linear-gradient(to right, #000 88%, transparent); }
  .toolbar .seg.tabs button { position: relative; padding: 9px 9px 10px; border-radius: 0; background: none !important; box-shadow: none !important; color: var(--muted); font-size: 12.5px; letter-spacing: .04em; }
  .toolbar .seg.tabs button.on { color: var(--text); }
  .toolbar .seg.tabs button.on::after { content: ""; position: absolute; left: 7px; right: 7px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--c, var(--accent)); }
  .toolbar .seg.tabs .ptab .dot { width: 7px; height: 7px; }
  .toolbar .seg.tabs .ptab-add { padding: 9px 12px 10px; }
}

/* ---------- Comptes, partage, Reçu ---------- */
.av { width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-size: 12px; font-weight: 750; color: #fff; background: color-mix(in srgb, var(--accent) 75%, #333); }
.mode-tabs button { position: relative; white-space: nowrap; }
@media (min-width: 900px) and (max-width: 1279px) { .mode-tabs .mt-lbl { display: none; } .mt-badge { position: absolute; margin: 0; box-shadow: 0 0 0 2px var(--bg); } }
.mt-badge { position: absolute; top: 1px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: #E5534B; color: #fff; font-size: 10.5px; font-weight: 800; line-height: 17px; text-align: center; letter-spacing: 0; box-shadow: 0 0 0 2px var(--bg); }
@media (min-width: 900px) { .mt-badge { position: static; margin-left: 6px; box-shadow: none; } }
.ib { max-width: 820px; margin: 0 auto; padding: 4px 2px 40px; display: grid; gap: 10px; }
.ib-hint { margin: -4px 0 4px; }
.ib-card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 7px; }
.ib-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.ib-from { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--text); }
.ib-from .av { width: 22px; height: 22px; font-size: 11px; }
.ib-from.claude .av { background: #9B6CF0; }
.ib-proj { --c: #888; display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--text); font-weight: 600; }
.ib-proj .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.ib-date { margin-left: auto; color: var(--faint); }
.ib-title { text-align: left; font-size: 16.5px; font-weight: 650; line-height: 1.35; }
.ib-note { font-size: 13.5px; color: var(--muted); line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ib-lbl { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-top: 2px; }
.ib-places { display: flex; flex-wrap: wrap; gap: 6px; }
.ib-place { --c: #888; display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 10px; font-size: 13px; font-weight: 600; background: color-mix(in srgb, var(--c) 16%, var(--panel)); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.ib-place:hover { background: color-mix(in srgb, var(--c) 26%, var(--panel)); }
.ib-place .ic { font-size: 13px; letter-spacing: -1px; }
.ib-place.sug { box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 70%, transparent); }
.ib-place.proj { --c: #8C8C8C; border-style: dashed; }
.card-who { display: block; margin-top: 3px; font-size: 11.5px; font-weight: 600; color: #2EB6AA; opacity: .9; }
.from-pill .av { width: 18px; height: 18px; font-size: 10px; }
.ptab-sh { display: inline-grid; margin-left: 2px; opacity: .7; font-size: 12px; }
.ptab-sh svg { width: 13px; height: 13px; }
.share-block .members { display: grid; gap: 4px; margin-bottom: 8px; }
.member { display: flex; align-items: center; gap: 9px; padding: 6px 4px; font-size: 14.5px; }
.member .grow { flex: 1; min-width: 0; }
.member .owner { font-size: 11.5px; color: var(--faint); font-weight: 600; }
.share-add .inp { flex: 1; min-width: 0; }
.people-pick .menu-item { gap: 10px; }
.people-pick .sub { font-size: 12px; color: var(--faint); margin-left: auto; }
.set-row.person { gap: 10px; justify-content: flex-start; }
.set-row.person .grow { flex: 1; min-width: 0; }
.set-row.off { opacity: .55; }
.auth-hint { margin-top: 10px; text-align: center; }
.auth-lang { margin-top: 14px; font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
/* ================= Mode clair ================= */
:root[data-theme="light"] {
  --ov: 0, 0, 0;
  --bg: #ebe9e5; --bg2: #dfddd8; --panel: #ffffff; --card: #ffffff; --card-h: #f1f0ed;
  --line: rgba(0, 0, 0, 0.08); --line2: rgba(0, 0, 0, 0.13);
  --text: #1d1d1f; --muted: #5e5c58; --faint: #8f8c86;
  color-scheme: light;
}
[data-theme="light"] .sheet { box-shadow: 0 -10px 40px rgba(0, 0, 0, .18); }
[data-theme="light"] .grab { background: rgba(0, 0, 0, 0.18); }
[data-theme="light"] .editor hr { background: rgba(0, 0, 0, 0.25); }
[data-theme="light"] .editor a { color: #1a5fd0; }
[data-theme="light"] .seg button.on { box-shadow: 0 1px 2px rgba(0, 0, 0, .12); background: #fff; }
[data-theme="light"] .seg .ptab.on, [data-theme="light"] .mode-tabs button.on, [data-theme="light"] .chip.on { color: var(--text); }
[data-theme="light"] .card { box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
[data-theme="light"] .card.is-prio { box-shadow: 0 0 0 1px rgba(255, 82, 71, 0.22), 0 2px 6px rgba(0, 0, 0, 0.1); }
[data-theme="light"] .card.is-prio .card-title { color: #7d1d17; }
[data-theme="light"] .card.is-prio .card-note { color: var(--muted); }
[data-theme="light"] .prio { color: #8f8c86; }
[data-theme="light"] .btn.danger, [data-theme="light"] .menu-item.danger, [data-theme="light"] .auth-err, [data-theme="light"] .sub.err, [data-theme="light"] .ev-err { color: #c4362e; }
[data-theme="light"] .toast { background: #ffffff; box-shadow: 0 6px 24px rgba(0, 0, 0, .16); }
[data-theme="light"] .toast button, [data-theme="light"] .push-banner .pb-ic { color: color-mix(in srgb, var(--accent) 78%, #000); }
[data-theme="light"] .rem-toggle.on, [data-theme="light"] .ev-badge.wait, [data-theme="light"] .tmr.paused .tmr-time { color: #9a6c00; }
[data-theme="light"] .sw.on { border-color: #1d1d1f; }
[data-theme="light"] .sheet .tag { color: color-mix(in srgb, var(--t) 70%, black); }
[data-theme="light"] .mchip { color: color-mix(in srgb, var(--c) 70%, black); background: color-mix(in srgb, var(--c) 16%, transparent); }
[data-theme="light"] .mchip.rem { color: color-mix(in srgb, var(--c) 70%, black); }
[data-theme="light"] .wev { background: color-mix(in srgb, var(--c) 20%, #fff); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
[data-theme="light"] .wev:hover { background: color-mix(in srgb, var(--c) 28%, #fff); }
[data-theme="light"] .wev .wh { color: color-mix(in srgb, var(--c) 60%, black); }
[data-theme="light"] .wev.rem { background: color-mix(in srgb, var(--c) 8%, #fff); color: color-mix(in srgb, var(--c) 70%, black); }
[data-theme="light"] .side-card.tmr, [data-theme="light"] .side-card.habits { background: #ffffff; border-color: var(--line2); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); --muted: #5e5c58; --faint: #8f8c86; }
[data-theme="light"] .side-card.tmr .side-title { color: #1f7a52; }
[data-theme="light"] .side-card.habits .side-title { color: #6b45c4; }
[data-theme="light"] .side-card.habits .side-title .i, [data-theme="light"] .side-card.habits .mini-btn { color: #7b4fd6; }
[data-theme="light"] .side-card.habits .hab-row { background: color-mix(in srgb, var(--c) 10%, #fff); border-color: color-mix(in srgb, var(--c) 28%, transparent); }
[data-theme="light"] .side-card.habits .hab-row:hover { background: color-mix(in srgb, var(--c) 16%, #fff); }
[data-theme="light"] .side-card.habits .hab-row.full { background: color-mix(in srgb, var(--c) 26%, #fff); border-color: color-mix(in srgb, var(--c) 55%, transparent); }
[data-theme="light"] .side-card.habits .hab-row.later { background: rgba(0, 0, 0, 0.03); border-color: rgba(0, 0, 0, 0.06); }
[data-theme="light"] .hab-row.full .hab-name { color: var(--text); }
[data-theme="light"] .hab-ring .ok { stroke: var(--c); }
[data-theme="light"] .hab-day.full, [data-theme="light"] .hab-item.on .hab-chk { color: #fff; }
[data-theme="light"] .notes-acc { background: #fffdf8; border-color: #e3dfd6; }
[data-theme="light"] .col-name { color: color-mix(in srgb, var(--c) 72%, black); }
[data-theme="light"] .col { background: color-mix(in srgb, var(--c) 13%, var(--bg)); }
[data-theme="light"] .card-who { color: #17877c; }
[data-theme="light"] .ag-dot { box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.08); }
[data-theme="light"] .dl-row.soon .dl-left { color: #b0560f; }
[data-theme="light"] .dl-row.late .dl-left, [data-theme="light"] .dl-big.late { color: #c4362e; }
[data-theme="light"] .ntag:not(.on) { color: color-mix(in srgb, var(--t) 70%, black); }

/* ---------- Barre d'outils du texte : un bandeau bien séparé du texte ---------- */
.ed-tools { background: color-mix(in srgb, var(--panel) 93%, var(--text)); border: 1px solid var(--line); border-radius: 10px; padding: 4px 6px; margin: 8px 0 18px; }
.ed-tools .lockbtn { margin-left: auto; }
.ed-tools .lockbtn.on { color: var(--accent); }
.ed-tools .ed-palette { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; }
.ed-tools .ed-palette .sw.ink, .ed-tools .ed-palette .sw.none:not(:empty) { border-color: transparent; box-shadow: none; font-size: 17px; }
.ed-tools .ed-palette .sw.mark { box-shadow: none; }
.ed-tools .ed-palette .sw.ink:hover, .ed-tools .ed-palette .sw.none:not(:empty):hover { background: rgba(var(--ov), 0.07); }

/* ---------- Notes sur ordinateur : largeur du menu réglable ---------- */
.nx-grip { cursor: col-resize; position: relative; touch-action: none; }
.nx-grip::after { content: ""; position: absolute; top: 18px; bottom: 18px; left: 4px; width: 2px; border-radius: 2px; background: transparent; transition: background .15s; }
.nx-grip:hover::after, .nx-grip.drag::after { background: var(--accent); }
.nx-pins { display: flex; align-items: center; gap: 7px; padding: 6px 8px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.nl-pin { flex: none; font-size: 14px; color: var(--accent); margin-right: -4px; }
.nl-row, .nx-row { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

/* ---------- Menu du clic droit ---------- */
.ctx-menu { position: fixed; z-index: 1000; min-width: 210px; background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35); padding: 5px; display: grid; }
.ctx-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; font-size: 14px; text-align: left; }
.ctx-item:hover { background: rgba(var(--ov), 0.08); }
.ctx-item .i { font-size: 16px; color: var(--muted); }
.ctx-item.danger, .ctx-item.danger .i { color: #ff6b62; }
.ctx-sep { height: 1px; background: var(--line); margin: 4px 6px; }

/* ---------- Envoyer à : personnes enregistrées ---------- */
.people-pick .person-row { padding: 0 6px 0 0; gap: 4px; }
.person-go { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 12px; text-align: left; border-radius: 10px; }
.person-go:hover { background: rgba(var(--ov), 0.05); }

/* ---------- Rappel récurrent : des cadres par partie ---------- */
.hab-card { border: 1px solid var(--line2); border-radius: 12px; padding: 12px; display: grid; gap: 10px; background: rgba(var(--ov), 0.025); }
.hab-card-t { font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }
.hab-card .field { margin: 0; }
.hab-card .preview { margin: 0; }
.hab-addlink { justify-self: start; color: var(--muted); font-size: 14px; padding: 2px 2px; }
.hab-addlink:hover { color: var(--accent); }
.hab-item.editing { background: transparent; padding-left: 4px; }
.hab-item.editing .hab-chk { color: var(--faint); border-style: dashed; }
.hab-foot .btn.danger { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Onglets des projets : soulignés, sans cadre, aussi sur ordinateur ---------- */
@media (min-width: 900px) {
  .toolbar .seg.tabs { flex: 1; background: none; border: 0; border-radius: 0; padding: 0; gap: 4px; border-bottom: 1px solid var(--line); }
  .toolbar .seg.tabs button { position: relative; padding: 10px 12px 11px; border-radius: 0; background: none !important; box-shadow: none !important; color: var(--muted); }
  .toolbar .seg.tabs button:hover { color: var(--text); }
  .toolbar .seg.tabs button.on { color: var(--text); }
  .toolbar .seg.tabs button.on::after { content: ""; position: absolute; left: 9px; right: 9px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--c, var(--accent)); }
}

/* ---------- Glisser une note dans un dossier ---------- */
.nx-note[draggable="true"] { -webkit-user-drag: element; }
.nx-note.dragged { opacity: .45; }
.nx-row.drop, .nx-pins.drop { background: color-mix(in srgb, var(--accent) 28%, transparent); box-shadow: inset 0 0 0 1.5px var(--accent); border-radius: 8px; }
.nx-dz { display: none; align-items: center; gap: 8px; margin: 6px 4px; padding: 9px 10px; border: 1.5px dashed var(--line2); border-radius: 9px; color: var(--muted); font-size: 13px; }
.nx.dragging .nx-dz { display: flex; }
.nx-dz.drop { border-color: var(--accent); color: var(--text); background: color-mix(in srgb, var(--accent) 18%, transparent); }

/* ---------- Notes sur ordinateur : colonne des dossiers ---------- */
.nx-folders { display: flex; flex-direction: column; gap: 6px; min-height: 0; padding: 12px 2px 6px 0; }
.nx-folders .nx-head { padding: 0 4px 0 6px; }
.nx-fscroll { flex: 1; min-height: 0; overflow-y: auto; padding: 0 2px 14px 0; }
.nx-sec { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 14px 8px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.nx-sec.ghost, .nx-f.ghost { display: none; }
.nx.dragging .nx-sec.ghost, .nx.dragging .nx-f.ghost { display: flex; }
.nx-secbtn { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: var(--faint); font-size: 13px; }
.nx-secbtn:hover { background: rgba(var(--ov), .08); color: var(--text); }
.nx-f { font-weight: 560; }
.nx-f .fic { color: var(--accent); font-size: 16px; width: 20px; flex: none; }
.nx-f.soft .nx-t { color: var(--muted); }
.nx-f:hover .nx-more { opacity: 1; }
.femo { font-size: 16px; line-height: 1; }
.nx-tags { padding: 2px 6px; gap: 5px; }
.nx-tags .ntag { padding: 3px 9px; font-size: 12px; }
.nx-pdot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; display: inline-block; }
.nx-pdot.big { width: 12px; height: 12px; margin: 0 4px; }
.nx-f .nx-pdot.big { margin: 0 4px 0 4px; }
/* ---------- colonne des notes ---------- */
.nx-lhead { gap: 6px; min-height: 34px; }
.nx-ltitle { margin: 0; font-size: 17px; font-weight: 750; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-bigic { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 20px; color: var(--accent); flex: none; }
.nx-bigic .femo { font-size: 21px; }
button.nx-bigic:hover { background: rgba(var(--ov), .08); }
.nx-bigic.plain { color: var(--muted); }
.nx-hash { font-weight: 800; font-size: 18px; color: var(--t); width: 22px; text-align: center; flex: none; }
.nx-note { flex-direction: column; align-items: stretch; gap: 3px; padding: 8px 10px; }
.nx-l1, .nx-l2 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.nx-l1 .nx-t { font-weight: 600; }
.nx-l2 { font-size: 12.5px; color: var(--muted); }
.nx-d { flex: none; color: var(--faint); font-variant-numeric: tabular-nums; }
.nx-fl { flex: none; display: inline-flex; align-items: center; gap: 4px; max-width: 45%; overflow: hidden; white-space: nowrap; }
.nx-fl > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.nx-fl .i, .nx-fl .femo { font-size: 12px; }
.nx-s { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nx-tk { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--muted); flex: none; }
.nx-tk .i { font-size: 12px; }
.nx-note .nl-pin { font-size: 12px; color: var(--faint); margin: 0; }
.nx-tree .nx-pins { padding-top: 8px; }
/* ---------- projet et actions d'une note ---------- */
.nlink-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.nlink { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 11px; border-radius: 999px; font-size: 13px; border: 1px solid var(--line2); color: var(--text); min-width: 0; }
.nlink .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.nlink .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; }
.nlink .i { font-size: 13px; flex: none; }
.nlink.proj:not(.dim) { border-color: color-mix(in srgb, var(--c) 55%, transparent); background: color-mix(in srgb, var(--c) 13%, transparent); font-weight: 600; }
.nlink.dim, .nlink.add { color: var(--muted); border-style: dashed; }
.nlink:hover { background: rgba(var(--ov), .06); }
.sheet.paper .nlink:hover, .nx-paper .nlink:hover { background: rgba(0, 0, 0, .05); }
.nlink-ic { font-size: 12px; flex: none; }
.nlink.task.done .t { text-decoration: line-through; color: var(--muted); }
.nlink.task.done .nlink-ic { color: #2f9e5b; }
.card-nlink { color: var(--muted); font-size: 12.5px; }
.lists .card-nlink { color: #8a867f; }
.card.is-prio .card-nlink { color: rgba(255, 255, 255, 0.8); }
/* choix d'une action */
.tp-top { display: grid; gap: 8px; padding: 2px 16px 6px; }
.tp-filt { gap: 6px; }
.tp-head { display: flex; align-items: center; gap: 8px; padding: 12px 10px 4px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.tp-ic { font-size: 14px; letter-spacing: 0; }
.tp-list .menu-item { padding: 9px 12px; font-size: 15px; }
.tp-none { padding: 18px 12px; }
.sheet.tp { height: min(78vh, 680px); }
.sheet.tp .sheet-scroll { padding: 0 6px 12px; }
@media (min-width: 760px) { .sheet.tp { width: min(520px, 94vw); } }
/* menus : couleur et émoji */
.ctx-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin: 0 3px; flex: none; }
.mi-emo { font-size: 15px; line-height: 1; width: 16px; }
.ctx-item.sel { font-weight: 650; }
.fic-btn { font-size: 18px; color: var(--accent); flex: none; }
.fic-btn .femo { font-size: 19px; }
/* ---------- choix d'une icône (émojis) ---------- */
.emo-top { display: grid; gap: 8px; padding: 2px 16px 4px; }
.emo-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.emo-tab { font-size: 19px; width: 38px; height: 34px; border-radius: 8px; flex: none; line-height: 1; }
.emo-tab:hover { background: rgba(var(--ov), .08); }
.sheet.emo-sheet { height: min(82vh, 700px); }
@media (min-width: 760px) { .sheet.emo-sheet { width: min(560px, 94vw); } }
.emo-scroll { padding: 0 12px 12px; position: relative; }
.emo-h { position: sticky; top: 0; background: var(--panel); padding: 10px 4px 4px; font-size: 11.5px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; z-index: 1; }
.emo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 2px; }
.emo { font-size: 25px; height: 44px; border-radius: 9px; line-height: 1; }
.emo:hover { background: rgba(var(--ov), .08); }
.emo.on { background: color-mix(in srgb, var(--accent) 25%, transparent); }
.emo-none { padding: 20px 6px; }
.emo-foot .btn { justify-content: center; }

/* ---------- partage et dossiers verrouillés ---------- */
.nx-badge { font-size: 12px; color: var(--faint); flex: none; }
.nx-f.sel .nx-badge { color: var(--muted); }
.nx-lockban, .nx-shareban { display: flex; align-items: center; gap: 8px; margin: 2px 2px 8px; padding: 9px 11px; border-radius: 10px; font-size: 13px; background: rgba(var(--ov), 0.05); color: var(--muted); text-align: left; width: calc(100% - 4px); }
.nx-lockban span, .nx-shareban span { flex: 1; min-width: 0; }
.nx-lockban .btn { padding: 5px 12px; font-size: 13px; }
.nx-shareban:hover { background: rgba(var(--ov), 0.08); color: var(--text); }
.nl-list .nx-lockban, .nl-list .nx-shareban { margin: 8px 10px; width: calc(100% - 20px); }
.share-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; color: var(--muted); border: 1px dashed var(--line2); max-width: 220px; min-width: 0; flex: none; }
.share-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-chip .i { font-size: 13px; flex: none; }
.share-chip.on { border-style: solid; color: #1a73e8; border-color: rgba(26, 115, 232, .35); background: rgba(26, 115, 232, .08); }
.share-chip:hover { background: rgba(0, 0, 0, .05); }
.share-sheet .members { display: grid; gap: 4px; }
.share-sheet .btn.danger { margin-top: 4px; }

/* ---------- Notes sur téléphone : les dossiers, puis les notes du dossier (comme Notes d'Apple) ---------- */
.nm-page.fwd { animation: nmFwd .24s cubic-bezier(.2, .8, .2, 1); }
.nm-page.back { animation: nmBack .24s cubic-bezier(.2, .8, .2, 1); }
@keyframes nmFwd { from { transform: translateX(48px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes nmBack { from { transform: translateX(-48px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .nm-page.fwd, .nm-page.back { animation: none; } }
.nm-body { display: grid; gap: 8px; }
.nm-card { display: grid; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.nm-f { display: flex; align-items: center; gap: 12px; padding: 13px 14px; text-align: left; border-top: 1px solid var(--line); min-width: 0; font-size: 16px; -webkit-touch-callout: none; user-select: none; }
.nm-f:first-child, .nm-row:first-child { border-top: 0; }
.nm-f:active, .nm-row:active { background: rgba(var(--ov), .07); }
.nm-fic { width: 24px; display: grid; place-items: center; font-size: 20px; color: var(--accent); flex: none; }
.nm-fic .i { font-size: 19px; }
.nm-fic .femo { font-size: 20px; }
.nm-ft { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.nm-f.soft .nm-ft { color: var(--muted); }
.nm-f .nx-badge { font-size: 13px; }
.nm-c { color: var(--faint); font-size: 15px; font-variant-numeric: tabular-nums; }
.nm-chev { color: var(--faint); font-size: 14px; flex: none; }
.nm-add .nm-ft, .nm-add .nm-fic { color: var(--accent); font-weight: 500; }
.nm-sec { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 12px 6px 0; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.nm-tags { padding: 2px; }
.nm-top { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.nm-top .grow { flex: 1; }
.nm-back { display: inline-flex; align-items: center; gap: 2px; color: var(--accent); font-size: 16px; font-weight: 600; padding: 6px 6px 6px 0; }
.nm-chevl { transform: rotate(180deg); font-size: 19px; }
.nm-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.nm-title h2 { margin: 0; font-size: 26px; font-weight: 780; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm-title .nb-n { color: var(--faint); font-size: 15px; }
.nm-row { display: grid; gap: 3px; padding: 11px 14px; text-align: left; border-top: 1px solid var(--line); min-width: 0; -webkit-touch-callout: none; user-select: none; }
.nm-l1, .nm-l2 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.nm-t { flex: 1; min-width: 0; font-weight: 650; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm-t.dim { color: var(--muted); font-weight: 500; }
.nm-l2 { font-size: 14px; color: var(--muted); }
.nm-row .nl-pin, .nm-row .nl-lock { font-size: 13px; color: var(--faint); flex: none; }
.nm-page .nx-lockban, .nm-page .nx-shareban { margin: 0; width: 100%; }

/* ---------- Papier des notes : gris clair en mode sombre, haut de la note plus foncé ---------- */
.sheet.paper, .nx-paper { --paper: #d9d9d6; --paper-head: #c2c2be; --panel: var(--paper); --line: rgba(0, 0, 0, 0.1); --line2: rgba(0, 0, 0, 0.16); background: var(--paper); }
[data-theme="light"] .sheet.paper, [data-theme="light"] .nx-paper { --paper: #ffffff; --paper-head: #ebebe8; --line: rgba(0, 0, 0, 0.08); --line2: rgba(0, 0, 0, 0.12); }
.note-head { flex: none; background: var(--paper-head, color-mix(in srgb, var(--panel) 90%, var(--text))); border-bottom: 1px solid var(--line2); }
.sheet .note-head { border-radius: 18px 18px 0 0; }
.note-head .sheet-bar { padding-bottom: 2px; }
.note-head-in { display: grid; gap: 6px; padding: 4px 14px 8px; }
.note-head-in:empty { display: none; }
.nx-wrap .note-head .nx-bar { padding-bottom: 2px; }
.nx-wrap .note-head-in { padding: 4px 24px 10px; }
.note-head .nlink-row { margin: 0; }
.note-head .ed-tools { position: static; background: transparent; border: 0; border-radius: 0; padding: 0; margin: 0; }
.note-head .ed-tools .ed-palette { border-top-color: var(--line2); }
.note-head .nlink { background: rgba(255, 255, 255, 0.35); }
.note-head .nlink.dim, .note-head .nlink.add { background: transparent; }
.note-head .icon-btn:hover, .note-head .ed-tools button:hover, .note-head .ed-tools button:active { background: rgba(0, 0, 0, 0.07); }
.sheet.paper .sheet-scroll, .nx-paper .nx-scroll { padding-top: 14px; }
/* pastille des hashtags d'une note */
.nlink.tags .nlink-hash { font-weight: 800; color: var(--muted); }
.nlink-tg { color: color-mix(in srgb, var(--t) 72%, black); font-weight: 600; }
/* dossiers protégés, sous une ligne */
.nx-divider { height: 1px; background: var(--line2); margin: 6px 8px; }
.nm-divider { border-top: 2px solid var(--line2); }

/* ---------- Loupe en haut : rechercher partout ---------- */
.mode-tabs .mt-search { padding: 8px 12px; color: var(--muted); }
.mode-tabs .mt-search .i { font-size: 16px; }
.mode-tabs .mt-search:hover { color: var(--text); }
@media (max-width: 899px) { .mode-tabs .mt-search .i { font-size: 18px; } }
.sheet.gs { height: min(86vh, 720px); }
@media (min-width: 760px) { .sheet.gs { width: min(640px, 94vw); } }
.gs-top { display: flex; align-items: center; gap: 8px; padding: 2px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.gs-ic { color: var(--muted); font-size: 18px; flex: none; }
.gs-inp { flex: 1; min-width: 0; font-size: 17px; border: 0; background: transparent; padding: 8px 2px; box-shadow: none; }
.gs-inp:focus { outline: none; box-shadow: none; }
.gs-scroll { padding: 4px 8px 18px; }
.gs-hint { padding: 22px 12px; text-align: center; }
.gs-head { display: flex; align-items: center; gap: 7px; padding: 14px 10px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.gs-head .i { font-size: 12px; }
.gs-row { display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px 10px; border-radius: 10px; text-align: left; min-width: 0; }
.gs-row.cur { background: rgba(var(--ov), .07); }
.gs-lead { width: 22px; display: grid; place-items: center; flex: none; color: var(--muted); font-size: 15px; }
.gs-emo { font-size: 14px; }
.gs-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.gs-txt { display: grid; min-width: 0; flex: 1; }
.gs-t { font-size: 15px; font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-sub { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-row.done .gs-t { text-decoration: line-through; color: var(--muted); }
.gs-row.done .gs-lead { color: var(--ok); }
.gs-more { padding: 4px 10px 2px 43px; font-size: 12.5px; color: var(--faint); }
/* Pastille de connexion : dans les réglages ; en haut seulement si hors ligne ou en erreur */
.top-sync[data-state="ok"], .top-sync[data-state="pending"], .top-sync[data-state="syncing"] { display: none; }
.set-sync { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); padding: 2px 0; }
.set-sync .sync-dot { width: 10px; height: 10px; flex: none; }
.set-sync .sync-lbl { flex: 1; min-width: 0; color: var(--muted); }
.gs-inp::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.ib-place.list .ic { letter-spacing: 0; }

/* ---------- Notes : loupe à côté du cadenas, sans la date en haut ---------- */
.nb-find.on { color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); }
.nl-tools .nl-sort, .nx-tools .nl-sort { margin-left: auto; }
body.mode-notes .date-row .date-block { display: none; }
body.mode-notes .date-row { row-gap: 0; }
/* ---------- Téléphone : l'en-tête du calendrier ne dépasse plus de l'écran ---------- */
@media (max-width: 899px) {
  body.mode-cal .date-row { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; row-gap: 12px; }
  body.mode-cal .date-row .mode-tabs { order: 1; }
  body.mode-cal .date-row .top-actions { order: 2; margin-left: auto; }
  body.mode-cal .date-row::after { content: ''; order: 3; flex-basis: 100%; height: 0; }
  body.mode-cal .date-row .date-block { order: 4; flex: 1 1 0; min-width: 0; }
  body.mode-cal .date-row .top-views { order: 5; flex: none; }
}
@media (max-width: 380px) { .mode-tabs button { padding: 8px 11px; } }

/* ---------- Haut d'une note : trois lignes plus nettes ---------- */
.menu-item .mi { display: inline-grid; place-items: center; }
.ed-sep { width: 1px; align-self: stretch; margin: 6px 4px; background: var(--line2); flex: none; }
.note-head { padding-bottom: 10px; }
.note-head .sheet-bar { padding: 10px 12px 0 16px; gap: 6px; }
.nx-wrap .note-head .nx-bar { padding: 14px 18px 0 22px; gap: 6px; }
.note-head .grow { flex: 1; }
.note-head-in { gap: 8px; padding: 8px 16px 0; }
.nx-wrap .note-head-in { padding: 8px 18px 0 22px; }
.note-head .crumb { flex: none; font-size: 12px; color: #7b7a76; margin-right: 2px; }
/* toutes les puces : même hauteur, même forme */
.note-head .folder-chip, .note-head .share-chip, .note-head .nlink {
  height: 30px; padding: 0 11px; border-radius: 8px; gap: 6px;
  border: 1px solid rgba(0, 0, 0, 0.08); background: rgba(255, 255, 255, 0.55); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
  color: #34332f; font-size: 13px; font-weight: 560; border-style: solid;
}
.note-head .folder-chip:hover, .note-head .share-chip:hover, .note-head .nlink:hover { background: rgba(255, 255, 255, 0.85); }
.note-head .folder-chip .i, .note-head .share-chip .i, .note-head .nlink .i { font-size: 14px; color: #6b6a66; }
.note-head .nlink.dim, .note-head .nlink.add, .note-head .share-chip:not(.on) { color: #6b6a66; background: rgba(255, 255, 255, 0.3); box-shadow: none; }
.note-head .share-chip.on { color: #1a5fb4; background: rgba(26, 115, 232, 0.12); border-color: rgba(26, 115, 232, 0.28); }
.note-head .share-chip.on .i { color: #1a5fb4; }
.note-head .lock-chip.on { color: #6b3fd1; background: rgba(124, 77, 255, 0.12); border-color: rgba(124, 77, 255, 0.3); }
.note-head .lock-chip.on .i { color: #6b3fd1; }
.note-head .nlink.proj:not(.dim) { background: color-mix(in srgb, var(--c) 16%, rgba(255, 255, 255, 0.6)); border-color: color-mix(in srgb, var(--c) 45%, transparent); color: #262522; }
.note-head .nlink .dot { width: 9px; height: 9px; box-shadow: none; }
.note-head .nlink-hash { color: #8a8984; }
.note-head .nlink-tg { color: color-mix(in srgb, var(--t) 70%, black); }
.note-head .nlink.task .nlink-ic { font-size: 13px; }
.note-head .nlink-row { gap: 6px; }
/* outils : une seule barre arrondie, en groupes */
.note-head .ed-tools { background: rgba(255, 255, 255, 0.32); border: 1px solid rgba(0, 0, 0, 0.07); border-radius: 10px; padding: 3px; gap: 2px; margin-top: 2px; }
.note-head .ed-tools button { height: 30px; padding: 0 9px; color: #4a4945; font-size: 14px; }
.note-head .ed-tools button.main { color: #262522; }
.note-head .ed-tools button .i { color: inherit; }
.note-head .ed-sep { background: rgba(0, 0, 0, 0.12); margin: 6px 3px; }
.note-head .ed-tools .ed-palette { border-top: 1px solid rgba(0, 0, 0, 0.08); margin-top: 2px; padding: 5px 4px 3px; }
@media (max-width: 600px) {
  .note-head .sheet-bar .share-chip, .note-head .sheet-bar .lock-chip { padding: 0 9px; }
  .note-head .folder-chip { max-width: 150px; }
}
/* recherche des notes dans la colonne des dossiers */
.nx-find { padding: 0 4px 2px 6px; }
.nx-find .nb-search { width: 100%; padding: 8px 10px; font-size: 14px; }

/* ---------- Notes en couleur terre / ocre ---------- */
body.mode-notes { --accent: #B8763A; }
.note-head .lock-chip.on { color: #8a5522; background: rgba(184, 118, 58, 0.16); border-color: rgba(184, 118, 58, 0.4); }
.note-head .lock-chip.on .i { color: #8a5522; }
.ctx-kbd { margin-left: auto; padding-left: 22px; color: var(--faint); font-size: 12px; letter-spacing: .02em; }

/* ---------- Haut d'une note : une ligne (dossier, projet, hashtags, actions), partage et cadenas à droite ---------- */
.note-head .nb-line { display: flex; align-items: flex-start; gap: 10px; }
.note-head .nb-left { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.note-head .nb-left .nlink-row { display: contents; }
.note-head .nb-right { flex: none; display: flex; align-items: center; gap: 4px; min-height: 30px; }
.note-head .nb-right .share-chip { width: 32px; padding: 0; justify-content: center; gap: 0; }
.note-head .nb-right .share-chip .i { font-size: 15px; }
.note-head .nb-right .crumb { margin-right: 6px; }
.note-head .nb-right .icon-btn { width: 32px; height: 30px; border-radius: 8px; }
.note-head .sheet-bar.nb-line { padding: 10px 8px 0 14px; }
.note-head .sheet-bar.nb-line .nb-right { gap: 2px; }
/* la ligne des outils, sans cadre */
.note-head .ed-tools { background: none; border: 0; border-radius: 0; padding: 0; margin: 0 0 0 -8px; }
.note-head-in { padding-top: 6px; }
.nl-sortbtn { flex: none; }
.nx-lhead .nl-sortbtn { width: 34px; height: 34px; }

/* ---------- Calendrier : flèches de part et d'autre ---------- */
.cal-frame { display: grid; grid-template-columns: 30px minmax(0, 1fr) 30px; gap: 6px; align-items: stretch; }
.cal-side { display: grid; place-items: center; border-radius: 10px; color: var(--faint); font-size: 22px; transition: background .15s, color .15s; }
.cal-side:hover { background: rgba(var(--ov), 0.06); color: var(--text); }
.cal-side:active { background: rgba(var(--ov), 0.1); }
body.mode-cal { overscroll-behavior-x: none; }
html:has(> body.mode-cal) { overscroll-behavior-x: none; }
@media (max-width: 699px) {
  .cal-frame { display: block; }
  .cal-side { display: none; }
}

/* ---------- Notes : hashtags en simple texte orange, sélection orange comme le bouton + ---------- */
body.mode-notes .nx-tags, body.mode-notes .nm-tags { gap: 2px 4px; }
body.mode-notes .nx-tags .ntag, body.mode-notes .nm-tags .ntag {
  background: none; border: 0; border-radius: 6px; padding: 3px 6px; box-shadow: none;
  color: var(--accent); font-weight: 650; font-size: 13.5px; }
body.mode-notes .nm-tags .ntag { font-size: 15px; padding: 4px 6px; }
body.mode-notes .nx-tags .ntag:hover, body.mode-notes .nm-tags .ntag:hover { text-decoration: underline; text-underline-offset: 3px; }
body.mode-notes .nx-tags .ntag.on { background: var(--accent); color: #fff; text-decoration: none; }
body.mode-notes .nx-tags .ntag.add, body.mode-notes .nm-tags .ntag.add { color: var(--muted); font-weight: 500; }
body.mode-notes .nx-hash { color: var(--accent); }
/* dans le haut d'une note : le hashtag est du texte, pas une puce */
.note-head .nlink.tags { background: none; border-color: transparent; box-shadow: none; padding: 0 6px; color: #a9570f; }
.note-head .nlink.tags:hover { background: rgba(255, 255, 255, 0.35); }
.note-head .nlink.tags .nlink-hash, .note-head .nlink.tags .nlink-tg { color: #a9570f; font-weight: 650; }
.note-head .nlink.tags.dim, .note-head .nlink.tags.dim .nlink-hash { color: #8a6a4e; font-weight: 560; }
/* sélection : le même orange que le bouton + */
body.mode-notes .nx-row.sel { background: var(--accent); color: #fff; }
body.mode-notes .nx-row.sel .i, body.mode-notes .nx-row.sel .fic, body.mode-notes .nx-row.sel .nx-t,
body.mode-notes .nx-row.sel .nx-d, body.mode-notes .nx-row.sel .nx-s, body.mode-notes .nx-row.sel .nl-pin,
body.mode-notes .nx-row.sel .nx-badge, body.mode-notes .nx-row.sel .nx-more { color: #fff; }
body.mode-notes .nx-row.sel .nx-s, body.mode-notes .nx-row.sel .nx-d { opacity: .85; }
body.mode-notes .mode-tabs button.on { background: var(--accent); color: #fff; box-shadow: none; }

/* ---------- Colonnes des notes : la 1re prend le gris de la 2e, la 2e s'éclaircit ---------- */
body.mode-notes .nx-folders { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 8px 6px 6px; }
body.mode-notes .nx-list { background: #3b3b3a; }
[data-theme="light"] body.mode-notes .nx-list { background: #f9f8f6; }

/* ---------- Haut d'une note : une seule ligne (outils à gauche ; date, partage, cadenas, « … » à droite) ---------- */
.note-head .nb-left > .ed-tools { flex: 1 1 auto; min-width: 0; position: static; padding: 0; }
.note-head .nb-line { align-items: flex-start; }
.note-head .nb-line .nb-right { min-height: 32px; }
.note-head.one { padding-bottom: 8px; }
.nx-wrap .note-head.one .nx-bar { padding: 10px 14px 0 22px; }
@media (max-width: 600px) {
  .note-head .ed-tools button .lbl { display: none; }
  .note-head .ed-tools button { min-width: 32px; padding: 0 7px; }
  .note-head .ed-sep { margin: 6px 1px; }
  .note-head .sheet-bar.nb-line { padding: 6px 6px 8px 12px; gap: 4px; }
  .note-head .sheet-bar.nb-line .nb-right .icon-btn { width: 32px; }
}
/* partage et cadenas : de simples symboles, colorés seulement quand ils sont actifs */
.note-head .nb-right .share-chip:not(.on) { background: transparent; border-color: transparent; box-shadow: none; color: #5f5e5a; }
.note-head .nb-right .share-chip:not(.on):hover { background: rgba(0, 0, 0, 0.06); }
@media (max-width: 385px) {
  .note-head .ed-tools button { min-width: 29px; padding: 0 5px; }
  .note-head .ed-sep { margin: 6px 0; }
  .note-head .sheet-bar.nb-line { padding: 6px 4px 8px 8px; gap: 2px; }
  .note-head .sheet-bar.nb-line .nb-right { gap: 0; }
  .note-head .sheet-bar.nb-line .nb-right .icon-btn, .note-head .nb-right .share-chip { width: 29px; }
}

/* ---------- Calendrier : « Aujourd'hui » avant Semaine / Mois, barre alignée sur les bords du calendrier ---------- */
.cal-vw { grid-area: views; justify-self: end; display: flex; align-items: center; gap: 8px; }
.cal-vw .cal-views { grid-area: auto; }
.today-btn.wide { display: none; }
@media (min-width: 900px) {
  .today-btn.wide { display: inline-block; }
  .today-btn.narrow { display: none; }
}
@media (max-width: 899px) { .cal-bar .cal-vw { display: none; } }
@media (min-width: 700px) { .cal-bar { padding: 0 36px; } }

/* ---------- Reçu : actions repliées, ouvertes en entier au clic ---------- */
.ib { gap: 8px; }
.ib-card { padding: 0; gap: 0; overflow: hidden; }
.ib-head { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; cursor: pointer; text-align: left; }
.ib-head:hover { background: rgba(var(--ov), 0.03); }
.ib-main { flex: 1; min-width: 0; display: grid; gap: 5px; }
.ib-card .ib-title { font-size: 15.5px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.ib-card:not(.open) .ib-title { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ib-chev { flex: none; color: var(--faint); font-size: 15px; margin-top: 3px; transform: rotate(90deg); transition: transform .2s; }
.ib-card.open .ib-chev { transform: rotate(-90deg); }
.ib-check { flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; border: 2px solid var(--line2); display: grid; place-items: center; color: transparent; font-size: 13px; transition: background .15s, border-color .15s, color .15s; }
.ib-check:hover { border-color: var(--ok); color: color-mix(in srgb, var(--ok) 60%, transparent); }
.ib-check.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.ib-card.done { opacity: .55; transition: opacity .3s; }
.ib-card.done .ib-title { text-decoration: line-through; }
.ib-body { padding: 0 14px 14px 48px; display: grid; gap: 12px; }
.ib-full.editor { min-height: 0; padding: 0; font-size: 14.5px; line-height: 1.55; color: var(--text); }
.ib-empty { font-size: 13.5px; color: var(--faint); }
.ib-sels { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ib-sel { --c: #8C8C8C; display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px 8px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  background: var(--card); border: 1px solid var(--line2); color: var(--text); }
.ib-sel:hover { background: var(--card-h); }
.ib-sel .i { font-size: 14px; color: var(--muted); }
.ib-sel .ib-dd { font-size: 11px; transform: rotate(90deg); margin-left: 2px; color: var(--faint); }
.ib-sel.set { background: color-mix(in srgb, var(--c) 18%, var(--card)); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.ib-sel .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
@media (max-width: 600px) {
  .ib-body { padding-left: 14px; }
  .ib-sel { padding: 8px 9px 8px 10px; }
}
.ib-open { flex: none; width: 30px; height: 30px; margin: -4px -6px 0 0; }
/* menus : deux symboles côte à côte (ex. 💼🔥), sans retour à la ligne */
.menu-item .mi { min-width: 24px; width: auto; white-space: nowrap; letter-spacing: -2px; }

/* ---------- Téléphone : la ligne Actions / projets ne bouge plus en hauteur ----------
   Le trait sous l'onglet choisi dépassait d'un pixel : la ligne pouvait défiler verticalement sous le doigt. */
@media (max-width: 899px) {
  .toolbar .seg.tabs { overflow-y: hidden; touch-action: pan-x; overscroll-behavior: contain; border-bottom: 0; box-shadow: inset 0 -1px 0 var(--line); }
  .toolbar .seg.tabs button.on::after { bottom: 0; }
}

/* ---------- Fiche d'une action : rappel et envoi en simples icônes (colorées si réglés, grises sinon) ---------- */
.meta .meta-icons { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.meta-ic { --c: #888; width: 34px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; color: var(--faint); transition: background .15s, color .15s; }
.meta-ic:hover { background: rgba(var(--ov), 0.06); color: var(--muted); }
.meta-ic.on { color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.meta-ic.on:hover { background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--c); }
/* pictos rappel et partage plus grands */
.meta .meta-icons { gap: 6px; }
.meta-ic { width: 42px; height: 38px; border-radius: 11px; font-size: 22px; }
/* le symbole de partage, un peu plus gros que la cloche */
.meta .meta-icons .meta-ic:last-child { font-size: 26px; }

/* ---------- Rappels récurrents : cadre sans fond, entouré de pointillés colorés ---------- */
.side-card.habits, [data-theme="light"] .side-card.habits { background: transparent; box-shadow: none; border: 2px dotted #9B6CF0; }
[data-theme="light"] .side-card.habits { border-color: #8a5ce6; }
/* téléphone : la case à cocher sans le mot « Checklist » dans les notes et les actions (sur ordinateur, le mot reste) */
@media (max-width: 600px) {
  .sheet .ed-tools button.main .lbl, .note-head .ed-tools button.main .lbl { display: none; }
  .sheet .ed-tools button.main { min-width: 34px; }
}

/* ---------- Fiche d'une action : « Fait » devient un cercle à cocher, comme sur les cartes du kanban ---------- */
.sheet-foot.chk-foot { display: flex; justify-content: center; padding: 10px 16px 14px; }
.foot-chk { --c: #3FB27F; position: relative; width: 40px; height: 40px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--c) 70%, #888);
  display: grid; place-items: center; color: transparent; font-size: 20px; transition: background .18s, color .18s, border-color .18s, transform .12s; }
.foot-chk::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; }
.foot-chk svg { stroke-width: 2.8; }
.foot-chk:hover { background: color-mix(in srgb, var(--c) 22%, transparent); color: color-mix(in srgb, var(--c) 80%, white); }
.foot-chk:active { transform: scale(0.92); }
.foot-chk.on { background: var(--c); border-color: var(--c); color: #fff; }

/* ---------- Pièces jointes dans les notes et les actions ---------- */
.editor .att { margin: 10px 0; border-radius: 12px; overflow: hidden; border: 1px solid rgba(var(--ov), 0.12); background: rgba(var(--ov), 0.04); max-width: 640px; user-select: none; -webkit-user-select: none; }
.editor .att img { display: block; max-width: 100%; max-height: 520px; object-fit: contain; margin: 0 auto; background: rgba(0, 0, 0, 0.04); }
.editor .att .att-img { display: block; }
.editor .att video { display: block; width: 100%; max-height: 520px; background: #000; }
.editor .att iframe.att-pdf { display: block; width: 100%; height: 560px; border: 0; background: #fff; }
.editor .att-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; font-size: 13.5px; min-height: 40px; }
.editor .att-bar > .i { flex: none; font-size: 17px; opacity: .7; }
.editor .att-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: inherit; text-decoration: none; font-weight: 600; }
.editor .att-name:hover { text-decoration: underline; }
.editor .att-info { flex: none; opacity: .6; font-variant-numeric: tabular-nums; font-size: 12.5px; }
.editor .att-x { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; opacity: .55; font-size: 14px; }
.editor .att-x:hover { opacity: 1; background: rgba(var(--ov), 0.08); }
.editor .att.k-file, .editor .att.k-audio { max-width: 460px; }
.editor .att .att-voice { display: grid; gap: 2px; padding-bottom: 8px; }
.editor .att audio { display: block; width: calc(100% - 20px); margin: 0 10px; height: 40px; }
.editor .att.up { opacity: .75; }
.editor .att.up .att-bar > .i { animation: att-pulse 1s ease-in-out infinite; }
@keyframes att-pulse { 50% { opacity: .2; } }
.editor.drop-on { outline: 2px dashed var(--accent); outline-offset: 4px; border-radius: 8px; }
/* sur le papier des notes (clair) */
.note-paper .editor .att, .sheet.paper .editor .att, .nx-doc .editor .att { border-color: rgba(0, 0, 0, 0.14); background: rgba(255, 255, 255, 0.45); }
@media (max-width: 600px) { .editor .att iframe.att-pdf { height: 440px; } }

/* ---------- Enregistrement d'un vocal ---------- */
.rec-sheet .rec { display: grid; justify-items: center; gap: 10px; padding: 26px 16px 18px; }
.rec-dot { width: 18px; height: 18px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.6); animation: rec-pulse 1.4s ease-out infinite; }
@keyframes rec-pulse { 0% { box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.55); } 100% { box-shadow: 0 0 0 18px rgba(229, 72, 77, 0); } }
.rec-clock { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.rec-sheet .rec-btns { padding: 0 16px 16px; gap: 10px; }
.editor .att a.att-name { color: inherit; }
/* téléphone : la barre d'outils d'une note reste sur une ligne et glisse de côté */
@media (max-width: 600px) {
  .note-head .nb-left > .ed-tools { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x; }
  .note-head .nb-left > .ed-tools::-webkit-scrollbar { display: none; }
  .note-head .nb-left > .ed-tools:has(.ed-palette.on) { flex-wrap: wrap; overflow: visible; }
  .note-head .nb-left > .ed-tools button { flex: none; }
}
/* Fichier et Vocal : l'icône seule (le nom s'affiche au survol) */
.ed-tools .tb-clip .lbl, .ed-tools .tb-mic .lbl { display: none; }
.ed-tools .tb-clip, .ed-tools .tb-mic { min-width: 34px; justify-content: center; }
/* ---------- Haut d'une note : partage et cadenas passés dans « … », outils un peu plus gros ---------- */
.note-head .ed-tools button { height: 34px; font-size: 18px; }
.note-head .ed-tools button .lbl { font-size: 13.5px; }
.note-head .ed-tools .tb-clip, .note-head .ed-tools .tb-mic { min-width: 36px; }
.note-head .nb-line .nb-right { min-height: 34px; }
.note-head .nb-right .icon-btn { width: 36px; height: 34px; font-size: 19px; }
@media (max-width: 600px) {
  .note-head .ed-tools button { min-width: 35px; height: 36px; padding: 0 6px; font-size: 19px; }
  .note-head .nb-line .nb-right { min-height: 36px; }
  .note-head .sheet-bar.nb-line .nb-right .icon-btn { width: 36px; height: 36px; font-size: 20px; }
}
@media (max-width: 385px) {
  .note-head .ed-tools button { min-width: 34px; padding: 0 6px; }
  .note-head .sheet-bar.nb-line .nb-right .icon-btn { width: 33px; }
}
/* ---------- Notes : titre et texte un peu plus gros ---------- */
.sheet.paper .sheet-title, .nx-doc .sheet-title { font-size: 27px; }
.sheet.paper .editor, .nx-doc .editor { font-size: 17.5px; }
/* ---------- Pièces jointes : bouton pour exporter (partager ou télécharger) ---------- */
.editor .att-dl { flex: none; width: 30px; height: 28px; border-radius: 8px; display: grid; place-items: center; opacity: .65; font-size: 16px; }
.editor .att-dl:hover { opacity: 1; background: rgba(var(--ov), 0.08); }
.editor .att-dl.busy { animation: att-pulse 1s ease-in-out infinite; }
/* ---------- Une couleur par menu : To-Do violet, Calendrier bleu, Finances vert, Notes orange, Reçu rouge ---------- */
body.mode-cal { --accent: #4C8DF6; }
body.mode-fin { --accent: #3FB27F; }
body.mode-notes { --accent: #B8763A; }
body.mode-inbox { --accent: #E5534B; }
.mode-tabs button.on, [data-theme="light"] .mode-tabs button.on { background: var(--accent); color: #fff; box-shadow: none; }
.push-banner { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 26%, transparent), rgba(76, 141, 246, 0.16)); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.side-card.habits, [data-theme="light"] .side-card.habits { border-color: var(--accent); }
/* ---------- Vocal : bouton « Transcrire » ---------- */
.editor .att-stt { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border-radius: 8px; font-size: 12.5px; font-weight: 600; opacity: .8; border: 1px solid rgba(var(--ov), 0.14); }
.editor .att-stt .i { font-size: 14px; }
.editor .att-stt:hover { opacity: 1; background: rgba(var(--ov), 0.08); }
.editor .att-stt.busy { animation: att-pulse 1.2s ease-in-out infinite; pointer-events: none; }
.note-paper .editor .att-stt, .sheet.paper .editor .att-stt, .nx-doc .editor .att-stt { border-color: rgba(0, 0, 0, 0.16); }
/* ---------- Vocal : le texte transcrit s'ouvre dans le cadre, sous le lecteur ---------- */
.editor .att-stt .chev { display: inline-grid; font-size: 11px; transform: rotate(90deg); transition: transform .15s; opacity: .7; }
.editor .att-stt.open .chev { transform: rotate(-90deg); }
.editor .att-stt.open { opacity: 1; background: rgba(var(--ov), 0.08); }
.editor .att-tr { display: none; margin: 8px 10px 0; padding: 10px 12px; border-radius: 10px; background: rgba(var(--ov), 0.05); border: 1px solid rgba(var(--ov), 0.1); }
.editor .att-tr.on { display: block; }
.editor .att-tr-text { font-size: 15px; line-height: 1.55; white-space: pre-wrap; user-select: text; -webkit-user-select: text; cursor: text; }
.editor .att-tr-msg { font-size: 14px; opacity: .7; }
.editor .att-tr-msg.busy { animation: att-pulse 1.2s ease-in-out infinite; }
.editor .att-tr-copy { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; height: 28px; padding: 0 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600; opacity: .75; border: 1px solid rgba(var(--ov), 0.14); }
.editor .att-tr-copy:hover { opacity: 1; background: rgba(var(--ov), 0.08); }
.note-paper .editor .att-tr, .sheet.paper .editor .att-tr, .nx-doc .editor .att-tr { background: rgba(255, 255, 255, 0.55); border-color: rgba(0, 0, 0, 0.1); }
.note-paper .editor .att-tr-copy, .sheet.paper .editor .att-tr-copy, .nx-doc .editor .att-tr-copy { border-color: rgba(0, 0, 0, 0.16); }
/* ---------- Menu à gauche (comme l'appli Claude), téléphone et ordinateur ---------- */
.date-row .tabs-line { grid-area: tabs; justify-self: start; display: flex; align-items: center; gap: 8px; min-width: 0; }
.drawer-btn { display: inline-grid; flex: none; width: 42px; height: 40px; font-size: 22px; border-radius: 12px; }
.drawer-btn.on { color: #fff; background: var(--accent); }
.mode-tabs .mt-notes, .top-actions .top-find, .top-actions .top-gear { display: none; }
.dr-wrap { position: fixed; inset: 0; z-index: 900; }
.dr-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.45); opacity: 0; transition: opacity .25s ease; }
.dr-wrap.on .dr-scrim { opacity: 1; }
.drawer { position: absolute; top: 0; bottom: 0; left: 0; width: min(84vw, 340px); background: var(--bg2); border-right: 1px solid var(--line); box-shadow: 8px 0 30px rgba(0, 0, 0, 0.35);
  display: flex; flex-direction: column; padding: calc(var(--safe-t) + 12px) 12px calc(var(--safe-b) + 12px); transform: translateX(-102%); transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.dr-wrap.on .drawer { transform: none; }
body.dr-open { overflow: hidden; }
.dr-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 12px 8px; }
.dr-app { font-size: 22px; font-weight: 780; letter-spacing: -0.01em; }
.dr-close { width: 38px; height: 38px; font-size: 18px; }
.dr-search { display: flex; align-items: center; gap: 10px; width: 100%; height: 44px; padding: 0 14px; border-radius: 12px; background: rgba(var(--ov), 0.07); color: var(--muted); font-size: 16px; text-align: left; }
.dr-search .i { font-size: 17px; }
.dr-nav { display: grid; gap: 2px; margin: 12px 0 6px; }
.dr-item { display: flex; align-items: center; gap: 12px; width: 100%; height: 46px; padding: 0 12px; border-radius: 12px; font-size: 16.5px; font-weight: 600; text-align: left; }
.dr-item .i { font-size: 19px; color: var(--muted); }
.dr-item.dr-notes .i { color: #B8763A; }
.dr-item:active, .dr-note:active, .dr-me:active, .dr-search:active { background: rgba(var(--ov), 0.1); }
.dr-item.on { background: color-mix(in srgb, #B8763A 22%, transparent); }
.dr-sec { padding: 14px 12px 6px; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.dr-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; align-content: start; gap: 1px; }
.dr-note { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 42px; padding: 0 12px; border-radius: 10px; font-size: 15.5px; text-align: left; color: var(--text); }
.dr-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-lock { font-size: 13px; color: var(--faint); flex: none; }
.dr-foot { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 8px; }
.dr-me { display: flex; align-items: center; gap: 12px; width: 100%; height: 52px; padding: 0 10px; border-radius: 12px; text-align: left; }
.dr-me .av { width: 34px; height: 34px; font-size: 15px; flex: none; }
.dr-name { flex: 1; min-width: 0; font-size: 16px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-gear { font-size: 20px; color: var(--muted); display: inline-grid; }
[data-theme="light"] .drawer { background: #f6f5f2; box-shadow: 8px 0 30px rgba(0, 0, 0, 0.12); }
/* menu des notes dans le menu de gauche */
.drawer { --accent: #B8763A; }
.dr-head { padding: 0 4px 12px 4px; }
.dr-logo { width: 44px; height: 44px; border-radius: 11px; display: block; }
.dr-list { padding-bottom: 8px; }
.dr-nhead { display: flex; align-items: center; justify-content: space-between; padding: 16px 6px 4px 8px; font-size: 20px; font-weight: 760; }
.dr-new { width: 36px; height: 36px; font-size: 19px; color: var(--accent); }
.drawer .nm-card { background: rgba(var(--ov), 0.05); }
.drawer .nm-f.on { background: color-mix(in srgb, var(--accent) 22%, transparent); }

.drawer .nm-sec { padding-left: 6px; padding-right: 2px; }
@media (min-width: 900px) { .drawer { width: 320px; } .drawer .nm-f { padding-top: 10px; padding-bottom: 10px; font-size: 15px; } }
.drawer .nm-tags { gap: 2px 4px; padding: 4px 2px 2px; }
.drawer .nm-tags .ntag { background: none; border: 0; border-radius: 6px; padding: 4px 6px; box-shadow: none; color: var(--accent); font-weight: 650; font-size: 15px; }
.drawer .nm-tags .ntag.add { color: var(--muted); font-weight: 500; }
.drawer .nm-tags .ntag.on { background: var(--accent); color: #fff; text-decoration: none; }
/* ---------- Ordinateur : menu de gauche toujours ouvert (comme Claude) ---------- */
.side { position: fixed; top: 0; bottom: 0; left: 0; width: var(--side-w, 264px); z-index: 40; display: flex; flex-direction: column; background: var(--bg2); border-right: 1px solid var(--line);
  padding: 14px 10px 12px; --accent: #B8763A; }
body.side-on #app { padding-left: var(--side-w, 264px); }
body.side-on .drawer-btn { display: none; }
.side .dr-head { padding: 0 2px 12px 4px; }
.side .dr-logo { width: 38px; height: 38px; border-radius: 10px; }
.side .dr-close { width: 34px; height: 34px; font-size: 19px; color: var(--muted); }
.side .dr-search { height: 38px; font-size: 14.5px; border-radius: 10px; }
.side .dr-kbd { margin-left: auto; font-size: 11.5px; opacity: .7; border: 1px solid var(--line2); border-radius: 6px; padding: 1px 6px; }
.side .dr-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; align-content: start; gap: 1px; padding-bottom: 8px; }
.side .dr-nhead { padding: 14px 4px 4px 6px; font-size: 17px; }
.side .dr-new { width: 32px; height: 32px; font-size: 17px; color: var(--accent); }
.side .nm-card { background: rgba(var(--ov), 0.05); border-radius: 12px; }
.side .nm-f { padding: 9px 12px; font-size: 14.5px; gap: 10px; }
.side .nm-fic { width: 20px; font-size: 16px; }
.side .nm-fic .i { font-size: 16px; }
.side .nm-f:hover { background: rgba(var(--ov), 0.06); }
.side .nm-f.on { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.side .nm-sec { padding: 12px 4px 2px 6px; font-size: 11px; }
.side .nm-tags { gap: 2px 4px; padding: 4px 0 2px; }
.side .nm-tags .ntag { background: none; border: 0; border-radius: 6px; padding: 3px 6px; box-shadow: none; color: var(--accent); font-weight: 650; font-size: 14px; }
.side .nm-tags .ntag.add { color: var(--muted); font-weight: 500; }
.side .nm-tags .ntag.on { background: var(--accent); color: #fff; }
.side .nm-f.drop, .side .ntag.drop { outline: 2px dashed var(--accent); outline-offset: -2px; background: color-mix(in srgb, var(--accent) 14%, transparent); }
.side .dr-foot { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 6px; }
.side .dr-me { height: 46px; }
.side .dr-me .av { width: 30px; height: 30px; font-size: 13px; }
.side .dr-name { font-size: 14.5px; }
.side .dr-gear { font-size: 18px; }
[data-theme="light"] .side { background: #f6f5f2; }
/* Notes sur ordinateur : la barre latérale remplace la première colonne */
body.side-on .nx { grid-template-columns: var(--nx-w, 300px) 10px minmax(0, 1fr); }
body.side-on .nx > .nx-folders, body.side-on .nx > .nx-folders + .nx-grip { display: none; }
/* avec la barre latérale, la date se centre dans la place qui reste (sans chevaucher les onglets) */
body.side-on .date-row { grid-template-columns: max-content minmax(0, 1fr) max-content; }
body.side-on .date-row .date-block { min-width: 0; }
/* ---------- Listes déroulantes (comme Notion) ---------- */
.editor .tgl { margin: 4px 0; border-radius: 8px; padding: 2px 8px 2px 2px; }
.editor .tgl-h { position: relative; padding-left: 26px; font-weight: 650; min-height: 1.6em; }
.editor .tgl-h::before { content: ""; position: absolute; left: 8px; top: calc(.8em - 6px); width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent;
  border-left: 8px solid currentColor; opacity: .55; transition: transform .15s ease; transform-origin: 3px 6px; cursor: pointer; }
.editor .tgl[data-open="1"] > .tgl-h::before { transform: rotate(90deg); }
.editor .tgl-b { padding-left: 26px; }
.editor .tgl[data-open="0"] > .tgl-b { display: none; }
.editor .tgl-b:empty::before { content: ""; display: block; min-height: 1.4em; }
.editor.ib-full .tgl-h { cursor: pointer; }
.editor [data-c="gray"] { background: rgba(155, 154, 151, 0.22); }
.editor [data-c="brown"] { background: rgba(162, 119, 99, 0.24); }
.editor [data-c="orange"] { background: rgba(232, 131, 58, 0.24); }
.editor [data-c="yellow"] { background: rgba(227, 179, 65, 0.28); }
.editor [data-c="green"] { background: rgba(63, 178, 127, 0.24); }
.editor [data-c="blue"] { background: rgba(76, 141, 246, 0.22); }
.editor [data-c="purple"] { background: rgba(155, 108, 240, 0.22); }
.editor [data-c="pink"] { background: rgba(224, 91, 168, 0.22); }
.editor [data-c="red"] { background: rgba(229, 83, 75, 0.22); }
/* ---------- Tableaux ---------- */
.editor table.tbl { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 10px 0; }
.editor table.tbl td, .editor table.tbl th { border: 1px solid rgba(var(--ov), 0.2); padding: 6px 10px; min-width: 80px; vertical-align: top; text-align: left; font-weight: 400; }
.editor table.tbl tr:first-child > td, .editor table.tbl tr:first-child > th { font-weight: 650; }
.editor table.tbl tr:first-child > td:not([data-c]), .editor table.tbl tr:first-child > th:not([data-c]) { background: rgba(var(--ov), 0.06); }
.editor table.tbl td.tot { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; color: inherit; background: rgba(var(--ov), 0.09); cursor: default; }
.editor table.tbl tr.tot > td { border-top-width: 2px; }
.note-paper .editor table.tbl td, .note-paper .editor table.tbl th, .sheet.paper .editor table.tbl td, .sheet.paper .editor table.tbl th, .nx-doc .editor table.tbl td, .nx-doc .editor table.tbl th, .pad-wrap .editor table.tbl td { border-color: rgba(0, 0, 0, 0.18); }
.note-paper .editor table.tbl tr:first-child > td:not([data-c]), .sheet.paper .editor table.tbl tr:first-child > td:not([data-c]), .nx-doc .editor table.tbl tr:first-child > td:not([data-c]), .pad-wrap .editor table.tbl tr:first-child > td:not([data-c]) { background: rgba(0, 0, 0, 0.05); }
.note-paper .editor table.tbl td.tot, .sheet.paper .editor table.tbl td.tot, .nx-doc .editor table.tbl td.tot, .pad-wrap .editor table.tbl td.tot { background: rgba(0, 0, 0, 0.07); }
/* boutons Liste déroulante et Tableau : l'icône seule (le nom s'affiche au survol) */
.ed-tools .tb-toggle .lbl, .ed-tools .tb-table .lbl { display: none; }
.ed-tools .tb-toggle, .ed-tools .tb-table { min-width: 34px; justify-content: center; }
/* barre d'outils d'une note : quand la place manque, les icônes seules (le nom reste au survol) */
.note-head .nb-left { container-type: inline-size; }
@container (max-width: 760px) {
  .ed-tools button:not(.main) .lbl { display: none; }
  .ed-tools button:not(.main) { min-width: 36px; justify-content: center; padding: 0 8px; }
}
@container (max-width: 520px) {
  .ed-tools button.main .lbl { display: none; }
  .ed-tools button { min-width: 32px; padding: 0 6px; }
  .ed-tools .ed-sep { margin: 6px 1px; }
}
/* ---------- Notes sur ordinateur : l'écran reste fixe, seules la liste et la note défilent ---------- */
html:has(> body.nx-on), body.nx-on { height: 100%; overflow: hidden; overscroll-behavior: none; }
body.nx-on { min-height: 0; }
body.nx-on .shell { height: 100dvh; display: flex; flex-direction: column; }
body.nx-on .shell > * { flex-shrink: 0; }
body.nx-on.mode-notes .shell > #cal { flex: 1 1 auto; min-height: 0; display: flex !important; flex-direction: column; }
body.nx-on #cal > * { flex-shrink: 0; }
body.nx-on #cal > .nx { flex: 1 1 auto; height: auto; min-height: 0; }
.side { height: 100dvh; max-height: 100%; }
/* Notes sur ordinateur : mêmes marges à gauche et à droite, quelle que soit la largeur de la fenêtre */
.nx-doc { max-width: none; margin: 0; }
.nx-scroll { padding-left: 32px; padding-right: 32px; }
body.nx-on .shell { max-width: none; }
/* Menu de gauche : largeur réglable en tirant son bord droit */
.side-grip { position: absolute; top: 0; bottom: 0; right: -4px; width: 8px; cursor: col-resize; z-index: 2; touch-action: none; }
.side-grip::after { content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px; background: transparent; transition: background .15s; }
.side-grip:hover::after, body.side-resizing .side-grip::after { background: var(--accent); }
body.side-resizing, body.side-resizing * { cursor: col-resize !important; user-select: none !important; }
/* ---------- Poignée de ligne (comme Notion) ---------- */
.blk-h { position: absolute; z-index: 5; width: 22px; height: 26px; margin: 0; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--paper-faint, #8b8a86);
  transform: translate(calc(-100% - 3px), -50%); display: grid; place-items: center; cursor: grab; opacity: 0; pointer-events: none; transition: opacity .12s; touch-action: none; }
.blk-h .i { font-size: 17px; }
.blk-h.on { opacity: .75; pointer-events: auto; }
.blk-h:hover, .blk-h.act { opacity: 1; background: rgba(0, 0, 0, 0.08); }
.blk-drop { position: absolute; z-index: 5; height: 3px; border-radius: 2px; background: var(--accent); pointer-events: none; display: none; }
.blk-drop.on { display: block; }
.editor .blk-drag { opacity: .35; }
body.blk-dragging, body.blk-dragging * { cursor: grabbing !important; user-select: none !important; -webkit-user-select: none !important; }
@media (hover: none) { .blk-h { width: 18px; } .blk-h.on { opacity: .6; } }
/* Couleur d'une ligne (menu de la poignée) */
.editor div[data-c]:not(.tgl), .editor li[data-c] { border-radius: 5px; }
.editor div[data-c]:not(.tgl):not(.todo) { margin-left: -6px; margin-right: -6px; padding-left: 6px; padding-right: 6px; }
.editor div.todo[data-c] { margin-left: -6px; margin-right: -6px; padding-left: 36px; padding-right: 6px; }
.editor div.todo[data-c]::before { left: 7px; }
/* Liens dans les notes : la souris devient une main */
.editor a[href] { cursor: pointer; }
.editor a[href]:hover { text-decoration-thickness: 2px; }
/* Ordinateur : le cadre ne bouge plus (ni rebond, ni glisser gauche / droite pour page précédente) ;
   chaque colonne défile seule, sans entraîner l'écran */
html, body { overscroll-behavior-x: none; }
html:has(> body.side-on), body.side-on { overscroll-behavior: none; }
body.nx-on .nx-scroll, body.nx-on .nx-tree, body.nx-on .nx-fscroll, .side .dr-list { overflow-x: hidden; overscroll-behavior: contain; }
/* Notes sur ordinateur : colonnes rapprochées (même écart entre le menu et la liste qu'entre la liste et la note) */
body.nx-on.side-on .shell { padding-left: 10px; padding-right: 10px; padding-bottom: 10px; }
/* PDF dans une note : barre cliquable pour afficher ou replier l'aperçu */
.editor .att.k-pdf .att-bar { cursor: pointer; }
.editor .att .att-fold { display: flex; align-items: center; gap: 6px; background: none; border: 0; padding: 0; margin: 0; font: inherit; font-weight: 600; color: inherit; text-align: left; cursor: pointer; }
.editor .att .att-fold:hover { text-decoration: none; }
.editor .att .att-fold:hover .att-fold-t { text-decoration: underline; }
.editor .att .att-fold-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor .att .att-fold .chev { flex: none; display: inline-grid; place-items: center; font-size: 13px; opacity: .6; transform: rotate(90deg); transition: transform .15s; }
.editor .att.folded .att-fold .chev { transform: none; }
.editor .att.k-pdf:not(.folded) .att-bar { border-bottom: 1px solid rgba(var(--ov), 0.1); }
/* Message quand la page est agrandie au trackpad (ordinateur) */
.zoom-hint { position: fixed; z-index: 300; transform-origin: top left; max-width: 420px; padding: 12px 16px; border-radius: 12px; background: var(--accent, #9b6cf0); color: #fff;
  font-size: 15px; font-weight: 600; line-height: 1.35; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); pointer-events: none; }
/* Menu de gauche sur téléphone (dossiers, notes…) : même fond que la page To-Do (Actions) */
.drawer, [data-theme="light"] .drawer { background: var(--bg); }
/* ---------- Titres dans les notes (Titre 1, 2, 3) ---------- */
.editor h1, .editor h2, .editor h3 { margin: 0; font-weight: 750; letter-spacing: -0.01em; line-height: 1.3; }
.editor h1 { font-size: 1.75em; padding-top: .55em; padding-bottom: .1em; }
.editor h2 { font-size: 1.4em; padding-top: .5em; padding-bottom: .05em; }
.editor h3 { font-size: 1.17em; padding-top: .4em; }
.editor > h1:first-child, .editor > h2:first-child, .editor > h3:first-child { padding-top: .1em; }
.editor h1[data-c], .editor h2[data-c], .editor h3[data-c] { border-radius: 5px; margin-left: -6px; margin-right: -6px; padding-left: 6px; padding-right: 6px; }
.editor .tb-type .i, .ed-tools .tb-type .i { font-size: 19px; }
/* « + » (insérer) seulement sur téléphone ; ailleurs lien, trait, liste déroulante et tableau restent dans la barre */
.ed-tools .tb-plus, .ed-tools .tb-type { min-width: 34px; justify-content: center; }
.ed-tools .tb-plus .lbl, .ed-tools .tb-type .lbl { display: none; }
@media (min-width: 900px) { .ed-tools .tb-plus { display: none; } }
@media (max-width: 899px) {
  .ed-tools:has(.tb-plus) .tb-hr, .ed-tools:has(.tb-plus) .tb-link, .ed-tools .tb-toggle, .ed-tools .tb-table, .ed-tools:has(.tb-plus) .ed-sep { display: none; }
  .sheet .ed-tools > button { min-width: 34px; padding-left: 4px; padding-right: 4px; }
}
/* Favoris */
.nl-fav { flex: none; font-size: 13px; color: #e3b341; }
.nx-note .nl-fav { font-size: 12px; margin: 0; }
.nm-fav .nm-fic { color: #e3b341; }
.nm-fav .nm-ft { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ---------- Commentaires ---------- */
.nx-body { display: flex; flex: 1; min-height: 0; }
.nx-body > .nx-scroll { flex: 1; min-width: 0; }
.cm-panel { display: none; flex-direction: column; min-height: 0; color: var(--text); }
.nx-wrap.cm-on .cm-panel { display: flex; flex: none; width: 340px; border-left: 1px solid var(--line2); background: color-mix(in srgb, var(--text) 4%, transparent); }
.cm-sheet .cm-panel { display: flex; flex: 1; }
.cm-sheet.sheet { display: flex; flex-direction: column; }
.cm-head { display: flex; align-items: center; gap: 8px; padding: 12px 10px 8px 16px; flex: none; }
.cm-title { font-weight: 750; font-size: 16px; flex: 1; }
.cm-tgl { font-size: 13px; color: var(--muted); padding: 4px 8px; border-radius: 8px; }
.cm-tgl:hover { background: color-mix(in srgb, var(--text) 8%, transparent); }
.cm-new { padding: 4px 14px 12px; border-bottom: 1px solid var(--line); flex: none; display: grid; gap: 8px; }
.cm-pq { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; color: var(--muted); border-left: 3px solid #e3b341; padding: 2px 0 2px 8px; }
.cm-pq span { flex: 1; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.cm-in { width: 100%; resize: none; border: 1px solid var(--line2); border-radius: 10px; padding: 9px 11px; font: inherit; font-size: 15px; line-height: 1.4; color: var(--text); background: color-mix(in srgb, var(--text) 3%, transparent); outline: none; }
.cm-in:focus { border-color: var(--accent); }
.cm-in.rep { font-size: 14px; padding: 7px 10px; border-radius: 9px; }
.cm-row { display: flex; align-items: center; gap: 8px; }
.cm-hint { flex: 1; font-size: 12px; color: var(--faint); }
.cm-list { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 12px 30px; display: grid; gap: 10px; align-content: start; overscroll-behavior: contain; }
.cm-empty { color: var(--muted); font-size: 14px; line-height: 1.45; padding: 10px 4px; }
.cm-th { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: color-mix(in srgb, var(--text) 3%, transparent); display: grid; gap: 8px; cursor: default; }
.cm-th.act { border-color: #e3b341; box-shadow: 0 0 0 2px rgba(227, 179, 65, 0.25); }
.cm-th.done { opacity: .6; }
.cm-q { text-align: left; font-size: 13px; color: var(--muted); border-left: 3px solid #e3b341; padding: 1px 0 1px 8px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; cursor: pointer; }
.cm-msg { display: grid; gap: 3px; }
.cm-msg.rep { padding-left: 12px; border-left: 2px solid var(--line2); }
.cm-top { display: flex; align-items: center; gap: 6px; }
.cm-who { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; font-size: 13.5px; }
.cm-who b { font-weight: 700; white-space: nowrap; }
.cm-av { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; flex: none; }
.cm-when { color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cm-acts { display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.cm-msg:hover .cm-acts, .cm-th.act .cm-acts { opacity: 1; }
@media (hover: none) { .cm-acts { opacity: 1; } }
.cm-a { font-size: 12.5px; color: var(--muted); padding: 3px 6px; border-radius: 7px; }
.cm-a:hover { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }
.cm-a.strong { color: var(--accent); font-weight: 650; }
.cm-text { font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-text a { color: #1a5fd0; text-decoration: underline; }
.cm-rbox { display: flex; align-items: flex-end; gap: 4px; }
.cm-rsend { flex: none; color: var(--accent); }
.cm-foot { display: flex; justify-content: flex-end; }
.cm-btn { position: relative; }
.cm-btn .cm-n { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #e3b341; color: #1f1f1f; font-size: 10.5px; font-weight: 800; display: none; place-items: center; line-height: 16px; }
.cm-btn.has .cm-n { display: inline-grid; }
/* Passages commentés dans la note */
.editor span.cmt.on { background: rgba(227, 179, 65, 0.28); border-bottom: 2px solid rgba(214, 160, 40, 0.9); cursor: pointer; border-radius: 2px; }
.editor span.cmt.on.act { background: rgba(227, 179, 65, 0.55); }
/* Bouton « Commenter » sous une sélection */
.cm-float { position: fixed; z-index: 250; display: none; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: #2b2a27; color: #fff; font-size: 14px; font-weight: 650; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); }
.cm-float.on { display: inline-flex; }
.cm-float .i { font-size: 16px; }
@media (max-width: 1250px) { .nx-wrap.cm-on .cm-panel { width: 300px; } }
/* Importer une page */
.dr-nhead .grow { flex: 1; }
.dr-imp { width: 34px; height: 34px; font-size: 18px; color: var(--muted); }
.dr-imp:hover { color: var(--accent); }
.nb-imp { font-size: 19px; color: var(--muted); }
.cm-list > *, .cm-th > *, .cm-new > * { min-width: 0; }
.cm-in { box-sizing: border-box; min-width: 0; }
.cm-rbox .cm-in { flex: 1; }
.cm-th { min-width: 0; overflow: hidden; }
.cm-top { min-width: 0; }
.cm-acts { flex: none; }
@media (max-width: 899px) {
  .sheet .ed-tools { gap: 0; }
  .sheet .ed-tools > button { min-width: 32px; width: 32px; padding: 0; justify-content: center; }
  .sheet .nb-right .icon-btn { width: 34px; min-width: 34px; }
}
@media (hover: none) { .cm-hint { visibility: hidden; } }
@media (max-width: 899px) { .sheet .ed-tools > button.tb-mic, .sheet .ed-tools > button.tb-clip, .sheet .ed-tools > button.main { width: 32px; min-width: 32px; padding: 0; } }
@media (max-width: 380px) { .sheet .ed-tools > button, .sheet .ed-tools > button.tb-mic, .sheet .ed-tools > button.tb-clip, .sheet .ed-tools > button.main { width: 29px; min-width: 29px; } }
/* Lien public d'une note (lecture seule) */
.nl-pub { color: #3fb27f; }
.pub-form .row { margin-top: 8px; }
.pub-form .inp { margin-top: 10px; font-size: 14px; }
.pub-form .pub-off { width: 100%; margin-top: 14px; }
/* Double authentification et appareils connectés */
.set-card .txt .ic, .dev-row .txt .ic { width: 15px; height: 15px; vertical-align: -2px; }
.tfa-acts { margin-top: 8px; gap: 8px; }
.tfa-form .tfa-step { font-size: 14px; line-height: 1.45; }
.tfa-qr { display: grid; place-items: center; background: #fff; border-radius: 14px; padding: 10px; width: 210px; height: 210px; margin: 4px auto; }
.tfa-qr svg { width: 190px; height: 190px; display: block; }
.tfa-qr svg rect[fill="white"], .tfa-qr svg rect[fill="#ffffff"] { fill: #fff; }
.tfa-key { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.tfa-key code, .tfa-codes code { font: 600 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.tfa-add { justify-content: center; text-decoration: none; }
.tfa-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; padding: 12px 14px; border-radius: 12px; background: rgba(var(--ov, 255, 255, 255), 0.06); justify-items: center; }
.otp-in, .otp-login { letter-spacing: .12em; font-variant-numeric: tabular-nums; }
.auth-card input[hidden] { display: none; }
.dev-more { margin: 2px 0 0; justify-self: start; }

/* ================= cap77 : photo de profil, réglages en page, messages ================= */
/* ---------- Ronds des personnes : photo ou initiale ---------- */
.av.av-img { background: var(--card); overflow: hidden; padding: 0; }
.av.av-img img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.av.av-md { width: 38px; height: 38px; font-size: 15px; }
.av.av-head { width: 40px; height: 40px; font-size: 17px; }
.av.av-xl { width: 76px; height: 76px; font-size: 30px; }
/* ---------- Menu de gauche : la tête de la personne en haut, la roue juste à côté ---------- */
.dr-head { justify-content: flex-start; gap: 6px; }
.dr-head .grow { flex: 1; }
.dr-av { border-radius: 50%; padding: 0; flex: none; display: grid; transition: box-shadow .15s; }
.dr-av:hover { box-shadow: 0 0 0 3px rgba(var(--ov), 0.12); }
.dr-gearb { width: 38px; height: 38px; font-size: 19px; color: var(--muted); border-radius: 10px; }
.dr-gearb:hover, .dr-gearb.on { color: var(--text); background: rgba(var(--ov), 0.08); }
/* ---------- Pages Messages et Réglages ---------- */
body.mode-chat #cal, body.mode-set #cal { display: block !important; }
body.mode-chat .top-grid, body.mode-chat #toolbar, body.mode-chat #board, body.mode-chat #lists,
body.mode-set .top-grid, body.mode-set #toolbar, body.mode-set #board, body.mode-set #lists { display: none !important; }
body.mode-chat .date-row .date-block, body.mode-set .date-row .date-block { display: none; }
body.mode-chat .date-row, body.mode-set .date-row { row-gap: 0; }
body.mode-chat { --accent: #1FA39A; }
.mode-tabs .mt-chat .mt-badge { background: #1FA39A; }
body.mode-chat .mode-tabs .mt-chat .mt-badge { background: #E5534B; }
/* ---------- Réglages ---------- */
.sx.wide { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 22px; align-items: start; margin-top: 4px; }
.sx-nav { display: grid; gap: 2px; }
.sx.wide .sx-nav { position: sticky; top: 14px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 8px; }
.sx-h { font-size: 22px; font-weight: 750; padding: 2px 10px 10px; letter-spacing: -.01em; }
.sx-item { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 9px; text-align: left; font-size: 14.5px; color: var(--muted); }
.sx-item .i { font-size: 17px; width: 24px; }
.sx-item .av { width: 24px; height: 24px; font-size: 11px; }
.sx-item:hover { background: rgba(var(--ov), 0.06); color: var(--text); }
.sx-item.on { background: var(--accent); color: #fff; }
.sx-item .chev { margin-left: auto; font-size: 13px; opacity: .5; }
.sx-body { min-width: 0; max-width: 760px; }
.sx-title { display: flex; align-items: center; gap: 6px; margin: 4px 0 14px; }
.sx-title h2 { margin: 0; font-size: 24px; font-weight: 750; letter-spacing: -.01em; }
.sx-body > .set-card + .set-card, .sx-body > .set-hint + .set-card { margin-top: 10px; }
.sx-body > .set-hint { margin: -4px 0 12px; }
.sx-foot { text-align: center; padding: 28px 0 10px; }
.sx.phone .sx-nav { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px; }
.sx.phone .sx-item { padding: 12px 10px; font-size: 15.5px; color: var(--text); }
.sx.phone .sx-h { padding: 4px 4px 12px; font-size: 26px; }
.cx-back .i { transform: rotate(180deg); }
.cx-back { width: 36px; height: 36px; font-size: 18px; flex: none; }
.set-photo { display: flex !important; align-items: center; gap: 16px; }
.set-ph-av { position: relative; border-radius: 50%; flex: none; display: grid; }
.set-ph-cam { position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 15px; box-shadow: 0 0 0 3px var(--bg2); }
/* cadrer la photo */
.crop-wrap { display: grid; justify-items: center; gap: 12px; padding: 6px 16px 4px; }
.crop-stage { position: relative; width: var(--s); height: var(--s); border-radius: 18px; overflow: hidden; background: #000; touch-action: none; cursor: grab; user-select: none; }
.crop-stage:active { cursor: grabbing; }
.crop-img { position: absolute; left: 50%; top: 50%; max-width: none; pointer-events: none; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(0, 0, 0, .55); pointer-events: none; outline: 2px solid rgba(255, 255, 255, .85); outline-offset: -2px; }
.crop-z { display: flex; align-items: center; gap: 10px; width: var(--s, 260px); color: var(--muted); }
.crop-zoom { flex: 1; accent-color: var(--accent); }
/* ---------- Messages : écran fixe sur ordinateur (seules les listes défilent) ---------- */
html:has(> body.cx-on), body.cx-on { height: 100%; overflow: hidden; overscroll-behavior: none; }
body.cx-on { min-height: 0; }
body.cx-on .shell { height: 100dvh; display: flex; flex-direction: column; max-width: none; padding-bottom: 20px; }
body.cx-on .shell > * { flex-shrink: 0; }
body.cx-on.mode-chat .shell > #cal { flex: 1 1 auto; min-height: 0; display: flex !important; flex-direction: column; }
body.cx-on #cal > .cx { flex: 1 1 auto; min-height: 0; }
.cx.wide { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 10px; height: 100%; }
.cx.wide.th-on { grid-template-columns: 300px minmax(0, 1fr) minmax(320px, 400px); }
.cx.wide > .cx-side { display: none; }
.cx.wide.th-on > .cx-side { display: flex; }
.cx:not(.wide) > .cx-main, .cx:not(.wide) > .cx-side { display: none; }
.cx-list { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 6px; overflow-y: auto; min-height: 0; }
.cx:not(.wide) .cx-list { background: none; border: 0; padding: 0; }
.cx-lhead { display: flex; align-items: center; font-size: 20px; font-weight: 750; padding: 4px 10px 10px; }
.cx-row { display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; border-radius: 11px; text-align: left; }
.cx-row:hover { background: rgba(var(--ov), 0.06); }
.cx-row.sel { background: var(--accent); color: #fff; }
.cx-row.sel .cx-rp, .cx-row.sel .cx-rd { color: rgba(255, 255, 255, .85); }
.cx-rt { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cx-rn { font-weight: 650; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-rp { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-row.unread .cx-rp { color: var(--text); font-weight: 600; }
.cx-rr { flex: none; display: grid; justify-items: end; gap: 4px; }
.cx-rd { font-size: 12px; color: var(--faint); }
.cx-rb { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: #1FA39A; color: #fff; font-size: 11.5px; font-weight: 800; line-height: 20px; text-align: center; }
.cx-row.sel .cx-rb { background: #fff; color: #1FA39A; }
.cx-cmav { background: color-mix(in srgb, #E3B341 30%, var(--card)); color: #E3B341; font-size: 18px; }
.cx-none { padding: 14px 12px; font-size: 13.5px; color: var(--faint); line-height: 1.5; }
.cx-main, .cx-side { min-height: 0; min-width: 0; display: flex; flex-direction: column; }
.cx-panel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; position: relative; }
.cx-panel.drop { box-shadow: inset 0 0 0 2px var(--accent); }
.cx-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); flex: none; }
.cx-ht { flex: 1; min-width: 0; }
.cx-hn { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-hs { font-size: 12.5px; color: var(--faint); }
.cx-th-ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--ov), 0.07); font-size: 18px; color: var(--accent); flex: none; }
.cx-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 10px 14px 6px; }
.cx-msgs { display: flex; flex-direction: column; gap: 2px; min-height: 100%; justify-content: flex-end; }
.cx-empty { margin: auto; padding: 30px 16px; text-align: center; color: var(--faint); font-size: 14px; max-width: 360px; line-height: 1.5; }
.cx-day { text-align: center; margin: 14px 0 8px; }
.cx-day span { display: inline-block; padding: 3px 10px; border-radius: 99px; background: rgba(var(--ov), 0.07); color: var(--muted); font-size: 12px; font-weight: 600; }
.cx-thsep { display: flex; align-items: center; gap: 10px; margin: 12px 0 8px; color: var(--faint); font-size: 12.5px; font-weight: 600; }
.cx-thsep::after { content: ""; flex: 1; height: 1px; background: var(--line2); }
.cx-seen { align-self: flex-end; font-size: 11.5px; color: var(--faint); margin: 2px 4px 0; min-height: 0; }
.cx-seen:empty { display: none; }
/* une bulle */
.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 100%; }
.msg.me { align-items: flex-end; }
.msg.grp { margin-top: 8px; }
.msg.root { align-items: stretch; }
.m-line { display: flex; align-items: center; gap: 4px; max-width: min(78%, 640px); }
.msg.me .m-line { flex-direction: row-reverse; }
.msg.root .m-line { max-width: 100%; }
.bub { position: relative; min-width: 0; padding: 7px 11px 6px; border-radius: 16px; background: var(--card); color: var(--text); overflow-wrap: anywhere; box-shadow: 0 1px 1px rgba(0, 0, 0, .12); }
.msg.me .bub { background: color-mix(in srgb, var(--accent) 78%, #0c2b29); color: #fff; }
.msg.them.grp .bub { border-top-left-radius: 6px; }
.msg.me.grp .bub { border-top-right-radius: 6px; }
.msg.root .bub { width: 100%; }
.m-txt { white-space: pre-wrap; font-size: 15px; line-height: 1.42; }
.m-txt.big { font-size: 38px; line-height: 1.15; }
.m-txt a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.msg.them .m-txt a { color: #4C9BF6; }
.m-gone { font-style: italic; opacity: .65; }
.msg.del .bub { background: transparent; border: 1px dashed var(--line2); box-shadow: none; color: var(--muted); }
.m-meta { float: right; display: inline-flex; align-items: center; gap: 5px; margin: 6px 0 -2px 10px; font-size: 11px; opacity: .65; line-height: 1; }
.m-st .i { font-size: 11px; }
.m-files { min-height: 0 !important; padding: 0 !important; margin: 2px -5px 0; display: grid; gap: 4px; font-size: 14px; }
.m-files .att { margin: 0; max-width: 360px; border-radius: 11px; background: rgba(var(--ov), 0.06); }
.msg.me .m-files .att { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.2); }
.m-files .att img { max-height: 320px; }
.m-files .att video { max-height: 340px; }
.m-files .att.k-audio { min-width: min(300px, 64vw); }
.msg.me .m-files .att-stt { border-color: rgba(255, 255, 255, 0.35); }
.m-files .att iframe.att-pdf { height: 420px; }
.msg.failed .bub { box-shadow: 0 0 0 1.5px var(--danger); }
.m-retry { align-self: flex-end; font-size: 12px; color: var(--danger); margin: 3px 4px 0; }
/* actions au survol (ordinateur) */
.m-acts { display: flex; gap: 1px; opacity: 0; transition: opacity .12s; flex: none; }
.msg:hover .m-acts, .m-acts:focus-within { opacity: 1; }
.m-act { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); font-size: 16px; }
.m-act:hover { background: rgba(var(--ov), 0.08); color: var(--text); }
@media (pointer: coarse) { .m-acts { display: none; } }
/* réactions */
.m-reacts { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 2px 0; max-width: min(78%, 640px); }
.msg.me .m-reacts { justify-content: flex-end; }
.rx { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border-radius: 99px; background: rgba(var(--ov), 0.07); border: 1px solid var(--line2); font-size: 14px; }
.rx:hover { background: rgba(var(--ov), 0.12); }
.rx.mine { background: color-mix(in srgb, var(--accent) 22%, transparent); border-color: color-mix(in srgb, var(--accent) 65%, transparent); }
.rx-n { font-size: 12px; font-weight: 700; color: var(--muted); }
.rx-pop { position: fixed; z-index: 70; display: flex; gap: 2px; padding: 5px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line2); box-shadow: 0 8px 28px rgba(0, 0, 0, .4); }
.rx-q { width: 38px; height: 38px; border-radius: 50%; font-size: 22px; display: grid; place-items: center; transition: transform .1s; }
.rx-q:hover { background: rgba(var(--ov), 0.08); transform: scale(1.15); }
.rx-more { font-size: 17px; color: var(--muted); }
.rx-bar { display: flex; justify-content: space-between; gap: 4px; padding: 12px 14px 6px; }
.rx-bar .rx-q { width: 44px; height: 44px; font-size: 26px; background: rgba(var(--ov), 0.06); }
/* le fil sous un message */
.m-thread { display: inline-flex; align-items: center; gap: 7px; margin: 4px 2px 0; padding: 4px 8px 4px 4px; border-radius: 10px; font-size: 13px; color: var(--accent); font-weight: 650; }
.m-thread:hover { background: rgba(var(--ov), 0.06); }
.m-th-avs { display: inline-flex; }
.m-th-avs .av { width: 20px; height: 20px; font-size: 9.5px; box-shadow: 0 0 0 2px var(--bg2); }
.m-th-avs .av + .av { margin-left: -6px; }
.m-th-t { color: var(--faint); font-weight: 500; }
.m-thread .chev { font-size: 11px; opacity: .6; }
/* zone d'écriture */
.cx-comp { flex: none; border-top: 1px solid var(--line); padding: 8px 10px calc(8px + var(--safe-b)); background: var(--bg2); }
.cx-main .cx-comp, .cx-side .cx-comp { padding-bottom: 8px; }
.cx-bar { display: flex; align-items: flex-end; gap: 4px; }
.cx-in { flex: 1; min-width: 0; resize: none; border: 1px solid var(--line2); background: var(--panel); border-radius: 20px; padding: 9px 14px; font-size: 15px; line-height: 1.35; max-height: 180px; outline: none; }
.cx-in:focus { border-color: color-mix(in srgb, var(--accent) 70%, transparent); }
.cx-tool { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; color: var(--muted); flex: none; }
.cx-tool:hover { background: rgba(var(--ov), 0.08); color: var(--text); }
.cx-send { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; flex: none; background: rgba(var(--ov), 0.08); color: var(--faint); }
.cx-send.on { background: var(--accent); color: #fff; }
.cx-pend { display: none; flex-wrap: wrap; gap: 6px; padding: 0 2px 8px; }
.cx-pend.on { display: flex; }
.cx-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 260px; height: 30px; padding: 0 4px 0 10px; border-radius: 99px; background: rgba(var(--ov), 0.07); border: 1px solid var(--line2); font-size: 12.5px; }
.cx-chip.err { border-color: var(--danger); color: var(--danger); }
.cx-chip-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.cx-chip-p { color: var(--faint); flex: none; font-variant-numeric: tabular-nums; }
.cx-chip-x { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; flex: none; }
.cx-chip-x:hover { background: rgba(var(--ov), 0.1); }
.cx-editbar { display: none; align-items: center; gap: 8px; padding: 0 2px 8px 6px; color: var(--accent); font-size: 13px; font-weight: 650; }
.cx-editbar.on { display: flex; }
.cx-editbar .grow { flex: 1; }
/* fil des commentaires des notes */
.cm-feed { display: grid; gap: 6px; align-content: start; padding: 10px; }
.cmf { display: flex; gap: 11px; align-items: flex-start; text-align: left; width: 100%; padding: 10px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.cmf:hover { background: var(--card-h); }
.cmf.new { box-shadow: inset 3px 0 0 #E3B341; }
.cmf-b { flex: 1; min-width: 0; display: grid; gap: 4px; }
.cmf-h { font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.cmf-h b { color: var(--text); }
.cmf-n { display: inline-flex; align-items: center; gap: 4px; color: var(--text); font-weight: 600; }
.cmf-n .i { color: #B8763A; }
.cmf-t { margin-left: auto; color: var(--faint); font-size: 12px; }
.cmf-q { font-size: 13px; color: var(--muted); border-left: 3px solid #E3B341; padding: 1px 0 1px 8px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cmf-x { font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.cmf-r { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--ok); }
/* ---------- Téléphone : la conversation en plein écran ---------- */
.sheet.chat-sheet { position: fixed; inset: 0; top: var(--vvt, 0px); width: 100% !important; height: var(--vh, 100dvh) !important; max-height: none !important; border-radius: 0 !important; border: 0 !important; padding: var(--safe-t) 0 0 !important; transform: translateX(100%) !important; opacity: 1 !important; transition: transform .24s cubic-bezier(.2, .8, .2, 1) !important; background: var(--bg); }
.overlay.show .sheet.chat-sheet { transform: none !important; }
.overlay.hide .sheet.chat-sheet { transform: translateX(100%) !important; }
.sheet.chat-sheet .cx-panel { border: 0; border-radius: 0; background: var(--bg); }
.sheet.chat-sheet .cx-head { padding: 6px 10px 8px 4px; }
.sheet.chat-sheet .cx-comp { background: var(--bg); }
.sheet.chat-sheet .cx-scroll { padding: 8px 10px 6px; }
.sheet.chat-sheet .m-line, .sheet.chat-sheet .m-reacts { max-width: 86%; }
@media (max-width: 899px) {
  .cx:not(.wide) .cx-lhead { font-size: 26px; padding: 2px 4px 10px; }
  .cx:not(.wide) .cx-row { padding: 10px 6px; border-radius: 12px; }
  .cx:not(.wide) .cx-row + .cx-row { border-top: 1px solid var(--line); border-radius: 0; }
}
[data-theme="light"] .msg.me .bub { background: color-mix(in srgb, var(--accent) 88%, #fff); }
[data-theme="light"] .bub { box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
[data-theme="light"] .msg.them .bub { background: #fff; }
[data-theme="light"] .cx-panel { background: #fbfaf8; }
[data-theme="light"] .sheet.chat-sheet .cx-panel, [data-theme="light"] .sheet.chat-sheet .cx-comp { background: var(--bg); }

/* ---------- Réglages sur ordinateur : comme les notes, l'écran reste fixe ; la colonne des rubriques et la rubrique vont jusqu'en bas ---------- */
html:has(> body.sx-on), body.sx-on { height: 100%; overflow: hidden; overscroll-behavior: none; }
body.sx-on { min-height: 0; }
body.sx-on .shell { height: 100dvh; display: flex; flex-direction: column; max-width: none; padding-bottom: 20px; }
body.sx-on .shell > * { flex-shrink: 0; }
body.sx-on.mode-set .shell > #cal { flex: 1 1 auto; min-height: 0; display: flex !important; flex-direction: column; }
body.sx-on #cal > .sx { flex: 1 1 auto; min-height: 0; }
.sx.wide { grid-template-columns: var(--nx-w, 300px) minmax(0, 1fr); gap: 10px; align-items: stretch; height: 100%; margin-top: 0; }
.sx.wide .sx-nav { position: static; top: auto; min-height: 0; overflow-y: auto; align-content: start; padding: 12px 8px; }
.sx.wide .sx-body { max-width: none; min-height: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 32px 8px; }
.sx.wide .sx-title { margin-top: 0; }
.sx.wide .sx-body .set-card { background: var(--panel); border-color: var(--line2); }
/* mêmes marges que les notes quand la barre latérale est ouverte */
body.sx-on.side-on .shell, body.cx-on.side-on .shell { padding-left: 10px; padding-right: 10px; padding-bottom: 10px; }
/* ---------- Ordinateur : les onglets passent dans le menu de gauche, en icônes, avec la loupe ---------- */
.mode-tabs .mt-lbl { display: none; }
@media (min-width: 900px) { .mode-tabs .mt-badge { position: absolute; margin: 0; box-shadow: 0 0 0 2px var(--bg); } }
body.side-on .date-row .mode-tabs { display: none; }
body.side-on:is(.mode-notes, .mode-chat, .mode-set) .date-row:not(:has(.sync[data-state="offline"], .sync[data-state="error"])) { display: none; }
.dr-modes { display: flex; align-items: center; gap: 4px; padding: 0 2px 14px; margin-bottom: 0; border-bottom: 1px solid var(--line2); }
.dr-mode { position: relative; flex: 1 1 0; min-width: 0; max-width: 46px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; color: var(--muted); }
.dr-mode:hover { background: rgba(var(--ov), 0.08); color: var(--text); }
.dr-mode.on { background: var(--mc, var(--accent)); color: #fff; }
.dr-mode .mt-badge { position: absolute; top: -3px; right: -3px; margin: 0; box-shadow: 0 0 0 2px var(--bg2); }
.dr-mode.mt-chat .mt-badge { background: #1FA39A; }
.dr-mode.mt-chat.on .mt-badge { background: #E5534B; }
.dr-msep { flex: 0 0 1px; height: 22px; background: var(--line2); margin: 0 3px; }
.dr-find.on { background: rgba(var(--ov), 0.14); color: var(--text); }
[data-theme="light"] .dr-mode .mt-badge { box-shadow: 0 0 0 2px #f6f5f2; }
/* la recherche, dans la colonne d'à côté du menu (comme la liste des notes) */
.find { position: fixed; z-index: 30; left: calc(var(--side-w, 264px) + 10px); top: calc(var(--safe-t) + 14px); bottom: 10px; width: var(--find-w, 300px);
  display: flex; flex-direction: column; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.find-top { display: flex; align-items: center; gap: 6px; padding: 10px 8px 8px 12px; border-bottom: 1px solid var(--line); flex: none; }
.find-ic { font-size: 16px; color: var(--muted); }
.find-in { flex: 1; min-width: 0; height: 38px; padding: 0 10px; font-size: 15px; background: var(--panel); }
.find-x { width: 34px; height: 34px; flex: none; }
.find-res { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 6px 10px; }
.find .gs-row:hover { background: rgba(var(--ov), .05); }
.find .gs-row.cur { background: var(--accent); color: #fff; }
.find .gs-row.cur .gs-sub, .find .gs-row.cur .gs-lead { color: rgba(255, 255, 255, .85); }
body.side-on.find-on #app { padding-left: calc(var(--side-w, 264px) + var(--find-w, 300px) + 10px); }
/* la colonne d'à côté (liste des notes, personnes, rubriques) laisse sa place à la recherche */
body.find-on .nx > .nx-list, body.find-on .nx > .nx-grip { display: none; }
body.find-on.side-on .nx { grid-template-columns: minmax(0, 1fr); }
body.find-on .cx.wide > .cx-list, body.find-on .sx.wide > .sx-nav { display: none; }
body.find-on .cx.wide { grid-template-columns: minmax(0, 1fr); }
body.find-on .cx.wide.th-on { grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); }
body.find-on .sx.wide { grid-template-columns: minmax(0, 1fr); }
/* ---------- Ordinateur : onglets en gros boutons encadrés en haut du menu, la tête et les réglages en bas ---------- */
.side .dr-modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 2px 0 14px; }
.side .dr-mode { max-width: none; height: 46px; border-radius: 12px; font-size: 21px; border: 1px solid var(--line2); background: rgba(var(--ov), 0.04); }
.side .dr-mode:hover { background: rgba(var(--ov), 0.09); border-color: rgba(var(--ov), 0.2); }
.side .dr-mode.on { background: var(--mc, var(--accent)); border-color: var(--mc, var(--accent)); color: #fff; }
.side .dr-mode .mt-badge { top: -6px; right: -6px; }
.side .dr-find.on { background: rgba(var(--ov), 0.16); border-color: rgba(var(--ov), 0.3); }
.side .dr-msep { display: none; }
.side-foot { display: flex; align-items: center; gap: 6px; padding: 10px 2px 0 2px; border-top: 1px solid var(--line2); flex: none; }
.side-foot .grow { flex: 1; }
.side-foot .dr-gearb { width: 40px; height: 40px; font-size: 20px; border: 1px solid var(--line2); border-radius: 11px; }
.side-foot .dr-close { width: 40px; height: 40px; font-size: 19px; color: var(--muted); border-radius: 11px; }
.side-foot .dr-close:hover { background: rgba(var(--ov), 0.08); color: var(--text); }
.side .dr-list > .nm-sec:first-child { padding-top: 4px; }
.nm-shared { display: inline-grid; place-items: center; flex: none; }
.nm-shared .nx-badge { color: #1FA39A; font-size: 14px; }
.nx-imp { width: 34px; height: 34px; font-size: 17px; color: var(--muted); }
/* ---------- Marges : colonnes plus près du haut et du bas ; sections du menu de gauche ---------- */
.side { padding-top: calc(var(--safe-t, 0px) + 8px); padding-bottom: 8px; }
body.side-on:is(.nx-on, .cx-on, .sx-on) .shell { padding-top: calc(var(--safe-t, 0px) + 8px); padding-bottom: 8px; }
.find { top: calc(var(--safe-t, 0px) + 8px); bottom: 8px; }
.side .dr-list > .nm-sec:first-child { padding-top: 16px; }
.side .nm-sec .nx-secbtn, .drawer .nm-sec .nx-secbtn { margin: -8px 0 -8px; }
.side .nm-tags { padding-bottom: 0; }
.mode-tabs .mt-search { color: var(--muted); }
@media (max-width: 899px) { .mode-tabs .mt-search { padding: 8px 10px; } }
/* ---------- cap83 : la tête ouvre les réglages ; titres des sections plus visibles ; icônes de dossier en image ; réglages déroulants sur téléphone ---------- */
.side-top { display: flex; align-items: center; padding: 0 2px 10px; flex: none; }
.dr-av.dr-gearb { width: auto; height: auto; padding: 0; border: 0; border-radius: 50%; background: none; }
.dr-av.dr-gearb:hover { background: none; box-shadow: 0 0 0 3px rgba(var(--ov), 0.14); }
.dr-av.dr-gearb.on { box-shadow: 0 0 0 3px var(--accent); }
.side .dr-av.dr-gearb.on { box-shadow: 0 0 0 3px #9B6CF0; }
.nm-sec, .side .nm-sec, .drawer .nm-sec { color: var(--text); font-size: 15px; font-weight: 700; text-transform: none; letter-spacing: 0; }
.side .nm-sec { padding: 14px 4px 4px 6px; }
.side .dr-list > .nm-sec:first-child { padding-top: 16px; }
.drawer .nm-sec { padding-top: 16px; }
.mode-tabs .mt-notes { display: inline-flex; }
.femo.fimg { display: inline-grid; place-items: center; }
.femo.fimg img { width: 1.15em; height: 1.15em; border-radius: 5px; object-fit: cover; display: block; }
.sx-acc .sx-acc-it + .sx-acc-it { border-top: 1px solid var(--line); }
.sx-acc .sx-item .chev { transition: transform .15s; }
.sx-acc-it.open > .sx-item { font-weight: 650; }
.sx-acc-it.open > .sx-item .chev { transform: rotate(90deg); opacity: .8; }
.sx-acc-body { display: grid; gap: 10px; padding: 2px 4px 14px; }
.sx-acc-body > .set-hint { margin: 0 4px; }
.sx-item .grow { flex: 1; min-width: 0; }
@media (max-width: 899px) {
  .mode-tabs button { padding: 8px 10px; }
  .mode-tabs .mt-search { padding: 8px 9px; }
}
@media (max-width: 380px) { .mode-tabs button, .mode-tabs .mt-search { padding: 8px 7px; } }
.sx-acc .sx-item { width: 100%; }
/* ---------- cap84 : tête + roue + loupe en haut ; onglets sur une ligne ; traits entre les notes ---------- */
.side .dr-modes { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.side-top { gap: 2px; padding: 0 0 10px 2px; }
.side-top .dr-av { margin-right: 6px; }
.side-top .icon-btn, .dr-head .dr-gearb { width: 38px; height: 38px; font-size: 19px; border: 0; background: none; border-radius: 10px; color: var(--muted); }
.side-top .icon-btn:hover, .dr-head .dr-gearb:hover { background: rgba(var(--ov), 0.08); color: var(--text); }
.side-top .icon-btn.on, .dr-head .dr-gearb.on { background: rgba(var(--ov), 0.12); color: var(--text); }
span.dr-av { display: inline-grid; border-radius: 50%; flex: none; }
.dr-head { gap: 4px; }
.dr-head .dr-av { margin-right: 4px; }
/* haut de l'écran (téléphone, ou ordinateur menu replié) : la tête ouvre le menu de gauche, la loupe à côté */
.drawer-btn.drawer-av { width: auto; height: auto; padding: 0; border-radius: 50%; background: none; }
.drawer-btn.drawer-av .av { width: 40px; height: 40px; font-size: 17px; }
.top-loupe { width: 40px; height: 40px; font-size: 20px; flex: none; color: var(--muted); border-radius: 12px; }
body.side-on .top-loupe { display: none; }
@media (max-width: 899px) {
  .tabs-line { gap: 6px; }
  .mode-tabs { flex: 1; display: flex; justify-content: space-between; }
  .mode-tabs button { flex: 1; justify-content: center; padding: 10px 6px; min-height: 44px; }
  .mode-tabs button .i, .mode-tabs button > .i { font-size: 20px; }
}
/* hashtags : le titre plus près des hashtags */
.side .nm-sec:has(.nx-secbtn), .drawer .nm-sec:has(.nx-secbtn) { padding-bottom: 0; }
.side .nm-tags, .drawer .nm-tags { padding-top: 0; }
/* traits fins entre les notes */
.nx-tree .nx-note { position: relative; }
.nx-tree .nx-note + .nx-note::before { content: ""; position: absolute; left: 10px; right: 10px; top: 0; height: 1px; background: var(--line2); }
.nx-tree .nx-note.sel::before, .nx-tree .nx-note.sel + .nx-note::before { display: none; }
.nm-card .nm-row { border-top-color: var(--line2); }
@media (max-width: 899px) {
  .date-row .tabs-line { justify-self: stretch; width: 100%; display: flex; align-items: center; min-width: 0; }
  .date-row .tabs-line .mode-tabs { flex: 1 1 auto; min-width: 0; }
}
/* ---------- cap85 : la tête replie le menu ; tête, roue et loupe un peu plus grandes ; favori en grand ; « Nouveau dossier » en texte ---------- */
.side-top { gap: 4px; padding: 6px 0 16px 2px; }
.side-top .dr-av { margin-right: 6px; }
.side-top .dr-av .av { width: 46px; height: 46px; font-size: 19px; }
.side-top .icon-btn { width: 44px; height: 44px; font-size: 22px; }
button.dr-av.dr-fold { padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; }
button.dr-av.dr-fold:hover { box-shadow: 0 0 0 3px rgba(var(--ov), 0.16); }
body.nx-full .nx > .nx-list, body.nx-full .nx > .nx-grip { display: none; }
body.nx-full.side-on .nx { grid-template-columns: minmax(0, 1fr); }
.nm-newf { display: block; width: 100%; text-align: left; padding: 8px 6px 2px; font-size: 14px; font-weight: 600; color: var(--accent); background: none; border: 0; }
.nm-newf:hover { text-decoration: underline; text-underline-offset: 3px; }
.drawer .nm-newf { font-size: 15px; padding: 10px 6px 2px; }
/* ---------- cap86 : ordinateur, colonnes pleines sans cadre ni marge (Notes, Messages, Réglages, recherche) ---------- */
body.side-on:is(.nx-on, .cx-on, .sx-on) .shell { padding: 0 !important; }
body.side-on .nx { grid-template-columns: var(--nx-w, 300px) 1px minmax(0, 1fr); }
body.side-on .nx > .nx-grip { background: var(--line2); }
body.side-on .nx-grip::before { content: ""; position: absolute; top: 0; bottom: 0; left: -4px; right: -4px; z-index: 2; }
body.side-on .nx-grip::after { left: -1px; top: 0; bottom: 0; width: 3px; border-radius: 0; }
body.side-on .nx-list { border: 0; border-radius: 0; }
body.side-on .nx-main { border-radius: 0; }
body.side-on .cx.wide { gap: 0; }
body.side-on .cx.wide > .cx-list { border: 0; border-radius: 0; border-right: 1px solid var(--line2); }
body.side-on .cx.wide .cx-panel { border: 0; border-radius: 0; }
body.side-on .cx.wide.th-on > .cx-side { border-left: 1px solid var(--line2); }
body.side-on .sx.wide { gap: 0; }
body.side-on .sx.wide .sx-nav { border: 0; border-radius: 0; border-right: 1px solid var(--line2); }
body.side-on .sx.wide .sx-body { border: 0; border-radius: 0; }
.find { left: var(--side-w, 264px); top: 0; bottom: 0; border: 0; border-right: 1px solid var(--line2); border-radius: 0; }
body.side-on.find-on #app { padding-left: calc(var(--side-w, 264px) + var(--find-w, 300px)); }
body.side-on.find-on:not(.nx-on):not(.cx-on):not(.sx-on) .shell { padding-left: 24px; }
/* nombre de notes à droite des dossiers */
.nm-cnt { margin-left: auto; padding-left: 8px; font-size: 13px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; flex: none; }
.nm-f.on .nm-cnt { color: inherit; opacity: .8; }
.nm-f .nm-shared + .nm-cnt { padding-left: 6px; }
.dr-head .dr-loupe { margin-left: 0; }
.dr-head .dr-loupe { width: 38px; height: 38px; font-size: 19px; border: 0; background: none; border-radius: 10px; color: var(--muted); }
.dr-head .dr-loupe:hover { background: rgba(var(--ov), 0.08); color: var(--text); }
/* ---------- La « Note » du To-Do : les outils de mise en page en icônes seules (le nom reste au survol) ---------- */
.pad-wrap .ed-tools .lbl { display: none; }
.pad-wrap .ed-tools button { padding: 0 8px; min-width: 34px; justify-content: center; }

/* cap89 : sous-tâches cochables sur les cartes et dans Reçu */
.card-icons > button.card-todo { height: 24px; border: 0; background: none; font: inherit; font-size: 11.5px; font-weight: 650; cursor: pointer; border-radius: 6px; align-items: center; position: relative; }
.card-icons > button.card-todo::after { content: ""; position: absolute; inset: -6px -2px; }
.card-icons > button.card-todo:hover, .card-icons > button.card-todo.on { background: rgba(var(--ov), .09); }
.card.has-subs { flex-wrap: wrap; row-gap: 3px; }
.card-subs { flex: 1 0 100%; display: flex; flex-direction: column; gap: 0; margin: 0 -4px -4px -4px; }
.csub { display: flex; align-items: flex-start; gap: 11px; width: 100%; border: 0; background: none; color: inherit; opacity: .92; font: inherit; font-size: 13.5px; font-weight: 450; line-height: 1.35; text-align: left; padding: 4px 6px 4px 5px; border-radius: 6px; cursor: pointer; }
.csub:hover { background: rgba(var(--ov), .06); }
.csub-box { width: 15px; height: 15px; flex: none; margin-top: 1px; border-radius: 4px; border: 1.6px solid var(--muted); box-sizing: border-box; display: grid; place-items: center; color: transparent; font-size: 9px; }
.csub-box svg { stroke-width: 3.4; }
.csub.done .csub-box { background: var(--accent); border-color: var(--accent); color: #fff; }
.csub.done .csub-t { color: var(--faint); text-decoration: line-through; }
.card.is-prio .csub { font-weight: 500; }
.card.is-prio .csub-box { border-color: rgba(255, 255, 255, .75); }
.card.is-prio .csub.done .csub-t { color: rgba(255, 255, 255, .6); }
.ib-todo { display: inline-flex; align-items: center; gap: 3px; font-weight: 650; font-variant-numeric: tabular-nums; }
.ib-todo .i { font-size: 12.5px; }
.ib-todo.all { color: var(--ok, #3fb37f); }
.ib-full .todo { cursor: pointer; }
@media (max-width: 760px) { .csub { font-size: 14px; padding: 6px 6px 6px 4px; gap: 10px; } .csub-box { width: 17px; height: 17px; } }
/* cap89 : réglages sur téléphone, le contenu d'une rubrique ouverte a le même fond que le menu (pas de cadres plus foncés) */
.sx.phone .sx-acc-body { gap: 0; padding: 0 2px 10px; }
.sx.phone .sx-acc-body .set-card { background: none; border: 0; border-radius: 0; padding: 10px 10px; }
.sx.phone .sx-acc-body .set-card + .set-card, .sx.phone .sx-acc-body > * + .set-card { margin-top: 0; border-top: 1px solid var(--line); }
.sx.phone .sx-acc-body > .set-hint { margin: 8px 10px; }

/* ---------- cap90 ---------- */
/* Réglages (téléphone) : la rubrique ouverte a un fond plus clair */
.sx.phone .sx-acc-it.open { background: rgba(255, 255, 255, 0.055); border-radius: 10px; }
[data-theme="light"] .sx.phone .sx-acc-it.open { background: rgba(255, 255, 255, 0.6); }
.sx.phone .sx-acc-it.open + .sx-acc-it, .sx.phone .sx-acc-it.open { border-top-color: transparent; }
/* menu de gauche : favoris sans cadre, un peu plus d'air avant */
.side .nm-card.nm-favs, .drawer .nm-card.nm-favs { background: none; border: 0; border-radius: 0; overflow: visible; }
.side .nm-favs .nm-f, .drawer .nm-favs .nm-f { border-top: 0; border-radius: 10px; }
.side .dr-list > .nm-sec:first-child, .drawer .dr-list > .nm-sec:first-child { padding-top: 26px; }
/* la tête : un cercle de couleur autour, et un peu de place avant le menu */
.drawer-btn.drawer-av .av, .dr-av .av { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 899px) {
  .date-row .tabs-line { gap: 14px; }
  .drawer-btn.drawer-av { margin-left: 3px; }
  /* plus d'espace autour de la date, et avant le menu ACTIONS / projets */
  body:not(.mode-cal):not(.mode-set):not(.mode-chat):not(.mode-notes) .date-row { row-gap: 24px; margin-bottom: 24px; }
  .toolbar { margin-top: 24px; }
}
/* Reçu : les explications derrière le « i » */
.nb-head .ib-info { width: 32px; height: 32px; font-size: 19px; margin-left: -4px; border-radius: 50%; }
.nb-head .ib-info.on { color: var(--accent); background: rgba(var(--ov), 0.07); }
.ib-hint[hidden] { display: none; }
.ib-hint { margin: 2px 0 6px; }
/* barre de mise en page au-dessus du clavier (téléphone, tablette) */
.ed-tools.kb-float { position: fixed; left: 0; right: 0; top: calc(var(--vvt, 0px) + var(--vh, 100vh)); transform: translateY(-100%); z-index: 70;
  margin: 0; border: 0; border-top: 1px solid var(--line2); border-radius: 0; background: var(--panel); padding: 5px 8px; gap: 2px;
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.22); }
.ed-tools.kb-float button { height: 38px; min-width: 40px; color: var(--muted); font-size: 18px; }
.ed-tools.kb-float button.main, .ed-tools.kb-float .tb-type { color: var(--text); }
.ed-tools.kb-float .lbl { display: none; }
.ed-tools.kb-float .ed-palette { border-top: 1px solid var(--line); margin-top: 4px; padding: 8px 2px 4px; }
.ed-tools.kb-float .ed-sep { display: none; }
[data-theme="light"] .ed-tools.kb-float { box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.1); }
.ed-tools-slot { flex: none; }

/* ---------- cap91 ---------- */
/* menu de gauche : titres Favoris / Dossiers qui se replient (chevron juste après le mot), + à droite */
.nm-sect { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.nm-sect .nm-schev { font-size: 13px; color: var(--faint); transform: rotate(90deg); transition: transform .18s; }
.nm-fold:not(.open) .nm-sect .nm-schev { transform: rotate(0deg); }
.nm-fold:not(.open) + .nm-card { display: none; }
.nm-sec .nx-secbtn { width: 30px; height: 30px; font-size: 17px; color: var(--muted); border-radius: 8px; }
.nm-sec .nx-secbtn:hover, .nm-sec .nx-secbtn:active { background: rgba(var(--ov), 0.08); color: var(--text); }
.side .nm-sec .nx-secbtn, .drawer .nm-sec .nx-secbtn { margin: -8px -2px -8px 0; }
/* dossiers verrouillés : un dossier qui s'ouvre et se ferme, les dossiers protégés dedans */
.nm-lockgrp .nm-gchev { margin-left: auto; color: var(--faint); font-size: 14px; flex: none; transition: transform .18s; }
.nm-lockgrp.open .nm-gchev { transform: rotate(90deg); }
.nm-lockgrp .nm-cnt { margin-left: auto; }
.nm-lockgrp .nm-cnt + .nm-gchev { margin-left: 6px; }
.nm-lockgrp:not(.open) + .nm-lockset { display: none; }
.nm-lockset { display: grid; }
.nm-lockset .nm-f { padding-left: 34px; }
.side .nm-lockset .nm-f { padding-left: 30px; }
.nm-lockset .nm-f, .nm-lockset .nm-lockhint { border-top: 1px solid var(--line2); }
.nm-lockhint { padding: 10px 14px 10px 34px; font-size: 13px; color: var(--faint); }
/* menu du téléphone : un trait fin sous la tête */
.drawer .dr-head { border-bottom: 1px solid var(--line2); padding-bottom: 14px; margin-bottom: 2px; }
/* rappels récurrents : le titre ouvre et ferme la liste */
.side-card.habits .hab-fold { flex: 1; justify-content: flex-start; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; font-size: 11.5px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.side-card.habits .hab-fold .hab-chev { font-size: 12px; opacity: .8; transform: rotate(90deg); transition: transform .18s; }
.side-card.habits.shut .hab-fold .hab-chev { transform: rotate(0deg); }
.side-card.habits.shut > :not(.side-head) { display: none; }
.side-card.habits.shut .side-head { margin-bottom: 0; }
/* réglages : « Aide », un simple mot avant les rubriques */
.sx-help { display: block; border: 0; background: none; padding: 4px 6px 12px; font: inherit; font-size: 16px; font-weight: 650; color: var(--accent); cursor: pointer; text-align: left; }
@media (hover: hover) { .sx-help:hover { text-decoration: underline; text-underline-offset: 3px; } }
.sx.wide .sx-help { padding: 2px 10px 10px; }
.help-ta { min-height: 140px; resize: vertical; font: inherit; line-height: 1.45; }

/* ---------- cap92 ---------- */
/* menu de gauche : titres un peu plus grands ; plus d'air sous « Dossiers », moins sous « Favoris » */
.side .nm-sec, .drawer .nm-sec { font-size: 16.5px; }
.drawer .nm-sec { font-size: 17.5px; }
.nm-fold[data-k="folders"] { padding-bottom: 10px; }
.drawer .nm-fold[data-k="folders"] { padding-bottom: 12px; }
.nm-fold[data-k="fav"] { padding-bottom: 0; }
.nm-fold[data-k="fav"] + .nm-favs { margin-top: -4px; }
.drawer .nm-fold[data-k="fav"] + .nm-favs { margin-top: -6px; }
/* la tête : le cercle (et le fond) prend la couleur de la page où l'on est, aussi dans le menu de gauche */
body { --macc: #9B6CF0; }
body.mode-cal { --macc: #4C8DF6; }
body.mode-fin { --macc: #3FB27F; }
body.mode-notes { --macc: #B8763A; }
body.mode-inbox { --macc: #E5534B; }
body.mode-chat { --macc: #1FA39A; }
.side .dr-av .av, .drawer .dr-av .av { outline-color: var(--macc); background: color-mix(in srgb, var(--macc) 75%, #333); }
/* rappels récurrents et pause : fermés, une seule ligne (les cartes ne s'étirent plus à la même hauteur) */
.top-side { align-items: start; }
.side-card.tmr .tmr-fold { flex: 0 1 auto; justify-content: flex-start; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; font-size: 11.5px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; color: inherit; }
.side-card.tmr .tmr-fold .hab-chev { font-size: 12px; opacity: .8; transform: rotate(90deg); transition: transform .18s; }
.side-card.tmr.shut .tmr-fold .hab-chev { transform: rotate(0deg); }
.side-card.tmr.shut > :not(.side-head), .side-card.tmr.shut .tmr-presets { display: none; }
.side-card.tmr.shut .side-head { margin-bottom: 0; }
.tmr-mini { display: none; margin-left: 8px; font-variant-numeric: tabular-nums; letter-spacing: .02em; text-transform: none; }
.side-card.tmr.shut .tmr-mini:not(:empty) { display: inline; }
.side-card.habits.shut, .side-card.tmr.shut { padding-top: 8px; padding-bottom: 8px; }
/* note d'une action (ordinateur) : la barre n'apparaît que pendant qu'on écrit, sous le texte */
.ed-wrap.ed-ftools > .ed-tools { display: none; position: sticky; top: auto; bottom: 0; margin: 10px 0 0; z-index: 3; box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.18); }
.ed-wrap.ed-ftools.ed-on > .ed-tools { display: flex; }
/* réglages : Aide et invitation tout en bas du menu, sous un trait fin, en texte simple */
.sx-links { display: grid; border-top: 1px solid var(--line2); margin-top: 6px; padding: 6px 0 2px; }
.sx.wide .sx-links { margin-top: 10px; }
.sx.phone .sx-links { margin: 4px 6px 0; }
.inv-ta { min-height: 120px; resize: vertical; font: inherit; line-height: 1.45; }
.form .row a.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; color: inherit; }
/* Messages : Aide (Dragon Team) */
.av.av-team { background: #111; }
.av.av-team img { object-fit: cover; }
.av.av-xs { width: 18px; height: 18px; font-size: 10px; }
.cx-sec { display: flex; align-items: center; gap: 8px; padding: 14px 14px 6px; font-size: 12px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cx-sec .cx-rb { margin-left: auto; }
.cx-help-none { padding: 4px 14px 10px; font-size: 13px; }

/* ---------- cap93 ---------- */
/* menu de gauche : titres un peu plus petits ; de l'air sous « Dossiers » et « Dossiers verrouillés » (le + ne l'annule plus) */
.side .nm-sec, .drawer .nm-sec { font-size: 15.5px; }
.drawer .nm-sec { font-size: 16px; }
.side .nm-sec.nm-fold[data-k="folders"], .drawer .nm-sec.nm-fold[data-k="folders"], .nm-sec.nm-fold[data-k="folders"],
.side .nm-sec.nm-fold[data-k="locked"], .drawer .nm-sec.nm-fold[data-k="locked"], .nm-sec.nm-fold[data-k="locked"] { padding-bottom: 12px; }
.nm-fold:not(.open) + .nm-card.nm-locked { display: none; }
.nm-locked .nm-lockhint { padding: 11px 14px; border-top: 0; }
.side .nm-locked .nm-lockhint { padding: 9px 12px; font-size: 12.5px; }
/* réglages : Aide et invitation comme les autres rubriques (même couleur, une icône) */
.sx-links .sx-link { width: 100%; border: 0; background: none; font-family: inherit; font-weight: 400; cursor: pointer; }
.sx-links .sx-link:hover { background: rgba(var(--ov), 0.06); }
.sx.phone .sx-links { margin: 0; padding: 4px 0 0; }
/* pause : 1 min, 45, 90 sur une ligne sous le titre */
.side-card.tmr > .tmr-presets { margin: 2px 0 8px; }
/* Messages : le petit H des conversations d'aide */
.cx-hb { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: 6px; border-radius: 5px; background: #1FA39A; color: #fff; font-size: 10.5px; font-weight: 800; vertical-align: 1px; letter-spacing: 0; }
.cx-row.sel .cx-hb { background: #fff; color: #1FA39A; }
/* mots de passe : l'œil pour voir ce qu'on écrit */
.pw-wrap { position: relative; display: block; }
.pw-wrap:has(> input[hidden]) { display: none; }
.pw-wrap > input { width: 100%; padding-right: 44px; }
.auth-card .pw-wrap > input { padding-left: 44px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: none; border-radius: 8px; color: var(--muted); font-size: 18px; cursor: pointer; }
.pw-eye:hover { color: var(--text); background: rgba(var(--ov), 0.06); }
/* téléphone : la roue et la loupe du menu un peu plus grandes et plus espacées */
.drawer .dr-head .dr-gearb, .drawer .dr-head .dr-loupe { width: 44px; height: 44px; font-size: 23px; }
.drawer .dr-head { gap: 10px; }
.drawer .dr-head .dr-av { margin-right: 6px; }
.inv-ta { min-height: 230px; font-size: 14px; }
.inv-lang { justify-self: start; }

/* ---------- cap94 ---------- */
/* fonds noirs (thème sombre) : la conversation et le fil des commentaires dans Messages, la 3e colonne des réglages,
   et le panneau des commentaires d'une note */
:root:not([data-theme="light"]) .cx.wide .cx-panel { background: var(--bg); }
:root:not([data-theme="light"]) .sx.wide .sx-body { background: var(--bg); }
:root:not([data-theme="light"]) .sx.wide .sx-body .set-card { background: var(--bg2); }
:root:not([data-theme="light"]) .nx-wrap.cm-on .cm-panel { background: var(--bg); color: var(--text); }
:root:not([data-theme="light"]) .cm-th { background: #1f1f1f; border-color: var(--line2); }
/* Dossiers verrouillés : explication */
.lk-info p { margin: 0; line-height: 1.5; }
.lk-info .lk-h { font-weight: 700; margin-top: 4px; }
.lk-info ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; line-height: 1.45; color: var(--muted); }
.set-bk { margin-top: 10px; }
.set-bk.bad { color: var(--danger); }

/* cap95 : emails de Dragon (mot de passe oublié, invitations envoyées par Dragon, état dans les réglages) */
.auth-forgot { justify-self: center; margin-top: 2px; }
.auth-card p.auth-sent { color: var(--text); }
.inv-send { flex-wrap: nowrap; }
.inv-send .inp { flex: 1; min-width: 0; }
.set-bk-btn { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font: inherit; padding: 0; background: none; border: 0; cursor: pointer; }

/* cap97 : menu de ligne en grille (une rangée d'icônes par sous-partie) */
.ctx-menu.gm { min-width: 0; padding: 6px 8px; gap: 0; }
.gm-row { display: flex; align-items: center; gap: 8px; padding: 3px 0; }
.gm-row + .gm-row { border-top: 1px solid var(--line); }
.gm-lbl { width: 62px; flex: none; font-size: 11.5px; font-weight: 650; color: var(--faint); }
.gm-items { display: flex; align-items: center; gap: 1px; }
.gm-b { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; color: var(--text); background: none; border: 0; padding: 0; cursor: pointer; font-size: 16px; }
.gm-b:hover { background: rgba(var(--ov), .09); }
.gm-b.on { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent); }
.gm-b.danger { color: #e5534b; }
.gm-b.danger:hover { background: rgba(229, 83, 75, .12); }
.gm-t { font-weight: 700; font-size: 13px; line-height: 1; }
.gm-t.b { font-weight: 800; font-size: 14px; }
.gm-t.it { font-style: italic; font-family: Georgia, 'Times New Roman', serif; font-size: 15px; font-weight: 600; }
.gm-t.u { text-decoration: underline; text-underline-offset: 2px; }
.gm-t.st { text-decoration: line-through; }
.gm-dot { width: 17px; height: 17px; border-radius: 50%; background: var(--c); display: grid; place-items: center; }
.gm-dot.ink { background: none; color: var(--c); font-weight: 800; font-size: 15px; width: auto; height: auto; }
.gm-dot.mark { border-radius: 5px; }
.gm-dot.bg { border-radius: 5px; background: color-mix(in srgb, var(--c) 45%, transparent); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); }
.gm-touch { padding: 0 14px 14px; display: grid; }
.gm-touch .gm-row { flex-direction: column; align-items: flex-start; gap: 6px; padding: 9px 0; }
.gm-touch .gm-lbl { width: auto; font-size: 12px; }
.gm-touch .gm-items { flex-wrap: wrap; gap: 6px; }
.gm-touch .gm-b { width: 40px; height: 40px; font-size: 18px; background: rgba(var(--ov), .06); }
.gm-touch .gm-dot { width: 22px; height: 22px; }

/* cap97 : couverture d'une note (bandeau image en haut, comme Notion) */
.cv { display: none; }
.cv.on { display: block; position: relative; height: 210px; overflow: hidden; }
.cv-pic { position: absolute; inset: 0; overflow: hidden; }
.cv-pic img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; -webkit-user-drag: none; }
.cv-btns { position: absolute; right: 16px; bottom: 12px; display: flex; gap: 6px; opacity: 0; transition: opacity .15s; }
.cv:hover .cv-btns, .cv:focus-within .cv-btns { opacity: 1; }
.cv-btn { background: rgba(255, 255, 255, .94); color: #37352f; border: 0; border-radius: 6px; padding: 5px 10px; font-size: 12.5px; font-weight: 600; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); cursor: pointer; }
.cv-btn:hover { background: #fff; }
.cv-btn.primary { background: var(--accent); color: #fff; }
.cv-cr { position: absolute; left: 12px; bottom: 10px; max-width: 55%; font-size: 11px; color: rgba(255, 255, 255, .92); text-shadow: 0 1px 3px rgba(0, 0, 0, .7); opacity: 0; transition: opacity .15s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv:hover .cv-cr { opacity: 1; }
.cv.cv-move .cv-pic { cursor: grab; touch-action: none; }
.cv.cv-move .cv-pic:active { cursor: grabbing; }
.cv.cv-move .cv-btns, .cv.cv-move .cv-cr { display: none; }
.cv-bar { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; gap: 6px; align-items: center; background: rgba(0, 0, 0, .6); padding: 6px 6px 6px 12px; border-radius: 8px; color: #fff; font-size: 12.5px; white-space: nowrap; }
.cv-hint { margin-right: 4px; }
/* la couverture prend toute la largeur, au-dessus du titre */
.nx-scroll > .cv.on { margin: -14px -32px 4px; }
.sheet-scroll > .cv.on { margin: -14px -20px 4px; height: 170px; }
.pad-wrap { position: relative; }
.pad-wrap > .cv.on { margin: -2px -14px 0; height: 150px; border-radius: 9px 9px 0 0; }
/* « Ajouter une couverture » : au survol, au-dessus du titre (comme Notion) */
.cv-addrow { height: 30px; display: flex; align-items: center; }
.cv-addrow:not(:has(> .cv-add:not([hidden]))) { display: none; }
.cv-addrow { gap: 4px; }
.cv-addrow .cv-add + .cv-add { margin-left: 0; }
.cv-add { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--faint); padding: 4px 8px; margin-left: -8px; border-radius: 6px; opacity: 0; transition: opacity .15s; background: none; border: 0; cursor: pointer; }
.cv-add .i { font-size: 15px; }
.nx-doc:hover .cv-add, .sheet-scroll:hover .cv-add, .pad-wrap:hover .cv-add, .cv-add:focus-visible { opacity: 1; }
.cv-add:hover { background: rgba(0, 0, 0, .05); color: var(--muted); }
.pad-cv { position: absolute; top: 6px; right: 10px; height: auto; z-index: 3; }
.pad-cv .cv-add { margin-left: 0; background: rgba(255, 255, 255, .9); }
@media (pointer: coarse) {
  .cv:hover .cv-btns, .cv:hover .cv-cr { opacity: 0; }
  .cv.show .cv-btns, .cv.show .cv-cr { opacity: 1; }
  .cv.on { height: 150px; }
  .cv-addrow:not(.pad-cv) { display: none; }
  .pad-cv .cv-add { opacity: .6; padding: 6px; }
  .pad-cv .cv-add span { display: none; }
}
/* choisir une couverture */
.sheet.cvp .cvp-head, .sheet.cvp .cvp-tabs, .sheet.cvp .cvp-body { margin-left: 16px; margin-right: 16px; }
.cvp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cvp-head .menu-title { padding-left: 0; padding-right: 0; }
.cvp-del { color: #e5534b; }
.cvp-tabs { margin-top: 2px; margin-bottom: 10px; align-self: flex-start; }
.cvp-body { overflow-y: auto; min-height: 200px; padding-bottom: 16px; }
.cvp-q { width: 100%; }
.cvp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cvp-chips .chip { cursor: pointer; background: none; }
.cvp-chips .chip:hover { color: var(--text); border-color: var(--muted); }
.cvp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 12px; }
.cvp-img { aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; padding: 0; border: 0; background: rgba(var(--ov), .07); cursor: pointer; position: relative; }
.cvp-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cvp-img:hover { outline: 2px solid var(--accent); outline-offset: 1px; }
.cvp-img.busy { opacity: .45; pointer-events: none; }
.cvp-msg { margin-top: 10px; }
.cvp-msg:empty { display: none; }
.cvp-more { display: block; margin: 12px auto 0; }
.cvp-src { margin-top: 12px; font-size: 11.5px; }
.cvp-sws { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.cvp-sw { aspect-ratio: 16 / 9; border-radius: 8px; border: 1px solid var(--line2); cursor: pointer; padding: 0; }
.cvp-sw:hover { outline: 2px solid var(--accent); outline-offset: 1px; }
.cvp-up { display: grid; gap: 10px; justify-items: start; padding: 6px 0; }

/* cap97 : sections du menu des notes (comme « Dossiers ») */
.nx-sectools { display: inline-flex; align-items: center; gap: 2px; }
.side .nm-sec .nx-sectools, .drawer .nm-sec .nx-sectools { margin: -8px -2px -8px 0; }
.nm-sec .nx-sectools .nx-secbtn, .side .nm-sec .nx-sectools .nx-secbtn, .drawer .nm-sec .nx-sectools .nx-secbtn { margin: 0; }
.nm-sec .nx-secmore { opacity: 0; transition: opacity .15s; }
.nm-sec:hover .nx-secmore, .nm-sec .nx-secmore:focus-visible { opacity: 1; }
@media (pointer: coarse) { .nm-sec .nx-secmore { opacity: .7; } }
.side .nm-sec.nm-fold.nm-usec, .drawer .nm-sec.nm-fold.nm-usec, .nm-sec.nm-fold.nm-usec { padding-bottom: 12px; }

/* cap98 : barre grise du haut d'une note : projet, actions, hashtags à gauche ; date (historique) et Partager à droite */
.nx-bar .nb-left { min-width: 0; flex: 1; overflow: hidden; }
.nx-bar .nlink-row, .nb-links .nlink-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0; padding: 0; }
.nx-bar .nlink-row::-webkit-scrollbar, .nb-links .nlink-row::-webkit-scrollbar { display: none; }
.nx-bar .nb-right { flex: none; }
.nx-edited { font-size: 12.5px; color: var(--faint); background: none; border: 0; padding: 5px 8px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.nx-edited:hover { background: rgba(0, 0, 0, .06); color: var(--muted); }
.nx-sharebtn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--muted); background: none; border: 0; cursor: pointer; white-space: nowrap; }
.nx-sharebtn .i { font-size: 16px; }
.nx-sharebtn:hover { background: rgba(0, 0, 0, .06); color: var(--text); }
.nx-sharebtn.on, .icon-btn.on { color: var(--accent); }
.nb-links { padding: 0 14px 8px; }
/* historique des versions */
@media (min-width: 900px) { .sheet.hs-sheet { width: min(1040px, 96vw); } }
.hs { display: grid; grid-template-columns: 250px 1fr; flex: 1; min-height: 0; border-top: 1px solid var(--line); }
.hs-list { overflow-y: auto; border-right: 1px solid var(--line); padding: 8px; display: grid; align-content: start; gap: 2px; }
.hs-row { display: grid; gap: 2px; text-align: left; width: 100%; padding: 8px 10px; border-radius: 8px; background: none; border: 0; cursor: pointer; color: var(--text); }
.hs-row:hover { background: rgba(var(--ov), .06); }
.hs-row.on { background: color-mix(in srgb, var(--accent) 20%, transparent); }
.hs-when { font-weight: 650; font-size: 13.5px; }
.hs-sub { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-empty { padding: 10px; }
.hs-prev { overflow-y: auto; padding: 0 26px 40px; background: #fff; color: #1f1f1f; --text: #1f1f1f; --muted: #6b6862; --faint: #a19d96; --line: rgba(0, 0, 0, 0.08); --panel: #fff; border-radius: 0 0 16px 0; }
.hs-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: 0; background: #fff; padding: 12px 0 8px; z-index: 1; }
.hs-date { font-size: 12.5px; color: #8a867f; }
.hs-title { font-size: 26px; font-weight: 700; margin: 6px 0 10px; }
.hs-doc a { color: #1a5fd0; }
.hs-doc hr { background: rgba(0, 0, 0, .3); }
@media (max-width: 700px) {
  .hs { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .hs-list { max-height: 32vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .hs-prev { border-radius: 0; padding: 0 18px 30px; }
}
/* Unsplash : nom du photographe sur chaque photo, et sous la couverture */
.cvp-by { position: absolute; left: 7px; right: 7px; bottom: 5px; font-size: 10.5px; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .85); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; pointer-events: none; }
.cv-cr a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* ----- Comme Notion : pages dans les pages, icônes, encadrés, citations, colonnes, code, sommaire ----- */
/* Icône de la page, au-dessus du titre ; elle mord sur la couverture */
.nic { display: inline-flex; align-items: center; justify-content: center; flex: none; line-height: 1; }
.nic.img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.nic-wrap:not(.on) { display: none; }
.nic-wrap { margin: 4px 0 2px; position: relative; z-index: 2; }
.cv.on + .nx-doc .nic-wrap, .cv.on ~ .nic-wrap, .sheet-scroll > .cv.on + .nic-wrap { margin-top: -46px; }
.nic-btn { padding: 2px; border-radius: 8px; line-height: 1; }
.nic-btn:hover { background: rgba(0, 0, 0, .05); }
.nic-big { font-size: 64px; width: 78px; height: 78px; }
.nic-big.img { width: 72px; height: 72px; }
/* Arbre des pages dans la liste des notes */
.nx-tw { flex: none; width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; color: var(--faint); margin-left: -4px; }
.nx-tw .i, .nx-tw svg { font-size: 12px; transition: transform .15s; }
.nx-tw.open svg { transform: rotate(90deg); }
.nx-tw:not(.none):hover { background: rgba(var(--ov), .1); color: var(--text); }
.nx-tw.none { visibility: hidden; }
.nx-nic { font-size: 15px; width: 18px; height: 18px; }
.nx-nic.img { width: 17px; height: 17px; }
.nx-note.sub { padding-left: calc(10px + var(--dp, 0) * 16px); }
.nm-row.sub { padding-left: calc(14px + var(--dp, 0) * 18px); }
.nm-l1 .nx-tw { width: 26px; height: 26px; margin-left: -6px; }
.nm-l1 .nx-tw svg { font-size: 14px; }
/* Fil d'Ariane d'une sous-page */
.nx-crumbs { display: flex; align-items: center; gap: 2px; min-width: 0; flex: 0 1 auto; overflow: hidden; margin-right: 6px; }
.nx-crumb { display: inline-flex; align-items: center; gap: 5px; max-width: 200px; padding: 3px 6px; border-radius: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.nx-crumb > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.nx-crumb:hover { background: rgba(0, 0, 0, .06); color: var(--text); }
.nx-crsep { color: var(--faint); font-size: 13px; }
.nx-cric { font-size: 14px; width: 16px; height: 16px; }
.nb-links .nx-crumbs { width: 100%; margin: 0 0 4px; }
/* Lien vers une sous-page */
.editor .pglink { margin: 1px 0; user-select: none; }
.editor .pglink .pg-a { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 3px 6px 3px 4px; margin-left: -4px; border-radius: 5px; color: inherit !important; text-decoration: none; font-weight: 550; cursor: pointer; }
.editor .pglink .pg-a:hover { background: rgba(0, 0, 0, .06); }
.editor .pglink .pg-t { border-bottom: 1px solid color-mix(in srgb, currentColor 30%, transparent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor .pglink .pg-ic { font-size: 1.15em; width: 1.3em; height: 1.3em; color: var(--muted); }
.editor .pglink .pg-ic svg { font-size: 1.05em; }
.editor .pglink.gone .pg-t { color: var(--faint); border-bottom-style: dashed; }
/* Encadré (callout) : une icône, du texte, et ce qu'il contient */
.editor .tgl[data-k="co"] { display: block; padding: 14px 16px 14px 14px; margin: 6px 0; border-radius: 6px; border: 1px solid color-mix(in srgb, currentColor 13%, transparent); }
.editor .tgl[data-k="co"][data-c] { border-color: transparent; }
.editor .tgl[data-k="co"] > .tgl-h { padding-left: 34px; font-weight: inherit; min-height: 1.5em; cursor: text !important; }
.editor .tgl[data-k="co"] > .tgl-h::before { content: var(--ce, "💡"); position: absolute; left: 2px; top: 0; width: 22px; height: 22px; border: 0; transform: none !important; font-size: 1.2em; line-height: 1.25; text-align: center; background: none; }
.editor .tgl[data-k="co"][data-if] > .tgl-h::before { content: ""; top: 1px; background: var(--ci) center / contain no-repeat; }
.editor .tgl[data-k="co"] > .tgl-b { padding-left: 34px; }
.editor .tgl[data-k] > .tgl-b:empty { display: none; }
/* Citation */
.editor .tgl[data-k="q"] { display: block; margin: 6px 0; padding: 2px 0 2px 16px; border-left: 3px solid currentColor; border-radius: 0; }
.editor .tgl[data-k="q"] > .tgl-h { padding-left: 0; font-weight: inherit; font-size: 1.12em; cursor: text !important; }
.editor .tgl[data-k="q"] > .tgl-h::before { display: none; }
.editor .tgl[data-k="q"] > .tgl-b { padding-left: 0; }
/* Titres déroulants */
.editor .tgl[data-h] > .tgl-h { font-weight: 750; letter-spacing: -0.01em; line-height: 1.3; }
.editor .tgl[data-h="1"] > .tgl-h { font-size: 1.75em; padding-top: .45em; }
.editor .tgl[data-h="2"] > .tgl-h { font-size: 1.4em; padding-top: .4em; }
.editor .tgl[data-h="3"] > .tgl-h { font-size: 1.17em; padding-top: .3em; }
.editor .tgl[data-h] > .tgl-h::before { top: calc(.45em + .2em); }
.editor .tgl[data-h="1"] > .tgl-h::before { top: calc(.45em + .55em); }
.editor .tgl[data-h="2"] > .tgl-h::before { top: calc(.4em + .4em); }
/* Colonnes côte à côte (sur téléphone, l'une sous l'autre) */
.editor .cols { display: flex; gap: 28px; margin: 4px 0; align-items: flex-start; }
.editor .cols > .tgl-b { flex: 1 1 0; min-width: 0; padding-left: 0; }
@media (max-width: 640px) { .editor .cols { flex-direction: column; gap: 4px; } .editor .cols > .tgl-b { width: 100%; } }
/* Code */
.editor pre { margin: 6px 0; padding: 14px 16px; border-radius: 6px; background: color-mix(in srgb, currentColor 6%, transparent); font: 13.5px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; tab-size: 2; }
.editor code { font: .86em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: .12em .35em; border-radius: 4px; background: color-mix(in srgb, currentColor 8%, transparent); color: #eb5757; }
.editor pre code { padding: 0; background: none; color: inherit; font-size: inherit; }
/* Légende sous une image */
.editor .cap { font-size: .82em; color: var(--muted); margin: -2px 0 6px; }
/* Images comme Notion : l'image seule ; sur ordinateur, ses boutons apparaissent au survol, posés sur l'image */
.nx-doc .editor .att.k-img, .sheet.paper .editor .att.k-img { border: 0; background: none; padding: 0; overflow: visible; }
.nx-doc .editor .att.k-img .att-img img, .sheet.paper .editor .att.k-img .att-img img { border-radius: 4px; max-width: 100%; }
@media (hover: hover) and (pointer: fine) {
  .nx-doc .editor .att.k-img, .sheet.paper .editor .att.k-img { position: relative; }
  .nx-doc .editor .att.k-img .att-bar, .sheet.paper .editor .att.k-img .att-bar { position: absolute; top: 8px; right: 8px; left: auto; max-width: calc(100% - 16px); background: rgba(25, 25, 25, .72); color: #fff; border-radius: 6px; padding: 3px 6px; opacity: 0; transition: opacity .15s; }
  .nx-doc .editor .att.k-img .att-bar a, .nx-doc .editor .att.k-img .att-bar button, .sheet.paper .editor .att.k-img .att-bar a, .sheet.paper .editor .att.k-img .att-bar button { color: #fff !important; }
  .nx-doc .editor .att.k-img:hover .att-bar, .sheet.paper .editor .att.k-img:hover .att-bar { opacity: 1; }
}
/* Sommaire */
.editor .toc { display: flex; flex-direction: column; margin: 4px 0; user-select: none; }
.editor .toc .toc-l { color: var(--muted) !important; text-decoration: none; padding: 3px 4px; border-radius: 4px; font-size: .92em; border-bottom: 0; }
.editor .toc .toc-l:hover { background: rgba(0, 0, 0, .05); }
.editor .toc .toc-l[data-lv="2"] { padding-left: 22px; }
.editor .toc .toc-l[data-lv="3"] { padding-left: 40px; }
.editor .toc .toc-empty { color: var(--faint); font-size: .9em; }
.cv-add[hidden] { display: none; }
