/* 🚀 MindShip — desktop.css (beta-2.5.4)
 * Chargé conditionnellement via <link rel="stylesheet" media="(min-width: 768px)" href="desktop.css">.
 * Le navigateur n'évalue ce CSS que sur viewport >= 768px, ce qui allège le rendu mobile.
 * Les @media (min-width: 1200px) internes restent pour le tier desktop large.
 * Source : extrait automatiquement de index.html lors du refactor 2.5.4.
 */

.tuto-screen[data-mode="desktop"] .tuto-slides {
  max-width: 720px; margin: 0 auto;
}
.tuto-screen[data-mode="desktop"] .tuto-slide {
  padding: 56px 48px;
}
.tuto-screen[data-mode="desktop"] .tuto-slide-icon {
  font-size: 72px;
}
.tuto-screen[data-mode="desktop"] .tuto-slide-title {
  font-size: 26px; margin-bottom: 14px;
}
.tuto-screen[data-mode="desktop"] .tuto-slide-text {
  font-size: 16px; max-width: 560px; line-height: 1.7;
}
.tuto-screen[data-mode="desktop"] .tuto-slide-screenshot {
  width: 100%; max-width: 620px; max-height: 380px;
  margin-top: 24px; border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.16);
}
.tuto-screen[data-mode="desktop"] .tuto-bottom {
  max-width: 720px; margin: 0 auto; width: 100%;
}

.focus-screen-body { max-width: 720px; margin: 0 auto; width: 100%; }
.focus-screen-foot { max-width: 720px; margin: 0 auto; width: 100%; }
.focus-timer { font-size: 96px; }

 .bottom-tab-bar { display: none; } 

