/* ==========================================================================
   MA BOUTIQUE — CAISSE INTERNE  v4.0
   Design System — Vert Émeraude / Menthe
   Référence : Mockup fintech africaine Wave/Orange Money style
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  /* ═══ Palette Verte Émeraude ═══ */
  --green-900: #064E3B;
  --green-800: #065F46;
  --green-700: #047857;
  --green-600: #059669;
  --green-500: #10B981;
  --green-400: #34D399;
  --green-100: #D1FAE5;
  --green-50:  #ECFDF5;

  /* ═══ Surfaces & Fonds ═══ */
  --bg:       #F0FDF4;         /* Fond app — menthe très clair */
  --bg2:      #E8FAF0;         /* Fond légèrement plus vert */
  --surface:  #FFFFFF;
  --border:   #D1FAE5;         /* Bordures vertes très claires */
  --border2:  #A7F3D0;

  /* ═══ Texte ═══ */
  --text:      #064E3B;        /* Vert très foncé = quasi-noir */
  --text-2:    #065F46;
  --text-3:    #6B7280;        /* Gris neutre */
  --text-muted:#9CA3AF;

  /* ═══ Sémantique ═══ */
  --success:    #059669;
  --success-bg: #D1FAE5;
  --danger:     #DC2626;
  --danger-bg:  #FEF2F2;
  --warning:    #D97706;
  --warning-bg: #FEF3C7;
  --info:       #2563EB;
  --info-bg:    #DBEAFE;

  /* ═══ Ombres ═══ */
  --shadow-xs:  0 1px 2px rgba(6,95,70,0.04);
  --shadow-sm:  0 2px 8px rgba(6,95,70,0.06), 0 0 1px rgba(6,95,70,0.08);
  --shadow-md:  0 4px 16px rgba(6,95,70,0.08), 0 1px 4px rgba(6,95,70,0.04);
  --shadow-lg:  0 12px 32px rgba(6,95,70,0.12);
  --shadow-green: 0 8px 24px rgba(5,150,105,0.25);

  /* ═══ Arrondis ═══ */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-2xl: 28px;
  --r-full: 9999px;

  /* ═══ Typographie ═══ */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'SF Mono', 'Roboto Mono', Consolas, monospace;

  /* ═══ Transitions ═══ */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast: 0.15s var(--ease);
  --t-mid:  0.25s var(--ease);
}

/* ═══════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  touch-action: manipulation;
}

/* ═══════════════════════════════════════════════
   APP SHELL
   ═══════════════════════════════════════════════ */
#app {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  box-shadow: 0 0 40px rgba(6,95,70,0.08);
  -webkit-overflow-scrolling: touch;
}

/* ═══════════════════════════════════════════════
   WALLET HEADER (Floating Green Card)
   ═══════════════════════════════════════════════ */
.wallet-header {
  margin: calc(14px + env(safe-area-inset-top, 0px)) 16px 0;
  background: linear-gradient(160deg, var(--green-900) 0%, var(--green-700) 50%, var(--green-600) 100%);
  border-radius: var(--r-xl);
  padding: 16px 16px 18px;
  color: #FFF;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-green);
}

.wallet-header::before {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  top: -60px;
  right: -40px;
  pointer-events: none;
}

.wallet-header::after {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,0.03);
  bottom: -30px;
  left: -20px;
  pointer-events: none;
}

.wh-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.wh-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wh-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FFF;
  color: var(--green-800);
  font-size: 18px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.wh-name {
  font-size: 16px;
  font-weight: 700;
  color: #FFF;
  line-height: 1.2;
}

.wh-role {
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.92);
  margin-top: 1px;
}

.wh-bell {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  color: #FFF;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--t-fast);
}

.wh-bell:active, .wh-bell-wrap:active .wh-bell { background: rgba(255,255,255,0.22); }

/* Bouton rond + libellé visible en dessous (en-tête du portefeuille) */
.wh-bell-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 44px;
  padding: 0;
  background: none;
  border: 0;
  color: #FFF;
  cursor: pointer;
}

.wh-bell-label {
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: rgba(255,255,255,0.95);
  white-space: nowrap;
}

.wh-balance-label {
  font-size: 12.5px;
  font-weight: 700;
  color: rgba(255,255,255,0.88);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.wh-balance-amount {
  font-size: clamp(26px, 7.8vw, 38px);
  font-weight: 800;
  color: #FFF;
  font-family: var(--mono);
  letter-spacing: -0.02em;
  line-height: 1.1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.wh-eye-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 5px 14px;
  border-radius: var(--r-full);
  cursor: pointer;
  font-family: var(--font);
  transition: background var(--t-fast);
}

.wh-eye-btn:active { background: rgba(255,255,255,0.25); }

.wh-glass-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 800;
  color: #FFF;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.45);
  padding: 5px 11px;
  border-radius: var(--r-full);
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all var(--t-fast);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.wh-glass-btn:active {
  background: rgba(255, 255, 255, 0.42);
  transform: scale(0.96);
}

.wh-glass-btn-gold {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.95), rgba(217, 119, 6, 0.98));
  border: 1px solid rgba(254, 243, 199, 0.65);
  color: #FFF;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.wh-glass-btn-gold:active {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.98), rgba(180, 83, 9, 1));
}

.wh-chips {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.wh-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #FFF;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 5px 11px;
  border-radius: var(--r-full);
}

.wh-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-400);
}

/* ═══════════════════════════════════════════════
   PAGE CONTENT AREA
   ═══════════════════════════════════════════════ */
.page-content {
  flex: 1;
  /* --nav-space : hauteur réelle de la barre du bas, mesurée par syncBottomNavSpace() (js/app.js) */
  padding: 14px 16px calc(var(--nav-space, 115px) + env(safe-area-inset-bottom, 24px));
  display: flex;
  flex-direction: column;
  gap: 14px;
  -webkit-overflow-scrolling: touch;
}

.page-content::after {
  content: '';
  display: block;
  height: calc(16px + env(safe-area-inset-bottom, 12px));
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════
   ACTION GRID (8 actions — 4×2)
   ═══════════════════════════════════════════════ */
.action-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 14px 4px 10px;
  border: none;
  background: var(--surface);
  border-radius: var(--r-lg);
  cursor: pointer;
  position: relative;
  transition: background var(--t-fast), transform var(--t-fast);
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border);
}

.action-item:active {
  transform: scale(0.95);
  background: var(--green-50);
}

.action-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 2px solid var(--green-500);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--green-700);
  position: relative;
}

.action-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  text-align: center;
  line-height: 1.15;
}

.action-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: #FFF;
  font-size: 12px;
  font-weight: 800;
  border-radius: 50%;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--surface);
  font-family: var(--font);
}

/* ═══════════════════════════════════════════════
   FINTECH HERO ACTIONS & THEMATIC MENU CARDS
   ═══════════════════════════════════════════════ */
.home-menu-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-actions-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 16px 10px 14px;
  box-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.04);
}

.hero-actions-section-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 14px;
  padding-left: 4px;
}

.hero-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 4px;
}

.hero-actions-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.hero-action-btn {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  padding: 4px 2px;
  transition: transform var(--t-fast);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.hero-action-btn:active {
  transform: scale(0.92);
}

.hero-action-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: all var(--t-fast);
}

.hero-action-icon svg,
.hero-action-icon .caisse-action-icon,
.hero-action-icon img {
  width: 26px;
  height: 26px;
}

.caisse-action-icon {
  display: inline-block;
  width: 26px;
  height: 26px;
  background-color: currentColor;
  -webkit-mask: url('../logo.png') no-repeat center / contain;
  mask: url('../logo.png') no-repeat center / contain;
  vertical-align: middle;
  flex-shrink: 0;
}

.hero-action-icon.bg-emerald {
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
  color: #059669;
  border: 1px solid #A7F3D0;
}

.hero-action-icon.bg-teal {
  background: linear-gradient(135deg, #F0FDFA 0%, #CCFBF1 100%);
  color: #0D9488;
  border: 1px solid #99F6E4;
}

.hero-action-icon.bg-purple {
  background: linear-gradient(135deg, #FAF5FF 0%, #EDE9FE 100%);
  color: #7C3AED;
  border: 1px solid #DDD6FE;
}

.hero-action-icon.bg-blue {
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  color: #2563EB;
  border: 1px solid #BFDBFE;
}

.hero-action-icon.bg-amber {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  color: #D97706;
  border: 1px solid #FDE68A;
}

.hero-action-icon.bg-rose {
  background: linear-gradient(135deg, #FFF1F2 0%, #FFE4E6 100%);
  color: #E11D48;
  border: 1px solid #FECDD3;
}

.hero-action-icon.bg-sky {
  background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
  color: #0284C7;
  border: 1px solid #BAE6FD;
}

.hero-action-icon.bg-slate {
  background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
  color: #475569;
  border: 1px solid #CBD5E1;
}

.hero-action-icon.bg-indigo {
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  color: #4F46E5;
  border: 1px solid #C7D2FE;
}

.hero-action-icon.bg-cyan {
  background: linear-gradient(135deg, #ECFEFF 0%, #CFFAFE 100%);
  color: #0891B2;
  border: 1px solid #A5F3FC;
}

.hero-action-icon.bg-mint {
  background: linear-gradient(135deg, #F0FDF4 0%, #DCFCE7 100%);
  color: #16A34A;
  border: 1px solid #BBF7D0;
}

.hero-action-icon.bg-violet {
  background: linear-gradient(135deg, #F5F3FF 0%, #EDE9FE 100%);
  color: #8B5CF6;
  border: 1px solid #DDD6FE;
}

.hero-action-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  line-height: 1.2;
  letter-spacing: -0.2px;
  max-width: 74px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-action-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: #FFF;
  font-size: 12px;
  font-weight: 800;
  min-width: 19px;
  height: 19px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4);
  border: 2px solid #FFF;
}

.menu-group-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 10px 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.menu-group-header {
  padding: 8px 4px 6px;
}

.menu-group-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.menu-group-list {
  display: flex;
  flex-direction: column;
}

.menu-row-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 4px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t-fast);
  border-radius: 10px;
  -webkit-tap-highlight-color: transparent;
}

.menu-row-item:last-child {
  border-bottom: none;
}

.menu-row-item:active {
  background: var(--bg);
}

.menu-row-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.menu-row-icon svg {
  width: 20px;
  height: 20px;
}

.menu-row-icon.bg-purple-soft {
  background: #F5F3FF;
  color: #7C3AED;
}

.menu-row-icon.bg-blue-soft {
  background: #EFF6FF;
  color: #2563EB;
}

.menu-row-icon.bg-amber-soft {
  background: #FFFBEB;
  color: #D97706;
}

.menu-row-icon.bg-emerald-soft {
  background: #ECFDF5;
  color: #059669;
}

.menu-row-icon.bg-slate-soft {
  background: #F1F5F9;
  color: #475569;
}

.menu-row-icon.bg-indigo-soft {
  background: #EEF2FF;
  color: #4F46E5;
}

.menu-row-info {
  flex: 1;
  min-width: 0;
}

.menu-row-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.menu-row-sub {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-3);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-row-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.menu-row-badge {
  background: var(--green-50);
  color: var(--green-700);
  border: 1px solid var(--green-200);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-full);
}

.menu-row-chevron {
  font-size: 18px;
  color: var(--text-muted);
  font-weight: 400;
}

/* ═══════════════════════════════════════════════
   SECTION HEADERS
   ═══════════════════════════════════════════════ */
.section-hd {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-hd-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.section-hd-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--green-600);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
}

/* ═══════════════════════════════════════════════
   FEED LIST (recent transactions)
   ═══════════════════════════════════════════════ */
.feed-list {
  background: var(--surface);
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.feed-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t-fast);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.feed-item:active {
  background: rgba(16, 185, 129, 0.08);
}

.feed-item:last-child { border-bottom: none; }

.feed-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  font-weight: 700;
}

.fi-in  { background: var(--success-bg); color: var(--success); }
.fi-out { background: #FEE2E2; color: var(--danger); }

.feed-info {
  flex: 1;
  min-width: 0;
}

.feed-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1px;
}

.feed-sub {
  font-size: 12.5px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.feed-right {
  text-align: right;
  flex-shrink: 0;
}

.feed-amount {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
}

.feed-amount.positive { color: var(--success); }
.feed-amount.negative { color: var(--danger); }

.feed-balance {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.feed-chevron {
  color: var(--text-muted);
  font-size: 14px;
  margin-left: 4px;
}

/* ═══════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-full);
  white-space: nowrap;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-neutral { background: #F3F4F6;          color: var(--text-3); }
.badge-brand   { background: var(--green-50);   color: var(--green-700); }

.stamp {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-full);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════
   SUB-PAGE HEADER (← Back navigation - iOS / Mobile Optimized)
   ═══════════════════════════════════════════════ */
.subpage-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 14px 16px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  position: sticky;
  top: 0;
  z-index: 90;
}

.back-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 14px;
  border: 1.5px solid var(--border2);
  background: var(--surface);
  color: var(--green-800);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.back-btn:hover {
  background: var(--green-50);
  border-color: var(--green-200);
  color: var(--green-700);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.12);
}

.back-btn:active {
  transform: scale(0.90);
  background: var(--green-100);
  box-shadow: none;
}

.back-btn svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}

.subpage-bar-info {
  flex: 1;
  min-width: 0;
}

.subpage-bar-title {
  font-size: 15.5px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.subpage-bar-sub {
  font-size: 12.5px;
  color: var(--text-3);
  font-weight: 500;
  margin-top: 1px;
  line-height: 1.3;
}

/* ═══════════════════════════════════════════════
   LOGIN PAGE (STYLE FINTECH / NÉO-BANQUE)
   ═══════════════════════════════════════════════ */
.login-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(32px + env(safe-area-inset-top, 0px)) 20px calc(32px + env(safe-area-inset-bottom, 0px));
  min-height: 100vh;
  min-height: 100dvh;
  background: radial-gradient(circle at 50% 12%, #E6FBF0 0%, #F0FDF4 60%, #ECFDF5 100%);
  position: relative;
}

.login-logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--green-900), var(--green-600));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 10px 25px rgba(5, 150, 105, 0.28);
  border: 3px solid #FFFFFF;
}

.login-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 24px;
  text-align: center;
  font-weight: 500;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: #FFFFFF;
  border-radius: 24px;
  border: 1.5px solid #D1FAE5;
  box-shadow: 0 12px 36px rgba(6, 78, 59, 0.08), 0 2px 6px rgba(6, 78, 59, 0.04);
  padding: 26px 22px;
}

.login-field-group {
  margin-bottom: 14px;
  text-align: left;
}

.login-field-label {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.login-field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
  opacity: 0.75;
}

.login-field-wrap input {
  width: 100%;
  padding: 15px 48px 15px 44px !important;
  font-size: 16px !important;
  font-family: var(--font) !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  background: #F8FAFC !important;
  border: 1.5px solid #E2E8F0 !important;
  border-radius: 14px !important;
  min-height: 52px;
  outline: none;
  transition: all 0.2s ease;
  touch-action: manipulation;
  box-sizing: border-box;
}

.login-field-wrap input:focus {
  border-color: var(--green-500) !important;
  background: #FFFFFF !important;
  box-shadow: 0 0 0 3.5px rgba(16, 185, 129, 0.2) !important;
}

.login-field-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  pointer-events: none;
  opacity: 0.8;
}

.login-eye-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  font-size: 18px;
  line-height: 1;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748B;
  transition: background 0.2s;
  touch-action: manipulation;
}

.login-eye-btn:hover {
  background: #E2E8F0;
}

.btn-login-submit {
  width: 100%;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 15px;
  padding: 14px 18px;
  border-radius: 12px;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.32);
  transition: all 0.2s ease;
  margin-top: 6px;
}

.btn-login-submit:active {
  transform: scale(0.98);
}

.btn-login-secondary {
  width: 100%;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  padding: 11px 14px;
  color: var(--text-2);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-login-secondary:hover {
  background: #F1F5F9;
  border-color: #CBD5E1;
}

.btn-login-register {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--green-700);
  font-weight: 700;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  padding: 9px;
  border-radius: 10px;
  transition: background 0.2s;
  margin-top: 6px;
}

.btn-login-register:hover {
  background: var(--green-50);
}

/* ═══════════════════════════════════════════════
   FORMS & INPUTS
   ═══════════════════════════════════════════════ */
.input-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
  min-width: 0; /* permet aux champs date de rétrécir dans une grille 2 colonnes sur mobile */
}

input[type="date"] {
  min-width: 0;
}

input:not([type="checkbox"]):not([type="radio"]), textarea, select {
  width: 100%;
  padding: 14px 16px;
  min-height: 50px;
  font-size: 16px; /* Crucial : 16px empêche le zoom automatique forcé sur iPhone Safari */
  font-family: var(--font);
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
  -webkit-appearance: none;
  touch-action: manipulation;
  box-sizing: border-box;
}

input:not([type="checkbox"]):not([type="radio"]):focus, textarea:focus, select:focus {
  border-color: var(--green-500);
  box-shadow: 0 0 0 3.5px rgba(16,185,129,0.18);
  background: var(--surface);
}

input::placeholder { color: var(--text-muted); font-weight: 400; }
textarea { resize: vertical; min-height: 95px; padding: 14px 16px; }
select { cursor: pointer; }

input[type="search"] {
  min-height: 48px;
  font-size: 15.5px;
  padding: 12px 14px 12px 38px;
  border-radius: 14px;
}

/* ═══════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 20px;
  min-height: 48px;
  font-size: 14.5px;
  font-weight: 700;
  font-family: var(--font);
  border: none;
  border-radius: var(--r-full);
  cursor: pointer;
  transition: all var(--t-fast);
  white-space: normal; /* v11.27 : un texte long passe à la ligne au lieu de sortir de l'écran */
  text-align: center;
  line-height: 1.25;
  min-width: 0;
  width: 100%;
  touch-action: manipulation;
  box-sizing: border-box;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: scale(0.98); }

.btn-primary {
  background: var(--green-600);
  color: #FFF;
  box-shadow: var(--shadow-green);
}

.btn-primary:hover:not(:disabled) { background: var(--green-700); }

.btn-secondary {
  background: var(--green-50);
  color: var(--green-700);
  border: 1.5px solid var(--border2);
}

.btn-ghost {
  background: var(--bg);
  color: var(--text-2);
  border: 1.5px solid var(--border);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1.5px solid #FECACA;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 12px;
  width: auto;
}

.btn-green { background: var(--green-600); color: #FFF; border-radius: var(--r-full); padding: 14px 20px; font-weight: 700; font-size: 14px; width: 100%; border: none; cursor: pointer; font-family: var(--font); }
.btn-green:active { background: var(--green-700); }
.btn-red-outline { background: transparent; border: 1.5px solid var(--danger); color: var(--danger); border-radius: var(--r-full); font-weight: 700; cursor: pointer; padding: 14px 20px; font-size: 14px; width: 100%; font-family: var(--font); }

.link-btn { background: none; border: none; color: var(--green-600); font-size: 13px; font-weight: 600; cursor: pointer; font-family: var(--font); }
.link-btn.link-danger { color: var(--danger); }

/* ═══════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 16px;
}

/* ═══════════════════════════════════════════════
   TX CARD (history)
   ═══════════════════════════════════════════════ */
.tx-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  padding: 14px 16px;
  margin-bottom: 8px;
}

