/* to.do : clair et sombre automatiques, un seul accent, couleurs de domaine sur pastilles et barres seulement. */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg2: #f6f7f9;
  --card: #f1f2f4;
  --hover: #f3f4f6;
  --line: #e9eaee;
  --text: #1d1e21;
  --muted: #6b6f78;
  --faint: #a2a6ae;
  --accent: #2f6fe4;
  --accent-bg: #e8f0fd;
  --green: #2f9e5b;
  --orange: #d9822b;
  --orange-bg: #fdf1e4;
  --red: #d14343;
  --shadow: 0 6px 24px rgba(20, 22, 28, 0.12);
  /* palette des domaines et des tags */
  --c-blue: #3b7ddd; --c-teal: #1f9e9a; --c-green: #3c9d4e; --c-lime: #8aa628; --c-amber: #d5a021;
  --c-orange: #e07b32; --c-red: #d6504d; --c-pink: #d35b97; --c-purple: #8a63d2; --c-slate: #5f6b7a;
  --radius: 10px;
  --fs: 15px;
  --fs-meta: 13px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141518;
    --bg2: #1a1c20;
    --card: #202227;
    --hover: #1e2024;
    --line: #2a2d33;
    --text: #ececee;
    --muted: #9a9ea8;
    --faint: #6a6e77;
    --accent: #5b8ff0;
    --accent-bg: #1d2a44;
    --green: #4cbb79;
    --orange: #eb9a4b;
    --orange-bg: #3a2a1a;
    --red: #ef6b6b;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    --c-blue: #5b95ea; --c-teal: #3bbab5; --c-green: #5dba6d; --c-lime: #a8c245; --c-amber: #e3b744;
    --c-orange: #ee9152; --c-red: #ec6f6b; --c-pink: #e37db0; --c-purple: #a585e6; --c-slate: #93a0b0;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--fs)/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-weight: 400;
}
b, strong, h1, h2, h3, h4, .medium { font-weight: 500; }
h1, h2, h3, h4 { margin: 0; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
a { color: inherit; text-decoration: none; }
a.link, .notes-view a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.meta { font-size: var(--fs-meta); color: var(--muted); }
.spacer { flex: 1; }

/* ---------- Barre du haut / navigation ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 24px;
  padding: 10px 24px; background: var(--bg);
}
.brand { font-weight: 500; font-size: 17px; letter-spacing: -0.2px; }
.nav { display: flex; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; color: var(--muted); }
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a.active { color: var(--text); background: var(--card); }
.nav-ico { display: none; }
.badge { font-size: 12px; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; text-align: center; line-height: 18px; }
.topbar-right { margin-left: auto; display: flex; gap: 4px; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 8px; color: var(--muted); font-size: 17px; }
.icon-btn:hover, .icon-btn.active { background: var(--hover); color: var(--text); }

.offline { margin: 0 24px 8px; padding: 8px 12px; border-radius: 8px; background: var(--orange-bg); color: var(--orange); font-size: var(--fs-meta); }

/* ---------- Saisie rapide ---------- */
.qa { position: relative; max-width: 1240px; margin: 4px auto 0; padding: 0 24px; }
.qa-row { display: flex; align-items: center; gap: 6px; }
#qa-input {
  flex: 1; min-height: 44px; padding: 10px 14px; border: 0; border-radius: var(--radius);
  background: var(--card); outline: none;
}
#qa-input:focus { box-shadow: 0 0 0 2px var(--accent) inset; }
.qa-close { display: none; }
.qa-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; min-height: 0; }
.qa-chips:empty { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px;
  background: var(--card); font-size: var(--fs-meta); color: var(--text); min-height: 26px;
}
.chip .x { color: var(--faint); }
.chip:hover .x { color: var(--text); }
.chip.ctx { color: var(--muted); }
.qa-error { margin-top: 6px; color: var(--red); font-size: var(--fs-meta); }
.qa-sugg, .menu {
  background: var(--bg); border-radius: var(--radius); box-shadow: var(--shadow); padding: 4px; z-index: 60;
}
.qa-sugg { position: absolute; left: 24px; right: 24px; top: 48px; max-width: 520px; }
.sugg-item, .menu-item {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 7px; min-height: 36px;
}
.sugg-item.on, .menu-item.on, .menu-item:hover { background: var(--accent-bg); }
.menu-item .hint { margin-left: auto; color: var(--muted); font-size: var(--fs-meta); }
.menu-item .check-mark { width: 16px; color: var(--accent); }
.menu-item.danger { color: var(--red); }
.menu-item[disabled] { opacity: 0.5; cursor: default; }

/* ---------- Mise en page ---------- */
main { max-width: 1240px; margin: 0 auto; padding: 16px 24px 120px; }
.loading { color: var(--muted); padding: 40px 0; }
.page-head { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px 20px; margin: 8px 0 20px; }
.page-head .sub { color: var(--muted); }
.head-nav { display: flex; gap: 4px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 34px; padding: 6px 12px; border-radius: 8px; background: var(--card); color: var(--text); white-space: nowrap;
}
.btn:hover { background: var(--line); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: none; color: var(--muted); }
.btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.small { min-height: 28px; padding: 3px 9px; font-size: var(--fs-meta); }
.btn.danger { color: var(--red); }
.btn[disabled] { opacity: 0.45; cursor: default; }
.seg { display: inline-flex; background: var(--card); border-radius: 8px; padding: 2px; }
.seg button { padding: 4px 12px; border-radius: 6px; color: var(--muted); min-height: 30px; font-size: 14px; }
.seg button.on { background: var(--bg); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); }
.section { margin-top: 28px; }
.section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.section-title h2, .section-title h3 { font-size: 15px; }
.count { color: var(--muted); font-size: var(--fs-meta); }
.empty { color: var(--muted); padding: 14px 0; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 24px 0 8px; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); cursor: pointer; min-height: 30px; }

