/* ── SUIVI LIST ───────────────────────────────────────────────────── */
.suivi-panel { display: flex; flex-direction: column; gap: 0.4rem; }
.suivi-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 0.2rem 0.3rem;
  border-bottom: 1px solid var(--border);
}
.suivi-title { font-size: 0.58rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.suivi-count { font-size: 0.62rem; color: var(--accent); font-weight: 600; }

.urgency-item {
  display: grid;
  grid-template-columns: 68px 20px 20px var(--name-col,160px) 30px var(--track-col,180px) 120px 56px 26px 32px 4px 52px 120px 22px 22px 22px;
  align-items: center; gap: 0.4rem;
  padding: 0.42rem 0.6rem; background: var(--surface);
  border: 1px solid var(--border); border-radius: 6px;
  transition: border-color 0.15s;
}
#suiviList,
#suiviList-Alpha,
#suiviList-Charlie,
#suiviList-Tango {
  display: grid;
  grid-template-columns:
    58px                       /* prio select */
    20px                       /* ★ favori */
    20px                       /* scratchpad */
    minmax(100px, max-content) /* nom — s'étire au plus long nom */
    28px                       /* valeur urgence */
    1fr                        /* barre colorée */
    60px                       /* badge delta demain */
    120px                      /* notifs */
    56px                       /* Valider */
    26px                       /* 😴 procrastination */
    32px                       /* S restantes (lecture seule) */
    4px                        /* / sep */
    52px                       /* (Xj) */
    120px                      /* date picker */
    22px 22px                  /* ⧉ × */
    22px;                      /* ⚙ modale */
  row-gap: 0.4rem;
  column-gap: 0.5em;
}
.urgency-item {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: subgrid;
  align-items: center;
  padding: 0.3rem 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.15s;
}
.urgency-item.has-subtasks {
  background: #27293D;
}
:root[data-theme="light"] .urgency-item.has-subtasks {
  background: #ececf3;
}
.urgency-item:hover { border-color: var(--accent); }

.urgency-force {
  flex-shrink: 0; width: 18px; height: 18px; border-radius: 3px;
  border: 1px solid var(--border); background: var(--surface2);
  color: var(--muted); font-size: 0.55rem; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.12s; margin: 0em 0.5em;
}
.urgency-force:hover { border-color: var(--danger); color: var(--danger); }
.urgency-force.active { background: var(--danger); border-color: var(--danger); color: white; }
/* done check + del btn */
.urg-done-check {
  flex-shrink: 0; width: 16px; height: 16px; border-radius: 3px;
  border: 1px solid var(--green); background: var(--surface2);
  color: transparent; font-size: 0.55rem; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
  box-shadow: 0 0 5px rgba(80,220,130,0.25);
}
.urg-done-check:hover {
  border-color: var(--green); color: var(--green);
  box-shadow: 0 0 8px rgba(80,220,130,0.55), inset 0 0 4px rgba(80,220,130,0.1);
}
.urg-done-check.active { background: var(--green); border-color: var(--green); color: var(--bg); box-shadow: 0 0 8px rgba(80,220,130,0.6); }
.urg-dup-btn {
  flex-shrink: 0; background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 0.85rem; padding: 0; margin-left: 0.5rem;
  line-height: 1; transition: color 0.12s; opacity: 0.7;
}
.urg-dup-btn:hover { color: var(--accent); opacity: 1; }
.urg-del-btn {
  background: none; border: none; color: var(--danger); cursor: pointer;
  font-size: 0.9rem; font-weight: 700; padding: 0; margin-left: 0.15rem;
  line-height: 1; transition: opacity 0.12s; opacity: 0.6;
}
.urg-del-btn:hover { opacity: 1; }

