/* ============================================================
   GenIAcademy - Espace apprenant (dashboard)
   ============================================================ */
.dash { width: 100%; margin-top: 8px; }

/* Bandeau d'accès au dashboard depuis le profil. */
.profile-dash-link {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(184, 92, 56, 0.16) 0%, rgba(200, 150, 71, 0.08) 100%);
  border: 1px solid rgba(184, 92, 56, 0.3);
  border-radius: 14px; padding: 18px 22px; margin-bottom: 18px;
  text-decoration: none; color: inherit;
  transition: border-color 0.2s;
}
.profile-dash-link:hover { border-color: var(--terra); }
.profile-dash-link .pdl-title { font-family: 'Fraunces', serif; font-size: 17px; }
.profile-dash-link .pdl-sub { font-size: 13px; color: var(--terra-light); }

.dash-head { margin-bottom: 32px; }
.dash-hello {
  font-family: 'Fraunces', serif; font-weight: 400;
  font-size: 30px; letter-spacing: -0.5px; margin-bottom: 18px;
}
.dash-hello em { font-style: italic; color: var(--terra-light); }
.dash-stats { display: flex; flex-wrap: wrap; gap: 12px; }
.dash-stat {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 22px; min-width: 120px;
}
.dash-stat strong { font-family: 'Fraunces', serif; font-size: 26px; display: block; }
.dash-stat span { font-size: 12px; color: var(--muted); }

.dash-section { margin-bottom: 36px; }
.dash-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.dash-section-head h2 { font-family: 'Fraunces', serif; font-weight: 400; font-size: 20px; }

/* Cartes formations avec progression */
.dash-courses {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px;
}
.dash-course {
  display: flex; align-items: center; gap: 16px;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px; text-decoration: none; color: inherit;
  transition: border-color 0.2s, transform 0.2s;
}
.dash-course:hover { border-color: var(--terra); transform: translateY(-2px); }
.dash-course-info { flex: 1; min-width: 0; }
.dash-course-cat {
  font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--terra-light); margin-bottom: 5px;
}
.dash-course-title { font-family: 'Fraunces', serif; font-size: 16px; margin-bottom: 10px; }
.dash-progress {
  height: 6px; border-radius: 100px; background: rgba(255, 255, 255, 0.08); overflow: hidden;
}
.dash-progress-bar {
  height: 100%; border-radius: 100px;
  background: linear-gradient(90deg, var(--terra), var(--gold));
}
.dash-progress-label { font-size: 11px; color: var(--muted); margin-top: 6px; }
.dash-resume { color: var(--terra-light); font-size: 13px; white-space: nowrap; }

/* Listes (lives, certificats) */
.dash-list { display: flex; flex-direction: column; gap: 8px; }
.dash-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 18px; text-decoration: none; color: inherit;
}
a.dash-row:hover { border-color: var(--terra); }
.dash-row-main { font-size: 14px; }

/* Tableau paiements */
.dash-table {
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.dash-table-head, .dash-table-row {
  display: grid; grid-template-columns: 1fr 2fr 1fr 1fr; gap: 12px;
  padding: 12px 18px; align-items: center;
}
.dash-table-head {
  background: var(--ink-2);
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.dash-table-row { border-top: 1px solid var(--line); font-size: 13.5px; }
.pay-status { font-size: 11px; padding: 3px 10px; border-radius: 100px; border: 1px solid var(--line); justify-self: start; }
.pay-success { color: var(--jade-light); border-color: rgba(74, 128, 103, 0.4); }
.pay-pending { color: var(--gold); }
.pay-failed, .pay-cancelled { color: #ff8a7a; }

.dash-empty {
  color: var(--muted); font-size: 14px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px 0;
}
.dash-empty .btn-pay { display: inline-block; width: auto; }

.dash-links { display: flex; flex-wrap: wrap; gap: 12px; }
.dash-links a {
  background: var(--ink-2); border: 1px solid var(--line); border-radius: 100px;
  padding: 10px 18px; font-size: 13px; color: var(--paper); text-decoration: none;
}
.dash-links a:hover { border-color: var(--terra); }

@media (max-width: 700px) {
  .dash-courses { grid-template-columns: 1fr; }
  .dash-hello { font-size: 24px; }
  .dash-table-head { display: none; }
  .dash-table-row { grid-template-columns: 1fr 1fr; gap: 6px 12px; }
  .dash-table-row span:nth-child(2) { grid-column: 1 / -1; order: -1; font-weight: 500; }
}