/* progression */
.bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 3px; background: var(--green); }
.bar.thin { height: 4px; }
.week-progress { margin-left: auto; min-width: 180px; text-align: right; }
.week-progress .bar { margin-top: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; background: var(--faint); }
.c-blue { --dc: var(--c-blue); } .c-teal { --dc: var(--c-teal); } .c-green { --dc: var(--c-green); }
.c-lime { --dc: var(--c-lime); } .c-amber { --dc: var(--c-amber); } .c-orange { --dc: var(--c-orange); }
.c-red { --dc: var(--c-red); } .c-pink { --dc: var(--c-pink); } .c-purple { --dc: var(--c-purple); } .c-slate { --dc: var(--c-slate); }
.dot[class*="c-"] { background: var(--dc); }
.bar[class*="c-"] > span { background: var(--dc); }

/* ---------- Semaine ---------- */
.week-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; }
.focus-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.focus-card {
  background: var(--card); border-radius: var(--radius); padding: 12px 14px; min-height: 76px; text-align: left;
  display: flex; flex-direction: column; gap: 4px;
}
.focus-card .lbl { font-size: var(--fs-meta); color: var(--muted); }
.focus-card .ttl { font-weight: 500; }
.focus-card.done .ttl { text-decoration: line-through; color: var(--muted); }
.focus-card.empty-card { color: var(--muted); }
.focus-card.empty-card .ttl { font-weight: 400; color: var(--accent); }
.overdue { margin-top: 24px; }
.overdue .section-title h2 { color: var(--orange); }
.group { margin-top: 22px; }
.group-head { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.group-head .gtitle { font-weight: 500; }
.group-head .mini { width: 60px; }
.group-head .gcount { font-size: var(--fs-meta); color: var(--muted); }
.day-cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.day-col { min-width: 0; }
.day-col .group-head { border-bottom: 0; }
.day-col.today .gtitle { color: var(--accent); }
.day-details > summary { list-style: none; cursor: pointer; }
.day-details > summary::-webkit-details-marker { display: none; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: var(--fs-meta); color: var(--muted); background: transparent; min-height: 28px; }
.filter-pill:hover { background: var(--hover); }
.filter-pill.on { background: var(--accent-bg); color: var(--text); }

/* panneau Horizon */
.horizon { display: flex; flex-direction: column; gap: 26px; padding-top: 6px; }
.hz-title { font-size: var(--fs-meta); color: var(--muted); margin-bottom: 10px; }
.hz-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; margin-bottom: 12px; }
.hz-item .name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hz-item .name a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hz-item .pct { font-size: var(--fs-meta); color: var(--muted); }
.hz-item .bar { grid-column: 1 / -1; }
.alert { color: var(--orange); font-size: 14px; display: flex; gap: 8px; align-items: baseline; margin-bottom: 8px; }
.review-card { background: var(--card); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 10px; }

