/* ---------- tokens ---------- */
:root {
  --bg: #F1F3F6;          /* porcelaine */
  --surface: #FFFFFF;
  --sunk: #E7EAF0;
  --ink: #121A2E;         /* encre */
  --ink-2: #4A5468;
  --muted: #7D8699;
  --line: #DCE0E8;
  --grid: #E6E9EF;
  --rail: #C9CFDA;
  --action: #22407f;      /* bleu AMN */
  --action-ink: #FFFFFF;
  --now: #F0A500;         /* ambre : maintenant / bientôt / en attente */
  --now-soft: #FFF3D6;
  --late: #D63B32;
  --late-soft: #FDECEA;
  --ok: #13895A;
  --ok-soft: #E2F4EB;
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --text: "Figtree", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --r-lg: 18px; --r-md: 12px; --r-sm: 8px;
  --shadow: 0 12px 40px rgba(18, 26, 46, .16), 0 2px 6px rgba(18, 26, 46, .06);
  --tab-on: #FFFFFF;
  --hour: 52px;
  --gutter: 54px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0D1220; --surface: #161D2E; --sunk: #1E2638; --ink: #EEF1F7; --ink-2: #B5BDCC; --muted: #8590A5;
    --line: #263049; --grid: #1F283B; --rail: #34405C; --action: #8EA8FF; --action-ink: #0D1220;
    --now: #FFB627; --now-soft: #3A2C0C; --late: #FF7468; --late-soft: #3A1A1A; --ok: #4CD08F; --ok-soft: #12301F;
    --shadow: 0 12px 40px rgba(0, 0, 0, .5); --tab-on: #2E3955;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); font: 15px/1.45 var(--text); -webkit-font-smoothing: antialiased; }
body { overflow: hidden; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
input, select, textarea { font: inherit; color: var(--ink); }
a { color: var(--action); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; border-radius: 6px; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- éléments communs ---------- */
.field { width: 100%; padding: 10px 12px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); font-size: 15px; min-width: 0; }
.field:focus { outline: none; border-color: var(--action); box-shadow: 0 0 0 3px color-mix(in srgb, var(--action) 18%, transparent); }
textarea.field { resize: vertical; min-height: 64px; }
.lbl { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 12px 0 5px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 16px; border-radius: var(--r-md); font-weight: 600; white-space: nowrap; }
.btn.small { height: 34px; padding: 0 12px; font-size: 14px; }
.btn.wide { width: 100%; height: 46px; }
.btn.primary { background: var(--action); color: var(--action-ink); }
.btn.ghost { border: 1px solid var(--line); background: var(--surface); }
.btn.soft { background: var(--sunk); }
.btn.danger { color: var(--late); }
.btn.ok { background: var(--ok); color: #fff; }
.btn:disabled { opacity: .5; cursor: default; }
.iconbtn { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); flex: none; position: relative; }
.iconbtn:hover { background: var(--sunk); }
.iconbtn svg.i { width: 20px; height: 20px; }
.pill { height: 34px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); font-weight: 600; font-size: 14px; background: var(--surface); }
.linkbtn { color: var(--action); font-weight: 600; font-size: 13px; }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--sunk); }
.seg button { height: 30px; padding: 0 12px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--muted); }
.seg button.on { background: var(--tab-on); color: var(--ink); box-shadow: 0 1px 3px rgba(18, 26, 46, .1); }
.badge { position: absolute; top: 2px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--late); color: #fff; font: 700 11px/17px var(--text); text-align: center; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; color: #fff; font: 700 12px var(--display); background: var(--action); }
.avatar.sm { width: 20px; height: 20px; font-size: 10px; }
.avatar.lg { width: 40px; height: 40px; font-size: 15px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border-radius: 9px; background: var(--sunk); font-size: 14px; font-weight: 500; color: var(--ink-2); }
.chip.on { background: var(--action); color: var(--action-ink); }
.chip .avatar { margin-left: -4px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.err { color: var(--late); min-height: 1.3em; margin-top: 8px; font-size: 14px; }
.muted { color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 40px 20px; }
.empty b { display: block; font: 700 18px var(--display); color: var(--ink); margin-bottom: 4px; }

/* ---------- connexion ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px; overflow: auto; height: 100%; }
.auth-card { width: min(400px, 100%); }
.mark { width: 54px; height: 54px; border-radius: 16px; background: var(--action); display: grid; place-items: center; margin-bottom: 20px; }
.mark svg { width: 30px; height: 30px; stroke: var(--action-ink); stroke-width: 2.2; }
.auth h1 { font: 800 38px/1.02 var(--display); letter-spacing: -.02em; margin: 0 0 8px; }
.auth p { color: var(--ink-2); margin: 0 0 12px; }

/* ---------- structure ---------- */
.app { display: grid; grid-template-columns: 296px minmax(0, 1fr); height: 100dvh; }
.side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--bg); }
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); }

.side-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 6px 14px; }
.me { display: flex; align-items: center; gap: 9px; font: 700 16px var(--display); min-width: 0; }
.me span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick { margin: 6px 12px 4px; display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 42px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.quick:focus-within { border-color: var(--action); }
.quick input { border: 0; background: none; height: 38px; width: 100%; font-size: 15px; min-width: 0; }
.quick input:focus { outline: none; }
.side-scroll { overflow-y: auto; flex: 1; padding: 0 12px 24px; }
.side-title { display: flex; align-items: center; gap: 8px; font: 700 15px var(--display); color: var(--ink-2); margin: 18px 2px 8px; }
.side-title .count { font: 600 12px var(--text); color: var(--muted); }
.side-title > :last-child:not(.count) { margin-left: auto; }
.fold { display: inline-flex; gap: 8px; align-items: baseline; font: inherit; color: inherit; }
.side-empty { font-size: 13px; color: var(--muted); margin: 4px 2px; }
.plan-btn { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px; border-radius: 8px; background: var(--now-soft); color: color-mix(in srgb, var(--now) 55%, var(--ink)); font: 700 13px var(--text); }
.plan-btn svg.i { width: 15px; height: 15px; }

/* cartes de la barre latérale */
.bl-list, .req-list, .sent-list, .member-list { list-style: none; margin: 0; padding: 0; }
.card { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 2px 10px; align-items: start; padding: 10px 10px 10px 12px;
  border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); margin-bottom: 6px; cursor: grab; touch-action: pan-y; user-select: none; }