#projectList { display: none; }
#kanbanBoard {
  display: flex; gap: 16px; overflow-x: auto; overflow-y: hidden;
  padding: 4px 0 12px; min-height: calc(100vh - 220px);
  align-items: stretch;
}
.kanban-column {
  flex: 1 1 0; min-width: 0;
  display: flex; flex-direction: column;
  background: var(--surface); border-radius: 14px;
  border: 1px solid var(--border);
  max-height: calc(100vh - 220px);
}
/* 3 colonnes qui se partagent la largeur disponible sans scroll horizontal */
#kanbanBoard { overflow-x: hidden; }
/* En mode split view, idem — flex fill */
body.split-active .kb-card { padding: 10px; }
body.split-active .kb-card-name { font-size: 12px; }
/* Avec le panneau détail ouvert, cartes un peu plus compactes */
#view-projects .projects-layout.with-details .kb-card { padding: 10px; }
#view-projects .projects-layout.with-details .kb-card-name { font-size: 12px; }
.kanban-col-header {
  padding: 14px 16px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.kanban-col-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.kanban-col-dot.idea     { background: #D4A46A; }
.kanban-col-dot.active   { background: #6BAF8E; }
.kanban-col-dot.paused   { background: var(--muted); }
.kanban-col-dot.done     { background: var(--primary); }
.kanban-col-dot.archived { background: var(--surface3); }
.kanban-col-title { font-size: 13px; font-weight: 700; color: var(--text); }
.kanban-col-count {
  font-size: 11px; font-weight: 700; color: var(--muted);
  background: var(--surface2); padding: 2px 8px; border-radius: 10px;
}
.kanban-col-cards {
  flex: 1; overflow-y: auto; padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.kb-card {
  background: var(--surface2); border-radius: 12px;
  padding: 14px; cursor: grab; transition: all 0.15s;
  border: 1px solid transparent; border-left: 3px solid var(--primary);
  user-select: none;
}
.kb-card:hover {
  border-color: var(--border);
  box-shadow: 0 2px 8px rgba(95,77,134,0.08);
}
.kb-card:active { cursor: grabbing; }
.kb-card.kb-dragging { opacity: 0.4; transform: scale(0.98); }
.kanban-column.kb-drop-target {
  background: rgba(183,128,68,0.08);
  border-color: var(--perso);
  box-shadow: inset 0 0 0 2px var(--perso);
}
.kb-card-top {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.kb-card-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.kb-card-icon.pro   { background: rgba(95,77,134,0.08);  color: var(--primary); }
.kb-card-icon.perso { background: rgba(183,128,68,0.12); color: var(--perso); }
.kb-card-icon i { font-size: 16px; }
.kb-card-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  flex: 1; line-height: 1.3;
}
.kb-card-progress { margin-bottom: 10px; }
.kb-card-progress-bar {
  height: 4px; background: var(--surface3); border-radius: 4px;
  overflow: hidden; margin-bottom: 4px;
}
.kb-card-progress-fill { height: 100%; border-radius: 4px; transition: width 0.3s; }
.kb-card-progress-text { font-size: 11px; color: var(--muted); font-weight: 500; }
.kb-card-meta {
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; color: var(--muted);
}
.kb-card-meta-item { display: flex; align-items: center; gap: 4px; }
.kb-card-meta-item i { font-size: 13px; }
.kb-card-space {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; padding: 2px 8px; border-radius: 6px;
}
.kb-card-space.pro   { background: rgba(95,77,134,0.08);  color: var(--primary); }
.kb-card-space.perso { background: rgba(183,128,68,0.12); color: var(--perso); }
/* Hide mobile-only controls on desktop */
#view-projects .more-back { display: none; }
#view-projects .proj-space-pills { display: none; }
/* La section archivés reste visible en desktop — sous le kanban */

/* Layout 2 colonnes : calendrier + drawers à gauche, timeline à droite */
/* L'agenda sort du max-width classique des vues pour utiliser toute la largeur */
#view-agenda { max-width: none; padding: 18px 24px 18px 16px; }
/* beta-2.9.2 : header agenda desktop = titre + bouton "+ Nouveau RDV" alignés */
.agenda-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 14px;
}
.agenda-title {
  display: block; font-size: 22px; font-weight: 900;
  color: var(--text); margin: 0;
}
.agenda-new-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary); color: #fff; border: none;
  border-radius: 10px; padding: 9px 14px;
  font-size: 13px; font-weight: 700;
  cursor: pointer; touch-action: manipulation;
  transition: background 0.15s, transform 0.1s;
}
.agenda-new-btn:hover { background: var(--primary-light); }
.agenda-new-btn:active { transform: scale(0.96); }

/* beta-2.9.3 : header routines desktop = titre + bouton "+ Nouvelle routine" */
.routines-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 14px;
}
.routines-title {
  display: block; font-size: 22px; font-weight: 900;
  color: var(--text); margin: 0;
}
.routines-new-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary); color: #fff; border: none;
  border-radius: 10px; padding: 9px 14px;
  font-size: 13px; font-weight: 700;
  cursor: pointer; touch-action: manipulation;
  transition: background 0.15s, transform 0.1s;
}
.routines-new-btn:hover { background: var(--primary-light); }
.routines-new-btn:active { transform: scale(0.96); }
#view-agenda .agenda-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  align-items: start;
}
#view-agenda .agenda-layout.with-details {
  grid-template-columns: 260px 1fr 320px;
}
#view-agenda .agenda-col-left  { display: flex; flex-direction: column; gap: 16px; }
#view-agenda .agenda-col-right { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
#view-agenda .agenda-col-details { display: none; }
#view-agenda .agenda-layout.with-details .agenda-col-details {
  display: block;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px 18px;
  position: sticky; top: 72px;
  max-height: calc(100vh - 100px); overflow-y: auto;
}
.adp-label {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1.2px; padding: 3px 10px; border-radius: 6px;
  display: inline-block; margin-bottom: 10px;
}
.adp-label.apt  { background: rgba(95,77,134,0.12);  color: var(--primary); }
.adp-label.task { background: rgba(183,128,68,0.12); color: var(--perso); }
.adp-title {
  font-size: 18px; font-weight: 800; color: var(--text);
  margin-bottom: 14px; line-height: 1.3; word-break: break-word;
}
.adp-field { margin-bottom: 12px; }
.adp-field-label {
  font-size: 11px; font-weight: 700; color: var(--muted);
  display: flex; align-items: center; gap: 5px;
  margin-bottom: 4px;
}
.adp-field-value {
  font-size: 13px; color: var(--text); font-weight: 500;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px;
}
.adp-field-row { display: flex; gap: 10px; }
.adp-field-row .adp-field { flex: 1; }
.adp-actions {
  display: flex; gap: 8px; margin-top: 18px;
  padding-top: 16px; border-top: 1px solid var(--border);
}
.adp-btn {
  flex: 1; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface2);
  color: var(--text); font-size: 12px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  transition: all 0.15s; touch-action: manipulation;
}
.adp-btn:hover { background: var(--surface3); }
.adp-btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.adp-btn.danger  { background: transparent; color: #c94545; border-color: rgba(201,69,69,0.3); }
.adp-btn.danger:hover { background: rgba(201,69,69,0.08); }
.adp-close {
  float: right; width: 28px; height: 28px; border-radius: 6px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  margin-top: -4px;
}
.adp-close:hover { background: var(--surface3); color: var(--text); }
.adp-notes-area {
  width: 100%; min-height: 140px; resize: vertical;
  padding: 10px 12px; font-family: inherit; font-size: 13px;
  color: var(--text); background: var(--surface2);
  border: 1px solid var(--border); border-radius: 10px;
  outline: none; line-height: 1.5;
  transition: border-color 0.15s;
}
.adp-notes-area:focus { border-color: var(--primary); background: var(--surface); }
.adp-notes-area::placeholder { color: var(--muted); font-style: italic; }
/* Calendrier toujours visible (pas de toggle) */
#view-agenda .agenda-month-toggle { display: none; }
#view-agenda #agendaMonthGrid {
  display: block !important; margin: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px;
}
/* Drawers empilés verticalement sur desktop et toujours ouverts */
#view-agenda .agenda-drawers { flex-direction: column; gap: 10px; margin-bottom: 0; }
#view-agenda .agenda-drawer { flex: none; }
#view-agenda .agenda-drawer-body.hidden { display: block !important; }
#view-agenda .agenda-drawer-caret { display: none; }
#view-agenda .agenda-drawer-hdr { cursor: default; pointer-events: none; }
/* Week strip masquée sur desktop (calendrier + drawers font le job) */
#view-agenda .agenda-week-strip { display: none; }