.tx-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.tx-type-label { font-size: 13px; font-weight: 700; color: var(--text); }
.tx-amount { font-family: var(--mono); font-size: 16px; font-weight: 800; }
.tx-amount.positive { color: var(--success); }
.tx-amount.negative { color: var(--danger); }
.tx-amount.neutral  { color: var(--green-600); }
.tx-meta { font-size: 12.5px; color: var(--text-3); line-height: 1.6; }

/* ═══════════════════════════════════════════════
   PENDING RECEIPT ALERT
   ═══════════════════════════════════════════════ */
.pending-alert {
  background: var(--warning-bg);
  border: 1.5px solid #FDE68A;
  border-radius: var(--r-lg);
  padding: 14px 16px;
}

.pending-alert-title {
  font-size: 13px;
  font-weight: 700;
  color: #92400E;
  margin-bottom: 6px;
}

/* ═══════════════════════════════════════════════
   TABS / PILLS
   ═══════════════════════════════════════════════ */
.tab-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x pan-y;
}
.tab-pills::-webkit-scrollbar { display: none; }

.tab-pill, .tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  min-height: 42px;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--r-full);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-3);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--t-fast);
  font-family: var(--font);
  touch-action: manipulation;
  user-select: none;
}

.tab-pill:active, .tab:active {
  transform: scale(0.93);
}

.tab-pill.active, .tab.active {
  background: var(--green-600);
  color: #FFF;
  border-color: var(--green-600);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

/* ═══════════════════════════════════════════════
   MODAL & BOTTOM SHEET (Mobile First & Clavier Virtuel Optimisé)
   ═══════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: env(safe-area-inset-top, 0px);
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

.modal-box, .modal-content {
  background: var(--surface) !important;
  border-radius: 28px 28px 0 0 !important;
  padding: 14px 20px calc(38px + env(safe-area-inset-bottom, 20px)) !important;
  scroll-padding-bottom: calc(120px + env(safe-area-inset-bottom, 20px)) !important;
  width: 100% !important;
  max-width: 100% !important;
  max-height: calc(92dvh - env(safe-area-inset-top, 0px)) !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: bottomSheetIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.25) !important;
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  border-bottom: none !important;
  box-sizing: border-box;
  overscroll-behavior-y: contain;
}

/* Poignée visuelle de glissement (Pill Drag Handle) native pour mobile */
.modal-box::before, .modal-content::before {
  content: '' !important;
  display: block !important;
  width: 44px !important;
  height: 5px !important;
  border-radius: 999px !important;
  background: #CBD5E1 !important;
  margin: 0 auto 16px auto !important;
  flex-shrink: 0 !important;
}

/* Écrans larges / Ordinateurs / Tablettes */
@media (min-width: 641px) {
  .modal-overlay {
    align-items: center !important;
    padding: 24px !important;
  }
  .modal-box, .modal-content {
    border-radius: 24px !important;
    max-width: 480px !important;
    max-height: calc(88vh - env(safe-area-inset-top, 0px)) !important;
    padding: 24px 24px 28px !important;
    animation: modalPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 25px 50px -12px rgba(6, 78, 59, 0.25), 0 0 0 1px rgba(16, 185, 129, 0.1) !important;
    border: 1px solid var(--border) !important;
  }
  .modal-box::before, .modal-content::before {
    display: none !important;
  }
}

.modal-card {
  background: #FFFFFF !important;
  color: #0F172A;
  box-sizing: border-box;
  animation: bottomSheetIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 641px) {
  .modal-card {
    border-radius: 22px !important;
    animation: modalPopIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
}

@keyframes bottomSheetIn {
  from { transform: translateY(100%); opacity: 0.6; }
  to   { transform: translateY(0); opacity: 1; }
}

@keyframes modalPopIn {
  from { transform: scale(0.94) translateY(12px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}

/* Dégagement auto au focus pour ne jamais cacher les champs derrière le clavier mobile */
.modal-box input:focus,
.modal-box textarea:focus,
.modal-box select:focus,
.modal-content input:focus,
.modal-content textarea:focus,
.modal-content select:focus {
  scroll-margin-bottom: 100px !important;
}

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-title { font-size: 16px; font-weight: 800; color: var(--text); }
.modal-close {
  font-size: 20px;
  color: var(--text-3);
  cursor: pointer;
  background: none;
  border: none;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  transition: background var(--t-fast);
}
.modal-close:hover, .modal-close:active { background: var(--bg); color: var(--text); }
.modal-img-full { width: 100%; border-radius: var(--r-md); display: block; }

/* ═══════════════════════════════════════════════
   TOAST (Floats above bottom navbar)
   ═══════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: calc(92px + env(safe-area-inset-bottom, 20px));
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--green-900);
  color: #FFF;
  padding: 10px 20px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s var(--ease);
  z-index: 9999;
  max-width: 90%;
  text-align: center;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ═══════════════════════════════════════════════
   DEBT CARDS (High-Contrast Delimitation & Contours)
   ═══════════════════════════════════════════════ */
.debt-card {
  background: var(--surface);
  border-radius: 16px;
  /* Trait de contour foncé et net pour délimiter chaque dette sans ambiguïté */
  border: 2px solid #64748B;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 14px -2px rgba(15, 23, 42, 0.09);
  position: relative;
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}

.debt-card:hover {
  box-shadow: 0 6px 20px -2px rgba(15, 23, 42, 0.13);
}

/* Délimitation spécifique par couleur selon le type de dette */
.debt-card.debt-owed {
  border-color: #64748B;
  border-left: 6px solid #DC2626 !important; /* Rouge foncé : Je dois */
}

.debt-card.debt-receivable {
  border-color: #64748B;
  border-left: 6px solid #059669 !important; /* Vert foncé : On me doit */
}

.debt-card.debt-pending {
  border-color: #64748B;
  border-left: 6px solid #D97706 !important; /* Orange ambre : En attente */
}

.debt-card.debt-repaid {
  border-color: #94A3B8 !important;
  border-left: 6px solid #64748B !important; /* Gris foncé : Soldé */
  background: #F8FAFC;
}

.debt-chip { display: inline-flex; flex-direction: column; align-items: center; background: var(--green-50); border: 1.5px solid #94A3B8; border-radius: var(--r-md); padding: 6px 14px; }
.debt-chip-title { font-size: 12px; font-weight: 700; color: var(--green-700); text-transform: uppercase; }
.debt-chip-amount { font-size: 15px; font-weight: 800; color: var(--green-700); font-family: var(--mono); }
.debt-summary-card { display: flex; gap: 8px; margin-top: 10px; }

/* ═══════════════════════════════════════════════
   CHAT
   ═══════════════════════════════════════════════ */
.chat-bubble { max-width: 78%; border-radius: var(--r-lg); padding: 10px 14px; font-size: 13px; line-height: 1.5; margin-bottom: 6px; }
.chat-bubble.outgoing { background: var(--green-600); color: #FFF; margin-left: auto; border-bottom-right-radius: 4px; }
.chat-bubble.incoming { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-time { font-size: 12px; opacity: 0.65; margin-top: 2px; text-align: right; }
.chat-input-bar {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 12px));
  display: flex;
  gap: 10px;
  align-items: center;
  z-index: 80;
}

/* ═══════════════════════════════════════════════
   INVENTORY / BILAN
   ═══════════════════════════════════════════════ */
.bilan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bilan-cell { background: var(--green-50); border-radius: var(--r-md); padding: 12px; text-align: center; border: 1px solid var(--border); }
.bilan-cell-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); margin-bottom: 4px; }
.bilan-cell-value { font-size: 16px; font-weight: 800; font-family: var(--mono); color: var(--text); }

/* ═══════════════════════════════════════════════
   PERMISSIONS / SETTINGS
   ═══════════════════════════════════════════════ */
.permissions-matrix { background: var(--green-50); border-radius: var(--r-md); padding: 14px; margin-bottom: 14px; border: 1px solid var(--border); }
.checkbox-label { display: flex; align-items: center; gap: 12px; font-size: 13.5px; font-weight: 600; color: var(--text); cursor: pointer; margin-bottom: 10px; background: #ffffff; border: 1.5px solid var(--border2); padding: 12px 14px; border-radius: var(--r-md); transition: all 0.2s var(--ease); user-select: none; box-shadow: 0 1px 2px rgba(0,0,0,0.02); }
.checkbox-label:hover { background: #f8fafc; border-color: var(--green-300); }
.checkbox-label:has(input:checked) { background: #ECFDF5; border-color: #34D399; }
.checkbox-label:last-child { margin-bottom: 0; }
.checkbox-label input[type="checkbox"] { width: 22px; height: 22px; flex-shrink: 0; accent-color: var(--green-600); cursor: pointer; pointer-events: auto; }
.checkbox-label span { line-height: 1.4; display: block; flex: 1; font-weight: 500; }
.advanced-toggle { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--green-50); border: 1px solid var(--border); border-radius: var(--r-md); cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 10px; }
.advanced-section { background: var(--green-50); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px; margin-bottom: 14px; }

/* ═══════════════════════════════════════════════
   QR MODAL EXTRAS
   ═══════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════
   MISC UTILITIES
   ═══════════════════════════════════════════════ */
.mono { font-family: var(--mono); font-weight: 700; }
.error-text { color: var(--danger); font-size: 12px; font-weight: 600; min-height: 16px; margin-bottom: 8px; }
.empty-state { text-align: center; padding: 32px 16px; color: var(--text-3); font-size: 13px; line-height: 1.6; }
.empty-state-icon { font-size: 36px; margin-bottom: 12px; }
.inactive-tag { display: inline-flex; padding: 1px 7px; font-size: 12px; font-weight: 700; background: var(--bg); color: var(--text-3); border: 1px solid var(--border); border-radius: var(--r-full); margin-left: 6px; }
.section-label { font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin: 20px 0 10px; }
.section-note { font-size: 12px; color: var(--text-3); margin-bottom: 12px; line-height: 1.5; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════════════════════════════════════════════
   BOTTOM NAV (Barre Ergonomique au Pouce pour Smartphone)
   ═══════════════════════════════════════════════ */
.bottom-nav {
  position: fixed;
  bottom: calc(12px + env(safe-area-inset-bottom, 10px));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 410px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(28px) saturate(210%);
  -webkit-backdrop-filter: blur(28px) saturate(210%);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 36px;
  padding: 6px 8px;
  z-index: 100;
  box-shadow: 0 16px 42px -6px rgba(6, 78, 59, 0.16), 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
  touch-action: manipulation;
}

/* Se range en défilant vers le bas (lecture), revient dès qu'on remonte */
body.nav-scrolled-away .bottom-nav {
  transform: translateX(-50%) translateY(calc(100% + 40px));
  opacity: 0;
  pointer-events: none;
}

/* Éclipse douce quand le clavier virtuel est ouvert pour ne jamais masquer les formulaires */
body.keyboard-open .bottom-nav {
  transform: translateX(-50%) translateY(140px) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 6px 4px 5px;
  color: #475569;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  gap: 3px;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font);
  position: relative;
  border-radius: 20px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}

.nav-item:active {
  transform: scale(0.90);
}

.nav-item.active {
  color: var(--green-900);
  font-weight: 800;
  background: rgba(16, 185, 129, 0.15);
}

.nav-item.active svg {
  stroke: var(--green-900);
  stroke-width: 2.4;
  transform: translateY(-1px);
}

.nav-badge-pill {
  position: absolute;
  top: 2px;
  right: calc(50% - 15px);
  background: var(--danger);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 1.5px solid #FFFFFF;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

.nav-badge-dot {
  position: absolute;
  top: 4px;
  right: calc(50% - 13px);
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--danger);
  border: 1.5px solid #FFFFFF;
}

/* Bouton Central d'Action Flottant (Plein pouce pour action rapide) */
.nav-center-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-top: -8px;
  user-select: none;
  touch-action: manipulation;
}

.nav-center-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFFFFF;
  border: 2.8px solid #FFFFFF;
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.16s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.16s ease;
  touch-action: manipulation;
}

.nav-center-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 10px 26px rgba(16, 185, 129, 0.6);
}

.nav-center-btn:active {
  transform: scale(0.90);
}

.nav-center-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #FFFFFF;
  stroke-width: 2.4;
  margin-left: 2px;
}

.nav-center-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--green-800);
  margin-top: 2px;
}

/* ═══════════════════════════════════════════════
   VOICE PLAYER & AUDIO PROGRESSION
   ═══════════════════════════════════════════════ */
.chat-voice-player {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 200px;
  padding: 2px 0;
}

.voice-play-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--green-600);
  color: #FFFFFF;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: transform 0.1s, background 0.15s;
}
.voice-play-btn svg { display: block; }
.voice-play-btn:active { transform: scale(0.9); }

/* Forme d'onde : une couche « non lue » et, par-dessus, une couche « lue » découpée selon la progression */
.voice-progress-track {
  flex: 1;
  height: 28px;
  position: relative;
  cursor: pointer;
  min-width: 110px;
}
.voice-wave {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
}
.voice-wave span {
  flex: 1;
  max-width: 3px;
  min-height: 4px;
  border-radius: 2px;
  background: currentColor;
}
.voice-progress-track > .voice-wave:first-child { color: #CBD5E1; }
.voice-progress-fill {
  color: var(--green-600);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.1s linear;
}

.voice-time {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-2);
  font-family: var(--mono);
  min-width: 32px;
  text-align: right;
}

/* Photo dans une bulle de messagerie */
.chat-photo {
  display: block;
  width: 100%;
  max-width: 230px;
  max-height: 260px;
  min-height: 60px;
  object-fit: cover;
  border-radius: 10px;
  cursor: zoom-in;
  background: rgba(0, 0, 0, 0.06);
}

/* Bulles envoyées (vertes) */
.chat-bubble-me .voice-play-btn { background: #FFFFFF; color: var(--green-700); }
.chat-bubble-me .voice-progress-track > .voice-wave:first-child { color: rgba(255, 255, 255, 0.45); }
.chat-bubble-me .voice-progress-fill { color: #FFFFFF; }
.chat-bubble-me .voice-time { color: rgba(255, 255, 255, 0.95); }

/* Bulles reçues (blanches) */
.chat-bubble-peer .voice-time { color: #475569; }

/* ═══════════════════════════════════════════════
   BARRE DE SAISIE & ENREGISTREMENT VOCAL
   ═══════════════════════════════════════════════ */
.chat-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.chat-side-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--border2);
  background: var(--green-50);
  color: var(--green-700);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}
.chat-side-btn:active { transform: scale(0.92); }

.chat-main-btn {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--green-600);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(5, 150, 105, 0.35);
  transition: background 0.15s, transform 0.1s;
}
.chat-main-btn:active { transform: scale(0.92); }
.chat-main-btn:disabled { opacity: 0.6; }
.chat-main-btn svg { display: block; }

/* Champ vide : micro ; texte saisi ou photo jointe : envoi */
.chat-input-row .chat-send-btn { display: none; }
.chat-input-row textarea:not(:placeholder-shown) ~ .chat-send-btn,
.chat-input-row.has-attachment .chat-send-btn { display: flex; }
.chat-input-row textarea:not(:placeholder-shown) ~ .chat-mic-btn,
.chat-input-row.has-attachment .chat-mic-btn { display: none; }

.voice-recording-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.voice-rec-cancel {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid #FECACA;
  background: #FEF2F2;
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.voice-rec-center {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 16px;
  border-radius: 23px;
  background: #FEF2F2;
  border: 1.5px solid #FCA5A5;
}

.voice-rec-timer {
  font-size: 14px;
  font-weight: 800;
  color: var(--danger);
}

.voice-rec-wave {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  height: 22px;
  overflow: hidden;
}
.voice-rec-wave span {
  width: 3px;
  height: 100%;
  border-radius: 2px;
  background: #F87171;
  animation: recWave 0.9s ease-in-out infinite;
}
.voice-rec-wave span:nth-child(2) { animation-delay: 0.1s; }
.voice-rec-wave span:nth-child(3) { animation-delay: 0.25s; }
.voice-rec-wave span:nth-child(4) { animation-delay: 0.4s; }
.voice-rec-wave span:nth-child(5) { animation-delay: 0.15s; }
.voice-rec-wave span:nth-child(6) { animation-delay: 0.3s; }
.voice-rec-wave span:nth-child(7) { animation-delay: 0.05s; }

@keyframes recWave {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

.pulsing-record-dot {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  background-color: var(--danger);
  border-radius: 50%;
  animation: recordPulse 1s infinite alternate;
}

@keyframes recordPulse {
  0% { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.2); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .voice-rec-wave span, .pulsing-record-dot { animation: none; }
}

.debt-remaining-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: var(--green-50);
  color: var(--green-700);
  border: 1px solid var(--border2);
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 700;
}

/* ═══════════════════════════════════════════════
   ATTACHMENT UPLOADER COMPONENT
   ═══════════════════════════════════════════════ */
.attachment-upload-zone {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #F0FDF4 0%, #FFFFFF 100%);
  border: 2px dashed #A7F3D0;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  margin-top: 8px;
}

.attachment-upload-zone:hover {
  background: #ECFDF5;
  border-color: #34D399;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(5, 150, 105, 0.12);
}

.attachment-upload-zone:active {
  transform: translateY(0);
  background: #D1FAE5;
}

.attachment-icon-circle {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #10B981, #047857);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 20px;
  box-shadow: 0 4px 10px rgba(4, 120, 87, 0.2);
  flex-shrink: 0;
}

.attachment-info {
  flex: 1;
  text-align: left;
}

.attachment-title {
  font-size: 13px;
  font-weight: 800;
  color: #064E3B;
  display: flex;
  align-items: center;
  gap: 6px;
}

.attachment-subtitle {
  font-size: 12.5px;
  color: #6B7280;
  margin-top: 2px;
  font-weight: 500;
}

.attachment-browse-btn {
  font-size: 12.5px;
  font-weight: 800;
  color: #047857;
  background: #D1FAE5;
  border: 1px solid #A7F3D0;
  padding: 6px 12px;
  border-radius: 9999px;
  flex-shrink: 0;
  transition: all 0.2s;
}

.attachment-upload-zone:hover .attachment-browse-btn {
  background: #059669;
  color: #FFFFFF;
  border-color: #059669;
}

.attachment-preview-box {
  position: relative;
  background: var(--surface);
  border: 1.5px solid var(--border2);
  border-radius: 16px;
  padding: 12px;
  margin-top: 8px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.attachment-preview-img {
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: 10px;
  display: block;
  margin: 0 auto;
  cursor: pointer;
  transition: transform 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.attachment-preview-img:hover {
  transform: scale(1.02);
}

.attachment-success-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #047857;
  background: #ECFDF5;
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid #A7F3D0;
  margin-top: 8px;
}

.attachment-remove-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: #DC2626;
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  padding: 5px 12px;
  border-radius: 9999px;
  cursor: pointer;
  margin-top: 8px;
  transition: all 0.2s;
}

.attachment-remove-btn:hover {
  background: #DC2626;
  color: #FFFFFF;
  border-color: #DC2626;
}

/* ═══════════════════════════════════════════════
   1. LIVE AMOUNT WORDS HELPER (Anti-error)
   ═══════════════════════════════════════════════ */
.amount-words-helper {
  margin-top: 6px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  animation: fadeIn 0.2s ease-out;
}

.words-badge {
  background: #ECFDF5;
  color: #047857;
  border: 1.5px solid #A7F3D0;
  padding: 5px 11px;
  border-radius: var(--r-full);
  font-weight: 700;
  letter-spacing: 0.15px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 5px rgba(16, 185, 129, 0.08);
  line-height: 1.35;
  word-break: break-word;
  max-width: 100%;
}

/* ═══════════════════════════════════════════════
   2. NATIVE PULL-TO-REFRESH
   ═══════════════════════════════════════════════ */
.ptr-indicator {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(-70px);
  z-index: 1000;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s;
  opacity: 0;
}

.ptr-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-600);
}

