/*
  Admin back-office (R13). Custom admin in plain Rails + Tailwind — NO Avo
  (explicit client decision). This file holds only the small set of structural
  hooks the back-office shell needs (fixed sidebar, scroll area, sidebar active
  state). Everything visual is Tailwind utilities in the views — zero inline CSS.
  Brand: gold accents on a clean neutral chrome (NOT the public premium navbar).
*/
:root {
  --admin-sidebar-w: 248px;
  --admin-gold: var(--gold-primary);
  --admin-gold-soft: var(--gold-100);
  --admin-ink: #1A1A18;
}

/* Shell ------------------------------------------------------------------ */
.admin-shell {
  min-height: 100vh;
  background: #F6F5F1;
}

.admin-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--admin-sidebar-w);
  background: var(--admin-ink);
  display: flex;
  flex-direction: column;
}

.admin-main {
  margin-left: var(--admin-sidebar-w);
  min-height: 100vh;
}

/* Mobile: the fixed 248px sidebar otherwise squeezes the content to ~150px and
   clips it. Stack the sidebar as a full-width block at the top and give the
   content the full width below it. */
@media (max-width: 900px) {
  .admin-sidebar {
    position: static;
    width: 100%;
    height: auto;
  }
  /* Keep the nav compact on mobile: links flow in a horizontal wrap row. */
  .admin-sidebar nav { flex-direction: row; flex-wrap: wrap; flex: 0 0 auto; }
  .admin-nav-link { white-space: nowrap; }
  .admin-main { margin-left: 0; }
}

/* Sidebar nav links ------------------------------------------------------ */
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.admin-nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.admin-nav-link.is-active {
  background: linear-gradient(135deg, rgba(196, 165, 89, 0.22), rgba(196, 165, 89, 0.10));
  color: var(--gold-100);
  box-shadow: inset 2px 0 0 var(--admin-gold);
}
.admin-nav-link .admin-nav-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.admin-nav-section {
  padding: 14px 14px 6px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.32);
}

/* Metric cards : plus de style local, les compteurs du back-office utilisent la
   carte KPI du design system (`ds-kpi-card`), comme les maquettes admin. */

/* Pagination ------------------------------------------------------------- */
/* Retour client 06/08 vague 2 (T4) : toutes les listes du back-office sont
   paginées. Barre sobre, l'accent doré marque la page courante. */
.admin-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid hsl(var(--brand-neutral-200));
  border-radius: var(--r-sm);
  background: #fff;
  font-size: 13px;
  font-weight: 500;
  color: hsl(var(--brand-neutral-600));
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.admin-page-link:hover {
  background: hsl(var(--brand-neutral-50));
  color: hsl(var(--brand-neutral-black));
}
.admin-page-link.is-current {
  border-color: var(--admin-gold);
  background: var(--gold-fill, var(--admin-gold));
  /* Règle de marque (T2) : écriture BLANCHE sur fond doré. */
  color: var(--on-gold, #fff);
  text-shadow: var(--on-gold-shadow, 0 1px 2px rgba(60, 44, 10, 0.45));
  font-weight: 600;
}
.admin-page-link.is-disabled {
  color: hsl(var(--brand-neutral-300));
  background: #fff;
  cursor: default;
}

/* Tables ----------------------------------------------------------------- */
/* Alignement sur les maquettes admin (210/211) : en-tête de tableau sur fond
   doré clair plutôt que gris neutre. */
.admin-table-head {
  background: hsl(var(--brand-gold-50));
}
