/* =================================================================
 * myworldmc — design système v2
 * Palette : héraldique moderne (rouge templier, or, brun nuit, bleu)
 * Police : système (Inter / -apple-system pour perf)
 * ================================================================= */

:root {
  --bg-deep: #0d0d1f;
  --bg: #131329;
  --bg-soft: #1c1c3a;
  --bg-card: #20204a;
  --bg-card-hover: #262657;
  --border: #2f2f5c;
  --border-strong: #3f3f7a;
  --text: #e8e8f0;
  --text-soft: #b8b8c8;
  --dim: #6b6b85;
  --bright: #f5e6c8;

  --accent: #d4af37;
  --accent-soft: #b8951a;
  --accent-glow: rgba(212, 175, 55, 0.35);

  --red: #c92a2a;
  --red-bright: #e85050;
  --red-soft: #5a0f0f;
  --green: #2a8a3e;
  --green-bright: #6ee07f;
  --green-soft: #1a3d22;
  --blue: #4a78c7;
  --blue-bright: #6e9aea;
  --warn: #e08a30;
  --warn-soft: #4a2e10;

  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
  --shadow: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-accent: 0 0 24px var(--accent-glow);

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  --font-serif: 'Cormorant Garamond', 'Crimson Pro', Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background:
    radial-gradient(ellipse at top, rgba(212, 175, 55, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at bottom, rgba(74, 120, 199, 0.04) 0%, transparent 50%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 15px;
}
a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--bright); }
code {
  background: var(--bg-deep);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.92em;
  font-family: var(--font-mono);
  color: var(--accent);
  border: 1px solid var(--border);
}
pre {
  background: var(--bg-deep);
  padding: 14px 16px;
  border-radius: var(--radius);
  overflow-x: auto;
  border: 1px solid var(--border);
}
pre code { background: transparent; border: 0; padding: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 24px 0; }
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--bright);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
h1 { font-size: 36px; margin: 0 0 16px; }
h2 { font-size: 26px; margin: 0 0 12px; }
h3 { font-size: 20px; margin: 0 0 8px; }
p { margin: 0 0 12px; color: var(--text-soft); }
p:last-child { margin-bottom: 0; }

/* ---------- HEADER ---------- */
header.site-header {
  background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}
header.site-header .logo {
  color: var(--bright);
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
}
header.site-header .logo .accent {
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent-glow);
}
header.site-header nav {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
  margin-left: auto;
  align-items: center;
}
header.site-header nav a {
  padding: 8px 14px;
  border-radius: 6px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s ease;
  position: relative;
}
header.site-header nav a:hover {
  background: var(--bg-card);
  color: var(--bright);
}
header.site-header nav a.active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
  color: var(--bg-deep);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}
header.site-header nav a.bell {
  font-size: 18px;
  padding: 6px 10px;
  position: relative;
}
header.site-header nav a.bell .badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--red-bright);
  color: white;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 700;
  border: 2px solid var(--bg-deep);
  min-width: 18px;
  text-align: center;
}
.banner-warn {
  background: linear-gradient(90deg, var(--red) 0%, var(--red-bright) 100%);
  color: white;
  padding: 12px 24px;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(201, 42, 42, 0.4);
}
.banner-warn a { color: white; text-decoration: underline; font-weight: 700; }

/* ---------- MAIN ---------- */
main.site-main {
  flex: 1;
  max-width: 1080px;
  margin: 32px auto;
  padding: 0 24px;
  width: 100%;
  animation: fadeIn 0.3s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- FOOTER ---------- */
footer.site-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  padding: 24px;
  text-align: center;
  color: var(--dim);
  font-size: 13px;
  margin-top: 48px;
}
footer.site-footer a {
  color: var(--text-soft);
  margin: 0 6px;
}
footer.site-footer a:hover { color: var(--accent); }

/* ---------- CARDS ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease;
}
.card:hover {
  border-color: var(--border-strong);
}
.card-title {
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 1px;
  background: var(--accent);
}

/* ---------- BADGES ---------- */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge-online    { background: var(--green-soft); color: var(--green-bright); border: 1px solid var(--green); }
.badge-offline   { background: var(--red-soft); color: var(--red-bright); border: 1px solid var(--red); }
.badge-pending   { background: rgba(212, 175, 55, 0.15); color: var(--accent); border: 1px solid var(--accent); }
.badge-approved  { background: var(--green-soft); color: var(--green-bright); border: 1px solid var(--green); }
.badge-denied    { background: var(--red-soft); color: var(--red-bright); border: 1px solid var(--red); }
.badge-withdrawn { background: var(--bg-soft); color: var(--dim); border: 1px solid var(--border); }
.badge-revoked   { background: var(--red-soft); color: var(--red-bright); border: 1px solid var(--red); }
.badge-suspended { background: var(--red-soft); color: var(--red-bright); border: 1px solid var(--red); }