.agenda-range-toggle {
  display: flex; gap: 0;
  background: var(--surface2); border-radius: 10px;
  border: 1px solid var(--border); padding: 3px;
  margin: 0 0 12px; width: fit-content;
}
.agenda-range-btn {
  padding: 6px 14px; border: none; background: transparent;
  color: var(--muted); font-size: 12px; font-weight: 700;
  cursor: pointer; border-radius: 7px; font-family: inherit;
  transition: all 0.15s; touch-action: manipulation;
}
.agenda-range-btn:hover { color: var(--text); }
.agenda-range-btn.active {
  background: var(--surface); color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.agenda-multi {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 8px;
}
.agenda-multi-col {
  background: var(--surface);
  display: flex; flex-direction: column;
  min-width: 0;
}
.agenda-multi-hdr {
  padding: 10px 8px; text-align: center;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px; font-weight: 700;
  color: var(--text); cursor: pointer;
  transition: background 0.15s;
}
.agenda-multi-hdr:hover { background: var(--surface2); }
.agenda-multi-hdr.today { color: var(--primary); background: rgba(95,77,134,0.05); }
.agenda-multi-hdr.selected { box-shadow: inset 0 -3px 0 var(--perso); }
.agenda-multi-hdr .amh-day   { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.6px; }
.agenda-multi-hdr .amh-date  { font-size: 14px; font-weight: 900; margin-top: 2px; }
.agenda-multi-hdr.today .amh-date { color: var(--primary); }
.agenda-multi-body {
  position: relative; overflow: hidden;
  min-height: 400px;
}
.agenda-multi-hours {
  background: var(--surface2);
  display: flex; flex-direction: column;
  padding-top: 42px; /* height of header */
  border-right: 1px solid var(--border);
}
.agenda-multi-hour {
  height: 48px;
  font-size: 10px; font-weight: 700;
  color: var(--muted); text-align: right;
  padding: 2px 6px 0 0;
}
.agenda-multi-col .am-line {
  position: absolute; left: 0; right: 0;
  border-top: 1px dashed rgba(95,77,134,0.1);
}
.agenda-multi-col .am-now {
  position: absolute; left: 0; right: 0;
  height: 2px; background: var(--perso);
  z-index: 3;
}
.agenda-multi-col .am-now::before {
  content: ''; position: absolute; left: 0; top: -3px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--perso);
}
.am-apt {
  position: absolute; left: 4px; right: 4px;
  border-radius: 6px; padding: 4px 6px; z-index: 2;
  font-size: 11px; font-weight: 600;
  cursor: pointer; overflow: hidden;
  background: rgba(95,77,134,0.18); border-left: 3px solid var(--primary);
  color: var(--text);
}
.am-apt.perso { background: rgba(183,128,68,0.20); border-left-color: var(--perso); }
.am-apt.pro   { background: rgba(95,77,134,0.18); border-left-color: var(--primary); }
.am-apt .am-apt-time { font-size: 9px; color: var(--muted); font-weight: 700; }
.am-apt:hover { filter: brightness(0.96); }
.am-task {
  position: absolute; left: 4px; right: 4px;
  border-radius: 6px; padding: 3px 6px; z-index: 2;
  font-size: 11px; font-weight: 600;
  cursor: pointer; overflow: hidden;
  display: flex; align-items: center; gap: 6px;
  background: var(--surface2); border: 1px solid var(--border);
  border-left: 3px solid var(--perso);
  color: var(--text);
}
.am-task.perso { border-left-color: var(--perso); }
.am-task.pro   { border-left-color: var(--primary); }
.am-task .am-task-time { font-size: 9px; color: var(--muted); font-weight: 700; }
.am-task.done { opacity: 0.5; text-decoration: line-through; }

/* beta-2.10.1 — Blocs Semaine idéale en fond (vue multi-jours desktop) */
.am-ideal {
  position: absolute; left: 0; right: 0;
  border-radius: 4px; border-left: 3px solid var(--muted);
  padding: 3px 6px; overflow: hidden; pointer-events: none;
  z-index: 0;
  display: flex; align-items: flex-start; gap: 4px;
  font-size: 9px; font-weight: 600; color: var(--muted);
}
.am-ideal i { font-size: 10px; flex-shrink: 0; margin-top: 1px; }
.am-ideal .am-ideal-title {
  flex: 1; min-width: 0; opacity: 0.78;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-transform: uppercase; letter-spacing: 0.3px;
}
/* beta-2.10.4 — Segment période off rendu pleine journée (vacances…) */
.am-ideal.off {
  background: rgba(95,77,134,0.10);
  border-left: 3px dashed var(--muted);
  color: var(--muted);
  padding: 4px 8px;
}
.am-ideal.off i { color: var(--muted); font-size: 12px; }
.am-ideal.off .am-ideal-title { opacity: 1; font-weight: 800; letter-spacing: 0.4px; }

.hub-block[data-block="greeting"],
.hub-block[data-block="quickActions"],
.hub-block[data-block="appointments"] {
  display: block;
}
/* Mascotte masquée en desktop */
.hub-block[data-block="mascot"] { display: none !important; }

/* Greeting — centré */
.hub-greeting-desktop { padding: 4px 0 8px; text-align: center; }
.hub-greeting-desktop .hgd-text { font-size: 22px; font-weight: 900; color: var(--text); }
.hub-greeting-desktop .hgd-text strong { color: var(--perso); font-weight: 900; }
.hub-greeting-desktop .hgd-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* Quick actions */
.hub-qa-row { display: flex; gap: 10px; }
.hub-qa-btn {
  flex: 1; padding: 12px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-size: 13px; font-weight: 700; font-family: inherit;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.15s; touch-action: manipulation;
}
.hub-qa-btn:hover { background: var(--surface2); border-color: var(--primary-light); }
.hub-qa-btn i { font-size: 16px; color: var(--perso); }

/* Appointments */
.hub-apt-list { display: flex; flex-direction: column; gap: 8px; }
.hub-apt-card {
  background: var(--surface); border-radius: 14px; padding: 14px 18px;
  border: 1px solid var(--border);
  display: flex; align-items: center; gap: 14px;
  transition: all 0.15s; cursor: pointer;
}
.hub-apt-card:hover { border-color: var(--primary-light); }
.hub-apt-time { width: 60px; flex-shrink: 0; text-align: center; }
.hub-apt-start { font-size: 14px; font-weight: 700; color: var(--text); }
.hub-apt-end { font-size: 11px; color: var(--muted); }
.hub-apt-divider { width: 3px; height: 36px; border-radius: 2px; flex-shrink: 0; }
.hub-apt-divider.perso { background: var(--perso); }
.hub-apt-divider.pro   { background: var(--primary); }
.hub-apt-body { flex: 1; min-width: 0; }
.hub-apt-title { font-size: 14px; font-weight: 600; color: var(--text); }
.hub-apt-location {
  font-size: 12px; color: var(--muted); margin-top: 2px;
  display: flex; align-items: center; gap: 4px;
}
.hub-apt-location i { font-size: 12px; }
.hub-apt-in {
  font-size: 11px; font-weight: 700; color: var(--perso);
  background: rgba(183,128,68,0.12); padding: 4px 10px; border-radius: 8px;
  white-space: nowrap; flex-shrink: 0;
}

