/* ============================================
   DASHBOARD.CSS — Layout sidebar + zone principale
   ============================================ */

/* ── Page login ──────────────────────────────────────────── */
#login-page {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(30,58,110,0.4) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(201,168,76,0.08) 0%, transparent 50%),
    var(--navy-900);
}

.login-card {
  width: 100%; max-width: 420px;
  background: var(--navy-800);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-lg), var(--shadow-gold);
  animation: fadeIn 0.5s ease;
}

.login-logo {
  text-align: center; margin-bottom: 2.5rem;
}
.login-logo .logo-icon {
  width: 60px; height: 60px; margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--navy-500), var(--navy-700));
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
}
.login-logo h1 {
  font-size: 1.8rem; color: var(--white);
  letter-spacing: -0.02em;
}
.login-logo h1 span { color: var(--gold-500); }
.login-logo p { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.3rem; }

/* ── Dashboard layout ────────────────────────────────────── */
#dashboard-page { display: flex; height: 100vh; overflow: hidden; }

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  height: 100vh;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

.sidebar::after {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 1px; height: 100%;
  background: linear-gradient(to bottom, transparent, var(--gold-500) 30%, var(--gold-500) 70%, transparent);
  opacity: 0.15;
}

.sidebar-brand {
  padding: 1.5rem 1.25rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.sidebar-brand .brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--navy-400), var(--navy-600));
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-md);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.1rem; margin-bottom: 0.6rem;
}
.sidebar-brand h2 {
  font-size: 1.15rem; color: var(--white); letter-spacing: -0.01em;
}
.sidebar-brand h2 span { color: var(--gold-500); }
.sidebar-brand p { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.1rem; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 1rem 0.75rem; }

.nav-section-label {
  font-size: 0.65rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted);
  padding: 0.5rem 0.5rem 0.3rem;
  margin-top: 0.75rem;
}

.nav-item {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.65rem 0.75rem; border-radius: var(--radius-md);
  color: var(--text-secondary); font-size: 0.875rem;
  cursor: pointer; transition: all var(--transition);
  margin-bottom: 2px; position: relative;
  border: 1px solid transparent;
}
.nav-item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--white);
}
.nav-item.active {
  background: linear-gradient(135deg, rgba(201,168,76,0.12), rgba(201,168,76,0.06));
  color: var(--gold-400);
  border-color: rgba(201,168,76,0.2);
}
.nav-item.active::before {
  content: '';
  position: absolute; left: -0.75rem; top: 50%; transform: translateY(-50%);
  width: 3px; height: 60%; background: var(--gold-500);
  border-radius: 0 2px 2px 0;
}
.nav-item .nav-icon { font-size: 1rem; width: 20px; text-align: center; flex-shrink: 0; }
.nav-item .nav-badge {
  margin-left: auto; font-size: 0.68rem;
  background: var(--navy-400); color: var(--gray-300);
  padding: 0.1rem 0.45rem; border-radius: 10px;
}

.sidebar-footer {
  padding: 1rem 0.75rem;
  border-top: 1px solid var(--border);
}
.user-info {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.6rem 0.75rem; border-radius: var(--radius-md);
  background: rgba(255,255,255,0.03);
}
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-300));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 600; color: var(--navy-900);
  flex-shrink: 0;
}
.user-name   { font-size: 0.8rem; font-weight: 500; }
.user-role   { font-size: 0.68rem; color: var(--text-muted); }
.logout-btn  {
  margin-left: auto; background: none; border: none;
  color: var(--text-muted); cursor: pointer; font-size: 1rem;
  transition: color var(--transition); padding: 0.2rem;
}
.logout-btn:hover { color: var(--error); }

/* ── Zone principale ─────────────────────────────────────── */
.main-content {
  flex: 1; overflow-y: auto;
  background: var(--bg-app);
  display: flex; flex-direction: column;
}

.page-header {
  padding: 1.75rem 2rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
  background: linear-gradient(to bottom, rgba(10,22,40,0.8), transparent);
}
.page-header h1 { font-size: 1.6rem; letter-spacing: -0.02em; }
.page-header h1 span { color: var(--gold-500); }
.page-header p { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.2rem; }

.page-body { padding: 1.75rem 2rem; flex: 1; }

