/* ============================================================
   Plateforme Intuiteeth — design system
   Registre produit : sobre, lisible, vivant. Bleu de marque conservé.
   ============================================================ */
:root {
  /* Neutres (slate, frais) */
  --c-bg: #f4f7fb;
  --c-surface: #ffffff;
  --c-surface-alt: #eef2f8;
  --c-ink: #0f172a;
  --c-ink-soft: #475569;
  --c-ink-faint: #8a97aa;
  --c-line: #e5eaf1;
  --c-line-strong: #d4dbe6;

  /* Bleu de marque */
  --c-blue: #2563eb;
  --c-blue-dark: #1d4ed8;
  --c-blue-bg: #eaf1ff;

  /* Statuts */
  --st-todo: #64748b;
  --st-progress: #2563eb;
  --st-review: #e08a00;
  --st-done: #16a34a;

  --danger: #dc2626;
  --danger-dark: #b91c1c;

  /* Typo */
  --f-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --fs-xl: 1.6rem;
  --fs-lg: 1.18rem;
  --fs-md: 0.95rem;
  --fs-sm: 0.85rem;
  --fs-xs: 0.74rem;

  /* Espacements */
  --sp-1: 0.5rem;
  --sp-2: 1rem;
  --sp-3: 1.5rem;
  --sp-4: 2.5rem;

  /* Rayons */
  --radius-lg: 18px;
  --radius: 13px;
  --radius-sm: 9px;

  /* Ombres (douces, légère teinte froide) */
  --shadow-sm: 0 1px 2px rgba(15,23,42,.05);
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 10px 24px -14px rgba(15,23,42,.18);
  --shadow-lg: 0 24px 60px -20px rgba(15,23,42,.30);
  --shadow-hover: 0 2px 4px rgba(15,23,42,.05), 0 14px 30px -14px rgba(37,99,235,.35);

  /* Mouvement */
  --ease: cubic-bezier(.22,.61,.36,1);
  --dur: 170ms;

  --maxw: 1180px;
  color-scheme: light;
}

/* ===== Mode sombre ===== */
:root[data-theme="dark"] {
  --c-bg: #0b0f17;
  --c-surface: #141a24;
  --c-surface-alt: #1b2331;
  --c-ink: #e9eef6;
  --c-ink-soft: #aeb9c9;
  --c-ink-faint: #8b97a8;
  --c-line: #273141;
  --c-line-strong: #34404f;
  --c-blue: #5b8cff;
  --c-blue-dark: #4577f0;
  --c-blue-bg: #18253f;
  --st-todo: #8593a6;
  --st-progress: #5b8cff;
  --st-review: #eaa53d;
  --st-done: #3fbf6f;
  --danger: #f1707a;
  --danger-dark: #e0535f;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 12px 28px -16px rgba(0,0,0,.7);
  --shadow-lg: 0 28px 64px -20px rgba(0,0,0,.75);
  --shadow-hover: 0 2px 4px rgba(0,0,0,.4), 0 16px 34px -14px rgba(91,140,255,.45);
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--f-body);
  font-size: var(--fs-md);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--c-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--c-blue); outline-offset: 2px; border-radius: 4px; }

/* ===== Boutons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  font-family: inherit; font-size: var(--fs-sm); font-weight: 600;
  padding: 0.58rem 1.05rem; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--c-blue); color: #fff; box-shadow: 0 1px 2px rgba(37,99,235,.35), 0 6px 16px -8px rgba(37,99,235,.6); }
.btn-primary:hover { background: var(--c-blue-dark); text-decoration: none; box-shadow: 0 2px 4px rgba(37,99,235,.4), 0 10px 22px -8px rgba(37,99,235,.7); }
.btn-ghost { background: var(--c-surface); color: var(--c-ink-soft); border-color: var(--c-line); }
.btn-ghost:hover { background: var(--c-surface-alt); color: var(--c-ink); border-color: var(--c-line-strong); text-decoration: none; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-dark); text-decoration: none; }
.btn-sm { padding: 0.4rem 0.75rem; font-size: var(--fs-xs); }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ===== Champs ===== */
input, textarea, select {
  font-family: inherit; font-size: var(--fs-md); width: 100%;
  padding: 0.62rem 0.85rem; color: var(--c-ink);
  background: var(--c-surface);
  border: 1px solid var(--c-line-strong); border-radius: var(--radius-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--c-ink-faint); }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--c-blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-blue) 22%, transparent);
}
label { display: block; font-size: var(--fs-sm); font-weight: 600; margin-bottom: 0.35rem; }
textarea { resize: vertical; min-height: 84px; line-height: 1.5; }

/* ===== En-tête appli ===== */
.topbar {
  background: color-mix(in srgb, var(--c-surface) 86%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--c-line);
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top);
}
.topbar-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 0.7rem var(--sp-3);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
}
.brand { display: inline-flex; align-items: center; font-weight: 800; font-size: var(--fs-lg); letter-spacing: -0.02em; }
.brand span { color: var(--c-blue); }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; display: block; box-shadow: var(--shadow-sm); margin-right: 0.55rem; }
.login-card .brand { justify-content: center; }
.topbar-user { display: flex; align-items: center; gap: 0.6rem; font-size: var(--fs-sm); color: var(--c-ink-soft); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-blue), var(--c-blue-dark));
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: var(--fs-sm);
  box-shadow: 0 2px 6px -2px rgba(37,99,235,.6);
}