.ptr-circle svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.1s;
}

.ptr-indicator.ptr-pulling {
  opacity: 1;
}

.ptr-indicator.ptr-ready .ptr-circle {
  background: var(--green-600);
  color: #FFFFFF;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.45);
  transform: scale(1.08);
}

.ptr-indicator.ptr-refreshing {
  opacity: 1;
  transform: translateX(-50%) translateY(14px);
}

.ptr-indicator.ptr-refreshing .ptr-circle svg {
  animation: ptrSpin 0.75s linear infinite;
}

@keyframes ptrSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════════
   3. PWA INSTALL BANNER (iOS & Android)
   ═══════════════════════════════════════════════ */
.pwa-install-banner {
  position: fixed;
  bottom: calc(85px + env(safe-area-inset-bottom, 16px));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 410px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1.5px solid var(--border2);
  border-radius: 20px;
  padding: 14px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  z-index: 150;
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.pwa-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.pwa-banner-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 13.5px;
  color: var(--text);
}

.pwa-banner-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--green-600);
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.pwa-banner-close {
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 18px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pwa-banner-body {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.45;
  margin-bottom: 12px;
}

.pwa-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border2);
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: 700;
  color: var(--text);
}

.pwa-banner-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ═══════════════════════════════════════════════
   4. NETWORK STATUS PILL (Online / Offline)
   ═══════════════════════════════════════════════ */
.network-status-pill {
  position: fixed;
  top: calc(8px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(-60px);
  z-index: 9999;
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
  opacity: 0;
  pointer-events: none;
  max-width: 90%;
  white-space: nowrap;
}

.network-status-pill.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.network-status-pill.offline {
  background: #FEF2F2;
  color: #DC2626;
  border: 1.5px solid #FCA5A5;
}

.network-status-pill.online {
  background: #ECFDF5;
  color: #047857;
  border: 1.5px solid #A7F3D0;
}

.network-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.5; }
}

/* ═══════════════════════════════════════════════
   5. TOGGLE SWITCH & AVOIRS / FACTURE UI
   ═══════════════════════════════════════════════ */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border2, #CBD5E1);
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 9999px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--primary, #059669);
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.badge-invoice {
  background: #FEF3C7;
  color: #92400E;
  font-weight: 800;
  font-size: 12.5px;
  border: 1px solid #FCD34D;
  border-radius: 6px;
  padding: 2px 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-avoir {
  background: #DCFCE7;
  color: #166534;
  font-weight: 800;
  font-size: 12.5px;
  border: 1px solid #86EFAC;
  border-radius: 6px;
  padding: 2px 7px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ═══════════════════════════════════════════════
   MODERN LIGHTBOX PHOTO VIEWER (STYLE MOBILE/WHATSAPP)
   ═══════════════════════════════════════════════ */
.modern-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999 !important;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 16px calc(14px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  animation: lbFadeIn 0.2s ease-out;
}

@keyframes lbFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.modern-lightbox-header {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 10px 10px;
  box-sizing: border-box;
  z-index: 10;
}

.modern-lightbox-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.92);
  font-weight: 700;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 65%;
}

.modern-lightbox-close-btn {
  background: rgba(239, 68, 68, 0.92);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 24px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.modern-lightbox-close-btn:hover {
  background: #DC2626;
  transform: scale(1.04);
}

.modern-lightbox-close-btn:active {
  transform: scale(0.96);
}

.modern-lightbox-stage {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  touch-action: none;
}

.modern-lightbox-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: 100%;
  transform-origin: center center;
  will-change: transform;
}

.modern-lightbox-img-wrap img {
  max-width: 95vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  pointer-events: none;
  display: block;
}

/* ═══════════════════════════════════════════════
   ÉCRANS MOBILES ÉTROITS & FINITIONS RESPONSIVES (Étape 4)
   Optimisation pour smartphones de 320px à 390px (iPhone SE, Galaxy A, etc.)
   ═══════════════════════════════════════════════ */
@media (max-width: 390px) {
  /* En-tête portefeuille compact */
  .wallet-header {
    margin: calc(10px + env(safe-area-inset-top, 0px)) 10px 0;
    padding: 16px 14px;
    border-radius: 18px;
  }
  
  .wh-balance-amount {
    font-size: 27px;
    gap: 8px 10px;
  }
  
  .wh-eye-btn {
    padding: 4px 10px;
    font-size: 12.5px;
  }

  .wh-glass-btn {
    padding: 4px 8px;
    font-size: 12px;
  }

  /* Contenu de page & marges */
  .page-content {
    padding: 12px 10px calc(115px + env(safe-area-inset-bottom, 24px));
    gap: 12px;
  }

  /* Grille des actions rapides d'accueil */
  .hero-actions-grid {
    gap: 12px 2px;
  }

  .hero-action-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
  }

  .hero-action-label {
    font-size: 12px;
    letter-spacing: -0.3px;
  }

  /* Cartes de dette & historiques */
  .debt-card {
    padding: 13px 11px;
    margin-bottom: 12px;
    border-radius: 14px;
  }

  .feed-item {
    padding: 12px 10px;
    gap: 9px;
  }

  .feed-icon {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .feed-title {
    font-size: 12px;
  }

  .feed-sub {
    font-size: 12px;
  }

  .feed-amount {
    font-size: 13px;
  }

  /* Barre de navigation basse pour écrans étroits */
  .bottom-nav {
    width: calc(100% - 16px);
    padding: 5px 4px;
    border-radius: 32px;
  }

  .nav-item {
    font-size: 12px;
    min-height: 48px;
  }

  .nav-center-btn {
    width: 46px;
    height: 46px;
  }

  .nav-center-label {
    font-size: 12px;
  }

  /* Carte de connexion */
  .login-card {
    padding: 20px 14px;
    border-radius: 20px;
  }

  .login-title {
    font-size: 21px;
  }

  /* Bottom sheet modales sur petits écrans */
  .modal-box, .modal-content {
    padding: 12px 14px calc(34px + env(safe-area-inset-bottom, 16px)) !important;
  }
}

/* ═══════════════════════════════════════════════
   MICRO-INTERACTIONS & SÉCURITÉ TACTILE
   ═══════════════════════════════════════════════ */
button, [role="button"], .btn, .link-btn, .feed-item, .debt-card, .wh-glass-btn, .wh-bell, .wh-avatar, .tab-pill, .nav-item {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* Empêche les dépassements horizontaux d'éléments mono (chiffres longs, badges) */
.mono {
  word-break: normal;
  overflow-wrap: normal; /* v11.29 : un montant n'est plus coupé (« 40 000 » / « F ») */
  white-space: nowrap;
}



/* Icône contrainte à la taille de sa case (bouton « Payer » de la messagerie) */
.btn-icon-fit svg { width: 100%; height: 100%; }

/* ═══════════════════════════════════════════════
   DETTES : AJOUT D'UN CONTACT DU RÉPERTOIRE
   ═══════════════════════════════════════════════ */
.debt-search-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.debt-contact-plus {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: none;
  background: var(--green-600);
  color: #FFFFFF;
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}
.debt-contact-plus:active { transform: scale(0.92); }

.debt-contact-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  min-width: 210px;
  background: #FFFFFF;
  border: 1px solid var(--border2);
  border-radius: 12px;
  box-shadow: var(--shadow-md, 0 8px 24px rgba(0, 0, 0, 0.12));
  padding: 6px;
  display: flex;
  flex-direction: column;
}
.debt-contact-menu button {
  text-align: left;
  background: none;
  border: none;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}
.debt-contact-menu button:active,
.debt-contact-menu button:hover { background: var(--green-50); }

.debt-ext-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: #1D4ED8;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  border-radius: 8px;
  padding: 0 6px;
  margin-left: 4px;
  vertical-align: middle;
}

/* ═══════════════════════════════════════════════
   NOTE PRIVÉE DU DESTINATAIRE
   ═══════════════════════════════════════════════ */
.pnote-add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1.5px dashed var(--border2);
  background: #FFFFFF;
  color: var(--green-700);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.pnote-saved {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #FEFCE8;
  border: 1px solid #FDE68A;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  font-size: 13px;
}
.pnote-label { font-weight: 800; color: #854D0E; font-size: 13px; }
.pnote-text { flex: 1; min-width: 0; color: #422006; white-space: pre-wrap; word-break: break-word; }
.pnote-link { background: none; border: none; color: var(--green-700); font-weight: 700; font-size: 13px; cursor: pointer; padding: 0; }
.pnote-editor {
  margin-top: 10px;
  padding: 10px;
  border-radius: 10px;
  background: #FEFCE8;
  border: 1px solid #FDE68A;
}
.pnote-editor textarea {
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1.5px solid #FDE68A;
  font-size: 14px;
  font-family: var(--font-sans);
  resize: vertical;
  background: #FFFFFF;
  color: var(--text);
}
.pnote-hint { font-size: 12px; color: #854D0E; font-weight: 600; }
.pnote-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

/* ═══════════════════════════════════════════════
   PIÈCES JOINTES MULTIPLES (formulaires)
   ═══════════════════════════════════════════════ */
.att-picker { margin-bottom: 20px; }
.att-empty {
  background: var(--surface);
  border: 2px dashed var(--border2);
  border-radius: 16px;
  padding: 18px;
  text-align: center;
  cursor: pointer;
}
.att-empty-icon { font-size: 26px; margin-bottom: 6px; }
.att-empty-title { font-weight: 800; font-size: 14px; color: var(--text); }
.att-empty-hint { font-size: 13px; color: var(--text-3); margin-top: 4px; }
.att-empty-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.att-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px;
}
.att-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--green-500);
  background: var(--bg);
}
.att-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.att-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(220, 38, 38, 0.92);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.att-add {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 2px dashed var(--border2);
  background: var(--surface);
  color: var(--green-700);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
}
.att-add-plus { font-size: 24px; line-height: 1; }
.att-count { font-size: 12.5px; color: var(--text-3); font-weight: 600; margin-top: 6px; }

/* Pièces jointes affichées sur une opération / une dette */
.att-view { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.att-view img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border2);
  cursor: zoom-in;
}

/* ═══════════════════════════════════════════════
   DOCUMENTS DU COMPTE (CNI, boutique, contrat)
   ═══════════════════════════════════════════════ */
