:root {
  color-scheme: light dark;
  --bg: #f5f7f5;
  --card: #ffffff;
  --text: #17241c;
  --muted: #5b6a60;
  --accent: #1e6446;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10231a;
    --card: #16301f;
    --text: #eef3ef;
    --muted: #a9bdb1;
    --accent: #4fd18b;
  }
}

* { box-sizing: border-box; }

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

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-form {
  background: var(--card);
  padding: 2rem;
  border-radius: 16px;
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: center;
}

.login-form input, .login-form button {
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

.login-form button {
  background: var(--accent);
  color: white;
  border: none;
  font-weight: 600;
}

.error { color: #c0392b; margin: 0; }

.page {
  max-width: 480px;
  margin: 0 auto;
  padding: 1rem;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

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

.logout { color: var(--muted); font-size: 0.85rem; text-decoration: none; }

.card {
  background: var(--card);
  border-radius: 16px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.card-main { text-align: center; }

.label {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.session-type { font-size: 1.4rem; margin: 0; font-weight: 600; }
.session-distance { font-size: 2.5rem; margin: 0.25rem 0; font-weight: 700; color: var(--accent); }
.session-echeance { margin: 0; color: var(--muted); }
.session-route { margin: 0.75rem 0 0; }
.route-km { color: var(--muted); }
.session-meta { font-size: 0.75rem; color: var(--muted); margin-top: 0.75rem; }

.apercu { list-style: none; padding: 0; margin: 0; }
.apercu li { padding: 0.4rem 0; border-bottom: 1px solid rgba(128,128,128,0.15); }
.apercu li:last-child { border-bottom: none; }

table.historique { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
table.historique th, table.historique td { text-align: left; padding: 0.4rem 0.2rem; border-bottom: 1px solid rgba(128,128,128,0.15); }
table.historique th { color: var(--muted); font-weight: 500; }