.coeff-panel {
  display: none; position: absolute; top: calc(100% + 4px); right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 0.6rem 0.8rem; z-index: 200;
  min-width: 220px; box-shadow: 0 4px 18px rgba(0,0,0,0.4);
}
.coeff-panel.open { display: block; }
.coeff-panel-title {
  font-size: 0.6rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.5rem;
}
.coeff-row {
  display: grid; grid-template-columns: 28px 1fr 36px;
  align-items: center; gap: 0.4rem; margin-bottom: 0.35rem;
}
.coeff-label { font-size: 0.65rem; color: var(--text); font-weight: 600; }
.coeff-val { font-size: 0.6rem; color: var(--accent); text-align: right; font-family: var(--font); }
.coeff-slider { width: 100%; accent-color: var(--accent); cursor: pointer; }
.coeff-reset {
  margin-top: 0.4rem; font-size: 0.55rem; color: var(--muted);
  cursor: pointer; text-align: right; border: none; background: none;
  font-family: var(--font); padding: 0;
}
.coeff-reset:hover { color: var(--accent); }
/* name block: stacked name + proj/cat */
.urgency-name-block {
  display: flex; flex-direction: column; gap: 0.15rem;
  overflow: hidden; margin: 0 0.8rem; flex-shrink: 0;
}
.urgency-label {
  font-size: 1.2em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: 'Gabarito', 'JetBrains Mono', monospace;
  letter-spacing: 0.03em;
}
.urgency-main-line {
  display: flex; align-items: center; gap: 0.35rem; min-width: 0;
}
.urgency-main-label-wrap {
  display: inline-flex; align-items: center; gap: 0.3rem; min-width: 0; flex: 0 1 auto; max-width: 100%;
}
.urgency-main-title {
  min-width: 0; flex: 1 1 auto;
}
.taskbar-rotating-label {
  opacity: 1;
}
.taskbar-label-fade-in {
  animation: taskbarLabelFadeIn 0.16s ease-out;
}
@keyframes taskbarLabelFadeIn {
  from {
    opacity: 0.18;
  }
  to {
    opacity: 1;
  }
}
.urgency-label-main {
  text-decoration: underline;
  text-underline-offset: 0.13em;
}
.urgency-label-subtask {
  text-decoration: none;
}
.urgency-proj-cat-row {
  display: flex; align-items: center; gap: 0.5rem; min-width: 0;
}
.urgency-proj-cat {
  font-size: 0.9em; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: 'Gabarito', 'JetBrains Mono', monospace; min-width: 0;
}
.urgency-subtask-nav {
  display: inline-flex; align-items: center; gap: 0.18rem; min-width: 0; flex-shrink: 1;
}
.urgency-subtask-chevron {
  border: none; background: none; color: var(--accent);
  cursor: pointer; padding:0; line-height: 1; font-size: 0.9rem; font-weight: 900; flex-shrink: 0; transform: translateY(4px);
}
.urgency-subtask-chevron:hover {
  color: var(--text);
}
.urgency-subtask-chip {
  border: 1px solid rgba(255,255,255,0.88); background: transparent; color: rgba(255,255,255,0.96);
  border-radius: 4px; padding: 0.02rem 0.24rem; line-height: 1; font-size: 0.6rem; font-weight: 800;
  letter-spacing: 0.04em; cursor: pointer; flex-shrink: 0; transform: translateY(2px);
}
.urgency-subtask-chip:hover {
  color: white; border-color: white;
}
:root[data-theme="light"] .urgency-subtask-chip {
  border-color: rgba(28,32,48,0.82); color: rgba(28,32,48,0.92);
}
#subtaskPreview {
  position: fixed; z-index: 10010; pointer-events: none;
  min-width: 220px; max-width: 320px;
  background: #10121c; color: #f5f5fb;
  border: 1px solid rgba(255,255,255,0.18); border-radius: 8px;
  box-shadow: 0 10px 26px rgba(0,0,0,0.42);
  padding: 0.45rem 0.55rem; opacity: 0;
  transform: translate(-50%, calc(-100% - 4px)); transition: opacity 0.12s ease;
}
.subtask-preview-title {
  font-size: 0.6rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.35rem;
}
.subtask-preview-list {
  display: flex; flex-direction: column; gap: 0.18rem;
}
.subtask-preview-line {
  display: grid; grid-template-columns: 18px 1fr; gap: 0.35rem; align-items: start;
  font-size: 1.08rem; line-height: 1.35;
}
.subtask-preview-line.is-main .subtask-preview-text {
  text-decoration: underline; text-underline-offset: 0.13em;
}
.subtask-preview-num {
  color: rgba(255,255,255,0.55); font-weight: 700;
}
.subtask-preview-text {
  min-width: 0; word-break: break-word;
}
:root[data-theme="light"] #subtaskPreview {
  background: #f5f6fc; color: #1c2030; border-color: rgba(28,32,48,0.16);
}
:root[data-theme="light"] .subtask-preview-num {
  color: rgba(28,32,48,0.5);
}
.task-settings-gear {
  opacity: 0; font-size: 1.3rem; cursor: pointer;
  transition: opacity 0.15s, color 0.15s;
  flex-shrink: 0; line-height: 1;
  color: var(--text);
}
.urgency-item:hover .task-settings-gear { opacity: 1; }
.task-settings-gear:hover { color: var(--accent) !important; }