.acc-docs {
  background: var(--surface);
  border: 1.5px solid var(--border2);
  border-radius: 12px;
  padding: 12px;
  margin: 4px 0 14px;
}
.acc-docs-title { font-size: 13px; font-weight: 800; color: var(--text); margin-bottom: 10px; }
.acc-docs-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.acc-doc {
  background: var(--bg);
  border: 1.5px dashed var(--border2);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.acc-doc.is-set { border-style: solid; border-color: var(--green-500); }
.acc-doc-label { font-size: 12.5px; font-weight: 800; color: var(--text-2); }
.acc-doc-req { font-size: 12px; font-weight: 700; color: var(--danger); }
.acc-doc-opt { font-size: 12px; font-weight: 600; color: var(--text-3); }
.acc-doc-img { position: relative; height: 84px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.acc-doc-img img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.acc-doc-btn {
  width: 100%;
  padding: 9px 6px;
  border-radius: 8px;
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--green-700);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}
.acc-doc-btn:disabled { opacity: 0.6; }
.acc-doc-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; }
.acc-doc-page { position: relative; aspect-ratio: 3 / 4; border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.acc-doc-page img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.acc-doc-page .att-remove, .acc-doc-img .att-remove { width: 24px; height: 24px; font-size: 12px; top: 3px; right: 3px; }
.acc-doc-empty { font-size: 13px; color: var(--text-3); font-weight: 600; padding: 6px 0; }
.acc-fiche { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border2); }
.acc-fiche-block { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.acc-fiche-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Fiche : documents du compte en 4 cases identiques */
.doc-card { padding: 16px; margin: 0 0 16px; }
.doc-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.doc-card-title { font-size: 15px; font-weight: 800; color: var(--text); }
.doc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.doc-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 8px;
  border-radius: 12px;
  border: 1.5px dashed var(--border2);
  background: var(--bg);
}
.doc-tile.has-photo { border-style: solid; border-color: #A7F3D0; background: #FFFFFF; }
.doc-tile-head { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; font-size: 13px; font-weight: 800; color: var(--text-2); }
.doc-tile-head span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-tile-media {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  border: none;
  padding: 0;
  background: #F1F5F9;
  cursor: zoom-in;
  display: block;
}
.doc-tile-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.doc-tile-media.is-empty {
  cursor: pointer;
  background: var(--surface);
  border: 1px dashed var(--border2);
  color: var(--green-700);
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.doc-tile-media.is-empty:disabled { cursor: default; color: var(--text-3); }
.doc-tile-media.is-pages { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 3px; background: #E2E8F0; cursor: default; }
.doc-tile-media.is-pages.pages-1 { grid-template-columns: 1fr; }
.doc-tile-media.is-pages.pages-2 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr; }
.doc-page { position: relative; overflow: hidden; background: #F1F5F9; }
.doc-page img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.doc-page-del {
  position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: none;
  background: rgba(220, 38, 38, 0.9); color: #FFFFFF; font-size: 11px; font-weight: 800; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.doc-page-more {
  position: absolute; inset: 0; background: rgba(15, 23, 42, 0.55); color: #FFFFFF; font-size: 16px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; pointer-events: none;
}
.doc-tile-actions { display: flex; gap: 6px; }
.doc-tile-btn {
  flex: 1;
  padding: 7px 4px;
  border-radius: 8px;
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--green-700);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}
.doc-tile-btn.is-danger { flex: 0 0 38px; color: var(--danger); border-color: #FECACA; background: #FEF2F2; }
.doc-tile-btn:disabled { opacity: 0.6; }
.doc-tile-note { font-size: 12.5px; color: var(--text-3); font-weight: 700; padding: 6px 2px; white-space: nowrap; align-self: center; }

/* ═══════════════════════════════════════════════
   PAGE EMPLOYÉS : CARTE D'UN EMPLOYÉ
   ═══════════════════════════════════════════════ */
.emp-card { padding: 14px; margin: 0; }
.emp-card.is-inactive { opacity: 0.75; background: #F8FAFC; }
.emp-head { display: flex; align-items: center; gap: 10px; }
.emp-head > :first-child { flex-shrink: 0; }
.emp-id { flex: 1; min-width: 0; }
.emp-name { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; }
.emp-name b { font-size: 16px; color: var(--text); }
.emp-name .badge { font-size: 12px; padding: 1px 7px; }
.emp-sub { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.emp-muted { color: var(--text-3); }
.emp-ok { color: var(--green-700); }
.emp-warn { color: #B45309; }
.emp-balance { flex-shrink: 0; text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.emp-balance span { font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.4px; }
.emp-balance b { font-size: 17px; font-weight: 900; color: var(--green-700); white-space: nowrap; }
.emp-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.emp-stats > div { background: #F0FDF4; border: 1px solid #BBF7D0; border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.emp-stats span { font-size: 12px; font-weight: 700; color: #166534; }
.emp-stats b { font-size: 15px; font-weight: 900; color: #065F46; }
.emp-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.emp-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.emp-tab {
  padding: 8px 4px;
  border-radius: 10px;
  border: 1px solid var(--border2);
  background: var(--surface);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}
.emp-tab.is-active { background: var(--green-600); border-color: var(--green-600); color: #FFFFFF; }
.emp-panel { margin-top: 10px; padding: 12px; border-radius: 12px; background: var(--green-50); border: 1px solid var(--green-200); }
.emp-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 13px; font-weight: 800; color: var(--text); text-transform: uppercase; letter-spacing: 0.3px; }
.emp-panel-close { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border2); background: #FFFFFF; color: var(--text-2); font-weight: 800; cursor: pointer; }
.emp-save { width: 100%; margin-top: 12px; }
.emp-switches { display: flex; flex-direction: column; background: #FFFFFF; border: 1px solid var(--border2); border-radius: 10px; overflow: hidden; }
.emp-switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; font-size: 14px; font-weight: 700; color: var(--text); cursor: pointer; }
.emp-switch + .emp-switch { border-top: 1px solid var(--border); }
.emp-switch input {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #CBD5E1;
  position: relative;
  cursor: pointer;
  transition: background 0.15s;
  margin: 0;
}
.emp-switch input::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s;
}
.emp-switch input:checked { background: var(--green-600); }
.emp-switch input:checked::after { transform: translateX(18px); }
.emp-panel .checkbox-label {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.emp-money-inputs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; } /* v11.41 : Montant puis Motif + micro, l'un sous l'autre */
.emp-money-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.emp-btn-credit { background: var(--green-600); color: #FFFFFF; border: none; font-weight: 800; }
.emp-btn-debit { background: #FFFFFF; color: var(--danger); border: 1px solid var(--danger); font-weight: 800; }
.emp-btn-dark { background: #1E293B; color: #FFFFFF; border: none; font-weight: 800; }
.emp-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border2); }
.emp-link { background: none; border: none; padding: 4px 2px; font-size: 13px; font-weight: 700; color: var(--text-3); cursor: pointer; }
.emp-link.is-danger { color: var(--danger); }
.emp-link:disabled { opacity: 0.5; }
.emp-money-inputs .amount-words-helper:empty { display: none; }

/* Formulaire de réglages d'un employé (panneau Limites + configuration avancée de la création) */
.settings-section {
  background: #FFFFFF;
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
}
.settings-section-title { font-size: 14px; font-weight: 800; color: var(--text); margin-bottom: 10px; }
.settings-note { font-size: 12.5px; color: var(--text-3); margin: -4px 0 10px; line-height: 1.4; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.settings-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.settings-field label { font-size: 12.5px; font-weight: 700; color: var(--text-2); line-height: 1.3; }
.settings-field input,
.settings-field select { width: 100%; margin: 0; min-width: 0; padding: 10px 12px; font-size: 14px; }
.settings-checkboxes { display: flex; flex-direction: column; gap: 8px; }
.settings-checkboxes .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13.5px;
  line-height: 1.4;
}
.settings-checkboxes .checkbox-label input { margin-top: 2px; flex-shrink: 0; }
.settings-field { justify-content: flex-end; }

/* Éditeur d'accès aux fonctionnalités (Admin) */
.access-editor { display: flex; flex-direction: column; gap: 10px; }
.access-editor-head { display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 800; color: var(--text); }
.access-count { font-size: 12.5px; font-weight: 800; color: var(--green-700); background: var(--green-50); border: 1px solid var(--green-200); border-radius: 999px; padding: 2px 8px; }
.access-templates { display: flex; flex-wrap: wrap; gap: 6px; }
.access-tpl {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border2);
  background: #FFFFFF;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.access-tpl.is-active { background: var(--green-600); border-color: var(--green-600); color: #FFFFFF; }
.access-editor-sub { font-size: 13px; font-weight: 800; color: var(--text-2); margin-top: 4px; }
.access-warn { font-size: 13px; font-weight: 600; color: #92400E; background: #FFFBEB; border: 1px solid #FDE68A; border-radius: 10px; padding: 8px 10px; }

/* ─── Banque : bloc « Collaborateurs » d'un compte (v11.10) ─── */
.bk-share { background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 20px; padding: 16px; margin-bottom: 22px; box-shadow: 0 4px 18px -2px rgba(15,23,42,0.05); }
.bk-share-head { display: flex; align-items: center; gap: 12px; }
.bk-share-icon { flex: 0 0 40px; height: 40px; border-radius: 12px; background: #ECFDF5; border: 1px solid #A7F3D0; display: flex; align-items: center; justify-content: center; font-size: 19px; }
.bk-share-titles { flex: 1; min-width: 0; }
.bk-share-title { font-size: 15px; font-weight: 800; color: #0F172A; line-height: 1.2; }
.bk-share-sub { font-size: 12.5px; color: #64748B; margin-top: 2px; line-height: 1.35; }
.bk-share-count { flex: 0 0 auto; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: #ECFDF5; color: #047857; border: 1px solid #A7F3D0; white-space: nowrap; }
.bk-share-count.is-private { background: #F1F5F9; color: #475569; border-color: #E2E8F0; }
.bk-share-empty { margin-top: 14px; padding: 14px; border: 1.5px dashed #CBD5E1; border-radius: 14px; background: #F8FAFC; display: flex; flex-direction: column; gap: 12px; }
.bk-share-empty-text { font-size: 13px; color: #475569; line-height: 1.45; }
.bk-share-empty-text b { color: #0F172A; }
.bk-share-invite { width: 100%; justify-content: center; border-radius: 12px; padding: 11px 14px; font-size: 14px; font-weight: 800; }
.bk-share-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.bk-member { border: 1px solid #E2E8F0; background: #F8FAFC; border-radius: 14px; padding: 10px 12px; }
.bk-member.is-pending { border-color: #FDE68A; background: #FFFBEB; }
.bk-member-top { display: flex; align-items: center; gap: 10px; }
.bk-member-avatar { flex: 0 0 34px; height: 34px; border-radius: 50%; background: #DCFCE7; color: #15803D; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 900; }
.bk-member.is-pending .bk-member-avatar { background: #FEF3C7; color: #92400E; }
.bk-member-info { min-width: 0; flex: 1; }
.bk-member-name { font-size: 14px; font-weight: 800; color: #0F172A; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-member-status { font-size: 12.5px; color: #64748B; margin-top: 1px; }
.bk-member.is-pending .bk-member-status { color: #92400E; }
.bk-member-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
@media (min-width: 480px) { .bk-member-actions { padding-left: 44px; } }
.bk-chip { font: inherit; font-size: 12.5px; font-weight: 800; padding: 6px 12px; border-radius: 999px; border: 1px solid #E2E8F0; background: #FFFFFF; color: #0F172A; cursor: pointer; }
.bk-chip-warn { color: #B45309; border-color: #FCD34D; background: #FFFBEB; }
.bk-chip-danger { color: var(--danger); border-color: #FECACA; background: var(--danger-bg); }
.bk-share-add { margin-top: 10px; width: 100%; padding: 10px 14px; border-radius: 12px; border: 1.5px dashed #A7F3D0; background: #F0FDF4; color: #047857; font: inherit; font-size: 13.5px; font-weight: 800; cursor: pointer; }

/* ─── Banque : barre du haut d'un compte (v11.11) ─── */
.bk-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 14px; }
.bk-tb-group { display: flex; align-items: center; gap: 6px; }
.bk-tb-btn { font: inherit; font-size: 13px; font-weight: 800; height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid #E2E8F0; background: #FFFFFF; color: #0F172A; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; cursor: pointer; box-shadow: 0 1px 2px rgba(15,23,42,0.04); }
.bk-tb-back { background: #F8FAFC; color: #475569; }
.bk-tb-share { background: #ECFDF5; color: #047857; border-color: #A7F3D0; }
.bk-tb-del { width: 38px; padding: 0; justify-content: center; background: var(--danger-bg); border-color: #FECACA; font-size: 15px; }

/* ─── Dettes : historique complet d'une dette (chronologie, v11.13) ─── */
.dh-summary { display: flex; flex-direction: column; gap: 4px; background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 12px; padding: 10px 12px; }
.dh-summary > div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: #334155; }
.dh-summary b { color: #0F172A; }
.dh-summary .dh-sum-total { border-top: 1px dashed #CBD5E1; padding-top: 4px; font-weight: 800; }
.dh-head { font-size: 13px; font-weight: 800; color: #475569; text-transform: uppercase; letter-spacing: 0.4px; margin: 4px 0 10px; }
.dh-timeline { position: relative; display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; padding-left: 14px; border-left: 2px solid #E2E8F0; }
.dh-item { position: relative; background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 12px; padding: 10px 12px; }
.dh-item::before { content: ""; position: absolute; left: -21px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: #94A3B8; border: 2px solid #FFFFFF; box-shadow: 0 0 0 1px #CBD5E1; }
.dh-origin { border-color: #A7F3D0; background: #F0FDF4; } .dh-origin::before { background: #059669; }
.dh-old { border-color: #FDE68A; background: #FFFBEB; } .dh-old::before { background: #D97706; }
.dh-add { border-color: #BFDBFE; background: #EFF6FF; } .dh-add::before { background: #2563EB; }
.dh-pay::before { background: #16A34A; }
.dh-declined { opacity: 0.7; } .dh-declined::before { background: #DC2626; }
.dh-date { font-size: 12px; color: #64748B; margin-bottom: 3px; }
.dh-title { font-size: 13.5px; font-weight: 800; color: #0F172A; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dh-sub { font-size: 12.5px; color: #475569; margin-top: 3px; }
.dh-motif { font-size: 12.5px; color: #475569; font-style: italic; margin-top: 3px; }
.dh-amounts { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: #334155; margin-top: 4px; }
.dh-minus { color: #15803D; }
.dh-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: #334155; margin-top: 5px; }
.dh-plus { font-family: var(--font-mono, monospace); font-weight: 900; color: #1D4ED8; background: #DBEAFE; border-radius: 999px; padding: 1px 8px; }
.dh-inv { font-size: 12.5px; color: #1E3A8A; background: #F8FAFC; border: 1px dashed #BFDBFE; border-radius: 8px; padding: 5px 8px; margin-top: 5px; }
.dh-ref { font-family: var(--font-mono, monospace); font-weight: 800; color: #1E40AF; }
.dh-st { font-size: 12px; font-weight: 800; border-radius: 999px; padding: 1px 8px; }
.dh-st.ok { background: #DCFCE7; color: #166534; } .dh-st.no { background: #FEE2E2; color: #991B1B; } .dh-st.wait { background: #FEF3C7; color: #92400E; }
.dh-item .att-view, .dh-item .chat-attachment, .dh-item img { margin-top: 6px; }

/* ─── Dettes : case « champ 6 » / compensation (v11.14, design v11.15) ─── */
.ded-box { margin-bottom: 16px; background: #FFFFFF; border: 1.5px solid #A7F3D0; border-radius: 16px; padding: 14px; box-shadow: 0 2px 10px rgba(16,185,129,0.07); transition: border-color .2s, background .2s; }
.ded-box.is-off { background: #F8FAFC; border-color: #E2E8F0; box-shadow: none; }
.ded-head { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; margin: 0; }
.ded-ico { flex: 0 0 40px; height: 40px; border-radius: 12px; background: #ECFDF5; border: 1px solid #A7F3D0; display: flex; align-items: center; justify-content: center; font-size: 19px; }
.ded-box.is-off .ded-ico { background: #F1F5F9; border-color: #E2E8F0; filter: grayscale(1); opacity: .7; }
.ded-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ded-step { font-size: 12px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; color: #059669; }
.ded-txt b { font-size: 15px; font-weight: 800; color: #0F172A; line-height: 1.3; }
.ded-txt small { font-size: 13px; color: #475569; line-height: 1.45; }
.ded-pill { align-self: flex-start; margin-top: 4px; font-size: 12.5px; font-weight: 800; color: #047857; background: #ECFDF5; border: 1px solid #A7F3D0; border-radius: 999px; padding: 3px 10px; }
.ded-box.is-off .ded-step, .ded-box.is-off .ded-txt b { color: #94A3B8; }
.ded-note { margin-top: 10px; padding: 9px 12px; background: #F0FDF4; border: 1px solid #BBF7D0; border-radius: 10px; font-size: 13px; line-height: 1.45; font-weight: 600; color: #166534; }
.ded-box.is-off .ded-note { background: #F1F5F9; border-color: #E2E8F0; color: #475569; }
.ded-box.is-off .ded-pill { color: #94A3B8; background: #F1F5F9; border-color: #E2E8F0; text-decoration: line-through; }
/* Interrupteur */
.ded-switch { position: relative; flex: 0 0 48px; width: 48px; height: 28px; margin-top: 6px; }
.ded-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.ded-switch i { position: absolute; inset: 0; border-radius: 999px; background: #CBD5E1; transition: background .2s; }
.ded-switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.ded-switch input:checked + i { background: #059669; }
.ded-switch input:checked + i::after { transform: translateX(20px); }
.ded-switch input:focus-visible + i { outline: 2px solid #34D399; outline-offset: 2px; }
/* Montant (champ 6) */
.ded-amount-label { margin: 12px 0 6px; font-size: 12.5px; font-weight: 800; color: #475569; }
.ded-box input[type=text] { min-height: 44px !important; font-size: 16px !important; border-radius: 12px !important; }
.ded-box.is-off input[type=text] { background: #F1F5F9 !important; color: #94A3B8 !important; text-decoration: line-through; border-color: #E2E8F0 !important; }
.ded-box .amount-words-helper { display: none !important; }

/* ─── Superviseur des factures (v11.17) ─── */
.sup-pick { margin-top: 12px; border: 1.5px solid #E2E8F0; background: #F8FAFC; border-radius: 14px; padding: 12px; }
.sup-pick.is-on { border-color: #BFDBFE; background: #EFF6FF; }
.sup-pick-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.sup-pick-ico { flex: 0 0 36px; height: 36px; border-radius: 10px; background: #FFFFFF; border: 1px solid #E2E8F0; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.sup-pick-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sup-pick-txt b { font-size: 14px; font-weight: 800; color: #0F172A; }
.sup-pick-txt small { font-size: 12.5px; color: #475569; line-height: 1.4; }
.sup-pick-select { width: 100%; min-height: 44px; border: 1.5px solid #CBD5E1; border-radius: 12px; padding: 0 12px; font: inherit; font-size: 14.5px; font-weight: 700; color: #0F172A; background: #FFFFFF; }
.sup-banner { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 10px 12px; border-radius: 12px; background: #EFF6FF; border: 1px solid #BFDBFE; font-size: 13px; color: #1E3A8A; line-height: 1.45; }
.sup-banner-ico { font-size: 18px; line-height: 1.2; }
.sup-box { margin-bottom: 14px; border-color: #93C5FD; background: #EFF6FF; }
.sup-box-mine { border-color: #E2E8F0; background: #F8FAFC; }
.sup-box-title { margin-top: 0; color: #1E40AF; }
.sup-box-note { margin-bottom: 12px; color: #1D4ED8; }
.sup-card { margin-bottom: 8px; background: #FFFFFF; border-left: 4px solid #3B82F6; }
.sup-card.is-rejected { border-left-color: #DC2626; }
.sup-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: #0F172A; }
.sup-card-date { font-size: 12.5px; color: #64748B; margin-top: 3px; }
.sup-card-amount { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 8px; font-size: 13px; color: #334155; }
.sup-card-amount b { font-size: 17px; color: #0F172A; }
.sup-card-note { font-size: 12.5px; color: #475569; margin-top: 5px; }
.sup-card-actions { display: flex; gap: 8px; margin-top: 12px; }
.sup-card-actions .btn { flex: 1; font-weight: 800; }
.sup-btn-reject { color: var(--danger); border: 1.5px solid var(--danger); background: transparent; }
.sup-reason { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; font-size: 13px; font-weight: 600; }
.sup-st { font-size: 12px; font-weight: 800; border-radius: 999px; padding: 2px 8px; }
.sup-st.wait { background: #DBEAFE; color: #1E40AF; } .sup-st.no { background: #FEE2E2; color: #991B1B; }
.sup-verified { background: #DBEAFE; color: #1E40AF; font-weight: 800; font-size: 12px; }

/* ─── Factures : détail des articles (v11.18) ─── */
.inv-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #F1F5F9; border: 1.5px solid #E2E8F0; border-radius: 12px; padding: 4px; margin-bottom: 10px; }
.inv-seg button { font: inherit; font-size: 13px; font-weight: 800; padding: 10px 6px; border-radius: 9px; border: 1.5px solid transparent; background: transparent; color: #475569; cursor: pointer; }
.inv-seg button.is-active { background: #FFFFFF; border-color: #A7F3D0; color: #047857; box-shadow: 0 1px 4px rgba(15,23,42,0.08); }
.inv-items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.inv-item { background: #FFFFFF; border: 1.5px solid #E2E8F0; border-radius: 14px; padding: 10px 12px 12px; box-shadow: 0 1px 3px rgba(15,23,42,0.04); }
.inv-item-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.inv-item-num { font-size: 12.5px; font-weight: 800; color: #047857; text-transform: uppercase; letter-spacing: 0.4px; }
.inv-item-del { width: 28px; height: 28px; border-radius: 50%; border: none; background: #FEE2E2; color: #B91C1C; font-weight: 900; cursor: pointer; line-height: 1; }
.inv-item-name { width: 100%; box-sizing: border-box; min-height: 44px; padding: 0 12px; border: 1.5px solid #CBD5E1; border-radius: 10px; font: inherit; font-size: 15px; font-weight: 700; color: #0F172A; background: #FFFFFF; }
.inv-item-calc { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 8px; margin-top: 8px; }
.inv-item-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.inv-item-field span { font-size: 12px; font-weight: 700; color: #64748B; }
.inv-item-field input { width: 100%; box-sizing: border-box; min-height: 44px; padding: 0 10px; border: 1.5px solid #CBD5E1; border-radius: 10px; font: inherit; font-size: 15px; font-weight: 800; color: #0F172A; background: #FFFFFF; text-align: right; }
.inv-item-linetotal { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: #F0FDF4; font-size: 12.5px; font-weight: 700; color: #475569; }
.inv-item-total { font-size: 15px; color: #047857; }
.inv-item-add { font: inherit; font-size: 14px; font-weight: 800; color: #047857; background: #F0FDF4; border: 1.5px dashed #6EE7B7; border-radius: 12px; padding: 11px; cursor: pointer; }
.inv-items-sum { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: 12px; background: #ECFDF5; border: 1px solid #A7F3D0; font-size: 13.5px; font-weight: 800; color: #065F46; }
.inv-items-sum b { font-size: 17px; color: #064E3B; }
input.inv-total-locked { background: #F1F5F9 !important; color: #475569 !important; }
/* Affichage d'une facture enregistrée */
.inv-table { margin-top: 6px; border: 1px solid #E2E8F0; border-radius: 10px; background: #FFFFFF; overflow: hidden; }
.inv-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 10px; font-size: 13px; color: #334155; border-top: 1px solid #F1F5F9; }
.inv-row:first-child { border-top: none; }
.inv-row-name { min-width: 0; }
.inv-row-name small { color: #64748B; }
.inv-row-total { background: #F8FAFC; font-weight: 800; color: #0F172A; }

/* Dernières opérations : opération sans mouvement sur mon solde (carnet, compensation, entre employés) — audit v11.19 */
.feed-amount.neutral { color: #475569; }
/* Note privée dans la chronologie d'une dette (v11.21) */
.dh-note { margin-top: 5px; padding: 6px 9px; border-radius: 8px; background: #FEFCE8; border: 1px solid #FDE68A; color: #854D0E; font-size: 12.5px; }

/* ─── Responsive : en-tête des cartes de dettes (v11.22) ─── */
.dc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.dc-amount { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.dc-impact { font-size: 12px; font-weight: 700; }
.dc-head { font-size: 14px; font-weight: 800; color: var(--text); line-height: 1.4; overflow-wrap: anywhere; }
.dc-badges { display: flex; gap: 6px; align-items: center; margin: 6px 0 8px; flex-wrap: wrap; }
.dc-badges .badge { max-width: 100%; }
.dc-breakdown { border-radius: 10px !important; line-height: 1.4; }
/* Carte « à valider » : le montant sur sa propre ligne au-dessus, la phrase sur toute la largeur */
.dc-row { display: flex !important; flex-direction: column; align-items: flex-start; gap: 4px; }
.dc-row .dc-row-amount { order: -1; font-size: 18px !important; }
.dc-row .dc-row-text { width: 100%; overflow-wrap: anywhere; line-height: 1.45; }

/* Défilement vers un champ ou un bouton : il s'arrête au-dessus de la barre du bas */
html { scroll-padding-bottom: calc(var(--nav-space, 115px) + env(safe-area-inset-bottom, 0px)); }
/* Dernières opérations : sur petit écran, montant au-dessus du bouton 📱 pour laisser la place au texte (v11.22) */
.feed-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }
.feed-info { min-width: 0; }
@media (max-width: 420px) {
  .feed-right { flex-direction: column; align-items: flex-end; gap: 4px; }
  .feed-recu-txt { display: none; }
}

/* ==========================================================================
   v11.31 — CONTOURS DES CHAMPS DE SAISIE BIEN VISIBLES (toute la plateforme)
   Demande client : contour net (contraste ≥ 3:1 avec le blanc), fond blanc, état actif très lisible.
   Prend le pas sur les bordures écrites dans le code (!important). Exclut cases, radios, fichiers,
   boutons, et les champs volontairement sans bordure (style inline « border:none »).
   ========================================================================== */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="hidden"]):not([type="color"]):not([style*="border:none"]):not([style*="border: none"]):not([style*="border:0"]),
textarea:not([style*="border:none"]):not([style*="border: none"]),
select:not([style*="border:none"]):not([style*="border: none"]) {
  border: 2px solid #64748B !important;
  background-color: #FFFFFF;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="button"]):not([type="submit"]):not([type="hidden"]):not([type="color"]):not([style*="border:none"]):not([style*="border: none"]):not([style*="border:0"]):focus,
textarea:not([style*="border:none"]):not([style*="border: none"]):focus,
select:not([style*="border:none"]):not([style*="border: none"]):focus {
  border-color: #059669 !important;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.25) !important;
  background-color: #FFFFFF;
}
input:disabled, textarea:disabled, select:disabled,
input[readonly]:not(.inv-total-locked) {
  border-color: #94A3B8 !important;
  background-color: #F1F5F9 !important;
}
input::placeholder, textarea::placeholder { color: #94A3B8; }
/* Champs de la carte article (fond vert pâle d'origine) : fond blanc, contour net */
.inv-item-name, .inv-item-field input { border: 2px solid #64748B !important; background-color: #FFFFFF !important; }
.inv-item-name:focus, .inv-item-field input:focus { border-color: #059669 !important; }

/* v11.32 — fenêtre « Envoyer sur WhatsApp » : 1er bouton pleine largeur, les autres sur 2 colonnes (le dernier s'étend s'il reste seul) */
.share-sec { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.share-sec > :first-child { grid-column: 1 / -1; }
.share-sec > :last-child:nth-child(even) { grid-column: 1 / -1; }

/* v11.35 — Vérificateur : Modifier la facture, refus écrit ou vocal */
.sup-actions-3 { flex-wrap: wrap; }
.sup-actions-3 .btn { flex: 1 1 0; width: auto; min-width: max-content; padding-left: 4px; padding-right: 4px; font-size: 13.5px; white-space: nowrap; }
.sup-btn-edit { color: #1D4ED8; border: 1.5px solid #93C5FD; background: #EFF6FF; }
.sup-edit, .sup-reject { margin-top: 10px; padding: 12px; border-radius: 12px; background: #F8FAFC; border: 1.5px solid #CBD5E1; display: flex; flex-direction: column; gap: 10px; }
.sup-reject { background: #FEF2F2; border-color: #FECACA; }
.sup-edit-title { font-size: 14px; font-weight: 800; color: var(--text); }
.sup-edit-note { font-size: 12.5px; color: #475569; }
.sup-ed-field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 700; color: #334155; }
.sup-ed-field input { width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 10px; font-size: 15px; }
.sup-edit-sum { background: #FFFFFF; border: 1px solid #E2E8F0; border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.sup-edit-sum > div { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.sup-edit-sum > div:nth-child(2) { color: #64748B; font-size: 12.5px; }
.sup-edit-net { border-top: 1px dashed #CBD5E1; padding-top: 4px; font-weight: 800; }
.sup-edit-net b { color: #047857; font-size: 16px; }
.sup-reject textarea { width: 100%; min-height: 60px; padding: 8px 12px; border-radius: 10px; font-size: 14px; resize: vertical; }
.sup-voice-rec { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sup-voice-rec audio { flex: 1 1 200px; min-width: 0; max-width: 100%; height: 40px; }
.sup-voice-rec .btn { width: auto; }
.sup-btn-mic { color: #B91C1C; border: 1.5px solid #FCA5A5; background: #FFFFFF; font-weight: 800; }
.sup-rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #DC2626; animation: supPulse 1s infinite; }
@keyframes supPulse { 50% { opacity: .3; } }
.sup-voice { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 700; color: #991B1B; }
.sup-changes { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: #334155; display: flex; flex-direction: column; gap: 3px; }

/* v11.36 — Fenêtre de refus commune : motif écrit et/ou vocal */
.refusal-box { max-width: 420px; text-align: left; }
.refusal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.refusal-head h3 { margin: 0; font-size: 16px; color: var(--text); }
.refusal-ico { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; background: #FEE2E2; color: #DC2626; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 900; }
.refusal-sub { font-size: 13px; color: var(--text-3); }
.refusal-msg { background: #FFF5F5; border: 1.5px solid #FED7D7; border-radius: 12px; padding: 12px; margin-bottom: 14px; font-size: 13px; color: #9B2C2C; line-height: 1.45; }
.refusal-card { margin-bottom: 14px; display: flex; flex-direction: column; gap: 8px; }
.refusal-card label { font-size: 12.5px; font-weight: 700; color: var(--text); }
.refusal-card textarea { width: 100%; min-height: 56px; padding: 8px 12px; border-radius: 10px; font-size: 14px; resize: vertical; }
.refusal-chips-label { font-size: 12.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; }
.refusal-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.refusal-chips .btn { width: auto; background: var(--surface); border: 1px solid var(--border2); font-size: 13px; padding: 5px 10px; border-radius: 8px; font-weight: 600; }
.refusal-voice { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.refusal-actions { display: flex; gap: 10px; }
.refusal-actions .btn { flex: 1; }
.refusal-confirm { flex: 1.2 !important; background: #DC2626; color: #FFFFFF; font-weight: 800; border: none; border-radius: 10px; padding: 10px; }
.refusal-voice-view { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 700; color: #991B1B; }
.refusal-banner { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }

/* v11.37 — Motif vocal (30 s) : bouton compact sous le champ motif, lecteur chez le destinataire */
.voice-slot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.voice-slot .btn { width: auto; }
.voice-slot audio { flex: 1 1 200px; min-width: 0; max-width: 100%; height: 40px; }
.voice-slot-max { font-size: 12px; color: var(--text-3); }
.voice-slot.is-rec { background: #FEF2F2; border: 1px solid #FECACA; border-radius: 10px; padding: 6px 10px; }
.motif-voice-view { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 700; color: #1D4ED8; }

/* v11.41 — Bouton micro rond À CÔTÉ du champ motif (partout) ; le vocal en cours / prêt s'affiche dessous */
.motif-voice-row { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; }
.motif-voice-row > input, .motif-voice-row > textarea { flex: 1 1 auto; min-width: 0; width: auto !important; margin: 0 !important; }
.motif-voice-row:has(> textarea) { align-items: flex-start; }
.voice-mic { flex: 0 0 48px; width: 48px; height: 48px; padding: 0; border-radius: 50%; border: 1.5px solid #FCA5A5; background: #FFFFFF; font-size: 20px; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 1px 3px rgba(185, 28, 28, 0.12); }
.voice-mic:disabled { opacity: .45; cursor: default; }
.voice-mic.is-rec { background: #DC2626; border-color: #DC2626; color: #FFFFFF; animation: supPulse 1s infinite; }
.voice-mic.has-voice { background: #ECFDF5; border-color: #10B981; box-shadow: 0 0 0 3px rgba(16, 185, 129, .18); }
.voice-panel { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.voice-panel .btn { width: auto; }
.voice-panel audio { flex: 1 1 200px; min-width: 0; max-width: 100%; height: 40px; }
.voice-panel.is-rec { background: #FEF2F2; border: 1px solid #FECACA; border-radius: 10px; padding: 6px 10px; font-size: 13px; color: #991B1B; font-weight: 700; }

/* v11.42 — Logo du bouton vocal : rond vert, micro foncé (modèle fourni par l'utilisateur) */
.voice-mic { position: relative; background: #5CC17C; border: none; color: #0F1F17; box-shadow: 0 2px 6px rgba(22, 101, 52, .25); }
.voice-mic:active { transform: scale(.94); }
.voice-mic.is-rec { background: #DC2626; color: #FFFFFF; border: none; }
.voice-mic.has-voice { background: #5CC17C; border: none; box-shadow: 0 0 0 3px rgba(16, 185, 129, .3); }
.voice-mic-ok { position: absolute; top: -3px; right: -3px; width: 18px; height: 18px; border-radius: 50%; background: #FFFFFF; color: #047857; font-size: 12px; font-weight: 900; line-height: 18px; text-align: center; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }

/* v11.44 — Commandes : client → gestionnaire → Dépôt → facture */
.ord-tabs { display: grid; gap: 8px; margin-bottom: 14px; }
.ord-tab { border-radius: 12px; padding: 12px 6px; font-weight: 800; font-size: 13px; min-width: 0; }
.ord-card { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; text-align: left; }
.ord-card.is-new { border: 2px solid #FCD34D; }
.ord-card.is-ready { border: 1.5px solid #6EE7B7; }
.ord-open { width: 100%; font: inherit; color: inherit; cursor: pointer; }
.ord-label { font-size: 12.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--text-3); }
.ord-muted { font-size: 13px; color: var(--text-3); line-height: 1.4; }
.ord-row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.ord-managers { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.ord-mgr { border: 1.5px solid var(--border2); background: var(--surface); border-radius: 14px; padding: 10px 4px; display: flex; flex-direction: column; align-items: center; gap: 6px; font: inherit; font-size: 13px; font-weight: 700; color: var(--text); cursor: pointer; }
.ord-mgr.is-on { border: 2.5px solid #059669; background: #ECFDF5; color: #047857; font-weight: 800; }
.ord-avatar { width: 38px; height: 38px; border-radius: 50%; background: #E8F5EE; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #047857; }
.ord-mgr.is-on .ord-avatar { background: #059669; color: #FFFFFF; }
.ord-line-head, .ord-line { display: grid; grid-template-columns: 64px minmax(0, 1fr) 36px; gap: 8px; align-items: center; }
.ord-line-head { font-size: 12px; font-weight: 700; color: var(--text-3); }
.ord-line input { width: 100%; min-width: 0; margin: 0; min-height: 46px; }
.ord-line input:first-child { text-align: center; font-weight: 800; font-size: 17px; }
.ord-del { width: 36px; height: 36px; border-radius: 50%; border: none; background: #FEE2E2; color: #B91C1C; font-weight: 800; cursor: pointer; }
.ord-add { border: 1.5px dashed #6EE7B7; background: #F3FBF6; color: #047857; font-weight: 800; font-size: 14px; border-radius: 12px; padding: 11px; font-family: inherit; cursor: pointer; }
.ord-send { width: 100%; padding: 15px; font-size: 16px; font-weight: 800; border-radius: 999px; margin-bottom: 16px; }
.ord-pill { display: inline-block; font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.ord-pill.is-wait { background: #FFF3DC; color: #9A5B00; }
.ord-pill.is-ok { background: #DCF3E6; color: #047857; }
.ord-pill.is-bad { background: #FEE2E2; color: #B42318; }
.ord-pill.is-muted { background: #EEF3F0; color: #4B6B5C; }
.ord-pill.is-me { background: #EAF1FF; color: #1D4ED8; }
.ord-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.ord-step { display: flex; flex-direction: column; gap: 4px; }
.ord-step span { height: 6px; border-radius: 3px; background: #E2EEE7; }
.ord-step.is-done span { background: #059669; }
.ord-step.is-now span { background: #F59E0B; }
.ord-step small { font-size: 12px; color: var(--text-3); font-weight: 700; line-height: 1.2; }
.ord-step.is-now small { color: #9A5B00; }
.ord-lines-ro { display: flex; flex-direction: column; gap: 3px; font-size: 14px; background: #F7FAF8; border-radius: 10px; padding: 8px 10px; }
.ord-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.ord-actions .btn { width: auto; min-width: 0; }
.ord-btn-danger { color: var(--danger); border: 1.5px solid #FCA5A5; background: #FEF2F2; }
.ord-btn-edit { width: auto; align-self: flex-start; color: #1D4ED8; border: 1.5px solid #93C5FD; background: #EFF6FF; font-weight: 800; padding: 6px 12px; }
.ord-info { font-size: 13px; color: #065F46; background: #ECFDF5; border: 1px solid #A7F3D0; border-radius: 10px; padding: 8px 10px; line-height: 1.4; }
.ord-warn { font-size: 13px; font-weight: 700; color: #9A5B00; background: #FFF3DC; border-radius: 8px; padding: 6px 10px; }
.ord-box-title { margin-top: 0; }
.ord-progress { display: block; height: 8px; border-radius: 4px; background: #E2EEE7; overflow: hidden; }
.ord-progress span { display: block; height: 100%; background: #059669; }
.ord-modal { max-width: 460px; text-align: left; display: flex; flex-direction: column; gap: 10px; max-height: 92vh; overflow-y: auto; }
.ord-modal h3 { margin: 0; font-size: 17px; }
.ord-close { width: 34px; height: 34px; padding: 0; border-radius: 50%; }
.ord-note { font-size: 13px; color: var(--text-2); background: #F7FAF8; border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.ord-line-card { display: flex; flex-direction: column; gap: 8px; margin: 0; border: 1.5px solid var(--border2); }
.ord-line-card.is-mine { border: 2px solid #059669; }
.ord-line-card.is-done:not(.is-mine) { background: #FBFDFC; }
.ord-take { width: 100%; border: 1.5px solid #059669; background: #ECFDF5; color: #047857; font-weight: 800; border-radius: 999px; padding: 10px; }
.ord-take.btn-primary { background: #059669; color: #FFFFFF; }
.ord-editor { display: flex; flex-direction: column; gap: 10px; }
.ord-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.ord-choice { border: 1.5px solid var(--border2); background: var(--surface); color: var(--text-3); font: inherit; font-size: 13px; font-weight: 700; border-radius: 10px; padding: 10px 2px; cursor: pointer; }
.ord-choice.is-on.is-available { background: #059669; border-color: #059669; color: #FFFFFF; }
.ord-choice.is-on.is-replaced { background: #D97706; border-color: #D97706; color: #FFFFFF; }
.ord-choice.is-on.is-out { background: #B42318; border-color: #B42318; color: #FFFFFF; }
.ord-fields { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; }
.ord-debts { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; margin: 8px 0; border: 1.5px solid #FCD34D; border-radius: 12px; background: #FFFBEB; }
.ord-debts-title { font-size: 13px; font-weight: 800; color: #92400E; }
.ord-fields-price { grid-template-columns: minmax(0, 1fr); margin-top: 8px; }
.ord-prodname { display: flex; align-items: center; min-height: 44px; box-sizing: border-box; padding: 0 12px; border: 2px solid var(--border, #cfe9d8); border-radius: 12px; background: #F4FBF6; font-size: 15px; font-weight: 800; color: var(--text, #1f3d2b); overflow-wrap: anywhere; line-height: 1.2; }
.ord-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; color: var(--text-2); }
.ord-field input { width: 100%; min-width: 0; margin: 0; min-height: 44px; font-weight: 800; }
.ord-recap { display: flex; flex-direction: column; gap: 8px; border-top: 1px dashed var(--border2); padding-top: 10px; }
.ord-total { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: #059669; color: #FFFFFF; border-radius: 12px; padding: 12px 14px; font-weight: 700; }
.ord-total b { font-size: 20px; white-space: nowrap; }
.ord-wide { width: 100%; }
.ord-chat { display: flex; flex-direction: column; gap: 8px; border-top: 1px dashed var(--border2); padding-top: 10px; }
.ord-chat-list { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; }
.ord-msg { align-self: flex-start; max-width: 85%; background: #F1F5F3; border-radius: 12px 12px 12px 4px; padding: 7px 10px; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.ord-msg.is-me { align-self: flex-end; background: #D9F2E4; border-radius: 12px 12px 4px 12px; }
.ord-msg small { font-size: 12px; font-weight: 700; color: var(--text-3); }
.ord-chat-send { width: 100%; }
.ord-history { font-size: 13px; color: var(--text-3); }
.ord-history summary { cursor: pointer; font-weight: 700; }
.ord-history div { display: flex; flex-direction: column; padding: 4px 0; border-bottom: 1px solid var(--border); }
.ord-from-order { font-size: 12px; font-weight: 800; color: #1D4ED8; background: #EAF1FF; padding: 3px 8px; border-radius: 6px; align-self: flex-start; display: inline-block; margin-top: 4px; }

/* Dépôt (v11.46) */
.ord-send-arrow { color: #0F1F17; }
.ord-send-arrow[hidden], #ord-mic-wrap[hidden] { display: none; }
.ord-team { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.ord-team-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ord-team-chip { background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; }
.ord-team-chip.is-me { background: #5CC17C; border-color: #5CC17C; color: #0F1F17; }

/* Activité de l'Admin (v11.48) */
.act-summary, .act-card { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.act-counts { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.act-counts b { color: var(--text); font-size: 15px; }
.act-ops { display: flex; gap: 6px; flex-wrap: wrap; }
.act-chip { background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46; border-radius: 999px; padding: 4px 10px; font-size: 12px; }
.act-alerts { border: 1.5px solid #FCA5A5; background: #FEF2F2; border-radius: 16px; padding: 12px 14px; margin-bottom: 12px; }
.act-alert { font-size: 13px; font-weight: 700; color: #991B1B; padding: 4px 0; }
.act-filters { display: flex; gap: 8px; margin-bottom: 10px; }
.act-filters select { flex: 1 1 0; min-width: 0; padding: 10px; border-radius: 12px; border: 1px solid var(--border2); background: var(--surface); font-size: 14px; }
.act-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 6px; }
.act-row.is-bad { border-color: #FCA5A5; }
.act-row.is-new { border-left: 4px solid #10B981; }
.act-ic { font-size: 18px; flex: 0 0 auto; }
.act-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.act-time { font-size: 12px; color: var(--text-2); text-align: right; flex: 0 0 auto; }

/* Retouches de l'expérience Dépôt (v11.49) */
.ord-modal-head { flex-wrap: nowrap; align-items: flex-start; }
.ord-modal-head > div { min-width: 0; flex: 1 1 auto; }
.ord-modal-head .ord-close { flex: 0 0 auto; }
.ord-summary { font-size: 14px; font-weight: 600; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Page Facture (v11.54) */
.fact-tabs { margin-bottom: 10px; }
.fact-help { font-size: 13px; color: var(--text-2); background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; line-height: 1.45; }
.fact-goto { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin-bottom: 14px; cursor: pointer; border: 1.5px solid #A7F3D0; background: #ECFDF5; }
.fact-goto > span:first-child { font-size: 22px; }
.fact-goto > span:nth-child(2) { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.fact-goto small { font-size: 12px; color: var(--text-2); }
.fact-goto > span:last-child { font-size: 22px; color: #047857; }

/* Devis : choix de la personne du Dépôt (v11.56) */
.ord-change { margin-bottom: 12px; }

/* Devis et commandes (v11.58) */
.ord-steps.ord-steps-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ord-todo { font-size: 13px; font-weight: 800; color: #1D4ED8; background: #EAF1FF; border-radius: 8px; padding: 5px 9px; align-self: flex-start; }
.ord-strike { text-decoration: line-through; color: var(--text-3); }
.ord-line-card.is-out { background: #FFF7F7; }
.ord-priced { display: flex; flex-direction: column; gap: 2px; background: #F7FAF8; border-radius: 12px; padding: 6px 10px; }
.ord-priced-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.ord-priced-row:last-child { border-bottom: none; }
.ord-priced-row small { font-size: 12px; color: var(--text-3); }
.ord-priced-row b { white-space: nowrap; }
.ord-priced-row.is-out { opacity: .85; }
.ord-qty-row { flex-wrap: wrap; align-items: flex-start; row-gap: 8px; }
.ord-qty-row .ord-qty-name { flex: 1 1 0; min-width: 0; }
.ord-qty-row > b { order: 2; }
.ord-qty-row .ord-stepper { order: 3; flex: 0 0 100%; }
.ord-qty-row .ord-qty-name > span { font-size: 17px; font-weight: 800; color: var(--green-900, #064E3B); line-height: 1.25; }
.ord-qty-row .ord-qty-name small { font-size: 14px; font-weight: 600; color: #475569; }
.ord-qty-row > b { font-size: 18px; font-weight: 800; color: var(--green-900, #064E3B); }
.ord-qty-row.is-removed { opacity: .7; }
.ord-unchecked { display: block; color: #B45309; font-weight: 600; }
.ord-priced .ord-stepper { display: inline-flex; align-items: center; justify-content: flex-start; gap: 6px; }
.ord-priced .ord-stepper button { flex: none; width: 44px; height: 44px; min-width: 44px; padding: 0; border-radius: 12px; border: 1.5px solid var(--border); background: #fff; font-size: 24px; font-weight: 800; color: var(--green-800); line-height: 1; cursor: pointer; }
.ord-priced .ord-stepper button:active { background: #EAF6EF; }
.ord-priced .ord-stepper input { flex: none; width: 76px; max-width: 76px; height: 44px; text-align: center; font-size: 17px; font-weight: 800; border: 1.5px solid var(--border); border-radius: 12px; background: #fff; padding: 0; }
.ord-place, .ord-deal { border: 1.5px solid #A7F3D0; }
.ord-check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; font-weight: 600; color: var(--text-2); line-height: 1.35; }
.ord-check input { width: 20px; height: 20px; flex: 0 0 auto; margin: 0; }
.ord-rest { background: #FFF3DC; border-radius: 10px; padding: 8px 10px; color: #7A4A00; }
.ord-deal .ord-chat-list { max-height: 200px; }
.ord-field select { width: 100%; min-height: 44px; margin: 0; }
.fact-tab-badge { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: #DC2626; color: #FFFFFF; font-size: 12px; line-height: 18px; margin-left: 3px; }

.ord-treat-btn { display: block; width: 100%; box-sizing: border-box; text-align: center; background: #059669; color: #FFFFFF; font-weight: 800; font-size: 15px; border-radius: 999px; padding: 12px 14px; margin-top: 4px; }

/* v11.69 — Facture : produits d'abord, puis « Transférer au Dépôt » ou « Continuer » */
.inv-item-calc.is-single { grid-template-columns: minmax(0, 1fr); }
.inv-step-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 12px; }
.inv-step-actions .btn { min-height: 48px; font-weight: 800; font-size: 14px; }
.inv-pick { margin-top: 12px; background: #F0FDF4; border: 1.5px solid #86EFAC; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.inv-pick-title { font-weight: 800; font-size: 15px; color: var(--green-800); }
.inv-pick-row { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 15px; }
.inv-pick-row input { width: 22px; height: 22px; flex: none; }
.inv-pick-help { font-size: 13px; color: var(--text-3); margin-top: 8px; line-height: 1.35; }
.inv-pick .inv-pick-help { margin-top: 0; }
.inv-pick-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.ord-draft-check { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.ord-draft-check input { width: 22px; height: 22px; flex: none; }

/* v11.70 — Sortie et comptage */
.ord-prep-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 8px; }
.ord-prep-photos img { width: 100%; height: 96px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); display: block; }
.ord-prep-ready { border: 1.5px solid #86EFAC; background: #F0FDF4; }

/* v11.72 — listes de personnes : 5 lignes visibles, le reste en défilant, favoris ⭐ */
.pick-scroll { max-height: calc(var(--pick-row, 64px) * 5 + 2px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.pick-scroll .feed-right { display: flex; flex-direction: row; align-items: center; justify-content: flex-end; gap: 4px; text-align: right; white-space: nowrap; }
.pick-more { text-align: center; font-size: 13px; font-weight: 700; color: var(--text-3); padding: 8px 0 0; }
.pick-more[hidden] { display: none; }
.pick-wrap { margin-bottom: 16px; }
.fav-star { flex: none; width: 40px; height: 40px; border: none; background: transparent; font-size: 24px; line-height: 1; color: #94A3B8; cursor: pointer; border-radius: 12px; padding: 0; }
.fav-star.is-on { color: #F59E0B; }
.fav-star:active { background: #FEF3C7; }

/* v11.74 — fenêtres de dialogue maison (confirmer / saisir / information) */
.app-dlg-overlay { position: fixed; inset: 0; z-index: 100000; background: rgba(15, 23, 42, .55); display: flex; align-items: center; justify-content: center; padding: 16px; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.app-dlg { width: 100%; max-width: 420px; max-height: 88vh; overflow-y: auto; background: #fff; border-radius: 22px; padding: 22px 20px 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, .3); }
.app-dlg-title { font-size: 18px; font-weight: 800; color: var(--green-900, #064E3B); line-height: 1.3; white-space: pre-line; }
.app-dlg-body { margin-top: 10px; font-size: 15px; line-height: 1.5; color: #334155; white-space: pre-line; }
.app-dlg-input { width: 100%; margin-top: 14px; height: 52px; font-size: 20px; letter-spacing: 2px; text-align: center; border: 1.5px solid var(--border2, #CBD5E1); border-radius: 14px; padding: 0 12px; box-sizing: border-box; }
.app-dlg-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.app-dlg-btn { width: 100%; min-height: 52px; font-size: 16px; font-weight: 800; border-radius: 14px; }
.btn-danger-solid { background: #DC2626; color: #fff; border: none; }
.btn-danger-solid:active { background: #B91C1C; }

/* v11.74 — le bouton principal reste collé en bas de la fenêtre pendant qu'on défile */
.ord-sticky { position: sticky; bottom: -1px; z-index: 6; margin: 0 -2px; padding: 12px 2px calc(8px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, #fff 78%, rgba(255, 255, 255, 0)); }
.ord-sticky .btn { width: 100%; min-height: 52px; font-size: 16px; font-weight: 800; }
.ord-actions.ord-sticky { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 10px; }

/* v11.75 — Ticket de caisse */
.tk-card { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.tk-amount { height: 60px !important; font-size: 28px !important; font-weight: 800; text-align: center; }
.tk-big { min-height: 54px; font-size: 16px; font-weight: 800; }
.tk-scan-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tk-ticket { display: flex; flex-direction: column; gap: 12px; align-items: stretch; text-align: center; margin-bottom: 14px; border: 2px dashed var(--border2, #CBD5E1); }
.tk-ticket.is-paid { border-color: #16A34A; background: #F0FDF4; }
.tk-ticket.is-bad { border-color: #F87171; }
.tk-qr { width: 230px; max-width: 70vw; margin: 0 auto; background: #fff; padding: 8px; border-radius: 12px; }
.tk-qr svg { width: 100%; height: auto; display: block; }
.tk-amount-big { font-size: 34px; font-weight: 900; color: var(--green-900, #064E3B); letter-spacing: .5px; }
.tk-code { font-size: 20px; font-weight: 800; letter-spacing: 3px; color: #334155; }
.tk-stamp { align-self: center; font-size: 20px; font-weight: 900; color: #fff; background: #16A34A; padding: 6px 18px; border-radius: 999px; letter-spacing: 1px; }
.tk-lines { display: flex; flex-direction: column; gap: 4px; text-align: left; background: #fff; border-radius: 12px; padding: 10px 12px; border: 1px solid var(--border); }
.tk-lines div { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.tk-lines span { color: var(--text-3); }
.tk-methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tk-method { min-height: 74px; border-radius: 14px; border: 2px solid var(--border); background: #fff; font-size: 14px; font-weight: 800; color: #334155; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer; }
.tk-method span { font-size: 24px; }
.tk-method.is-on { border-color: #16A34A; background: #DCFCE7; color: #14532D; }
.tk-sums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tk-sum { background: #F8FAFC; border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.tk-sum b { font-size: 15px; }
.tk-row { width: 100%; background: none; border: none; border-bottom: 1px solid var(--border); text-align: left; cursor: pointer; font: inherit; color: inherit; }
.tk-scan-box { max-width: 440px; }
.tk-video-wrap { position: relative; margin-top: 12px; border-radius: 16px; overflow: hidden; background: #0F172A; aspect-ratio: 1 / 1; }
.tk-video-wrap video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tk-aim { position: absolute; inset: 18%; border: 3px solid rgba(255, 255, 255, .9); border-radius: 18px; }

/* v11.76 — Ticket de caisse : retour, espace sous la barre du bas, tableau Admin */
.tk-back { width: 100%; min-height: 46px; margin-bottom: 10px; font-weight: 800; font-size: 15px; justify-content: flex-start; }
.tk-bottom-space { height: 110px; }
.tk-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tk-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.tk-table th, .tk-table td { padding: 7px 6px; border-bottom: 1px solid var(--border); text-align: right; white-space: nowrap; }
.tk-table th:first-child, .tk-table td:first-child { text-align: left; }
.tk-table thead th { color: var(--text-3); font-weight: 700; }
.tk-table tfoot td { border-top: 2px solid var(--border2, #CBD5E1); border-bottom: none; }

/* v11.79 — ticket de caisse : message vocal et étiquette dans la Messagerie */
.msg-ticket-tag { display: flex; justify-content: space-between; gap: 10px; align-items: center; background: rgba(255, 255, 255, .22); border: 1px dashed currentColor; border-radius: 10px; padding: 4px 8px; margin-bottom: 6px; font-size: 12px; font-weight: 700; }
.chat-bubble-peer .msg-ticket-tag { background: #F0FDF4; color: #14532D; border-color: #16A34A; }
.tk-msg { display: flex; flex-direction: column; gap: 6px; }
.tk-msg-in { background: #FFF7E0; border: 1px solid #F5D77A; border-radius: 12px; padding: 10px 12px; text-align: left; }
.tk-msg-in b { font-size: 13px; color: #6B4A00; display: block; margin-bottom: 4px; }
.tk-msg-in audio { width: 100%; margin-top: 6px; }

/* v11.80 — tampons du ticket : « À PAYER » (ticket du vendeur) et « DÉJÀ PAYÉ » (reçu de la caisse) */
.tk-stamp { font-size: 22px; padding: 8px 22px; }
.tk-stamp.is-topay { background: #EA580C; }
.tk-ticket.is-topay { border-color: #EA580C; background: #FFF7ED; }

/* v11.81 — Ticket de caisse : tableau de bord Admin et gestion des groupes, caisses et personnes */
.tk-chips { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 6px; }
.tk-chip { width: auto !important; min-height: 40px; padding: 0 2px !important; font-size: 12.5px !important; font-weight: 800; border-radius: 999px; white-space: nowrap; }
.tk-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.tk-filters select, .tk-person select { width: 100%; min-height: 44px; font-size: 15px; border: 1.5px solid var(--border2, #CBD5E1); border-radius: 12px; padding: 0 10px; background: #fff; }
.tk-sum.is-alert { background: #FEF2F2; color: #7F1D1D; }
.tk-stale { background: #FEF2F2; border-radius: 10px; padding-left: 8px; padding-right: 8px; }
.tk-manage-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.tk-manage-row small { color: var(--text-3); font-size: 13px; }
.tk-manage-btns { display: flex; gap: 6px; }
.tk-manage-btns .btn { min-width: 44px; min-height: 44px; font-size: 18px; }
.tk-person { display: flex; flex-direction: column; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.tk-person label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-3); }

/* v11.82 — Ticket de caisse : plusieurs produits, total automatique, liste des produits après le scan */
.tk-items { display: flex; flex-direction: column; gap: 10px; }
.tk-item { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.tk-item-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 800; color: var(--green-800, #166534); text-transform: uppercase; letter-spacing: .3px; }
.tk-item-del { width: 40px; height: 40px; border: none; border-radius: 50%; background: #FEE2E2; color: #B91C1C; font-size: 17px; font-weight: 800; cursor: pointer; }
.tk-it-name { width: 100%; height: 50px; font-size: 16px; border: 1.5px solid var(--border2, #CBD5E1); border-radius: 12px; padding: 0 12px; box-sizing: border-box; }
.tk-item-row { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 8px 6px; align-items: end; } /* v11.96 : Qté et Produit sur la 1re ligne, Prix en dessous */
.tk-item-row .tk-col-price { grid-column: 1 / -1; } /* v11.93 : quantité (petite), produit, prix sur la même ligne */
.tk-item-row label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--text-3); }
.tk-item-row input { height: 50px; font-size: 16px; font-weight: 700; text-align: right; border: 1.5px solid var(--border2, #CBD5E1); border-radius: 12px; padding: 0 8px !important; box-sizing: border-box; width: 100%; min-width: 0; }
.tk-item-row .tk-col-qty input { text-align: center; padding: 0 4px !important; }
.tk-item-row .tk-it-name { text-align: left; font-weight: 500; padding: 0 10px !important; }
.tk-item-total { display: flex; justify-content: space-between; align-items: center; background: #F0FDF4; border-radius: 10px; padding: 8px 12px; font-size: 14px; color: #334155; }
.tk-item-total b { color: var(--green-900, #064E3B); font-size: 15px; }
.tk-item-add { min-height: 50px; border: 1.5px dashed #86EFAC; background: #F0FDF4; color: var(--green-800, #166534); border-radius: 14px; font-size: 15px; font-weight: 800; cursor: pointer; }
.tk-items-sum { display: flex; justify-content: space-between; align-items: center; background: var(--green-700, #15803D); color: #fff; border-radius: 14px; padding: 12px 16px; font-weight: 800; font-size: 16px; }
.tk-items-sum b { font-size: 22px; }
.tk-code-small { font-size: 13px; color: #94A3B8; letter-spacing: 2px; }
.tk-prod-list { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; text-align: left; }
.tk-prod-title { font-size: 13px; font-weight: 800; color: var(--green-800, #166534); margin-bottom: 4px; }
.tk-prod-row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.tk-prod-row:last-child { border-bottom: none; }
.tk-prod-row small { color: var(--text-3); font-size: 13px; }
.tk-prod { color: #475569 !important; font-weight: 600; }

/* ═══════════════════════════════════════════════
   BOUTIQUE EN LIGNE (v11.84) — fond blanc, dans la plateforme
   ═══════════════════════════════════════════════ */
.hero-action-icon.bg-orange { background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%); color: #EA580C; border: 1px solid #FED7AA; }
body.shop-mode, body.shop-mode #app { background: #FFFFFF; }
.shop-root { --shop-or: #EA580C; --shop-or-soft: #FFF7ED; --shop-line: #E5E7EB; --shop-ink: #111827; --shop-mute: #6B7280;
  background: #FFFFFF; color: var(--shop-ink); min-height: 100dvh; padding: 0 14px 24px; display: flex; flex-direction: column; gap: 12px; }
.shop-top { position: sticky; top: 0; z-index: 30; background: #FFFFFF; display: flex; align-items: center; gap: 10px;
  margin: 0 -14px; padding: calc(10px + env(safe-area-inset-top)) 14px 10px; border-bottom: 1px solid var(--shop-line); }
.shop-top-title { flex: 1; min-width: 0; font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-logo { color: var(--shop-or); }
.shop-icon-btn { width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; border: 1px solid var(--shop-line); background: #FFFFFF;
  font-size: 18px; font-weight: 700; color: var(--shop-ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.shop-cart-btn { position: relative; width: 46px; height: 46px; flex: 0 0 auto; border-radius: 50%; border: none; background: var(--shop-or-soft);
  font-size: 22px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.shop-cart-badge { position: absolute; top: -3px; right: -3px; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 11px; background: #DC2626;
  color: #FFFFFF; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid #FFFFFF; }
.shop-manage-link { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border: 1.5px dashed #FDBA74;
  background: var(--shop-or-soft); color: #9A3412; font-weight: 800; font-size: 14px; border-radius: 14px; padding: 10px 12px; cursor: pointer; font-family: inherit; }
.shop-manage-link small { font-weight: 500; color: #9A3412; opacity: .8; }
.shop-search { display: flex; align-items: center; gap: 8px; background: #F3F4F6; border-radius: 999px; padding: 0 14px; }
.shop-search input, .shop-search input:focus { flex: 1; min-width: 0; width: auto; border: none !important; box-shadow: none !important; background: transparent !important; padding: 12px 0 !important; margin: 0; border-radius: 0; font-size: 16px; font-family: inherit; color: var(--shop-ink); outline: none; }
.shop-cats, .shop-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 2px; }
.shop-cats::-webkit-scrollbar, .shop-tabs::-webkit-scrollbar { display: none; }
.shop-cat { flex: 0 0 auto; border: 1px solid #FED7AA; background: #FFFFFF; color: #9A3412; border-radius: 999px; padding: 8px 14px;
  font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; white-space: nowrap; }
.shop-cat.is-on { background: var(--shop-or); border-color: var(--shop-or); color: #FFFFFF; }
.shop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.shop-card { position: relative; background: #FFFFFF; border: 1px solid var(--shop-line); border-radius: 14px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; }
.shop-card.is-out .shop-img img { opacity: .45; }
.shop-img { aspect-ratio: 1 / 1; background: #FFFFFF; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.shop-img img { width: 100%; height: 100%; object-fit: contain; object-position: center; padding: 8px; box-sizing: border-box; display: block; }
.shop-img.is-sm { width: 64px; height: 64px; flex: 0 0 64px; border: 1px solid var(--shop-line); border-radius: 10px; }
.shop-img.is-sm img { padding: 4px; }
.shop-img-none { font-size: 40px; opacity: .35; }
.shop-img-none.is-big { font-size: 90px; }
.shop-card-txt { padding: 8px 10px 12px; border-top: 1px solid #F3F4F6; padding-right: 48px; }
.shop-card-name { font-size: 13.5px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shop-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; margin-top: 3px; }
.shop-price b { color: var(--shop-or); font-size: 15px; font-weight: 800; }
.shop-price s { color: #9CA3AF; font-size: 12px; }
.shop-price em { font-style: normal; font-size: 11px; font-weight: 800; color: #FFFFFF; background: #DC2626; border-radius: 6px; padding: 1px 5px; }
.shop-price.is-big b { font-size: 24px; }
.shop-price.is-big s { font-size: 15px; }
.shop-plus { position: absolute; right: 8px; bottom: 10px; width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--shop-or);
  color: #FFFFFF; font-size: 24px; font-weight: 600; line-height: 1; display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 3px 8px rgba(234, 88, 12, .35); }
.shop-plus:active { transform: scale(.92); }
.shop-tag-out { position: absolute; top: 8px; left: 8px; background: #374151; color: #FFFFFF; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 3px 7px; }
.shop-empty { text-align: center; color: var(--shop-mute); padding: 40px 10px; font-size: 15px; line-height: 1.6; }
.shop-muted { color: var(--shop-mute); font-size: 12.5px; }
.shop-sticky { position: sticky; bottom: 0; z-index: 25; background: #FFFFFF; margin: 8px -14px 0; padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--shop-line); display: flex; flex-direction: column; gap: 8px; margin-top: auto; margin-bottom: -24px; }
.shop-btn { width: 100%; border: none; border-radius: 14px; background: var(--shop-or); color: #FFFFFF; font-size: 16px; font-weight: 800; padding: 15px 14px;
  cursor: pointer; font-family: inherit; }
.shop-btn:disabled { background: #D1D5DB; color: #6B7280; cursor: default; }
.shop-btn.is-wa { background: #16A34A; }
.shop-btn-ghost { width: 100%; border: 1.5px solid var(--shop-line); border-radius: 14px; background: #FFFFFF; color: var(--shop-ink); font-size: 15px;
  font-weight: 700; padding: 12px; cursor: pointer; font-family: inherit; }
.shop-btn-ghost.is-danger { color: #B91C1C; border-color: #FECACA; }
/* Fiche produit */
.shop-gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -14px; background: #FFFFFF; }
.shop-gallery::-webkit-scrollbar { display: none; }
.shop-slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; background: #FFFFFF; }
.shop-slide img { width: 100%; height: 100%; object-fit: contain; object-position: center; padding: 16px; box-sizing: border-box; }
.shop-dots { display: flex; justify-content: center; gap: 5px; }
.shop-dots i { width: 7px; height: 7px; border-radius: 4px; background: #D1D5DB; transition: width .2s; }
.shop-dots i.is-on { width: 20px; background: var(--shop-or); }
.shop-thumbs { display: flex; gap: 8px; overflow-x: auto; }
.shop-thumb { width: 58px; height: 58px; flex: 0 0 58px; border: 1.5px solid var(--shop-line); border-radius: 10px; background: #FFFFFF; padding: 3px; cursor: pointer; }
.shop-thumb.is-on { border-color: var(--shop-or); }
.shop-thumb img { width: 100%; height: 100%; object-fit: contain; }
.shop-detail { display: flex; flex-direction: column; gap: 8px; }
.shop-detail-name { font-size: 20px; font-weight: 800; margin: 4px 0 0; line-height: 1.3; }
.shop-stock { font-size: 13px; font-weight: 700; color: #15803D; }
.shop-stock.is-out { color: #B91C1C; }
.shop-desc { font-size: 14.5px; line-height: 1.55; color: #374151; border-top: 1px solid #F3F4F6; padding-top: 10px; }
.shop-note { background: #F3F4F6; border-radius: 10px; padding: 8px 10px; font-size: 13px; color: #374151; }
/* Panier */
.shop-cart-list { display: flex; flex-direction: column; }
.shop-cart-line { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid #F3F4F6; }
.shop-cart-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.shop-cart-sum { font-size: 14px; white-space: nowrap; }
.shop-qty { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.shop-qty button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--shop-line); background: #FFFFFF; font-size: 18px; font-weight: 700; cursor: pointer; color: var(--shop-ink); }
.shop-qty b { min-width: 20px; text-align: center; font-size: 16px; }
.shop-qty .shop-x { margin-left: auto; border-color: transparent; }
.shop-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 4px; font-size: 16px; font-weight: 700; }
.shop-total b { color: var(--shop-or); font-size: 22px; font-weight: 800; }
.shop-form { display: flex; flex-direction: column; gap: 10px; }
.shop-form-title { font-size: 14px; font-weight: 800; }
.shop-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 700; color: #374151; }
.shop-form input[type="text"], .shop-form input[type="tel"], .shop-form textarea, .shop-form select {
  width: 100%; box-sizing: border-box; border: 1.5px solid #D1D5DB; border-radius: 12px; padding: 12px; font-size: 16px; font-family: inherit; background: #FFFFFF; color: var(--shop-ink); font-weight: 500; }
.shop-form input:focus, .shop-form textarea:focus, .shop-form select:focus { outline: none; border-color: var(--shop-or); }
.shop-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shop-switch { flex-direction: row !important; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--shop-line); border-radius: 12px; padding: 10px 12px; }
.shop-switch span { display: flex; flex-direction: column; gap: 2px; }
.shop-switch small { font-weight: 500; color: var(--shop-mute); }
.shop-switch input { width: 22px; height: 22px; accent-color: var(--shop-or); flex: 0 0 auto; }
/* Photos du produit (Gérant) */
.shop-edit-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.shop-edit-ph { position: relative; border: 1.5px solid var(--shop-line); border-radius: 12px; overflow: hidden; }
.shop-edit-ph.is-main { border-color: var(--shop-or); }
.shop-ph-main { position: absolute; left: 4px; bottom: 4px; background: var(--shop-or); color: #FFFFFF; font-size: 10px; font-weight: 800; border-radius: 6px; padding: 2px 6px; }
.shop-ph-btn { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; border-radius: 50%; border: none; background: rgba(17, 24, 39, .75); color: #FFFFFF; font-size: 13px; cursor: pointer; }
.shop-ph-btn.is-left { left: 4px; right: auto; background: rgba(255, 255, 255, .95); border: 1px solid var(--shop-line); }
.shop-edit-add { aspect-ratio: 1 / 1; border: 2px dashed #FDBA74; border-radius: 12px; display: flex !important; flex-direction: column; align-items: center; justify-content: center;
  color: var(--shop-or) !important; font-size: 28px !important; cursor: pointer; background: var(--shop-or-soft); }
.shop-edit-add small { font-size: 12px; font-weight: 700; }
/* Liste du Gérant */
.shop-mgr-list { display: flex; flex-direction: column; gap: 8px; }
.shop-mgr-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: #FFFFFF; border: 1px solid var(--shop-line); border-radius: 14px;
  padding: 10px; cursor: pointer; font-family: inherit; color: var(--shop-ink); }
.shop-mgr-row.is-static { cursor: default; }
.shop-mgr-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.shop-mgr-txt .shop-price { margin-top: 0; }
.shop-chev { font-size: 22px; color: #9CA3AF; }
.shop-cat-ico { font-size: 24px; width: 40px; text-align: center; }
.shop-pills { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 2px; }
.shop-pill { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; }
.shop-pill.is-ok { background: #DCFCE7; color: #166534; }
.shop-pill.is-grey { background: #F3F4F6; color: #4B5563; }
.shop-pill.is-red { background: #FEE2E2; color: #B91C1C; }
/* Bannière « Ajouté au panier » */
.shop-added { position: fixed; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); width: min(452px, calc(100% - 24px)); transform: translate(-50%, 140%);
  z-index: 9000; transition: transform .25s ease; pointer-events: none; }
.shop-added.is-on { transform: translate(-50%, 0); pointer-events: auto; }
.shop-added-in { display: flex; align-items: center; gap: 10px; background: #16A34A; color: #FFFFFF; border-radius: 16px; padding: 10px 12px; box-shadow: 0 10px 28px rgba(0, 0, 0, .22); }
.shop-added-ph { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 10px; background: #FFFFFF; display: flex; align-items: center; justify-content: center; color: #16A34A; font-weight: 800; overflow: hidden; }
.shop-added-ph img { width: 100%; height: 100%; object-fit: contain; padding: 2px; box-sizing: border-box; }
.shop-added-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 15px; }
.shop-added-txt small { font-size: 12.5px; opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-added-btn { flex: 0 0 auto; border: none; background: #FFFFFF; color: #166534; font-weight: 800; font-size: 13px; border-radius: 999px; padding: 8px 12px; cursor: pointer; font-family: inherit; }

/* Historique Admin du ticket (v11.85) : une ligne par vente */
.tk-excel { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 14px; font-size: 17px; font-weight: 800; }
.tk-excel small { font-size: 12px; font-weight: 500; opacity: .9; }
.tk-sale { border-bottom: 1px solid var(--border, #E5E7EB); }
.tk-sale-line { display: flex; align-items: center; gap: 10px; width: 100%; background: transparent; border: none; text-align: left; padding: 12px 2px; cursor: pointer; font-family: inherit; color: inherit; min-height: 56px; }
.tk-sale-time { flex: 0 0 auto; font-weight: 700; font-size: 13px; color: var(--text-3, #6B7280); width: 48px; }
.tk-sale-who { flex: 1; min-width: 0; font-size: 14px; line-height: 1.3; }
.tk-sale-who small { color: var(--text-3, #6B7280); font-size: 12.5px; }
.tk-sale-amt { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: 0 0 auto; font-size: 15px; }
.tk-sale-detail { padding: 4px 2px 12px 58px; display: flex; flex-direction: column; gap: 8px; }
.tk-sale.is-open { background: rgba(0,0,0,.02); }

/* Ma note enregistrée (v11.88) : titre + « Modifier » sur la 1re ligne, texte puis lecteur vocal chacun sur toute la largeur */
.pnote-saved .pnote-label { order: 0; flex: 1 1 auto; }
.pnote-saved .pnote-link { order: 1; }
.pnote-saved .pnote-text { order: 2; flex: 1 1 100%; font-size: 14px; }
.pnote-saved .chat-voice-player, .pnote-saved .voice-player, .pnote-saved > div { order: 3; flex: 1 1 100%; width: 100%; max-width: 100%; box-sizing: border-box; }
.pnote-editor .voice-panel audio, .pnote-editor .voice-panel .chat-voice-player { width: 100%; }
.tk-item-add small { font-weight: 500; opacity: .75; }

.tk-item-row label span { white-space: nowrap; }

/* Boutique : commandes, suivi, commerciaux (v11.95) */
.shop-pill.is-blue { background: #DBEAFE; color: #1D4ED8; }
.shop-pill.is-amber { background: #FEF3C7; color: #92400E; }
.shop-links { display: flex; gap: 8px; }
.shop-link-btn { flex: 1; border: 1.5px solid var(--shop-line); background: #FFFFFF; color: var(--shop-ink); border-radius: 12px; padding: 11px 8px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; }
.shop-sum-box { border: 1px solid var(--shop-line); border-radius: 14px; padding: 6px 14px; }
.shop-sum-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: 14px; border-bottom: 1px solid #F3F4F6; }
.shop-sum-row span { min-width: 0; }
.shop-sum-row.is-total { border-bottom: none; font-size: 16px; font-weight: 800; }
.shop-sum-row.is-total b { color: var(--shop-or); font-size: 19px; }
.shop-pay-box { display: flex; flex-direction: column; gap: 4px; background: #F0FDF4; border: 1.5px solid #86EFAC; border-radius: 14px; padding: 12px 14px; font-size: 14px; color: #166534; }
.shop-pay-box em { font-style: normal; font-weight: 800; background: #DCFCE7; border-radius: 8px; padding: 6px 10px; margin-top: 4px; }
.shop-order-head { display: flex; justify-content: space-between; align-items: center; }
.shop-track { display: flex; justify-content: space-between; gap: 2px; padding: 6px 0 2px; }
.shop-step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; font-size: 11px; color: var(--shop-mute); position: relative; }
.shop-step i { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #D1D5DB; background: #FFFFFF; display: flex; align-items: center; justify-content: center; font-style: normal; font-weight: 800; font-size: 12px; z-index: 1; }
.shop-step::before { content: ""; position: absolute; top: 12px; left: -50%; width: 100%; height: 2px; background: #D1D5DB; }
.shop-step:first-child::before { display: none; }
.shop-step.is-done i { background: #16A34A; border-color: #16A34A; color: #FFFFFF; }
.shop-step.is-done::before, .shop-step.is-cur::before { background: #16A34A; }
.shop-step.is-cur i { border-color: var(--shop-or); color: var(--shop-or); box-shadow: 0 0 0 4px rgba(234, 88, 12, .15); }
.shop-step.is-cur { color: var(--shop-or); font-weight: 800; }
.shop-info-box { display: flex; flex-direction: column; gap: 6px; background: #F9FAFB; border-radius: 12px; padding: 12px; font-size: 14px; }
.shop-info-box a { color: inherit; font-weight: 700; }
.shop-history { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.shop-history div { display: flex; justify-content: space-between; color: var(--shop-mute); }
.shop-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.shop-kpi { border: 1px solid var(--shop-line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.shop-kpi span { font-size: 12px; color: var(--shop-mute); }
.shop-kpi b { font-size: 18px; }
.shop-kpi.is-ok { background: #F0FDF4; border-color: #BBF7D0; }
.shop-alert { display: block; width: 100%; text-align: left; background: #FFF7ED; border: 1.5px solid #FDBA74; color: #9A3412; border-radius: 12px; padding: 11px 12px; font-size: 14px; font-weight: 800; cursor: pointer; font-family: inherit; }
.shop-alert.is-static { cursor: default; }
.shop-select { border: 1.5px solid #D1D5DB; border-radius: 10px; padding: 9px 8px; font-size: 14px; font-family: inherit; background: #FFFFFF; color: var(--shop-ink); max-width: 46%; }
.shop-table { border: 1px solid var(--shop-line); border-radius: 12px; overflow: hidden; }
.shop-trow { display: grid; grid-template-columns: 1.6fr .6fr 1.2fr; gap: 6px; padding: 10px 12px; font-size: 14px; border-top: 1px solid #F3F4F6; }
.shop-trow.is-head { background: #F9FAFB; font-weight: 700; font-size: 12.5px; color: var(--shop-mute); border-top: none; }

/* v11.97 : filtres de l'historique Admin lisibles sur petit téléphone */
.tk-filters select { font-size: 14px !important; padding: 0 22px 0 10px !important; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; background-position: right 8px center; }
.tk-exp-btn { border-style: dashed !important; border-color: #FCD34D !important; background: #FFFBEB !important; color: #92400E !important; }

/* Historique du ticket de caisse (v11.99) */
.tk-tabs { margin-bottom: 4px; }
.tk-hsearch { display: flex; align-items: center; gap: 8px; background: #F3F4F6; border-radius: 999px; padding: 0 14px; }
.tk-hsearch input, .tk-hsearch input:focus { flex: 1; min-width: 0; width: auto; border: none !important; box-shadow: none !important; background: transparent !important; padding: 12px 0 !important; margin: 0; border-radius: 0; font-size: 16px; outline: none; }
.tk-chips-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tk-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tk-dates label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--text-3); }
.tk-dates input { min-height: 44px; font-size: 15px; }
.tk-filt-btn { display: flex; justify-content: space-between; align-items: center; min-height: 44px; font-weight: 800; }
.tk-filters-grid { grid-template-columns: 1fr 1fr; }
.tk-filters-grid .tk-reset { grid-column: 1 / -1; }

/* Qui fait quoi (v11.101) */
.tk-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.tk-remove { align-self: flex-start; color: var(--danger, #B91C1C); }
.tk-add-box { display: flex; flex-direction: column; gap: 10px; border: 1.5px dashed #86EFAC; background: #F0FDF4; border-radius: 16px; padding: 12px; margin-top: 4px; }
.tk-add-title { font-weight: 800; font-size: 14px; color: var(--green-800, #166534); }
.tk-pick-list { display: flex; flex-direction: column; gap: 6px; }
.tk-pick { display: flex; justify-content: space-between; align-items: center; min-height: 48px; padding: 0 14px; border: 1px solid var(--border); background: #FFFFFF; border-radius: 12px; font-size: 15px; cursor: pointer; font-family: inherit; color: inherit; }
.tk-pick span { color: var(--text-3); font-size: 13px; }
.tk-role-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tk-role-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 64px; font-weight: 800; }
.tk-role-btn small { font-weight: 500; font-size: 12px; opacity: .85; }
.tk-add-field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--text-3); }
.tk-add-field select { width: 100%; min-height: 48px; font-size: 15px; border-radius: 12px; padding: 0 10px; background: #fff; }

/* Remboursement (v11.102) */
.tk-ref-btn { border-style: dashed !important; border-color: #FDBA74 !important; background: #FFF7ED !important; color: #9A3412 !important; }
.tk-sums-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.tk-ref-sum { display: flex; flex-direction: column; align-items: center; gap: 4px; background: #FFF7ED; border: 2px solid #FDBA74; border-radius: 16px; padding: 12px; text-align: center; }
.tk-ref-sum span { font-size: 13px; font-weight: 800; color: #9A3412; text-transform: uppercase; letter-spacing: .3px; }
.tk-ref-sum b { font-size: 32px; font-weight: 900; color: #7C2D12; }
.tk-ref-sum small { font-size: 12.5px; color: #9A3412; }

/* Paiement partagé (v11.104) */
.tk-split-link { align-self: center; background: none; border: none; color: var(--green-700, #047857); font-weight: 800; font-size: 14px; padding: 8px; cursor: pointer; font-family: inherit; }
.tk-split-link small { font-weight: 500; opacity: .8; }
.tk-split { display: flex; flex-direction: column; gap: 8px; }
.tk-split-row { display: grid; grid-template-columns: 1fr 1.2fr auto; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; }
.tk-split-row input { height: 48px; font-size: 16px; font-weight: 700; text-align: right; border-radius: 12px; padding: 0 10px !important; width: 100%; min-width: 0; box-sizing: border-box; }
.tk-fill { min-height: 40px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--border); background: #FFFFFF; font-size: 12.5px; font-weight: 800; cursor: pointer; font-family: inherit; color: var(--green-800, #166534); }
.tk-split-left { text-align: center; font-size: 14px; padding: 8px; border-radius: 10px; background: #F8FAFC; }
.tk-split-left .is-warn { color: #92400E; } .tk-split-left .is-ok { color: #166534; font-weight: 800; } .tk-split-left .is-bad { color: #B91C1C; }

.tk-alert { display: block; width: 100%; text-align: left; background: #FFF7ED; border: 1.5px solid #FDBA74; color: #9A3412; border-radius: 12px; padding: 11px 12px; font-size: 14px; font-weight: 800; cursor: pointer; font-family: inherit; }
.tk-sum small { font-size: 11.5px; color: var(--text-3); font-weight: 500; }

/* Personne (v11.107) */
.tk-pcard { display: flex; flex-direction: column; gap: 8px; border: 1.5px solid #BFDBFE; background: #EFF6FF; border-radius: 16px; padding: 12px; }
.tk-pcard-head { display: flex; justify-content: space-between; align-items: center; font-size: 16px; }
.tk-pcard-x { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #BFDBFE; background: #FFFFFF; cursor: pointer; font-size: 14px; }
.tk-excel-all { display: flex; flex-direction: column; align-items: center; gap: 2px; font-weight: 800; padding: 12px 14px; }
.tk-excel-all small { font-weight: 500; font-size: 12px; opacity: .85; }
.tk-more { margin-top: 6px; font-weight: 800; }

/* v11.110 — Clôture d'une caisse du ticket : carte « Ma caisse », bilan, demandes à l'Admin, fonds de démarrage */
.tk-till-card { border: 1.5px solid #A7F3D0; background: #F0FDF4; }
.tk-till-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14.5px; }
.tk-till-fund { background: #FEF3C7; color: #92400E; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.tk-till-wait { background: #FEF3C7; border: 1px solid #FCD34D; color: #78350F; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; line-height: 1.45; }
.tk-till-closed { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; line-height: 1.45; }
.tk-close-btn { border: 1.5px solid #1E293B !important; color: #1E293B !important; background: #FFFFFF !important; }
.tk-bilan { margin: 0; }
.tk-bilan-total { border-top: 1.5px solid #CBD5E1; margin-top: 4px; padding-top: 8px; font-weight: 900; color: #065F46; }
.tk-bilan-total b { font-size: 17px; }
.tk-bilan-phone { font-size: 12.5px; color: #475569; display: block !important; }
.tk-bilan-details summary { cursor: pointer; font-weight: 700; color: #047857; font-size: 13.5px; padding: 4px 0; }
.tk-bilan-list { display: flex; flex-direction: column; margin-top: 6px; }
.tk-bilan-row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: baseline; font-size: 12.5px; padding: 5px 0; border-bottom: 1px dashed #E2E8F0; }
.tk-bilan-row i { color: #64748B; }
.tk-admin-tills .tk-sub { font-size: 13px; font-weight: 800; color: #475569; text-transform: uppercase; margin-top: 6px; }
.tk-req { background: #FFFBEB; border: 1.5px solid #FCD34D; border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; }
.tk-req-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tk-req-head span { font-size: 12px; color: #92400E; }
.tk-req-count { font-weight: 700; }
.tk-req-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tk-req-no { color: var(--danger) !important; border: 1.5px solid var(--danger) !important; }
.tk-fund-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 6px; align-items: center; font-size: 13.5px; padding: 6px 0; border-bottom: 1px solid #F1F5F9; }
.tk-fund-amt { font-weight: 800; color: #92400E; }
.tk-cl { border: 1px solid #E2E8F0; border-radius: 10px; padding: 10px; font-size: 13px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.tk-cl-more { color: #059669; font-size: 12.5px; }
/* v11.113 — Clôtures dans l'historique du ticket : 5e bouton « Clôtures » sur toute la largeur, ligne de clôture marquée */
.tk-chips-mod > :last-child:nth-child(odd) { grid-column: 1 / -1; }
.tk-cl-row { border-left: 4px solid #1E293B; }
/* v11.114 — Bannière du Ticket de caisse en haut de l'accueil ; demandes à valider en haut de la page Ticket */
.tk-home-banner { display: flex; align-items: stretch; gap: 6px; width: 100%; margin: 0 0 12px; border-radius: 14px; border: 1.5px solid #FCD34D; background: #FFFBEB; color: #78350F; text-align: left; font-family: inherit; }
button.tk-home-banner { flex-direction: column; padding: 12px 14px; cursor: pointer; gap: 4px; }
.tk-home-banner.is-admin { border-width: 2px; box-shadow: 0 4px 12px rgba(217, 119, 6, 0.18); }
.tk-home-banner.is-ok { border-color: #6EE7B7; background: #ECFDF5; color: #065F46; }
.tk-home-banner.is-bad { border-color: #FCA5A5; background: #FEF2F2; color: #991B1B; }
.tk-hb-title { font-weight: 900; font-size: 15px; }
.tk-hb-line { font-size: 13.5px; line-height: 1.4; display: block; }
.tk-hb-go { font-size: 13px; font-weight: 800; text-decoration: underline; margin-top: 2px; display: block; }
.tk-hb-main { flex: 1; background: none; border: none; text-align: left; padding: 12px 0 12px 14px; color: inherit; font-family: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.tk-hb-x { background: none; border: none; color: inherit; font-size: 18px; padding: 0 14px; cursor: pointer; }
.tk-req-top { border: 2px solid #FCD34D; }
/* v11.116 — boutons assez grands pour le doigt */
.wh-eye-btn { min-height: 36px; }
.section-hd-link { min-height: 36px; padding: 8px 6px; }
/* v11.118 — message d'erreur dans la fenêtre du scanner */
.tk-scan-err { color: #B91C1C !important; font-weight: 700; }
/* v11.120 — Ticket / reçu plus compact : tout tient sur un écran de téléphone, bouton compris (QR 170 px, toujours lisible de loin) */
.tk-ticket { gap: 8px; padding: 12px; }
.tk-qr { width: 170px; max-width: 60vw; padding: 6px; }
.tk-stamp { font-size: 16px; padding: 5px 16px; letter-spacing: .5px; }
.tk-amount-big { font-size: 28px; line-height: 1.1; }
.tk-ticket .tk-lines { padding: 8px 10px; gap: 2px; }
.tk-ticket .tk-lines div { font-size: 13.5px; }
.tk-ticket > .ord-muted { font-size: 12.5px; line-height: 1.35; }
.tk-ticket .tk-big { min-height: 48px; }

/* ═══════════════════════════════════════════════
   v11.121 — Barre du bas : effet « verre » façon iOS 26 (Liquid Glass) et « Envoyer » aligné
   ═══════════════════════════════════════════════ */
.bottom-nav {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.42) 100%);
  backdrop-filter: blur(22px) saturate(190%) brightness(1.04);
  -webkit-backdrop-filter: blur(22px) saturate(190%) brightness(1.04);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),      /* reflet sur le bord du haut */
    inset 0 -1px 0 rgba(255, 255, 255, 0.35),     /* reflet léger en bas */
    inset 0 0 18px rgba(255, 255, 255, 0.25),     /* épaisseur du verre */
    0 12px 32px -8px rgba(6, 78, 59, 0.22),       /* ombre douce */
    0 2px 8px rgba(0, 0, 0, 0.06);
  overflow: visible;
}
/* reflet arrondi sur la moitié haute, comme une goutte de verre */
.bottom-nav::before {
  content: "";
  position: absolute; inset: 1px 1px 50% 1px;
  border-radius: 36px 36px 18px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.bottom-nav > * { position: relative; z-index: 1; }
/* onglet actif : petite « lentille » de verre teintée de vert */
.nav-item.active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(209, 250, 229, 0.55));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 2px 8px rgba(6, 78, 59, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.8);
}
/* bouton central : verre vert, il dépasse au-dessus de la barre ; son nom est sur la même ligne que les autres */
.nav-center-wrap { align-self: stretch; justify-content: flex-end; gap: 3px; margin-top: 0; padding: 0 0 5px; min-height: 52px; }
.nav-center-btn {
  margin-top: -22px;
  background: linear-gradient(160deg, rgba(52, 211, 153, 0.95) 0%, rgba(5, 150, 105, 0.95) 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -2px 6px rgba(6, 78, 59, 0.25), 0 8px 20px rgba(5, 150, 105, 0.45);
}
.nav-center-label { margin-top: 0; font-size: 12px; line-height: 1.25; }
.nav-item { line-height: 1.25; }
/* téléphones sans effet de flou : barre presque opaque, toujours lisible */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .bottom-nav { background: rgba(255, 255, 255, 0.97); }
}
/* v11.123 — fenêtre « Détails de la dette » : statut lisible */
.dh-status { font-size: 12.5px; font-weight: 800; color: var(--text-2); background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; }
/* v11.123 — fenêtre « Envoyer sur WhatsApp » : message modifiable, autres options repliées */
.wa-msg-label { display: block; font-size: 13px; font-weight: 800; color: var(--text); margin: 4px 0 6px; }
.wa-msg-label span { font-weight: 600; color: var(--text-3); }
.wa-msg-text { width: 100%; box-sizing: border-box; min-height: 150px; max-height: 40vh; resize: vertical; font-family: inherit; font-size: 13.5px; line-height: 1.45; padding: 10px 12px; border-radius: 10px; border: 1.5px solid #CBD5E1; background: #F8FAFC; color: var(--text); margin-bottom: 8px; }
.share-more { margin-top: 10px; }
.share-more > summary { cursor: pointer; list-style: none; text-align: center; font-size: 13.5px; font-weight: 700; color: var(--text-2); padding: 10px; border-radius: 10px; border: 1px dashed #CBD5E1; }
.share-more > summary::-webkit-details-marker { display: none; }
.share-more[open] > summary { margin-bottom: 8px; }
.dh-actions > .btn-ghost:last-child { flex: 1 1 100%; min-height: 44px; }

/* v11.130 — Sortie des produits : comparer la commande avec la table */
.prep-cmp-nums{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:13.5px;color:var(--text-2);margin:6px 0}
.prep-cmp-nums b{font-size:15px;color:var(--text)}
.prep-cmp-nums b.is-bad{color:#B91C1C}
.prep-cmp-res{font-size:13.5px;font-weight:700;min-height:0;margin:2px 0 6px}
.prep-cmp-res:empty{display:none}
.prep-cmp-res.is-ok{color:#047857;background:#ECFDF5;border:1px solid #A7F3D0;border-radius:8px;padding:6px 10px}
.prep-cmp-res.is-bad{color:#B91C1C;background:#FEF2F2;border:1px solid #FECACA;border-radius:8px;padding:6px 10px}
.prep-return{display:flex;flex-direction:column;gap:4px}

/* Boutique — modèle « grande boutique en ligne » (v11.131) : barre orange, bannières, rayons, ventes flash, rubriques, barre du bas */
.shop-root.has-nav { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.shop-head { position: sticky; top: 0; z-index: 30; background: var(--shop-or); margin: 0 -14px; padding: calc(8px + env(safe-area-inset-top)) 14px 10px; display: flex; flex-direction: column; gap: 8px; }
.shop-head-row { display: flex; align-items: center; gap: 10px; }
.shop-head-name { flex: 1; min-width: 0; color: #FFFFFF; font-size: 18px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-head-btn { position: relative; width: 40px; height: 40px; flex: 0 0 auto; border-radius: 50%; border: none; background: rgba(255,255,255,.18); color: #FFFFFF; font-size: 19px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.shop-head-btn.is-cart { background: #FFFFFF; font-size: 20px; }
.shop-head-search { display: flex; align-items: center; gap: 8px; background: #FFFFFF; border-radius: 10px; padding: 0 12px; }
.shop-head-search input, .shop-head-search input:focus { flex: 1; min-width: 0; width: auto; border: none !important; box-shadow: none !important; background: transparent !important; padding: 11px 0 !important; margin: 0; border-radius: 0; font-size: 16px; font-family: inherit; color: var(--shop-ink); outline: none; }
.shop-banners { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; gap: 0; border-radius: 14px; }
.shop-banners::-webkit-scrollbar { display: none; }
.shop-banner { position: relative; flex: 0 0 100%; scroll-snap-align: center; height: 128px; border: none; border-radius: 14px; overflow: hidden; display: flex; align-items: flex-end; text-align: left; padding: 14px 16px; cursor: pointer; font-family: inherit; color: #7C2D12; background: #FFEDD5; }
.shop-banner.is-c1 { background: #FEF3C7; color: #78350F; }
.shop-banner.is-c2 { background: #DCFCE7; color: #14532D; }
.shop-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shop-banner.has-photo { color: #FFFFFF; }
.shop-banner.has-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0) 65%); }
.shop-banner-txt { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 3px; }
.shop-banner-txt b { font-size: 19px; font-weight: 800; line-height: 1.2; }
.shop-banner-txt small { font-size: 13px; font-weight: 600; opacity: .92; }
.shop-banner-txt em { font-style: normal; font-size: 12px; font-weight: 800; align-self: flex-start; margin-top: 4px; background: var(--shop-or); color: #FFFFFF; border-radius: 999px; padding: 4px 10px; }
.shop-banner.is-preview { cursor: default; margin: 8px 0; }
.shop-rayons { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 2px 14px; }
.shop-rayons::-webkit-scrollbar { display: none; }
.shop-rayon { flex: 0 0 68px; display: flex; flex-direction: column; align-items: center; gap: 5px; border: none; background: none; cursor: pointer; font-family: inherit; color: var(--shop-ink); padding: 0; }
.shop-rayon i { width: 58px; height: 58px; border-radius: 50%; background: var(--shop-or-soft); border: 1px solid #FED7AA; font-style: normal; font-size: 26px; display: flex; align-items: center; justify-content: center; }
.shop-rayon span { font-size: 11.5px; font-weight: 600; text-align: center; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shop-sec { display: flex; flex-direction: column; gap: 8px; }
.shop-sec.is-flash { background: #FFF7ED; border: 1px solid #FED7AA; border-radius: 14px; padding: 0 0 10px; overflow: hidden; }
.shop-sec.is-flash .shop-sec-head { background: var(--shop-or); color: #FFFFFF; padding: 9px 12px; }
.shop-sec.is-flash .shop-sec-all { color: #FFFFFF; }
.shop-sec.is-flash .shop-row { margin: 0; padding: 0 10px; }
.shop-sec-head { display: flex; align-items: center; gap: 8px; }
.shop-sec-head b { font-size: 16px; font-weight: 800; white-space: nowrap; }
.shop-sec-head .shop-muted { margin-left: auto; }
.shop-sec-cd { white-space: nowrap; font-size: 12px; font-weight: 700; background: rgba(255,255,255,.2); border-radius: 8px; padding: 3px 7px; }
.shop-sec-all { margin-left: auto; border: none; background: none; color: var(--shop-or); font-size: 13px; font-weight: 800; cursor: pointer; font-family: inherit; white-space: nowrap; padding: 4px 0; }
.shop-row { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 2px; }
.shop-row::-webkit-scrollbar { display: none; }
.shop-card.is-row { flex: 0 0 140px; }
.shop-card.is-row .shop-card-txt { padding-right: 10px; padding-bottom: 46px; }
.shop-tag-off { position: absolute; top: 8px; left: 8px; background: #FFEDD5; color: #C2410C; font-size: 12px; font-weight: 800; border-radius: 6px; padding: 2px 7px; }
.shop-tag-off.is-big { top: 12px; left: 12px; font-size: 14px; padding: 4px 9px; }
.shop-flash-bar { background: var(--shop-or); color: #FFFFFF; border-radius: 10px; padding: 8px 12px; font-size: 14px; font-weight: 700; }
.shop-gallery-wrap { position: relative; }
.shop-qty-row { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 700; }
.shop-qty-row .shop-qty { margin-top: 0; }
.shop-qty-sum { margin-left: auto; color: var(--shop-or); }
.shop-info-box { border: 1px solid var(--shop-line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; color: #374151; }
.shop-buy { display: flex; gap: 8px; }
.shop-buy button { border-radius: 12px; font-family: inherit; font-weight: 800; cursor: pointer; padding: 14px 6px; font-size: 13.5px; white-space: nowrap; }
.shop-buy-wa { flex: 0 0 52px; border: 1.5px solid var(--shop-line); background: #FFFFFF; font-size: 20px !important; }
.shop-buy-add { flex: 1; border: 1.5px solid var(--shop-or); background: #FFFFFF; color: var(--shop-or); }
.shop-buy-now { flex: 1; border: none; background: var(--shop-or); color: #FFFFFF; }
.shop-nav { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: 100%; max-width: 480px; z-index: 40; background: #FFFFFF; border-top: 1px solid var(--shop-line); display: flex; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.shop-nav-btn { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; border: none; background: none; font-family: inherit; font-size: 11px; font-weight: 700; color: var(--shop-mute); cursor: pointer; padding: 4px 0; }
.shop-nav-btn.is-on { color: var(--shop-or); }
.shop-nav-ic { position: relative; font-size: 21px; line-height: 1.1; }
.shop-nav-ic .shop-cart-badge { top: -6px; right: -12px; min-width: 18px; height: 18px; font-size: 10.5px; }
.shop-flash-edit { border: 1.5px dashed #FDBA74; background: var(--shop-or-soft); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.shop-form input[type="datetime-local"] { width: 100%; box-sizing: border-box; border: 1.5px solid #D1D5DB; border-radius: 12px; padding: 11px; font-size: 15px; font-family: inherit; background: #FFFFFF; color: var(--shop-ink); }
.shop-bn-edit { border: 1px solid var(--shop-line); border-radius: 14px; padding: 10px 12px; }
.shop-bn-head { display: flex; align-items: center; gap: 6px; }
.shop-bn-head b { flex: 1; }

/* Boutique — stock et variantes (v11.132) */
.shop-from { width: 100%; font-size: 11px; color: var(--shop-mute); font-weight: 600; }
.shop-left { font-size: 11.5px; font-weight: 800; color: #C2410C; margin-top: 2px; }
.shop-stock.is-low { color: #C2410C; }
.shop-var-title { font-size: 14px; color: #374151; }
.shop-vars { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-var { border: 1.5px solid var(--shop-line); background: #FFFFFF; color: var(--shop-ink); border-radius: 10px; padding: 9px 12px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.shop-var.is-on { border-color: var(--shop-or); background: var(--shop-or-soft); color: #9A3412; box-shadow: inset 0 0 0 1px var(--shop-or); }
.shop-var.is-out { color: #9CA3AF; text-decoration: line-through; border-style: dashed; }
.shop-var small { font-size: 10px; font-weight: 600; text-decoration: none; }
.shop-cart-var { font-size: 12.5px; font-weight: 700; color: #9A3412; }
.shop-var-edit { border: 1.5px dashed #C7D2FE; background: #F8FAFF; border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.shop-var-row { background: #FFFFFF; border: 1px solid var(--shop-line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.shop-var-row-head { display: flex; align-items: center; gap: 6px; }
.shop-var-row-head b { flex: 1; }
.shop-var-photo { display: flex; align-items: center; gap: 8px; }
.shop-var-photo img { width: 48px; height: 48px; object-fit: contain; border: 1px solid var(--shop-line); border-radius: 8px; }
.shop-var-photo .shop-btn-ghost { flex: 1; text-align: center; font-size: 13px; padding: 10px; }

/* Boutique — retrait à la boutique et zones de livraison (v11.133) */
.shop-pick { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 1.5px solid var(--shop-line); background: #FFFFFF; border-radius: 14px; padding: 12px; cursor: pointer; font-family: inherit; color: var(--shop-ink); }
.shop-pick.is-on { border-color: var(--shop-or); background: var(--shop-or-soft); box-shadow: inset 0 0 0 1px var(--shop-or); }
.shop-pick-ic { font-size: 26px; flex: 0 0 auto; }
.shop-pick-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14.5px; }
.shop-pick-txt small { font-size: 12.5px; color: var(--shop-mute); font-weight: 500; }
.shop-pick em { font-style: normal; font-weight: 800; font-size: 13px; color: #15803D; white-space: nowrap; }
.shop-zones { display: flex; flex-direction: column; gap: 6px; }
.shop-zone { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; border: 1.5px solid var(--shop-line); background: #FFFFFF; border-radius: 12px; padding: 10px 12px; cursor: pointer; font-family: inherit; color: var(--shop-ink); }
.shop-zone span { display: flex; flex-direction: column; gap: 1px; font-size: 14px; }
.shop-zone small { font-size: 12px; color: var(--shop-mute); }
.shop-zone em { font-style: normal; font-weight: 800; color: var(--shop-or); white-space: nowrap; }
.shop-zone.is-on { border-color: var(--shop-or); background: var(--shop-or-soft); }
.shop-linkbtn { border: none; background: none; padding: 0; color: var(--shop-or); font-weight: 800; font-size: inherit; text-decoration: underline; cursor: pointer; font-family: inherit; }