/* ---------- HERO ---------- */
.hero {
  text-align: center;
  padding: 56px 28px;
  background:
    radial-gradient(ellipse at top, var(--accent-glow) 0%, transparent 60%),
    linear-gradient(135deg, var(--bg-card) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(45deg, transparent, transparent 80px, rgba(212,175,55,0.025) 80px, rgba(212,175,55,0.025) 81px),
    repeating-linear-gradient(-45deg, transparent, transparent 80px, rgba(212,175,55,0.025) 80px, rgba(212,175,55,0.025) 81px);
  pointer-events: none;
}
.hero > * { position: relative; }
.hero .crest {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  filter: drop-shadow(0 4px 16px var(--accent-glow));
}
.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  margin: 0 0 12px;
  color: var(--bright);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.hero h1 .accent {
  color: var(--accent);
}
.hero .motd {
  color: var(--text-soft);
  font-style: italic;
  font-size: 16px;
  margin: 0 0 28px;
  font-family: var(--font-serif);
}
.hero .status-line {
  margin: 24px 0;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.hero .players {
  color: var(--bright);
  font-weight: 700;
  font-family: var(--font-mono);
}

.hero-compact {
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-soft) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  text-align: center;
}
.hero-compact h1 { margin: 0; }
.hero-compact .subtitle { color: var(--text-soft); margin-top: 8px; font-family: var(--font-serif); font-style: italic; }

/* ---------- GRID ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; margin-bottom: 24px; }

.stat-tile { text-align: center; }
.stat-tile .stat-value {
  font-size: 36px;
  color: var(--bright);
  font-weight: 800;
  margin: 8px 0;
  font-family: var(--font-mono);
}
.stat-tile .stat-label {
  color: var(--dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

/* ---------- FORMS ---------- */
form { margin: 0; }
label {
  display: block;
  color: var(--text-soft);
  font-size: 13px;
  margin-bottom: 6px;
  font-weight: 600;
}
label.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  padding: 10px 0;
  font-weight: 500;
}
label.checkbox input {
  width: auto;
  margin-top: 3px;
}
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"], textarea, select {
  width: 100%;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 11px 14px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.15s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.field { margin-bottom: 18px; }
.field .help {
  font-size: 12px;
  color: var(--dim);
  margin-top: 6px;
  line-height: 1.5;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-soft) 100%);
  color: var(--bg-deep);
  padding: 11px 24px;
  border-radius: 6px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.25);
  transition: all 0.15s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
  filter: brightness(1.1);
  text-decoration: none;
}
.btn:active { transform: translateY(0); }
.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover { background: var(--bg-card-hover); color: var(--bright); }
.btn-danger {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-bright) 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(201, 42, 42, 0.3);
}
.btn-danger:hover { box-shadow: 0 4px 16px rgba(201, 42, 42, 0.5); }
.btn-small { padding: 6px 14px; font-size: 12px; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---------- ALERTS ---------- */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  border-left: 4px solid;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert::before {
  font-size: 18px;
  line-height: 1;
}
.alert-success { background: var(--green-soft); border-color: var(--green-bright); color: var(--green-bright); }
.alert-success::before { content: '✓'; }
.alert-error { background: var(--red-soft); border-color: var(--red); color: #ffb0b0; }
.alert-error::before { content: '✕'; }
.alert-warning { background: var(--warn-soft); border-color: var(--warn); color: #ffc890; }
.alert-warning::before { content: '⚠'; }
.alert-info { background: rgba(74, 120, 199, 0.15); border-color: var(--blue); color: var(--blue-bright); }
.alert-info::before { content: 'ℹ'; }

/* ---------- TABLES ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  color: var(--dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  background: var(--bg-deep);
}
tr:hover td { background: var(--bg-soft); }
tr:last-child td { border-bottom: 0; }

/* ---------- NOTIF ---------- */
.notif-item {
  padding: 14px 16px;
  border-left: 3px solid var(--blue);
  background: var(--bg-card);
  margin-bottom: 10px;
  border-radius: 0 var(--radius) var(--radius) 0;
  transition: background 0.15s ease;
}
.notif-item:hover { background: var(--bg-card-hover); }
.notif-item.unread {
  border-left-color: var(--accent);
  background: var(--bg-soft);
}
.notif-item .notif-title { color: var(--bright); font-weight: 600; font-size: 15px; }
.notif-item .notif-meta { color: var(--dim); font-size: 11px; margin-top: 4px; }
.notif-item .notif-body { margin-top: 6px; font-size: 14px; color: var(--text-soft); }

/* ---------- DETAILS / SUMMARY ---------- */
details summary {
  list-style: none;
  padding: 10px 0;
  position: relative;
  padding-left: 24px;
}
details summary::before {
  content: '▶';
  position: absolute;
  left: 0;
  top: 10px;
  font-size: 10px;
  color: var(--accent);
  transition: transform 0.15s ease;
}
details[open] summary::before { transform: rotate(90deg); }
details summary::-webkit-details-marker { display: none; }

/* ---------- ICONS / LOGO SVG ---------- */
.shield-icon {
  width: 64px;
  height: 64px;
  fill: var(--accent);
  filter: drop-shadow(0 2px 8px var(--accent-glow));
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 720px) {
  body { font-size: 14px; }
  header.site-header { padding: 10px 16px; }
  header.site-header .logo { font-size: 22px; }
  header.site-header nav { gap: 0; margin-left: 0; width: 100%; justify-content: flex-start; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  header.site-header nav a { padding: 6px 10px; font-size: 13px; white-space: nowrap; }
  main.site-main { padding: 0 16px; margin: 16px auto; }
  .card { padding: 18px 20px; border-radius: var(--radius); }
  .hero { padding: 32px 20px; }
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  .grid-3, .grid-2 { gap: 12px; }
  .stat-tile .stat-value { font-size: 28px; }
}