/* ── Vue (section de page) ───────────────────────────────── */
.view { animation: fadeIn 0.3s ease; }
.view.hidden { display: none; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE MOBILE — Hamburger + Drawer + Layout adaptatif
   ══════════════════════════════════════════════════════════ */

/* ── Header mobile (caché sur desktop, visible sur mobile) ── */
.mobile-header {
  display: none; /* affiché via @media dans components.css */
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: rgba(10, 22, 40, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201,168,76,.15);
  padding: 0 1rem;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,.4);
}
.mobile-header::after {
  content: '';
  position: absolute; bottom: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,.3), transparent);
}
.mobile-header-brand {
  display: flex; align-items: center; gap: .6rem;
}
.mobile-brand-icon {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--navy-500), var(--navy-700));
  border: 1px solid rgba(201,168,76,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
}
.mobile-brand-name {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 600; color: var(--white);
  letter-spacing: -0.01em;
}
.mobile-brand-name span { color: var(--gold-400); }

/* ── Bouton hamburger ──────────────────────────────────────── */
.hamburger-btn {
  background: none; border: none; cursor: pointer;
  padding: .5rem;
  display: flex; flex-direction: column; gap: 5px;
  border-radius: 8px;
  transition: background .2s;
}
.hamburger-btn:hover  { background: rgba(255,255,255,.06); }
.hamburger-btn:active { background: rgba(201,168,76,.1); }
.hamburger-line {
  display: block;
  width: 22px; height: 2px;
  background: var(--gray-300);
  border-radius: 2px;
  transition: all .3s cubic-bezier(.4,0,.2,1);
}
.hamburger-btn.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--gold-400);
}
.hamburger-btn.active .hamburger-line:nth-child(2) {
  opacity: 0; transform: scaleX(0);
}
.hamburger-btn.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--gold-400);
}

/* ── Drawer (caché sur desktop) ───────────────────────────── */
.drawer-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(6, 13, 26, 0.75);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  transition: opacity .35s ease;
}
.drawer-overlay.active { opacity: 1; }

.drawer {
  position: fixed;
  top: 0; left: 0;
  width: min(300px, 85vw);
  height: 100vh;
  background: var(--navy-800);
  border-right: 1px solid rgba(201,168,76,.15);
  z-index: 999;
  display: flex; flex-direction: column;
  transform: translateX(-100%);
  transition: transform .38s cubic-bezier(.4,0,.2,1);
  box-shadow: 4px 0 40px rgba(0,0,0,.6);
}
.drawer.open { transform: translateX(0); }

/* Ligne or décorative sur le bord droit */
.drawer::after {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 1px; height: 100%;
  background: linear-gradient(to bottom,
    transparent,
    rgba(201,168,76,.3) 20%,
    rgba(201,168,76,.3) 80%,
    transparent);
}

/* ── Header du drawer ──────────────────────────────────────── */
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem 1.25rem 1.2rem;
  border-bottom: 1px solid rgba(201,168,76,.1);
  flex-shrink: 0;
}
.drawer-brand { display: flex; align-items: center; gap: .75rem; }
.drawer-brand-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--navy-500), var(--navy-700));
  border: 1px solid rgba(201,168,76,.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.drawer-brand-title {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 600; color: var(--white);
  line-height: 1.1;
}
.drawer-brand-title span { color: var(--gold-400); }
.drawer-brand-sub {
  font-size: .65rem; color: var(--text-muted);
  margin-top: .15rem;
}
.drawer-close-btn {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  color: var(--gray-400); cursor: pointer;
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
  transition: all .2s ease;
  flex-shrink: 0;
}
.drawer-close-btn:hover {
  background: rgba(224,92,92,.15);
  border-color: rgba(224,92,92,.3);
  color: var(--error);
}

/* ── Nav du drawer ─────────────────────────────────────────── */
.drawer-nav {
  flex: 1; overflow-y: auto;
  padding: 1rem .75rem;
}
.drawer-section-label {
  font-size: .63rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-muted);
  padding: .6rem .5rem .3rem;
  display: block; margin-top: .5rem;
}
.drawer-nav-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem .9rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary); font-size: .9rem;
  cursor: pointer;
  transition: all .2s ease;
  margin-bottom: 2px;
  border: 1px solid transparent;
  position: relative;
}
.drawer-nav-item:hover {
  background: rgba(255,255,255,.05);
  color: var(--white);
}
.drawer-nav-item.active {
  background: linear-gradient(135deg, rgba(201,168,76,.12), rgba(201,168,76,.05));
  color: var(--gold-400);
  border-color: rgba(201,168,76,.2);
}
.drawer-nav-item.active::before {
  content: '';
  position: absolute; left: -.75rem; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--gold-500);
  border-radius: 0 2px 2px 0;
}
.drawer-nav-icon { font-size: 1.05rem; width: 22px; text-align: center; flex-shrink: 0; }
.drawer-nav-badge {
  margin-left: auto; font-size: .68rem;
  background: var(--navy-400); color: var(--gray-300);
  padding: .1rem .45rem; border-radius: 10px; flex-shrink: 0;
}

