/* ══════════════════════════════════════════════════════════════════
   PARISIAN DRIVE — ADMIN THEME (AdminLTE style)
   Fichier séparé, n'affecte PAS le CSS public (styles.css)
   ══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600;700&display=swap');

:root {
  --adm-sidebar-bg:     #1a2035;
  --adm-sidebar-hover:  #252d48;
  --adm-sidebar-active: #c8a45a;
  --adm-sidebar-w:      260px;
  --adm-sidebar-w-col:  68px;
  --adm-topbar-bg:      #ffffff;
  --adm-topbar-h:       56px;
  --adm-body-bg:        #f0f2f8;
  --adm-card-bg:        #ffffff;
  --adm-gold:           #c8a45a;
  --adm-text:           #1e293b;
  --adm-muted:          #64748b;
  --adm-border:         #e2e8f0;
  --adm-radius:         10px;
  --adm-shadow:         0 2px 12px rgba(0,0,0,.08);
  --adm-shadow-lg:      0 8px 32px rgba(0,0,0,.12);
  --adm-danger:         #ef4444;
  --adm-success:        #22c55e;
  --adm-info:           #3b82f6;
  --adm-warning:        #f59e0b;
}

*, *::before, *::after { box-sizing: border-box; }

body.adm {
  margin: 0;
  font-family: 'Source Sans 3', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  color: var(--adm-text);
  background: var(--adm-body-bg);
  min-height: 100vh;
}

/* ── Topbar ──────────────────────────────────────────────────────── */
.adm-topbar {
  position: fixed; top: 0; left: var(--adm-sidebar-w); right: 0;
  height: var(--adm-topbar-h); z-index: 100;
  background: var(--adm-topbar-bg);
  border-bottom: 1px solid var(--adm-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: left .25s;
}
body.adm.collapsed .adm-topbar { left: var(--adm-sidebar-w-col); }

.adm-topbar__left { display: flex; align-items: center; gap: 14px; }
.adm-topbar__right { display: flex; align-items: center; gap: 10px; }

.adm-toggle {
  width: 36px; height: 36px; border-radius: 8px;
  border: none; background: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--adm-muted); font-size: 18px;
  transition: background .15s;
}
.adm-toggle:hover { background: var(--adm-body-bg); }

.adm-breadcrumb {
  font-size: 13px; color: var(--adm-muted);
  display: flex; align-items: center; gap: 6px;
}
.adm-breadcrumb strong { color: var(--adm-text); font-weight: 700; }

.adm-user-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--adm-body-bg);
  font-size: 13px; font-weight: 600; color: var(--adm-text);
}
.adm-user-pill .avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--adm-gold);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #111;
}

.adm-btn-top {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  border: 1px solid var(--adm-border);
  background: #fff; color: var(--adm-muted);
  cursor: pointer; text-decoration: none;
  transition: background .15s, color .15s;
}
.adm-btn-top:hover { background: var(--adm-body-bg); color: var(--adm-text); }
.adm-btn-top.danger:hover { background: #fef2f2; color: var(--adm-danger); border-color: #fca5a5; }

/* ── Sidebar ─────────────────────────────────────────────────────── */
.adm-sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--adm-sidebar-w); z-index: 200;
  background: var(--adm-sidebar-bg);
  display: flex; flex-direction: column;
  transition: width .25s;
  overflow: hidden;
}
body.adm.collapsed .adm-sidebar { width: var(--adm-sidebar-w-col); }

/* Logo */
.adm-logo {
  height: var(--adm-topbar-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  flex-shrink: 0;
  overflow: hidden;
  white-space: nowrap;
}
.adm-logo__icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--adm-gold);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 16px; font-weight: 900; color: #111;
}
.adm-logo__text {
  font-weight: 700; font-size: 15px; color: #fff;
  letter-spacing: .04em;
  transition: opacity .2s;
}
body.adm.collapsed .adm-logo__text { opacity: 0; pointer-events: none; }

/* Nav */
.adm-nav {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 12px 0;
}
.adm-nav::-webkit-scrollbar { width: 4px; }
.adm-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 2px; }