#view-stats { max-width: none; padding: 18px 24px; }
#insightsContent { display: block; }
#insightsContent > div { margin-bottom: 14px; }
.sd-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.sd-title {
  font-size: 22px; font-weight: 900; color: var(--text);
  display: inline-flex; align-items: center; gap: 8px;
}
.sd-title i { color: var(--perso); }
.sd-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.sd-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sd-grid-3-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }
.sd-card {
  background: var(--surface); border-radius: 14px; padding: 18px;
  border: 1px solid var(--border);
}
.sd-label {
  font-size: 11px; font-weight: 600; color: var(--muted); margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}
.sd-label i { font-size: 14px; }
.sd-value { font-size: 28px; font-weight: 800; color: var(--text); line-height: 1.1; }
.sd-unit { font-size: 14px; font-weight: 500; color: var(--muted); }
.sd-sub { font-size: 11px; color: var(--muted); margin-top: 6px; }
.sd-sub.copper { color: var(--perso); font-weight: 600; }
.sd-trend {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 700; margin-top: 6px;
}
.sd-trend.up { color: #6BAF8E; }
.sd-trend.down { color: #C85A42; }
.sd-trend i { font-size: 13px; }

.sd-section-header {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--muted); margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.sd-section-header i { font-size: 15px; }
.sd-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 16px 0; }

/* Bar chart */
.sd-bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 140px; padding-top: 10px; }
.sd-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.sd-bar-value { font-size: 10px; font-weight: 700; color: var(--muted); }
.sd-bar-fill { width: 100%; border-radius: 6px 6px 4px 4px; min-height: 4px; transition: height 0.3s; }
.sd-bar-fill.grape { background: linear-gradient(180deg, var(--primary), var(--primary-light)); }
.sd-bar-fill.today { background: linear-gradient(180deg, var(--perso), var(--primary)); }
.sd-bar-day { font-size: 11px; font-weight: 600; color: var(--muted); }
.sd-bar-day.today { color: var(--perso); font-weight: 700; }

/* Insight card (gradient) */
.sd-insight-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 14px; padding: 20px; color: #F5F2F0;
}
.sd-insight-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(255,255,255,0.15); display: flex; align-items: center;
  justify-content: center; margin-bottom: 12px;
}
.sd-insight-icon i { font-size: 20px; }
.sd-insight-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.sd-insight-text { font-size: 12px; opacity: 0.75; line-height: 1.5; }
.sd-ins-bars { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.sd-ins-bar-row { display: flex; align-items: center; gap: 10px; }
.sd-ins-bar-icon { font-size: 14px; opacity: 0.7; width: 20px; text-align: center; }
.sd-ins-bar-track { flex: 1; height: 6px; background: rgba(255,255,255,0.15); border-radius: 4px; overflow: hidden; }
.sd-ins-bar-fill { height: 100%; border-radius: 4px; background: rgba(255,255,255,0.7); }
.sd-ins-bar-val { font-size: 11px; font-weight: 700; width: 30px; text-align: right; }

/* Heatmap — compact */
.sd-heatmap { display: grid; grid-template-columns: 32px repeat(7, 1fr); gap: 2px; max-width: 560px; }
.sd-hm-header { font-size: 10px; font-weight: 700; color: var(--muted); text-align: center; padding: 2px 0; }
.sd-hm-hour { font-size: 9px; color: var(--muted); font-weight: 600; display: flex; align-items: center; justify-content: flex-end; padding-right: 5px; }
.sd-hm-cell { border-radius: 2px; background: var(--surface2); height: 12px; transition: transform 0.1s; }
.sd-hm-cell:hover { transform: scale(1.2); }
.sd-hm-cell.l1 { background: rgba(95,77,134,0.15); }
.sd-hm-cell.l2 { background: rgba(95,77,134,0.3); }
.sd-hm-cell.l3 { background: rgba(95,77,134,0.5); }
.sd-hm-cell.l4 { background: rgba(95,77,134,0.7); }
.sd-hm-cell.l5 { background: rgba(95,77,134,0.9); }

/* Split perso/pro */
.sd-split-bar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; margin: 12px 0; }
.sd-split-bar .perso { background: var(--perso); }
.sd-split-bar .pro { background: var(--primary); }
.sd-split-legend { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; }
.sd-split-legend .perso { color: var(--perso); }
.sd-split-legend .pro { color: var(--primary); }
.sd-split-detail { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.sd-split-row { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text); }
.sd-split-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.sd-split-dot.perso { background: var(--perso); }
.sd-split-dot.pro { background: var(--primary); }
.sd-split-val { margin-left: auto; font-weight: 700; }

