/* Notula, version web. Jetons repris de la maquette (thème clair proche Todoist, accent corail).
   Police : Inter si elle est installée, sinon celle du système (aucune police chargée d'ailleurs, CSP font-src 'self'). */

:root {
  --bg: #FFFFFF; --side: #FCFAF8; --surface: #FFFFFF; --surface2: #F3F0EC; --hover: #F5F2EF; --line: #ECE9E5;
  --text: #202020; --muted: #6B6B6B; --accent: #F0705A; --accent-text: #C2432B; --accent-bg: #FFEEE9;
  --late: #C2261C; --today: #1E7B47; --warn: #8A5A00; --warn-bg: #FFF4DC; --on-accent: #FFFFFF;
  --shadow: 0 10px 40px rgba(0, 0, 0, .14), 0 2px 6px rgba(0, 0, 0, .06);
  --toast-bg: #202020; --toast-text: #FFFFFF; --toast-link: #F58B77;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mk-date-bg: #FFE3DC; --mk-date: #B2381F; --mk-rem-bg: #EDE4FB; --mk-rem: #6B3FB5; --mk-who-bg: #E3ECFB; --mk-who: #2F5BB7;
  --mk-fix-bg: #FFF0C7; --mk-fix: #7A4E00; --mk-word-bg: #ECE9E5; --mk-word: #202020;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #1F1F1F; --side: #282828; --surface: #262626; --surface2: #333333; --hover: #303030; --line: #3A3A3A;
  --text: #F2F2F2; --muted: #A8A8A8; --accent-text: #F58B77; --accent-bg: rgba(240, 112, 90, .16);
  --late: #FF8C82; --today: #7FD1A1; --warn: #F5C26B; --warn-bg: rgba(245, 194, 107, .13); --on-accent: #1F1F1F;
  --shadow: 0 10px 40px rgba(0, 0, 0, .5); --toast-bg: #F2F2F2; --toast-text: #1F1F1F; --toast-link: #C2432B;
  --mk-date-bg: #4A2A22; --mk-date: #FFB4A3; --mk-rem-bg: #352A4A; --mk-rem: #CDB4F5; --mk-who-bg: #22324A; --mk-who: #A9C4F5;
  --mk-fix-bg: #443A1E; --mk-fix: #F0D28A; --mk-word-bg: #3A3A3A; --mk-word: #F2F2F2;
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #1F1F1F; --side: #282828; --surface: #262626; --surface2: #333333; --hover: #303030; --line: #3A3A3A;
  --text: #F2F2F2; --muted: #A8A8A8; --accent-text: #F58B77; --accent-bg: rgba(240, 112, 90, .16);
  --late: #FF8C82; --today: #7FD1A1; --warn: #F5C26B; --warn-bg: rgba(245, 194, 107, .13); --on-accent: #1F1F1F;
  --shadow: 0 10px 40px rgba(0, 0, 0, .5); --toast-bg: #F2F2F2; --toast-text: #1F1F1F; --toast-link: #C2432B;
  --mk-date-bg: #4A2A22; --mk-date: #FFB4A3; --mk-rem-bg: #352A4A; --mk-rem: #CDB4F5; --mk-who-bg: #22324A; --mk-who: #A9C4F5;
  --mk-fix-bg: #443A1E; --mk-fix: #F0D28A; --mk-word-bg: #3A3A3A; --mk-word: #F2F2F2;
  color-scheme: dark; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Boutons */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 8px; padding: 7px 12px; font-size: 13.5px; font-weight: 500; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #FFFFFF; font-weight: 600; }
.btn.primary:hover { filter: brightness(.96); }
.btn.primary:disabled { opacity: .55; cursor: default; }
.btn.danger { color: var(--late); }
.ib { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 0; background: none; border-radius: 6px;
  color: var(--muted); padding: 0; flex: none; }
.ib:hover { background: var(--hover); color: var(--text); }
.link { border: 0; background: none; padding: 0; color: var(--accent-text); font-weight: 500; }
.link:hover { text-decoration: underline; }
.kbd { font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; line-height: 17px; }
.chip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 6px; padding: 4px 8px; font-size: 12.5px; color: var(--muted); }
.chip:hover { background: var(--hover); color: var(--text); }
.chip.on { color: var(--accent-text); border-color: var(--accent); background: var(--accent-bg); }
.chip input, .chip select { border: 0; background: none; font-size: 12.5px; padding: 0; color: var(--text); max-width: 150px; }
.chip svg { flex: none; }

/* Champs */
.field { display: flex; flex-direction: column; gap: 5px; }
.field label, .lab { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.input { width: 100%; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 9px 11px; font-size: 14px; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); }
textarea.input { resize: vertical; min-height: 70px; }
.err { color: var(--late); font-size: 13px; }

