/* ====================================================================
   ADMIN GÉNÉRALE — style NEUTRE et sobre (indépendant des thèmes festifs).
   Interface de gestion : claire, professionnelle, sans effets rétro.
   ==================================================================== */
:root {
  --a-bg: #f4f5f7;
  --a-surface: #ffffff;
  --a-border: #e2e5ea;
  --a-ink: #1f2430;
  --a-text: #1f2430;  /* alias pour compatibilité pages légales */
  --a-muted: #6b7280;
  --a-accent: #3b6ef5;
  --a-accent-ink: #ffffff;
  --a-accent-soft: #eef2ff;
  --a-ok: #1f9d57;
  --a-danger: #d63a3a;
  --a-radius: 10px;
  --a-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--a-bg);
  color: var(--a-ink);
  font-family: var(--a-font);
  font-size: 15px;
  line-height: 1.5;
}

.admin-wrap { max-width: 920px; margin: 0 auto; padding: 28px 20px 60px; }

h1 { font-size: 24px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 17px; font-weight: 700; margin: 0 0 14px; }
h3 { font-size: 15px; font-weight: 600; margin: 0 0 10px; }
.muted { color: var(--a-muted); }
.neon-pink, .neon-cyan, .neon-yellow { color: var(--a-ink); } /* neutralise les accents festifs */
a { color: var(--a-accent); text-decoration: none; }

.card {
  background: var(--a-surface);
  border: 1px solid var(--a-border);
  border-radius: var(--a-radius);
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
  padding: 18px 20px;
  margin: 16px 0;
}

.field { margin: 12px 0; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--a-muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 11px; font-family: var(--a-font); font-size: 15px;
  background: #fff; color: var(--a-ink);
  border: 1px solid var(--a-border); border-radius: 8px; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--a-accent); box-shadow: 0 0 0 3px var(--a-accent-soft); }

.btn {
  display: inline-block; font-family: var(--a-font); font-size: 14px; font-weight: 600;
  padding: 9px 16px; border-radius: 8px; border: 1px solid var(--a-accent);
  background: var(--a-accent); color: var(--a-accent-ink); cursor: pointer;
  transition: filter .12s, background .12s;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { filter: brightness(.95); }
.btn.secondary { background: #fff; color: var(--a-ink); border-color: var(--a-border); }
.btn.secondary:hover { background: #f8f9fb; }
.btn.warn { background: #fff; color: var(--a-ink); border-color: var(--a-border); }
.btn.danger { background: #fff; color: var(--a-danger); border-color: #f0c4c4; }
.btn.danger:hover { background: #fdf2f2; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > .field { flex: 1; min-width: 180px; }
.inline { display: flex; gap: 8px; align-items: center; }
.mt { margin-top: 14px; }

table.list { width: 100%; border-collapse: collapse; }
table.list td, table.list th { padding: 12px 8px; border-bottom: 1px solid var(--a-border); text-align: left; vertical-align: middle; }
table.list tr:last-child td { border-bottom: none; }

.tag {
  display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px;
  background: var(--a-accent-soft); color: var(--a-accent); border: none;
}

/* =====================================================================
   LAYOUT SIDEBAR
   ===================================================================== */
.admin-layout {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
}

/* --- Hamburger (mobile only) --- */
.hamburger {
  display: none;
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 1001;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: none;
  background: #1a1a1a;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(0,0,0,.4);
}

.sidebar {
  width: 228px;
  flex-shrink: 0;
  background: #111;
  border-right: 1px solid rgba(255,255,255,.08);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 18px 16px 14px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.08);
  letter-spacing: -.01em;
}

.sidebar-nav { flex: 1; padding: 8px 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: 13.5px;
  font-weight: 500;
  color: rgba(255,255,255,.55);
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  box-sizing: border-box;
  border-left: 3px solid transparent;
  transition: background .1s, color .1s;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: rgba(255,255,255,.1); color: #fff; font-weight: 600; border-left-color: var(--a-accent); }

.nav-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.25);
  padding: 14px 16px 4px;
}
.nav-divider {
  height: 1px;
  margin: 6px 16px;
  background: rgba(255,255,255,.08);
}
.sidebar-footer { border-top: 1px solid rgba(255,255,255,.08); padding: 6px 0; }
.sidebar-footer .nav-item { color: rgba(255,255,255,.45); }

.admin-main {
  flex: 1;
  min-width: 0;
  padding: 28px 32px 80px;
  overflow-x: hidden;
}

.admin-section { max-width: 860px; }

.section-title { font-size: 22px; font-weight: 700; margin: 0 0 4px; letter-spacing: -.01em; }

.login-overlay {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--a-bg);
}

/* Mobile : sidebar en overlay hamburger */
@media (max-width: 768px) {
  .hamburger { display: flex; }
  .admin-layout { flex-direction: column; }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    height: 100vh;
    width: 250px;
    transform: translateX(-100%);
    transition: transform .25s ease;
    border-right: 1px solid rgba(255,255,255,.08);
    box-shadow: 4px 0 20px rgba(0,0,0,.4);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop.open { display: block; }
  .admin-main {
    padding: 60px 14px 60px;
  }
  .admin-main .card { padding: 14px; }
}