/* Energy */
.sd-energy-bars { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.sd-energy-row { display: flex; align-items: center; gap: 10px; }
.sd-energy-label { font-size: 12px; color: var(--text); width: 70px; }
.sd-energy-track { flex: 1; height: 8px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
.sd-energy-fill { height: 100%; border-radius: 4px; }
.sd-energy-fill.e1 { background: #6BAF8E; }
.sd-energy-fill.e3 { background: var(--perso); }
.sd-energy-fill.e5 { background: #C85A42; }
.sd-energy-val { font-size: 11px; font-weight: 700; color: var(--muted); width: 30px; text-align: right; }

/* Routines mini */
.sd-routine-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.sd-routine-row:last-child { border-bottom: none; }
.sd-routine-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(183,128,68,0.12); color: var(--perso);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sd-routine-icon i { font-size: 16px; }
.sd-routine-info { flex: 1; min-width: 0; }
.sd-routine-name { font-size: 13px; font-weight: 600; color: var(--text); }
.sd-routine-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.sd-routine-pct { font-size: 14px; font-weight: 800; }
.sd-routine-pct.high { color: #6BAF8E; }
.sd-routine-pct.mid  { color: var(--perso); }
.sd-routine-pct.low  { color: #C85A42; }

/* Projets mini */
.sd-project-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.sd-project-row:last-child { border-bottom: none; }
.sd-project-name { font-size: 13px; font-weight: 600; color: var(--text); flex: 1; }
.sd-project-bar { width: 120px; height: 6px; background: var(--surface3); border-radius: 4px; overflow: hidden; }
.sd-project-fill { height: 100%; border-radius: 4px; }
.sd-project-fill.grape  { background: var(--primary); }
.sd-project-fill.copper { background: var(--perso); }
.sd-project-pct { font-size: 12px; font-weight: 700; color: var(--text); width: 36px; text-align: right; }

/* Badges */
.sd-badges-row { display: flex; gap: 12px; flex-wrap: wrap; }
.sd-badge {
  background: var(--surface2); border-radius: 12px; padding: 14px 18px;
  text-align: center; min-width: 110px; flex: 1 1 140px;
  border: 1px solid var(--border);
}
.sd-badge.locked { opacity: 0.5; }
.sd-badge-icon { font-size: 22px; margin-bottom: 6px; }
.sd-badge.unlocked .sd-badge-icon { color: var(--perso); }
.sd-badge.locked .sd-badge-icon { color: var(--muted); }
.sd-badge-name { font-size: 12px; font-weight: 600; color: var(--text); }
.sd-badge-req { font-size: 10px; color: var(--muted); margin-top: 2px; }

/* Masque le layout 2-col existant (insightsContent) qui ne s'applique plus au dashboard */
#insightsContent { grid-template-columns: 1fr !important; }

/* Split view désactivé temporairement en attendant refonte */
.split-bar { display: none !important; }

#view-projects { max-width: none; padding: 18px 24px 18px 16px; }
.projects-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 14px;
}
.projects-title {
  display: block; font-size: 22px; font-weight: 900;
  color: var(--text); margin: 0;
}
.projects-new-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary); color: #fff; border: none;
  border-radius: 10px; padding: 9px 14px;
  font-size: 13px; font-weight: 700;
  cursor: pointer; touch-action: manipulation;
  transition: background 0.15s, transform 0.1s;
}
.projects-new-btn:hover { background: var(--primary-light); }
.projects-new-btn:active { transform: scale(0.97); }
/* beta-2.13.1 : header tâches desktop = titre + bouton "+ Nouvelle tâche" alignés */
.tasks-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 14px;
}
.tasks-title {
  display: block; font-size: 22px; font-weight: 900;
  color: var(--text); margin: 0;
}
.tasks-new-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary); color: #fff; border: none;
  border-radius: 10px; padding: 9px 14px;
  font-size: 13px; font-weight: 700;
  cursor: pointer; touch-action: manipulation;
  transition: background 0.15s, transform 0.1s;
}
.tasks-new-btn:hover { background: var(--primary-light); }
.tasks-new-btn:active { transform: scale(0.97); }
#view-projects .projects-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}
#view-projects .projects-layout.with-details {
  grid-template-columns: 1fr 400px;
}
#view-projects .projects-col-main { display: block; min-width: 0; }
#view-projects .projects-col-detail { display: none; }
#view-projects .projects-layout.with-details .projects-col-detail {
  display: flex;
  flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px;
  position: sticky; top: 72px;
  max-height: calc(100vh - 100px);
  overflow: hidden;
}

#routinesTodayList {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
#routinesTodayList > .routine-card { margin-bottom: 0; }
#routinesTodayList > .stitle { grid-column: 1 / -1; margin-top: 8px !important; }
#routinesAllList {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
#routinesAllList > * { margin-bottom: 0 !important; }

/* Notes — grid 2 colonnes */
#notesList {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
#notesList > .note-card { margin-bottom: 0; }

/* Stats — insights en grid 2 colonnes (KPI row garde flex:1 intact) */
#insightsContent { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; align-items: start; }
#insightsContent > .insight-card { margin-bottom: 0; }
/* KPI row : le premier div qui contient les 3 cards flex:1 doit span 2 colonnes */
#insightsContent > div:not(.insight-card) { grid-column: 1 / -1; }
#insightsContent .stitle { grid-column: 1 / -1; }

/* Settings — masquer le bouton shake (DeviceMotion inutile sur desktop) */
#shakePermBtn { display: none !important; }

/* Bouton "retour Plus" inutile sur desktop (la sidebar fait déjà la nav) */
.more-back { display: none !important; }

@media (min-width: 1200px) {
  /* Stats 3 colonnes sur grand écran */
  #insightsContent { grid-template-columns: repeat(3, 1fr); }
}