/* ---------- Lignes de tâche ---------- */
.task-list { min-height: 8px; }
.task {
  position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 7px 8px 7px 30px; margin: 0 -8px 0 -30px;
  border-radius: 8px; cursor: default; user-select: none;
}
.task:hover { background: var(--hover); }
.task.cursor { box-shadow: inset 0 0 0 1.5px var(--accent); }
.task.selected { background: var(--accent-bg); }
.task .sel {
  position: absolute; left: 8px; top: 10px; width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--faint); opacity: 0;
}
.task:hover .sel, .task.selected .sel, body.selecting .task .sel { opacity: 1; }
.task.selected .sel { background: var(--accent); border-color: var(--accent); }
.check {
  flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; border: 1.5px solid var(--faint);
  display: grid; place-items: center; font-size: 12px; color: transparent;
}
.check:hover { border-color: var(--green); }
.task.done .check { background: var(--green); border-color: var(--green); color: #fff; }
.t-main { flex: 1; min-width: 0; }
.t-title { cursor: text; overflow-wrap: anywhere; }
.task.done .t-title { text-decoration: line-through; color: var(--muted); }
.t-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 2px; font-size: var(--fs-meta); color: var(--muted); }
.t-meta:empty { display: none; }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 0 7px; border-radius: 999px; background: var(--card); font-size: 12px; line-height: 20px; color: var(--muted); }
.tag .dot { width: 6px; height: 6px; }
.star { color: var(--amber, var(--c-amber)); }
.carry { color: var(--muted); }
.carry.hot { color: var(--orange); }
.t-more { flex: none; width: 28px; height: 24px; border-radius: 6px; color: var(--faint); opacity: 0; }
.task:hover .t-more { opacity: 1; }
.t-more:hover { background: var(--line); color: var(--text); }
.t-actions { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.task .edit-input, .inline-add input {
  width: 100%; border: 0; outline: none; background: transparent; padding: 0; min-height: 22px;
}
.inline-add { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.inline-add .check { border-style: dashed; }
.inline-add.sub { padding-left: 30px; }
.inline-add.sub .check { width: 14px; height: 14px; border-radius: 4px; }
.add-line { color: var(--faint); font-size: 14px; padding: 6px 0; display: block; }
.add-line:hover { color: var(--accent); }
.sortable-ghost { opacity: 0.35; }
.sortable-chosen { background: var(--hover); }

/* ---------- Projets ---------- */
.roadmap { margin-top: 8px; overflow-x: auto; }
.rm-grid { position: relative; display: grid; min-width: 760px; padding-right: 44px; }
.rm-month { font-size: var(--fs-meta); color: var(--muted); padding: 4px 6px; border-left: 1px solid var(--line); text-transform: capitalize; }
.rm-week { font-size: 11px; color: var(--faint); padding: 2px 6px; border-left: 1px solid var(--line); }
.rm-domain { grid-column: 1 / -1; font-size: var(--fs-meta); color: var(--muted); padding: 14px 0 4px; display: flex; gap: 8px; align-items: center; }
.rm-name { padding: 6px 12px 6px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rm-cell { border-left: 1px solid var(--line); }
.rm-bar { position: relative; height: 10px; margin: 13px 0; border-radius: 5px; background: color-mix(in srgb, var(--dc, var(--faint)) 25%, transparent); align-self: center; }
.rm-bar > .rm-fill { position: absolute; inset: 0 auto 0 0; border-radius: 5px; background: var(--dc, var(--faint)); }
.rm-pct { position: absolute; left: calc(100% + 8px); top: -4px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.rm-ms { position: absolute; top: -2px; width: 12px; height: 12px; transform: rotate(45deg); background: var(--bg); border: 2px solid var(--text); }
.rm-ms.done { background: var(--text); }
.rm-today { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1.5px solid var(--accent); pointer-events: none; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pcard { background: var(--card); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.pcard .row { display: flex; align-items: center; gap: 8px; }
.health { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-meta); }
.health::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.health.on_track::before { background: var(--green); }
.health.at_risk::before { background: var(--orange); }
.health.blocked::before { background: var(--red); }
.form-inline { background: var(--card); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; max-width: 620px; }
.field { display: grid; gap: 4px; }
.field > span { font-size: var(--fs-meta); color: var(--muted); }
.input, .form-inline input, .form-inline select, .props input, .props select, .props textarea, .settings input, .settings select {
  width: 100%; min-height: 36px; padding: 6px 10px; border: 0; border-radius: 8px; background: var(--bg); outline: none;
}
.input:focus, .form-inline input:focus, .props input:focus, .props select:focus, .props textarea:focus, .settings input:focus { box-shadow: 0 0 0 2px var(--accent) inset; }
.row-fields { display: flex; gap: 10px; flex-wrap: wrap; }
.row-fields > * { flex: 1 1 160px; }

/* projet */
.p-title { font-size: 22px; font-weight: 500; border: 0; background: transparent; outline: none; width: 100%; padding: 2px 0; }
.props { display: grid; grid-template-columns: 140px 1fr; gap: 6px 16px; align-items: center; max-width: 720px; margin: 12px 0 8px; }
.props > label { font-size: var(--fs-meta); color: var(--muted); }
.props input, .props select, .props textarea { background: transparent; padding: 6px 8px; margin-left: -8px; }
.props input:hover, .props select:hover, .props textarea:hover { background: var(--hover); }
.ms-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.ms-row .diamond { width: 11px; height: 11px; transform: rotate(45deg); border: 1.5px solid var(--muted); flex: none; cursor: pointer; }
.ms-row.done .diamond { background: var(--muted); }
.ms-row.done .ms-title { text-decoration: line-through; color: var(--muted); }
.hist-row { display: flex; gap: 12px; align-items: baseline; padding: 4px 0; }
details.fold > summary { cursor: pointer; list-style: none; color: var(--muted); padding: 6px 0; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: "▸ "; }
details.fold[open] > summary::before { content: "▾ "; }

/* ---------- Revue ---------- */
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; }
.step-pill { font-size: var(--fs-meta); padding: 4px 10px; border-radius: 999px; color: var(--muted); background: var(--card); }
.step-pill.on { background: var(--accent); color: #fff; }
.step-pill.past { color: var(--text); }
.review-foot { display: flex; gap: 10px; margin-top: 28px; align-items: center; }
.task.hot { background: var(--orange-bg); }
.task .t-actions { align-self: center; }
.decide-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px; margin: 0 -8px; border-radius: 8px; }
.decide-row.hot { background: var(--orange-bg); }
.decide-row .t-main { min-width: 200px; }
.hp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; padding: 10px 0; align-items: center; }
.hp-row .note { grid-column: 1 / -1; }
.seg.health-seg button.on.on_track { color: var(--green); }
.seg.health-seg button.on.at_risk { color: var(--orange); }
.seg.health-seg button.on.blocked { color: var(--red); }
.load { padding: 12px 14px; border-radius: var(--radius); background: var(--card); }
.load.over { background: var(--orange-bg); color: var(--orange); }
.focus-slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
textarea.input { min-height: 60px; resize: vertical; background: var(--card); }
input.input { background: var(--card); }

/* ---------- Réglages ---------- */
.settings section { margin-bottom: 36px; max-width: 760px; }
.settings h2 { margin-bottom: 10px; }
.set-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; flex-wrap: wrap; }
.set-row .grow { flex: 1; min-width: 140px; }
.set-row input.inline-name { background: transparent; padding: 4px 8px; margin-left: -8px; }
.set-row input.inline-name:hover { background: var(--hover); }
.swatches { display: inline-flex; gap: 4px; }
.swatch { width: 14px; height: 14px; border-radius: 50%; background: var(--dc); opacity: 0.35; }
.swatch:hover, .swatch.on { opacity: 1; }
.swatch.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--dc); }
.settings input[type="time"], .settings input[type="number"] { width: 110px; background: var(--card); }
.handle { cursor: grab; color: var(--faint); padding: 0 4px; }

