/* carnet-specific layout, built on top of the commons design system tokens
   and components (main.css) — no colors/fonts/radius defined here. */

.page-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.page-header h1 {
  flex: 1;
  margin: 0;
}

.page-header-actions {
  display: flex;
  gap: var(--space-2);
  margin-left: auto;
}

.card-meta {
  color: var(--text-3);
  font-size: 0.85rem;
  margin: 0 0 var(--space-2);
}

.dashboard-layout {
  display: flex;
  align-items: flex-start;
  gap: var(--space-6);
}

.dashboard-tasks {
  flex: 0 0 25%;
  min-width: 0;
}

.dashboard-pages {
  flex: 1;
  min-width: 0;
}

.dashboard-pages-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.dashboard-pages-header h2 {
  margin: 0;
}

@media (max-width: 720px) {
  .dashboard-layout {
    flex-direction: column;
  }

  .dashboard-tasks,
  .dashboard-pages {
    flex: none;
    width: 100%;
  }
}

.task-section {
  margin-bottom: var(--space-6);
}

.task-group-title {
  font-size: 0.9rem;
  color: var(--text-3);
  margin: var(--space-4) 0 0;
}

.task-group-title--overdue {
  color: var(--danger);
}

.task-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.task-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) 0;
  border-bottom: 1px solid var(--border);
  line-height: 1.3;
}

.task-row:last-child {
  border-bottom: none;
}

.task-checkbox-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
  cursor: pointer;
  min-width: 0;
}

.task-text--done {
  text-decoration: line-through;
  color: var(--text-3);
}

.task-date {
  font-size: 0.85rem;
  color: var(--text-2);
  white-space: nowrap;
}

.task-delete,
.tag-remove {
  border: none;
  background: none;
  color: var(--text-3);
  cursor: pointer;
  line-height: 1;
}

.task-delete:hover,
.tag-remove:hover {
  color: var(--danger);
}

.task-add-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.tag-add-form {
  display: flex;
  gap: var(--space-2);
  margin: var(--space-2) 0 var(--space-4);
}

.page-content {
  line-height: 1.6;
}

.page-content .task-list-item {
  list-style: none;
}

.page-edit-form textarea {
  font-family: monospace;
}

.empty-state {
  color: var(--text-3);
}

/* commons' .topbar-nav is hidden below 640px with no mobile menu of its own
   (fine for the other orvaltech projects, whose topbar has nothing critical
   in it) — carnet's only nav link is "Déconnexion", which must stay
   reachable, so it's restored here rather than left invisible on mobile. */
@media (max-width: 640px) {
  .topbar-nav {
    display: flex;
  }
}