.split-bar {
  display: flex; align-items: center; gap: 0;
  background: var(--surface2); border-radius: 10px;
  border: 1px solid var(--border); overflow: hidden;
  height: 34px; margin: 8px 18px 4px;
}
.split-tab {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 6px 14px; border: none; background: transparent;
  color: var(--muted); font-size: 12px; font-weight: 700;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: all 0.15s; touch-action: manipulation;
}
.split-tab i { font-size: 14px; }
.split-tab.active {
  background: var(--surface); color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.split-tab-select {
  appearance: none; -webkit-appearance: none;
  background: transparent; border: none; color: var(--muted);
  font-size: 12px; font-weight: 700; font-family: inherit;
  cursor: pointer; padding: 6px 14px; width: 100%; text-align: center;
  transition: all 0.15s;
}
.split-tab-right { position: relative; }
.split-tab-right.active .split-tab-select { color: var(--text); }
.split-tab-right .split-chevron {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: 12px; color: var(--muted); pointer-events: none;
}
.split-tab-right.has-view .split-chevron { display: none; }
.split-close {
  display: none; align-items: center; justify-content: center;
  width: 28px; height: 100%; border: none; border-left: 1px solid var(--border);
  background: transparent; color: var(--muted); cursor: pointer;
  font-size: 13px; touch-action: manipulation; flex-shrink: 0;
}
.split-close:hover { color: var(--text); background: var(--surface); }
body.split-active .split-close { display: flex; }

body {
  max-width: none;
  padding-left: 224px;
  padding-bottom: 24px;
}
/* Contient le scroll horizontal dans le contenu quand le layout est trop dense */
#view-projects, #view-agenda, #view-notes, #view-stats { overflow-x: hidden; }

.nav { transform: none !important; width: 224px; top: 0; bottom: 0; left: 0; transition: width 0.2s ease, padding 0.2s ease; }
.nav-overlay { display: none !important; }
.menu-btn { display: none; }

/* Collapsed sidebar — contenu collé à la sidebar (plus de gap visible) */
body.nav-collapsed { padding-left: 64px; }
body.nav-collapsed .nav { width: 64px; padding: 20px 8px; }
body.nav-collapsed .nav .ni-btn { justify-content: center; gap: 0; padding: 11px 0; }
body.nav-collapsed .nav .ni-btn .l { display: none; }
body.nav-collapsed .nav-logo-menu { font-size: 0; padding: 4px 0 16px; text-align: center; }
body.nav-collapsed .nav-logo-menu i { font-size: 22px; }
body.nav-collapsed .nav-logo-menu span { display: none; }
body.nav-collapsed .nav-version { display: none; }
body.nav-collapsed .nav-collapse-toggle i { transform: rotate(180deg); }

/* Collapse toggle — cercle à la jonction sidebar / contenu (style mockup) */
.nav-collapse-toggle {
  display: flex; align-items: center; justify-content: center;
  position: absolute; right: -12px; top: 24px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer; z-index: 205;
  transition: background 0.15s, color 0.15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.nav-collapse-toggle:hover { background: var(--surface2); color: var(--primary); }
.nav-collapse-toggle i { font-size: 12px; transition: transform 0.2s; }

/* Version label retirée de la sidebar — maintenant dans Réglages > À propos */
.nav-version { display: none !important; }

/* Quick capture button (desktop sidebar) — violet, sous le toggle */
.nav-quick-capture {
  display: flex; align-items: center; gap: 10px;
  width: 100%; margin-bottom: 20px; padding: 11px 14px;
  border: none; border-radius: 12px; cursor: pointer;
  background: var(--primary); color: #fff;
  font-size: 13px; font-weight: 700; font-family: inherit;
  text-align: left; touch-action: manipulation;
  transition: filter 0.15s;
}
.nav-quick-capture:hover { filter: brightness(1.08); }
.nav-quick-capture > i { font-size: 16px; flex-shrink: 0; }
.nav-quick-capture > span { flex: 1; }

/* Space toggle in sidebar (desktop) — segmented control horizontal compact */
.nav-space-toggle {
  display: flex; flex-direction: row;
  background: var(--surface2); border-radius: 10px;
  padding: 3px; gap: 2px; margin-bottom: 16px;
}
.nav-sp-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 7px 4px; border: none; border-radius: 7px;
  background: transparent; color: var(--muted);
  font-size: 11px; font-weight: 700; font-family: inherit;
  cursor: pointer;
  transition: all 0.15s; touch-action: manipulation;
  min-width: 0;
}
.nav-sp-btn i { font-size: 13px; flex-shrink: 0; }
.nav-sp-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-sp-btn:not(.active):hover { background: rgba(95,77,134,0.06); color: var(--text); }
.nav-sp-btn.active[data-space="all"]   { background: var(--surface); color: var(--text); }
.nav-sp-btn.active[data-space="perso"] { background: rgba(183,128,68,0.15); color: var(--perso); }
.nav-sp-btn.active[data-space="pro"]   { background: rgba(95,77,134,0.12); color: var(--primary); }
/* En sidebar repliée : seul le bouton actif est visible, clic pour cycler */
body.nav-collapsed .nav-space-toggle { padding: 3px; }
body.nav-collapsed .nav-sp-btn:not(.active) { display: none; }
body.nav-collapsed .nav-sp-btn span { display: none; }
body.nav-collapsed .nav-sp-btn { padding: 8px 0; }

/* Collapsed sidebar — tout s'aligne sur la taille des nav-items (42×42 centré) */
body.nav-collapsed .nav-quick-capture {
  width: 44px; height: 44px; padding: 0;
  justify-content: center; margin: 0 auto 12px;
  border-radius: 12px;
}
body.nav-collapsed .nav-quick-capture > span { display: none; }
body.nav-collapsed .nav-quick-capture > i { font-size: 18px; }
body.nav-collapsed .nav-space-toggle {
  width: 44px; height: 44px; padding: 0;
  margin: 0 auto 14px;
  background: var(--surface2); border-radius: 12px;
  justify-content: center; align-items: center;
}
body.nav-collapsed .nav-sp-btn.active {
  width: 100%; height: 100%;
  justify-content: center; align-items: center;
  padding: 0; border-radius: 12px;
}
body.nav-collapsed .nav-sp-btn span { display: none; }
body.nav-collapsed .nav-sp-btn i { width: auto; font-size: 16px; }

/* Masquer le bouton cycle du header sur desktop — toggle déplacé dans la sidebar */
#spaceToggleBtn { display: none !important; }
/* Réglages dans le header (desktop) — visible, masque le nav-settings dans la sidebar */
#nav-settings { display: none !important; }
.header-settings-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer;
  transition: background 0.15s, color 0.15s;
  margin-left: 4px;
}
.header-settings-btn:hover { background: var(--surface3); color: var(--text); }
.header-settings-btn i { font-size: 16px; }

