/* ── Dashboard layout ────────────────────────────────────────────────────────── */
.page--dashboard {
  background: #eef3ee;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ─────────────────────────────────────────────────────────────────── */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 24px;
  height: 60px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(20,36,28,0.06);
}

.dash-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--forest-dark);
}
.dash-header__logo { font-size: 1.4rem; }

.dash-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Main area ───────────────────────────────────────────────────────────────── */
.dash-main {
  flex: 1;
  padding: 32px 24px 48px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.dash-welcome {
  margin-bottom: 28px;
}
.dash-welcome__title {
  margin: 0 0 4px;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--forest-dark);
}
.dash-welcome__sub {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.dash-welcome__sub strong { color: var(--forest-dark); font-weight: 700; }

.dash-list-wrap { min-height: 200px; }

/* ── Grille de cards ─────────────────────────────────────────────────────────── */
.rt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* ── Card roadtrip ───────────────────────────────────────────────────────────── */
.rt-card {
  background: var(--paper);
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(20,36,28,0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 150ms, box-shadow 150ms;
}
.rt-card:not(.rt-card--skeleton):hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(20,36,28,0.14);
}

.rt-card__cover {
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rt-card__icon { font-size: 2rem; }

.rt-card__body {
  padding: 16px 16px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rt-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--forest-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rt-card__desc {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.rt-card__meta {
  margin: 4px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.rt-card__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 14px;
}
.rt-card__actions .btn--primary { flex: 1; text-align: center; }

/* ── Skeleton card ───────────────────────────────────────────────────────────── */
.rt-card--skeleton .rt-card__cover {
  background: linear-gradient(90deg, #e8ede8 25%, #d8e0d8 50%, #e8ede8 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}
.rt-card--skeleton .rt-card__body { gap: 8px; }

/* ── Empty state ─────────────────────────────────────────────────────────────── */
.rt-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  color: var(--muted);
}
.rt-empty__icon  { font-size: 3.5rem; margin-bottom: 16px; }
.rt-empty__title { margin: 0 0 8px; font-size: 1.2rem; font-weight: 700; color: var(--forest-dark); }
.rt-empty__sub   { margin: 0; font-size: 0.9rem; }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .dash-main        { padding: 20px 14px 40px; }
  .dash-header      { padding: 0 14px; }
  .dash-header__name { display: none; }
  .rt-grid          { grid-template-columns: 1fr; }
}

/* ── Dark mode ───────────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  .page--dashboard  { background: #0e1610; }
  .dash-header      { background: #14201a; border-color: rgba(78,168,118,0.12); }
  .rt-card          { background: #1a2620; border-color: rgba(78,168,118,0.1); }
  .rt-card--skeleton .rt-card__cover,
  .rt-card--skeleton .sk-line {
    background: linear-gradient(90deg, #1e2e22 25%, #243428 50%, #1e2e22 75%);
    background-size: 200% 100%;
  }
}