/* ---------- Tiroir de détail ---------- */
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 40; background: var(--bg);
  box-shadow: var(--shadow); overflow-y: auto; padding: 16px 22px 40px;
}
.drawer-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.drawer .d-title { font-size: 18px; font-weight: 500; width: 100%; border: 0; outline: none; background: transparent; resize: none; padding: 4px 0; }
.drawer .props { grid-template-columns: 110px 1fr; }
.drawer textarea.notes { min-height: 90px; resize: vertical; width: 100%; border: 0; border-radius: 8px; background: var(--card); padding: 8px 10px; outline: none; }
.notes-view { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; color: var(--muted); margin-top: 4px; }
.sub-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.sub-row .check { width: 16px; height: 16px; border-radius: 4px; }
.sub-row.done .check { background: var(--green); border-color: var(--green); color: #fff; }
.sub-row input { flex: 1; border: 0; outline: none; background: transparent; padding: 2px 0; }
.sub-row.done input { text-decoration: line-through; color: var(--muted); }
.tag-edit { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag-edit .tag button { color: var(--faint); margin-left: 2px; }

/* ---------- Superpositions ---------- */
.menu { position: fixed; min-width: 240px; max-width: min(360px, calc(100vw - 16px)); max-height: min(420px, 70vh); overflow-y: auto; }
.menu:focus { outline: none; }
.menu-title { font-size: var(--fs-meta); color: var(--muted); padding: 6px 10px; }
.menu input.menu-search { width: 100%; min-height: 36px; border: 0; border-radius: 7px; background: var(--card); padding: 6px 10px; outline: none; margin-bottom: 4px; }
.menu-sep { height: 1px; background: var(--line); margin: 4px 6px; }
.modal-back { position: fixed; inset: 0; z-index: 80; background: rgba(10, 12, 16, 0.45); display: grid; place-items: center; padding: 16px; }
.modal { background: var(--bg); border-radius: 14px; box-shadow: var(--shadow); padding: 20px; width: min(440px, 100%); display: grid; gap: 14px; }
.modal-actions { display: grid; gap: 8px; }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; }
.toast { display: flex; align-items: center; gap: 16px; padding: 10px 14px; border-radius: 10px; background: #24262b; color: #f2f2f4; box-shadow: var(--shadow); font-size: 14px; min-width: 260px; }
.toast button { color: #8fb3ff; font-weight: 500; margin-left: auto; min-height: 28px; }
.toast.error { background: #5a1f1f; }
.bulkbar {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 6px;
  background: var(--bg); box-shadow: var(--shadow); border-radius: 12px; padding: 6px 8px; flex-wrap: wrap; max-width: calc(100vw - 16px);
}
.bulkbar .n { padding: 0 8px; font-size: 14px; }
.search-panel, .help-panel {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%); width: min(640px, calc(100vw - 24px)); max-height: 75vh; overflow-y: auto;
  z-index: 70; background: var(--bg); box-shadow: var(--shadow); border-radius: 14px; padding: 12px;
}
.search-panel input { width: 100%; min-height: 44px; border: 0; border-radius: 10px; background: var(--card); padding: 8px 14px; outline: none; }
.search-res { margin-top: 8px; }
.search-res .res { display: flex; gap: 10px; align-items: baseline; padding: 8px 10px; border-radius: 8px; width: 100%; text-align: left; }
.search-res .res:hover, .search-res .res.on { background: var(--accent-bg); }
.help-panel table { width: 100%; border-collapse: collapse; font-size: 14px; }
.help-panel td { padding: 5px 6px; }
kbd { font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--card); border-radius: 4px; padding: 1px 6px; }
.fab { display: none; }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .topbar { padding: 8px 16px; gap: 12px; }
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--bg); justify-content: space-around;
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -1px 0 var(--line);
  }
  .nav a { flex-direction: column; gap: 0; font-size: 11px; min-height: 52px; min-width: 64px; justify-content: center; position: relative; padding: 4px 8px; }
  .nav a.active { background: none; color: var(--accent); }
  .nav-ico { display: block; font-size: 18px; }
  .nav .badge { position: absolute; top: 2px; right: 10px; }
  .icon-btn { width: 44px; height: 44px; }
  main { padding: 8px 16px 150px; }
  .offline { margin: 0 16px 8px; }
  .qa { position: fixed; left: 0; right: 0; bottom: calc(60px + env(safe-area-inset-bottom)); z-index: 35; padding: 10px 12px; background: var(--bg); box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.12); display: none; }
  body.qa-open .qa { display: block; }
  .qa-close { display: inline-grid; }
  .qa-sugg { position: static; margin-top: 6px; box-shadow: none; background: var(--card); max-width: none; }
  .fab {
    display: grid; place-items: center; position: fixed; right: 16px; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 34;
    width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 28px; box-shadow: var(--shadow);
  }
  body.qa-open .fab { display: none; }
  .week-layout { grid-template-columns: 1fr; gap: 24px; }
  .focus-cards { grid-template-columns: 1fr; gap: 8px; }
  .focus-card { min-height: 52px; }
  .week-progress { margin-left: 0; width: 100%; text-align: left; }
  .task { padding: 10px 8px 10px 8px; margin: 0 -8px; min-height: 44px; }
  .task .sel { display: none; }
  body.selecting .task .sel { display: block; position: static; flex: none; margin-top: 3px; }
  .check { width: 24px; height: 24px; }
  .t-more { opacity: 1; width: 36px; height: 32px; }
  .btn { min-height: 44px; }
  .btn.small { min-height: 36px; }
  .seg button { min-height: 40px; }
  .props, .drawer .props { grid-template-columns: 1fr; gap: 2px; }
  .props > label { margin-top: 8px; }
  .drawer { width: 100vw; padding: 12px 16px 80px; }
  .focus-slots { grid-template-columns: 1fr; }
  .toasts, .bulkbar { bottom: calc(72px + env(safe-area-inset-bottom)); }
  .menu { left: 8px !important; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); top: auto !important; max-width: none; max-height: 60vh; }
  .search-panel, .help-panel { top: 8px; }
}
@media (prefers-reduced-motion: no-preference) {
  .toast { animation: fadein 0.15s ease-out; }
  @keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

/* ======================= v2 : axes, temps, dépendances, aide, animations ======================= */
.ico { width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.18em; display: inline-block; }
.axis-ico { display: inline-flex; align-items: center; color: var(--dc, var(--muted)); }
.t-line { display: flex; align-items: baseline; gap: 6px; }
.t-axis { align-self: center; font-size: 14px; }
.est { display: inline-flex; align-items: center; gap: 3px; }
.badge-warn {
  display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: 999px; font-size: 12px; line-height: 20px;
  background: var(--orange-bg); color: var(--orange); white-space: nowrap;
}
button.badge-warn:hover { filter: brightness(0.97); }
.group-head.tinted { background: color-mix(in srgb, var(--dc) 10%, transparent); border-radius: 8px; padding: 6px 10px; margin: 0 -10px; }
.group-head .axis-ico { font-size: 16px; }

/* « Compléter pour planifier » */
.plan-panel {
  position: fixed; z-index: 75; width: min(380px, calc(100vw - 16px)); background: var(--bg); border-radius: 12px;
  box-shadow: var(--shadow); padding: 12px; display: grid; gap: 8px; outline: none;
}
.pp-head { display: flex; align-items: center; gap: 8px; color: var(--accent); }
.pp-head .medium { color: var(--text); }
.pp-task { color: var(--muted); font-size: var(--fs-meta); overflow-wrap: anywhere; }
.pp-label { font-size: var(--fs-meta); color: var(--muted); margin-top: 2px; }
.pp-axes, .pp-est { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pp-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--card);
  font-size: 14px; min-height: 32px;
}
.pp-pill:hover { background: var(--line); }
.pp-pill.on { background: var(--accent-bg); box-shadow: 0 0 0 2px var(--accent) inset; }
.pp-pill kbd { padding: 0 5px; background: var(--bg); }
.pp-input { width: 110px; min-height: 32px; border: 0; border-radius: 999px; background: var(--card); padding: 4px 12px; outline: none; }
.pp-input:focus { box-shadow: 0 0 0 2px var(--accent) inset; }
.pp-error { color: var(--red); font-size: var(--fs-meta); }
.pp-actions { display: flex; gap: 6px; justify-content: flex-end; }
.pp-actions kbd { background: rgba(255, 255, 255, 0.2); color: inherit; }

