:root {
  --paper: #f3eadc;
  --paper-2: #fffaf3;
  --ink: #241c16;
  --muted: #6d6256;
  --line: #e3d3bf;
  --terra: #be4b2a;
  --terra-deep: #8c3118;
  --moss: #234237;
  --moss-soft: #e5f0ea;
  --gold: #f0d7a2;
  --danger: #8d2b2b;
  --shadow: 0 18px 50px rgba(60, 36, 18, 0.08);
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", "Liberation Serif", Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", "Liberation Sans", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #f8e7d2 0%, transparent 55%),
    linear-gradient(180deg, #f7f1e6 0%, var(--paper) 40%);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.03em; margin: 0; }
p { margin: 0; }

.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.card {
  width: min(440px, 100%);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 28px;
}
.mark {
  display: flex;
  gap: 12px;
  align-items: center;
}
.stamp {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--terra);
  color: #fff8f2;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 24px;
}
.kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 11px;
  color: var(--muted);
}
.login h1 { font-size: 40px; margin: 18px 0 8px; }
.lede { color: var(--muted); margin-bottom: 18px; }
label { display: block; font-size: 13px; margin: 12px 0 6px; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
}
textarea { min-height: 90px; resize: vertical; }
.primary, .ghost, .danger {
  border-radius: 999px;
  border: 0;
  padding: 11px 16px;
}
.primary { background: var(--terra); color: white; }
.primary:hover { background: var(--terra-deep); }
.ghost { background: transparent; border: 1px solid var(--line); }
.danger { background: transparent; color: var(--danger); border: 1px solid #eccaca; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-14 { margin-top: 14px; }
.mt-18 { margin-top: 18px; }
.mb-18 { margin-bottom: 18px; }
.error {
  background: #fde8e4;
  color: var(--danger);
  border-radius: 12px;
  padding: 10px 12px;
  margin-top: 12px;
}
.shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.nav {
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: rgba(255, 250, 243, 0.72);
}
.nav button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--ink);
}
.nav button.active { background: var(--ink); color: var(--paper); }
.main { padding: 28px 28px 64px; }
.top { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 22px; }
.top h1 { font-size: 42px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.stat, .panel {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
}
.stat b { display: block; font-family: var(--serif); font-size: 34px; }
.stat span, .muted { color: var(--muted); font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 14px; }
.list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.item {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: white;
  text-align: left;
  width: 100%;
}
.item strong { display: block; }
.pill {
  display: inline-flex;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  background: var(--gold);
}
.pill.haute { background: #f3c7bc; }
.pill.basse { background: var(--moss-soft); }
.pill.ok { background: var(--moss-soft); color: var(--moss); }
.pill.warn { background: #fde8e4; color: var(--danger); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
pre {
  white-space: pre-wrap;
  word-break: break-word;
  background: #241c16;
  color: #f6efe4;
  border-radius: 14px;
  padding: 14px;
  font-size: 12px;
  line-height: 1.5;
}
.knowledge h2 { font-size: 22px; margin-top: 18px; }
.knowledge p { margin: 8px 0; }
.knowledge ul { margin: 8px 0 8px 18px; }
.banner {
  border-left: 4px solid var(--terra);
  background: #fff6ee;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 14px;
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .nav { border-right: 0; border-bottom: 1px solid var(--line); }
  .nav .links { display: flex; gap: 6px; overflow: auto; }
  .nav button { width: auto; white-space: nowrap; }
  .stats, .grid-2, .split { grid-template-columns: 1fr; }
  .top h1 { font-size: 34px; }
  .main { padding: 18px 14px 48px; }
}