.card:hover { border-color: var(--rail); }
.card .prio { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; border: 2px solid var(--rail); }
.card .prio.p1 { border-color: var(--late); background: var(--late); }
.card .prio.p2 { border-color: var(--action); }
.card .prio.p3 { border-color: var(--rail); }
.card .ttl { font-weight: 600; font-size: 14.5px; line-height: 1.3; overflow-wrap: anywhere; }
.card .sub { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 12.5px; color: var(--muted); }
.card .sub span { display: inline-flex; align-items: center; gap: 3px; }
.card .sub svg.i { width: 13px; height: 13px; }
.card .sub .due-soon { color: color-mix(in srgb, var(--now) 60%, var(--ink)); font-weight: 600; }
.card .sub .due-late { color: var(--late); font-weight: 600; }
.card.dragging { opacity: .35; }
.card .sched { position: absolute; right: 8px; top: 8px; display: none; }
@media (hover: none) { .card .sched { display: block; } }
.req { cursor: default; grid-template-columns: 1fr; background: color-mix(in srgb, var(--now-soft) 70%, var(--surface)); border-color: color-mix(in srgb, var(--now) 40%, var(--line)); }
.req .who { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.req .sub { grid-column: 1; }
.req .acts { display: flex; gap: 6px; margin-top: 6px; }
.req .acts .btn { height: 30px; font-size: 13px; padding: 0 10px; }
.sent-item { display: flex; align-items: center; gap: 8px; padding: 7px 4px; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.sent-item .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-badge { font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--sunk); color: var(--ink-2); white-space: nowrap; }
.st-badge.pending { background: var(--now-soft); color: color-mix(in srgb, var(--now) 60%, var(--ink)); }
.st-badge.ok { background: var(--ok-soft); color: var(--ok); }
.st-badge.declined, .st-badge.missed { background: var(--late-soft); color: var(--late); }
.member { display: flex; align-items: center; gap: 9px; padding: 5px 4px; border-radius: 10px; }
.member .nm { flex: 1; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member .iconbtn { width: 30px; height: 30px; }
.member .iconbtn svg.i { width: 17px; height: 17px; }
.member .iconbtn.on { background: var(--sunk); color: var(--action); }

/* ---------- barre du haut ---------- */
.bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.bar-nav, .bar-actions { display: flex; align-items: center; gap: 6px; min-width: 0; }
.range-label { font: 800 22px/1.1 var(--display); letter-spacing: -.02em; margin: 0 0 0 8px; white-space: nowrap; }
.range-label small { font: 500 15px var(--text); color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.banner { margin: 8px 14px 0; padding: 10px 14px; border-radius: var(--r-md); background: var(--now-soft); display: flex; align-items: center; gap: 12px; font-size: 14px; }
.banner span { flex: 1; }
.banner button { background: var(--ink); color: var(--bg); padding: 7px 12px; border-radius: 9px; font-weight: 600; }
.week-strip { display: none; }
.plan-bar { display: flex; align-items: center; gap: 10px; margin: 8px 14px 0; padding: 10px 12px 10px 14px; border-radius: var(--r-md); background: var(--ink); color: var(--bg); font-size: 14px; flex-wrap: wrap; }
.plan-bar b { font: 700 15px var(--display); }
.plan-bar .sp { flex: 1; }
.plan-bar .btn { height: 32px; font-size: 14px; }
.plan-bar .btn.soft { background: color-mix(in srgb, var(--bg) 18%, transparent); color: var(--bg); }
.plan-bar .warn { color: var(--now); }

/* ---------- calendrier ---------- */
.cal-wrap { flex: 1; min-height: 0; display: flex; }
.cal { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.cal-head, .cal-allday { display: grid; grid-template-columns: var(--gutter) repeat(var(--days), minmax(0, 1fr)); }
.cal-head { border-bottom: 1px solid var(--line); }
.dh { padding: 8px 6px 6px; text-align: center; border-left: 1px solid var(--grid); cursor: pointer; }
.dh .wd { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.dh .dn { font: 700 20px/1.1 var(--display); display: inline-grid; place-items: center; min-width: 34px; height: 34px; border-radius: 10px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.dh.today .dn { background: var(--now); color: #1b1300; }
.dh.past .dn, .dh.past .wd { color: var(--muted); }
.dh .load { height: 3px; border-radius: 2px; background: var(--grid); margin: 6px 10px 0; overflow: hidden; }
.dh .load i { display: block; height: 100%; background: var(--action); opacity: .6; }
.dh .load i.over { background: var(--late); opacity: .8; }
.cal-allday { border-bottom: 1px solid var(--line); min-height: 30px; max-height: 120px; overflow-y: auto; }
.cal-allday .gut { font-size: 11px; color: var(--muted); text-align: right; padding: 6px 6px 0 0; }
.ad { border-left: 1px solid var(--grid); padding: 3px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ad-item { display: flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 7px; font-size: 12.5px; font-weight: 600; background: var(--sunk); cursor: pointer; min-width: 0; }
.ad-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-item svg.i { width: 13px; height: 13px; }
.ad-item.due { background: var(--now-soft); color: color-mix(in srgb, var(--now) 55%, var(--ink)); }
.ad-item.due.late { background: var(--late-soft); color: var(--late); }
.ad-item.done { opacity: .55; text-decoration: line-through; }
.ad-item .ck { width: 13px; height: 13px; border-radius: 50%; border: 1.6px solid currentColor; flex: none; }
.ad-item.done .ck { background: var(--ok); border-color: var(--ok); }
.ad-carry { font-size: 12px; color: var(--action); font-weight: 600; text-align: left; padding: 2px 6px; }

.cal-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; position: relative; overscroll-behavior: contain; }
.cal-body { display: grid; grid-template-columns: var(--gutter) repeat(var(--days), minmax(0, 1fr)); position: relative; height: calc(var(--hour) * 24); }
.hours { position: relative; }
.hours span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.col { position: relative; border-left: 1px solid var(--grid); touch-action: pan-y;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(color-mix(in srgb, var(--grid) 45%, transparent) 1px, transparent 1px);
  background-size: 100% var(--hour), 100% var(--hour); background-position: 0 0, 0 calc(var(--hour) / 2); }
.col { background-color: color-mix(in srgb, var(--sunk) 45%, var(--surface)); }
.col .work { position: absolute; left: 0; right: 0; background: var(--surface); pointer-events: none; z-index: 0;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(color-mix(in srgb, var(--grid) 45%, transparent) 1px, transparent 1px);
  background-size: 100% var(--hour), 100% var(--hour); background-position: 0 var(--wo, 0), 0 calc(var(--wo, 0) + var(--hour) / 2); }
.col.today .work { background-color: color-mix(in srgb, var(--now-soft) 30%, var(--surface)); }
.now-line { position: absolute; left: -1px; right: 0; height: 2px; background: var(--now); z-index: 6; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--now); box-shadow: 0 0 0 3px color-mix(in srgb, var(--now) 25%, transparent); }
.now-tag { position: absolute; right: 4px; transform: translateY(-50%); font: 800 11px var(--display); color: var(--now); font-variant-numeric: tabular-nums; z-index: 6; background: var(--surface); padding: 0 2px; }
.now-line.ghost { opacity: .35; }
.now-line.ghost::before { display: none; }

/* blocs */
.ev { --c: var(--action); position: absolute; z-index: 3; border-radius: 8px; padding: 3px 6px 3px 8px; overflow: hidden; font-size: 12.5px; line-height: 1.25;
  cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: pan-y; display: flex; flex-direction: column; gap: 1px;
  background: color-mix(in srgb, var(--c) 16%, var(--surface)); color: var(--ink); box-shadow: inset 3px 0 0 var(--c); border: 1px solid color-mix(in srgb, var(--c) 30%, transparent); }
.ev .t { font-weight: 650; overflow-wrap: anywhere; display: flex; gap: 5px; align-items: flex-start; }
.ev .t > span { min-width: 0; }
.ev .tm { font-size: 11.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev .who { display: flex; gap: 2px; margin-top: 1px; }
.ev.short { flex-direction: row; align-items: center; gap: 6px; padding-top: 0; padding-bottom: 0; }
.ev.short .t { flex: 1; min-width: 0; }
.ev.short .t > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.short .tm { flex: none; }
.ev.short .who { display: none; }
.ev.short .tm { order: 2; }
.ev.task { background: var(--surface); box-shadow: 0 1px 2px rgba(18, 26, 46, .08); border: 1px solid var(--line); border-left: 3px solid var(--c); padding-left: 6px; }
.ev .ck { width: 14px; height: 14px; border-radius: 50%; border: 1.7px solid var(--c); flex: none; margin-top: 1px; display: grid; place-items: center; background: var(--surface); }
.ev .ck svg { width: 10px; height: 10px; stroke-width: 3.2; opacity: 0; }
.ev.done { opacity: .55; }
.ev.done .t { text-decoration: line-through; }
.ev.done .ck { background: var(--ok); border-color: var(--ok); color: #fff; }
.ev.done .ck svg { opacity: 1; }
.ev.late { box-shadow: inset 3px 0 0 var(--late); border-color: color-mix(in srgb, var(--late) 45%, transparent); }
.ev.late .tm { color: var(--late); font-weight: 600; }
.ev.missed { background: repeating-linear-gradient(135deg, var(--late-soft) 0 6px, var(--surface) 6px 12px); }
.ev.pending { background: repeating-linear-gradient(135deg, var(--now-soft) 0 6px, var(--surface) 6px 12px); border: 1.5px dashed var(--now); box-shadow: none; }
.ev.guest { border-style: dashed; }
.ev.guest.invited { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 14%, var(--surface)) 0 6px, var(--surface) 6px 12px); }
.ev.ghost { z-index: 5; background: color-mix(in srgb, var(--now) 22%, var(--surface)); border: 1.5px dashed var(--now); box-shadow: none; cursor: grab; }
.ev.ghost .x { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: var(--surface); }
.ev.ghost .x svg { width: 12px; height: 12px; }
.ev.sel { z-index: 7; background: color-mix(in srgb, var(--action) 22%, var(--surface)); border: 1.5px solid var(--action); box-shadow: 0 6px 20px rgba(35, 64, 168, .25); pointer-events: none; }
.ev.moving { opacity: .9; z-index: 8; box-shadow: var(--shadow); }
.ev .rs { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; cursor: ns-resize; }
.ev.picked { outline: 2px solid var(--action); outline-offset: 1px; }
.busy { position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none; border-radius: 4px;
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 20%, transparent) 0 4px, transparent 4px 9px); border-left: 2px solid var(--c); }

/* ---------- popover de création rapide ---------- */
.popover { position: fixed; z-index: 40; width: 340px; max-width: calc(100vw - 24px); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 14px; }
.popover .when { font-size: 13px; color: var(--ink-2); margin: 6px 0 10px; display: flex; align-items: center; gap: 6px; }
.popover .ttl { width: 100%; border: 0; border-bottom: 2px solid var(--line); padding: 4px 0 6px; font: 700 18px var(--display); background: none; }
.popover .ttl:focus { outline: none; border-color: var(--action); }
.popover .row { display: flex; gap: 6px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.popover .row.end { justify-content: flex-end; }

/* ---------- fiches (dialog) ---------- */
.sheet-dlg { border: 0; padding: 0; width: min(560px, 100vw); max-height: min(92dvh, 900px); overflow: auto; border-radius: 22px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.sheet-dlg::backdrop { background: rgba(9, 13, 24, .45); }
@media (prefers-reduced-motion: no-preference) { .sheet-dlg[open] { animation: up .22s cubic-bezier(.2, .8, .2, 1); } @keyframes up { from { transform: translateY(24px); opacity: 0; } } }
.sheet { padding: 18px 20px calc(env(safe-area-inset-bottom) + 18px); }
.sheet h3 { font: 800 22px/1.15 var(--display); letter-spacing: -.02em; margin: 0 0 12px; }
.sheet .ttl-in { width: 100%; border: 0; border-bottom: 2px solid var(--line); padding: 4px 0 8px; font: 800 22px var(--display); letter-spacing: -.01em; background: none; }
.sheet .ttl-in:focus { outline: none; border-color: var(--action); }
.sheet .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.sheet .grid3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 0 10px; }
.sheet .grid2 > *, .sheet .grid3 > * { min-width: 0; }
.sheet .acts { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.sheet .acts .sp { flex: 1; }
.sheet .info { padding: 10px 12px; border-radius: var(--r-md); background: var(--sunk); font-size: 14px; margin-top: 10px; }
.sheet .info.amber { background: var(--now-soft); }
.sheet .info.red { background: var(--late-soft); }
.sheet .kv { display: flex; gap: 10px; align-items: center; padding: 6px 0; font-size: 14.5px; }
.sheet .kv svg.i { color: var(--muted); }
.person { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 14px; }
.person .nm { flex: 1; }
.dur-chips .chip, .prio-chips .chip { cursor: pointer; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.hint.warn { color: var(--late); }
.check-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 14.5px; }
.check-row input { width: 18px; height: 18px; accent-color: var(--action); }

/* ---------- tiroir messages / activité ---------- */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 400px; max-width: 100vw; z-index: 30; background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 10px 14px; border-bottom: 1px solid var(--line); }
.drawer-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.conv-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.conv { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; cursor: pointer; }
.conv:hover { background: var(--sunk); }
.conv .body { flex: 1; min-width: 0; }
.conv .nm { font-weight: 650; display: flex; justify-content: space-between; gap: 8px; }
.conv .nm small { font-weight: 500; color: var(--muted); font-size: 12px; white-space: nowrap; }
.conv .last { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv.unread .last { color: var(--ink); font-weight: 600; }
.conv .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--action); flex: none; }
.stack { display: flex; }
.stack .avatar { border: 2px solid var(--surface); margin-left: -8px; }
.stack .avatar:first-child { margin-left: 0; }
.drawer-foot { padding: 10px; border-top: 1px solid var(--line); }
.thread-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); font-weight: 650; }
.thread { flex: 1; overflow-y: auto; padding: 12px 12px 6px; display: flex; flex-direction: column; gap: 4px; }
.msg { max-width: 82%; align-self: flex-start; }
.msg.me { align-self: flex-end; }
.msg .bub { padding: 8px 12px; border-radius: 16px 16px 16px 4px; background: var(--sunk); font-size: 14.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg.me .bub { background: var(--action); color: var(--action-ink); border-radius: 16px 16px 4px 16px; }
.msg .who { font-size: 11.5px; color: var(--muted); margin: 6px 0 2px 6px; }
.msg .at { font-size: 11px; color: var(--muted); margin: 2px 6px 0; text-align: right; }
.msg .tcard { margin-top: 4px; padding: 9px 11px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-size: 13.5px; }
.msg .tcard b { display: block; font-size: 14px; }
.msg .tcard .btn { height: 28px; font-size: 12.5px; margin-top: 6px; padding: 0 10px; }
.day-sep { align-self: center; font-size: 12px; color: var(--muted); margin: 10px 0 4px; font-weight: 600; }
.composer { display: flex; gap: 6px; align-items: flex-end; padding: 8px 10px calc(env(safe-area-inset-bottom) + 8px); border-top: 1px solid var(--line); }
.composer textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 18px; padding: 9px 14px; max-height: 140px; min-height: 40px; background: var(--bg); font-size: 15px; }
.composer textarea:focus { outline: none; border-color: var(--action); }
.composer .send { width: 40px; height: 40px; border-radius: 50%; background: var(--action); color: var(--action-ink); display: grid; place-items: center; flex: none; }
.act-list { list-style: none; margin: 0; padding: 6px 10px 20px; overflow-y: auto; flex: 1; }
.act { display: flex; gap: 10px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.act .body { flex: 1; min-width: 0; font-size: 14px; }
.act .when { font-size: 12px; color: var(--muted); margin-top: 2px; }
.act.unread .body { font-weight: 600; }
.act .acts { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.act .acts .btn { height: 30px; font-size: 13px; padding: 0 10px; }

/* ---------- bilan ---------- */
.report { flex: 1; overflow-y: auto; padding: 4px 20px 60px; }
.report-in { max-width: 760px; margin: 0 auto; }
.tools { display: flex; gap: 8px; margin-top: 14px; }
.search { flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 42px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.search input { border: 0; background: none; height: 38px; width: 100%; font-size: 15px; min-width: 0; }
.search input:focus { outline: none; }
.tools select { flex: 0 1 24%; height: 42px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); min-width: 0; }
.period { display: flex; gap: 6px; margin-top: 10px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.period button { flex: none; height: 32px; padding: 0 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.period button.on { background: var(--ink); color: var(--bg); }
.period .export { margin-left: auto; color: var(--action); display: inline-flex; align-items: center; gap: 6px; }
.score { background: var(--bg); border-radius: var(--r-lg); padding: 18px; margin-top: 14px; }
.score h3 { margin: 0; font: 800 40px/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.score h3 small { font: 600 15px var(--text); color: var(--ink-2); letter-spacing: 0; margin-left: 6px; }
.score p { margin: 6px 0 14px; color: var(--ink-2); font-size: 14px; }
.sbar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--sunk); gap: 2px; }
.sbar span { display: block; height: 100%; }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; margin-top: 14px; font-size: 14px; }
.legend div { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.legend b { font: 700 16px var(--display); color: var(--ink); }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.c-ok { background: var(--ok); } .c-late { background: var(--now); } .c-missed { background: var(--late); } .c-moved { background: var(--rail); }
.bycat { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; background: var(--bg); border-radius: var(--r-lg); overflow: hidden; }
.bycat th, .bycat td { padding: 9px 12px; text-align: right; font-variant-numeric: tabular-nums; }
.bycat tr + tr td { border-top: 1px solid var(--line); }
.bycat th:first-child, .bycat td:first-child { text-align: left; }
.bycat th { font-size: 12px; color: var(--muted); font-weight: 600; }
.r-day { display: flex; justify-content: space-between; align-items: baseline; margin: 24px 2px 6px; }
.r-day button { font: 700 17px var(--display); }
.r-day small { color: var(--muted); font-size: 13px; }
.r-item { display: grid; grid-template-columns: 48px 1fr; gap: 2px 10px; padding: 10px 12px; border-radius: var(--r-md); background: var(--bg); margin-bottom: 6px; }
.r-item .tm { font: 700 14px var(--display); font-variant-numeric: tabular-nums; }
.r-item .tt { font-weight: 600; }
.r-item .mt { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 12.5px; color: var(--muted); }
.r-item textarea { grid-column: 2; width: 100%; margin-top: 6px; padding: 7px 10px; border-radius: 9px; border: 0; background: var(--surface); font-size: 13.5px; resize: none; overflow: hidden; min-height: 34px; }
.badge-s { font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.badge-s.ok { background: var(--ok-soft); color: var(--ok); }
.badge-s.late { background: var(--now-soft); color: color-mix(in srgb, var(--now) 60%, var(--ink)); }
.badge-s.missed { background: var(--late-soft); color: var(--late); }
.badge-s.neutral, .badge-s.moved { background: var(--sunk); color: var(--ink-2); }

/* ---------- glisser-déposer / toast ---------- */
.drag-ghost { position: fixed; z-index: 60; pointer-events: none; padding: 8px 12px; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); font-weight: 600; font-size: 14px; border-left: 3px solid var(--action); max-width: 260px; }
.tabbar { display: none; }

/* ---------- mobile ---------- */
@media (max-width: 959px) {
  :root { --hour: 58px; --gutter: 46px; }
  .app { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .side, .main { grid-row: 1; grid-column: 1; }
  .app[data-tab="cal"] .side, .app[data-tab="notes"] .side, .app[data-tab="report"] .side, .app[data-tab="msgs"] .side, .app[data-tab="activity"] .side { display: none; }
  .app[data-tab="side"] .main { display: none; }
  .side { border-right: 0; padding-top: env(safe-area-inset-top); }
  .bar { padding: calc(env(safe-area-inset-top) + 8px) 10px 8px; gap: 6px; }
  .bar-actions .seg, #newBtn span, #msgBtn, #actBtn { display: none; }
  .bar-actions { gap: 4px; }
  #newBtn { width: 40px; padding: 0; }
  .range-label { font-size: 20px; margin-left: 4px; }
  .range-label small { display: none; }
  .app[data-tab="cal"] .week-strip { display: grid; grid-template-columns: repeat(7, 1fr); padding: 6px 8px 8px; border-bottom: 1px solid var(--line); }
  .ws { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; border-radius: 12px; }
  .ws .wd { font-size: 11.5px; color: var(--muted); font-weight: 600; }
  .ws .dn { font: 700 17px var(--display); font-variant-numeric: tabular-nums; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; }
  .ws.on .dn { background: var(--ink); color: var(--bg); }
  .ws.today .dn { color: color-mix(in srgb, var(--now) 70%, var(--ink)); }
  .ws.today.on .dn { background: var(--now); color: #1b1300; }
  .ws .dots { display: flex; gap: 2px; height: 5px; }
  .ws .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--rail); }
  .app[data-tab="report"] .cal-wrap, .app[data-tab="report"] .week-strip { display: none; }
  .tabbar { display: grid; grid-template-columns: repeat(6, 1fr); grid-row: 2; background: var(--surface); border-top: 1px solid var(--line); padding: 4px 4px calc(env(safe-area-inset-bottom) + 4px); z-index: 20; }
  .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); padding: 6px 0 4px; position: relative; }
  .tabbar button.on { color: var(--action); }
  .tabbar svg.i { width: 22px; height: 22px; }
  .tabbar .badge { top: 0; right: calc(50% - 22px); }
  .drawer { position: static; grid-row: 1; grid-column: 1; width: auto; box-shadow: none; border: 0; padding-top: env(safe-area-inset-top); }
  .drawer #drawerClose, .drawer #drawerSeg { display: none; }
  .drawer-head::before { content: attr(data-title); font: 800 22px var(--display); }
  .cal-head .dh { display: none; }
  .cal-head { display: none; }
  .popover { left: 8px !important; right: 8px; width: auto; max-width: none; top: auto !important; bottom: calc(env(safe-area-inset-bottom) + 76px); }
  .sheet-dlg { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 22px 22px 0 0; max-height: 94dvh; }
  .report { padding: 4px 14px 30px; }
  .toast { bottom: calc(env(safe-area-inset-bottom) + 80px); }
}

/* ---------- équipes ---------- */
.team-list { list-style: none; margin: 0; padding: 0; }
.team-item { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 10px; cursor: pointer; font-weight: 600; }
.team-item:hover { background: var(--sunk); }
.team-item.on { background: var(--surface); box-shadow: 0 1px 3px rgba(18, 26, 46, .08); }
.team-item .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-item .count { font: 600 12px var(--text); color: var(--muted); }
.tdot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.ev.dim { opacity: .22; }
.filter-bar { display: flex; align-items: center; gap: 8px; margin: 8px 14px 0; padding: 8px 12px; border-radius: var(--r-md); background: var(--sunk); font-size: 14px; }
.filter-bar span { flex: 1; }
.team-view { flex: 1; overflow-y: auto; padding: 4px 20px 60px; }
.team-in { max-width: 1100px; margin: 0 auto; }
.tb-head { display: flex; align-items: center; gap: 14px; justify-content: space-between; flex-wrap: wrap; margin-top: 14px; }
.tb-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tb-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.tb-stats div { background: var(--bg); border-radius: var(--r-md); padding: 10px 12px; font-size: 13px; color: var(--ink-2); }
.tb-stats b { display: block; font: 800 24px var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.tb-stats .bad b { color: var(--late); }
.tb-events { list-style: none; margin: 0; padding: 0; }
.tb-events li { display: grid; grid-template-columns: 110px 50px 1fr auto; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.tb-events li:hover { background: var(--bg); }
.tb-events .d { font-size: 13px; color: var(--ink-2); }
.tb-events .h { font: 700 14px var(--display); font-variant-numeric: tabular-nums; }
.tb-events .tt { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-cols { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.tb-col { background: var(--bg); border-radius: var(--r-lg); padding: 12px; }
.tb-col h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font: 700 15px var(--display); }
.tb-col h3 > span:not(.avatar) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-col h3 small { font: 600 11.5px var(--text); color: var(--muted); }
.tb-col h3 em { font: 700 12px var(--text); font-style: normal; color: var(--muted); }
.tb-col ul { list-style: none; margin: 0; padding: 0; }
.tb-col details { margin-top: 6px; font-size: 13px; color: var(--muted); }
.tb-col summary { cursor: pointer; padding: 4px 2px; }
.tb-col .linkbtn { margin-top: 8px; }
.tb-task { display: grid; grid-template-columns: 14px 1fr; gap: 2px 8px; padding: 9px 10px; border-radius: 10px; background: var(--surface); margin-bottom: 6px; cursor: pointer; border: 1px solid var(--line); }
.tb-task .prio { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; border: 2px solid var(--rail); }
.tb-task .prio.p1 { border-color: var(--late); background: var(--late); }
.tb-task .prio.p2 { border-color: var(--action); }
.tb-task .tt { font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.tb-task .mt { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 12.5px; color: var(--muted); }
.tb-task .mt span { display: inline-flex; align-items: center; gap: 3px; }
.tb-task .mt svg.i { width: 13px; height: 13px; }
.tb-task .due-late { color: var(--late); font-weight: 600; }
.tb-task .due-soon { color: color-mix(in srgb, var(--now) 60%, var(--ink)); font-weight: 600; }
.tb-task.done .tt { text-decoration: line-through; color: var(--muted); }
.tb-empty { font-size: 13px; color: var(--muted); padding: 4px 2px; }
@media (max-width: 959px) {
  .app[data-tab="team"] .side { display: none; }
  .team-view { padding: calc(env(safe-area-inset-top)) 14px 30px; }
  .tb-stats { grid-template-columns: repeat(2, 1fr); }
  .tb-events li { grid-template-columns: 80px 44px 1fr; }
  .tb-events .stack { display: none; }
}

.side-title > .fold { margin-left: 0; }
.app[data-tab="team"] .bar-nav > button:not(#backCal) { display: none; }
.app[data-tab="notes"] .bar-nav > button:not(#backCal), .app[data-tab="notes"] #viewSeg, .app[data-tab="notes"] #focusBtn { display: none; }
#backCal { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; }
#backCal[hidden] { display: none; }
.side-nav { margin-bottom: 6px; }
.side-nav .i { width: 16px; height: 16px; }
.app[data-tab="team"] .range-label { margin-left: 0; }

/* ---------- agendas externes ---------- */
.ev.ext { background: color-mix(in srgb, var(--c) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); border-left: 3px solid var(--c); color: var(--ink-2); box-shadow: none; cursor: pointer; }
.ev.ext .t { font-weight: 550; }
.ad-item.ext { background: color-mix(in srgb, var(--c) 12%, var(--surface)); color: var(--ink-2); font-weight: 550; }
.ad-item.ext .tdot { width: 8px; height: 8px; }
.conn-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.conn-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.conn-list .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 14px; }
.conn-list .grow .muted { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.help { margin-top: 10px; font-size: 13.5px; color: var(--ink-2); }
details.help summary { cursor: pointer; color: var(--action); font-weight: 600; }
details.help p { margin: 6px 0; }

/* ---------- saisie naturelle ---------- */
.quick-preview { margin: 0 12px 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.quick-preview span { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--action) 10%, var(--surface)); color: var(--action); }

/* ---------- étapes ---------- */
.checklist { list-style: none; margin: 0 0 6px; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--grid); }
.checklist label { flex: 1; display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 14.5px; cursor: pointer; }
.checklist input { width: 18px; height: 18px; accent-color: var(--ok); flex: none; }
.checklist input:checked + span { text-decoration: line-through; color: var(--muted); }
.checklist .iconbtn { width: 28px; height: 28px; opacity: .5; }

/* ---------- pièces jointes ---------- */
.files { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.files li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.files .linkbtn { flex: 1; min-width: 0; text-align: left; display: flex; align-items: center; gap: 6px; background: none; border: 0; padding: 4px 0; color: var(--action); font: inherit; font-weight: 600; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files .iconbtn { width: 28px; height: 28px; }
.btn.small input[type=file] { display: none; }
.fimg { display: block; padding: 0; border: 0; background: var(--sunk); border-radius: 12px; overflow: hidden; max-width: 240px; min-height: 60px; cursor: zoom-in; }
.fimg img { display: block; max-width: 240px; max-height: 260px; }
.fcard { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; max-width: 260px; }
.fcard > span { display: flex; flex-direction: column; min-width: 0; }
.fcard b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fcard .muted { font-size: 12px; }
.msg.me .fimg, .msg.me .fcard { margin-left: auto; }

/* ---------- hors ligne ---------- */
body.offline::after { content: "Hors ligne · tes ajouts seront envoyés au retour du réseau"; position: fixed; left: 50%; transform: translateX(-50%); top: max(8px, env(safe-area-inset-top)); z-index: 90; padding: 6px 14px; border-radius: 999px; background: var(--ink); color: var(--bg); font-size: 12.5px; font-weight: 600; box-shadow: var(--shadow); pointer-events: none; }

/* ---------- accusés de lecture ---------- */
.msg .at .rd { margin-left: 5px; font-weight: 700; letter-spacing: -2px; color: var(--muted); }
.msg .at .rd.on { color: var(--action); }
.msg .at .rd-txt { margin-left: 5px; }

/* ---------- profil ---------- */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.me { text-align: left; }
.me .avatar.me-av { width: 36px; height: 36px; font-size: 14px; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px color-mix(in srgb, var(--action) 35%, transparent); }
#meName { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
#meName b { font: 700 16px var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#meName small { font: 500 12.5px var(--text); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member .who-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 9px; text-align: left; border-radius: 10px; padding: 2px 0; }
.member .who-btn:hover .nm { color: var(--action); }
.member .nm { display: flex; flex-direction: column; line-height: 1.2; }
.member .nm small { font-size: 12px; color: var(--muted); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.sheet.pf { padding-top: 0; }
.pf-hero { --pc: var(--action); position: relative; margin: 0 -20px 0; padding: 26px 20px 22px; display: flex; gap: 16px; align-items: center;
  background: var(--pc); color: #fff; border-radius: 22px 22px 0 0;
  background-image: radial-gradient(circle at 92% -20%, rgba(255,255,255,.22) 0 90px, transparent 91px), radial-gradient(circle at 78% 130%, rgba(0,0,0,.14) 0 70px, transparent 71px); }
.pf-photo { position: relative; width: 84px; height: 84px; flex: none; border-radius: 26px; background: rgba(255,255,255,.18); display: grid; place-items: center;
  box-shadow: 0 0 0 3px rgba(255,255,255,.85), 0 10px 24px rgba(0,0,0,.22); overflow: visible; padding: 0; }
.pf-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 26px; }
.pf-photo > span { font: 800 30px var(--display); color: #fff; }
.pf-photo i { position: absolute; right: -6px; bottom: -6px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.pf-photo i svg { width: 16px; height: 16px; stroke-width: 2.6; }
.pf-photo.static { cursor: default; }
.pf-id { min-width: 0; flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.pf-name { font: 800 26px/1.05 var(--display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.pf-title { font-size: 14.5px; opacity: .88; }
.pf-status { margin-top: 6px; padding: 4px 11px; border-radius: 999px; background: rgba(255,255,255,.2); color: #fff; font: 600 13px var(--text); backdrop-filter: blur(4px); }
.pf-status small { opacity: .8; font-weight: 500; }
button.pf-status:hover { background: rgba(255,255,255,.3); }
.pf-close { position: absolute; top: 10px; right: 10px; color: #fff; background: rgba(0,0,0,.14); }
.pf-week { display: flex; gap: 16px; align-items: center; margin: 0 -20px; padding: 16px 20px; background: var(--bg); border-bottom: 1px solid var(--line); }
.pf-ringbox { position: relative; width: 72px; height: 72px; flex: none; display: grid; place-items: center; }
.pf-ringbox b { position: absolute; font: 800 17px var(--display); }
.ring { width: 72px; height: 72px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.ring .bg { stroke: var(--sunk); }
.ring .fg { stroke: var(--ok); stroke-linecap: round; transition: stroke-dashoffset .6s cubic-bezier(.2,.8,.2,1); }
.pf-kpis { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pf-kpis div { display: flex; flex-direction: column; min-width: 0; }
.pf-kpis b { font: 800 18px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.pf-kpis span { font-size: 11.5px; color: var(--muted); line-height: 1.25; }
.pf-tabs { display: flex; width: 100%; margin: 16px 0 6px; overflow-x: auto; }
.pf-tabs button { flex: 1; white-space: nowrap; }
.pf-pane { padding-top: 4px; }
.swatch { width: 30px; height: 30px; border-radius: 10px; border: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.pf-tile { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: var(--r-md); background: var(--bg); margin-top: 8px; }
.pf-tile > div { display: flex; flex-direction: column; font-size: 14.5px; }
.pf-tile span:not(.pf-ico) { color: var(--muted); font-size: 13px; }
.pf-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); color: var(--action); flex: none; }
.pf-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 12px; }
.pf-facts div { padding: 10px 12px; border-radius: var(--r-md); background: var(--bg); display: flex; flex-direction: column; }
.pf-facts span { font-size: 12px; color: var(--muted); }
.pf-facts b { font-size: 15px; text-transform: capitalize; }
.pf-save { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--surface) 30%); padding-top: 14px; margin-bottom: -4px; }
.pf-bio { margin: 16px 0 4px; color: var(--ink-2); white-space: pre-line; }
.pf-contact { display: grid; gap: 6px; margin-top: 14px; }
.pf-contact a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); background: var(--bg); color: var(--ink); text-decoration: none; font-weight: 600; }
.pf-contact a svg { color: var(--action); }
.pf-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
@media (max-width: 520px) { .pf-kpis { grid-template-columns: 1fr 1fr; } .pf-actions { grid-template-columns: 1fr; } }
.tabbar .tab-me { position: relative; }
.tabbar .tab-me .avatar { width: 24px; height: 24px; font-size: 10px; box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 3px transparent; }
.tabbar .tab-me.on .avatar { box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 3px var(--action); }
.tabbar .tab-me[data-status]:not([data-status=""])::after { content: attr(data-status); position: absolute; top: 1px; left: calc(50% + 6px); font-size: 12px; line-height: 1; background: var(--surface); border-radius: 50%; padding: 1px; }
.pf-week { cursor: pointer; position: relative; }
.pf-week:hover { background: var(--sunk); }
.pf-more { display: flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 700; color: var(--action); flex: none; }
.pf-more svg { width: 15px; height: 15px; }
@media (max-width: 520px) { .pf-week { flex-wrap: wrap; } .pf-more { position: absolute; top: 12px; right: 16px; } }
@media (max-width: 520px) { .pf-tabs button { padding: 0 6px; font-size: 13.5px; min-width: 0; } .pf-hero { padding-top: 22px; } }

/* ---------- dictée ---------- */
.quick .mic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); flex: none; }
.quick .mic svg { width: 18px; height: 18px; }
.quick .mic.on { background: var(--late); color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--late) 25%, transparent); } }
@media (prefers-reduced-motion: reduce) { .quick .mic.on { animation: none; } }

/* ---------- focus ---------- */
#focusBtn.on { background: var(--action); color: var(--action-ink); }
.focus-bar { position: fixed; z-index: 80; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 18px); display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow); max-width: calc(100vw - 24px); }
.focus-bar b { font: 800 18px var(--display); font-variant-numeric: tabular-nums; }
.focus-bar .ft { font-size: 13.5px; opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 34vw; }
.focus-bar button { background: rgba(255,255,255,.14); color: inherit; border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 13.5px; }
.focus-bar .fdot { width: 9px; height: 9px; border-radius: 50%; background: var(--now); box-shadow: 0 0 0 4px color-mix(in srgb, var(--now) 30%, transparent); }
@media (max-width: 959px) { .focus-bar { bottom: calc(env(safe-area-inset-bottom) + 76px); } }

/* ---------- trajet ---------- */
.travel-row { display: grid; grid-template-columns: 1fr; gap: 6px; }
.travel-row .route { display: flex; gap: 6px; flex-wrap: wrap; }
.travel-row .route a { text-decoration: none; color: var(--action); font-weight: 600; }

/* ---------- modèles, revue ---------- */
.tpl-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.tpl-list li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: var(--r-md); background: var(--bg); }
.tpl-list li > div { flex: 1; display: flex; flex-direction: column; }
.tpl-list .muted { font-size: 12.5px; }
.rv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rv-stats div { background: var(--bg); border-radius: var(--r-md); padding: 10px 12px; display: flex; flex-direction: column; }
.rv-stats b { font: 800 22px var(--display); }
.rv-stats span { font-size: 12px; color: var(--muted); }
.sheet h3.rv-h { font-size: 16px; margin: 20px 0 8px; }
.rv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rv-list li { border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; transition: opacity .25s, transform .25s; }
.rv-list li.gone { opacity: 0; transform: translateX(20px); }
.rv-list li > div:first-child { display: flex; flex-direction: column; }
.rv-list .muted { font-size: 12.5px; }
.rv-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.rv-next { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; margin-top: 8px; }
.rv-next div { background: var(--bg); border-radius: var(--r-md); padding: 8px 10px; display: flex; flex-direction: column; font-size: 13px; }
.rv-next small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- bilan : temps ---------- */
.rhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.rhead .seg { flex: 1 1 auto; max-width: 420px; }
.rhead .seg button { flex: 1; }
.time-total { display: flex; gap: 10px; margin: 14px 0; flex-wrap: wrap; }
.time-total div { flex: 1; min-width: 150px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; display: flex; flex-direction: column; }
.time-total b { font: 800 28px var(--display); }
.time-total span { color: var(--muted); font-size: 13px; }
.time-tbl .rate { width: 72px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 7px; background: var(--bg); font: inherit; }

/* ---------- famille ---------- */
.fam-ico { width: 16px; text-align: center; font-size: 13px; }
.title-acts { display: inline-flex; gap: 10px; }
.fam { max-width: 860px; margin: 0 auto; padding: 18px 18px 120px; }
.fam-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.fam-head h2 { font: 800 28px/1.1 var(--display); margin: 0; letter-spacing: -.02em; }
.fam-head p { margin: 2px 0 0; }
.fam-tabs { display: flex; width: 100%; overflow-x: auto; margin-bottom: 16px; }
.fam-tabs button { flex: 1; white-space: nowrap; }
.fam-actions { margin-bottom: 12px; }
.fam-bdays { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.fam-bdays span { background: var(--now-soft); padding: 5px 12px; border-radius: 999px; font-size: 13.5px; }
.fam-day { margin-bottom: 14px; }
.fam-day h4 { font: 700 14px var(--display); color: var(--ink-2); margin: 0 0 6px; text-transform: none; }
.fam-ev { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); text-align: left; margin-bottom: 6px; }
.fam-ev .tm { font-weight: 700; font-variant-numeric: tabular-nums; width: 58px; flex: none; color: var(--action); }
.fam-ev .tt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-weight: 600; }
.fam-ev .tt small { font-weight: 500; color: var(--muted); }
.fam-ev.done { opacity: .55; }
.fam-ev.done .tt { text-decoration: line-through; }
.pchip { --pc: var(--action); display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: color-mix(in srgb, var(--pc) 14%, var(--surface)); color: color-mix(in srgb, var(--pc) 75%, var(--ink)); white-space: nowrap; }
.fam-add { display: flex; gap: 8px; margin-bottom: 10px; }
.fam-add .field:first-child { flex: 1; }
.fam-add select.field { width: 120px; }
.fam-list { list-style: none; margin: 0 0 10px; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.fam-list:empty { display: none; }
.fam-list li { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-bottom: 1px solid var(--grid); }
.fam-list li:last-child { border-bottom: 0; }
.fam-list label { flex: 1; display: flex; align-items: center; gap: 12px; padding: 9px 0; font-size: 15.5px; cursor: pointer; min-width: 0; }
.fam-list input { width: 20px; height: 20px; accent-color: var(--ok); flex: none; }
.fam-list li.done label span { text-decoration: line-through; color: var(--muted); }
.fam-list .by { font-size: 12px; color: var(--muted); white-space: nowrap; }
.fam-list .iconbtn { width: 30px; height: 30px; opacity: .5; }
.fam-week { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.fam-week b { font-family: var(--display); }
.fam-week .btn { margin-left: auto; }
.meals { display: grid; gap: 8px; }
.meal-day { display: grid; grid-template-columns: 70px 1fr 1fr; gap: 8px; align-items: center; }
.meal-day.today b { color: var(--action); }
.fam-info { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fam-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; }
.fam-card.wide { grid-column: 1 / -1; }
.fam-card h4 { font: 700 16px var(--display); margin: 0 0 10px; }
.fam-people { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.fam-people .fp { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.fam-kids { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 4px; }
.fam-kids li { display: flex; align-items: center; gap: 8px; }
.fam-kids .muted { flex: 1; font-size: 13px; }
@media (max-width: 700px) { .fam-info { grid-template-columns: 1fr; } .meal-day { grid-template-columns: 1fr 1fr; } .meal-day b { grid-column: 1 / -1; } .fam-head h2 { font-size: 23px; } .fam { padding: 14px 12px 120px; } }
@media (max-width: 700px) {
  .fam-head { align-items: center; margin-bottom: 10px; }
  .fam-head h2 { display: none; }
  .fam-head p { font-size: 13px; }
  .fam-head .btn { height: 34px; padding: 0 12px; font-size: 14px; }
  .fam-tabs button { padding: 0 4px; font-size: 13px; min-width: 0; }
}
.fam-tabs .tcount { font-style: normal; font-size: 11px; font-weight: 800; margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: var(--action); color: var(--action-ink); vertical-align: 1px; }
@media (max-width: 700px) { .fam-tabs .tcount { margin-left: 2px; padding: 0 5px; font-size: 10px; } }
@media (max-width: 700px) { .fam-tabs button { flex: 1 1 auto; padding: 0 6px; } .fam-tabs { gap: 0; } }
@media (max-width: 959px) { #backCal, .side-nav { display: none !important; } }
.visio-row { margin-top: 6px; } a.btn { text-decoration: none; }

/* ---------- vue liste (mobile) ---------- */
.m-seg { display: none; }
@media (max-width: 959px) {
  .app[data-tab="cal"] .m-seg { display: flex; margin: 8px 12px 0; }
  .m-seg button { flex: 1; height: 34px; }
}
.ag-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 6px 12px calc(env(safe-area-inset-bottom) + 90px); }
.ag-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ag-row { position: relative; border-radius: 16px; overflow: hidden; transition: height .25s, opacity .25s, margin .25s; }
.ag-row.gone { opacity: 0; height: 0 !important; margin-top: -8px; }
.ag-bg { position: absolute; inset: 0; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; font-weight: 700; font-size: 15px; color: #fff; background: var(--sunk); }
.ag-bg span { display: flex; align-items: center; gap: 6px; opacity: 0; transition: opacity .15s; }
.ag-row.sw-r .ag-bg { background: var(--ok); } .ag-row.sw-r .ag-bg .l { opacity: .7; }
.ag-row.sw-l .ag-bg { background: var(--late); } .ag-row.sw-l .ag-bg .r { opacity: .7; }
.ag-row.arm .ag-bg span { opacity: 1; }
.ag-row.arm .ag-bg .i { transform: scale(1.25); }
.ag-card { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 12px 14px 16px; min-height: 64px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; touch-action: pan-y; user-select: none; -webkit-user-select: none; transition: transform .22s ease; cursor: pointer; }
.ag-card::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--c); }
.ag-time { width: 50px; flex: none; display: flex; flex-direction: column; font-variant-numeric: tabular-nums; }
.ag-time b { font: 700 17px var(--display); }
.ag-time small { color: var(--muted); font-size: 13px; }
.ag-time .i { width: 20px; height: 20px; color: var(--late); }
.ag-main { flex: 1; min-width: 0; }
.ag-title { font-weight: 650; font-size: 16.5px; line-height: 1.3; overflow-wrap: anywhere; }
.ag-title em { font-style: normal; font-size: 11.5px; font-weight: 700; color: #1b1300; background: var(--now); border-radius: 6px; padding: 1px 6px; margin-right: 6px; vertical-align: 2px; }
.ag-meta { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13.5px; margin-top: 3px; }
.ag-meta .i { width: 14px; height: 14px; flex: none; }
.ag-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-ck { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; color: transparent; }
.ag-ck .i { width: 18px; height: 18px; }
.ag-join { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; }
.ag-join .i { width: 18px; height: 18px; }
.ag-row.done .ag-ck { background: var(--ok); border-color: var(--ok); color: #fff; }
.ag-row.done .ag-title { text-decoration: line-through; color: var(--muted); }
.ag-row.done .ag-card { background: var(--bg); }
.ag-row.past:not(.late) .ag-card { opacity: .62; }
.ag-row.late .ag-time b, .ag-row.late .ag-meta { color: var(--late); }
.ag-row.cur .ag-card { border: 2px solid var(--now); box-shadow: 0 4px 16px color-mix(in srgb, var(--now) 25%, transparent); }
.ag-now { display: flex; align-items: center; gap: 8px; margin: 2px 0; }
.ag-now::after { content: ''; flex: 1; height: 2px; background: var(--now); border-radius: 2px; }
.ag-now span { font-size: 12px; font-weight: 700; color: #1b1300; background: var(--now); border-radius: 8px; padding: 2px 8px; }
.ag-day { display: flex; align-items: baseline; gap: 8px; font: 700 18px var(--display); margin: 20px 2px 8px; cursor: pointer; }
.ag-day:first-child { margin-top: 8px; }
.ag-day small { font: 500 13px var(--body, inherit); color: var(--muted); }
.ag-day.today { color: color-mix(in srgb, var(--now) 75%, var(--ink)); }
.ag-day.past { opacity: .6; }
.ag-empty { color: var(--muted); font-size: 14px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 14px; }
.ag-empty b { color: var(--action); }
.ag-zero { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 60px 0; color: var(--muted); }
.ag-zero b { font-size: 17px; color: var(--ink-2); }
.ag-tip { font-size: 13.5px; color: var(--ink-2); background: var(--now-soft, var(--sunk)); border-radius: 12px; padding: 10px 12px; margin: 4px 0 10px; }
.ag-scroll .ad-carry { margin-top: 12px; font-size: 14px; }

/* ---------- notes ---------- */
.notes-view { flex: 1; min-height: 0; display: flex; position: relative; }
.nt-wrap { flex: 1; display: grid; grid-template-columns: 330px 1fr; min-height: 0; }
.nt-side { border-right: 1px solid var(--line); overflow-y: auto; padding: 14px 12px 100px; background: var(--bg); }
.nt-head { display: flex; align-items: baseline; gap: 8px; padding: 0 4px 8px; }
.nt-head h2 { margin: 0; font: 800 26px var(--display); }
.nt-head small { color: var(--muted); }
.nt-search { display: flex; align-items: center; gap: 6px; background: var(--sunk); border-radius: 11px; padding: 0 10px; height: 38px; color: var(--muted); }
.nt-search input { flex: 1; border: 0; background: none; font: inherit; font-size: 15.5px; color: var(--ink); outline: none; min-width: 0; }
.nt-folders { margin: 10px 0 4px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.nt-folders .chip { white-space: nowrap; }
.nt-folders small { color: var(--muted); margin-left: 2px; }
.nt-g { font: 700 15px var(--display); margin: 16px 6px 6px; }
.nt-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.nt-row { padding: 10px 14px; cursor: pointer; border-bottom: 1px solid var(--line); }
.nt-row:last-child { border-bottom: 0; }
.nt-row.on { background: color-mix(in srgb, var(--now) 30%, var(--surface)); }
.nt-t { font-weight: 700; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-t .pin { margin-right: 4px; font-size: 12px; }
.nt-p { color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.nt-p b { color: var(--ink-2); font-weight: 600; margin-right: 4px; }
.nt-f { font-size: 12px; color: var(--muted); margin-top: 3px; }
.nt-zero, .nt-blank { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; color: var(--muted); padding: 60px 10px; }
.nt-zero b, .nt-blank b { color: var(--ink-2); font-size: 16px; }
.nt-zero .btn { margin-top: 10px; }
.nt-blank .i { width: 34px; height: 34px; opacity: .5; }
.nt-ed { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: var(--surface); }
.nt-bar { display: flex; align-items: center; gap: 6px; padding: 8px 14px; }
.nt-back { display: flex; align-items: center; gap: 2px; font-size: 16px; }
.nt-ok { font-size: 16px; font-weight: 700; margin-left: 4px; }
#ntMore { font-weight: 800; letter-spacing: 1px; }
.nt-date { text-align: center; color: var(--muted); font-size: 12.5px; padding: 2px 0 6px; }
.nt-body { flex: 1; overflow-y: auto; padding: 8px max(22px, calc((100% - 760px) / 2)) 140px; outline: none; font-size: 17px; line-height: 1.5; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
.nt-body:empty::before, .nt-body > div:only-child:has(> br:only-child)::before { content: attr(data-ph); color: var(--muted); font: 800 26px var(--display); }
.nt-body > :first-child:not(ul):not(ol) { font: 800 26px/1.25 var(--display); }
.nt-body h2 { font: 800 22px/1.3 var(--display); margin: 14px 0 4px; }
.nt-body h3 { font: 700 18px var(--display); margin: 12px 0 4px; }
.nt-body ul, .nt-body ol { margin: 4px 0; padding-left: 24px; }
.nt-body ul.cl { list-style: none; padding-left: 2px; }
.nt-body li.ck { position: relative; padding-left: 32px; margin: 6px 0; min-height: 24px; }
.nt-body li.ck::before { content: ''; position: absolute; left: 0; top: 1px; width: 21px; height: 21px; border-radius: 50%; border: 1.5px solid var(--muted); cursor: pointer; }
.nt-body li.ck[data-done]::before { background: var(--now) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b1300' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/14px no-repeat; border-color: var(--now); }
.nt-body li.ck[data-done] { color: var(--muted); text-decoration: line-through; }
.nt-tools { display: flex; justify-content: center; gap: 4px; padding: 8px 10px calc(env(safe-area-inset-bottom) + 8px); border-top: 1px solid var(--line); background: var(--surface); }
.nt-tools button { min-width: 46px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: 16px; color: var(--ink-2); padding: 0 10px; }
.nt-tools button:hover, .nt-tools button.on { background: var(--sunk); }
.nt-tools button.on { color: var(--late); }
.nt-tools .i { width: 19px; height: 19px; }
.nt-tools span { font-size: 13.5px; font-weight: 600; }
.nt-fab { position: absolute; right: 22px; bottom: 22px; width: 56px; height: 56px; border-radius: 18px; background: var(--now); color: #1b1300; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.22); z-index: 5; }
.nt-fab .i { width: 24px; height: 24px; }
.notes-view.editing .nt-fab { display: none; }
.nt-menu { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 960px) { .notes-view .nt-fab { left: 252px; right: auto; } .notes-view.editing .nt-fab { display: grid; } .nt-back { display: none; } }
@media (max-width: 959px) {
  .nt-wrap { grid-template-columns: 1fr; }
  .nt-side { border: 0; padding: 10px 14px 100px; }
  .notes-view.editing .nt-side { display: none; }
  .notes-view:not(.editing) .nt-ed { display: none; }
  .nt-fab { bottom: 16px; right: 16px; }
  .app[data-tab="notes"] .bar { display: none; }
  .nt-side { padding-top: calc(env(safe-area-inset-top) + 10px); }
  .nt-bar { padding-top: calc(env(safe-area-inset-top) + 8px); }
  .tabbar button { font-size: 10.5px; }
}

/* ---------- réunion ---------- */
.nt-head .sp { flex: 1; }
.nt-rec { white-space: nowrap; }
.meet { position: fixed; inset: 0; z-index: 80; background: color-mix(in srgb, var(--bg) 96%, transparent); backdrop-filter: blur(6px); display: flex; justify-content: center; }
.meet[hidden] { display: none; }
.meet-in { width: 100%; max-width: 640px; display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top) + 12px) 18px calc(env(safe-area-inset-bottom) + 16px); min-height: 0; }
.meet-top { display: flex; align-items: center; }
.meet-top .sp { flex: 1; }
.danger-t { color: var(--late); }
.meet-title { font: 800 24px var(--display); border: 0; background: none; color: var(--ink); outline: none; padding: 14px 0 4px; width: 100%; }
.meet-rec { display: flex; align-items: center; gap: 12px; margin: 6px 0; }
.meet-rec b { font: 700 34px var(--display); font-variant-numeric: tabular-nums; }
.meet .dot, .meet-pill .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--late); animation: recblink 1.2s infinite; flex: none; }
.dot.paused { animation: none; background: var(--muted); }
@keyframes recblink { 50% { opacity: .25; } }
.meter { flex: 1; height: 6px; border-radius: 4px; background: var(--sunk); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ok); width: 0; transition: width .2s; }
.meet-hint { color: var(--muted); font-size: 13px; margin: 2px 0 10px; }
.meet-live { flex: 1; min-height: 120px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 15.5px; line-height: 1.5; }
.meet-live p { margin: 0 0 10px; }
.meet-live small { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 8px; font-size: 12px; }
.meet-acts { display: flex; gap: 10px; margin-top: 14px; }
.meet-acts .btn { flex: 1; height: 50px; font-size: 16px; }
.meet-wait { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }
.meet-wait b { color: var(--ink); font-size: 18px; }
.spin { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--sunk); border-top-color: var(--action); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.meet-pill { position: fixed; z-index: 75; top: calc(env(safe-area-inset-top) + 8px); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 20px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.meet-pill[hidden] { display: none; }
.meet-pill b { font-variant-numeric: tabular-nums; }
.meet-actions { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.meet-actions small { color: var(--muted); }
/* réunion : états bien visibles */
.nt-recbig { display: flex; align-items: center; gap: 14px; width: 100%; margin: 10px 0 4px; padding: 14px 16px; border-radius: 16px; background: var(--late); color: #fff; text-align: left; box-shadow: 0 6px 18px color-mix(in srgb, var(--late) 30%, transparent); }
.nt-recbig .rd { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; font-size: 22px; flex: none; }
.nt-recbig .rd .dot { width: 16px; height: 16px; border-radius: 50%; background: #fff; animation: recblink 1.2s infinite; }
.nt-recbig b { display: block; font-size: 16.5px; }
.nt-recbig small { display: block; opacity: .85; font-size: 13px; margin-top: 2px; }
.meet-state { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 12px 16px; border-radius: 14px; background: var(--late); color: #fff; font-weight: 800; font-size: 14px; letter-spacing: .4px; }
.meet-state .dot { background: #fff !important; width: 14px; height: 14px; }
.meet-state b { margin-left: auto; font: 800 26px var(--display); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.meet-state.paused { background: var(--muted); }
.meet-state.paused .dot { animation: none; opacity: .6; }
.meet-levels { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 4px; }
.lv { display: grid; grid-template-columns: 110px 1fr 90px; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; }
.lv .meter { height: 10px; }
.lv em { font-style: normal; font-size: 12.5px; color: var(--muted); text-align: right; }
.lv em.ok { color: var(--ok); }
.meet-warn { background: color-mix(in srgb, var(--late) 14%, var(--surface)); color: var(--late); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; font-weight: 600; margin: 6px 0; }
.meet-src { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 10px; }
.meet-opt { text-align: left; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 3px; }
.meet-opt:hover { border-color: var(--action); }
.meet-opt b { font-size: 15.5px; }
.meet-opt span { color: var(--muted); font-size: 13.5px; }
.meet-pill { background: var(--late); color: #fff; padding: 10px 18px; font-size: 15px; }
.meet-pill .dot { background: #fff; }
.meet-pill small { opacity: .8; font-size: 12px; margin-left: 4px; }
.meet-pill.paused { background: var(--muted); }
.meet-pill.paused .dot { animation: none; }
.meet-wave { width: 100%; height: 70px; display: block; margin: 8px 0 2px; }
.lv.solo .meter { visibility: hidden; }
.siri-steps { margin: 4px 0 8px; padding-left: 20px; font-size: 14px; color: var(--ink-2); } .siri-steps li { margin: 3px 0; }
.nt-sh { font-size: 11.5px; font-weight: 600; color: var(--muted); }
.gs-res { max-height: 60vh; overflow-y: auto; margin-top: 10px; }
.gs-res h4 { margin: 14px 2px 6px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.gs-res ul { list-style: none; margin: 0; padding: 0; }
.gs-res li { padding: 9px 10px; border-radius: 10px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.gs-res li:hover { background: var(--sunk); }
.gs-res li span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-res mark { background: color-mix(in srgb, var(--now) 45%, transparent); color: inherit; border-radius: 3px; }
.mv-days { flex-wrap: wrap; margin: 6px 0 10px; }

/* ---------- notifications (modèle AMN) ---------- */
.toast { --tc: #2aa39c; position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90;
  width: max-content; max-width: min(520px, calc(100vw - 24px)); display: flex; align-items: center; gap: 10px; padding: 10px 8px 12px 12px;
  background: color-mix(in srgb, var(--surface) 94%, transparent); color: var(--ink); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 10px 30px rgba(21, 37, 74, .18); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); overflow: hidden;
  font-size: 14.5px; animation: t-in .22s cubic-bezier(.2, .9, .3, 1.2); }
.toast.bad { --tc: #c42f3a; }
.toast.wait { --tc: var(--action); }
.toast.out { animation: t-out .18s ease forwards; }
@keyframes t-in { from { opacity: 0; transform: translate(-50%, 14px) scale(.96); } }
@keyframes t-out { to { opacity: 0; transform: translate(-50%, 10px) scale(.97); } }
.t-ic { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--tc) 16%, transparent); color: var(--tc); }
.t-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.t-spin { width: 16px; height: 16px; border-radius: 50%; border: 2.4px solid color-mix(in srgb, var(--tc) 25%, transparent); border-top-color: var(--tc); animation: spin .8s linear infinite; }
.t-msg { flex: 1; min-width: 0; line-height: 1.35; font-weight: 500; overflow-wrap: anywhere; }
.t-act { display: flex; gap: 6px; flex: none; }
.t-act:empty { display: none; }
.t-btn { padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 13.5px; color: var(--tc); background: color-mix(in srgb, var(--tc) 14%, transparent); white-space: nowrap; }
.t-btn:hover { background: color-mix(in srgb, var(--tc) 22%, transparent); }
.t-x { flex: none; width: 28px; height: 28px; border-radius: 50%; font-size: 19px; line-height: 1; color: var(--muted); }
.t-x:hover { background: var(--sunk); color: var(--ink); }
.t-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--tc); opacity: .55; transform-origin: left; }
@media (max-width: 959px) { .toast { bottom: calc(76px + env(safe-area-inset-bottom)); } }
@media (prefers-color-scheme: dark) { .toast { background: #1b2436; border-color: rgba(255, 255, 255, .08); color: #EEF1F7; } }
@media (prefers-reduced-motion: reduce) { .toast, .toast.out { animation: none; } .t-spin { animation-duration: 2s; } }
.outbox-pill { position: fixed; z-index: 70; right: 14px; top: calc(env(safe-area-inset-top) + 10px); padding: 7px 12px; border-radius: 999px; background: color-mix(in srgb, var(--now) 85%, #fff); color: #1b1300; font-weight: 700; font-size: 13px; box-shadow: 0 6px 16px rgba(0,0,0,.18); }
@media (max-width: 959px) { .outbox-pill { top: auto; bottom: calc(80px + env(safe-area-inset-bottom)); right: auto; left: 12px; } }
