/* ==========================================================================
   WIMAU - Design System v3 · Haute Couture & Atelier UI/UX
   Desktop + Mobile First
   ========================================================================== */

/* ── Variables ── */
:root {
  --bg:          #0A0B0E;
  --surface:     #13151A;
  --surface2:    #1B1E26;
  --surface3:    #242732;
  --border:      #282B36;
  --border-hi:   #3B3F4E;
  --gold:        #C9A24B;
  --gold-br:     #E5C572;
  --gold-dim:    rgba(201, 162, 75, 0.16);
  --gold-glow:   rgba(229, 197, 114, 0.35);
  --ink:         #F3F0E8;
  --ink-dim:     #A4A094;
  --danger:      #D95C50;
  --green:       #5EAA7C;
  --warn:        #E2AC4C;
  --blue:        #689AE8;

  /* Layout */
  --sidebar-w:      240px;
  --sidebar-w-lg:   280px;
  --detail-w:       380px;
  --topbar-h:       60px;
  --bottomnav-h:    64px;
  --radius-xs:      6px;
  --radius-sm:      10px;
  --radius-md:      14px;
  --radius-lg:      20px;
  --radius-xl:      24px;
  --radius-2xl:     32px;

  /* Elevation */
  --card-shadow:        0 2px 10px rgba(0,0,0,.35);
  --card-shadow-hover:  0 6px 20px rgba(0,0,0,.5);
  --modal-shadow:       0 20px 60px rgba(0,0,0,.65);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root { color-scheme: dark; }
html, body { background: var(--bg); height: 100%; }
body {
  font-family: 'Inter', sans-serif;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
  line-height: 1.5;
}
h1, h2, h3, h4, .font-display { font-family: 'Space Grotesk', sans-serif; letter-spacing: -0.01em; }
.font-mono { font-family: 'JetBrains Mono', monospace; }
.font-mono-num { font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-hi); }

/* ── Input number ── */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }

/* ── Tape divider (Ruban tailleur) ── */
.tape-divider {
  height: 10px;
  background-image: repeating-linear-gradient(
    to right, var(--gold) 0px, var(--gold) 1.5px, transparent 1.5px, transparent 8px
  );
  background-size: 8px 100%;
  opacity: .5;
  mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
  flex-shrink: 0;
}

/* ── Boutons & Interactivité tactile ── */
.btn-gold {
  background: linear-gradient(135deg, var(--gold-br), var(--gold));
  color: #0A0B0E;
  font-weight: 600;
  border: none;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--gold) 35%, transparent);
  transition: all .18s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}
.btn-gold:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--gold) 50%, transparent);
}
.btn-gold:active {
  transform: scale(.97);
}

.btn-tap {
  transition: transform .12s cubic-bezier(0.16, 1, 0.3, 1), background-color .15s ease;
}
.btn-tap:active {
  transform: scale(.96);
}

/* ── Focus ring accessible ── */
.ring-focus:focus {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 35%, transparent);
  border-color: var(--gold) !important;
}

