/**
 * LUNIQ design tokens — map Flowbite/Tailwind utilities via CSS variables.
 * Brand: navy opérationnel + teal action (réf. maquettes client).
 */
:root {
  /* Brand */
  --luniq-navy-950: #070f1a;
  --luniq-navy-900: #0b1728;
  --luniq-navy-800: #12233a;
  --luniq-navy-700: #1a3352;
  --luniq-teal-500: #14b8a6;
  --luniq-teal-600: #0d9488;
  --luniq-teal-700: #0f766e;
  --luniq-teal-100: #ccfbf1;

  /* Surfaces */
  --luniq-bg: #f0f4f8;
  --luniq-surface: #ffffff;
  --luniq-border: #d8e0ea;
  --luniq-muted: #64748b;
  --luniq-text: #0f172a;

  /* Semantic */
  --luniq-success: #059669;
  --luniq-warning: #d97706;
  --luniq-danger: #dc2626;
  --luniq-info: #2563eb;

  /* Spacing scale (4px base) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;

  /* Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;

  /* Typography */
  --font-sans: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --font-display: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;

  /* Layout */
  --sidebar-w: 15.5rem;
  --header-h: 3.75rem;
}

html {
  font-family: var(--font-sans);
  color: var(--luniq-text);
  background: var(--luniq-bg);
}

body {
  margin: 0;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Brand wordmark */
.luniq-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  text-decoration: none;
}
.luniq-mark__gem {
  width: 1.65rem;
  height: 1.65rem;
  background: linear-gradient(135deg, var(--luniq-teal-500), #38bdf8);
  clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
  flex-shrink: 0;
}
.luniq-mark--dark {
  color: var(--luniq-navy-900);
}

/* Admin shell */
.luniq-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}
.luniq-sidebar {
  background: linear-gradient(180deg, var(--luniq-navy-900) 0%, var(--luniq-navy-950) 100%);
  color: #e2e8f0;
  padding: var(--space-6) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  position: sticky;
  top: 0;
  height: 100vh;
}
.luniq-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  color: #94a3b8;
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 600;
}
.luniq-nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.luniq-nav a[aria-current="page"] {
  background: rgba(20, 184, 166, 0.15);
  color: var(--luniq-teal-500);
  box-shadow: inset 3px 0 0 var(--luniq-teal-500);
}
.luniq-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.luniq-topbar {
  height: var(--header-h);
  background: var(--luniq-surface);
  border-bottom: 1px solid var(--luniq-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  position: sticky;
  top: 0;
  z-index: 20;
}
.luniq-content {
  padding: var(--space-6);
}

/* Cards / KPI */
.luniq-card {
  background: var(--luniq-surface);
  border: 1px solid var(--luniq-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.luniq-kpi__value {
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--luniq-navy-900);
}
.luniq-kpi__label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--luniq-muted);
}

/* Badges */
.luniq-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.luniq-badge--teal { background: var(--luniq-teal-100); color: var(--luniq-teal-700); }
.luniq-badge--blue { background: #dbeafe; color: #1d4ed8; }
.luniq-badge--green { background: #d1fae5; color: #047857; }
.luniq-badge--amber { background: #fef3c7; color: #b45309; }
.luniq-badge--red { background: #fee2e2; color: #b91c1c; }
.luniq-badge--slate { background: #e2e8f0; color: #475569; }

/* Buttons */
.luniq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: var(--text-sm);
  padding: 0.7rem 1.1rem;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
.luniq-btn--primary {
  background: var(--luniq-teal-600);
  color: #fff;
}
.luniq-btn--primary:hover { background: var(--luniq-teal-700); }
.luniq-btn--ghost {
  background: transparent;
  color: var(--luniq-navy-800);
  border: 1px solid var(--luniq-border);
}
.luniq-btn--danger {
  background: #fff;
  color: var(--luniq-danger);
  border: 1.5px solid var(--luniq-danger);
}
.luniq-btn--block { width: 100%; }

/* Tables */
.luniq-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.luniq-table th {
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--luniq-muted);
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--luniq-border);
}
.luniq-table td {
  padding: 0.85rem;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
}
.luniq-table tr:hover td { background: #f8fafc; }

/* Alerts */
.luniq-alert {
  border-radius: var(--radius-md);
  padding: var(--space-4);
  font-size: var(--text-sm);
}
.luniq-alert--danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.luniq-alert--warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

/* Progress */
.luniq-meter {
  height: 0.45rem;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.luniq-meter > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--luniq-teal-500);
}

/* Reservation funnel */
.luniq-funnel {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(20, 184, 166, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(37, 99, 235, 0.12), transparent 50%),
    linear-gradient(165deg, #0b1728 0%, #12233a 45%, #0b1728 100%);
  color: #fff;
}
.luniq-funnel__panel {
  background: rgba(255, 255, 255, 0.97);
  color: var(--luniq-text);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

/* PWA chauffeur */
.luniq-pwa {
  max-width: 26rem;
  margin: 0 auto;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--luniq-navy-900), var(--luniq-navy-950));
  color: #fff;
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.luniq-stepper {
  display: flex;
  justify-content: space-between;
  gap: 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #64748b;
}
.luniq-stepper__item {
  flex: 1;
  text-align: center;
}
.luniq-stepper__dot {
  width: 1.6rem;
  height: 1.6rem;
  margin: 0 auto 0.35rem;
  border-radius: 999px;
  border: 2px solid #334155;
  display: grid;
  place-items: center;
  background: transparent;
}
.luniq-stepper__item.is-done .luniq-stepper__dot,
.luniq-stepper__item.is-current .luniq-stepper__dot {
  border-color: var(--luniq-teal-500);
  background: var(--luniq-teal-500);
  color: #fff;
}
.luniq-stepper__item.is-current { color: var(--luniq-teal-500); }

/* Mockup chrome */
.luniq-mock-banner {
  background: #fef3c7;
  color: #92400e;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  padding: 0.4rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 960px) {
  .luniq-shell {
    grid-template-columns: 1fr;
  }
  .luniq-sidebar {
    position: relative;
    height: auto;
  }
}