.adm-nav__section {
  padding: 14px 18px 6px;
  font-size: 10px; font-weight: 700; letter-spacing: .1em;
  color: rgba(255,255,255,.3); text-transform: uppercase;
  white-space: nowrap;
  transition: opacity .2s;
}
body.adm.collapsed .adm-nav__section { opacity: 0; }

.adm-nav__item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: 13.5px; font-weight: 600;
  border-left: 3px solid transparent;
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
  position: relative;
}
.adm-nav__item:hover {
  background: var(--adm-sidebar-hover);
  color: rgba(255,255,255,.9);
}
.adm-nav__item.active {
  background: rgba(200,164,90,.12);
  color: var(--adm-gold);
  border-left-color: var(--adm-gold);
}
.adm-nav__item .nav-icon {
  width: 20px; text-align: center; font-size: 15px; flex-shrink: 0;
}
.adm-nav__item .nav-label { transition: opacity .2s; }
body.adm.collapsed .adm-nav__item .nav-label { opacity: 0; pointer-events: none; }

/* Tooltip en mode collapsed */
body.adm.collapsed .adm-nav__item:hover::after {
  content: attr(data-label);
  position: absolute; left: calc(var(--adm-sidebar-w-col) + 8px); top: 50%;
  transform: translateY(-50%);
  background: #1a2035; color: #fff;
  padding: 5px 10px; border-radius: 6px;
  font-size: 12px; font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--adm-shadow-lg);
  pointer-events: none;
  z-index: 999;
}

.adm-nav__badge {
  margin-left: auto;
  background: var(--adm-gold); color: #111;
  border-radius: 999px; font-size: 10px; font-weight: 700;
  padding: 1px 7px; min-width: 18px; text-align: center;
  transition: opacity .2s;
}
body.adm.collapsed .adm-nav__badge { opacity: 0; }

/* Footer sidebar */
.adm-sidebar__footer {
  padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,.07);
  font-size: 11px; color: rgba(255,255,255,.25);
  white-space: nowrap;
  transition: opacity .2s;
}
body.adm.collapsed .adm-sidebar__footer { opacity: 0; }

/* ── Main content ────────────────────────────────────────────────── */
.adm-content {
  margin-left: var(--adm-sidebar-w);
  padding-top: var(--adm-topbar-h);
  min-height: 100vh;
  transition: margin-left .25s;
}
body.adm.collapsed .adm-content { margin-left: var(--adm-sidebar-w-col); }

.adm-page {
  padding: 24px 24px 40px;
}

.adm-page-header {
  margin-bottom: 20px;
}
.adm-page-title {
  font-size: 20px; font-weight: 700; color: var(--adm-text);
  margin: 0 0 4px;
}
.adm-page-sub {
  font-size: 13px; color: var(--adm-muted);
}

/* ── Stat Cards ──────────────────────────────────────────────────── */
.adm-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.adm-stat-card {
  background: var(--adm-card-bg);
  border-radius: var(--adm-radius);
  padding: 18px 20px;
  box-shadow: var(--adm-shadow);
  display: flex; align-items: center; gap: 16px;
  border-left: 4px solid transparent;
}
.adm-stat-card.gold   { border-left-color: var(--adm-gold); }
.adm-stat-card.blue   { border-left-color: var(--adm-info); }
.adm-stat-card.green  { border-left-color: var(--adm-success); }
.adm-stat-card.red    { border-left-color: var(--adm-danger); }

.adm-stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.adm-stat-card.gold  .adm-stat-icon { background: rgba(200,164,90,.12); color: var(--adm-gold); }
.adm-stat-card.blue  .adm-stat-icon { background: rgba(59,130,246,.1);  color: var(--adm-info); }
.adm-stat-card.green .adm-stat-icon { background: rgba(34,197,94,.1);   color: var(--adm-success); }
.adm-stat-card.red   .adm-stat-icon { background: rgba(239,68,68,.1);   color: var(--adm-danger); }