/* ===== Layout ===== */
.page {
  max-width: var(--maxw); margin: 0 auto;
  padding: var(--sp-3);
  padding-left: max(var(--sp-3), env(safe-area-inset-left));
  padding-right: max(var(--sp-3), env(safe-area-inset-right));
  padding-bottom: max(var(--sp-4), env(safe-area-inset-bottom));
}
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-2); margin-bottom: var(--sp-2); flex-wrap: wrap; }
.page-head h1 { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.page-head p { color: var(--c-ink-soft); font-size: var(--fs-sm); margin-top: 0.25rem; max-width: 60ch; }
.page-head-actions { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.board-search { width: 240px; }

/* ===== Vue d'ensemble ===== */
.overview {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); flex-wrap: wrap;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 0.7rem 1.1rem; margin-bottom: var(--sp-3); box-shadow: var(--shadow-sm); font-size: var(--fs-sm);
}
.overview-stats { display: flex; align-items: center; gap: 0.9rem; color: var(--c-ink-soft); flex-wrap: wrap; }
.overview-stats strong { color: var(--c-ink); font-weight: 700; font-size: var(--fs-md); }
.ov-pill { display: inline-flex; align-items: center; gap: 0.35rem; }
.overview-progress { display: flex; align-items: center; gap: 0.7rem; min-width: 220px; flex: 1; max-width: 380px; }
.ov-bar { flex: 1; height: 9px; background: var(--c-surface-alt); border-radius: 99px; overflow: hidden; min-width: 110px; box-shadow: inset 0 1px 2px rgba(15,23,42,.08); }
.ov-bar-fill { height: 100%; background: linear-gradient(90deg, var(--st-done), color-mix(in srgb, var(--st-done) 70%, #7dd3a0)); border-radius: 99px; transition: width .5s var(--ease); }
.ov-pct { color: var(--c-ink-soft); font-size: var(--fs-xs); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ===== Colonnes Kanban ===== */
.board { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-2); align-items: start; }
.column {
  background: var(--c-surface-alt);
  border: 1px solid var(--c-line);
  border-radius: var(--radius);
  padding: 0.55rem;
  min-height: 130px;
}
.column[data-status="todo"]        { --col: var(--st-todo); }
.column[data-status="in_progress"] { --col: var(--st-progress); }
.column[data-status="review"]      { --col: var(--st-review); }
.column[data-status="done"]        { --col: var(--st-done); }
.column-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--fs-sm); font-weight: 700; color: var(--c-ink);
  padding: 0.5rem 0.65rem; margin-bottom: 0.5rem;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--col) 12%, var(--c-surface));
}
.column-head > span:first-child { display: inline-flex; align-items: center; }
.column-head .count {
  background: color-mix(in srgb, var(--col) 22%, var(--c-surface));
  color: color-mix(in srgb, var(--col) 75%, var(--c-ink));
  border-radius: 99px; min-width: 22px; text-align: center;
  padding: 0.05rem 0.5rem; font-size: var(--fs-xs); font-weight: 700; font-variant-numeric: tabular-nums;
}
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 0.45rem; }
.dot-todo { background: var(--st-todo); }
.dot-in_progress { background: var(--st-progress); }
.dot-review { background: var(--st-review); }
.dot-done { background: var(--st-done); }
.column .empty {
  text-align: center; color: var(--c-ink-faint); font-size: var(--fs-sm);
  padding: 1.4rem 0.5rem; border: 1.5px dashed var(--c-line-strong); border-radius: var(--radius-sm);
  margin: 0.15rem;
}
.column.drag-over { border-color: var(--c-blue); background: color-mix(in srgb, var(--c-blue) 8%, var(--c-surface-alt)); }
.column.drag-over .empty { border-color: var(--c-blue); color: var(--c-blue); }

/* ===== Carte de bloc ===== */
.block-card {
  position: relative;
  background: var(--c-surface);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.9rem;
  margin-bottom: 0.5rem;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.block-card:last-child { margin-bottom: 0.15rem; }
.block-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: color-mix(in srgb, var(--c-blue) 40%, var(--c-line)); }
.block-card:active { cursor: grabbing; }
.block-card.dragging { opacity: .5; box-shadow: var(--shadow-lg); }
.block-card h3 { font-size: 0.96rem; font-weight: 650; line-height: 1.32; letter-spacing: -0.01em; padding-right: 0.8rem; }
.block-card p { font-size: var(--fs-sm); color: var(--c-ink-soft); line-height: 1.45; margin-top: 0.3rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prio-flag { position: absolute; top: 0.85rem; right: 0.85rem; width: 9px; height: 9px; border-radius: 50%; }
.prio-flag.prio-high { background: var(--st-review); box-shadow: 0 0 0 3px color-mix(in srgb, var(--st-review) 20%, transparent); }
.prio-flag.prio-urgent { background: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 22%, transparent); }
.block-meta { display: flex; gap: 0.65rem; row-gap: 0.3rem; margin-top: 0.65rem; font-size: var(--fs-xs); color: var(--c-ink-faint); align-items: center; flex-wrap: wrap; }
.block-meta span { display: inline-flex; align-items: center; gap: 0.28rem; }
.block-meta .assignee-dot {
  display: inline-grid; place-items: center; width: 19px; height: 19px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-blue), var(--c-blue-dark)); color: #fff; font-size: 9px; font-weight: 700;
}
.block-meta .st-count { color: var(--st-done); font-weight: 700; }
.block-meta .due.due-late { color: var(--danger); font-weight: 700; }
.block-meta .due.due-soon { color: var(--st-review); font-weight: 700; }
.block-meta .due.due-ok { color: var(--c-ink-faint); }
.block-meta .due.due-done { color: var(--st-done); }

