/* Styles du dashboard (charte Premise : violet et nuit). Aucun style en ligne dans les gabarits : tout est ici. */

:root {
  --bg: #0f0b1a;
  --panel: #1a1430;
  --panel-border: #2e2450;
  --text: #ece8f7;
  --muted: #a79fc4;
  --accent: #8e24aa;
  --accent-hover: #a63bc4;
  --ok: #43a047;
  --bad: #e5484d;
  --radius: 10px;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: #c58bf0; }
a:hover { color: #e0b3ff; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  background: var(--panel);
  border-bottom: 1px solid var(--panel-border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}

.topbar nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.topbar nav a { color: var(--muted); text-decoration: none; }
.topbar nav a:hover { color: var(--text); }

main {
  flex: 1;
  width: 100%;
  max-width: 52rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

h1 { font-size: 1.8rem; margin: 0 0 0.75rem; }
h2 { font-size: 1.25rem; margin: 2rem 0 0.5rem; }

.lead { color: var(--muted); font-size: 1.1rem; }

.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
}

.card h2:first-child { margin-top: 0; }

.button,
button.primary {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
button.primary:hover { background: var(--accent-hover); color: #fff; }

button.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

button.link:hover { color: var(--text); }

form.inline { display: inline; margin: 0; }

.status-ok { color: var(--ok); font-weight: 600; }
.status-bad { color: var(--bad); font-weight: 600; }

.hint { color: var(--muted); }

table { width: 100%; border-collapse: collapse; margin: 0.5rem 0; }
th, td { padding: 0.45rem 0.6rem; border-bottom: 1px solid var(--panel-border); text-align: left; vertical-align: top; }
th { color: var(--muted); font-weight: 600; width: 40%; }

/* Table de liste (plusieurs colonnes de même poids) : pas de largeur fixe sur la première. */
table.list th { width: auto; }

input[type="text"],
input[type="date"],
select,
textarea {
  width: 100%;
  max-width: 28rem;
  padding: 0.5rem 0.65rem;
  margin-top: 0.25rem;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

label { display: block; margin: 0.75rem 0; }

.filters { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; margin-bottom: 1rem; }
.filters label { margin: 0; }
.filters input, .filters select { max-width: 14rem; }

.badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--panel-border);
  font-size: 0.85em;
}

code {
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: #261d44;
  font-size: 0.92em;
}

ul { padding-left: 1.2rem; }

footer {
  padding: 1.25rem;
  border-top: 1px solid var(--panel-border);
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
}

footer p { max-width: 52rem; margin: 0.4rem auto; }

@media (max-width: 40rem) {
  main { padding: 1.25rem 1rem 2rem; }
  h1 { font-size: 1.5rem; }
}