:root[data-theme="light"] #taskModal button[onclick="_s2OpenSubtasks()"] {
  color: #111 !important;
  border-color: #111 !important;
}

:root[data-theme="light"] .task-watch-icon {
  color: #1c2030 !important;
}

/* Étoile favori tâche */
.task-fav-star {
  width: 20px; height: 20px; display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; cursor: pointer; flex-shrink: 0; line-height: 1;
  color: var(--border); transition: color 0.15s, filter 0.15s;
  background: none; border: none; padding: 0;
}
.task-fav-star:hover { color: var(--muted); filter: drop-shadow(0 0 6px rgba(255,210,60,0.55)); }
.task-fav-star.active { color: #ffd23c; filter: drop-shadow(0 0 8px rgba(255,210,60,0.9)); }
/* Delete button for project and cat items */
.item-gear {
  opacity: 0; font-size: 1rem; cursor: pointer;
  transition: opacity 0.15s, color 0.15s;
  flex-shrink: 0; line-height: 1; color: var(--muted);
  background: none; border: none; padding: 0 1px;
}
.project-item:hover .item-gear,
.cat-item:hover .item-gear { opacity: 1; }
.item-gear:hover { color: var(--accent) !important; }
.item-del { color: #c0392b !important; font-size: 1.1rem; }
.item-del:hover { color: #ff2222 !important; }

.cat-check-native {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
}
.cat-check-dropdown {
  position: relative;
  width: 100%;
}
.cat-check-trigger {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.28rem 0.4rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-family: var(--font);
  font-size: 0.85em;
  font-weight: 400;
  line-height: 1.4;
  cursor: pointer;
  text-align: left;
  margin: 0;
  box-shadow: none;
}
.cat-check-trigger:focus,
.cat-check-trigger:focus-visible {
  outline: none;
  border-color: var(--accent);
}
.cat-check-trigger-text {
  font: inherit;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cat-check-chevron {
  color: var(--muted);
  flex-shrink: 0;
}
.cat-check-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.3rem);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 220px;
  overflow-y: auto;
  padding: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.28);
}
.cat-check-dropdown.open .cat-check-menu {
  display: block;
}
.cat-check-dropdown.open .cat-check-chevron {
  transform: rotate(180deg);
}
.cat-check-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.45rem;
  border-radius: 4px;
  color: var(--text);
  cursor: pointer;
}
.cat-check-item:hover {
  background: var(--surface2);
}
.cat-check-item input {
  margin: 0;
  accent-color: var(--accent);
}