/* Content area — wider on desktop, fluid */
.view { max-width: 960px; margin: 0 auto; padding: 18px 32px; }

/* Grids: 3 columns on desktop */
.hub-projects { grid-template-columns: repeat(3, 1fr); }
.reward-grid { grid-template-columns: repeat(3, 1fr); }
.stats-grid { grid-template-columns: repeat(3, 1fr); }
.icon-picker-grid { grid-template-columns: repeat(8, 1fr); }

/* FAB masqué sur desktop : Cmd+K + bouton Capture rapide de la sidebar le remplacent */
.fab { display: none !important; }
.fb-float { right: 32px; bottom: 32px; }

/* Sheets: more room on desktop */
.sheet { max-width: 560px; }

/* Header full-width in content area */
.header { max-width: none; }

@media (min-width: 1200px) {
  .view { max-width: 1100px; padding: 24px 40px; }

  /* 4 columns for content grids */
  .hub-projects { grid-template-columns: repeat(4, 1fr); }
  .reward-grid { grid-template-columns: repeat(4, 1fr); }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }

  /* Wider sheets */
  .sheet { max-width: 640px; }

  /* Form grids: 4 columns for duration */
  .duration-row { grid-template-columns: repeat(4, 1fr); }
}

.notes-title {
  display: block; font-size: 22px; font-weight: 900;
  color: var(--text); margin-bottom: 14px;
}
#view-notes { max-width: none; padding: 18px 24px 18px 16px; }
#view-notes .notes-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  align-items: start;
}
#view-notes .notes-layout.with-details {
  grid-template-columns: 220px 1fr 360px;
}
/* Colonne gauche : catégories verticales */
#view-notes .notes-col-cats {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 10px;
  position: sticky; top: 72px;
  min-height: 200px;
}
.notes-cats-list {
  display: flex; flex-direction: column; gap: 2px;
  flex: 1;
}
.notes-cat-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 9px;
  background: transparent; border: none; cursor: pointer;
  color: var(--muted); font-size: 13px; font-weight: 500;
  font-family: inherit; text-align: left; width: 100%;
  transition: all 0.15s;
}
.notes-cat-item:hover:not(.active) { background: rgba(95,77,134,0.06); color: var(--text); }
.notes-cat-item.active {
  background: rgba(183,128,68,0.12); color: var(--perso);
  font-weight: 700;
}
.notes-cat-item i { font-size: 15px; flex-shrink: 0; width: 18px; text-align: center; }
.notes-cat-item .ncl-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notes-cat-item .ncl-count {
  font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 10px;
  background: var(--surface2); color: var(--muted);
}
.notes-cat-item.active .ncl-count { background: var(--perso); color: #fff; }
/* Bouton Gérer en bas de la colonne gauche */
.notes-manage-btn-desktop {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 12px; border-top: 1px solid var(--border);
  margin-top: 10px; padding-top: 14px;
  background: transparent; border: none; cursor: pointer;
  color: var(--perso); font-size: 12px; font-weight: 600;
  font-family: inherit; text-align: left; width: 100%;
}
.notes-manage-btn-desktop:hover { color: var(--text); }
/* Bouton Trier dans la colonne gauche — visible uniquement sur la catégorie Notes (unsorted) */
#view-notes .notes-col-cats .notes-header-row {
  padding: 8px 10px 0; margin-bottom: 0;
  justify-content: center;
}
#view-notes .notes-col-cats .notes-process-btn {
  width: 100%; justify-content: center;
}
/* Colonne centre : liste */
#view-notes .notes-col-list {
  display: flex; flex-direction: column;
  min-width: 0;
}
#view-notes .notes-col-detail { display: none; }
#view-notes .notes-layout.with-details .notes-col-detail {
  display: block;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px 18px;
  position: sticky; top: 72px;
  max-height: calc(100vh - 100px); overflow-y: auto;
}
/* Sur desktop, on masque le toggle mobile des tabs (remplacé par la colonne catégories) */
#view-notes .notes-tabs { display: none; }
/* Note cards en pleine largeur dans la colonne liste */
#view-notes #notesList { display: flex !important; flex-direction: column; gap: 8px; }
#view-notes .note-card { margin-bottom: 0; }
#view-notes .note-card.note-active {
  border-color: var(--perso);
  box-shadow: 0 0 0 2px rgba(183,128,68,0.2);
}
/* Note detail panel — boutons */
.ndp-close {
  float: right; width: 28px; height: 28px; border-radius: 6px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  margin-top: -4px;
}
.ndp-close:hover { background: var(--surface3); color: var(--text); }
.ndp-label {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1.2px; padding: 3px 10px; border-radius: 6px;
  display: inline-block; margin-bottom: 12px;
  background: rgba(183,128,68,0.12); color: var(--perso);
}
.ndp-textarea {
  width: 100%; min-height: 180px; resize: vertical;
  padding: 10px 12px; font-family: inherit; font-size: 14px;
  color: var(--text); background: var(--surface2);
  border: 1px solid var(--border); border-radius: 10px;
  outline: none; line-height: 1.5;
  transition: border-color 0.15s; margin-bottom: 14px;
}
.ndp-textarea:focus { border-color: var(--primary); background: var(--surface); }
.ndp-section-label {
  font-size: 11px; font-weight: 700; color: var(--muted);
  margin: 14px 0 6px; display: flex; align-items: center; gap: 5px;
  text-transform: uppercase; letter-spacing: 0.6px;
}
.ndp-section-label i { font-size: 12px; }
.ndp-types {
  display: flex; flex-wrap: wrap; gap: 5px;
}
.ndp-type-btn {
  padding: 5px 10px; border-radius: 14px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--muted); font-size: 11px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  display: inline-flex; align-items: center; gap: 4px;
}
.ndp-type-btn i { font-size: 12px; }
.ndp-type-btn:hover { background: var(--surface3); }
.ndp-type-btn.active {
  background: var(--perso); color: #fff; border-color: var(--perso);
}
.ndp-link-row {
  display: flex; gap: 6px; align-items: stretch;
}
.ndp-link-input {
  flex: 1; padding: 7px 10px; font-family: inherit; font-size: 12px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text); outline: none;
}
.ndp-link-input:focus { border-color: var(--primary); }
.ndp-actions {
  display: flex; gap: 8px; margin-top: 18px;
  padding-top: 16px; border-top: 1px solid var(--border);
}
.ndp-btn {
  flex: 1; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface2);
  color: var(--text); font-size: 12px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  transition: all 0.15s; touch-action: manipulation;
}
.ndp-btn:hover { background: var(--surface3); }
.ndp-btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.ndp-btn.danger  { background: transparent; color: #c94545; border-color: rgba(201,69,69,0.3); }
.ndp-btn.danger:hover { background: rgba(201,69,69,0.08); }
.ndp-save-status {
  font-size: 10px; font-weight: 600; color: var(--muted); opacity: 0;
  margin-left: auto;
}

/* ═══════════════ TASKS DESKTOP — 3 COLONNES (beta-2.7.4/2.7.5) ═══════════════ */
/* En desktop, le day-toggle est masqué : les 3 vues sont distribuées dans les colonnes */
#tasks-day-toggle { display: none; }
/* Le toggle Perso/Pro local fait doublon avec le toggle global du header desktop */
#tasks-space-toggle { display: none; }

/* beta-2.9.4 : la vue Tâches sort du max-width pour utiliser toute la largeur (comme Agenda) — corrige les grandes marges latérales et la compression de la colonne droite */
#view-tasks { max-width: none; padding: 18px 24px 18px 16px; }

/* beta-2.9.3 : Layout en 2 colonnes 70/30 — Aujourd'hui large à gauche, Cette semaine + À venir empilées à droite */
.tasks-desktop-layout {
  display: grid;
  grid-template-columns: 7fr 3fr;
  gap: 14px;
  margin-top: 8px;
  width: 100%;
  min-width: 0; /* beta-2.7.9 : permet au grid de respecter la largeur du parent */
  align-items: start;
}
/* Colonne droite : stack vertical Cette semaine + À venir */
.tasks-desktop-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
/* Accent visuel sur Aujourd'hui : focus du jour */
.tasks-col-today {
  border-color: rgba(183,128,68,0.35);
  background: linear-gradient(180deg, rgba(183,128,68,0.04), var(--surface));
}
.tasks-col-today .tasks-col-header { color: var(--copper, #B78044); }
/* beta-2.7.8 : séparateur "tâches terminées" en bas de la colonne Aujourd'hui */
.tasks-done-divider {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--muted);
  margin: 14px 0 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.tasks-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  min-height: 200px;
  min-width: 0; /* beta-2.7.9 : permet au contenu de se compresser dans la cellule au lieu de déborder */
  overflow: hidden;
}
/* beta-2.7.9 : cascader min-width:0 jusqu'aux cartes pour éviter les débordements */
.tasks-col-body { min-width: 0; }
.tasks-col .task-wrap { min-width: 0; }
.tasks-col .task { min-width: 0; }
.tasks-col .t-body { min-width: 0; overflow: hidden; }
.tasks-col .t-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tasks-col .t-tags { flex-wrap: wrap; }
.tasks-col-header {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.tasks-col-header .tasks-col-count {
  font-size: 11px; font-weight: 700;
  color: var(--muted);
  background: var(--surface2);
  padding: 2px 9px;
  border-radius: 10px;
  margin-left: auto;
}
.tasks-col-body { display: flex; flex-direction: column; gap: 6px; }
.tasks-col-body .empty { padding: 24px 8px; text-align: center; color: var(--muted); font-size: 13px; }

/* Section "À venir" : groupage par semaine avec header pliable */
.tasks-week-section { margin-bottom: 10px; }
.tasks-week-section:last-child { margin-bottom: 0; }
.tasks-week-section .upcoming-week-header { font-size: 12px; padding: 8px 12px; }

/* Drop zones — feedback visuel pendant le drag */
.tasks-droplist {
  min-height: 40px;
  border-radius: 10px;
  padding: 4px;
  transition: background 0.15s;
}
.tasks-droplist.drag-over {
  background: rgba(95,77,134,0.08);
  outline: 2px dashed rgba(95,77,134,0.3);
  outline-offset: -2px;
}
.tasks-droplist.empty-drop {
  display: flex; align-items: center; justify-content: center;
  min-height: 60px;
  color: var(--muted);
  font-size: 12px; font-style: italic;
  border: 1px dashed var(--border);
  border-radius: 10px;
}

