:root {
  color-scheme: light;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --accent: #8a8f3a;
  --border: #e5e5e5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: #fafafa;
}

header {
  background: var(--accent);
  color: white;
  padding: 1.5rem 2rem;
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-logo {
  max-height: 70px;
  width: auto;
}

main {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

#status {
  color: var(--muted);
}

#login-section {
  margin-bottom: 2rem;
}

#login-form, #profile, #account-card {
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
}

#login-form {
  max-width: 320px;
}

#login-form label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0.75rem 0 0.25rem;
}

#login-form input {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 1rem;
}

#login-form button, #profile button {
  margin-top: 1.25rem;
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
}

#login-form .error {
  color: #b3261e;
  margin-top: 0.75rem;
  margin-bottom: 0;
  font-size: 0.9rem;
}

#profile p, #account-card p {
  margin: 0.4rem 0;
}

.account-link {
  display: inline-block;
  margin-top: 1.25rem;
  margin-right: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.account-link:hover {
  text-decoration: underline;
}

.back-link {
  color: white;
  text-decoration: none;
  margin-right: 0.5rem;
}

.account-heading {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.25rem;
}

.account-heading strong {
  font-weight: 800;
}

.account-cursus {
  font-size: 1.3rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.account-reste {
  margin-top: 1rem;
  font-weight: 700;
  color: #1a56db;
}

.payments-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.75rem;
}

.payments-table td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
}

.qcm-block {
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.qcm-block h2 {
  font-size: 1.1rem;
  margin: 0 0 0.25rem;
}

.qcm-empty {
  color: var(--muted);
  font-style: italic;
}

.info-banner {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--accent);
  color: white;
  border-radius: 4px;
}

.info-banner a {
  color: white;
}

.payment-options {
  margin-top: 1.5rem;
}

.payment-options ul {
  padding-left: 1.25rem;
}

.payment-options li {
  margin-bottom: 0.5rem;
}

.payment-options a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
}

.profile-name {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 0.25rem;
}

.profile-email {
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

#course-search {
  display: block;
  width: 100%;
  margin-bottom: 1.5rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 1rem;
}

.module {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--accent);
}

.module-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.5rem 0;
  background: none;
  border: none;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
}

.module-toggle .arrow {
  font-size: 0.8rem;
}

.module-dates {
  margin: 0 0 0 1.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.module-lessons {
  margin-top: 0.75rem;
}

.lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.lesson-card {
  display: block;
  padding: 1rem;
  background: white;
  border: 1px solid var(--ink);
  border-radius: 4px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.lesson-card:hover {
  background: #f4f4f4;
}

.lesson-card:visited {
  background-color: #e3ecd4;
}

.lesson-card.disabled, .qcm-button.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.module-qcms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.qcm-button {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: var(--accent);
  color: white;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.qcm-button:hover {
  opacity: 0.9;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: white;
  background: #888; /* fallback for a Cursus value not in the list below */
}

.badge-basic {
  background: #1d5c3a;
}

.badge-confirme {
  background: #e3a83c;
}

.badge-pro {
  background: #6e6e2a;
}

.badge-expert {
  background: #141414;
}

.badge-dark {
  background: #141414;
  margin-left: 0.5rem;
}

.evaluation {
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}

.evaluation summary {
  cursor: pointer;
  font-weight: 700;
}

.evaluation-type {
  text-transform: uppercase;
}

.evaluation-date {
  color: var(--muted);
}

.evaluation-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.evaluation-list .list-group-item {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.evaluation-report {
  font-style: italic;
}