/* ===== Modale ===== */
.overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.55);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: none; align-items: flex-start; justify-content: center;
  padding: var(--sp-4) var(--sp-2); z-index: 100; overflow-y: auto;
}
.overlay.open { display: flex; animation: overlay-in var(--dur) var(--ease); }
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--c-surface); border-radius: var(--radius-lg); width: 100%; max-width: 660px; box-shadow: var(--shadow-lg); border: 1px solid var(--c-line); animation: modal-in 220ms var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; padding: var(--sp-3); border-bottom: 1px solid var(--c-line); gap: var(--sp-2); }
.modal-head h2 { font-size: var(--fs-lg); font-weight: 750; letter-spacing: -0.02em; line-height: 1.25; }
.modal-body { padding: var(--sp-3); }
.close-x { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--c-ink-faint); line-height: 1; padding: 0.1rem 0.3rem; border-radius: var(--radius-sm); transition: color var(--dur), background var(--dur); }
.close-x:hover { color: var(--c-ink); background: var(--c-surface-alt); }

/* ===== Métadonnées (modale) ===== */
.meta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin-bottom: 1.3rem; }
.meta-field { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 600; }
.meta-field > span { font-size: var(--fs-xs); color: var(--c-ink-soft); text-transform: uppercase; letter-spacing: 0.03em; }
.meta-field select, .meta-field input { padding: 0.5rem 0.6rem; font-size: var(--fs-sm); }

/* ===== Sous-blocs ===== */
.subtasks { display: flex; flex-direction: column; gap: 0.45rem; margin-top: 0.4rem; }
.subtask {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem; font-size: var(--fs-sm); cursor: default;
  transition: border-color var(--dur), box-shadow var(--dur);
}
.subtask:hover { border-color: var(--c-line-strong); box-shadow: var(--shadow-sm); }
.subtask.dragging { opacity: .5; box-shadow: var(--shadow); }
.subtask.st-state-done .st-title { color: var(--c-ink-faint); text-decoration: line-through; }
.st-drag { cursor: grab; color: var(--c-ink-faint); font-size: 0.85rem; flex-shrink: 0; user-select: none; }
.st-title { flex: 1; word-break: break-word; cursor: text; line-height: 1.4; }
.st-check {
  flex-shrink: 0; width: 21px; height: 21px; border-radius: 50%;
  border: 2px solid var(--st-todo); background: transparent; cursor: pointer;
  display: grid; place-items: center; padding: 0;
  font-size: var(--fs-xs); font-weight: 700; line-height: 1; color: #fff;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.st-check:hover { transform: scale(1.1); }
.st-check.st-todo { border-color: var(--st-todo); background: transparent; }
.st-check.st-doing { border-color: var(--st-progress); background: var(--st-progress); }
.st-check.st-done { border-color: var(--st-done); background: var(--st-done); }
.st-del { flex-shrink: 0; background: none; border: none; cursor: pointer; color: var(--c-ink-faint); font-size: 1.15rem; line-height: 1; padding: 0 0.2rem; transition: color var(--dur); }
.st-del:hover { color: var(--danger); }
.st-edit-input { flex: 1; padding: 0.25rem 0.45rem; font-size: var(--fs-sm); }
.st-add { display: flex; gap: 0.5rem; margin-top: 0.55rem; }
.st-add input { flex: 1; }
.st-add .btn { flex-shrink: 0; }

/* ===== Fichiers ===== */
.files { display: flex; flex-direction: column; gap: 0.45rem; margin-top: var(--sp-1); }
.file-row { display: flex; align-items: center; gap: 0.65rem; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-sm); padding: 0.55rem 0.75rem; font-size: var(--fs-sm); transition: border-color var(--dur); }
.file-row:hover { border-color: var(--c-line-strong); }
.file-row .ic { font-size: 1.15rem; flex-shrink: 0; }
.file-row .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .sz { color: var(--c-ink-faint); font-size: var(--fs-xs); flex-shrink: 0; }
.dropzone { border: 1.5px dashed var(--c-line-strong); border-radius: var(--radius-sm); padding: var(--sp-2); text-align: center; font-size: var(--fs-sm); color: var(--c-ink-soft); cursor: pointer; transition: border-color var(--dur), background var(--dur), color var(--dur); }
.dropzone:hover, .dropzone.drag { border-color: var(--c-blue); background: var(--c-blue-bg); color: var(--c-blue); }