.adm-stat-info { flex: 1; }
.adm-stat-val  { font-size: 26px; font-weight: 700; line-height: 1; color: var(--adm-text); }
.adm-stat-lbl  { font-size: 12px; color: var(--adm-muted); margin-top: 4px; font-weight: 600; }

/* ── Card ────────────────────────────────────────────────────────── */
.adm-card {
  background: var(--adm-card-bg);
  border-radius: var(--adm-radius);
  box-shadow: var(--adm-shadow);
  overflow: hidden;
  margin-bottom: 20px;
}
.adm-card-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--adm-border);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.adm-card-title {
  font-size: 14px; font-weight: 700; color: var(--adm-text);
  display: flex; align-items: center; gap: 8px;
}
.adm-card-title i { color: var(--adm-gold); }
.adm-card-body { padding: 18px; }

/* ── Table ───────────────────────────────────────────────────────── */
.adm-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.adm-table thead tr { background: #f8fafc; }
.adm-table th {
  padding: 10px 14px; text-align: left;
  font-weight: 700; font-size: 11px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--adm-muted);
  border-bottom: 1px solid var(--adm-border);
  white-space: nowrap;
}
.adm-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(226,232,240,.5);
  color: var(--adm-text); vertical-align: middle;
}
.adm-table tr:last-child td { border-bottom: none; }
.adm-table tbody tr:hover td { background: #f8fafc; }

/* ── Badge status ────────────────────────────────────────────────── */
.adm-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.adm-badge.pending  { background: rgba(245,158,11,.12); color: #92400e; }
.adm-badge.new      { background: rgba(59,130,246,.12);  color: #1e40af; }
.adm-badge.done     { background: rgba(34,197,94,.12);   color: #166534; }
.adm-badge.gold     { background: rgba(200,164,90,.15);  color: #7a5c22; }

/* ── Form elements ───────────────────────────────────────────────── */
.adm-label {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--adm-muted); margin-bottom: 6px;
}
.adm-input {
  width: 100%; padding: 10px 12px;
  border: 1.5px solid var(--adm-border);
  border-radius: 8px; font-size: 13px; font-weight: 500;
  font-family: inherit; outline: none; background: #fff;
  color: var(--adm-text); transition: border-color .15s, box-shadow .15s;
}
.adm-input:focus {
  border-color: var(--adm-gold);
  box-shadow: 0 0 0 3px rgba(200,164,90,.15);
}
.adm-textarea { resize: vertical; min-height: 80px; }

.adm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.adm-form-group { margin-bottom: 14px; }

.adm-hint { font-size: 11px; color: var(--adm-muted); margin-top: 5px; line-height: 1.5; }

/* ── Buttons ─────────────────────────────────────────────────────── */
.adm-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 700; font-family: inherit;
  border: 1.5px solid transparent; cursor: pointer;
  text-decoration: none; transition: all .15s;
}
.adm-btn-primary { background: var(--adm-gold); color: #111; border-color: var(--adm-gold); }
.adm-btn-primary:hover { background: #b8943e; border-color: #b8943e; }
.adm-btn-secondary { background: #fff; color: var(--adm-text); border-color: var(--adm-border); }
.adm-btn-secondary:hover { background: var(--adm-body-bg); }
.adm-btn-danger { background: #fef2f2; color: var(--adm-danger); border-color: #fca5a5; }
.adm-btn-danger:hover { background: var(--adm-danger); color: #fff; }
.adm-btn-sm { padding: 6px 11px; font-size: 12px; }

/* ── Notices ─────────────────────────────────────────────────────── */
.adm-notice {
  padding: 12px 16px; border-radius: 8px;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.adm-notice.ok      { background: #f0fdf4; border: 1px solid #86efac; color: #166534; }
.adm-notice.err     { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }
.adm-notice.warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.adm-notice.info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* ── Fieldset ────────────────────────────────────────────────────── */
.adm-fieldset {
  border: 1.5px solid var(--adm-border);
  border-radius: var(--adm-radius);
  padding: 18px;
  margin-bottom: 20px;
}
.adm-fieldset legend {
  padding: 0 8px;
  font-size: 13px; font-weight: 700; color: var(--adm-text);
  display: flex; align-items: center; gap: 8px;
}
.adm-fieldset legend i { color: var(--adm-gold); }

/* ── Code block ──────────────────────────────────────────────────── */
.adm-code {
  background: #1e293b; color: #e2e8f0;
  padding: 4px 10px; border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 12px; word-break: break-all;
  display: inline-block;
}

/* ── Login page ──────────────────────────────────────────────────── */
.adm-login-wrap {
  min-height: 100vh;
  background: var(--adm-sidebar-bg);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.adm-login-card {
  background: #fff; border-radius: 16px;
  padding: 36px 32px;
  width: 100%; max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.adm-login-logo {
  text-align: center; margin-bottom: 28px;
}
.adm-login-logo .logo-icon {
  width: 56px; height: 56px; border-radius: 14px;
  background: var(--adm-gold);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 900; color: #111;
  margin-bottom: 10px;
}
.adm-login-logo h1 { margin: 0; font-size: 18px; font-weight: 700; color: var(--adm-text); }
.adm-login-logo p  { margin: 4px 0 0; font-size: 13px; color: var(--adm-muted); }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .adm-sidebar { transform: translateX(-100%); }
  body.adm.mob-open .adm-sidebar { transform: translateX(0); }
  .adm-topbar  { left: 0 !important; }
  .adm-content { margin-left: 0 !important; }
  .adm-row     { grid-template-columns: 1fr; }
  .adm-stats   { grid-template-columns: 1fr 1fr; }
}

/* ── Status badge dropdown ───────────────────────────────────────── */
.status-wrap { position: relative; display: inline-block; }
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  cursor: pointer; border: none; background: none;
  transition: opacity .15s, transform .1s;
  white-space: nowrap;
}
.status-badge:hover { opacity: .82; transform: scale(1.03); }
.status-badge .sb-chev { font-size: 9px; opacity: .7; }
.status-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 190px; z-index: 999;
  background: #fff; border: 1.5px solid rgba(226,232,240,.98);
  border-radius: 12px; padding: 5px;
  box-shadow: 0 12px 32px rgba(15,23,42,.13), 0 2px 8px rgba(15,23,42,.07);
  display: none;
}
.status-dropdown.open { display: block; animation: sdDrop .14s ease; }
@keyframes sdDrop { from{opacity:0;transform:translateY(-4px)} to{opacity:1;transform:translateY(0)} }
.status-option {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 8px; cursor: pointer;
  font-size: 12px; font-weight: 700; text-decoration: none;
  transition: background .1s;
}
.status-option:hover { background: #f8fafc; }
.status-option .so-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}

/* ── Status badge v2 — style icône + texte ──────────────────────── */
.status-wrap { position: relative; display: inline-block; }
.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; border: none; white-space: nowrap;
  transition: filter .15s;
  font-family: inherit;
}
.status-badge:hover { filter: brightness(.93); }
.status-badge .sb-ico { font-size: 13px; line-height: 1; flex-shrink:0; }
.status-badge .sb-chev { font-size: 9px; opacity: .55; margin-left:2px; }

.status-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 210px; z-index: 9999;
  background: #fff; border: 1.5px solid #e2e8f0;
  border-radius: 14px; padding: 5px;
  box-shadow: 0 12px 32px rgba(15,23,42,.13), 0 2px 8px rgba(15,23,42,.07);
  display: none;
}
.status-dropdown.open { display: block; animation: sdDrop .14s ease; }
@keyframes sdDrop { from{opacity:0;transform:translateY(-4px)} to{opacity:1;transform:translateY(0)} }

.status-option {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 8px; cursor: pointer;
  font-size: 12px; font-weight: 600; border: none; background: none;
  width: 100%; text-align: left; font-family: inherit;
  transition: background .1s;
}
.status-option:hover { background: #f1f5f9; }
.status-option .so-ico { font-size: 14px; flex-shrink: 0; }