/* ── Animations ── */
.fade-in { animation: fadeIn .22s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-scale { animation: fadeScale .2s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes fadeScale {
  from { opacity: 0; transform: scale(.96); }
  to   { opacity: 1; transform: scale(1); }
}

.slide-up { animation: slideUp .25s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* ── Skeleton Shimmer ── */
.skeleton {
  background: linear-gradient(
    90deg, var(--surface) 25%, var(--surface2) 37%, var(--surface) 63%
  );
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: var(--radius-md);
}
@keyframes shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* ── Modal & Sheets Backdrop ── */
.modal-backdrop {
  background: var(--modal-backdrop-bg, rgba(0, 0, 0, .75));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ── Bottom Sheet (Mobile First) ── */
.bottom-sheet {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  box-shadow: var(--modal-shadow);
  max-height: 90dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sheet-handle-wrap {
  display: flex;
  justify-content: center;
  padding: 10px 0 6px;
  cursor: grab;
}
.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 99px;
  background: var(--border-hi);
}
.sheet-header {
  padding: 12px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sheet-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

@media (min-width: 640px) {
  .bottom-sheet {
    border-radius: var(--radius-2xl);
    max-width: 480px;
    max-height: 85vh;
  }
}

/* ── Bouton retour tactile (zone 48px) ── */
.btn-back {
  display: flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px;
  margin: -8px; padding: 8px;
  color: var(--ink-dim);
  border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
}
.btn-back:hover { background: var(--surface2); color: var(--ink); }

/* ── Print ── */
@media print {
  .no-print { display: none !important; }
  #pdf-fiche { box-shadow: none !important; }
}

/* ── Hidden Alpine ── */
[x-cloak] { display: none !important; }


/* ==========================================================================
   AUTH PAGE
   ========================================================================== */
.auth-wrap {
  min-height: 100dvh;
  display: flex;
  align-items: stretch;
}

.auth-deco {
  display: none;
  flex: 1;
  background:
    radial-gradient(ellipse 80% 70% at 30% 50%, var(--gold-dim) 0%, transparent 60%),
    var(--surface);
  border-right: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 32px;
  padding: 48px;
}
.auth-deco::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: .08;
}
.auth-deco-content { position: relative; z-index: 1; text-align: center; }
.auth-deco-pills {
  display: flex; flex-direction: column; gap: 12px;
  position: relative; z-index: 1;
  width: 100%; max-width: 320px;
}
.auth-deco-pill {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex; align-items: center; gap: 14px;
  font-size: 13.5px;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.auth-deco-pill i { color: var(--gold); font-size: 16px; width: 22px; text-align: center; }
.auth-deco-pill span { color: var(--ink); font-weight: 500; }
.auth-deco-pill small { color: var(--ink-dim); font-size: 11.5px; display: block; margin-top: 1px; }

.auth-form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 24px;
  width: 100%;
  overflow-y: auto;
}

@media (min-width: 768px) {
  .auth-deco { display: flex; }
  .auth-form-panel {
    width: 440px;
    flex-shrink: 0;
    padding: 48px 40px;
  }
}


/* ==========================================================================
   APP SHELL - Layout Desktop (Sidebar + Topbar + Split-View)
   ========================================================================== */
.app-shell {
  display: flex;
  height: 100dvh;
  overflow: hidden;
  position: relative;
}

/* ── Sidebar (Desktop) ── */
.sidebar {
  display: none;
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--sidebar-bg, var(--surface));
  border-right: 1px solid var(--border);
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

.sidebar-header {
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.sidebar-logo {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  border: 1px solid var(--gold-dim);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.sidebar-logo img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-atelier-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-atelier-sub {
  font-size: 11.5px;
  color: var(--ink-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Nav items */
.sidebar-nav {
  padding: 14px 10px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-dim);
  cursor: pointer;
  transition: all .16s ease;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}
.sidebar-item:hover { background: var(--surface2); color: var(--ink); }
.sidebar-item.active {
  background: var(--gold-dim);
  color: var(--gold-br);
  font-weight: 600;
}
.sidebar-item i { width: 20px; text-align: center; font-size: 15px; flex-shrink: 0; }
.sidebar-item .badge {
  margin-left: auto;
  background: var(--gold);
  color: #0A0B0E;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 99px;
  padding: 1px 7px;
  min-width: 20px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
}

.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  padding: 14px 12px 6px;
  opacity: .7;
}

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background .15s;
}
.sidebar-user:hover { background: var(--surface2); }
.sidebar-user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 1px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-br);
  flex-shrink: 0;
}
.sidebar-user-email {
  font-size: 12px;
  color: var(--ink-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

/* ── Main Area ── */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ── Topbar (Desktop) ── */
.topbar {
  display: none;
  height: var(--topbar-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  flex-shrink: 0;
}
.topbar-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 19px;
}
.topbar-search {
  flex: 1;
  max-width: 380px;
  position: relative;
  margin-left: auto;
}
.topbar-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-dim);
  font-size: 13px;
  pointer-events: none;
}
.topbar-search input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 9px 14px 9px 38px;
  font-size: 13.5px;
  color: var(--ink);
  transition: all .15s ease;
}
.topbar-search input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.topbar-btn {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-dim);
  cursor: pointer;
  transition: border-color .15s, color .15s, transform .1s;
}
.topbar-btn:hover { border-color: var(--gold); color: var(--gold); }
.topbar-btn:active { transform: scale(.95); }

/* ── Content Columns (Split-View) ── */
.content-columns {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.list-column {
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.list-column-inner {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.detail-column {
  display: none;
  width: var(--detail-w);
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  background: var(--surface);
  overflow-y: auto;
  flex-direction: column;
}
.detail-column-inner {
  padding: 24px;
  flex: 1;
}

/* ── Mobile Header ── */
.mobile-header {
  background: var(--nav-bg, rgba(10, 11, 14, .88));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top, 0px);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.mobile-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  gap: 12px;
}

/* ── Mobile Bottom Nav (Floating Glass Bar) ── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 30;
  background: var(--nav-bg, rgba(19, 21, 26, .90));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--nav-border, var(--border));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex;
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 4px;
  min-height: 58px;
  color: var(--ink-dim);
  font-size: 10.5px;
  font-weight: 500;
  cursor: pointer;
  transition: color .15s, transform .1s;
  border: none;
  background: transparent;
  position: relative;
}
.bottom-nav-item.active { color: var(--gold); font-weight: 600; }
.bottom-nav-item.active i { color: var(--gold); transform: scale(1.1); }
.bottom-nav-item i { font-size: 18px; transition: transform .15s ease; }
.bottom-nav-item .nav-dot {
  position: absolute;
  top: 8px;
  right: calc(50% - 14px);
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold-glow);
}

.mobile-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 76px);
}

/* ── Floating Action Button (FAB) ── */
.fab {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 74px);
  right: 16px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-br), var(--gold));
  color: #0A0B0E;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: 0 8px 26px color-mix(in srgb, var(--gold) 45%, transparent);
  cursor: pointer;
  transition: transform .2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .2s;
  z-index: 25;
  border: none;
}
.fab:hover { transform: scale(1.07); box-shadow: 0 10px 32px color-mix(in srgb, var(--gold) 60%, transparent); }
.fab:active { transform: scale(.93); }


