/* ══════════════════════════════════════════════════════════════════════════════
   Action Form — inline panel (af-*)
   ══════════════════════════════════════════════════════════════════════════════ */

.af-page {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--surface, #fff);
  min-height: 100%;
  font-size: 0.875rem;
}

/* Top bar (sticky, replaces simple header) */
.af-top-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line, #e5e7eb);
  background: var(--surface, #fff);
  position: sticky;
  top: 0;
  z-index: 20;
}
.af-header-title {
  flex: 1;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted, #6b7280);
}
.af-top-bar-actions {
  display: flex;
  gap: 8px;
}

/* Body: main col + side col */
.af-body {
  display: flex;
  gap: 0;
  padding: 20px 24px 0;
}
.af-col-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-right: 24px;
}
.af-col-side {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-left: 1px solid var(--line, #e5e7eb);
  padding-left: 24px;
}

/* Fields */
.af-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.af-field--grow { flex: 1; min-width: 120px; }
.af-field--notifier { align-items: flex-start; flex-shrink: 0; }
.af-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #6b7280);
}
.af-input {
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 0.875rem;
  color: var(--text, #0f1b2d);
  background: var(--surface, #fff);
  outline: none;
  transition: border-color .15s;
  width: 100%;
  box-sizing: border-box;
}
.af-input:focus { border-color: var(--primary, #3b82f6); }
.af-input--title { font-size: 1rem; font-weight: 600; }
.af-input--readonly {
  background: var(--surface-soft, #f8fafc);
  color: var(--muted, #6b7280);
  cursor: default;
  font-size: 0.875rem;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 6px;
  padding: 7px 10px;
}
.af-checkbox { width: 16px; height: 16px; margin-top: 2px; cursor: pointer; }

/* Date field group */
.af-field-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}
.af-field-group .af-field { min-width: 110px; }
.af-estimated {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary, #3b82f6);
  padding: 7px 0;
}
.af-time-input { max-width: 80px; text-align: center; letter-spacing: 0.05em; }

/* Chips */
.af-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.af-chips--col { flex-direction: column; gap: 5px; }
.af-chip {
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: var(--muted, #6b7280);
  transition: all .12s;
  white-space: nowrap;
}
.af-chip:hover { border-color: var(--primary, #3b82f6); color: var(--primary, #3b82f6); }
.af-chip--active {
  background: var(--primary, #3b82f6);
  border-color: var(--primary, #3b82f6);
  color: #fff;
}
.af-chips--col .af-chip { border-radius: 6px; text-align: left; padding: 5px 10px; }

/* Participants row */
.af-participants-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 24px 0;
  flex-wrap: wrap;
}
.af-participant-wrap {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 6px;
  padding: 5px 8px;
  background: var(--surface, #fff);
  min-height: 36px;
  cursor: text;
}
.af-participant-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.af-ptag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--primary-soft, #eff6ff);
  color: var(--primary, #3b82f6);
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 0.78rem;
  font-weight: 500;
}
.af-ptag-rm {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: .6;
  font-size: 1rem;
  line-height: 1;
  padding: 0;
}
.af-ptag-rm:hover { opacity: 1; }
.af-participant-input {
  border: none;
  outline: none;
  flex: 1;
  min-width: 80px;
  font-size: 0.875rem;
  background: transparent;
  color: var(--text, #0f1b2d);
  padding: 2px 0;
}
.af-suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  z-index: 200;
  overflow: hidden;
}
.af-suggest-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text, #0f1b2d);
  display: flex;
  align-items: center;
  gap: 8px;
}
.af-suggest-item:hover { background: var(--surface-soft, #f8fafc); }
.af-suggest-name { color: var(--muted, #6b7280); font-size: 0.8rem; }

/* Description section */
.af-desc-section {
  margin: 20px 24px 0;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 8px;
  overflow: hidden;
}
.af-desc-tabs {
  display: flex;
  border-bottom: 1px solid var(--line, #e5e7eb);
  background: var(--surface-soft, #f8fafc);
}
.af-desc-tab {
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted, #6b7280);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color .12s, border-color .12s;
}
.af-desc-tab:hover { color: var(--text, #0f1b2d); }
.af-desc-tab--active {
  color: var(--primary, #3b82f6);
  border-bottom-color: var(--primary, #3b82f6);
}
.af-desc-area {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: none;
  resize: vertical;
  padding: 12px;
  font-size: 0.875rem;
  color: var(--text, #0f1b2d);
  background: var(--surface, #fff);
  font-family: inherit;
  outline: none;
  min-height: 80px;
}

/* Rich text toolbar */
.af-rich-toolbar {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 5px 10px;
  border-bottom: 1px solid var(--line, #e5e7eb);
  background: var(--surface-soft, #f8fafc);
  flex-wrap: wrap;
}
.af-tb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text, #0f1b2d);
  transition: background .1s, border-color .1s;
  padding: 0;
  gap: 1px;
}
.af-tb-btn:hover  { background: var(--line, #e5e7eb); }
.af-tb-btn--active { background: var(--primary-soft, #eff6ff); border-color: var(--primary, #3b82f6); color: var(--primary, #3b82f6); }
.af-tb-btn--sm { font-size: 0.72rem; font-weight: 700; }
.af-tb-sep { width: 1px; height: 18px; background: var(--line, #e5e7eb); margin: 0 3px; flex-shrink: 0; }

.af-tb-color-wrap { position: relative; display: inline-flex; }
.af-tb-color-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
  padding: 0;
}
.af-tb-clr-lbl { font-size: 0.85rem; font-weight: 700; line-height: 1; }
.af-tb-hl-lbl  { background: #fef08a; padding: 0 2px; border-radius: 2px; }
.af-tb-clr-bar { display: block; width: 16px; height: 3px; border-radius: 1px; }

/* Contenteditable comment area */
.af-block-content {
  min-height: 64px;
  padding: 8px 10px;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 6px;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text, #0f1b2d);
  background: var(--surface, #fff);
  outline: none;
  line-height: 1.5;
  transition: border-color .15s;
  word-break: break-word;
}
.af-block-content:focus { border-color: var(--primary, #3b82f6); }
.af-block-content:empty::before {
  content: attr(data-placeholder);
  color: var(--muted, #9ca3af);
  pointer-events: none;
  font-style: italic;
}
.af-block-content ul, .af-block-content ol { padding-left: 1.4em; margin: 4px 0; }
.af-block-content li { margin: 2px 0; }

/* Dark mode toolbar */
body.dark-mode .af-rich-toolbar { background: var(--surface-soft); border-bottom-color: var(--line); }
body.dark-mode .af-tb-btn { color: var(--text); }
body.dark-mode .af-tb-btn:hover { background: var(--surface); }
body.dark-mode .af-tb-sep { background: var(--line); }
body.dark-mode .af-block-content { background: var(--surface-soft); border-color: var(--line); color: var(--text); }

/* Desc action buttons */
.af-desc-actions {
  position: relative;
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line, #e5e7eb);
  background: var(--surface-soft, #f8fafc);
  flex-wrap: wrap;
}
.af-desc-action {
  padding: 5px 13px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 16px;
  background: var(--surface, #fff);
  color: var(--text, #0f1b2d);
  cursor: pointer;
  transition: all .12s;
}
.af-desc-action:hover { border-color: var(--primary, #3b82f6); color: var(--primary, #3b82f6); background: var(--primary-soft, #eff6ff); }

/* Table picker popover */
.af-table-picker {
  position: absolute;
  top: calc(100% + 6px);
  left: 14px;
  background: var(--surface, #fff);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.13);
  padding: 16px 18px;
  z-index: 300;
  min-width: 210px;
  animation: tpFadeIn .15s ease;
}
@keyframes tpFadeIn {
  from { opacity: 0; transform: translateY(-6px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.af-tp-title {
  margin: 0 0 12px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted, #6b7280);
}
.af-tp-row { display: flex; gap: 12px; margin-bottom: 14px; }
.af-tp-field { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.af-tp-label { font-size: 0.75rem; font-weight: 600; color: var(--muted, #6b7280); }
.af-tp-input {
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 0.875rem;
  width: 100%;
  box-sizing: border-box;
  outline: none;
  color: var(--text, #0f1b2d);
  background: var(--surface, #fff);
}
.af-tp-input:focus { border-color: var(--primary, #3b82f6); }
.af-tp-actions { display: flex; gap: 8px; justify-content: flex-end; }
.af-tp-btn {
  padding: 5px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 6px;
  background: transparent;
  color: var(--text, #0f1b2d);
  cursor: pointer;
  transition: all .12s;
}
.af-tp-btn:hover { border-color: var(--muted, #6b7280); }
.af-tp-btn--primary { background: var(--primary, #3b82f6); border-color: var(--primary, #3b82f6); color: #fff; }
.af-tp-btn--primary:hover { background: #2563eb; }

/* Drag & drop overlay hint */
.af-drop-hint {
  display: none;
  padding: 20px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--primary, #3b82f6);
  font-weight: 500;
  pointer-events: none;
}
.af-desc-section--drag-over {
  outline: 2px dashed var(--primary, #3b82f6);
  outline-offset: -3px;
  background: var(--primary-soft, #eff6ff);
  border-radius: 7px;
}
.af-desc-section--drag-over .af-drop-hint { display: block; }

/* Comment blocks */
.af-blocks { display: flex; flex-direction: column; }
@keyframes blockSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.af-block {
  border-bottom: 1px solid var(--line, #e5e7eb);
  padding: 12px 14px 14px;
  animation: blockSlideIn .2s ease;
}
.af-block:last-child { border-bottom: none; }
.af-block-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line, #e5e7eb);
  margin-bottom: 10px;
}
.af-block-author {
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: underline;
  color: var(--text, #0f1b2d);
}
.af-block-ts {
  font-size: 0.75rem;
  color: var(--muted, #6b7280);
  flex: 1;
}
.af-block-del {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted, #6b7280);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 2px;
  opacity: .4;
  margin-left: auto;
  transition: opacity .1s, color .1s;
}
.af-block-del:hover { opacity: 1; color: #ef4444; }

.af-block-textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.875rem;
  font-family: inherit;
  color: var(--text, #0f1b2d);
  background: var(--surface, #fff);
  resize: vertical;
  outline: none;
  min-height: 72px;
  transition: border-color .15s;
}
.af-block-textarea:focus { border-color: var(--primary, #3b82f6); }

.af-block-file { padding: 2px 0; }
.af-file-link {
  color: var(--primary, #3b82f6);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}
.af-file-link:hover { text-decoration: underline; }

/* ── Recette partagée (bloc fixe, non éditable) ──────────────────────────── */
.af-block-recipe {
  background: var(--surface-soft, #f8fafc);
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 14px;
  padding: 14px 16px;
}
.af-block-recipe__name {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.af-block-recipe__ingredients {
  margin: 0 0 12px;
  padding-left: 1.2em;
  font-size: 0.8125rem;
  color: var(--muted);
  display: grid;
  gap: 2px;
}
.af-block-recipe__import {
  position: relative;
  isolation: isolate;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.1);
  background: rgba(15,23,42,0.05);
  backdrop-filter: blur(14px) saturate(160%);
  color: var(--text);
  font-size: 0.8125rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6);
  transition: transform 0.15s cubic-bezier(0.34,1.56,0.64,1), border-color 0.15s, color 0.15s;
}
.af-block-recipe__import::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  opacity: 0;
  transition: opacity 0.2s ease;
}
.af-block-recipe__import:hover:not(:disabled) { color: #fff; border-color: transparent; transform: scale(1.02); }
.af-block-recipe__import:hover:not(:disabled)::before { opacity: 1; }
.af-block-recipe__import:disabled { opacity: 0.6; cursor: default; }
.af-block-recipe__hint { font-size: 0.75rem; color: var(--muted); font-style: italic; }
body.dark-mode .af-block-recipe { background: var(--surface-soft); border-color: var(--line); }

.af-block-table-wrap { overflow-x: auto; }
.af-block-table {
  border-collapse: collapse;
  min-width: 100%;
  font-size: 0.84rem;
}
.af-block-table td {
  border: 1px solid var(--line, #e5e7eb);
  padding: 0;
  min-width: 80px;
}
.af-table-cell {
  display: block;
  width: 100%;
  border: none;
  outline: none;
  padding: 6px 8px;
  font-size: 0.84rem;
  font-family: inherit;
  color: var(--text, #0f1b2d);
  background: transparent;
  box-sizing: border-box;
}
.af-table-cell:focus { background: var(--primary-soft, #eff6ff); }

/* Table add/remove controls */
.af-table-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.af-tc-sep { width: 1px; height: 16px; background: var(--line, #e5e7eb); margin: 0 4px; }
.af-tc-btn {
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--line, #e5e7eb);
  border-radius: 12px;
  background: transparent;
  color: var(--text, #0f1b2d);
  cursor: pointer;
  transition: all .12s;
}
.af-tc-btn:hover { border-color: var(--primary, #3b82f6); color: var(--primary, #3b82f6); }
.af-tc-btn--del:hover { border-color: #ef4444; color: #ef4444; }

/* Dark mode — blocks */
body.dark-mode .af-desc-actions { background: var(--surface-soft); border-bottom-color: var(--line); }
body.dark-mode .af-desc-action { background: var(--surface); border-color: var(--line); color: var(--text); }
body.dark-mode .af-table-picker { background: var(--surface); border-color: var(--line); }
body.dark-mode .af-tp-input { background: var(--surface-soft); border-color: var(--line); color: var(--text); }
body.dark-mode .af-tp-btn { border-color: var(--line); color: var(--text); }
body.dark-mode .af-footer-btn--secondary { border-color: var(--primary); color: var(--primary); }
body.dark-mode .af-footer-btn--secondary:hover { background: rgba(59,130,246,.1); }
body.dark-mode .af-block { border-bottom-color: var(--line); }
body.dark-mode .af-block-hd { border-bottom-color: var(--line); }
body.dark-mode .af-block-content { background: var(--surface-soft); border-color: var(--line); color: var(--text); }
body.dark-mode .af-block-table td { border-color: var(--line); }
body.dark-mode .af-table-cell { color: var(--text); }
body.dark-mode .af-table-cell:focus { background: rgba(59,130,246,.1); }
body.dark-mode .af-tc-btn { border-color: var(--line); color: var(--text); }
body.dark-mode .af-tc-sep { background: var(--line); }

/* Footer */
.af-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--line, #e5e7eb);
  margin-top: 20px;
}
.af-footer-extra { display: flex; gap: 8px; flex: 1; }
.af-footer-btn {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .12s;
  white-space: nowrap;
}
.af-footer-btn--cancel {
  background: transparent;
  border-color: var(--line, #e5e7eb);
  color: var(--muted, #6b7280);
}
.af-footer-btn--cancel:hover { border-color: var(--muted, #6b7280); color: var(--text, #0f1b2d); }
.af-footer-btn--primary {
  background: var(--primary, #3b82f6);
  color: #fff;
  margin-left: auto;
}
.af-footer-btn--primary:hover { background: #2563eb; }
.af-footer-btn--secondary {
  background: transparent;
  border-color: var(--primary, #3b82f6);
  color: var(--primary, #3b82f6);
}
.af-footer-btn--secondary:hover { background: var(--primary-soft, #eff6ff); }
.af-footer-btn--secondary:disabled { opacity: .5; cursor: not-allowed; }
.af-footer-btn--primary:disabled { opacity: .5; cursor: not-allowed; }
.af-footer-btn--ghost {
  background: transparent;
  border-color: var(--line, #e5e7eb);
  color: var(--text, #0f1b2d);
}
.af-footer-btn--ghost:hover { border-color: var(--muted, #6b7280); }
.af-footer-btn--danger {
  background: transparent;
  border-color: #fecaca;
  color: #ef4444;
}
.af-footer-btn--danger:hover { background: #fef2f2; }

/* Dark mode */
body.dark-mode .af-page { background: var(--surface); }
body.dark-mode .af-header { border-bottom-color: var(--line); }
body.dark-mode .af-col-side { border-left-color: var(--line); }
body.dark-mode .af-input { background: var(--surface-soft); border-color: var(--line); color: var(--text); }
body.dark-mode .af-input--readonly { background: var(--surface); }
body.dark-mode .af-chip { border-color: var(--line); color: var(--muted); }
body.dark-mode .af-chip--active { background: var(--primary); border-color: var(--primary); color: #fff; }
body.dark-mode .af-participant-wrap { background: var(--surface-soft); border-color: var(--line); }
body.dark-mode .af-ptag { background: rgba(59,130,246,.15); }
body.dark-mode .af-suggest { background: var(--surface); border-color: var(--line); }
body.dark-mode .af-suggest-item:hover { background: var(--surface-soft); }
body.dark-mode .af-desc-section { border-color: var(--line); }
body.dark-mode .af-desc-tabs { background: var(--surface-soft); border-bottom-color: var(--line); }
body.dark-mode .af-desc-area { background: var(--surface); color: var(--text); }
body.dark-mode .af-footer { border-top-color: var(--line); }
body.dark-mode .af-footer-btn--cancel { border-color: var(--line); color: var(--muted); }
body.dark-mode .af-footer-btn--ghost { border-color: var(--line); color: var(--text); }

/* ══════════════════════════════════════════════════════════════════════════════
   Focus module — focus.css
   ══════════════════════════════════════════════════════════════════════════════ */

/* shared page wrapper */
.focus-page { padding: 28px; max-width: 1100px; margin: 0 auto; }

/* ══════════════════════════════════════════════════════════════════════════════
   Page 1 — Daily (weekly grid)
   ══════════════════════════════════════════════════════════════════════════════ */

.daily-page { padding: 28px 32px; max-width: 1200px; margin: 0 auto; }

/* ── Header ─────────────────────────────────────────────────────────────────── */
.daily-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}
.daily-header-left { display: flex; flex-direction: column; gap: 4px; }
.daily-header-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; padding-top: 4px; }

.daily-title {
  font-size: 2rem;
  font-weight: 900;
  color: var(--text, #0f1b2d);
  margin: 0;
  letter-spacing: -0.02em;
}
.daily-week-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.daily-week-num {
  font-size: 0.9375rem;
  font-weight: 800;
  color: var(--text, #0f1b2d);
}
.daily-week-range {
  font-size: 0.9rem;
  color: var(--muted, #64748b);
  font-weight: 500;
}
.daily-week-count {
  font-size: 0.8125rem;
  color: var(--muted, #64748b);
  font-weight: 600;
}

.daily-add-btn {
  height: 44px;
  padding: 0 22px;
  border-radius: 12px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.daily-add-btn:hover { opacity: 0.88; }

.daily-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: var(--text, #0f1b2d);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.daily-nav-btn:hover { background: #f1f5f9; }
.daily-nav-btn--today {
  width: auto;
  padding: 0 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  border-color: var(--primary);
}

/* ── Table ──────────────────────────────────────────────────────────────────── */
.daily-table-scroll {
  overflow-x: auto;
  background: #fff;
  border-radius: 20px;
  border: 1.5px solid #e8ecf2;
  box-shadow: 0 2px 16px rgba(0,0,0,0.04);
}
.daily-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

/* column headers */
.daily-table thead tr {
  border-bottom: 1.5px solid #f1f5f9;
}
.daily-table thead th {
  padding: 14px 8px 12px;
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #94a3b8;
  text-align: center;
}
.daily-th-name { text-align: left !important; padding-left: 20px !important; min-width: 180px; }
.daily-th-pct  { color: #0f1b2d !important; }
.daily-th-notes { min-width: 160px; text-align: left !important; }
.daily-th-act  { width: 64px; }

.daily-th-day { min-width: 56px; }
.daily-th-day--today .daily-th-wd,
.daily-th-day--today .daily-th-num {
  color: #0f1b2d;
  font-weight: 900;
}
.daily-th-day--today .daily-th-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: #0f1b2d;
  color: #fff;
  border-radius: 50%;
  font-size: 0.8125rem;
}
.daily-th-wd { display: block; font-size: 0.625rem; letter-spacing: 0.08em; }
.daily-th-num { display: block; font-size: 0.875rem; font-weight: 800; margin-top: 2px; }

/* body rows */
.daily-table tbody tr {
  border-bottom: 1px solid #f8fafc;
  transition: background 0.1s;
}
.daily-table tbody tr:last-child { border-bottom: none; }
.daily-table tbody tr:hover { background: #fafbfd; }

/* cells */
.daily-td {
  padding: 10px 6px;
  text-align: center;
  vertical-align: middle;
}
.daily-td--today {
  background: rgba(15,27,45,0.025);
}
.daily-td--tappable { cursor: pointer; }
.daily-td--tappable:hover { background: rgba(15,27,45,0.05); }
.daily-td svg { margin: 0 auto; }

/* Binary objective cells */
.daily-td--binary { cursor: pointer; user-select: none; }
.daily-td--binary:hover { background: var(--primary-soft); }
.daily-binary-icon {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--muted);
  transition: transform 0.15s, color 0.15s;
  display: inline-block;
}
.daily-td--binary:hover .daily-binary-icon { transform: scale(1.25); }
.daily-td--done .daily-binary-icon { color: var(--ok); }

.daily-dash {
  font-size: 0.9rem;
  font-weight: 700;
  color: #cbd5e1;
}

/* name cell */
.daily-td-name {
  padding: 12px 16px 12px 20px;
  text-align: left;
  vertical-align: middle;
}
.daily-obj-icon { font-size: 1.2rem; margin-right: 10px; vertical-align: middle; }
.daily-obj-label {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text, #0f1b2d);
  vertical-align: middle;
}

/* % cell */
.daily-td-pct { padding: 10px 12px; }

/* notes cell */
.daily-td-note { padding: 8px 10px; min-width: 160px; }
.daily-note-inp {
  width: 100%;
  border: 1.5px solid #e8ecf2;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.8125rem;
  font-family: inherit;
  color: var(--text, #0f1b2d);
  background: #f8fafc;
  outline: none;
  transition: border-color 0.15s;
}
.daily-note-inp:focus { border-color: var(--primary, #1f3a5a); background: #fff; }
.daily-note-inp::placeholder { color: #cbd5e1; }

/* action buttons */
.daily-td-actions { padding: 8px 12px 8px 4px; white-space: nowrap; text-align: right; vertical-align: middle; }
.daily-act-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px 6px;
  border-radius: 6px;
  color: #94a3b8;
  transition: background 0.15s, color 0.15s;
}
.daily-act-btn:hover { background: #f1f5f9; color: #475569; }
.daily-act-btn--del:hover { background: #fef2f2; color: #ef4444; }

/* ── Emoji picker ────────────────────────────────────────────────────────────── */
.daily-emoji-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.daily-emoji-btn {
  background: none;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  padding: 4px 6px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
  line-height: 1;
}
.daily-emoji-btn:hover { border-color: #94a3b8; }
.daily-emoji-btn--active { border-color: var(--primary, #1f3a5a); background: #f0f4f8; }

/* ── Previous weeks ──────────────────────────────────────────────────────────── */
.daily-prev-section { margin-top: 32px; }
.daily-section-label {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text, #0f1b2d);
  margin-bottom: 14px;
}
.daily-prev-card {
  background: #1a2332;
  border-radius: 16px;
  margin-bottom: 10px;
  overflow: hidden;
}
.daily-prev-card:last-child { margin-bottom: 0; }
.daily-prev-card-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  cursor: pointer;
  transition: background 0.15s;
}
.daily-prev-card-hd:hover { background: #1e2b3d; }
.daily-prev-info { flex: 1; }
.daily-prev-num { font-size: 1rem; font-weight: 800; color: #fff; }
.daily-prev-range { font-size: 0.8125rem; color: rgba(255,255,255,0.5); margin-top: 2px; font-weight: 500; }
.daily-prev-ring { flex-shrink: 0; }
.daily-prev-chev {
  font-size: 1.25rem;
  color: rgba(255,255,255,0.35);
  font-weight: 300;
  transition: transform 0.2s;
  line-height: 1;
}
.daily-prev-card--open .daily-prev-chev { transform: rotate(90deg); }
.daily-prev-detail {
  display: none;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.daily-prev-card--open .daily-prev-detail { display: block; }

/* ── Shared helpers ──────────────────────────────────────────────────────────── */
.focus-page-header { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:28px; gap:16px; flex-wrap:wrap; }
.focus-page-title { font-size:1.375rem; font-weight:800; color:var(--text,#0f1b2d); line-height:1.2; }
.focus-page-sub { font-size:0.875rem; color:var(--muted,#64748b); font-weight:600; margin-top:4px; }
.focus-section-title { font-size:0.75rem; font-weight:800; text-transform:uppercase; letter-spacing:0.08em; color:var(--muted,#64748b); margin-bottom:14px; }
.focus-empty { text-align:center; padding:60px 20px; display:flex; flex-direction:column; align-items:center; gap:10px; }
.focus-empty__icon { font-size:3rem; }
.focus-empty__title { font-size:1.125rem; font-weight:800; color:var(--text); }
.focus-empty__sub { font-size:0.875rem; color:var(--muted); max-width:320px; line-height:1.6; }

/* ══════════════════════════════════════════════════════════════════════════════
   Page 2 — Actions (list view)
   ══════════════════════════════════════════════════════════════════════════════ */

.act-page { padding: 28px 32px; max-width: 980px; margin: 0 auto; }
.act-page-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; gap: 16px; }
.act-page-title { font-size: 1.5rem; font-weight: 900; color: var(--text); margin: 0; }

.act-filters { margin-bottom: 24px; display: flex; flex-direction: column; gap: 8px; }
.act-filters-primary,
.act-filters-nature {
  display: flex; gap: 6px; flex-wrap: nowrap;
  overflow-x: auto; scrollbar-width: none;
  margin: 0 -2px; padding: 2px;
}
.act-filters-primary::-webkit-scrollbar,
.act-filters-nature::-webkit-scrollbar { display: none; }
.act-filter-btn {
  display: flex; align-items: center; gap: 5px; flex: 0 0 auto;
  padding: 6px 14px; border-radius: 20px;
  border: 1.5px solid var(--line); background: var(--surface-soft);
  color: var(--muted); font-size: 0.8125rem; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: all 0.15s;
  white-space: nowrap;
}
.act-filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.act-filter-btn--active { background: var(--primary); border-color: var(--primary); color: #fff; }
.act-filter-count {
  font-size: 0.75rem; background: rgba(0,0,0,0.12);
  border-radius: 10px; padding: 1px 6px;
}
.act-nature-btn {
  display: flex; align-items: center; gap: 4px; flex: 0 0 auto;
  padding: 4px 12px; border-radius: 20px;
  border: 1.5px solid var(--line); background: transparent;
  color: var(--muted); font-size: 0.75rem; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: all 0.12s;
  white-space: nowrap;
}
.act-nature-btn:hover { border-color: var(--primary); color: var(--primary); }
.act-nature-btn--active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
/* Forces real color-emoji rendering — `<button>` text otherwise falls back
   to the OS control font, which several browsers don't chain to a
   color-emoji font for, showing flat monochrome glyphs instead. */
.act-nature-icon { display: inline-flex; }
.act-nature-icon svg { display: block; }

.act-list-wrap { display: flex; flex-direction: column; gap: 24px; }
.act-section-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.act-section-label {
  font-size: 0.75rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted);
}
.act-section-label--overdue { color: #ef4444; }
.act-section-count {
  font-size: 0.75rem; font-weight: 700; color: var(--muted);
  background: var(--surface-soft); border-radius: 10px; padding: 1px 8px;
}
.act-section-body { display: flex; flex-direction: column; gap: 6px; }

.act-card {
  display: flex; align-items: stretch;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 14px; overflow: hidden; cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.act-card:hover { border-color: var(--primary); box-shadow: 0 2px 12px rgba(0,0,0,0.07); }
.act-card--done { opacity: 0.5; }
.act-card--done:hover { opacity: 0.7; }
.act-card-left { display: flex; align-items: stretch; flex: 1; min-width: 0; }
.act-card-nature-bar { width: 4px; flex-shrink: 0; }
.act-card-inner { flex: 1; padding: 12px 14px; min-width: 0; }
.act-card-top { display: flex; align-items: center; gap: 8px; }
.act-priority-badge { font-size: 0.75rem; font-weight: 900; flex-shrink: 0; width: 18px; text-align: center; }
.act-card-title {
  font-size: 0.9375rem; font-weight: 700; color: var(--text);
  flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.act-card-title--done { text-decoration: line-through; color: var(--muted); }
.act-card-nat-chip { display: inline-flex; align-items: center; justify-content: center; padding: 5px; border-radius: 20px; flex-shrink: 0; }
.act-card-nat-chip svg { display: block; }
.act-card-meta {
  display: flex; align-items: center; gap: 6px; margin-top: 4px;
  font-size: 0.8rem; color: var(--muted); font-weight: 600; flex-wrap: wrap;
}
.act-card-date--overdue { color: #ef4444; }
.act-card-project { background: var(--surface-soft); border-radius: 6px; padding: 1px 6px; font-size: 0.75rem; }
.act-meta-sep { color: var(--line); }
.act-card-actions { display: flex; align-items: center; gap: 4px; padding: 0 12px; flex-shrink: 0; }
.act-icon-btn {
  width: 30px; height: 30px; border-radius: 8px;
  border: 1.5px solid var(--line); background: transparent;
  color: var(--muted); font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; flex-shrink: 0;
}
.act-icon-btn--done:hover { border-color: #22c55e; color: #22c55e; background: #f0fdf4; }
.act-icon-btn--del:hover  { border-color: #ef4444; color: #ef4444; }

.act-form { display: flex; flex-direction: column; gap: 16px; }
.act-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.act-chip {
  padding: 7px 12px; border-radius: 20px;
  border: 1.5px solid var(--line); background: var(--surface-soft);
  color: var(--muted); font-size: 0.8125rem; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: all 0.12s;
}
.act-chip:hover { border-color: var(--primary); color: var(--primary); }
.act-chip--active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }
.act-form-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.act-form-actions .button { flex: 1; min-width: 0; }
.act-form-cancel-action { flex: 0 0 auto !important; }
.act-form-del {
  background: none; border: none; color: #ef4444;
  font-size: 0.8125rem; font-weight: 700; cursor: pointer;
  font-family: inherit; text-decoration: underline; padding: 4px 0;
}
.act-form-del:hover { opacity: 0.75; }

/* ══════════════════════════════════════════════════════════════════════════════
   Page 3 — Calendrier hebdomadaire
   ══════════════════════════════════════════════════════════════════════════════ */

.cal-page { padding: 20px 24px; max-width: 1400px; margin: 0 auto; }
.cal-hd { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.cal-page-title { font-size: 1.5rem; font-weight: 900; color: var(--text); margin: 0; }
.cal-week-nav { display: flex; align-items: center; gap: 10px; }
.cal-nav-btn {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--surface);
  color: var(--text); font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.cal-nav-btn:hover { border-color: var(--primary); color: var(--primary); }
.cal-week-label { font-size: 0.9375rem; font-weight: 700; color: var(--text); white-space: nowrap; }
.cal-today-btn {
  padding: 5px 12px; border-radius: 8px;
  border: 1.5px solid var(--primary); background: transparent;
  color: var(--primary); font-size: 0.8125rem; font-weight: 700;
  cursor: pointer; font-family: inherit; transition: all 0.15s;
}
.cal-today-btn:hover { background: var(--primary-soft); }

.cal-layout { display: flex; gap: 14px; align-items: flex-start; }

.cal-sidebar {
  width: 190px; flex-shrink: 0;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 14px; overflow: hidden;
  position: sticky; top: 16px;
}
.cal-sidebar-hd {
  padding: 10px 14px; font-size: 0.6875rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted);
  border-bottom: 1.5px solid var(--line); background: var(--surface-soft);
}
.cal-sidebar-list { padding: 8px; display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow-y: auto; }
.cal-sidebar-task {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: var(--surface-soft); border: 1.5px solid var(--line);
  border-radius: 10px; font-size: 0.8125rem; font-weight: 600;
  color: var(--text); cursor: grab; transition: border-color 0.15s, box-shadow 0.15s;
  overflow: hidden; user-select: none;
}
.cal-sidebar-task:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.cal-sidebar-task--dragging { opacity: 0.4; cursor: grabbing; }
.cal-sidebar-task--picked {
  border-color: var(--primary); background: var(--primary-soft, rgba(31,58,90,0.08));
  box-shadow: 0 0 0 2px var(--primary) inset;
}
.cal-sidebar-task-bar { width: 3px; min-height: 14px; align-self: stretch; border-radius: 2px; flex-shrink: 0; }
.cal-sidebar-empty { padding: 20px 14px; font-size: 0.8125rem; color: var(--muted); font-weight: 600; text-align: center; line-height: 1.5; }

.cal-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cal-row-hd {
  display: flex; align-items: stretch;
  background: var(--surface); border: 1.5px solid var(--line);
  border-bottom: none; border-radius: 12px 12px 0 0;
}
.cal-time-gutter { width: 50px; flex-shrink: 0; }
.cal-time-gutter--allday {
  font-size: 0.625rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em;
  display: flex; align-items: center; justify-content: center; padding: 4px;
}
.cal-day-hd { flex: 1; padding: 10px 4px; text-align: center; border-left: 1px solid var(--line); }
.cal-day-hd--today .cal-day-hd-name { color: var(--primary); }
.cal-day-hd-name { display: block; font-size: 0.6875rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.cal-day-hd-num { display: block; font-size: 1.125rem; font-weight: 800; color: var(--text); margin-top: 2px; }
.cal-day-hd-num--today {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; background: var(--primary); color: #fff;
  border-radius: 50%; font-size: 0.9375rem; margin-top: 2px;
}
.cal-row-allday {
  display: flex; align-items: stretch; min-height: 28px;
  border: 1.5px solid var(--line); border-top: none; border-bottom: 1.5px solid var(--line);
  background: var(--surface-soft);
}
.cal-day-col-allday { flex: 1; padding: 3px; border-left: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 2px; align-items: flex-start; }
.cal-allday-chip {
  font-size: 0.6875rem; font-weight: 700; color: #fff; padding: 2px 6px;
  border-radius: 5px; cursor: pointer; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; max-width: 100%; transition: opacity 0.15s;
}
.cal-allday-chip:hover { opacity: 0.82; }
.cal-grid-scroll {
  height: 560px; overflow-y: auto;
  border: 1.5px solid var(--line); border-top: none; border-radius: 0 0 12px 12px;
  background: var(--surface);
}
.cal-grid { display: flex; }
.cal-time-col {
  width: 50px; flex-shrink: 0; background: var(--surface-soft);
  border-right: 1px solid var(--line);
}
.cal-hour-label {
  height: 60px; padding: 4px 6px; font-size: 0.625rem; font-weight: 700;
  color: var(--muted); text-align: right; display: flex;
  align-items: flex-start; justify-content: flex-end;
}
.cal-days-row { display: flex; flex: 1; }
.cal-day-col {
  flex: 1; border-left: 1px solid var(--line);
  position: relative; min-height: 960px; /* 16h × 60px */
}
.cal-day-col::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent, transparent 59px, var(--line) 59px, var(--line) 60px);
}
.cal-day-col--today { background: rgba(31,58,90,0.025); }
.cal-drop-slot { position: absolute; left: 0; right: 0; z-index: 1; transition: background 0.1s; }
.cal-drop-slot--active { background: rgba(31,58,90,0.1); border-radius: 4px; }
/* Une action est "en main" (sélection tactile) : rendre les créneaux visiblement tapables. */
.cal-page--picking .cal-drop-slot { background: rgba(31,58,90,0.04); border: 1px dashed rgba(31,58,90,0.15); border-radius: 4px; cursor: pointer; }
.cal-page--picking .cal-drop-slot:active { background: rgba(31,58,90,0.15); }
.cal-block {
  position: absolute; left: 3px; right: 3px;
  border-radius: 6px; padding: 3px 6px;
  color: #fff; font-size: 0.75rem; font-weight: 700;
  overflow: hidden; cursor: pointer; z-index: 2;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  transition: opacity 0.15s, transform 0.1s;
}
.cal-block:hover { opacity: 0.88; transform: scale(1.01); }
.cal-block--done { opacity: 0.4; }
.cal-block { -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; }
.cal-block--moving { z-index: 20; opacity: 0.92; box-shadow: 0 10px 24px rgba(0,0,0,0.3); transition: none; cursor: grabbing; touch-action: none; }
.cal-block-time { font-size: 0.625rem; font-weight: 600; opacity: 0.85; white-space: nowrap; }
.cal-block-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-now-line { position: absolute; left: 0; right: 0; height: 2px; background: #ef4444; z-index: 3; }
.cal-now-line::before {
  content: ''; position: absolute; left: -4px; top: -4px;
  width: 10px; height: 10px; border-radius: 50%; background: #ef4444;
}

/* ── Dark mode — actions + calendrier ───────────────────────────────────────── */
body.dark-mode .act-card { background: var(--surface); border-color: var(--line); }
body.dark-mode .act-card:hover { border-color: var(--primary); }
body.dark-mode .act-section-count { background: var(--surface-soft); }
body.dark-mode .act-filter-btn { background: var(--surface-soft); border-color: var(--line); }
body.dark-mode .act-chip { background: var(--surface-soft); border-color: var(--line); }
body.dark-mode .act-icon-btn { border-color: var(--line); }
body.dark-mode .act-card-project { background: var(--surface-soft); }
body.dark-mode .act-nature-btn { border-color: var(--line); }

body.dark-mode .cal-sidebar { background: var(--surface); border-color: var(--line); }
body.dark-mode .cal-sidebar-hd { background: var(--surface-soft); border-color: var(--line); }
body.dark-mode .cal-sidebar-task { background: var(--surface-soft); border-color: var(--line); }
body.dark-mode .cal-row-hd { background: var(--surface); border-color: var(--line); }
body.dark-mode .cal-row-allday { background: var(--surface-soft); border-color: var(--line); }
body.dark-mode .cal-day-col-allday { border-color: var(--line); }
body.dark-mode .cal-time-col { background: var(--surface-soft); border-color: var(--line); }
body.dark-mode .cal-grid-scroll { background: var(--surface); border-color: var(--line); }
body.dark-mode .cal-nav-btn { background: var(--surface); border-color: var(--line); color: var(--text); }
body.dark-mode .cal-day-hd { border-color: var(--line); }
body.dark-mode .cal-day-col { border-color: var(--line); }
body.dark-mode .cal-day-col--today { background: rgba(255,255,255,0.025); }
body.dark-mode .cal-day-col::before { background: repeating-linear-gradient(to bottom, transparent, transparent 59px, var(--line) 59px, var(--line) 60px); }

/* ── Anciens styles tâches (conservés pour compatibilité, non utilisés) ──── */
.focus-task-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  align-items: center;
}
.focus-task-filter {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.focus-task-filter:hover { border-color: var(--primary); color: var(--primary); }
.focus-task-filter--active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.focus-task-filter-count {
  background: rgba(0,0,0,0.1);
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 0.75rem;
}

.focus-view-toggle {
  display: flex;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}
.focus-view-btn {
  padding: 8px 12px;
  border: none;
  background: transparent;
  font-size: 1rem;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.focus-view-btn--active { background: var(--primary); color: #fff; }

.focus-task-list { display: flex; flex-direction: column; gap: 10px; }

.focus-task-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.focus-task-card:hover { border-color: #cbd5e1; box-shadow: 0 2px 12px rgba(0,0,0,0.06); }

.focus-task--done { opacity: 0.7; }
.focus-task--done .focus-task-title { text-decoration: line-through; color: var(--muted); }

.focus-task-status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.focus-task-body { flex: 1; min-width: 0; }
.focus-task-title { font-size: 0.9375rem; font-weight: 700; color: var(--text); }
.focus-task-meta {
  display: flex;
  gap: 12px;
  margin-top: 4px;
  font-size: 0.8125rem;
  color: var(--muted);
  font-weight: 600;
}
.focus-task-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.focus-task-status-chip {
  padding: 4px 10px;
  border-radius: 20px;
  border: 1.5px solid;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.focus-task-status-chip:hover { opacity: 0.75; }
.focus-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.focus-icon-btn:hover { border-color: var(--primary); color: var(--primary); }
.focus-icon-btn--del:hover { border-color: #ef4444; color: #ef4444; }

/* Calendar */
.focus-cal {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 18px;
  padding: 20px;
}
.focus-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.focus-cal-month-label { font-size: 1rem; font-weight: 800; color: var(--text); }
.focus-cal-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  font-size: 1.1rem;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.focus-cal-nav-btn:hover { border-color: var(--primary); color: var(--primary); }
.focus-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.focus-cal-header {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 6px 0;
}
.focus-cal-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
  min-height: 40px;
}
.focus-cal-cell:hover { background: #fff; }
.focus-cal-cell--empty { pointer-events: none; }
.focus-cal-cell--today { background: rgba(31,58,90,0.08); }
.focus-cal-cell--today .focus-cal-day-num { color: var(--primary); font-weight: 800; }
.focus-cal-cell--selected { background: var(--primary); }
.focus-cal-cell--selected .focus-cal-day-num { color: #fff; }
.focus-cal-day-num { font-size: 0.875rem; font-weight: 600; color: var(--text); line-height: 1; }
.focus-cal-dots { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; }
.focus-cal-dot { width: 5px; height: 5px; border-radius: 50%; }

.focus-cal-day-panel {
  margin-top: 16px;
  padding: 16px;
  background: #fff;
  border-radius: 14px;
  border: 1.5px solid #e2e8f0;
}
.focus-cal-day-panel__title { font-size: 0.9375rem; font-weight: 800; margin-bottom: 12px; color: var(--text); }
.focus-cal-day-panel__empty { font-size: 0.875rem; color: var(--muted); }
.focus-cal-task-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f1f5f9;
}
.focus-cal-task-row:last-child { border-bottom: none; }
.focus-cal-task-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.focus-cal-task-name { flex: 1; font-size: 0.875rem; font-weight: 600; }
.focus-cal-task-status { font-size: 0.75rem; font-weight: 700; }

/* ══════════════════════════════════════════════════════════════════════════════
   Page 4 — Life Balance Radar
   ══════════════════════════════════════════════════════════════════════════════ */
.focus-radar-legend {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.focus-radar-legend-item {
  display: flex;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}

.focus-radar-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 40px;
}

.focus-domain-sliders {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.focus-domain-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.focus-domain-icon {
  font-size: 1.25rem;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}
.focus-domain-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  width: 130px;
  flex-shrink: 0;
}
.focus-domain-slider {
  flex: 1;
  height: 6px;
  cursor: pointer;
  border-radius: 3px;
}
.focus-domain-val {
  width: 30px;
  text-align: right;
  font-weight: 800;
  font-size: 0.9375rem;
  flex-shrink: 0;
}

.focus-radar-svg-wrap {
  position: sticky;
  top: 20px;
}
.focus-radar-svg {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  padding: 8px;
  width: 100%;
  aspect-ratio: 1;
}

/* History bars */
.focus-radar-history { }
.focus-radar-hist-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}
.focus-radar-hist-row:last-child { border-bottom: none; }
.focus-radar-hist-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  width: 160px;
  flex-shrink: 0;
}
.focus-hist-bars {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex: 1;
}
.focus-hist-bar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.focus-hist-bar-track {
  width: 100%;
  height: 40px;
  background: #f1f5f9;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}
.focus-hist-bar-fill {
  width: 100%;
  border-radius: 6px 6px 0 0;
  transition: height 0.4s ease;
  min-height: 2px;
}
.focus-hist-bar-fill--current { opacity: 1; }
.focus-hist-bar-fill:not(.focus-hist-bar-fill--current) { opacity: 0.5; }
.focus-hist-bar-val {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
}

/* ── Type chips (add / edit objective modal) ──────────────────────────────── */
.focus-type-chips {
  display: flex;
  gap: 8px;
}
.focus-type-chip {
  flex: 1;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}
.focus-type-chip:hover { border-color: var(--primary); color: var(--text); }
.focus-type-chip--active {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

/* ── Quantitative slider modal ────────────────────────────────────────────── */
.focus-slider-display {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  text-align: center;
  line-height: 1;
}
.focus-slider-sep { color: var(--muted); font-weight: 400; font-size: 1.1rem; }
.focus-slider-target { color: var(--muted); font-weight: 600; font-size: 1.1rem; }

.focus-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  outline: none;
  cursor: pointer;
}
.focus-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  border: 3px solid #fff;
}
.focus-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .focus-page { padding: 16px; }
  .focus-radar-wrap { grid-template-columns: 1fr; }
  .focus-domain-name { width: 100px; }
  .focus-obj-card { flex-wrap: wrap; }
  .focus-obj-right { width: 100%; }
  .focus-obj-progress-bar { width: 100%; }
  .focus-task-actions { flex-wrap: wrap; }
  .focus-domain-sliders { order: 2; }
  .focus-radar-svg-wrap { order: 1; position: static; }
}

/* ══════════════════════════════════════════════════════════════════════════
   MODE NUIT — focus module
   ══════════════════════════════════════════════════════════════════════════ */

/* Daily nav buttons */
body.dark-mode .daily-nav-btn {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}
body.dark-mode .daily-nav-btn:hover { background: var(--surface-soft); }

/* Daily table */
body.dark-mode .daily-table-scroll {
  background: var(--surface);
  border-color: var(--line);
}
body.dark-mode .daily-table thead tr { border-bottom-color: var(--line); }
body.dark-mode .daily-table tbody tr { border-bottom-color: var(--line); }
body.dark-mode .daily-table tbody tr:hover { background: var(--surface-soft); }
body.dark-mode .daily-td--today { background: rgba(255,255,255,0.04); }
body.dark-mode .daily-td--tappable:hover { background: rgba(255,255,255,0.07); }
body.dark-mode .daily-th-pct { color: var(--text) !important; }
body.dark-mode .daily-th-day--today .daily-th-wd,
body.dark-mode .daily-th-day--today .daily-th-num { color: var(--text); }
body.dark-mode .daily-th-day--today .daily-th-num {
  background: var(--primary);
  color: #fff;
}

/* Notes input */
body.dark-mode .daily-note-inp {
  background: var(--surface-soft);
  border-color: var(--line);
  color: var(--text);
}
body.dark-mode .daily-note-inp:focus {
  background: var(--surface);
  border-color: var(--primary);
}
body.dark-mode .daily-note-inp::placeholder { color: var(--muted); }

/* Action buttons */
body.dark-mode .daily-act-btn { color: var(--muted); }
body.dark-mode .daily-act-btn:hover { background: var(--surface-soft); color: var(--text); }
body.dark-mode .daily-act-btn--del:hover { background: var(--bad-bg); color: var(--bad); }

/* Emoji picker */
body.dark-mode .daily-emoji-btn { border-color: var(--line); }
body.dark-mode .daily-emoji-btn--active { border-color: var(--primary); background: var(--primary-soft); }

/* Task cards */
body.dark-mode .focus-task-card {
  background: var(--surface);
  border-color: var(--line);
}
body.dark-mode .focus-task-card:hover {
  border-color: var(--muted);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

/* Task filters */
body.dark-mode .focus-task-filter {
  background: var(--surface-soft);
  border-color: var(--line);
}
body.dark-mode .focus-view-toggle { border-color: var(--line); }

/* Icon buttons */
body.dark-mode .focus-icon-btn { border-color: var(--line); color: var(--muted); }

/* Calendar */
body.dark-mode .focus-cal {
  background: var(--surface-soft);
  border-color: var(--line);
}
body.dark-mode .focus-cal-nav-btn {
  background: var(--surface);
  border-color: var(--line);
  color: var(--text);
}
body.dark-mode .focus-cal-cell:hover { background: var(--surface); }
body.dark-mode .focus-cal-day-panel {
  background: var(--surface);
  border-color: var(--line);
}
body.dark-mode .focus-cal-task-row { border-bottom-color: var(--line); }

/* Radar */
body.dark-mode .focus-radar-svg {
  background: var(--surface-soft);
  border-color: var(--line);
}
body.dark-mode .focus-radar-hist-row { border-bottom-color: var(--line); }
body.dark-mode .focus-hist-bar-track { background: var(--line); }

/* Slider thumb */
body.dark-mode .focus-slider::-webkit-slider-thumb { border-color: var(--surface); }
body.dark-mode .focus-slider::-moz-range-thumb { border-color: var(--surface); }

/* Date reconnue dans le titre d'une action (« demain à 16h ») */
.af-nl { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--primary-soft); color: var(--text); font-size: 13px; }
.af-nl[hidden] { display: none; }
.af-nl svg { width: 16px; height: 16px; flex: none; color: var(--primary); }
.af-nl span { flex: 1; min-width: 0; }
.af-nl strong { color: var(--primary); }
.af-nl__x { border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.act-card-repeat { display: inline-flex; align-items: center; gap: 4px; color: var(--primary); }
.act-card-repeat svg { width: 12px; height: 12px; }

/* Étapes (check-list) et historique d'une action */
.af-steps { display: flex; flex-direction: column; gap: 6px; padding: 16px 24px 4px; }
.af-steps-head { display: flex; align-items: center; justify-content: space-between; }
.af-steps-count { font-size: 0.75rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.af-steps-count--ok { color: #1f845a; }
.af-steps-bar { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.af-steps-bar span { display: block; height: 100%; background: #1f845a; border-radius: 2px; transition: width .2s; }
.af-steps-list { display: flex; flex-direction: column; }
.af-step { display: flex; align-items: center; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.af-step-check { width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--muted); background: transparent; display: grid; place-items: center; cursor: pointer; padding: 0; color: #fff; }
.af-step-check svg { width: 13px; height: 13px; }
.af-step--done .af-step-check { background: #1f845a; border-color: #1f845a; }
.af-step-text { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 0.9rem; padding: 6px 0; color: inherit; outline: none; }
.af-step--done .af-step-text { text-decoration: line-through; color: var(--muted); }
.af-step-del { border: 0; background: transparent; color: var(--muted); font-size: 1.1rem; cursor: pointer; padding: 0 4px; opacity: 0; }
.af-step:hover .af-step-del, .af-step-del:focus-visible { opacity: 1; }
@media (hover: none) { .af-step-del { opacity: 1; } }
.af-step--add { border-bottom: 0; }
.af-step-plus { width: 22px; text-align: center; font-weight: 700; color: var(--muted); }
.af-doneby { display: flex; align-items: center; gap: 6px; margin: 10px 24px 0; font-size: 0.85rem; font-weight: 600; color: #1f845a; }
.af-doneby svg { width: 16px; height: 16px; }
.af-history { margin: 10px 24px 0; font-size: 0.85rem; }
.af-history summary { cursor: pointer; font-weight: 600; color: var(--muted); padding: 6px 0; }
.af-history ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.af-history li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.af-hist-txt { font-weight: 600; }
.af-hist-meta { color: var(--muted); }
body.dark-mode .af-steps-count--ok, body.dark-mode .af-doneby { color: #3fb583; }
body.dark-mode .af-steps-bar span, body.dark-mode .af-step--done .af-step-check { background: #3fb583; border-color: #3fb583; }

/* Habitudes : jours hors période (avant le début, après l'arrêt), habitudes arrêtées */
.daily-td--off .daily-dash { opacity: .35; }
.daily-obj-stopped { font-size: .68rem; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; margin-left: 4px; }
.daily-archived-hint { font-size: .8rem; color: var(--muted); margin: -4px 0 8px; }
.daily-archived-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; }
.daily-archived-row .daily-obj-icon { opacity: .6; }
.daily-archived-info { flex: 1; min-width: 0; }
.daily-archived-name { font-weight: 600; color: var(--muted); }
.daily-archived-date { font-size: .75rem; color: var(--muted); }
.daily-archived-row .button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; }
.daily-archived-row .button svg, .daily-edit-danger .button svg { width: 16px; height: 16px; }
.daily-edit-hint { font-size: .78rem; color: var(--muted); }
.daily-edit-danger { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 6px; }
.daily-edit-danger .button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.daily-btn-danger { color: #ef4444; border-color: rgba(239, 68, 68, .35); }

/* Partages entre contacts (fenêtre d'envoi, bloc dans une action, réglages) */
.share-compose { display: flex; flex-direction: column; gap: 12px; }
.share-compose__what { display: flex; flex-direction: column; gap: 4px; }
.share-compose__what span, .share-muted { font-size: .82rem; color: var(--muted); }
.share-label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.share-recipients { display: flex; flex-direction: column; gap: 6px; }
.share-person { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.share-person--on { border-color: var(--primary); }
.share-person--off { opacity: .5; }
.share-person__pick { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.share-person__pick small { display: block; color: var(--muted); font-size: .75rem; }
.share-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--muted); display: grid; place-items: center; color: #fff; flex-shrink: 0; }
.share-person--on .share-dot { background: var(--primary); border-color: var(--primary); }
.share-dot svg { width: 13px; height: 13px; }
.share-portion { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; }
.share-portion button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 1rem; color: inherit; }
.share-groups { display: flex; gap: 8px; flex-wrap: wrap; }
.share-group { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--primary); color: var(--primary); background: transparent; border-radius: 999px; padding: 5px 12px; cursor: pointer; font: inherit; font-size: .85rem; font-weight: 600; }
.share-group svg { width: 15px; height: 15px; }
.share-group--on { background: var(--primary); color: #fff; }
.share-check { display: flex; align-items: center; gap: 8px; font-size: .88rem; }
.share-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.share-row label { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; color: var(--muted); }
.share-actions { display: flex; gap: 8px; justify-content: flex-end; }
.af-block-share { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
.af-block-share > div, .af-block-share > button, .af-block-share > label { margin: 0; }
.share-block__head { display: flex; flex-direction: column; gap: 3px; }
.share-block__head b { font-size: 1rem; }
.share-block__head small { color: var(--muted); }
.share-block__note { font-size: .9rem; margin-top: 2px; }
.share-macros { display: flex; gap: 18px; flex-wrap: wrap; }
.share-macros span { display: flex; flex-direction: column; }
.share-macros small { color: var(--muted); font-size: .72rem; }
.share-ex { display: flex; flex-direction: column; gap: 4px; }
.share-set { display: flex; align-items: center; gap: 8px; font-size: .88rem; }
.share-set small { color: var(--muted); min-width: 52px; }
.share-set input { width: 80px; }
.share-list { margin: 0; padding-left: 18px; font-size: .9rem; }
.share-decline { color: #ef4444; }
.share-done { display: flex; align-items: center; gap: 6px; color: #1f845a; font-weight: 600; }
.share-done svg { width: 18px; height: 18px; }
.share-expiry { max-width: 140px; }
.share-group-edit { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin: 8px 0; display: flex; flex-direction: column; gap: 8px; }
.share-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.share-chip { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; }
body.dark-mode .share-done { color: #3fb583; }