.urgency-val { flex-shrink: 0; font-size: 1.05em; font-weight: 600; min-width: 28px; text-align: right; }
.urgency-val.u-high { color: var(--danger); }
.urgency-val.u-mid  { color: var(--accent2); }
.urgency-val.u-low  { color: var(--accent3); }
.urgency-track { flex: 1; min-width: 40px; height: 5px; background: var(--surface2); border-radius: 3px; overflow: hidden; }
.urgency-fill { height: 100%; border-radius: 3px; transition: width 0.4s ease; }
.urgency-fill.pulse { animation: urgPulse 1.2s ease-in-out infinite; }
@keyframes urgPulse { 0%,100%{opacity:1} 50%{opacity:0.5} }

/* Suivi controls */
.urg-prio-sel, .urg-days-sel {
  font-size: 0.75em; background: var(--surface2); border: 1px solid var(--border);
  color: var(--muted); border-radius: 3px; padding: 0.1rem 0.15rem;
  font-family: var(--font); cursor: pointer; flex-shrink: 0; width: auto;
}
.urgency-item.hachured {
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 6px,
    rgba(80,200,100,0.22) 6px,
    rgba(80,200,100,0.22) 12px
  );
  opacity: 0.82;
}
.urgency-item.hachured .urgency-label {
  text-decoration: none;
}
.urg-adj-btn {
  height: 26px; flex-shrink: 0; background: none; border-radius: 4px; margin-left: 6px;
  cursor: pointer; font-size: 0.75em; font-weight: 600;
  padding: 0; flex-shrink: 0; transition: all 0.15s; line-height: 1;
  border: 1px solid var(--border); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
}
.urg-adj-btn:hover { border-color: var(--accent3); color: var(--accent3); }
.urg-snooze {
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; cursor: default; line-height: 1;
  justify-self: center; align-self: center;
}
.urg-snooze svg { display: block; }
#streakTooltip {
  position: fixed; z-index: 10000;
  transform: translateX(-50%) translateY(-100%);
  background: #2a3a2a; border: 1px solid #506850;
  color: #f0c030; font-size: 0.65rem; font-weight: 600;
  font-family: 'Courier New', monospace; letter-spacing: 0.08em;
  text-transform: uppercase; text-align: center; line-height: 1.5;
  padding: 0.5rem 1rem; border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5), inset 0 0 12px rgba(80,104,80,0.3);
  pointer-events: none; white-space: pre-line;
  opacity: 0; transition: opacity 0.25s ease-in;
}
.urg-adj-minus {
  border-color: var(--green) !important;
  color: var(--green) !important;
  box-shadow: 0 0 6px rgba(80,220,130,0.4);
  text-shadow: 0 0 5px rgba(80,220,130,0.6);
}
.urg-adj-minus:hover {
  box-shadow: 0 0 10px rgba(80,220,130,0.7);
  text-shadow: 0 0 8px rgba(80,220,130,0.9);
}
.urg-adj-done {
  border-color: var(--border) !important;
  cursor: pointer; opacity: 0.8; font-size: 19px;
}
.urg-adj-done:hover {
  border-color: var(--accent2) !important;
  opacity: 1;
}
.urg-tr-display {
  font-size: 0.9em; text-align: center; color: var(--text);
  font-family: var(--font); line-height: 1;
}
/* Legacy — conservé pour compatibilité modale */
.urg-tr-inp {
  flex-shrink: 0; width: 100%; font-size: 0.9em; text-align: center;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 3px; color: var(--text); padding: 0.1rem 0.2rem;
  font-family: var(--font);
}
.urg-tr-inp:focus { outline: none; border-color: var(--accent); }
/* Remove native number spinner arrows */
.urg-tr-inp::-webkit-inner-spin-button,
.urg-tr-inp::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.urg-tr-inp { -moz-appearance: textfield; }
.urg-sep { flex-shrink: 0; font-size: 1em; color: var(--muted); }
.urg-date-inp {
  flex-shrink: 0; font-size: 0.85em; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 3px; color: var(--text); padding: 0.08rem 0.2rem;
  font-family: var(--font); cursor: pointer; width: 100%;
  color-scheme: dark;
}
.urg-date-inp:focus { outline: none; border-color: var(--accent); }
/* Wrapper date custom */
.urg-date-wrap {
  position: relative; flex-shrink: 0; width: 100%;
  display: inline-flex; align-items: center; cursor: pointer;
}
.urg-date-lbl {
  display: block; width: 100%;
  font-size: 0.85em; background: var(--surface2); border: 1px solid var(--border);
  border-radius: 3px; color: var(--text); padding: 0.08rem 0.2rem;
  font-family: var(--font); cursor: pointer; white-space: nowrap;
  user-select: none; text-align: center; pointer-events: none;
}
.urg-date-lbl:hover { border-color: var(--accent); }
.urg-date-lbl.disabled { opacity: 0.3; cursor: not-allowed; }
.urg-date-hidden {
  position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%;
  cursor: pointer; z-index: 2;
}
.urg-drest { flex-shrink: 0; font-size: 0.9em; color: var(--muted); white-space: nowrap; }
/* ── NOTIFS CELL ─────────────────────────────────────────────────── */
.notif-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 100%; width: 100%;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 3px 0; gap: 4px;
}
/* Ligne du haut : retard + J1 */
.notif-alerts {
  display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%;
}
/* Ligne du bas : [badges gauche] [!] [badges droite] */
.notif-main-row {
  display: flex; flex-direction: row; align-items: center; justify-content: center; width: 100%;
}
.notif-badges-left, .notif-badges-right {
  flex: 1; display: flex; flex-direction: row; align-items: center; gap: 2px;
}
.notif-badges-left  { justify-content: flex-end; }
.notif-badges-right { justify-content: flex-start; }
/* RETARD badge */
.notif-retard {
  font-size: 0.525rem; font-weight: 800; letter-spacing: 0.18em;
  color: var(--danger); border: 1.5px solid var(--danger);
  padding: 1px 4px; border-radius: 2px;
  text-shadow: 0 0 6px rgba(255,107,107,0.7);
  box-shadow: 0 0 5px rgba(255,107,107,0.35), inset 0 0 4px rgba(255,107,107,0.1);
  line-height: 1.4; white-space: nowrap; flex-shrink: 0; margin-left: 20px;
  animation: retardPulse 2s ease-in-out infinite;
}
@keyframes retardPulse {
  0%,100% { opacity:1; box-shadow: 0 0 5px rgba(255,107,107,0.35), inset 0 0 4px rgba(255,107,107,0.1); }
  50%      { opacity:0.75; box-shadow: 0 0 10px rgba(255,107,107,0.6), inset 0 0 6px rgba(255,107,107,0.2); }
}
.notif-j1 {
  font-size: 0.65rem; font-weight: 800; letter-spacing: 0.18em;
  color: #ff9e7a; border: 1.5px solid #ff9e7a;
  padding: 1px 4px; border-radius: 2px;
  text-shadow: 0 0 6px rgba(255,158,122,0.7);
  box-shadow: 0 0 5px rgba(255,158,122,0.35), inset 0 0 4px rgba(255,158,122,0.1);
  line-height: 1.4; white-space: nowrap; flex-shrink: 0; margin-left: 20px;
  animation: j1Pulse 2s ease-in-out infinite;
}
@keyframes j1Pulse {
  0%,100% { opacity:1; box-shadow: 0 0 5px rgba(255,158,122,0.35), inset 0 0 4px rgba(255,158,122,0.1); }
  50%      { opacity:0.75; box-shadow: 0 0 10px rgba(255,158,122,0.6), inset 0 0 6px rgba(255,158,122,0.2); }
}
/* Quick flash icon */
.notif-warn {
  filter: drop-shadow(0 0 5px rgba(255,50,50,0.9)) drop-shadow(0 0 10px rgba(255,50,50,0.5));
  animation: warnGlow 1.8s ease-in-out infinite;
}
.notif-warn svg { display: block; }
@keyframes warnGlow {
  0%,100% { filter: drop-shadow(0 0 5px rgba(255,50,50,0.9)) drop-shadow(0 0 10px rgba(255,50,50,0.5)); }
  50%      { filter: drop-shadow(0 0 9px rgba(255,50,50,1))   drop-shadow(0 0 18px rgba(255,50,50,0.7)); }
}
/* Quick flash icon */
.notif-quick {
  font-size: 1.5rem;
  color: var(--accent2);
  filter: drop-shadow(0 0 5px rgba(255,158,122,0.8));
}
.perm-task-label {
  font-family: 'Rajdhani', 'Share Tech', 'Arial Narrow', sans-serif;
  font-size: 0.92em; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  white-space: nowrap;
  display: flex; align-items: center; justify-content: center;
}
/* Permanent icon */
.notif-perm {
  font-size: 1.50rem; font-weight: 700;
  color: var(--accent);
  filter: drop-shadow(0 0 3px rgba(200,184,255,0.5));
  width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center;
}
/* Scratchpad icon */
.notif-scratch {
  cursor: pointer; border-radius: 3px;
  transition: all 0.15s;
  color: var(--border);
}
.notif-scratch:hover { color: var(--muted); }
.notif-scratch.has-note {
  color: var(--accent);
  filter: drop-shadow(0 0 4px rgba(200,184,255,0.55));
}
.notif-scratch.has-note:hover {
  filter: drop-shadow(0 0 7px rgba(200,184,255,0.85));
}
/* Preview scratchpad tooltip */
.scratch-preview {
  position: fixed; z-index: 999;
  background: var(--surface2); border: 1px solid var(--accent);
  border-radius: 6px; padding: 0.5rem 0.7rem;
  max-width: 300px; overflow: visible;
  font-size: 1em; font-family: var(--font); color: #fff;
  line-height: 1.5; white-space: pre-wrap; word-break: break-word;
  box-shadow: 0 4px 18px rgba(0,0,0,0.5), 0 0 0 1px rgba(200,184,255,0.15);
  pointer-events: none;
  opacity: 0; transition: opacity 0.15s;
}
/* Boîte commune à toutes les icônes notif — garantit alignement vertical */
.notif-warn, .notif-quick, .notif-perm, .notif-recur, .notif-scratch {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; flex-shrink: 0;
  line-height: 1;
}
.notif-recur { font-size: 15px; }
/* Scratchpad modal textarea */
/* ── CONTENTEDITABLE SCRATCHPAD ───────────────────────────────────── */
.scratch-editor {
  width: 100%; min-height: 220px; max-height: 420px;
  overflow-y: auto; border: 1px solid var(--border); border-radius: 5px;
  font-family: var(--font); font-size: 0.7rem; line-height: 1.6;
  outline: none; color: var(--text);
  caret-color: var(--accent);
}
.scratch-editor:focus { border-color: var(--accent); }
.scratch-editor:empty:before {
  content: attr(data-placeholder); color: var(--muted); pointer-events: none;
}
.scratch-p {
  padding: 0.45rem 0.7rem; margin: 0;
  min-height: 1.6em; white-space: pre-wrap; word-break: break-word;
}
.scratch-p.even { background: #1e1e24; }
.scratch-p.odd  { background: #252530; }

/* ── DOMAIN FRAMES ────────────────────────────────────────────────── */
.domain-frame {
  border-radius: 10px; padding: 0.7rem 0.8rem 0.8rem;
  display: flex; flex-direction: column; gap: 0.4rem;
  margin-bottom: 0.6rem;
}
.domain-frame.frame-Alpha  { border: 1.5px solid rgba(255,80,80,0.55);  background: rgba(255,60,60,0.04); }
.domain-frame.frame-Charlie{ border: 1.5px solid rgba(80,160,255,0.55); background: rgba(60,120,255,0.04); }
.domain-frame.frame-Tango  { border: 1.5px solid rgba(255,210,60,0.55); background: rgba(255,200,40,0.04); }
.domain-frame-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.3rem;
}
.domain-frame-title {
  font-size: 1rem; font-weight: 800; letter-spacing: 0.18em;
  padding: 2px 10px; border-radius: 4px;
  border: 2px solid currentColor;
  line-height: 1.5;
}
.domain-frame.frame-Alpha   .domain-frame-title { color: #ff4040; text-shadow: 0 0 8px rgba(255,60,60,0.6); box-shadow: 0 0 6px rgba(255,60,60,0.25); }
.domain-frame.frame-Charlie .domain-frame-title { color: #50a0ff; text-shadow: 0 0 8px rgba(60,130,255,0.6); box-shadow: 0 0 6px rgba(60,130,255,0.25); }
.domain-frame.frame-Tango   .domain-frame-title { color: #ffd23c; text-shadow: 0 0 8px rgba(255,200,40,0.6); box-shadow: 0 0 6px rgba(255,200,40,0.25); }
.domain-frame-count { font-size: 0.65rem; color: var(--muted); }

/* ── AB DOMAIN BUTTONS ────────────────────────────────────────────── */
.ab-domain-btn {
  width: 52px; height: 52px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.6rem; font-weight: 900; letter-spacing: -0.02em;
  padding: 0; border-radius: 6px; cursor: pointer;
  border: 1.5px solid; background: none; font-family: var(--font);
  transition: all 0.15s; opacity: 0.45; flex-shrink: 0;
}
.ab-domain-btn:hover { opacity: 0.8; }
.ab-domain-btn.active { opacity: 1; }
.ab-domain-btn.domain-Alpha   { color: #ff4040; border-color: #ff4040; }
.ab-domain-btn.domain-Alpha.active   { background: rgba(255,60,60,0.12); box-shadow: 0 0 6px rgba(255,60,60,0.3); }
.ab-domain-btn.domain-Charlie { color: #50a0ff; border-color: #50a0ff; }
.ab-domain-btn.domain-Charlie.active { background: rgba(60,130,255,0.12); box-shadow: 0 0 6px rgba(60,130,255,0.3); }
.ab-domain-btn.domain-Tango   { color: #ffd23c; border-color: #ffd23c; }
.ab-domain-btn.domain-Tango.active   { background: rgba(255,200,40,0.12); box-shadow: 0 0 6px rgba(255,200,40,0.3); }

/* ── AB FILTER ICON BUTTONS ───────────────────────────────────────── */
.ab-filter-icon {
  background: none; border: 1px solid var(--border); border-radius: 4px;
  color: #ffffff; cursor: pointer; font-size: 0.85rem;
  padding: 0.25rem 0.5rem; transition: all 0.12s; line-height: 1;
  text-shadow: 0 0 6px rgba(255,255,255,0.3);
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 26px;
}
.ab-filter-icon:hover { border-color: var(--accent); color: var(--accent); text-shadow: 0 0 8px rgba(200,184,255,0.5); }
.ab-filter-icon.active { border-color: var(--accent2); color: var(--accent2); background: rgba(255,158,122,0.1); text-shadow: 0 0 8px rgba(255,158,122,0.5); }
.ab-filter-icon.active-perm { border-color: var(--accent); color: var(--accent); background: rgba(200,184,255,0.1); text-shadow: 0 0 8px rgba(200,184,255,0.5); }

/* ── ACTIVE FILTER TAGS ──────────────────────────────────────────── */
.filter-tag {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.87rem; padding: 0.15rem 0.45rem; border-radius: 20px;
  cursor: pointer; border: 1px solid; transition: all 0.15s;
  font-family: var(--font); letter-spacing: 0.06em;
}
.filter-tag:hover { opacity: 0.7; }
.filter-tag .tag-x { font-size: 0.975rem; opacity: 0.7; }
.filter-tag-none  { color: var(--muted); border-color: var(--border); }
.filter-tag-alpha { color: #ff4040; border-color: rgba(255,64,64,0.5); background: rgba(255,64,64,0.07); }
.filter-tag-charlie { color: #50a0ff; border-color: rgba(80,160,255,0.5); background: rgba(80,160,255,0.07); }
.filter-tag-tango { color: #ffd23c; border-color: rgba(255,210,60,0.5); background: rgba(255,210,60,0.07); }
.filter-tag-warn  { color: #ff4040; border-color: rgba(255,64,64,0.5); background: rgba(255,64,64,0.07); }
.filter-tag-quick { color: var(--accent2); border-color: rgba(255,158,122,0.5); background: rgba(255,158,122,0.07); }
.filter-tag-perm  { color: var(--accent); border-color: rgba(200,184,255,0.5); background: rgba(200,184,255,0.07); }
.filter-tag-recur { color: #00e5ff; border-color: rgba(0,229,255,0.5); background: rgba(0,229,255,0.07); }
.filter-tag-prio  { color: #ffd23c; border-color: rgba(255,210,60,0.5); background: rgba(255,210,60,0.07); }

/* Flash animations */
.urgency-item.flash { animation: urgFlash 3.5s ease-out forwards; }
@keyframes urgFlash {
  0%   { background: rgba(200,184,255,0.22); border-color: var(--accent); }
  9%   { background: rgba(200,184,255,0.05); border-color: var(--border); }
  18%  { background: rgba(200,184,255,0.22); border-color: var(--accent); }
  27%  { background: rgba(200,184,255,0.05); border-color: var(--border); }
  36%  { background: rgba(200,184,255,0.22); border-color: var(--accent); }
  45%  { background: rgba(200,184,255,0.05); border-color: var(--border); }
  54%  { background: rgba(200,184,255,0.22); border-color: var(--accent); }
  63%  { background: rgba(200,184,255,0.05); border-color: var(--border); }
  72%  { background: rgba(200,184,255,0.22); border-color: var(--accent); }
  /* fade out sur la dernière seconde (~72%→100% sur 3.5s ≈ 1s) */
  100% { background: var(--surface); border-color: var(--border); }
}

/* ── BADGE DELTA DEMAIN ───────────────────────────────────────────── */
.tomorrow-cell {
  width: 60px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.tomorrow-badge {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9em; font-weight: 700; font-family: 'Share Tech Mono', monospace;
  color: #fff; pointer-events: none;
  box-shadow: 0 1px 4px rgba(0,0,0,0.5);
  line-height: 1;
}
.tomorrow-badge.tm-down { background: #2ecc71; }
.tomorrow-badge.tm-up   { background: #e74c3c; }
.tomorrow-badge.tm-same { background: #555; }
/* ── THÈME CLAIR — stroke messages tâches spéciales ─────────────────── */
:root[data-theme="light"] .task-bar-msg {
  -webkit-text-stroke: 1px rgba(128,128,128,0.5);
  paint-order: stroke fill;
}

/* ── THÈME CLAIR — boutons domaine A C T ─────────────────────────────── */
:root[data-theme="light"] .ab-domain-btn.domain-Alpha   { color: #ff0000; border-color: #ff0000; }
:root[data-theme="light"] .ab-domain-btn.domain-Alpha.active   { background: rgba(255,0,0,0.12); box-shadow: 0 0 8px rgba(255,0,0,0.4); }
:root[data-theme="light"] .ab-domain-btn.domain-Charlie { color: #0033ff; border-color: #0033ff; }
:root[data-theme="light"] .ab-domain-btn.domain-Charlie.active { background: rgba(0,51,255,0.12); box-shadow: 0 0 8px rgba(0,51,255,0.4); }
:root[data-theme="light"] .ab-domain-btn.domain-Tango   { color: #ff9900; border-color: #ff9900; }
:root[data-theme="light"] .ab-domain-btn.domain-Tango.active   { background: rgba(255,153,0,0.12); box-shadow: 0 0 8px rgba(255,153,0,0.4); }