/* ============================================================
   DESKTOP BREAKPOINTS
   ============================================================ */
@media (min-width: 900px) {
  .sidebar          { display: flex; }
  .topbar           { display: flex; }
  .mobile-header    { display: none; }
  .bottom-nav       { display: none; }
  .mobile-content   { padding-bottom: 0; }
  .fab              { display: none; }

  /* Master-detail split ONLY when .is-split-view is present */
  .content-columns.is-split-view .list-column {
    width: 360px;
    flex-shrink: 0;
    border-right: 1px solid var(--border);
  }
  .content-columns.is-split-view .detail-column {
    display: flex;
    flex: 1;
    min-width: 0;
    width: auto;
  }

  /* Full-width for all other views */
  .content-columns:not(.is-split-view) .list-column {
    width: 100%;
    border-right: none;
  }
  .content-columns:not(.is-split-view) .detail-column {
    display: none !important;
  }

  .app-shell { overflow: hidden; }
}

@media (min-width: 1200px) {
  .sidebar { width: var(--sidebar-w-lg); }
  .content-columns.is-split-view .list-column { width: 380px; }
}


/* ============================================================
   CARDS, KPI & MODERN WIDGETS
   ============================================================ */

/* Stat Card */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--card-shadow);
  transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
}
.stat-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
}
.stat-card-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-sm);
  background: var(--gold-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  color: var(--gold);
  margin-bottom: 12px;
}
.stat-card-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 4px;
}
.stat-card-label {
  font-size: 12.5px;
  color: var(--ink-dim);
}