/* ===== Discussion ===== */
.thread { display: flex; flex-direction: column; gap: var(--sp-1); margin: var(--sp-2) 0; }
.msg { background: var(--c-surface-alt); border-radius: var(--radius-sm); padding: 0.7rem 0.85rem; max-width: 85%; }
.msg.mine { background: var(--c-blue-bg); align-self: flex-end; }
.msg-head { display: flex; justify-content: space-between; gap: 1rem; font-size: var(--fs-xs); color: var(--c-ink-faint); margin-bottom: 0.3rem; }
.msg-head b { color: var(--c-ink); }
.msg-body { font-size: var(--fs-sm); white-space: pre-wrap; word-break: break-word; line-height: 1.5; }

/* ===== Connexion ===== */
.login-wrap {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: var(--sp-3);
  background:
    radial-gradient(60% 50% at 50% 0%, color-mix(in srgb, var(--c-blue) 16%, transparent), transparent 70%),
    var(--c-bg);
}
.login-card {
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: var(--sp-4); width: 100%; max-width: 400px; text-align: center;
}
.login-logo { width: 60px; height: 60px; border-radius: 15px; box-shadow: var(--shadow); margin: 0 auto var(--sp-2); display: block; }
.login-card .brand { font-size: var(--fs-xl); justify-content: center; margin-bottom: 0.3rem; }
.login-card .sub { color: var(--c-ink-soft); font-size: var(--fs-sm); margin-bottom: var(--sp-3); }
.login-card .field { margin-bottom: var(--sp-2); text-align: left; }
.login-card .btn { width: 100%; margin-top: 0.3rem; padding: 0.7rem; }
.alert { background: color-mix(in srgb, var(--danger) 12%, var(--c-surface)); border: 1px solid color-mix(in srgb, var(--danger) 35%, transparent); color: var(--danger-dark); border-radius: var(--radius-sm); padding: 0.65rem 0.85rem; font-size: var(--fs-sm); margin-bottom: var(--sp-2); }

