/*

 */

/* ─── Variables ─────────────────────────────────────────────── */
:root {
  --mustard:       #c9a227;
  --mustard-dark:  #a8841e;
  --mustard-light: #fdf8ee;
  --white:         #ffffff;
  --bg:            #f4f5f7;
  --sidebar-width: 250px;
  --text:          #2d2d2d;
  --text-muted:    #888;
  --border:        #e5e7eb;
  --radius:        6px;
  --shadow:        0 1px 3px rgba(0,0,0,.08);
}

/* ─── Reset / Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--mustard); text-decoration: none; }

/* ─── Sidebar ────────────────────────────────────────────────── */
.admin-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Scrollbar fine */
.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-track { background: transparent; }
.admin-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* Brand */
.admin-brand {
  padding: 20px 20px 18px;
  border-bottom: 2px solid var(--mustard);
  flex-shrink: 0;
}
.admin-brand-text {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--mustard);
  letter-spacing: 3px;
}
.admin-brand-sub {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Nav */
.admin-nav {
  flex: 1;
  padding: 8px 0;
}

/* Section title */
.nav-section-title {
  padding: 16px 20px 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
}

/* Nav items */
.admin-nav-item {
  display: flex;
  align-items: center;
  padding: 9px 20px;
  color: var(--text);
  font-size: 13px;
  font-weight: 400;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s, border-color .15s;
  cursor: pointer;
  white-space: nowrap;
}
.admin-nav-item:hover {
  background: var(--mustard-light);
  color: var(--mustard);
  border-left-color: var(--mustard);
  text-decoration: none;
}
.admin-nav-item.active {
  background: var(--mustard);
  color: var(--white) !important;
  border-left-color: var(--mustard-dark);
  font-weight: 600;
}
.admin-nav-item.active:hover {
  background: var(--mustard-dark);
  color: var(--white);
}
.nav-icon {
  width: 18px;
  margin-right: 10px;
  font-size: 13px;
  text-align: center;
  opacity: .7;
  flex-shrink: 0;
}
.admin-nav-item.active .nav-icon { opacity: 1; }

/* Footer / logout */
.admin-sidebar-footer {
  border-top: 1px solid var(--border);
  padding: 8px 0;
  flex-shrink: 0;
}
.admin-logout {
  color: #e53e3e !important;
}
.admin-logout:hover {
  background: #fff5f5;
  color: #c53030 !important;
  border-left-color: #e53e3e;
}

/* ─── Main content ───────────────────────────────────────────── */
.admin-content {
  min-height: 100vh;
  background: var(--bg);
  padding: 30px 32px;
}
.admin-content.with-sidebar {
  margin-left: var(--sidebar-width);
}
.admin-content.no-sidebar {
  margin-left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── Footer ─────────────────────────────────────────────────── */
.admin-footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 14px 32px;
  font-size: 12px;
  color: var(--text-muted);
  margin-left: var(--sidebar-width);
}
.admin-footer.no-sidebar {
  margin-left: 0;
  text-align: center;
}

/* ─── Page header (titre de page) ───────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

/* ─── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  border-radius: var(--radius) var(--radius) 0 0;
  font-weight: 600;
  font-size: 14px;
}
.card-body {
  padding: 20px;
}

/* ─── Tables ─────────────────────────────────────────────────── */
.table {
  font-size: 13px;
  background: var(--white);
}
.table thead th {
  background: var(--bg);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .8px;
  border-bottom: 2px solid var(--border);
  border-top: none;
  padding: 12px 16px;
}
.table td {
  padding: 12px 16px;
  vertical-align: middle;
  border-top: 1px solid var(--border);
  color: var(--text);
}
.table tbody tr:hover { background: var(--mustard-light); }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius);
  padding: 7px 16px;
  transition: all .15s;
}
.btn-primary {
  background-color: var(--mustard) !important;
  border-color: var(--mustard) !important;
  color: var(--white) !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--mustard-dark) !important;
  border-color: var(--mustard-dark) !important;
}
.btn-outline-primary {
  color: var(--mustard) !important;
  border-color: var(--mustard) !important;
}
.btn-outline-primary:hover {
  background-color: var(--mustard) !important;
  color: var(--white) !important;
}
.btn-danger  { font-size: 13px; }
.btn-warning { font-size: 13px; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* ─── Forms ──────────────────────────────────────────────────── */
.form-control {
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
  border-color: var(--mustard);
  box-shadow: 0 0 0 3px rgba(201,162,39,.15);
  outline: none;
}
label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 5px;
}
.form-group { margin-bottom: 18px; }

/* ─── Badges ─────────────────────────────────────────────────── */
.badge-primary { background-color: var(--mustard) !important; color: var(--white); }
.badge-success { background-color: #38a169; color: var(--white); }
.badge-danger  { background-color: #e53e3e; color: var(--white); }
.badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
}

/* ─── Alerts / Flash ─────────────────────────────────────────── */
.flash-container {
  margin-bottom: 20px;
}
.alert {
  border-radius: var(--radius);
  font-size: 13px;
  padding: 12px 16px;
  border: none;
}
.alert-notice, .alert-success {
  background: #f0fff4;
  color: #276749;
  border-left: 3px solid #38a169;
}
.alert-alert, .alert-danger {
  background: #fff5f5;
  color: #c53030;
  border-left: 3px solid #e53e3e;
}

/* ─── Login page ─────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.login-card {
  width: 380px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
  padding: 40px;
}
.login-logo {
  text-align: center;
  margin-bottom: 28px;
}
.login-logo-text {
  font-size: 32px;
  font-weight: 700;
  color: var(--mustard);
  letter-spacing: 4px;
}
.login-title {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 4px;
}

/* ─── Utilities ──────────────────────────────────────────────── */
.text-mustard { color: var(--mustard) !important; }
.bg-mustard   { background-color: var(--mustard) !important; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