/* Quick Action Tile */
.quick-action-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition: all .18s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  width: 100%;
}
.quick-action-tile:hover {
  background: var(--surface2);
  border-color: var(--border-hi);
  transform: translateY(-2px);
}
.quick-action-tile:active {
  transform: scale(.97);
}
.quick-action-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-md);
  background: var(--gold-dim);
  color: var(--gold-br);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}

/* Finance Card */
.finance-card {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--gold) 25%, transparent);
  border-radius: var(--radius-xl);
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow);
}
.finance-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, var(--gold-dim), transparent 65%);
  pointer-events: none;
}
.finance-card-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 14px;
  position: relative;
}
.finance-cell-label { font-size: 11.5px; color: var(--ink-dim); margin-bottom: 4px; }
.finance-cell-value {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 16px;
}

/* ── Jauge Financière (Barre Bicolore Payé / Dû) ── */
.payment-gauge-wrap {
  width: 100%;
  margin-top: 12px;
}
.payment-gauge-bar {
  height: 8px;
  background: var(--surface2);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}
.payment-gauge-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--gold));
  border-radius: 99px;
  transition: width .4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Stepper de Confection (Timeline Statuts) ── */
.order-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 16px 8px 10px;
}
.order-stepper::before {
  content: '';
  position: absolute;
  top: 26px;
  left: 20px;
  right: 20px;
  height: 2px;
  background: var(--border);
  z-index: 1;
}
.stepper-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  z-index: 2;
  cursor: pointer;
}
.stepper-circle {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--surface2);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  color: var(--ink-dim);
  transition: all .2s ease;
}
.stepper-node.active .stepper-circle {
  background: var(--gold);
  border-color: var(--gold-br);
  color: #0A0B0E;
  font-weight: 700;
  box-shadow: 0 0 10px var(--gold-glow);
}
.stepper-node.completed .stepper-circle {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.stepper-title {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-dim);
}
.stepper-node.active .stepper-title {
  color: var(--gold-br);
  font-weight: 600;
}

/* Client Row */
.client-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 13px 15px;
  cursor: pointer;
  transition: all .16s ease;
  text-align: left;
  width: 100%;
  box-shadow: var(--card-shadow);
}
.client-row:hover { background: var(--surface2); border-color: var(--border-hi); transform: translateX(2px); }
.client-row.active { border-color: var(--gold); background: var(--gold-dim); }
.client-avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--gold-br);
  flex-shrink: 0;
}
.client-avatar.lg {
  width: 58px; height: 58px;
  font-size: 19px;
  border-color: var(--gold);
}
.client-name { font-size: 14.5px; font-weight: 500; }
.client-sub  { font-size: 12px; color: var(--ink-dim); margin-top: 1px; }

/* Order Row */
.order-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  cursor: pointer;
  transition: all .16s ease;
  box-shadow: var(--card-shadow);
}
.order-row:hover { border-color: var(--border-hi); background: var(--surface2); transform: translateY(-1px); }
.order-row.active { border-color: var(--gold); }

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
}
.status-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.status-en_attente { background: var(--surface2); color: var(--ink-dim); }
.status-en_coupe   { background: var(--warn-dim, rgba(226, 172, 76, 0.15)); color: var(--warn); }
.status-essayage   { background: var(--blue-dim, rgba(104, 154, 232, 0.15)); color: var(--blue); }
.status-pret       { background: var(--green-dim, rgba(94, 170, 124, 0.15)); color: var(--green); }
.status-livre      { background: var(--border); color: var(--ink-dim); }

/* Measurement Row */
.measure-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  cursor: pointer;
  transition: all .16s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--card-shadow);
}
.measure-row:hover { border-color: var(--gold-br); transform: translateY(-1px); }

/* Form inputs */
.input-base {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 15px;
  font-size: 14px;
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  transition: border-color .15s, box-shadow .15s;
}
.input-base:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-dim); }
.input-base::placeholder { color: var(--ink-dim); }
.label-base { font-size: 12px; color: var(--ink-dim); font-weight: 500; display: block; margin-bottom: 6px; }