/* Écrans de connexion */
.auth { min-height: 100%; display: grid; place-items: center; padding: 32px max(16px, env(safe-area-inset-left, 0px)); background: var(--side); }
.auth-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 28px 26px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.auth-card h1 { font-size: 20px; margin: 0; font-weight: 650; }
.auth-card p { margin: 0; }
.auth-card code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; overflow-wrap: anywhere; user-select: all; }
.recovery { margin: 0; padding-left: 20px; columns: 2; line-height: 1.8; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
.brand img { width: 30px; height: 30px; }
.auth-foot { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.hp { position: absolute; left: -9999px; }

/* Mise en page */
.app { display: flex; min-height: 100%; }
.side { width: 270px; flex: none; background: var(--side); border-right: 1px solid var(--line); padding: 12px;
  display: flex; flex-direction: column; gap: 1px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.main { flex: 1; min-width: 0; padding: 36px 24px 80px; }
.page { max-width: 760px; margin: 0 auto; }
.topbar { display: none; }
.addpair { display: flex; gap: 6px; padding-bottom: 12px; }
.addtxt { flex: 1; display: flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--accent-text);
  font-weight: 600; padding: 7px 8px; border-radius: 6px; text-align: left; }
.addtxt:hover { background: var(--hover); }
.addtxt .plus { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #FFFFFF; display: grid; place-items: center; }
.acct { display: flex; align-items: center; gap: 6px; padding-bottom: 10px; position: relative; }
.nav { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; background: none; padding: 7px 8px; border-radius: 6px;
  text-align: left; color: var(--text); text-decoration: none; font-size: 14px; }
.nav:hover { background: var(--hover); }
.nav.on { background: var(--accent-bg); color: var(--accent-text); font-weight: 600; }
.nav .ic { width: 20px; display: grid; place-items: center; color: var(--muted); flex: none; }
.nav.on .ic { color: var(--accent-text); }
.nav .count { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.nav .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp { display: flex; align-items: center; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 14px 8px 4px; }
.grp .ib { margin-left: auto; width: 24px; height: 24px; }
.hash { color: var(--muted); font-weight: 500; }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 12px 8px 2px; color: var(--muted); font-size: 13px; }
.side-foot img { width: 20px; height: 20px; }
.side-foot .ver { margin-left: auto; font-size: 11.5px; font-variant-numeric: tabular-nums; opacity: .8; }
.av { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10.5px; font-weight: 600;
  color: #FFFFFF; background: var(--accent); flex: none; }
.av.sm { width: 20px; height: 20px; font-size: 9px; }
.newproj { display: flex; gap: 6px; padding: 4px 8px; }
.newproj .input { padding: 5px 8px; font-size: 13px; }

/* Menus */
.menu { position: absolute; z-index: 30; background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); padding: 6px; min-width: 230px; }
.mi { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 7px 10px; border-radius: 6px;
  text-align: left; font-size: 13.5px; }
.mi:hover, .mi:focus-visible { background: var(--hover); }
.msep { border-top: 1px solid var(--line); margin: 5px 0; }

/* En-tête d'une page */
.ph { display: flex; align-items: baseline; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.ph h1 { font-size: 24px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.ph .sub { color: var(--muted); font-size: 13px; }
.ph .acts { margin-left: auto; display: flex; gap: 4px; }
.sech { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; padding: 18px 4px 6px;
  border-bottom: 1px solid var(--line); }
.sech .n { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.sech .link { margin-left: auto; font-size: 13px; }
.empty { text-align: center; padding: 56px 16px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty img { width: 64px; opacity: .9; }
.empty strong { color: var(--text); font-size: 15px; }
.loading { padding: 40px; text-align: center; color: var(--muted); }

/* Ligne de tâche */
.row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 4px; border-bottom: 1px solid var(--line); background: var(--bg);
  position: relative; }
.row:hover { background: var(--bg); }
.row.new { animation: flash 2.4s ease-out; }
@keyframes flash { 0% { background: var(--accent-bg); opacity: 0; transform: translateY(-6px); } 12% { opacity: 1; transform: none; background: var(--accent-bg); } 100% { background: var(--bg); } }
.rowmain { flex: 1; min-width: 0; background: none; border: 0; padding: 0; text-align: left; display: block; }
.ttl { font-size: 14px; display: inline-block; max-width: 100%; overflow-wrap: anywhere; }
.ttl.done { color: var(--muted); background: linear-gradient(currentColor, currentColor) no-repeat 0 55% / 100% 1.5px; }
.meta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 10px; margin-top: 3px; flex-wrap: wrap; }
.meta .mi2 { display: inline-flex; align-items: center; gap: 4px; }
.meta .late { color: var(--late); }
.meta .today { color: var(--today); }
.notep { font-size: 12.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.row .acts { display: flex; gap: 2px; opacity: 0; transition: opacity .12s; }
.row:hover .acts, .row:focus-within .acts { opacity: 1; }
.row .right { display: flex; align-items: center; gap: 6px; }
.row.open .acts { opacity: 1; }
.row .acts .morewrap { position: relative; }
.row.open { z-index: 5; }
/* « … » d'une tâche : rangées d'icônes pour la date et la priorité */
.task-menu { min-width: 260px; }
.task-menu .mhead { font-size: 12px; font-weight: 600; color: var(--muted); padding: 6px 10px 2px; }
.task-menu .mrow { display: flex; gap: 4px; padding: 2px 6px 4px; }
.mib { width: 38px; height: 34px; display: grid; place-items: center; border: 1px solid transparent; background: none;
  border-radius: 7px; color: var(--muted); cursor: pointer; }
.mib:hover, .mib:focus-visible { background: var(--hover); color: var(--text); }
.mib.on { border-color: var(--line); color: var(--text); }
.mib.flag.p1 { color: var(--late); }
.task-menu .mi.on { font-weight: 600; }

/* Le rond et la coche animée (validée par Daniel le 09.11.2026) */
.circle { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--muted); background: none; flex: none; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; color: transparent; margin-top: 1px; position: relative;
  transition: transform .12s ease, background .16s ease, border-color .16s ease; }
.circle svg { width: 11px; height: 11px; }
.circle path { fill: none; stroke: currentColor; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.circle.p1 { border-color: var(--accent); border-width: 2px; background: var(--accent-bg); }
@media (hover: hover) { .circle:not(.done):hover { color: var(--muted); } .circle:not(.done):hover svg { opacity: .6; } }
.circle:not(.done):active { transform: scale(.86); }
.circle.done { background: var(--muted); border-color: var(--muted); color: var(--bg); }
.circle.p1.done { background: var(--accent); border-color: var(--accent); }
.row.going { max-height: 240px; overflow: hidden; transition: opacity .2s ease, transform .26s cubic-bezier(.4, 0, .2, 1),
  max-height .26s cubic-bezier(.4, 0, .2, 1), padding .26s cubic-bezier(.4, 0, .2, 1), border-color .26s; }
.row.going .circle.done { animation: ckpop .3s cubic-bezier(.3, 1.6, .5, 1); }
.row.going .circle.done path { stroke-dasharray: 20; animation: ckdraw .22s cubic-bezier(.4, 0, .2, 1) .07s both; }
.row.going .circle.done::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid; border-color: inherit;
  animation: ckring .42s ease-out both; pointer-events: none; }
.row.going .ttl.done { animation: ckstrike .22s cubic-bezier(.4, 0, .2, 1) .14s both; }
.row.going.leaving { opacity: 0; transform: translateX(10px); max-height: 0; padding-top: 0; padding-bottom: 0; border-bottom-color: transparent; }
@keyframes ckpop { 0% { transform: scale(.86); } 55% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes ckdraw { from { stroke-dashoffset: 20; } to { stroke-dashoffset: 0; } }
@keyframes ckring { 0% { transform: scale(1); opacity: .55; } 100% { transform: scale(2.1); opacity: 0; } }
@keyframes ckstrike { from { background-size: 0 1.5px; color: var(--text); } to { background-size: 100% 1.5px; color: var(--muted); } }
@media (prefers-reduced-motion: reduce) {
  .row.going .circle.done, .row.going .circle.done path, .row.going .ttl.done, .row.new { animation: none; }
  .row.going .circle.done::after { display: none; }
  .row.going { transition: none; }
}

/* Idées */
.notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 8px; }
.note { border: 1px solid var(--line); border-radius: 10px; padding: 12px 13px; background: var(--surface); text-align: left;
  display: flex; flex-direction: column; gap: 6px; min-height: 84px; }
.note:hover { border-color: #D9D4CE; }
.note .nt { font-weight: 600; }
.note .nx { white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.note .meta { margin-top: auto; }
.pin { color: var(--accent-text); }

/* Fenêtres par-dessus la page */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .28); z-index: 50; display: flex; justify-content: center;
  align-items: flex-start; padding: 10vh 16px 16px; overflow-y: auto; animation: fade .12s ease-out; }
@keyframes fade { from { opacity: 0; } }
.dialog { width: 100%; max-width: 560px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow);
  animation: rise .16s ease-out; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
.dialog.wide { max-width: 720px; }
.dh { display: flex; align-items: center; gap: 8px; padding: 10px 10px 0 16px; font-size: 13px; color: var(--muted); }
.dh .sp { flex: 1; }
.db { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.df { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.df .sp { flex: 1; }
.quick { border: 0; padding: 6px 0; font-size: 16px; font-weight: 500; background: none; width: 100%; }
.quick:focus { outline: none; }
.quick-note { border: 0; padding: 0; font-size: 13.5px; background: none; width: 100%; resize: none; color: var(--text); min-height: 22px; }
.quick-note:focus { outline: none; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chips .morewrap { position: relative; }
.chip.plusmenu { padding: 4px 7px; }
.add-menu { top: calc(100% + 6px); left: 0; min-width: 250px; }
.add-menu .ml { flex: 1; text-align: left; }
.add-menu .kbd { min-width: 22px; text-align: center; }
.ib.mic { color: var(--accent); }
.ib.mic:hover { background: var(--accent-bg); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.seg button { border: 0; background: none; padding: 4px 10px; font-size: 12.5px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--accent-bg); color: var(--accent-text); font-weight: 600; }
.edit-title { font-size: 19px; font-weight: 650; border: 0; background: none; width: 100%; padding: 2px 0; }
.edit-title:focus { outline: none; }
.edit-note { border: 0; background: none; width: 100%; resize: vertical; min-height: 60px; padding: 2px 0; font-size: 14px; }
.edit-note:focus { outline: none; }
.props { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; align-items: center; font-size: 13.5px; }
.props .lab { font-weight: 500; }
.props .input { padding: 6px 9px; font-size: 13.5px; }
.datepair { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.datepair .input { width: auto; }
.quickdates { display: flex; gap: 4px; flex-wrap: wrap; }
.search-res { max-height: 50vh; overflow-y: auto; border-top: 1px solid var(--line); }
.sres { display: flex; gap: 10px; width: 100%; border: 0; background: none; padding: 9px 16px; text-align: left; align-items: flex-start; }
.sres:hover, .sres.sel { background: var(--hover); }
.sres .k { font-size: 11.5px; color: var(--muted); min-width: 52px; padding-top: 1px; }
.sres .s { color: var(--muted); font-size: 12.5px; }

/* Bandeau Annuler */
.toast { position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 16px); opacity: 0;
  pointer-events: none; background: var(--toast-bg); color: var(--toast-text); border-radius: 10px; padding: 10px 10px 10px 14px;
  display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow); transition: opacity .18s ease, transform .18s ease;
  max-width: calc(100% - 32px); font-size: 13.5px; z-index: 80; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { border: 0; background: none; color: var(--toast-link); font-weight: 600; padding: 4px 6px; border-radius: 6px; }

/* Téléphone et petite fenêtre */
@media (max-width: 820px) {
  .app { display: block; }
  .side { position: fixed; inset: 0 auto 0 0; z-index: 60; width: min(300px, 86vw); height: 100%; transform: translateX(-102%);
    transition: transform .2s ease; box-shadow: var(--shadow); }
  .app.menu-open .side { transform: none; }
  .app.menu-open::after { content: ""; position: fixed; inset: 0; background: rgba(0, 0, 0, .25); z-index: 55; }
  .topbar { display: flex; align-items: center; gap: 6px; position: sticky; top: 0; z-index: 40; background: var(--bg);
    padding: 8px max(10px, env(safe-area-inset-left, 0px)); border-bottom: 1px solid var(--line); }
  .topbar .addtxt { flex: none; }
  .topbar .sp { flex: 1; }
  .main { padding: 18px max(16px, env(safe-area-inset-left, 0px)) 90px; }
  .ph h1 { font-size: 21px; }
  .row .acts { opacity: 1; }
  .row .acts > .ib, .row .acts > .morewrap:not(:last-child) { display: none; }
  .scrim { padding-top: 6vh; }
  .props { grid-template-columns: 1fr; gap: 4px; }
  .props .lab { margin-top: 6px; }
}

/* Compléments */
.col { flex: 1; min-width: 0; }
.edit-row { border: 0; padding: 0 0 4px; }
.acct-menu { top: 40px; left: 0; }
.bell-menu { top: 40px; left: 40px; width: 300px; max-height: 60vh; overflow-y: auto; }
.mi.unread { font-weight: 600; }
.mver { font-size: 11.5px; padding: 6px 10px 2px; }
.dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
[data-menu="bell"] { position: relative; }
.note.row-new { animation: flash 2.4s ease-out; }

/* Ce que la syntaxe clavier a compris, sous la barre d'ajout */
.parsed { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); margin-top: -4px; }
.parsed .pt { color: var(--text); font-weight: 500; margin-right: 2px; }
.parsed .pc { display: inline-flex; align-items: center; gap: 4px; border-radius: 5px; padding: 2px 7px; background: var(--surface2); }
.parsed .pc.date { color: var(--today); }
.parsed .pc.prio { color: var(--accent-text); background: var(--accent-bg); }
.parsed .pc.kind { color: var(--accent-text); }
.parsed .hint { font-size: 12px; }

/* Ajout vocal : bouton à côté de + Ajouter ; fenêtre par-dessus, en haut au centre (plein écran sur téléphone) */
.addmic { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-bg); color: var(--accent-text); cursor: pointer; }
.addmic:hover { background: var(--hover); }
.topbar .addmic { width: 32px; height: 32px; }
.dialog.vocal { max-width: 640px; display: flex; flex-direction: column; max-height: 80vh; outline: none;
  background: linear-gradient(180deg, var(--accent-bg) 0%, var(--surface) 60%); }
.vhead { display: flex; align-items: center; gap: 8px; padding: 10px 10px 6px 16px; font-size: 13px; color: var(--muted); }
.vdot { width: 8px; height: 8px; border-radius: 50%; background: var(--late); animation: vblink 1.4s ease-in-out infinite; }
.vocal.paused .vdot { background: var(--muted); animation: none; }
@keyframes vblink { 50% { opacity: .35; } }
.vstatus { color: var(--text); font-weight: 500; }
.vtime { font-variant-numeric: tabular-nums; margin-right: 4px; }
.vhead .sp, .vfoot .sp { flex: 1; }
.vbody { position: relative; flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px 10px; display: flex; flex-direction: column; gap: 10px; }
.vcards { display: flex; flex-direction: column; gap: 8px; }
.vempty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 26px 0 18px; text-align: center; }
.vempty .muted { font-size: 13px; }
.vmic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #FFFFFF;
  animation: rec-pulse 1.6s ease-out infinite; }
.vocal.paused .vmic { animation: none; opacity: .6; }
@keyframes rec-pulse { 0% { box-shadow: 0 0 0 0 var(--accent-bg); } 70% { box-shadow: 0 0 0 18px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.vcard { display: flex; align-items: flex-start; gap: 10px; padding: 10px 8px 10px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); }
.vcard { box-shadow: 0 1px 3px rgba(0, 0, 0, .06); transition: transform .2s ease-out; }
.vcard.l { transform: rotate(-.5deg); }
.vcard.r { transform: rotate(.5deg); }
.vcard.new { animation: vdrop .35s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes vdrop { from { opacity: 0; transform: translateY(-14px) rotate(3deg) scale(.97); } }
.vcard.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-bg), 0 4px 12px rgba(0, 0, 0, .08); transform: none; }
.vcard .vmain { border: 0; background: none; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.vcard .vmain:hover .vtitle { color: var(--accent-text); }
.vcard.editing { transform: none; border-color: var(--accent); }
.vedit { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.vedit-when { display: flex; gap: 8px; flex-wrap: wrap; }
.vedit-when .input { width: auto; }
.vedit .row-end { display: flex; justify-content: flex-end; gap: 8px; }
.vuseful { display: flex; align-items: center; gap: 4px; font-size: 13px; align-self: center; }
.vuseful[hidden] { display: none; }
.vthumb { width: 30px; height: 30px; }
.vintro { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 0 24px 28px; }
.vintro h2 { margin: 6px 0 0; font-size: 20px; }
.vintro p { margin: 0; max-width: 420px; font-size: 14px; line-height: 1.5; }
.vintro .vstart { margin-top: 10px; display: inline-flex; align-items: center; gap: 8px; }
.vexs { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 0 6px; width: min(340px, 100%); }
.vex { width: 100%; text-align: left; }
.vex .vmain { cursor: default; }
.vex.l { transform: rotate(-4deg) translateX(-12px); }
.vex.r { transform: rotate(3deg) translateX(14px); }
.vex.l2 { transform: rotate(-2deg) translateX(-4px); }
.vnum { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--surface2); color: var(--muted); font-size: 11px;
  font-weight: 600; display: grid; place-items: center; margin-top: 1px; }
.vkind { flex: none; color: var(--muted); margin-top: 2px; }
.vkind.idea { color: var(--warn); }
.vmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.vtitle { font-size: 15px; color: var(--text); overflow-wrap: anywhere; }
.vsub { font-size: 13px; overflow-wrap: anywhere; }
.vchips { display: flex; flex-wrap: wrap; gap: 4px; }
.vchips:empty { display: none; }
.vchip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 6px; font-size: 12px; background: var(--mk-word-bg);
  color: var(--mk-word); }
.vchip.date { background: var(--mk-date-bg); color: var(--mk-date); }
.vchip.rem { background: var(--mk-rem-bg); color: var(--mk-rem); }
.vchip.who { background: var(--mk-who-bg); color: var(--mk-who); }
.vchip.p1 { background: var(--mk-fix-bg); color: var(--late); }
.vdrop { flex: none; opacity: .55; }
.vcard:hover .vdrop, .vdrop:focus-visible { opacity: 1; }
.vwords { display: flex; flex-direction: column; gap: 4px; }
.vtoggle { align-self: flex-start; font-size: 12px; }
.vtext { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--text); }
.vtext.empty { display: none; }
.vtext .live { color: var(--muted); }
.vnote { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--warn-bg); color: var(--text); font-size: 13px; }
.vfoot { display: flex; align-items: center; gap: 10px; padding: 10px 12px 12px 16px; border-top: 1px solid var(--line); }
.vhint { font-size: 12px; }
.vbars { display: inline-flex; align-items: center; gap: 3px; height: 20px; }
.vbars i { width: 3px; height: 18px; border-radius: 2px; background: var(--accent); transform: scaleY(.15); transition: transform .1s linear; }
.vpause { display: inline-flex; align-items: center; gap: 6px; }
.vsend { width: 38px; height: 34px; }
.vocal .discard { position: sticky; bottom: 0; align-self: flex-end; width: min(320px, 100%); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.vocal .discard .row-end { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
@media (max-width: 560px) {
  .scrim:has(.dialog.vocal) { padding: 0; }
  .dialog.vocal { max-width: none; max-height: none; height: 100%; border-radius: 0; }
  .vhint { display: none; }
}
@media (prefers-reduced-motion: reduce) { .vmic, .vdot, .vcard, .vcard.new { animation: none; } }

/* Fiche d'une tâche : rappels et sous-tâches */
.rems { display: contents; }
.chip.rem { cursor: default; }
.chip.rem .x { border: 0; background: none; padding: 0 0 0 2px; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.chip.rem .x:hover { color: var(--text); }
.props .rem-add { width: auto; max-width: 220px; }
.plan:empty { display: none; }
.plan { margin-top: 4px; }
.plan .plan-h { font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.plan .plan-h .muted { font-weight: 400; }
.plan .props { grid-template-columns: max-content 1fr; }
.meter { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; }
.meter progress { width: 96px; height: 6px; border: 0; border-radius: 3px; background: var(--line); -webkit-appearance: none; appearance: none; overflow: hidden; }
.meter progress::-webkit-progress-bar { background: var(--line); border-radius: 3px; }
.meter progress::-webkit-progress-value { background: var(--accent); border-radius: 3px; }
.meter progress::-moz-progress-bar { background: var(--accent); border-radius: 3px; }
.plan > .muted { margin-top: 10px; }
@media (max-width: 820px) { .plan .props { grid-template-columns: 1fr; } }
.subbox { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.subs { display: flex; flex-direction: column; }
.subt { display: flex; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.sub-title { flex: 1; min-width: 0; text-align: left; border: 0; background: none; padding: 0; font-size: 14px; color: var(--text);
  cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subt.done .sub-title { color: var(--muted); text-decoration: line-through; }
.circle.sm { width: 17px; height: 17px; }
.circle.sm svg { width: 9px; height: 9px; }
.sub-new { padding: 6px 9px; font-size: 13.5px; }
.linkish { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 0;
  color: var(--accent-text); font-size: 13px; cursor: pointer; }
.cmts { display: flex; flex-direction: column; gap: 10px; }
.cmt { display: flex; gap: 10px; align-items: flex-start; }
.cmt .av { margin-top: 2px; }
.cmt-body { flex: 1; min-width: 0; }
.cmt-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.cmt-head .ib.sm { width: 24px; height: 24px; margin-left: auto; }
.cmt-text { font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
textarea.cmt-new { padding: 7px 10px; font-size: 13.5px; resize: vertical; min-height: 0; }

/* Sections d'un projet */
.sech .ib { margin-left: auto; width: 26px; height: 26px; }
.addsec { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); font-size: 13.5px;
  padding: 14px 4px 4px; cursor: pointer; }
.addsec:hover { color: var(--accent-text); }
/* « + Ajouter une tâche » sous une liste (comme la maquette : + couleur de la marque, texte discret) */
.addline { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 8px 4px;
  margin: 2px 0 6px; color: var(--muted); font: inherit; font-size: 14.5px; cursor: pointer; text-align: left; border-radius: 8px; }
.addline .plus { width: 22px; height: 22px; display: grid; place-items: center; color: var(--accent); border-radius: 50%; }
.addline:hover { color: var(--accent-text); }
.addline:hover .plus { background: var(--accent); color: #FFFFFF; }
.addline:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.newsec { margin-top: 14px; max-width: 420px; }

/* Partage avec @ : membres, invitations en attente, suggestions sous le champ */
.share-add { position: relative; }
.sugg { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: var(--shadow); max-height: 260px; }
.sugg .sres { align-items: center; padding: 8px 12px; }
.sugg .sres .st { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugg .sres .muted { font-size: 12px; }
.share-hint { font-size: 12.5px; margin: 8px 0 12px; }
.members { display: flex; flex-direction: column; gap: 2px; }
.member { display: flex; align-items: center; gap: 10px; padding: 6px 0; min-height: 36px; }
.member .mname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member .muted { font-size: 12.5px; }
.member .ib.sm { width: 26px; height: 26px; }
.member.pending .mname { color: var(--muted); }
.ib.share { width: auto; min-width: 32px; padding: 0 6px; gap: 4px; display: inline-flex; align-items: center; }
.ib.share .n { font-size: 12px; font-weight: 600; }
.ib.share.on { color: var(--accent-text); }

/* Équipes : groupe de la barre, page (onglets Projets / Personnes), liens d'invitation, paramètres */
a.grp.team { gap: 6px; text-decoration: none; border-radius: 6px; margin-top: 6px; padding: 8px 8px 4px; }
a.grp.team:hover { color: var(--text); }
a.grp.team.on { color: var(--accent-text); }
a.grp.team span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acts-in { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -6px 0 14px; }
.tab { border: 0; background: none; padding: 8px 10px; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent;
  margin-bottom: -1px; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.tprojs { display: flex; flex-direction: column; }
.trow { display: flex; align-items: center; gap: 9px; padding: 10px 8px; border-bottom: 1px solid var(--line); color: var(--text);
  text-decoration: none; }
.trow:hover { background: var(--hover); }
.trow .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-people { max-width: 640px; }
.member select.role { width: auto; padding: 4px 8px; font-size: 13px; }
.links { max-width: 640px; margin-top: 18px; }
.links .lab { display: flex; align-items: center; gap: 4px; }
.links > .chip { align-self: flex-start; }
.linkrow { display: flex; align-items: center; gap: 8px; }
.linkitem { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 6px; }
.link-uses { font-size: 12.5px; }
.link-old { flex: 1; min-width: 0; font-size: 13px; }
.linkrow .btn { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.linkrow .input { flex: 1; min-width: 0; font-size: 13px; }
.row-end { display: flex; justify-content: flex-end; margin-top: 12px; }
.newteam .input { margin-top: 10px; }
.db .lab + .input, .db .lab + textarea.input { margin: 4px 0 10px; }
.danger-zone { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }

/* Glisser pour ranger (page d'un projet) : poignée au survol, ligne attrapée pâlie, trait là où elle sera posée */
.row[draggable="true"] { position: relative; }
.row[draggable="true"]::before { content: ''; position: absolute; left: -16px; top: 50%; width: 8px; height: 14px; margin-top: -7px;
  opacity: 0; cursor: grab; background-image: radial-gradient(circle, var(--muted) 1.2px, transparent 1.3px); background-size: 4px 4px; }
.row[draggable="true"]:hover::before { opacity: .7; }
.row.dragging { opacity: .35; }
.row.drop-before { box-shadow: inset 0 2px 0 var(--accent); }
.row.drop-after { box-shadow: inset 0 -2px 0 var(--accent); }
.dropzone { min-height: 12px; border-radius: 6px; }
.dragging-task .dropzone:empty { outline: 1px dashed var(--line); outline-offset: -2px; }
.sech.droph.drop-end { color: var(--accent-text); box-shadow: inset 0 -2px 0 var(--accent); }
.dropzone.drop-end { box-shadow: inset 0 -2px 0 var(--accent); background: var(--accent-bg); }

/* « … » des projets et des équipes dans la barre de gauche (au survol), menu court, renommer sur place */
.projrow { position: relative; display: flex; align-items: center; }
.projrow > .nav, .projrow > .grp { flex: 1; min-width: 0; }
.projrow .morewrap { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); }
/* Menu « … » ouvert : sa ligne passe devant les suivantes (le décalage crée un contexte d'empilement) */
.projrow.open, .morewrap:has(> .menu) { z-index: 40; }
.teamrow .morewrap { top: calc(50% + 3px); }
.ib.more { width: 28px; height: 28px; opacity: 0; color: var(--muted); }
.projrow:hover .ib.more, .projrow:focus-within .ib.more, .ib.more.on { opacity: 1; }
.projrow:hover .nav .count, .projrow.open .nav .count { visibility: hidden; }
.ph .morewrap { position: relative; }
.ph .ib.more, .row .acts .ib.more { opacity: 1; }
@media (hover: none) { .ib.more { opacity: 1; } .projrow .nav .count { margin-right: 26px; } }
.proj-menu { top: calc(100% + 4px); right: 0; min-width: 220px; }
.mi.danger { color: var(--late); }
.mconfirm { margin: 4px 6px 10px; font-size: 13.5px; max-width: 260px; }
.proj-menu .row-end { display: flex; justify-content: flex-end; gap: 6px; padding: 0 4px 2px; }
.nav.addteam { color: var(--muted); font-size: 13.5px; }
.nav.addteam:hover { color: var(--text); }
.newproj.rename { padding: 2px 4px; }

/* Ajout d'une tâche comme dans Todoist (composer.js) : en place sous une liste ou dans la fenêtre d'ajout rapide */
.composer { display: flex; flex-direction: column; }
.composer .cbody { padding: 12px 14px 2px; display: flex; flex-direction: column; gap: 4px; }
.composer .cbody .parsed { margin-top: 2px; }
.composer .cbar { display: flex; align-items: center; gap: 6px; padding: 8px 10px 10px 12px; flex-wrap: wrap; }
.composer .cbar .sp { flex: 1; }
.composer.inline { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); margin: 8px 0 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05); }
.composer.inline:focus-within { border-color: color-mix(in srgb, var(--muted) 55%, var(--line)); }
.composer .quick { font-size: 15px; padding: 2px 0; }
.composer .quick::placeholder { color: var(--muted); font-weight: 400; }
.projchip { position: relative; max-width: 200px; }
.projchip .cl, .datechip .cl, .whochip .cl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.datewrap { display: inline-flex; align-items: center; }
.datechip.set { padding-right: 26px; }
.datechip.set.today { color: var(--today); }
.datechip.set.tomorrow { color: var(--warn); }
.datechip.set.late { color: var(--late); }
.chipx { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; border: 0; padding: 0;
  background: none; color: var(--muted); border-radius: 4px; display: grid; place-items: center; cursor: pointer; }
.chipx:hover { background: var(--hover); color: var(--text); }
.chip.prio { gap: 4px; }
.chip.prio svg:last-child { opacity: .7; }
.ib.cancel { width: 30px; height: 30px; }
.sendbtn { width: 34px; height: 30px; border-radius: 8px; border: 0; background: var(--accent); color: #FFFFFF; display: grid;
  place-items: center; cursor: pointer; flex: none; padding: 0; }
.sendbtn:hover { filter: brightness(.94); }
.sendbtn:disabled { opacity: .4; cursor: default; filter: none; }

/* Choix d'une date (datepick.js) */
.datepick { top: calc(100% + 6px); left: 0; width: 264px; padding: 0 0 6px; overflow: hidden; }
.datepick.end { left: auto; right: 0; }
.dp-head { padding: 10px 14px; font-size: 13.5px; font-weight: 600; border-bottom: 1px solid var(--line); }
.dp-quick { padding: 6px; border-bottom: 1px solid var(--line); }
.dp-quick .mi { padding: 6px 8px; }
.dp-quick .ml { flex: 1; text-align: left; }
.dp-wd { font-size: 12px; color: var(--muted); text-transform: capitalize; }
.dp-q.today svg { color: var(--today); }
.dp-q.sun svg { color: var(--warn); }
.dp-q.couch svg { color: #3B82C4; }
.dp-q.upcoming svg { color: #8B5CC4; }
.dp-q.nodate svg { color: var(--muted); }
.dp-cal { padding: 6px 10px 4px; }
.dp-mh { display: flex; align-items: center; gap: 2px; font-size: 13px; font-weight: 600; padding: 0 0 4px 4px; }
.dp-mh span { flex: 1; }
.dp-mh .ib { width: 26px; height: 26px; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.dp-dn { font-size: 11px; color: var(--muted); padding: 2px 0; text-transform: uppercase; }
.dp-d { border: 0; background: none; height: 30px; border-radius: 50%; font-size: 12.5px; color: var(--text); cursor: pointer; padding: 0;
  font-variant-numeric: tabular-nums; }
.dp-d:hover { background: var(--hover); }
.dp-d.past { color: var(--muted); }
.dp-d.today { color: var(--accent-text); font-weight: 700; }
.dp-d.on { background: var(--accent); color: #FFFFFF; font-weight: 600; }
.dp-time { display: flex; align-items: center; gap: 8px; margin: 6px 10px 0; padding: 6px 10px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 13px; color: var(--muted); }
.dp-time span { flex: 1; }
.dp-timein { border: 0; background: none; font: inherit; color: var(--text); }

/* Ligne de tâche : poignée pour glisser et icônes au survol (comme Todoist) */
.row .grip { position: absolute; left: -22px; top: 11px; color: var(--muted); opacity: 0; transition: opacity .12s; cursor: grab; }
.row:hover .grip { opacity: .8; }
.row .acts .ib.on { background: var(--hover); color: var(--text); }
@media (hover: none) { .row .grip { display: none; } }

/* Barre d'ajout : mots compris surlignés dans le titre (calque derrière le champ, même police et mêmes marges) */
.tiwrap { position: relative; }
.tiwrap .quick { font-family: var(--font); line-height: 22px; letter-spacing: normal; }
.tiwrap .hl { position: absolute; inset: 0; white-space: pre; overflow: hidden; pointer-events: none; color: var(--text); }
.tiwrap:not(.hlon) .hl { display: none; }
.tiwrap.hlon input.quick { position: relative; color: transparent; caret-color: var(--text); }
.tiwrap.hlon input.quick::placeholder { color: var(--muted); }
.hl .mk { border-radius: 4px; background: var(--mk-word-bg); color: var(--mk-word); }
.hl .mk.date, .hl .mk.recurrence { background: var(--mk-date-bg); color: var(--mk-date); }
.hl .mk.rappel { background: var(--mk-rem-bg); color: var(--mk-rem); }
.hl .mk.personne, .hl .mk.note { background: var(--mk-who-bg); color: var(--mk-who); }
.hl .mk.priorite, .hl .mk.correction { background: var(--mk-fix-bg); color: var(--mk-fix); }
/* Liste du @ > # sous le titre */
.suggest { top: calc(100% + 4px); left: 0; min-width: 240px; max-width: 340px; max-height: 280px; overflow-y: auto; padding: 4px; }
.suggest .mi, .choice .mi { cursor: pointer; }
.suggest .mi[aria-selected="true"], .choice .mi[aria-selected="true"] { background: var(--hover); }
.suggest .ml, .choice .ml { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av.xs { width: 18px; height: 18px; font-size: 8.5px; flex: none; }
/* Liste de choix avec recherche (projet, responsable) */
.choice { top: calc(100% + 6px); left: 0; width: 280px; padding: 0 0 4px; overflow: hidden; }
.choice-q { display: block; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; padding: 10px 12px; outline: none; }
.choice-list { max-height: 300px; overflow-y: auto; padding: 4px; }
.choice-g { font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px 4px; }
.choice .mi.on .ml { font-weight: 600; }
.choice .mi svg:last-child:not(:first-child) { color: var(--accent-text); }
.choice-none { padding: 10px 12px; font-size: 13px; }
.projchip, .whochip { max-width: 220px; }
.whochip.set { color: var(--mk-who); }
/* « Abandonner ce que tu as tapé ? » */
.composer { position: relative; }
.composer .discard { position: absolute; z-index: 35; right: 10px; bottom: 10px; width: min(320px, calc(100% - 20px)); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.composer .discard .row-end { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
/* Pastilles à gauche (elles passent à la ligne entre elles), ✕ et le bouton rond toujours à droite */
.composer .cbar { flex-wrap: nowrap; align-items: flex-end; }
.composer .cbar .chips { flex: 1 1 auto; min-width: 0; }
.composer .cend { display: flex; align-items: center; gap: 6px; flex: none; }
.wordchips { display: contents; }
.chip.word { max-width: 180px; cursor: default; }
.chip.word .cl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.word .x { border: 0; background: none; padding: 0 0 0 2px; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.chip.word .x:hover { color: var(--text); }
/* Le surlignage déborde un peu du mot (ombre), sans décaler le texte sous le champ */
.hl .mk { box-shadow: 0 0 0 2px var(--mk-word-bg); }
.hl .mk.date, .hl .mk.recurrence { box-shadow: 0 0 0 2px var(--mk-date-bg); }
.hl .mk.rappel { box-shadow: 0 0 0 2px var(--mk-rem-bg); }
.hl .mk.personne, .hl .mk.note { box-shadow: 0 0 0 2px var(--mk-who-bg); }
.hl .mk.priorite, .hl .mk.correction { box-shadow: 0 0 0 2px var(--mk-fix-bg); }
@media (max-width: 560px) { .composer .cbar { flex-wrap: wrap; } .composer .cend { margin-left: auto; } }

/* Paramètres (comme Todoist) : grande fenêtre, rubriques à gauche avec une recherche, contenu à droite */
.dialog.settings { max-width: 980px; height: min(720px, 86vh); display: flex; overflow: hidden; }
.scrim:has(.dialog.settings) { padding-top: 6vh; }
.st { display: flex; width: 100%; min-height: 0; }
.st-side { width: 240px; flex: none; background: var(--side); border-right: 1px solid var(--line); padding: 14px 10px; display: flex;
  flex-direction: column; gap: 8px; overflow-y: auto; }
.st-title { font-weight: 700; font-size: 15px; padding: 2px 6px 4px; }
.st-q { padding: 6px 9px; font-size: 13px; }
.st-nav { display: flex; flex-direction: column; gap: 1px; }
.st-g { font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 12px 8px 4px; text-transform: uppercase; letter-spacing: .03em; }
.st-i { display: flex; align-items: center; gap: 9px; border: 0; background: none; padding: 7px 8px; border-radius: 6px; font-size: 13.5px;
  color: var(--text); text-align: left; width: 100%; }
.st-i svg { color: var(--muted); flex: none; }
.st-i:hover { background: var(--hover); }
.st-i.on { background: var(--accent-bg); color: var(--accent-text); font-weight: 600; }
.st-i.on svg { color: var(--accent-text); }
.st-none { padding: 6px 8px; font-size: 13px; }
.st-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.st-head { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px 24px; border-bottom: 1px solid var(--line); }
.st-head h2 { margin: 0; font-size: 17px; font-weight: 700; flex: 1; }
.st-body { padding: 18px 24px 28px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.st-row { display: flex; align-items: center; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.st-lab { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; font-weight: 500; }
.st-lab .muted { font-weight: 400; font-size: 12.5px; }
.st-ctl { flex: none; max-width: 60%; display: flex; justify-content: flex-end; }
.st-ctl .input { width: auto; min-width: 220px; max-width: 100%; padding: 6px 9px; font-size: 13.5px; }
.st-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-inline .input { min-width: 0; width: auto; }
.st-p { margin: 4px 0 6px; font-size: 13px; line-height: 1.5; }
.input.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
#st-mail-addr.input { width: min(320px, 60vw); }
.st-h { font-size: 14px; font-weight: 650; margin: 18px 0 2px; }
.st-h:first-child { margin-top: 0; }
.st-sub { margin-top: 18px; }
.st-sub:first-child { margin-top: 0; }
.st-sub p { margin: 2px 0 8px; font-size: 12.5px; }
.st-foot { margin-top: 14px; font-size: 12.5px; }
.st-me { display: flex; align-items: center; gap: 12px; padding: 4px 0 12px; }
.av.lg { width: 44px; height: 44px; font-size: 16px; }
.st-warn { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn);
  font-size: 13px; margin: 4px 0 8px; }
.st-add { padding: 10px 0; font-size: 13.5px; text-align: left; }
.st-form { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 8px 0; display: flex; flex-direction: column; }
.st-form h4 { margin: 0 0 2px; font-size: 13.5px; }
.st-form .st-row:last-of-type { border-bottom: 0; }
.st-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 10px; }
.st-ok { display: flex; flex-direction: column; gap: 8px; padding: 8px 0; font-size: 13px; }
.st-ok p { margin: 0; }
.switch { appearance: none; -webkit-appearance: none; width: 34px; height: 20px; border-radius: 10px; background: #CFCAC4; position: relative;
  cursor: pointer; flex: none; margin: 0; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #FFFFFF;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(14px); }
.switch:disabled { opacity: .45; cursor: default; }
.badge { display: inline-flex; align-items: center; font-size: 12px; padding: 1px 8px; border-radius: 10px; white-space: nowrap; }
.badge.ok { background: rgba(30, 123, 71, .13); color: var(--today); }
.badge.bad { background: rgba(194, 38, 28, .12); color: var(--late); }
.badge.unk { background: var(--surface2); color: var(--muted); }
.eng { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.eng-main { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; font-size: 13.5px; }
.eng-url { font-size: 12.5px; overflow-wrap: anywhere; }
.eng-act { display: flex; align-items: center; gap: 8px; }
.pp-bar { display: flex; align-items: center; gap: 12px; margin: 8px 0 4px; }
.pp-bar .input { flex: 1; padding: 6px 9px; font-size: 13.5px; }
.pp-bar .st-add { padding: 0; white-space: nowrap; }
.pp { border-bottom: 1px solid var(--line); padding: 9px 0; }
.pp-main { display: flex; align-items: center; gap: 10px; }
.pp-who { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13.5px; }
.pp-who .muted { font-size: 12.5px; overflow-wrap: anywhere; }
.plan-ed { margin: 10px 0 2px 36px; gap: 10px; }
.plan-pick { display: flex; gap: 18px; }
.plan-pick .check { color: var(--text); font-size: 13.5px; }
.plan-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.plan-card.on { border-color: var(--accent); background: var(--accent-bg); }
.plan-card strong { color: var(--accent-text); }
@media (max-width: 720px) {
  .dialog.settings { height: auto; max-height: 92vh; flex-direction: column; }
  .st { flex-direction: column; }
  .st-side { width: auto; border-right: 0; border-bottom: 1px solid var(--line); max-height: 38vh; }
  .st-nav { flex-direction: row; flex-wrap: wrap; }
  .st-i { width: auto; }
  .st-g { width: 100%; padding-top: 6px; }
  .st-row { flex-wrap: wrap; }
  .st-ctl { max-width: 100%; width: 100%; justify-content: flex-start; }
  .plan-ed { margin-left: 0; }
}
.st-note { font-size: 12.5px; margin: 8px 0 0; }

/* Membre IA : avatar à étincelle, réponse et propositions qu'on change en tâche */
.ai-av { background: var(--accent-bg) !important; color: var(--accent-text); display: inline-grid; place-items: center; }
.cmt.ai .cmt-head strong { color: var(--accent-text); }
.cmt-lab { display: flex; align-items: center; gap: 6px; }
.cmt-lab .ai-ask { margin-left: auto; }
.chip.ai-ask { padding: 3px 10px; font-size: 12.5px; gap: 5px; }
.cmt-input { position: relative; }
.cmt-suggest { position: absolute; left: 0; bottom: calc(100% + 4px); min-width: 220px; z-index: 30; }
.cmt-suggest .mi { display: flex; align-items: center; gap: 8px; width: 100%; }
.ai-text { white-space: normal; }
.ai-gap { height: 6px; }
.ai-prop { display: flex; align-items: baseline; gap: 8px; padding: 2px 0; }
.ai-prop .ai-dot { width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid var(--accent-text); flex: none; transform: translateY(-1px); }
.ai-prop-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ai-prop.done .ai-prop-text { color: var(--muted); }
.ai-prop.done .ai-dot { background: var(--accent-text); }
.ai-make { font-size: 12.5px; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.ai-thinking { display: flex; align-items: center; gap: 8px; }
.ai-pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-text); animation: ai-pulse 1.2s ease-in-out infinite; }
@keyframes ai-pulse { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .ai-pulse { animation: none; } }
.team-ai { margin-top: 14px; }

/* Barre d'ajout : petites fenêtres du « + » (priorité, rappels, où, étiquettes) */
.addpop { top: calc(100% + 6px); left: 0; width: 300px; max-width: calc(100vw - 32px); display: flex; flex-direction: column; gap: 6px; }
.addpop-head { font-size: 12.5px; font-weight: 650; color: var(--muted); padding: 2px 4px; }
.addpop-sec { display: flex; flex-direction: column; gap: 6px; padding: 4px; }
.addpop-sec + .addpop-sec { border-top: 1px solid var(--line); padding-top: 8px; }
.addpop-lab { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.addpop-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.addpop-row { display: flex; gap: 6px; align-items: center; }
.addpop-row .input { flex: 1; min-width: 0; padding: 5px 8px; font-size: 13px; }
.addpop-row .btn { flex: none; }
.addpop-hint { font-size: 12px; margin: 0 4px; }
.addpop-seg { align-self: flex-start; margin: 0 4px; }
.addpop .choice-list { max-height: 240px; overflow: auto; }
.addpop .mi.on { font-weight: 600; }
.addpop .mi .sub { display: block; font-size: 12px; }
.flagic { display: inline-flex; }
.flagic.p1 { color: var(--late); }
.flagic.p4 { color: var(--muted); }
.addpop .ml { flex: 1; min-width: 0; text-align: left; }

/* Ma boîte : tâches terminées repliables, blocs suivants */
.sech.donehead { width: 100%; border: 0; background: none; color: var(--text); font: inherit; font-weight: 650; font-size: 14px;
  cursor: pointer; text-align: left; margin-top: 18px; border-bottom: 1px solid var(--line); }
.sech.donehead:hover { color: var(--accent-text); }
.sech.donehead:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.row.isdone .rowmain { opacity: .85; }
.row.isdone .circle.done:hover { background: none; color: var(--muted); }
.donewait { padding: 10px 4px; font-size: 13.5px; }
.addline.more { color: var(--muted); font-size: 13.5px; justify-content: center; }

/* Fiche d'une tâche en deux colonnes (comme Todoist) : contenu à gauche, détails à droite */
.dialog.taskdlg { max-width: 920px; }
.tsheet { display: grid; grid-template-columns: minmax(0, 1fr) 270px; min-height: 420px; }
.tmain { min-width: 0; }
.tside { background: var(--side); border-left: 1px solid var(--line); border-radius: 0 0 12px 0; padding: 8px 14px 16px;
  display: flex; flex-direction: column; font-size: 13.5px; }
.sideitem { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sideitem:last-child { border-bottom: 0; }
.sideitem[hidden] { display: none; }
.sideitem .lab { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.sideitem .input { padding: 5px 8px; font-size: 13.5px; background: transparent; border-color: transparent; }
.sideitem .input:hover, .sideitem .input:focus { background: var(--surface); border-color: var(--line); }
.sideitem .datepair { display: flex; flex-wrap: wrap; gap: 6px; }
.sideitem .datepair .input[type=date] { flex: 1 1 130px; }
.sideitem .datepair .input[type=time] { flex: 0 1 100px; }
.sideitem .quickdates { display: flex; flex-wrap: wrap; gap: 4px; }
.sideitem .quickdates .chip { font-size: 12px; padding: 2px 8px; }
.sideitem .rem-add { max-width: none; }
@media (max-width: 760px) {
  .tsheet { grid-template-columns: 1fr; }
  .tside { border-left: 0; border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; }
}

/* « L'IA propose » : panneau à droite d'un projet à plusieurs (Daniel, 09.11.2026) */
.page:has(.with-ai) { max-width: 1160px; }
.with-ai { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.with-ai-main { flex: 999 1 480px; min-width: 0; }
.aipanel { flex: 1 1 300px; max-width: 380px; position: sticky; top: 12px; box-sizing: border-box; display: flex; flex-direction: column;
  gap: 12px; padding: 18px 16px; background: var(--side); border: 1px solid var(--line); border-radius: 14px; margin-top: 8px;
  max-height: calc(100vh - 24px); overflow-y: auto; }
.aih { display: flex; align-items: center; gap: 10px; }
.aih .ib { margin-left: auto; }
.aihx { display: flex; flex-direction: column; min-width: 0; }
.aihx h2 { margin: 0; font-size: 15px; font-weight: 700; }
.aihx span { font-size: 12px; color: var(--muted); }
.aiav { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--text); color: var(--bg); font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; }
.aiav.sm { width: 20px; height: 20px; font-size: 9px; }
.aic { display: flex; flex-direction: column; gap: 6px; padding: 12px 13px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 1px 3px rgba(0, 0, 0, .05); }
.aic-new { animation: aiin .22s ease-out; }
@keyframes aiin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.aik { align-self: flex-start; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; padding: 2px 8px;
  border-radius: 999px; background: var(--surface2); color: var(--muted); }
.aic-group .aik { background: var(--mk-who-bg); color: var(--mk-who); }
.aic-idea .aik { background: var(--accent-bg); color: var(--accent-text); }
.aic-question .aik { background: var(--mk-rem-bg); color: var(--mk-rem); }
.aic-duplicate .aik { background: var(--mk-fix-bg); color: var(--mk-fix); }
.ait { font-size: 14px; font-weight: 600; line-height: 1.35; }
.aid { font-size: 13px; color: var(--muted); line-height: 1.4; }
.ain { font-size: 12px; color: var(--muted); font-style: italic; }
.aib { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 2px; }
.aib .btn { min-height: 34px; font-size: 13px; padding: 0 12px; }
.aiw { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.aidot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: aipulse 1s ease-in-out infinite alternate; }
@keyframes aipulse { from { opacity: .3; } to { opacity: 1; } }
.aiempty { font-size: 13px; color: var(--muted); text-align: center; padding: 14px 6px; line-height: 1.45; }
.aierr { font-size: 13px; color: var(--late); }
.aifoot { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.aiask { display: flex; flex-direction: column; gap: 6px; }
.ail { font-size: 12px; font-weight: 600; color: var(--muted); }
.ainote { font-size: 11.5px; color: var(--muted); line-height: 1.4; }
#ai-open .badge { background: var(--accent); color: #FFFFFF; padding: 0 7px; }
@media (max-width: 820px) { .aipanel { position: static; max-width: none; max-height: none; } }
@media (prefers-reduced-motion: reduce) { .aic-new, .aidot { animation: none; } }
