* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Arial, sans-serif; }

:root {
  --primary: #000000;
  --bg: #f5f6fa;
  --white: #ffffff;
  --text: #1a1a1e;
  --sub: #6b7280;
  --nav-h: 64px;
  --radius: 20px;
}

body {
  background: var(--bg);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* ── Coque téléphone (desktop uniquement) ── */
.phone {
  width: 390px;
  height: 820px;
  background: var(--white);
  border-radius: 36px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}

/* ── Responsive mobile réel ── */
@media (hover: none) and (pointer: coarse) {
  body { background: var(--bg); align-items: flex-start; }
  .phone {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
}

/* ══════════════ PAGES ══════════════ */
.page {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: calc(100% - var(--nav-h));
  overflow-y: auto;
  display: none;
  flex-direction: column;
  background: var(--bg);
}
.page.active { display: flex; }

/* ══════════════ PAGE ACCUEIL ══════════════ */
#page-accueil {
  background: var(--bg);
  padding: 0;
  overflow-y: auto;
}

/* ── Header accueil ── */
.home-header {
  background: linear-gradient(135deg, #0d0d0d, #1c1c1e);
  padding: 24px 16px 20px;
  flex-shrink: 0;
}
.home-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.home-greeting { font-size: 13px; color: #9ca3af; margin-bottom: 2px; }
.home-shop-name { font-size: 19px; font-weight: 800; color: #fff; letter-spacing: 0.2px; }
.home-avatar-btn {
  width: 42px; height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: #fff;
  cursor: pointer; flex-shrink: 0;
}
.home-session-banner {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.home-session-label { font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.home-session-total { font-size: 24px; font-weight: 900; color: #fff; }
.home-session-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.home-session-count { font-size: 13px; font-weight: 700; color: #9ca3af; }
.home-scan-shortcut {
  display: flex; align-items: center; gap: 6px;
  background: #fff; color: #0d0d0d;
  border: none; border-radius: 20px;
  padding: 7px 13px; font-size: 13px; font-weight: 700;
  cursor: pointer;
}
.home-scan-shortcut svg { stroke: #0d0d0d; }

/* ── Corps accueil ── */
.home-body { padding: 18px 16px 90px; }

.home-actions-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 22px;
}
.home-action-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 8px 10px;
  display: flex; flex-direction: column;
  align-items: center; gap: 8px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  transition: transform 0.1s;
}
.home-action-card:active { transform: scale(0.96); }
.home-action-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.home-action-label { font-size: 11px; font-weight: 600; color: #374151; text-align: center; }

.home-section-title {
  font-size: 11px; font-weight: 700;
  color: #9ca3af; text-transform: uppercase;
  letter-spacing: 0.8px; margin-bottom: 12px;
}

.recent-list { display: flex; flex-direction: column; gap: 10px; }
.recent-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 13px 14px;
  display: flex; justify-content: space-between; align-items: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.recent-item .name { font-size: 14px; font-weight: 600; color: #111827; }
.recent-item .meta { font-size: 12px; color: #9ca3af; margin-top: 2px; }
.recent-item .price { font-size: 15px; font-weight: 700; color: #111827; }

/* ══════════════ PAGE SCANNER ══════════════ */
#page-scanner { background: #000; position: relative; }

#page-scanner video {
  width: 100%;
  height: 55%;
  object-fit: cover;
  display: block;
}

.scan-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 55%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.scan-frame {
  width: 200px;
  height: 200px;
  position: relative;
}
.scan-frame::before, .scan-frame::after,
.scan-frame .corner-br, .scan-frame .corner-bl {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: #ffffff;
  border-style: solid;
}
.scan-frame::before  { top: 0;    left: 0;  border-width: 3px 0 0 3px; border-radius: 6px 0 0 0; }
.scan-frame::after   { top: 0;    right: 0; border-width: 3px 3px 0 0; border-radius: 0 6px 0 0; }
.scan-frame .corner-br { bottom: 0; right: 0; border-width: 0 3px 3px 0; border-radius: 0 0 6px 0; }
.scan-frame .corner-bl { bottom: 0; left: 0;  border-width: 0 0 3px 3px; border-radius: 0 0 0 6px; }

.scan-line {
  position: absolute;
  top: 0; left: 10px; right: 10px;
  height: 2px;
  background: linear-gradient(to right, transparent, #ffffff, transparent);
  animation: scanAnim 2s linear infinite;
}
@keyframes scanAnim {
  0%   { top: 10px; opacity: 1; }
  90%  { top: 185px; opacity: 1; }
  100% { top: 185px; opacity: 0; }
}

.scan-panel {
  background: var(--white);
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 45%;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  padding: 16px 16px 80px;
  overflow-y: auto;
}

.scan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.scan-header span:first-child { font-size: 15px; font-weight: 600; color: var(--text); }
.scan-total { font-size: 18px; font-weight: 700; color: var(--primary); }

.item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #2a2a2a;
}
.item .item-info .item-name { font-size: 14px; font-weight: 600; color: var(--text); }
.item .item-info .item-price { font-size: 13px; color: var(--sub); margin-top: 2px; }

.qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.qty-controls button {
  width: 28px;
  height: 28px;
  border: none;
  background: #000000;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.qty-controls span { font-size: 15px; font-weight: 600; min-width: 20px; text-align: center; color: var(--text); }

.checkout-btn {
  position: absolute;
  bottom: 12px;
  left: 16px;
  right: 16px;
  padding: 14px;
  background: #000000;
  color: #ffffff;
  text-align: center;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  width: calc(100% - 32px);
  letter-spacing: 0.3px;
}

/* ══════════════ PAGE RECHERCHE ══════════════ */
#page-recherche { background: var(--bg); padding: 20px 16px; }

.search-bar {
  background: var(--white);
  border: 1px solid #2a2a2a;
  border-radius: 14px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  margin-bottom: 20px;
}
.search-bar input {
  border: none;
  outline: none;
  font-size: 15px;
  flex: 1;
  color: var(--text);
  background: transparent;
}
.search-bar input::placeholder { color: #555; }
.search-icon { font-size: 16px; color: var(--sub); }

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.product-card {
  background: var(--white);
  border: 1px solid #ececec;
  border-radius: 16px;
  padding: 14px 14px 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: box-shadow 0.18s ease, transform 0.15s ease;
  position: relative;
}
.product-card:active { transform: scale(0.97); box-shadow: 0 1px 2px rgba(0,0,0,0.08); }
.product-card .p-name { font-size: 13px; font-weight: 700; color: #111827; margin-bottom: 2px; line-height: 1.3; }
.product-card .p-cat  { font-size: 11px; color: #9ca3af; margin-bottom: 10px; font-weight: 500; }
.product-card .p-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.product-card .p-price{ font-size: 15px; font-weight: 800; color: #111827; }
.product-card .p-add-btn {
  width: 30px; height: 30px;
  background: #111827;
  border: none;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}
.product-card .p-add-btn:active { transform: scale(0.88); background: #374151; }
.product-card .p-add-btn svg { width: 15px; height: 15px; stroke: #fff; stroke-width: 2.5; fill: none; stroke-linecap: round; }
/* ══════════════ PAGE PARAMÈTRES ══════════════ */
#page-parametres { background: var(--bg); }

.settings-group {
  background: var(--white);
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  margin-bottom: 16px;
}
.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #2a2a2a;
  cursor: pointer;
}
.settings-item:last-child { border-bottom: none; }
.settings-item .s-label { font-size: 15px; color: var(--text); }
.settings-item .s-value { font-size: 13px; color: var(--sub); }

.toggle {
  width: 44px; height: 24px;
  background: #d1d1d6;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s ease;
}
.toggle.on { background: #000000; }
.toggle::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #ffffff;
  border-radius: 50%;
  transition: left 0.3s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle.on::after { left: 23px; }

/* ══════════════ NAV BAR ══════════════ */
.nav-bar {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: var(--nav-h);
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  display: flex;
  border-top: 1px solid rgba(0,0,0,0.08);
  z-index: 100;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: color 0.35s cubic-bezier(0.34,1.56,0.64,1),
              transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
  color: var(--sub);
  font-size: 11px;
  font-weight: 500;
  border: none;
  background: transparent;
  padding: 0;
  letter-spacing: 0.3px;
}
.nav-item:active {
  transform: scale(0.85);
}
.nav-item.active {
  color: #000000;
}
.nav-item.active .nav-icon {
  transform: translateY(-2px) scale(1.15);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}

.nav-item .nav-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-item .nav-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}


.nav-scan-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  color: var(--sub);
  font-size: 11px;
  font-weight: 500;
  border: none;
  background: transparent;
  padding: 0;
  letter-spacing: 0.3px;
  position: relative;
}

.nav-scan-btn .scan-circle {
  width: 48px;
  height: 48px;
  background: #000000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: -18px;
  box-shadow: 0 4px 16px rgba(255,255,255,0.2);
}

.nav-scan-btn .scan-circle svg {
  width: 22px;
  height: 22px;
  stroke: #ffffff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-scan-btn .nav-label {
  margin-top: 18px;
}
.nav-scan-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  color: var(--sub);
  font-size: 11px;
  font-weight: 500;
  border: none;
  background: transparent;
  padding: 0;
  letter-spacing: 0.3px;
  position: relative;
  transition: color 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.nav-scan-btn:active .scan-circle {
  transform: scale(0.88) translateY(2px);
}
.nav-scan-btn.active .scan-circle { background: #222222; }
.nav-scan-btn.active { color: #000000; }
.nav-scan-btn .scan-circle {
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1),
              background 0.3s ease;
}
/* ══ CART TOAST ══ */
#cart-toast {
  position: absolute;
  bottom: calc(var(--nav-h) + 10px);
  left: 16px; right: 16px;
  background: #111827;
  border-radius: 16px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.22);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
#cart-toast.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
#cart-toast .toast-left { display: flex; align-items: center; gap: 10px; }
#cart-toast .toast-icon { width: 32px; height: 32px; background: #1f2937; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
#cart-toast .toast-icon svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; }
#cart-toast .toast-label { font-size: 12px; color: #9ca3af; font-weight: 500; }
#cart-toast .toast-count { font-size: 14px; font-weight: 700; color: #fff; margin-top: 1px; }
#cart-toast .toast-total { font-size: 16px; font-weight: 800; color: #fff; }
#cart-toast .toast-btn {
  background: #fff;
  color: #111827;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.2px;
}
/* ══════════════ OVERLAY CAISSE ══════════════ */
#overlay-caisse {
  display: none;
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: #f5f6fa;
  z-index: 500;
  flex-direction: column;
  overflow: hidden;
}
#overlay-caisse.active { display: flex; }

.caisse-header {
  background: linear-gradient(135deg, #0d0d0d, #1c1c1e);
  padding: 20px 16px 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.caisse-header-title { font-size: 17px; font-weight: 700; color: #fff; }
.caisse-header-sub { font-size: 12px; color: #6b7280; margin-top: 2px; }
.caisse-close-btn {
  background: #2a2a2a; border: none; color: #fff;
  width: 34px; height: 34px; border-radius: 50%;
  font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.caisse-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 180px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.caisse-section-label {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  padding-left: 2px;
}

.caisse-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.caisse-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #f3f4f6;
}
.caisse-item-row:last-child { border-bottom: none; }
.caisse-item-name { font-size: 14px; font-weight: 600; color: #111827; }
.caisse-item-qty { font-size: 12px; color: #6b7280; margin-top: 2px; }
.caisse-item-total { font-size: 14px; font-weight: 700; color: #111827; }

/* Moyens de paiement */
.paiement-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.paiement-option {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: #fff;
}
.paiement-option.selected {
  border-color: #111827;
  background: #f9fafb;
}
.paiement-logo {
  width: 44px; height: 26px;
  object-fit: contain;
}
.paiement-label {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}

/* Statut paiement */
.statut-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.statut-option {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  background: #fff;
  transition: border-color 0.2s, background 0.2s;
}
.statut-option.selected {
  border-color: #111827;
  background: #f9fafb;
  color: #111827;
}

/* Réduction */
.reduction-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
}
.reduction-row input {
  flex: 1;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  color: #111827;
  background: #f9fafb;
}
.reduction-row select {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #111827;
  background: #f9fafb;
  outline: none;
}

/* Résumé financier */
.resume-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
  color: #374151;
}
.resume-row:last-child { border-bottom: none; }
.resume-row.total {
  font-size: 16px;
  font-weight: 800;
  color: #111827;
  padding: 13px 14px;
}
.resume-row span:last-child { font-weight: 700; }

/* Pied fixe */
.caisse-footer {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  padding: 12px 16px 20px;
  background: rgba(245,246,250,0.97);
  backdrop-filter: blur(10px);
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.caisse-confirm-btn {
  width: 100%;
  padding: 15px;
  background: #0d0d0d;
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.3px;
}
.caisse-cancel-btn {
  width: 100%;
  padding: 12px;
  background: transparent;
  color: #6b7280;
  border: none;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
/* ══════════════ OVERLAY REÇU ══════════════ */
#overlay-recu {
  display: none;
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.55);
  z-index: 900;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#overlay-recu.active { display: flex; }

.recu-box {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-height: 88%;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
}

.recu-header {
  background: linear-gradient(135deg, #0d0d0d, #1c1c1e);
  border-radius: 20px 20px 0 0;
  padding: 22px 20px 18px;
  text-align: center;
  position: relative;
}
.recu-header-logo {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; color: #fff;
  margin: 0 auto 10px;
}
.recu-header h2 {
  font-size: 17px; font-weight: 800; color: #fff;
  margin-bottom: 3px; letter-spacing: 0.3px;
}
.recu-header-sub {
  font-size: 11px; color: #9ca3af; letter-spacing: 0.3px;
}
.recu-header-date {
  margin-top: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px; padding: 5px 12px;
  font-size: 11px; color: #d1d5db; font-weight: 500;
}
.recu-num {
  margin-top: 8px;
  font-size: 10px; color: #6b7280; letter-spacing: 1px;
  text-transform: uppercase;
}

.recu-body { padding: 18px 18px 0; }

.recu-section-label {
  font-size: 10px; font-weight: 700; color: #9ca3af;
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 8px; padding-left: 2px;
}
.recu-divider {
  border: none;
  border-top: 1px dashed #e5e7eb;
  margin: 14px 0;
}
.recu-article-row {
  display: flex; justify-content: space-between;
  align-items: flex-start; margin-bottom: 9px;
}
.recu-article-name {
  font-size: 14px; font-weight: 600; color: #111827; flex: 1;
}
.recu-article-detail {
  font-size: 11px; color: #9ca3af; margin-top: 1px;
}
.recu-article-prix {
  font-size: 14px; font-weight: 700; color: #111827;
  white-space: nowrap; padding-left: 10px;
}

.recu-total-row {
  display: flex; justify-content: space-between;
  font-size: 13px; color: #374151; margin-bottom: 6px;
}
.recu-total-row span:last-child { font-weight: 600; }
.recu-total-grand {
  display: flex; justify-content: space-between;
  align-items: center;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 8px;
}
.recu-total-grand .label { font-size: 13px; font-weight: 700; color: #111827; }
.recu-total-grand .montant { font-size: 20px; font-weight: 900; color: #111827; }

.recu-paiement-badge {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 20px; padding: 5px 12px;
  font-size: 12px; font-weight: 700; margin-top: 10px;
}

.recu-statut-badge {
  display: inline-flex; align-items: center; gap: 5px;
  border-radius: 20px; padding: 4px 10px;
  font-size: 11px; font-weight: 600; margin-left: 6px;
}

.recu-monnaie-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 11px 14px;
  margin-top: 10px;
  display: flex; justify-content: space-between; align-items: center;
}
.recu-monnaie-box .label { font-size: 13px; color: #15803d; font-weight: 600; }
.recu-monnaie-box .montant { font-size: 16px; font-weight: 800; color: #15803d; }

.recu-partiel-box {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  padding: 11px 14px;
  margin-top: 10px;
}
.recu-partiel-box .row {
  display: flex; justify-content: space-between;
  font-size: 13px; margin-bottom: 4px;
}
.recu-partiel-box .row:last-child { margin-bottom: 0; }
.recu-partiel-box .row .label { color: #92400e; font-weight: 500; }
.recu-partiel-box .row .val { font-weight: 700; color: #c2410c; }

.recu-footer-note {
  text-align: center;
  font-size: 11px; color: #9ca3af;
  padding: 14px 18px 6px;
  letter-spacing: 0.3px;
}
.recu-footer-note strong { color: #374151; }

.recu-actions {
  display: flex; gap: 8px;
  padding: 14px 18px 20px;
}
.recu-btn-print {
  flex: 1; padding: 13px;
  background: #0d0d0d; color: #fff;
  border: none; border-radius: 12px;
  font-size: 14px; font-weight: 700; cursor: pointer;
  letter-spacing: 0.3px;
}
.recu-btn-close {
  padding: 13px 16px;
  background: #f3f4f6; color: #374151;
  border: none; border-radius: 12px;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
/* ══ HISTORIQUE FACTURES ══ */
.hist-filter-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: #9ca3af;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.hist-filter-btn.active {
  background: #fff;
  color: #111827;
  border-color: #fff;
}