/* ====== Reset + base ====== */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(135deg, #f9fafb, #eef2f7);
  color: #111;
}
.container { max-width: 900px; margin: 40px auto; padding: 0 16px; }
.card { background:#fff; border-radius:16px; box-shadow:0 8px 30px rgba(0,0,0,.06); padding:20px; margin-bottom:20px; }
h1 { margin:0 0 12px; font-size: 1.6rem; }
.subtitle { font-size:1rem; color:#555; margin-bottom:1rem; }
/* Topbar */
.site-topbar { position: sticky; top: 0; z-index: 1000; backdrop-filter: saturate(180%) blur(8px); background: rgba(255,255,255,0.75); border-bottom: 1px solid rgba(0,0,0,0.06); }
.site-topbar__inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 16px; }
.brand { font-weight: 700; font-size: 1rem; letter-spacing: .2px; color: #111; text-decoration: none; }
.nav { display: flex; align-items: center; gap: 10px; }
.nav__link { color: #111; text-decoration: none; font-weight: 500; font-size: .95rem; padding: 6px 10px; border-radius: 8px; }
.nav__link:hover { background: rgba(0,0,0,0.06); }
.nav__cta { background: #111; color: #fff; text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 10px; font-size: .95rem; }
.nav__cta:hover { background: #222; }
/* Notices */
.notice { margin:0 0 16px; padding:12px; border-radius:10px; background:#eef6ff; color:#0b63ce; font-size: .95rem; }
/* Tableaux */
.table { width:100%; border-collapse:collapse; margin-top: 8px; }
.table th, .table td { padding:10px 8px; border-bottom:1px solid #eee; font-size:14px; vertical-align: middle; }
.table th { text-align:left; color:#666; font-weight:600; }
/* Badges */
.badge { padding:4px 8px; border-radius:999px; font-size:12px; font-weight:600; display:inline-block; }
.badge-admin { background:#111; color:#fff; margin-left:6px; }
.badge.on  { background:#e8f7ee; color:#177245; }
.badge.off { background:#fdeeee; color:#b91c1c; }
/* Boutons */
.btn { appearance:none; border:0; border-radius:10px; padding:8px 12px; font-size:13px; font-weight:600; cursor:pointer; background:#111; color:#fff; transition: all .15s ease; }
.btn:hover { background:#222; transform: translateY(-1px); }
.btn.delete { background:#b91c1c; }
.btn.delete:hover { background:#7f1d1d; }
.btn.secondary { background:#444; }
.btn.secondary:hover { background:#222; }
.btn[disabled] { opacity:.5; cursor:not-allowed; transform:none; }
/* Utilitaires */
.inline { display:inline; }
.text-right { text-align:right; }
/* ===== Auth (login/register) ===== */
.container.auth-wrap {
  max-width: 420px;
  margin: 10vh auto;
}
.card.auth {
  padding: 28px;
  border-radius: 18px;
}

.auth-title {
  margin: 0 0 6px;
  font-size: 1.4rem;
  font-weight: 700;
}
.auth-subtitle {
  margin: 0 0 18px;
  font-size: .95rem;
  color: #666;
}

.field { margin-bottom: 14px; text-align: left; }
.label { display: block; font-size: .9rem; font-weight: 600; color: #333; margin-bottom: 6px; }
.input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  font-size: .95rem;
  outline: none;
  background: #fff;
  transition: box-shadow .15s ease, border-color .15s ease, transform .05s ease;
}
.input:hover { border-color: #d1d5db; }
.input:focus {
  border-color: #111;
  box-shadow: 0 0 0 4px rgba(0,0,0,.08);
}

.btn.block { width: 100%; padding: 12px 14px; border-radius: 12px; font-size: .98rem; }
.form-help { margin-top: 10px; text-align: center; font-size: .9rem; color: #666; }
.form-help a { color:#111; text-decoration: underline; }

.notice--error { background:#fdeeee; color:#b91c1c; }
.notice--ok    { background:#eaf7ee; color:#157347; }

/* Petites améliorations de la topbar quand on est sur une page "auth" étroite */
@media (max-width: 540px) {
  .site-topbar__inner { padding: 8px 12px; }
  .brand { font-size: .95rem; }
  .nav__cta { padding: 7px 10px; border-radius: 8px; }
}