/* Section heading in settings */
.settings-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Detail header */
.detail-hero {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(to bottom, var(--surface2), var(--surface));
}
.detail-tabs {
  display: flex;
  background: var(--surface2);
  border-radius: var(--radius-md);
  padding: 4px;
  margin: 16px 20px 0;
  gap: 3px;
}
.detail-tab {
  flex: 1;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  color: var(--ink-dim);
  border: none;
  background: transparent;
  transition: background .15s, color .15s;
}
.detail-tab.active { background: var(--gold); color: #0A0B0E; font-weight: 700; }

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  color: var(--ink-dim);
  text-align: center;
  gap: 10px;
}
.empty-state svg, .empty-state i { opacity: .6; margin-bottom: 6px; }
.empty-state p { font-size: 14.5px; }
.empty-state small { font-size: 12px; opacity: .7; }

/* Section pill filters */
.filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.filter-pills::-webkit-scrollbar { display: none; }
.filter-pill {
  padding: 7px 16px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink-dim);
  white-space: nowrap;
  cursor: pointer;
  transition: all .16s ease;
  flex-shrink: 0;
}
.filter-pill:hover { border-color: var(--border-hi); color: var(--ink); }
.filter-pill.active { background: var(--gold); border-color: var(--gold); color: #0A0B0E; font-weight: 700; }

/* ── Interactive Silhouette & Glowing Points ── */
.zone-dot {
  transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  fill: var(--border-hi);
}
.zone-dot:hover {
  fill: var(--gold-br);
  r: 6;
}
.zone-dot.active {
  fill: var(--gold-br);
  r: 7.5;
  filter: drop-shadow(0 0 8px var(--gold));
  animation: pulseGlow 1.8s infinite;
}
@keyframes pulseGlow {
  0%   { filter: drop-shadow(0 0 4px var(--gold)); }
  50%  { filter: drop-shadow(0 0 10px var(--gold-br)); }
  100% { filter: drop-shadow(0 0 4px var(--gold)); }
}

/* Measurement field row */
.measure-field-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.measure-field-row:last-child { border-bottom: none; }
.measure-field-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--border-hi);
  flex-shrink: 0;
  transition: background .15s, box-shadow .15s;
}
.measure-field-dot.filled { background: var(--gold); box-shadow: 0 0 6px var(--gold-glow); }
.measure-field-label {
  flex: 1;
  font-size: 13.5px;
  font-weight: 500;
  min-width: 0;
}
.measure-field-prev { font-size: 11px; color: var(--ink-dim); }
.measure-field-stepper { display: flex; align-items: center; gap: 6px; }
.stepper-btn {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-dim);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  transition: all .12s ease;
}
.stepper-btn:hover { background: var(--surface3); color: var(--ink); }
.stepper-btn:active { transform: scale(.92); }
.stepper-input {
  width: 64px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 6px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.stepper-input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-dim); }

/* Delta Badge */
.delta-badge {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
}
.delta-pos { background: var(--warn-dim); color: var(--warn); }
.delta-neg { background: var(--blue-dim); color: var(--blue); }
.delta-zero { background: var(--surface2); color: var(--ink-dim); }

/* ── PDF Fiche ── */
#pdf-fiche {
  background: white;
  color: #111;
  border-radius: var(--radius-xl);
  font-family: 'Inter', sans-serif;
}

/* ── Toast ── */
.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  background: var(--surface3);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-lg);
  padding: 11px 20px;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 10px 36px rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  max-width: calc(100vw - 32px);
}
.toast i { color: var(--gold); }

/* ── Danger Zone ── */
.danger-zone {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.btn-danger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px;
  border-radius: var(--radius-md);
  border: 1px solid var(--danger-dim);
  background: var(--danger-dim);
  color: var(--danger);
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s ease;
}
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 25%, transparent); }
.btn-danger:active { transform: scale(.97); }

/* ── Silhouette Body Map Layout ── */
.body-map-wrap {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.body-map-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--gold-br);
  text-align: center;
  min-height: 22px;
}