/* ── Footer du drawer ──────────────────────────────────────── */
.drawer-footer {
  padding: 1rem .75rem;
  border-top: 1px solid rgba(201,168,76,.1);
  flex-shrink: 0;
}
.drawer-user-info {
  display: flex; align-items: center; gap: .65rem;
  padding: .65rem .75rem; border-radius: var(--radius-md);
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.05);
}
.drawer-user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-300));
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; font-weight: 600; color: var(--navy-900);
  flex-shrink: 0;
}
.drawer-user-details { flex: 1; min-width: 0; }
.drawer-user-name { font-size: .82rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-user-role { font-size: .68rem; color: var(--text-muted); }
.drawer-logout-btn {
  background: none; border: none;
  color: var(--text-muted); cursor: pointer; font-size: 1.1rem;
  transition: color .2s; padding: .2rem;
  flex-shrink: 0;
}
.drawer-logout-btn:hover { color: var(--error); }

/* ══════════════════════════════════════════════════════════
   SPLASH SCREEN
   ══════════════════════════════════════════════════════════ */
#splash-screen {
  position: fixed;
  inset: 0;
  background: var(--navy-900, #060d1a);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: splashFadeOut 0.6s ease forwards 2s;
}
@keyframes splashFadeOut {
  0%   { opacity: 1; pointer-events: all; }
  100% { opacity: 0; pointer-events: none; display: none; }
}
.splash-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  animation: splashIn 0.7s ease forwards;
}
@keyframes splashIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.splash-logo {
  width: 130px;
  height: 130px;
  object-fit: contain;
  border-radius: 50%;
  box-shadow: 0 0 60px rgba(201,168,76,0.35);
  animation: splashGlow 2s ease-in-out infinite alternate;
}
@keyframes splashGlow {
  from { box-shadow: 0 0 30px rgba(201,168,76,0.2); }
  to   { box-shadow: 0 0 70px rgba(201,168,76,0.5); }
}
.splash-text {
  text-align: center;
}
.splash-text h1 {
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--white, #fff);
  letter-spacing: 0.01em;
  margin-bottom: 0.3rem;
}
.splash-text p {
  font-size: 1rem;
  color: var(--gold-400, #c9a84c);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

/* ══════════════════════════════════════════════════════════
   LOGIN — Logo cabinet
   ══════════════════════════════════════════════════════════ */
.login-logo-img {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: 50%;
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 24px rgba(201,168,76,0.25);
}

/* ══════════════════════════════════════════════════════════
   SIDEBAR DESKTOP — Logo cabinet
   ══════════════════════════════════════════════════════════ */
.sidebar-cabinet-logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
  border-radius: 50%;
  margin: 0 auto 0.6rem;
  display: block;
  box-shadow: 0 4px 20px rgba(201,168,76,0.2);
}
.sidebar-cabinet-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-400, #c9a84c);
  text-align: center;
  line-height: 1.3;
  width: 100%;
}
.sidebar-cabinet-name span { color: var(--gold-400, #c9a84c); }
.sidebar-cabinet-sub {
  font-size: 0.72rem;
  color: var(--gold-400, #c9a84c);
  text-align: center;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
  width: 100%;
}
.sidebar-divider {
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,0.3), transparent);
  margin: 0.5rem auto 0.75rem;
}

/* ══════════════════════════════════════════════════════════
   MOBILE HEADER — Logo cabinet
   ══════════════════════════════════════════════════════════ */
.mobile-brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
}
.mobile-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.mobile-brand-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gold-400, #c9a84c);
}
.mobile-brand-name span { color: var(--gold-400, #c9a84c); }
.mobile-brand-sub {
  font-size: 0.65rem;
  color: var(--gold-400, #c9a84c);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════
   DRAWER — Logo cabinet
   ══════════════════════════════════════════════════════════ */
.drawer-brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(201,168,76,0.2);
}
.drawer-brand-title span { color: var(--gold-400, #c9a84c); }
