:root {
  --moss: #3f4a37;
  --moss-dark: #2b3327;
  --sand: #eee9dd;
  --sand-light: #f7f4ec;
  --ochre: #b5772a;
  --ink: #22241f;
  --line: #d9d2bf;
  --ok: #4f6b47;
  --warn: #b5772a;
  --danger: #a4432f;
  --radius: 3px;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Work Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--sand);
  color: var(--ink);
  line-height: 1.5;
}

.topbar {
  background: var(--moss-dark);
  color: var(--sand-light);
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--ochre);
}

.topbar .brand {
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.topbar .brand span { color: var(--ochre); }

.topbar nav a, .topbar button.linklike {
  color: var(--sand-light);
  text-decoration: none;
  margin-left: 20px;
  font-size: 0.9rem;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
}
.topbar nav a:hover, .topbar button.linklike:hover { color: var(--ochre); }

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

h1 {
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 600;
  margin: 0 0 6px;
}

h2 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 32px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.subtitle { color: #5c5f52; margin-bottom: 24px; }

.card {
  background: var(--sand-light);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.card h3 {
  font-family: var(--serif);
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .grid { grid-template-columns: 1fr; } }

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 14px 0 5px;
  color: var(--moss-dark);
}

input, textarea, select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 0.95rem;
  background: #fff;
}
textarea { resize: vertical; min-height: 70px; }

button.primary {
  background: var(--moss);
  color: #fff;
  border: none;
  padding: 11px 20px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
}
button.primary:hover { background: var(--moss-dark); }
button.primary:disabled { background: #999; cursor: not-allowed; }

button.secondary {
  background: none;
  border: 1px solid var(--moss);
  color: var(--moss);
  padding: 9px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
}

.checkline { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0; }
.checkline input { width: auto; margin-top: 3px; }
.checkline label { margin: 0; font-weight: 400; font-size: 0.9rem; color: var(--ink); }

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
}
.badge.depose, .badge.en_attente_correction { background: #ecdfc0; color: #6b5417; }
.badge.correction_en_cours { background: #dde3d5; color: var(--moss-dark); }
.badge.acquis_valides { background: #dbe8d5; color: var(--ok); }
.badge.partiellement_valide { background: #f1ddc3; color: var(--warn); }
.badge.corrections_demandees, .badge.nouvelle_video_attendue { background: #f0d6cd; color: var(--danger); }

.error { color: var(--danger); font-size: 0.9rem; margin-top: 10px; }
.empty { color: #85806f; font-style: italic; padding: 20px 0; }

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.list-item:last-child { border-bottom: none; }
.list-item .meta { font-size: 0.85rem; color: #5c5f52; margin-top: 3px; }

.criteres-grille { display: flex; flex-direction: column; gap: 10px; }
.critere-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px dotted var(--line);
}
.critere-row span { font-size: 0.88rem; }

video { width: 100%; border-radius: var(--radius); background: #000; }

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--moss-dark);
}
.login-box {
  background: var(--sand-light);
  padding: 40px;
  border-radius: var(--radius);
  width: 100%;
  max-width: 380px;
  border-top: 4px solid var(--ochre);
}
.login-box h1 { text-align: center; }
.login-box .subtitle { text-align: center; }