/* Réglages : axes Ikigai */
.ikigai { margin-bottom: 8px; }
.axis-row { padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.axis-row.archived { opacity: 0.55; }
.axis-main, .axis-sub { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.axis-sub { padding-left: 62px; }
.axis-row .handle { width: 14px; color: var(--faint); cursor: grab; }
.axis-pick { width: 36px; height: 36px; border-radius: 9px; display: inline-grid; place-items: center; font-size: 19px; color: var(--dc, var(--muted)); background: color-mix(in srgb, var(--dc, var(--muted)) 12%, transparent); }
.axis-pick:hover { background: color-mix(in srgb, var(--dc, var(--muted)) 22%, transparent); }
.axis-row input.inline-name { font-weight: 500; background: transparent; padding: 4px 8px; margin-left: -8px; }
.axis-row input.inline-name:hover { background: var(--hover); }
.axis-row .hours { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-meta); color: var(--muted); }
.axis-row .hours input { width: 64px; }
.axis-new { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.icon-grid .grid { display: grid; grid-template-columns: repeat(8, 36px); gap: 4px; padding: 4px; }
.icon-cell { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; font-size: 18px; color: var(--muted); }
.icon-cell:hover, .icon-cell:focus-visible { background: var(--accent-bg); color: var(--text); }
.icon-cell.on { background: var(--accent-bg); color: var(--accent); }
.small-input { max-width: 120px; }
.unlinked .set-row { border-bottom: 1px solid var(--line); }

@media (max-width: 760px) {
  .plan-panel { left: 8px !important; right: 8px; width: auto; bottom: calc(8px + env(safe-area-inset-bottom)); top: auto !important; }
  .axis-sub { padding-left: 0; }
  .icon-grid .grid { grid-template-columns: repeat(8, 1fr); }
}
.axis-main { flex-wrap: nowrap; }
.axis-row .grow, .axis-new .grow { flex: 1; min-width: 0; width: auto; }
.axis-row .hours input, .axis-row .hours { flex: none; }
.axis-sub input.grow { min-width: 180px; background: var(--card); }
.axis-new input.grow { background: var(--card); }

/* Temps, avancement, capacité */
.ring { width: 15px; height: 15px; transform: rotate(-90deg); flex: none; }
.ring circle { fill: none; stroke-width: 3; }
.ring .ring-bg { stroke: var(--line); }
.ring .ring-fg { stroke: var(--dc, var(--accent)); stroke-linecap: round; }
.t-menu { opacity: 0; width: 28px; height: 28px; border-radius: 6px; display: grid; place-items: center; color: var(--muted); flex: none; }
.task:hover .t-menu, .task.cursor .t-menu, .t-menu:focus-visible { opacity: 1; }
.t-menu:hover { background: var(--hover); color: var(--text); }
.load { margin-top: 10px; text-align: left; }
.load-line { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.load-bar { margin-top: 5px; }
.load.lvl-ok .load-bar > span { background: var(--green); }
.load.lvl-full .load-bar > span { background: var(--orange); }
.load.lvl-over .load-bar > span { background: var(--red); }
.load.lvl-over .load-line b { color: var(--red); }
.time-sum { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.logs { margin-top: 6px; display: grid; }
.log-row { display: flex; align-items: center; gap: 10px; padding: 2px 0; font-size: 14px; }
.log-row .icon-btn { width: 28px; height: 28px; font-size: 14px; }
.btn-row { margin-top: 10px; }
.btn-row > * { flex: none; }
.nd-subs { display: grid; gap: 2px; max-height: 180px; overflow-y: auto; }
.plan-panel input[type="range"], #d-pct { width: 100%; accent-color: var(--accent); }
.sub-row .sub-est { width: 64px; flex: none; font-size: var(--fs-meta); color: var(--muted); background: transparent; border: 0; text-align: right; }
.sub-row .sub-est:focus { color: var(--text); background: var(--card); border-radius: 6px; outline: none; }
@media (max-width: 760px) { .t-menu { opacity: 1; } .week-progress .load { width: 100%; } }
.week-layout .page-head { align-items: flex-start; }

/* Parts de projet, Décomposer, suggestion « projet » */
.share { font-size: 12px; line-height: 18px; padding: 0 7px; border-radius: 999px; background: var(--card); color: var(--muted); display: inline-flex; align-items: center; gap: 3px; opacity: 0; }
.task:hover .share, .task.cursor .share, .share.always, .share:focus-visible { opacity: 1; }
.share:hover { background: var(--accent-bg); color: var(--accent); }
.share.fixed { color: var(--text); }
.hint-proj { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--accent); }
.suggest-box { display: flex; gap: 10px; margin-top: 16px; padding: 12px; border-radius: 10px; background: var(--accent-bg); }
.suggest-box > .ico { color: var(--accent); margin-top: 3px; }
.hours-line { display: inline-flex; align-items: center; gap: 5px; flex: 2 1 260px; }
.decompose { display: grid; gap: 10px; margin-bottom: 8px; }
.decompose textarea { min-height: 140px; font-family: inherit; }
.dc-preview table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dc-preview td { padding: 4px 6px; border-bottom: 1px solid var(--line); }
.dc-preview tr.err td { color: var(--red); }
.dc-preview tfoot td { font-weight: 500; border-bottom: 0; }
.dc-preview .num { text-align: right; white-space: nowrap; width: 1%; }
.dc-preview .share-col { color: var(--accent); }
.btn.active { background: var(--accent-bg); color: var(--accent); }
@media (max-width: 760px) { .share { opacity: 1; } }

/* Dépendances et séquence */
.task.blocked .t-title { color: var(--muted); }
.task.blocked .check { opacity: 0.55; }
.waits { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); }
.task-list[data-gkey="seq"] { position: relative; }
.task-list[data-gkey="seq"]::before { content: ""; position: absolute; left: 10px; top: 18px; bottom: 18px; width: 2px; background: var(--line); border-radius: 1px; }
.seq-num {
  position: relative; z-index: 1; flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 500; background: var(--card); color: var(--muted); margin: 1px 4px 0 0;
}
.task:not(.blocked) .seq-num { background: var(--accent-bg); color: var(--accent); }
.deps { display: grid; grid-template-columns: 70px 1fr; gap: 6px 10px; align-items: start; }
.deps > div { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dep { display: inline-flex; align-items: center; gap: 5px; padding: 2px 4px 2px 10px; border-radius: 999px; background: var(--card); font-size: 14px; }
.dep .icon-btn { width: 24px; height: 24px; font-size: 13px; }
.dep.done { color: var(--muted); }
button.link { color: var(--accent); text-align: left; }
button.link:hover { text-decoration: underline; }
.task.flash { background: color-mix(in srgb, var(--green) 14%, transparent); border-radius: 8px; }
@media (prefers-reduced-motion: no-preference) {
  .task.flash { animation: flash-ready 3s ease-out; }
  @keyframes flash-ready { 0% { box-shadow: 0 0 0 2px var(--green) inset; } 100% { box-shadow: 0 0 0 0 transparent inset; } }
}

/* Bilan */
.postmortem { max-width: 820px; }
.postmortem h1 { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.pm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.pm-stat { display: flex; gap: 10px; padding: 12px; border-radius: 10px; background: var(--card); }
.pm-stat > .ico { color: var(--accent); margin-top: 2px; }
.pm-mood { display: flex; gap: 8px; flex-wrap: wrap; }
.mood { display: grid; justify-items: center; gap: 4px; width: 92px; padding: 10px 4px; border-radius: 10px; background: var(--card); color: var(--muted); font-size: 12px; }
.mood .ico { width: 30px; height: 30px; }
.mood:hover { color: var(--text); }
.mood.on { background: var(--accent-bg); color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.pm-done-when { display: flex; align-items: center; gap: 6px; margin: 4px 0 10px; color: var(--muted); }
.pm-texts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pm-q textarea { background: var(--card); min-height: 70px; }
.pm-actions { margin-top: 28px; }
.pm-box { padding: 12px 14px; border-radius: 10px; background: var(--card); }
.stars { color: var(--amber, #d5a021); letter-spacing: 1px; }
a.badge-warn { text-decoration: none; }
@media (max-width: 760px) { .pm-texts { grid-template-columns: 1fr; } .mood { width: calc(20% - 7px); } }

/* Suggestion */
.qa-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sugg-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px; min-height: 26px;
  font-size: var(--fs-meta); background: var(--accent-bg); color: var(--text); border: 1px dashed color-mix(in srgb, var(--accent) 50%, transparent);
}
.sugg-pill:hover { border-style: solid; }
.sugg-pill kbd { padding: 0 5px; font-size: 11px; background: var(--bg); }
.sugg-pill .spark { color: var(--accent); }
.sugg-pill.est, .sugg-pill.proj { background: var(--card); border-color: var(--line); }
.t-meta .sugg-pill { min-height: 20px; padding: 0 8px; font-size: 12px; }
.row-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
@media (prefers-reduced-motion: no-preference) {
  .sugg-pill { animation: sugg-in 0.2s ease-out; }
  @keyframes sugg-in { from { opacity: 0; transform: translateY(-2px); } to { opacity: 1; transform: none; } }
}

/* Équilibre Ikigai, capacité dans la revue */
.ikigai-bars { display: grid; gap: 6px; margin-top: 4px; }
.ik-row { display: grid; grid-template-columns: 18px minmax(70px, 120px) 1fr auto; align-items: center; gap: 8px; font-size: 14px; }
.ik-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ik-bar { position: relative; height: 8px; border-radius: 4px; background: var(--line); }
.ik-bar > span { display: block; height: 100%; border-radius: 4px; background: var(--dc, var(--accent)); }
.ik-target { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--text); opacity: 0.55; border-radius: 1px; }
.ik-val { font-size: var(--fs-meta); white-space: nowrap; }
.ik-obl { display: flex; align-items: center; gap: 6px; font-size: var(--fs-meta); color: var(--muted); margin-top: 2px; }
.capacity-row { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.capacity-row .grow { flex: 1; min-width: 220px; }
.capacity-row .load { margin-top: 0; }
.accuracy { display: flex; align-items: center; gap: 6px; }
@media (prefers-reduced-motion: no-preference) {
  .ik-bar > span, .bar > span, .load-bar > span { transition: width 0.3s ease-out; }
  .ring .ring-fg { transition: stroke-dasharray 0.3s ease-out; }
}

/* Aide */
.help-page { max-width: 900px; }
.schema { width: 100%; height: auto; margin: 8px 0 4px; }
.schema-box { fill: var(--card); stroke: var(--line); }
.schema-box.first { fill: var(--accent-bg); stroke: var(--accent); }
.schema-title { fill: var(--text); font-size: 15px; font-weight: 500; }
.schema-sub { fill: var(--muted); font-size: 12px; }
.schema-line { stroke: var(--faint); stroke-width: 2; }
.schema-arrow { fill: var(--faint); }
.pot { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.pot-item { padding: 12px; border-radius: 10px; background: var(--card); display: grid; gap: 4px; }
.pot-test { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; margin: 4px 0 0; color: var(--accent); }
.pot-fold summary { cursor: pointer; color: var(--accent); display: inline-flex; align-items: center; gap: 5px; font-size: 14px; }
.pot-fold[open] summary { margin-bottom: 8px; }
.syntax { border-collapse: collapse; }
.syntax td { padding: 4px 12px 4px 0; vertical-align: top; }
.examples { margin: 4px 0; padding-left: 18px; }
.routine { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.routine > div { padding: 12px; border-radius: 10px; background: var(--card); display: grid; gap: 4px; }
.view-help {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 100vw); z-index: 45; background: var(--bg); box-shadow: var(--shadow);
  padding: 18px 20px 80px; overflow-y: auto;
}
.view-help h3 { margin: 14px 0 6px; }
.view-help ul { padding-left: 18px; margin: 0; display: grid; gap: 6px; }
.vh-tip { display: flex; gap: 8px; margin-top: 16px; padding: 10px 12px; border-radius: 10px; background: var(--accent-bg); }
.vh-tip > .ico { color: var(--accent); margin-top: 2px; }
.onboarding { margin: 0 0 20px; padding: 14px 16px; border-radius: 12px; background: var(--accent-bg); }
.onboarding .section-title .ico { color: var(--accent); }
.onboarding ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.onboarding li { display: flex; align-items: center; gap: 10px; min-height: 32px; }
.onboarding li.done .grow { color: var(--muted); text-decoration: line-through; }
.ob-check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--faint); display: grid; place-items: center; flex: none; font-size: 12px; }
.onboarding li.done .ob-check { background: var(--green); border-color: var(--green); color: #fff; }
.onboarding .grow { flex: 1; }
.qa-legend { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: var(--fs-meta); color: var(--muted); flex-wrap: wrap; }
.qa-legend kbd { margin-right: 2px; }
@media (max-width: 760px) { .view-help { width: 100vw; } .schema-sub { display: none; } }

/* Icônes de navigation, coche, célébrations */
.nav-ico { display: inline-flex; font-size: 16px; }
.icon-btn .ico { width: 19px; height: 19px; }
.fab .ico { width: 26px; height: 26px; }
.star .ico { width: 13px; height: 13px; vertical-align: -2px; }
.check .ck { width: 12px; height: 12px; fill: none; stroke: transparent; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.check:hover .ck { stroke: var(--green); }
.task.done .check .ck { stroke: #fff; }
#celebrate-layer { position: fixed; inset: 0; pointer-events: none; z-index: 95; overflow: hidden; }
#celebrate-layer canvas.confetti { position: absolute; inset: 0; width: 100%; height: 100%; }
.creature { position: absolute; left: 0; top: 0; width: 130px; will-change: transform; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.18)); }
.creature svg { width: 100%; height: auto; display: block; }
.cr-balloon-wrap { width: 90px; }
.cel-banner {
  position: absolute; left: 50%; top: 22%; transform: translateX(-50%); padding: 14px 22px; border-radius: 14px;
  background: var(--bg); color: var(--text); box-shadow: var(--shadow); font-size: 18px; font-weight: 500; white-space: nowrap;
}
.toast-text { display: grid; gap: 6px; }
.toast-bar { display: block; width: 180px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.2); overflow: hidden; }
.toast-bar > span { display: block; height: 100%; width: var(--to); background: var(--dc, #4cbb79); border-radius: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .task.just-done .check .ck path { stroke-dasharray: 16; animation: ck-draw 0.25s ease-out both; }
  .task.just-done .check { animation: ck-pop 0.25s ease-out; }
  .task.just-done { animation: row-settle 0.3s ease-out; }
  @keyframes ck-draw { from { stroke-dashoffset: 16; } to { stroke-dashoffset: 0; } }
  @keyframes ck-pop { 0% { transform: scale(0.8); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
  @keyframes row-settle { from { opacity: 0.4; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
  .toast-bar > span { animation: bar-grow 0.6s 0.15s ease-out both; }
  @keyframes bar-grow { from { width: var(--from); } to { width: var(--to); } }
  .cr-wing { transform-box: fill-box; animation: wing 0.18s ease-in-out infinite alternate; }
  .cr-wing-l { transform-origin: right center; }
  .cr-wing-r { transform-origin: left center; animation-direction: alternate-reverse; }
  @keyframes wing { from { transform: rotate(-14deg); } to { transform: rotate(14deg); } }
  .cr-flame { animation: flame 0.12s linear infinite alternate; transform-box: fill-box; transform-origin: right center; }
  @keyframes flame { from { transform: scaleX(0.8); } to { transform: scaleX(1.15); } }
  .cr-steam, .cr-twinkle { animation: twinkle 0.5s ease-in-out infinite alternate; }
  @keyframes twinkle { from { opacity: 0.3; } to { opacity: 1; } }
  .cel-banner { animation: banner 1.9s ease-out both; }
  @keyframes banner { 0% { opacity: 0; transform: translate(-50%, 8px) scale(0.96); } 12%, 80% { opacity: 1; transform: translate(-50%, 0) scale(1); } 100% { opacity: 0; transform: translate(-50%, -6px); } }
}
@media (max-width: 760px) { .cel-banner { font-size: 16px; white-space: normal; text-align: center; width: calc(100vw - 48px); } }

/* Inbox : pastilles d'action, archives ; « Comment ça marche » replié */
.act-pill {
  display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 2px 10px 2px 8px; border-radius: 999px;
  font-size: var(--fs-meta); font-weight: 500; color: var(--tone); background: color-mix(in srgb, var(--tone) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--tone) 25%, transparent);
}
.act-pill:hover { background: color-mix(in srgb, var(--tone) 22%, transparent); }
.act-pill .ico { width: 15px; height: 15px; }
.tone-now { --tone: var(--accent); }
.tone-next { --tone: var(--c-purple); }
.tone-later { --tone: var(--c-slate); }
.tone-project { --tone: var(--c-teal); }
details.fold > summary { display: flex; align-items: center; gap: 6px; }
details.fold > summary .ico { color: var(--muted); }
.archive .section-title { margin-top: 12px; }
.status-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 0 8px; border-radius: 999px; line-height: 20px; }
.status-pill .ico { width: 13px; height: 13px; }
.st-done { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.st-dropped { background: var(--card); color: var(--muted); }
.st-paused { background: color-mix(in srgb, var(--c-slate) 14%, transparent); color: var(--c-slate); }
.how-it-works { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 8px; }
.how-it-works > summary { font-size: 15px; }
.how-body { max-width: 900px; padding-top: 8px; }
@media (max-width: 760px) {
  .act-pill { padding: 0; width: 34px; height: 34px; justify-content: center; }
  .act-pill .ap-label { display: none; }
  .task:has(.t-actions) { flex-wrap: wrap; }
  .task .t-actions { order: 5; flex-basis: 100%; margin-left: 30px; }
}
.series-tag { display: inline-flex; align-items: center; gap: 3px; color: var(--c-purple); }

/* Bandeaux d'aide visuels */
.tip-strip { margin: 0 0 16px; padding: 10px 12px; border-radius: 12px; background: var(--accent-bg); }
.tip-head { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.tip-head > .ico { color: var(--accent); }
.tip-head .icon-btn { width: 28px; height: 28px; font-size: 14px; }
.tip-steps { display: flex; align-items: stretch; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tip-step { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--bg); flex: 1 1 110px; font-size: 13px; }
.tip-step > .ico { color: var(--accent); margin-top: 2px; }
.tip-arrow { display: flex; align-items: center; color: var(--faint); }
.tip-note { margin-top: 8px; }
.focus-cards + .tip-strip { margin-top: 10px; }
@media (max-width: 760px) { .tip-arrow { display: none; } .tip-step { flex-basis: calc(50% - 6px); } }

/* Cartes focus visuelles (Semaine et revue) */
.focus-card { display: flex; flex-direction: column; gap: 8px; text-align: left; min-height: 112px; padding: 12px 14px; border-radius: 12px; background: var(--card); cursor: pointer; }
.focus-card.filled { background: color-mix(in srgb, var(--dc, var(--accent)) 10%, var(--card)); border-left: 4px solid var(--dc, var(--accent)); }
.focus-card.filled:hover { background: color-mix(in srgb, var(--dc, var(--accent)) 16%, var(--card)); }
.fc-top { display: flex; align-items: center; gap: 8px; width: 100%; }
.fc-num { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px 2px 6px; border-radius: 999px; background: var(--bg); color: var(--c-amber); font-size: 13px; }
.fc-num b { color: var(--text); }
.fc-num.empty { color: var(--faint); }
.focus-card .ttl { display: flex; align-items: flex-start; gap: 8px; font-size: 17px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.focus-card .ttl .fc-axis { font-size: 20px; margin-top: 1px; }
.focus-card.done .ttl span { text-decoration: line-through; color: var(--muted); }
.fc-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--fs-meta); color: var(--muted); margin-top: auto; }
.fc-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.fc-done { color: var(--green); }
.fc-move { display: inline-flex; gap: 2px; opacity: 0; transition: opacity 0.15s; }
.focus-card:hover .fc-move, .focus-card:focus-within .fc-move { opacity: 1; }
.fc-btn { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: var(--muted); background: var(--bg); }
.fc-btn:hover { color: var(--text); background: var(--line); }
.focus-card.empty-card { justify-content: space-between; border: 1.5px dashed var(--line); background: none; }
.focus-card.empty-card .ttl { font-size: 15px; font-weight: 500; color: var(--accent); align-items: center; }
.focus-card.sortable-ghost { opacity: 0.4; }
.pcard.sortable-ghost { opacity: 0.4; }
@media (max-width: 760px) { .fc-move { opacity: 1; } .focus-card { min-height: 88px; } }

/* Page projet : bascule, pastilles de durée ; bouton Aide ; barre des touches ; raccourcis groupés */
.mode-pick { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 12px; }
.est-pill { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border-radius: 999px; line-height: 20px; font-size: 12px; background: var(--card); color: var(--text); }
.est-pill:hover { background: var(--accent-bg); color: var(--accent); }
.est-pill.empty { color: var(--accent); border: 1px dashed color-mix(in srgb, var(--accent) 50%, transparent); background: none; }
.act-pill.on { background: var(--tone); color: #fff; border-color: var(--tone); }
.rep-modes .pp-pill .ico { width: 15px; height: 15px; }
.plan-panel .field { display: grid; gap: 4px; }
.plan-panel .field > span { font-size: var(--fs-meta); color: var(--muted); }
.help-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--accent-bg); color: var(--accent); font-weight: 500; font-size: 14px; }
.help-btn:hover { filter: brightness(0.97); }
.help-btn .ico { width: 18px; height: 18px; }
.tip-all { font-size: 12px; margin-right: 4px; }
.vh-actions { display: grid; gap: 8px; margin-top: 18px; }
.vh-actions .btn { justify-content: flex-start; }
.keys-groups { display: grid; gap: 14px; }
.keys-group { padding: 10px 12px; border-radius: 10px; background: var(--card); display: grid; gap: 4px; }
.keys-group table td:first-child { white-space: nowrap; }
.help-panel { max-height: calc(100vh - 40px); overflow-y: auto; }
.keybar {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 48; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  max-width: min(980px, calc(100vw - 32px)); padding: 8px 14px; border-radius: 12px; background: var(--bg); box-shadow: var(--shadow); font-size: 13px;
}
.kb-title { display: inline-flex; align-items: center; gap: 6px; }
.kb-title .ico { color: var(--accent); }
.kb-keys { display: inline-flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); }
.kb-keys kbd { color: var(--text); }
body.selecting .keybar { display: none; }
@media (max-width: 760px) { .help-btn span { display: none; } .help-btn { padding: 0 10px; } .keybar { display: none !important; } }
body:has(#keybar:not([hidden])) .toasts { bottom: 76px; }