/* ===== Toasts ===== */
.toast-stack { position: fixed; bottom: 1.1rem; right: 1.1rem; display: flex; flex-direction: column; gap: 0.55rem; z-index: 200; max-width: min(380px, 92vw); }
.toast { background: var(--c-surface); color: var(--c-ink); border: 1px solid var(--c-line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 0.75rem 0.95rem; font-size: var(--fs-sm); display: flex; gap: 0.65rem; align-items: flex-start; transition: opacity .18s ease; animation: toast-in .22s var(--ease); }
.toast::before { content: ""; width: 4px; align-self: stretch; border-radius: 99px; background: var(--c-blue); flex-shrink: 0; }
.toast-success::before { background: var(--st-done); }
.toast-error::before { background: var(--danger); }
.toast-info::before { background: var(--c-blue); }
.toast .toast-x { margin-left: auto; cursor: pointer; background: none; border: none; color: var(--c-ink-faint); font-size: 1rem; line-height: 1; padding: 0 0.1rem; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ===== Confirmation ===== */
.confirm-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center; z-index: 300; padding: var(--sp-2); }
.confirm-overlay.open { display: flex; animation: overlay-in var(--dur) var(--ease); }
.confirm-box { background: var(--c-surface); color: var(--c-ink); border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 1px solid var(--c-line); max-width: 410px; width: 100%; padding: var(--sp-3); }
.confirm-box h3 { font-size: var(--fs-lg); font-weight: 750; margin-bottom: 0.4rem; }
.confirm-box p { color: var(--c-ink-soft); font-size: var(--fs-sm); margin-bottom: var(--sp-2); line-height: 1.5; }
.confirm-actions { display: flex; gap: 0.5rem; justify-content: flex-end; }

#theme-btn { white-space: nowrap; }

/* ===== Motion réduit ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ===== Tablette ===== */
@media (max-width: 900px) {
  .board { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Téléphone ===== */
@media (max-width: 600px) {
  :root { --fs-md: 1rem; }
  input, textarea, select { font-size: 16px; }       /* anti-zoom iOS */
  .topbar-inner { padding: 0.6rem var(--sp-2); gap: 0.45rem; }
  .topbar-user { gap: 0.45rem; }
  .topbar-user .name-full { display: none; }
  #theme-btn { padding: 0.45rem 0.55rem; }
  .brand-mark { width: 26px; height: 26px; }
  .page { padding: var(--sp-2); padding-bottom: max(var(--sp-4), env(safe-area-inset-bottom)); }
  .page-head { gap: var(--sp-1); }
  .page-head h1 { font-size: 1.4rem; }
  .board-search { width: 100%; }
  .page-head-actions { width: 100%; }
  .overview { flex-direction: column; align-items: stretch; gap: 0.6rem; }
  .board { grid-template-columns: 1fr; gap: var(--sp-1); }

  /* Modale = feuille montante, en-tête figé, corps défilant */
  .overlay { padding: 0; align-items: flex-end; }
  .modal { max-width: 100%; border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 94vh; display: flex; flex-direction: column; animation: sheet-up .26s var(--ease); }
  .modal-head { position: sticky; top: 0; z-index: 3; background: var(--c-surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .modal-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: max(var(--sp-3), env(safe-area-inset-bottom)); }
  @keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
  .close-x { font-size: 1.9rem; padding: 0.1rem 0.5rem; margin: -0.2rem; }
  .meta-grid { grid-template-columns: 1fr; gap: 0.6rem; }
  .st-check { width: 24px; height: 24px; }
  .st-del { font-size: 1.4rem; padding: 0 0.45rem; }
  .subtask { padding: 0.6rem; gap: 0.7rem; }
  .file-row { padding: 0.65rem 0.7rem; }
  .toast-stack { left: 0.6rem; right: 0.6rem; bottom: 0.6rem; max-width: none; }
  .msg { max-width: 92%; }
}

/* ============================================================
   App shell : sidebar + 4 espaces (Sujets/Général/Retours/Journal)
   ============================================================ */
.app { display: flex; min-height: 100vh; min-height: 100dvh; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ----- Sidebar ----- */
.sidebar {
  width: 252px; flex-shrink: 0;
  background: var(--c-surface); border-right: 1px solid var(--c-line);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  padding: env(safe-area-inset-top) 0.7rem 0.7rem;
}
.sidebar-brand { display: flex; align-items: center; font-weight: 800; font-size: var(--fs-lg); letter-spacing: -0.02em; padding: 0.9rem 0.6rem 1.1rem; }
.sidebar-brand span { color: var(--c-blue); }
.sidebar-nav { display: flex; flex-direction: column; gap: 0.2rem; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 0.65rem; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: var(--fs-md); font-weight: 600; color: var(--c-ink-soft);
  padding: 0.6rem 0.7rem; border-radius: var(--radius-sm);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav-item:hover { background: var(--c-surface-alt); color: var(--c-ink); }
.nav-item.is-active { background: var(--c-blue-bg); color: var(--c-blue); }
.nav-ic { width: 1.3rem; text-align: center; font-size: 1rem; flex-shrink: 0; }
.nav-badge {
  margin-left: auto; background: var(--danger); color: #fff;
  font-size: var(--fs-xs); font-weight: 700; min-width: 20px; text-align: center;
  border-radius: 99px; padding: 0.05rem 0.4rem; line-height: 1.4;
}
.sidebar-foot { border-top: 1px solid var(--c-line); padding-top: 0.7rem; margin-top: 0.5rem; }
.sb-user { display: flex; align-items: center; gap: 0.55rem; padding: 0.3rem 0.4rem 0.6rem; font-size: var(--fs-sm); font-weight: 600; color: var(--c-ink); }
.sb-actions { display: flex; gap: 0.4rem; }
.sb-actions .btn { flex: 1; justify-content: center; }
.sidebar-scrim { display: none; }

/* ----- Topbar (recherche + user) ----- */
.topbar { display: flex; align-items: center; gap: var(--sp-2); padding: 0.6rem var(--sp-3); }
.hamburger { display: none; background: none; border: 1px solid var(--c-line); border-radius: var(--radius-sm); cursor: pointer; font-size: 1.2rem; line-height: 1; padding: 0.35rem 0.6rem; color: var(--c-ink); }
.search-wrap { position: relative; flex: 1; max-width: 560px; }
.global-search { width: 100%; }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 80;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); max-height: 60vh; overflow-y: auto; padding: 0.35rem;
}
.sr-item { display: flex; align-items: center; gap: 0.7rem; width: 100%; text-align: left; background: none; border: none; cursor: pointer; font-family: inherit; padding: 0.5rem 0.6rem; border-radius: var(--radius-sm); }
.sr-item:hover { background: var(--c-surface-alt); }
.sr-type { flex-shrink: 0; font-size: var(--fs-xs); font-weight: 700; padding: 0.1rem 0.45rem; border-radius: 99px; background: var(--c-surface-alt); color: var(--c-ink-soft); }
.sr-subject { background: color-mix(in srgb, var(--c-blue) 16%, var(--c-surface)); color: var(--c-blue); }
.sr-message, .sr-general { background: color-mix(in srgb, var(--st-todo) 18%, var(--c-surface)); color: var(--c-ink-soft); }
.sr-note { background: color-mix(in srgb, var(--st-review) 18%, var(--c-surface)); color: var(--st-review); }
.sr-activity { background: color-mix(in srgb, var(--st-done) 16%, var(--c-surface)); color: var(--st-done); }
.sr-main { min-width: 0; display: flex; flex-direction: column; }
.sr-label { font-size: var(--fs-sm); color: var(--c-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-sub { font-size: var(--fs-xs); color: var(--c-ink-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-empty { padding: 0.8rem; text-align: center; color: var(--c-ink-faint); font-size: var(--fs-sm); }

/* ----- Vues ----- */
.view[hidden] { display: none; }
.view-head { margin-bottom: var(--sp-3); }
.view-head h1 { font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.03em; }
.view-head p { color: var(--c-ink-soft); font-size: var(--fs-sm); margin-top: 0.25rem; }

/* ----- Chat (Général) ----- */
.chat { display: flex; flex-direction: column; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; max-width: 820px; }
.chat-thread { display: flex; flex-direction: column; gap: 0.6rem; padding: var(--sp-2); min-height: 40vh; max-height: 62vh; overflow-y: auto; }
.chat-compose { display: flex; gap: 0.6rem; padding: 0.7rem; border-top: 1px solid var(--c-line); background: var(--c-surface-alt); }
.chat-compose textarea { min-height: 44px; max-height: 140px; }
.chat-compose .btn { flex-shrink: 0; align-self: flex-end; }

/* ----- Fil (Retours + Journal) ----- */
.feed { display: flex; flex-direction: column; gap: 0.5rem; max-width: 820px; }
.feed-item { display: flex; gap: 0.7rem; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-sm); padding: 0.7rem 0.85rem; box-shadow: var(--shadow-sm); }
.fi-ic { flex-shrink: 0; font-size: 1rem; width: 1.5rem; text-align: center; color: var(--c-ink-faint); }
.fi-body { min-width: 0; flex: 1; }
.fi-main { font-size: var(--fs-sm); color: var(--c-ink-soft); }
.fi-main b { color: var(--c-ink); }
.fi-label { color: var(--c-ink); }
.fi-sub { font-size: var(--fs-xs); color: var(--c-ink-faint); margin-top: 0.15rem; }
.fi-subj { color: var(--c-blue); font-weight: 600; }
.fi-when { color: var(--c-ink-faint); font-size: var(--fs-xs); margin-left: 0.3rem; }
.fi-text { font-size: var(--fs-sm); color: var(--c-ink); margin: 0.35rem 0; white-space: pre-wrap; word-break: break-word; }
.fi-actions { display: flex; gap: 0.4rem; margin-top: 0.35rem; }
.feed-item.retour.unread { border-left: 0; background: color-mix(in srgb, var(--c-blue) 7%, var(--c-surface)); border-color: color-mix(in srgb, var(--c-blue) 35%, var(--c-line)); }
.feed-item.retour.unread .fi-ic { color: var(--c-blue); }

/* ----- Segmented (filtre Journal) ----- */
.seg { display: inline-flex; gap: 0.2rem; background: var(--c-surface-alt); border-radius: var(--radius-sm); padding: 0.2rem; margin-top: 0.7rem; }
.seg-btn { background: none; border: none; cursor: pointer; font-family: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--c-ink-soft); padding: 0.35rem 0.8rem; border-radius: calc(var(--radius-sm) - 2px); transition: background var(--dur), color var(--dur); }
.seg-btn.is-active { background: var(--c-surface); color: var(--c-ink); box-shadow: var(--shadow-sm); }

/* ----- Onglets modale ----- */
.modal-tabs { display: flex; gap: 0.3rem; margin-bottom: var(--sp-2); border-bottom: 1px solid var(--c-line); }
.mtab { background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; font-family: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--c-ink-soft); padding: 0.5rem 0.7rem; margin-bottom: -1px; transition: color var(--dur), border-color var(--dur); }
.mtab.is-active { color: var(--c-blue); border-bottom-color: var(--c-blue); }

/* ----- Dépôts (grille fichiers + notes + liens) ----- */
.depots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.5rem; margin-top: var(--sp-1); }
.depot { display: flex; gap: 0.6rem; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-sm); padding: 0.6rem 0.7rem; }
.depot-ic { flex-shrink: 0; font-size: 1.15rem; }
.depot-main { min-width: 0; flex: 1; }
.depot-title { display: block; font-size: var(--fs-sm); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.depot-note { font-size: var(--fs-sm); color: var(--c-ink); white-space: pre-wrap; word-break: break-word; }
.depot-meta { font-size: var(--fs-xs); color: var(--c-ink-faint); margin-top: 0.2rem; }
.depot-add { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.depot-add textarea, .depot-add input { flex: 1; min-height: 0; }
.depot-add textarea { min-height: 40px; }
.depot-add .btn { flex-shrink: 0; align-self: flex-start; }

/* ----- Responsive : sidebar off-canvas ----- */
@media (max-width: 860px) {
  .sidebar { position: fixed; top: 0; left: 0; height: 100dvh; transform: translateX(-100%); transition: transform .25s var(--ease); z-index: 120; box-shadow: var(--shadow-lg); width: 270px; }
  .sidebar.open { transform: none; }
  .sidebar-scrim.open { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 110; }
  .hamburger { display: inline-flex; align-items: center; }
}

/* ============================================================
   Liste de sujets « fiche mémo » (groupée par phase / statut)
   ============================================================ */
.subj-list { max-width: 900px; }
.group-title { display: flex; align-items: center; gap: 0.5rem; font-size: var(--fs-sm); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--c-ink-faint); margin: 1.5rem 0 0.6rem; }
.group-title:first-child { margin-top: 0.2rem; }
.group-count { background: var(--c-surface-alt); color: var(--c-ink-soft); border-radius: 99px; padding: 0.05rem 0.5rem; font-size: var(--fs-xs); font-weight: 700; }
.subj-group { display: flex; flex-direction: column; gap: 0.45rem; }
.subj-row {
  display: flex; align-items: center; gap: 0.8rem; width: 100%; text-align: left;
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem; cursor: pointer; font-family: inherit; box-shadow: var(--shadow-sm);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.subj-row:hover { border-color: color-mix(in srgb, var(--c-blue) 42%, var(--c-line)); box-shadow: var(--shadow-hover); transform: translateY(-1px); }
.subj-num { flex-shrink: 0; width: 1.7rem; text-align: center; font-size: var(--fs-sm); font-weight: 700; color: var(--c-ink-faint); font-variant-numeric: tabular-nums; }
.subj-dot { flex-shrink: 0; width: 10px; height: 10px; border-radius: 50%; }
.subj-title { flex: 1; min-width: 0; font-size: var(--fs-md); font-weight: 600; color: var(--c-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subj-meta { flex-shrink: 0; display: flex; align-items: center; gap: 0.45rem; font-size: var(--fs-xs); color: var(--c-ink-faint); }
.subj-status { font-weight: 700; }
.subj-status.st-review { color: var(--st-review); }
.subj-status.st-todo { color: var(--c-ink-soft); }
.subj-status.st-in_progress { color: var(--st-progress); }
.subj-status.st-done { color: var(--st-done); }
.subj-sep { opacity: .5; }
.subj-chev { flex-shrink: 0; color: var(--c-ink-faint); font-size: 1.35rem; line-height: 1; }
@media (max-width: 600px) {
  .subj-row { gap: 0.6rem; padding: 0.7rem 0.75rem; }
  .subj-meta > span:nth-child(2), .subj-meta > span:nth-child(3) { display: none; }
}

/* ============================================================
   Chat flottant : Discussion générale (ouvert par défaut)
   ============================================================ */
.genchat {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 90;
  width: 360px; max-width: calc(100vw - 1.4rem);
  height: 460px; max-height: calc(100dvh - 2rem);
  background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); display: none; flex-direction: column; overflow: hidden;
}
.genchat.open { display: flex; animation: sheet-up .22s var(--ease); }
.genchat-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.7rem 0.95rem; background: var(--c-blue); color: #fff; flex-shrink: 0; }
.genchat-title { font-weight: 700; font-size: var(--fs-sm); }
.genchat-close { background: none; border: none; color: #fff; font-size: 1.45rem; line-height: 1; cursor: pointer; opacity: .85; padding: 0 0.2rem; }
.genchat-close:hover { opacity: 1; }
.genchat .chat-thread { flex: 1; min-height: 0; max-height: none; }
.genchat .chat-compose { flex-shrink: 0; }
.genchat-pill {
  position: fixed; right: 1.1rem; bottom: 1.1rem; z-index: 90;
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--c-blue); color: #fff; font-size: 1.5rem;
  box-shadow: var(--shadow-lg); display: grid; place-items: center;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.genchat-pill[hidden] { display: none; }
.genchat-pill:hover { background: var(--c-blue-dark); transform: scale(1.06); }
@media (max-width: 600px) {
  .genchat { right: 0.6rem; bottom: 0.6rem; width: calc(100vw - 1.2rem); height: 70dvh; }
  .genchat-pill { right: 0.8rem; bottom: 0.8rem; }
}

/* ===== Glisser-déposer des sujets (vue par phase) ===== */
.subj-drag { cursor: grab; color: var(--c-ink-faint); font-size: 0.9rem; flex-shrink: 0; user-select: none; }
.subj-row:active .subj-drag { cursor: grabbing; }
#group-status .subj-drag { display: none; } /* pas de drag en vue par statut */
.subj-row.dragging { opacity: 0.4; box-shadow: var(--shadow-lg); }
.subj-group.drag-over { outline: 2px dashed var(--c-blue); outline-offset: 3px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--c-blue) 7%, transparent); }
.subj-group:empty { min-height: 2.6rem; border: 1.5px dashed var(--c-line-strong); border-radius: var(--radius-sm); position: relative; }
.subj-group:empty::after { content: "Déposer un sujet ici"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--c-ink-faint); font-size: var(--fs-xs); }

/* ============================================================
   Pop-up de détail d'un sujet — refonte présentation
   ============================================================ */
.modal { max-width: 920px; }            /* pop-up large */
.modal-body { padding: 0; }             /* les sections gèrent leur padding */
.sheet-pad { padding: var(--sp-3); }

/* En-tête */
.sheet-head { display: flex; align-items: center; gap: 0.9rem; padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--c-line); }
.sheet-head.simple { gap: 0.5rem; }
.sheet-num { flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; background: var(--c-blue-bg); color: var(--c-blue-dark); display: grid; place-items: center; font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.sheet-titles { flex: 1; min-width: 0; }
.sheet-phase { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-ink-faint); }
.sheet-title { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin-top: 1px; }
.sheet-close { flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px; background: var(--c-surface-alt); border: 1px solid var(--c-line); color: var(--c-ink-soft); font-size: 1.4rem; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: background var(--dur), color var(--dur); }
.sheet-close:hover { background: var(--c-line); color: var(--c-ink); }

/* Ligne statut + progression */
.sheet-statusrow { display: flex; align-items: center; gap: 1rem; padding: 0.85rem 1.4rem; border-bottom: 1px solid var(--c-line); }
.status-pill { -webkit-appearance: none; appearance: none; border: none; border-radius: 99px; padding: 0.3rem 0.9rem; font-family: inherit; font-size: 0.74rem; font-weight: 700; cursor: pointer; width: auto; }
.status-pill.st-todo { background: color-mix(in srgb, var(--st-todo) 16%, var(--c-surface)); color: color-mix(in srgb, var(--st-todo) 80%, var(--c-ink)); }
.status-pill.st-in_progress { background: color-mix(in srgb, var(--st-progress) 16%, var(--c-surface)); color: var(--st-progress); }
.status-pill.st-review { background: color-mix(in srgb, var(--st-review) 18%, var(--c-surface)); color: var(--st-review); }
.status-pill.st-done { background: color-mix(in srgb, var(--st-done) 16%, var(--c-surface)); color: var(--st-done); }
.sheet-prog { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; min-width: 180px; max-width: 280px; flex: 1; justify-content: flex-end; }
.prog-count { font-size: var(--fs-xs); font-weight: 700; color: var(--c-ink-soft); font-variant-numeric: tabular-nums; white-space: nowrap; }
.prog-bar { flex: 1; max-width: 180px; height: 8px; background: var(--c-surface-alt); border-radius: 99px; overflow: hidden; }
.prog-fill { height: 100%; background: var(--st-done); border-radius: 99px; transition: width .4s var(--ease); }

/* Onglets */
.sheet-tabs { display: flex; gap: 0.3rem; padding: 0 1.4rem; border-bottom: 1px solid var(--c-line); }
.sheet-tabs .mtab { margin-bottom: -1px; }

/* Corps 2 colonnes */
.sheet-body { display: grid; grid-template-columns: 1.25fr 1fr; gap: 1.6rem; padding: 1.4rem; }
.sheet-col { min-width: 0; }
.sheet-col-right { border-left: 1px solid var(--c-line); padding-left: 1.6rem; }
.sec { margin-bottom: 1.5rem; }
.sec:last-child { margin-bottom: 0; }
.sec-desc { padding-bottom: 1.2rem; border-bottom: 1px solid var(--c-line); }
.sec-lbl { display: flex; align-items: center; gap: 0.5rem; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--c-ink-faint); margin-bottom: 0.7rem; }
.sec-count { background: var(--c-surface-alt); color: var(--c-ink-soft); border-radius: 99px; padding: 0.05rem 0.5rem; font-size: var(--fs-xs); font-weight: 700; }
.sec-edit { margin-left: auto; background: none; border: none; color: var(--c-blue); font-family: inherit; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; text-transform: none; letter-spacing: 0; }
.sheet-desc { font-size: 0.9rem; color: var(--c-ink-soft); line-height: 1.55; margin-bottom: 1rem; }
.sheet-desc.muted { font-style: italic; color: var(--c-ink-faint); }
.sec-desc .meta-grid { margin-bottom: 0; }

/* Dépôts en lignes */
.depots { display: flex; flex-direction: column; }
.depot-row { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0; border-bottom: 1px solid var(--c-line); font-size: var(--fs-sm); }
.depot-row:last-child { border-bottom: none; }
.depot-ic { flex-shrink: 0; font-size: 1.05rem; }
.depot-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.depot-name a { color: var(--c-ink); }
.depot-tag { flex-shrink: 0; font-size: var(--fs-xs); color: var(--c-ink-faint); }
.depot-empty { font-size: var(--fs-sm); color: var(--c-ink-faint); font-style: italic; padding: 0.3rem 0; }

/* Commentaires */
.thread { display: flex; flex-direction: column; gap: 0.8rem; margin-bottom: 0.9rem; max-height: 46vh; overflow-y: auto; }
.cmt { display: flex; gap: 0.6rem; align-items: flex-start; }
.cmt-ava { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 0.74rem; font-weight: 700; }
.cmt-ava.mine { background: var(--c-blue-bg); color: var(--c-blue-dark); }
.cmt-ava.other { background: color-mix(in srgb, var(--st-done) 18%, var(--c-surface)); color: var(--st-done); }
.cmt-bub { flex: 1; min-width: 0; background: var(--c-surface-alt); border-radius: var(--radius-sm); padding: 0.5rem 0.75rem; }
.cmt-who { font-size: var(--fs-xs); color: var(--c-ink-faint); margin-bottom: 2px; }
.cmt-who b { color: var(--c-ink); }
.cmt-txt { font-size: var(--fs-sm); white-space: pre-wrap; word-break: break-word; line-height: 1.45; }
.cmt-empty { font-size: var(--fs-sm); color: var(--c-ink-faint); font-style: italic; }
.composer { display: flex; gap: 0.5rem; align-items: flex-end; }
.composer textarea { flex: 1; min-height: 40px; max-height: 120px; }
.composer .btn { flex-shrink: 0; }

@media (max-width: 720px) {
  .sheet-body { grid-template-columns: 1fr; gap: 1.2rem; }
  .sheet-col-right { border-left: none; padding-left: 0; border-top: 1px solid var(--c-line); padding-top: 1.2rem; }
}
