﻿/* ============================================================
   style.css Yère-S Management App
   Noir · Blanc · Gris Classique & Sobre
   ============================================================ */

/* ── Scroll Reveal ─────────────────────────────────────────── */
.rv {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.52s ease, transform 0.52s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.rv--in {
  opacity: 1;
  transform: none;
}

/* Fonts are now imported in HTML for better performance */

/* ── Variables ────────────────────────────────────────────── */
:root {
  /* Palette noir / blanc / gris */
  --black:       #050505;
  --gray-900:    #111111;
  --gray-800:    #222222;
  --gray-700:    #333333;
  --gray-600:    #555555;
  --gray-500:    #777777;
  --gray-400:    #999999;
  --gray-300:    #BBBBBB;
  --gray-200:    #DDDDDD;
  --gray-150:    #E8E8E8;
  --gray-100:    #F2F2F2;
  --gray-50:     #F8F8F8;
  --white:       #FFFFFF;

  /* Sémantique */
  --text-primary:   var(--gray-900);
  --text-secondary: var(--gray-600);
  --text-muted:     var(--gray-400);
  --border:         rgba(0,0,0,0.12);
  --border-strong:  rgba(0,0,0,0.25);
  --shadow-sm:      0 1px 4px rgba(0,0,0,0.07);
  --shadow:         0 2px 12px rgba(0,0,0,0.09);
  --shadow-lg:      0 8px 32px rgba(0,0,0,0.12);
  --shadow-xl:      0 20px 60px rgba(0,0,0,0.14);

  /* Statuts (couleurs fonctionnelles uniquement) */
  --s-attente-bg:    #F5F5F5;  --s-attente-txt:  #444444;  --s-attente-bd:  #CCCCCC;
  --s-encours-bg:    #FFF8E6;  --s-encours-txt:  #7A5800;  --s-encours-bd:  #F0D080;
  --s-pret-bg:       #F0FAF4;  --s-pret-txt:     #1A6035;  --s-pret-bd:     #80C8A0;
  --s-livre-bg:      #E8F5EE;  --s-livre-txt:    #0D4020;  --s-livre-bd:    #50A070;
  --s-annule-bg:     #FFF0F0;  --s-annule-txt:   #8B0000;  --s-annule-bd:   #FFAAAA;
  --s-pris-bg:       #F0F4FF;  --s-pris-txt:     #1A3080;  --s-pris-bd:     #90A8E8;

  /* Layout */
  --sidebar-width:     240px;
  --sidebar-collapsed: 64px;
  --header-height:     50px; /* Header plus fin et élégant */
  --radius-sm:         6px;
  --radius:            10px;
  --radius-lg:         14px;
  --radius-xl:         20px;

  /* Typo */
  --font-display: 'Bebas Neue', system-ui, sans-serif;
  --font-body:    'Outfit', system-ui, sans-serif;

  /* Transitions */
  --t:    all 0.2s ease;
  --t-lg: all 0.32s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}
body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--text-primary);
  min-height: 100%;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* TEST TEMPORAIRE — overscroll-behavior:none désactivé pour diagnostiquer le blocage de scroll */
  -webkit-tap-highlight-color: transparent;
}

/* Couleur de fond qui couvre la safe-area selon la page */
body.page-app   {
  background: var(--gray-50);
  color: var(--text-primary);
  font-family: var(--font-body);
  background-image:
    radial-gradient(circle at 0% 0%, rgba(0, 0, 0, 0.02) 0%, transparent 50%),
    radial-gradient(circle at 100% 100%, rgba(0, 0, 0, 0.02) 0%, transparent 50%);
}
body.page-login {
  background:
    linear-gradient(135deg, rgba(8,8,8,0.82) 0%, rgba(18,18,18,0.88) 100%),
    url('/assets/images/bg-login.jpg') center center / cover no-repeat fixed;
  background-attachment: fixed;
}
@media (max-width: 900px) {
  body.page-login {
    background:
      linear-gradient(135deg, rgba(8,8,8,0.82) 0%, rgba(18,18,18,0.88) 100%),
      url('/assets/images/bg-login.jpg') center center / cover no-repeat scroll;
    background-attachment: scroll;
  }
}
button {
  cursor: pointer;
  font-family: var(--font-body);
  border: none;
  background: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
input, select, textarea {
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
}
a {
  text-decoration: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
img { display: block; max-width: 100%; -webkit-user-drag: none; }
ul, ol { list-style: none; }

/* ── Utilities ────────────────────────────────────────────── */
.hidden { display: none !important; }
.glass  { 
  background: rgba(255, 255, 255, 0.7); 
  border: 1px solid rgba(0, 0, 0, 0.08); 
  box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.glass-strong { 
  background: rgba(255, 255, 255, 0.9); 
  border: 1px solid rgba(0, 0, 0, 0.12); 
  box-shadow: 0 20px 60px rgba(0,0,0,0.1); 
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ══════════════════════════════════════════════════════════
   LOGIN
   ══════════════════════════════════════════════════════════ */
.login-container {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  /* Le background est porté par body.page-login pour couvrir aussi la safe-area */
  position: relative;
  overflow: hidden;
}

.login-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 59px,
      rgba(255,255,255,0.025) 59px,
      rgba(255,255,255,0.025) 60px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 59px,
      rgba(255,255,255,0.025) 59px,
      rgba(255,255,255,0.025) 60px
    );
  pointer-events: none;
}

.login-container::after {
  content: 'YËREDESIGN';
  position: absolute;
  bottom: 0;
  right: 0;
  font-size: clamp(60px, 10vw, 160px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: rgba(255,255,255,0.18);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  line-height: 1;
  bottom: -0.14em;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--white);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 4px 20px rgba(0,0,0,0.3);
  animation: fadeInUp 0.4s ease;
  position: relative;
  z-index: 1;
}

.login-logo { text-align: center; margin-bottom: 40px; }
.login-logo .logo-text {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--black);
  letter-spacing: 0.14em;
  line-height: 1;
}
.login-logo .logo-line {
  display: block;
  width: 32px; height: 1px;
  background: var(--gray-300);
  margin: 14px auto;
}
.login-logo .logo-sub {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

/* ── Forms ────────────────────────────────────────────────── */
.form-group { margin-bottom: 24px; }
.form-group label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
  opacity: 0.6;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  background: var(--white);
  border-color: #C9A96E;
  box-shadow: 0 0 0 4px rgba(201, 169, 110, 0.1);
  transform: translateY(-1px);
}
.form-group input::placeholder { color: var(--text-muted); }
.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23777' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 34px;
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

/* ── Login responsive ─────────────────────────────────────── */
@media (max-width: 480px) {
  .login-container {
    padding: 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
    align-items: flex-start;
    padding-top: max(140px, calc(60px + env(safe-area-inset-top)));
  }
  .login-card {
    padding: 36px 24px;
    border-radius: var(--radius-lg);
  }
  /* Empêche le zoom iOS sur les inputs de connexion */

  .login-card input,
  .login-card select {
    font-size: 16px;
  }
  .login-logo { margin-bottom: 28px; }
  .login-logo .logo-text { font-size: 1.7rem; }
  .login-container::after {
    font-size: 13vw;
    bottom: -0.14em;
    right: 0;
  }
}

@media (max-width: 360px) {
  .login-container { padding-top: 70px; }
  .login-card { padding: 28px 18px; }
  .login-logo .logo-text { font-size: 1.45rem; }
  .login-container::after { font-size: 11vw; bottom: -0.14em; right: 0; }
}

@media (min-width: 992px) {
  .login-container {
    padding: 40px;
    justify-content: center;
  }
  .login-card {
    max-width: 460px;
    width: 100%;
    min-height: auto;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255,255,255,0.12);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 40px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.5), 0 4px 20px rgba(0,0,0,0.3);
  }
  .login-container::after {
    left: 20px;
    right: auto;
    bottom: 20px;
    font-size: 80px;
    color: rgba(255,255,255,0.4);
  }
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  transition: var(--t);
  cursor: pointer;
  border: none;
  white-space: nowrap;
  letter-spacing: 0.02em;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
.btn:active:not(:disabled) { transform: scale(0.97) !important; }
.btn-primary {
  background: var(--black);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.btn-primary:hover {
  background: var(--gray-800);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.24);
}
.btn-secondary {
  background: var(--white);
  color: var(--text-primary);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover {
  background: var(--gray-50);
  transform: translateY(-1px);
  border-color: var(--gray-400);
}
.btn-danger {
  background: #FFF0F0;
  color: #8B0000;
  border: 1px solid #FFAAAA;
}
.btn-danger:hover {
  background: #FFE0E0;
  transform: translateY(-1px);
}
.btn-full   { width: 100%; justify-content: center; }

/* ── AUTH PRIORITY (Google) ─────────────────────────────── */
.auth-priority-zone { margin-bottom: 24px; padding-bottom: 4px; }
.login-design-form {
  margin-top: 10px;
}
.login-design-form .btn {
  width: 100%;
  margin-top: 4px;
}
.login-design-form .btn[disabled] {
  opacity: 0.52;
}
.btn-google-priority {
  width: 100%; height: 48px; border-radius: var(--radius-md);
  background: var(--white); border: 1px solid var(--border-strong);
  color: var(--black); font-size: .95rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  cursor: pointer; transition: var(--t);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.btn-google-priority:hover { background: var(--gray-50); border-color: var(--black); transform: translateY(-1px); }
.btn-google-priority:active { transform: translateY(0); }

.btn-apple-priority {
  width: 100%; height: 48px; border-radius: var(--radius-md);
  background: #111; border: 1px solid #111;
  color: #fff; font-size: .95rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  cursor: pointer; transition: var(--t); margin-top: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.btn-apple-priority:hover { background: #333; border-color: #333; transform: translateY(-1px); }
.btn-apple-priority:active { transform: translateY(0); }
.btn-apple-priority:disabled { opacity: .6; cursor: not-allowed; transform: none; }


.auth-separator {
  position: relative; text-align: center; margin: 24px 0 12px;
}
.auth-separator::before {
  content: ""; position: absolute; top: 50%; left: 0; right: 0;
  height: 1px; background: var(--border); z-index: 1;
}
.auth-separator span {
  position: relative; z-index: 2; background: var(--white);
  padding: 0 12px; font-size: .75rem; font-weight: 700;
  color: var(--text-muted); letter-spacing: 1px;
}
.glass .auth-separator span { background: rgba(255,255,255,0.01); backdrop-filter: blur(20px); }
/* Specific fix for glass background overlap if needed */
.login-card.glass .auth-separator span { background: #fff; }

.auth-error-msg {
  background: rgba(200,0,0,0.08);
  border: 1px solid rgba(200,0,0,0.25);
  color: var(--danger, #c00);
  font-size: 0.78rem;
  line-height: 1.5;
  padding: 10px 14px;
  border-radius: 8px;
  margin: 12px 0 0;
}

.btn-sm     { padding: 6px 13px; font-size: 0.8rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none !important; }

/* ── Password toggle ─────────────────────────────────────── */
.input-password-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-password-wrap input {
  width: 100%;
  padding-right: 44px;
}
.toggle-password-btn {
  position: absolute;
  right: 12px;
  color: var(--gray-400);
  font-size: 0.9rem;
  padding: 4px;
  border-radius: 4px;
  transition: var(--t);
  flex-shrink: 0;
}
.toggle-password-btn:hover { color: var(--gray-700); }

.login-version {
  text-align: center;
  margin-top: 24px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-400);
}

/* ── Error msg ────────────────────────────────────────────── */
.error-msg {
  background: #FFF0F0;
  border: 1px solid #FFAAAA;
  color: #8B0000;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 16px;
}

/* ── Auth loader ──────────────────────────────────────────── */
.auth-loader {
  position: fixed;
  inset: 0;
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.auth-loader.hidden { display: none; }
.auth-loader-inner  { text-align: center; }
.auth-loader-spinner {
  width: 28px; height: 28px;
  border: 2px solid var(--gray-200);
  border-top-color: var(--gray-800);
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════════════════
   APP LAYOUT
   ══════════════════════════════════════════════════════════ */
.app-container {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 1000;
  transition: var(--t-lg), z-index 0s;
  overflow: hidden;
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
  min-height: var(--header-height);
  flex-shrink: 0;
}
.sidebar-logo { display: flex; align-items: center; gap: 10px; overflow: hidden; min-width: 0; }
.logo-icon {
  width: 32px; height: 32px;
  background: var(--black);
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
  letter-spacing: 0;
  overflow: hidden;
}
.logo-icon img { width: 100%; height: 100%; object-fit: cover; }
.logo-full {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--black);
  letter-spacing: 0.12em;
  white-space: nowrap;
  transition: var(--t);
}
.sidebar.collapsed .logo-full { opacity: 0; width: 0; }
.sidebar.collapsed .sidebar-logo { width: 0; overflow: hidden; margin: 0; padding: 0; }
.sidebar.collapsed .sidebar-header { justify-content: center; }

.sidebar-toggle-btn {
  color: var(--gray-400);
  padding: 6px;
  border-radius: 6px;
  transition: var(--t);
  flex-shrink: 0;
}
.sidebar-toggle-btn:hover { background: var(--gray-100); color: var(--text-primary); }

/* ── Nav ──────────────────────────────────────────────────── */
.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--t);
  width: 100%;
  white-space: nowrap;
  position: relative;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.nav-item i { font-size: 1rem; width: 18px; text-align: center; flex-shrink: 0; }
.nav-item span { transition: var(--t); overflow: hidden; }
.sidebar.collapsed .nav-item span { opacity: 0; width: 0; }
.nav-item:hover { background: var(--gray-100); color: var(--text-primary); }
.nav-item.active {
  background: var(--gray-100);
  color: var(--text-primary);
}
.sidebar.collapsed .nav-item.active {
  border-left: none;
  padding-left: 12px;
}

/* Tooltips collapsed */
.sidebar.collapsed .nav-item[data-view]::after,
.sidebar.collapsed .logout-item::after {
  content: attr(data-tooltip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--gray-900);
  color: var(--white);
  padding: 5px 11px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: var(--t);
  z-index: 150;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: var(--shadow);
}
.sidebar.collapsed .nav-item[data-view]:hover::after,
.sidebar.collapsed .logout-item:hover::after { opacity: 1; }

/* ── Sidebar Footer ───────────────────────────────────────── */
.sidebar-footer { padding: 10px 10px 18px; border-top: 1px solid var(--border); }
.logout-item { color: var(--text-secondary) !important; }
.logout-item:hover { background: rgba(0,0,0,0.06) !important; color: var(--text-primary) !important; }

/* ── Overlay mobile ───────────────────────────────────────── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 2000;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.sidebar-overlay.visible { display: block; }
.sidebar-overlay.visible ~ .main-content .app-header { z-index: 5 !important; }

/* ── Main Content ─────────────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  transition: var(--t-lg);
  background: var(--gray-50);
  -webkit-overflow-scrolling: touch;
  overflow-x: hidden;
}

/* ── Admin view padding ──────────────────────────────────── */
body.page-admin .view { padding: 28px 28px 180px; }
@media (max-width: 1023px) { body.page-admin .view { padding: 16px 16px 180px; } }
@media (max-width: 767px)  { body.page-admin .view { padding: 12px 12px 80px; } }
.sidebar.collapsed ~ .main-content,
body.sidebar-collapsed .main-content { margin-left: var(--sidebar-collapsed); }

/* ── Header ───────────────────────────────────────────────── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 28px;
  height: var(--header-height);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
}

/* ── Header toolbar (vue clients) ───────────────────────── */
.app-header.has-clients-bar {
  flex-wrap: wrap;
  height: auto;
  padding-top: 10px;
  padding-bottom: 12px;
  align-items: center;
}
.app-header.has-clients-bar h1 { margin-bottom: 0; }

.view-clients-bar {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
/* Ligne 1 : tabs pleine largeur → force le wrap */
.vcb-tabs {
  width: 100%;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.vcb-sep { display: none; }
/* Ligne 2 : search + filtres */
.view-clients-bar .search-box {
  width: 200px;
  min-width: 120px;
  flex-shrink: 1;
}
.vcb-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.vcb-filters .filter-select { min-width: 100px; flex: 1; }
@media (max-width: 767px) {
  .view-clients-bar { display: none; }
}

.page-app .app-header {
  background: #fff;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--text-primary);
  height: 48px;
}
.page-app .app-header.has-clients-bar {
  height: auto;
}
.page-app #view-title {
  color: var(--text-primary);
  font-size: 1.1rem;
  letter-spacing: 0.12em;
}

/* ── Mode Header Fondu sur Hero (Atelier/Admin) ── */
.app-header.on-hero {
  background: transparent !important;
  border-bottom: none !important;
  backdrop-filter: none !important;
  box-shadow: none !important;
}

.app-header.on-hero #view-title,
.app-header.on-hero .mobile-menu-btn,
.app-header.on-hero .user-badge {
  color: #FFFFFF !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  backdrop-filter: blur(8px);
}

.app-header.on-hero .header-actions .btn {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  color: #FFFFFF !important;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}
.mobile-menu-btn {
  display: none;
  color: rgba(255,255,255,0.85);
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer;
  align-items: center; justify-content: center;
  position: relative;
  z-index: 1500;
  transition: var(--t);
}
.mobile-menu-btn i {
  transition: transform 0.2s ease;
}
.mobile-menu-btn:hover { background: var(--gray-100); border-color: var(--border-strong); }
#view-title, #user-view-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--text-primary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.page-app #user-view-title {
  color: var(--text-primary);
  text-shadow: none;
}
.page-app .mobile-menu-btn,
.page-app .user-back-btn,
.page-app .header-actions .btn,
.page-app .user-badge {
  background: var(--gray-100);
  border-color: var(--border);
  color: var(--text-primary);
}
.page-app .mobile-menu-btn:hover,
.page-app .user-back-btn:hover,
.page-app .header-actions .btn:hover {
  background: #f1f1ef;
  border-color: var(--border-strong);
  color: var(--text-primary);
}

/* ── User cart summary ──────────────────────────────────── */
.user-cart-summary {
  display: flex;
  align-items: stretch;
  margin-bottom: 20px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #ebebeb;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.user-cart-summary-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 16px 12px;
  position: relative;
  text-align: center;
}
.user-cart-summary-card + .user-cart-summary-card::before {
  content: '';
  position: absolute;
  left: 0; top: 18%; bottom: 18%;
  width: 1px;
  background: rgba(0,0,0,0.08);
}
.user-cart-summary-card .k {
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(0,0,0,0.38);
  display: flex;
  align-items: center;
  gap: 4px;
}
.user-cart-summary-card:last-child .k { color: rgba(0,0,0,0.45); }
.user-cart-summary-card .k i { opacity: 1; font-size: .58rem; }
.user-cart-summary-card strong {
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: .06em;
  color: #050505;
  line-height: 1;
}
.user-cart-summary-card:last-child strong { color: #C9A96E; font-size: 1.35rem; }

@media (max-width: 768px) {
  .user-cart-summary-card { padding: 13px 8px; }
  .user-cart-summary-card strong { font-size: 1.25rem; }
  .user-cart-summary-card:last-child strong { font-size: 1.15rem; }
}

@media (max-width: 480px) {
  .user-cart-summary { border-radius: 12px; }
  .user-cart-summary-card { padding: 12px 6px; }
  .user-cart-summary-card .k { font-size: .55rem; }
  .user-cart-summary-card strong { font-size: 1.1rem; }
  .user-cart-summary-card:last-child strong { font-size: 1rem; }
}

/* ── Panier sections ─────────────────────────────────────── */
.user-panier-section {
  margin-bottom: 28px;
}
.user-panier-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.user-panier-section-header i {
  font-size: 1rem;
  color: var(--text-primary);
  opacity: .7;
}
.user-panier-section-info {
  margin-left: auto;
  font-size: .72rem;
  font-weight: 600;
  color: #6366f1;
  background: #6366f120;
  border-radius: 20px;
  padding: 3px 10px;
  letter-spacing: 0;
  text-transform: none;
  display: flex;
  align-items: center;
  gap: 5px;
}
.user-panier-group {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
}
.user-panier-group:last-child { margin-bottom: 0; }
.user-panier-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  background: #f8f8f8;
  border-bottom: 1px solid var(--border);
}
.user-panier-group-mode {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  font-weight: 700;
  color: #333;
  text-transform: none;
  letter-spacing: 0;
}
.user-panier-group-mode i {
  color: var(--brown);
  font-size: .9rem;
}
.user-panier-group-badge {
  font-size: .68rem;
  font-weight: 700;
  color: #1A6035;
  background: #1A603518;
  border-radius: 20px;
  padding: 3px 9px;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.user-panier-group .user-panier-section-items {
  padding: 8px;
}
.user-panier-section-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.user-panier-section-items .user-item-card {
  border: none !important;
  border-top: 1px solid var(--border) !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 0 !important;
  margin-bottom: 0 !important;
  box-shadow: none !important;
  padding: 12px 14px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  aspect-ratio: unset;
  min-width: 0;
  gap: 0;
  position: relative !important;
}
.user-panier-section-items .user-item-card::before {
  display: none !important;
}
.user-panier-section-items .user-item-main--row {
  flex: 1;
  min-width: 0;
  gap: 12px;
  align-items: center;
  padding-right: 28px;
}
.user-panier-section-items .user-item-media-wrapper {
  position: relative;
  width: 58px !important;
  height: 58px !important;
  flex-shrink: 0;
}
.user-panier-section-items .user-item-media-wrapper img,
.user-panier-section-items .user-item-media-wrapper .user-item-media--main {
  width: 58px !important;
  height: 58px !important;
  border-radius: 8px !important;
  object-fit: cover;
}
.user-panier-section-items .user-item-media-placeholder {
  width: 58px !important;
  height: 58px !important;
  aspect-ratio: unset;
  font-size: 1.6rem !important;
  border: none !important;
  background: var(--gray-50) !important;
  border-radius: 8px !important;
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-panier-section-items .user-item-remove {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  margin-left: 0;
  flex-shrink: 0;
  width: 24px !important;
  height: 24px !important;
  font-size: .6rem !important;
  z-index: 2;
}
@media (max-width: 480px) {
  .user-panier-section-items .user-item-remove {
    top: 8px !important;
    right: 8px !important;
    width: 22px !important;
    height: 22px !important;
  }
}

@media (max-width: 768px) {
  .user-panier-section { margin-bottom: 20px; }
  .user-panier-section-header { margin-bottom: 10px; font-size: .8rem; }
}

@media (max-width: 480px) {
  .user-panier-section { margin-bottom: 16px; }
  .user-panier-section-items .user-item-card {
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
    margin-left: -20px !important;
    margin-right: -20px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
  .user-panier-section-items {
    gap: 1px;
    background: var(--border);
  }
}

/* Override accueil.css styles for .page-app user-item-card */
.page-app .user-item-card {
  background: #fff !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: none !important;
  border-top: 1px solid var(--border) !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 0 !important;
  padding: 16px 16px 14px 20px !important;
  position: relative;
  overflow: hidden;
  box-shadow: none !important;
  transition: background 0.2s !important;
}

.page-app .user-item-card:hover {
  background: #fafafa !important;
  transform: none !important;
  box-shadow: none !important;
}
.user-item-card {
  position: relative;
  border: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: #fff;
  padding: 16px 16px 14px 20px;
  margin-bottom: 0;
  box-shadow: none;
  transition: background 0.2s;
  display: flex;
  flex-direction: column;
}
.user-item-card + .user-item-card { border-top: none; }
.user-item-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 2px;
  border-radius: 0;
  background: var(--black);
}
.user-item-card--boutique::before { background: #c9a96e; }

/* ── Tab Badges ───────────────────────────────────────────── */
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  padding: 0 5px;
  margin-left: 6px;
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
  animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.user-item-card:hover { background: #fafafa; }
.user-item-card--clickable { cursor: pointer; }

/* Modal détail panier liste d'infos */
.detail-info-list { display: flex; flex-direction: column; gap: 10px; }
.detail-info-row { display: flex; align-items: baseline; gap: 10px; font-size: .88rem; }
.detail-info-row--block { flex-direction: column; gap: 4px; }
.dir-label { font-weight: 600; font-size: .78rem; color: var(--text-muted); min-width: 100px; flex-shrink: 0; text-transform: uppercase; letter-spacing: .04em; }
.dir-val { margin: 0; color: var(--text-primary); line-height: 1.5; font-size: .88rem; }
.user-item-main--row { display: flex; gap: 16px; align-items: stretch; }
.user-item-media-wrapper {
  flex-shrink: 0;
  width: 110px;
  height: 110px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(201,169,110,.25);
  background: #f7f5f2;
}
.user-item-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2px 0;
}
.user-item-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 6px; }
.user-item-cat {
  font-size: .65rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted); font-weight: 700;
}
.user-item-type-badge {
  font-size: .58rem; border-radius: 3px; padding: 2px 7px;
  font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.badge-restauration { background: #111; color: #fff; }
.badge-vente {
  background: rgba(201,169,110,.12);
  color: #9a6c1a;
  border: 1px solid rgba(201,169,110,.4);
  letter-spacing: .08em;
}
.user-item-sub { font-size: .68rem; color: var(--text-secondary); }
.user-item-sub-line { font-size: .72rem; color: var(--text-secondary); display: block; margin-bottom: 6px; font-weight: 500; }
.user-item-desc { font-size: .88rem; color: var(--text-primary); line-height: 1.45; margin: 0; }
.user-item-desc--strong {
  font-weight: 700;
  font-size: .93rem;
  letter-spacing: .01em;
  color: #0f0f0f;
}
.user-item-notes {
  font-size: .78rem; color: var(--text-secondary); margin: 8px 0 0;
  background: var(--gray-50); border-radius: 8px; padding: 7px 10px;
  border-left: 2px solid var(--gray-200);
}
.user-item-media-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.user-item-media { width: 70px; height: 70px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.user-item-media--main {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.user-item-media-placeholder {
  width: 100%;
  height: 100%;
  background: #f0ece6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-muted);
}
.user-item-pricing {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(0,0,0,.07);
}
.uip-unit {
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: .01em;
}
.uip-mult {
  font-size: .75rem;
  color: var(--text-muted);
  margin: 0 6px;
  opacity: .7;
}
.uip-total {
  font-size: 1rem;
  color: #0f0f0f;
  font-weight: 800;
  margin-left: auto;
  letter-spacing: -.01em;
}
.user-item-remove {
  position: absolute; top: 12px; right: 12px;
  background: var(--gray-100); border: 1px solid var(--border);
  color: var(--text-muted); font-size: .75rem;
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; cursor: pointer;
}
.user-item-remove:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }

/* Responsive pour multi-items */
@media (max-width: 768px) {
  .user-item-card { padding: 14px 14px 12px 18px; margin-bottom: 8px; }
  .user-item-media-wrapper { width: 88px; height: 88px; }
  .user-item-media-placeholder { font-size: 1.8rem; }
  .user-item-top { gap: 5px; margin-bottom: 5px; }
  .user-item-desc { font-size: .82rem; }
  .user-item-cat { font-size: .65rem; }
}

@media (max-width: 480px) {
  .user-item-card { padding: 12px 12px 10px 16px; margin-bottom: 6px; }
  .user-item-main--row { gap: 10px; }
  .user-item-media-wrapper { width: 74px; height: 74px; }
  .user-item-media-placeholder { font-size: 1.4rem; }
  .user-item-type-badge { font-size: .55rem; padding: 2px 7px; }
  .user-item-desc { font-size: .8rem; }
}


/* ── Commandes highlight tracking ────────────────────────── */
.commandes-highlight {
  margin-bottom: 20px;
}
.commandes-highlight-head {
  font-family: var(--font-display);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: .82rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}
.commandes-highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px,1fr));
  gap: 12px;
}
.commandes-highlight-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  padding: 16px 18px 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}
.commandes-highlight-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #111 0%, #555 100%);
}
.commandes-highlight-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.1); transform: translateY(-2px); }
.chc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.chc-ref { font-family: var(--font-display); font-size: 1rem; letter-spacing: .08em; color: var(--black); }
.chc-title { font-size: .82rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 14px; }
.chc-steps {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}
.chc-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 1;
  min-width: 42px;
}
.chc-step::before {
  content: '';
  position: absolute;
  top: 8px; right: 0;
  width: 100%; height: 2px;
  background: var(--border);
  z-index: 0;
}
.chc-step:last-child::before { display: none; }
.chc-step-dot {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gray-200);
  border: 2px solid var(--border);
  z-index: 1;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .55rem; color: transparent;
  transition: all 0.2s;
}
.chc-step-label {
  font-size: .56rem;
  color: var(--text-muted);
  margin-top: 5px;
  text-align: center;
  white-space: nowrap;
  max-width: 48px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chc-step.done::before { background: #111; }
.chc-step.done .chc-step-dot { background: #111; border-color: #111; color: #fff; }
.chc-step.done .chc-step-dot::after { content: '✓'; font-size: .6rem; }
.chc-step.done .chc-step-label { color: var(--text-secondary); font-weight: 600; }
.chc-step.current .chc-step-dot {
  background: #fff; border: 3px solid #111;
  box-shadow: 0 0 0 4px rgba(0,0,0,0.08);
  width: 20px; height: 20px;
}
.chc-step.current .chc-step-label { color: var(--black); font-weight: 700; }
.user-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  font-size: 0.78rem;
  padding: 4px 10px;
  background: var(--gray-100);
  border: 1px solid var(--border);
  border-radius: 20px;
  white-space: nowrap;
  overflow: hidden;
  max-width: 200px;
}
.page-app .user-badge {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.65);
}
.user-badge i { font-size: 0.85rem; opacity: 0.8; }
.user-badge span { overflow: hidden; text-overflow: ellipsis; }

/* ── View tabs ───────────────────────────────────────────── */

/* ── Views ────────────────────────────────────────────────── */
.view { padding: 0 0 180px; flex: 1; animation: fadeIn 0.25s ease; font-family: var(--font-body); }
/* Views that need horizontal breathing room */
#view-panier, #view-profil, #view-suivi, #view-bordereaux, #view-commandes { padding: 20px 20px 180px; }
.view.hidden { display: none; }


/* ══════════════════════════════════════════════════════════
   DASHBOARD
   ══════════════════════════════════════════════════════════ */
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center; /* Centrage horizontal demandé */
  gap: 14px;
  transition: var(--t);
  box-shadow: var(--shadow-sm);
  color: var(--text-primary);
}
.stat-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.stat-card.wide { grid-column: span 2; }

.stat-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--gray-600);
  flex-shrink: 0;
}
.stat-icon.accent { background: rgba(var(--accent-rgb), 0.1); color: var(--accent); }
.stat-icon.green  { background: #E8F5EE; color: #0D4020; border-color: #50A070; }
.stat-icon.orange { background: rgba(249, 115, 22, 0.1); color: #f97316; }

.stat-info { min-width: 0; }
.stat-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

/* ── Stats table (dashboard principal) ───────────────────── */
.stats-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}
.stats-table thead th {
  padding: 10px 16px;
  background: var(--gray-50);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.stats-table thead th:last-child { text-align: right; }
.stats-table tbody tr { border-bottom: 1px solid var(--border); }
.stats-table tbody tr:last-child { border-bottom: none; }
.stats-table tbody tr:hover td { background: var(--gray-50); }
.stats-table tbody td { padding: 12px 16px; vertical-align: middle; }

.stats-table .st-icon {
  width: 36px;
  text-align: center;
  font-size: 0.95rem;
  color: var(--gray-400);
}
.stats-table .st-icon.accent { color: var(--gray-800); }
.stats-table .st-icon.green  { color: #2D7A4F; }
.stats-table .st-icon.orange { color: #E65100; }

.stats-table .st-value {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: right;
  white-space: nowrap;
}

/* ── Charts ───────────────────────────────────────────────── */
.dashboard-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}
.chart-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.chart-card.wide { grid-column: span 2; }
.chart-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.chart-card canvas { max-height: 220px; max-width: 100%; }
.chart-card.wide canvas { max-height: 240px; max-width: 100%; }

/* ── Activity ─────────────────────────────────────────────── */
.recent-activity {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.section-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.activity-list { display: flex; flex-direction: column; gap: 8px; }
.activity-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
}
.activity-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--gray-400);
  flex-shrink: 0;
}
.activity-dot.vente      { background: var(--gray-800); }
.activity-dot.restauration { background: #3A8058; }
.activity-text { flex: 1; color: var(--text-primary); }
.activity-time { color: var(--text-muted); font-size: 0.76rem; white-space: nowrap; }

/* Activité structure JS (icon + content + time) */
.activity-icon {
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  background: var(--gray-100);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; color: var(--gray-600);
  flex-shrink: 0;
}
.activity-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.activity-name { font-size: 0.84rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-action { font-size: 0.76rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ══════════════════════════════════════════════════════════
   TOOLBAR / SEARCH / FILTERS (inline)
   ══════════════════════════════════════════════════════════ */
.view-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  margin-bottom: 20px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 11px;
  min-width: 160px;
  max-width: 220px;
  transition: var(--t);
}
.search-box:focus-within { border-color: var(--gray-600); box-shadow: 0 0 0 3px rgba(0,0,0,0.05); }
.search-box i { color: var(--gray-400); font-size: 0.88rem; }
.search-box input {
  border: none;
  background: transparent;
  font-size: 0.88rem;
  color: var(--text-primary);
  width: 100%;
  outline: none;
  padding: 0;
}
.search-box input::placeholder { color: var(--gray-400); }
.filter-group { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-select {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 30px 9px 11px;
  font-size: 0.84rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--t);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23777' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  box-shadow: var(--shadow-sm);
}
.filter-select:focus { outline: none; border-color: var(--gray-600); box-shadow: 0 0 0 3px rgba(0,0,0,0.05); }
.client-count { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 14px; font-weight: 500; }

/* ══════════════════════════════════════════════════════════
   CLIENT CARDS
   ══════════════════════════════════════════════════════════ */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px,1fr));
  gap: 14px;
}
.client-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: var(--t);
  display: flex;
  flex-direction: column;
  gap: 13px;
  box-shadow: var(--shadow-sm);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}
.client-card:active { transform: scale(0.98); box-shadow: var(--shadow-sm); }
.client-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.client-card-header { display: flex; align-items: center; gap: 11px; }
.client-avatar {
  position: relative;
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--gray-900);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.client-name { font-weight: 600; font-size: 0.92rem; color: var(--text-primary); line-height: 1.2; }
.client-tel  { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }
.client-card-body { display: flex; flex-direction: column; gap: 7px; }
.client-articles-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.article-tag {
  padding: 2px 9px;
  background: var(--gray-100);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.client-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.client-date  { font-size: 0.75rem; color: var(--text-muted); }
.client-total { font-weight: 700; font-size: 0.9rem; color: var(--text-primary); }

/* ── Status Badges ────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border: 1px solid;
}
.status-en_attente  { background:var(--s-attente-bg); color:var(--s-attente-txt); border-color:var(--s-attente-bd); }
.status-en_cours    { background:var(--s-encours-bg); color:var(--s-encours-txt); border-color:var(--s-encours-bd); }
.status-pret        { background:var(--s-pret-bg);    color:var(--s-pret-txt);    border-color:var(--s-pret-bd); }
.status-livre       { background:var(--s-livre-bg);   color:var(--s-livre-txt);   border-color:var(--s-livre-bd); }
.status-annule      { background:var(--s-annule-bg);  color:var(--s-annule-txt);  border-color:var(--s-annule-bd); }
.status-pris_en_charge { background:var(--s-pris-bg); color:var(--s-pris-txt);    border-color:var(--s-pris-bd); }
.status-termine     { background:var(--s-livre-bg);   color:var(--s-livre-txt);   border-color:var(--s-livre-bd); }

/* ── Loading / Empty ──────────────────────────────────────── */
.loading-state    { grid-column:1/-1; text-align:center; padding:60px 20px; color:var(--text-muted); }
.empty-state      { text-align:center; padding:40px 20px; color:var(--text-muted); font-style:italic; font-size:0.88rem; }
.empty-state-full {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 80px 40px;
  color: var(--text-muted);
  background: var(--gray-50);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  margin: 20px 0;
  animation: fadeIn 0.4s ease;
}
.empty-state-full i {
  font-size: 3rem;
  color: var(--gray-200);
  margin-bottom: 8px;
  transition: var(--t);
}
.empty-state-full:hover i {
  color: var(--gray-400);
  transform: translateY(-5px);
}
.empty-state-full p {
  font-size: 1rem;
  font-weight: 500;
  max-width: 300px;
  line-height: 1.5;
  color: var(--gray-500);
}
.empty-state-full .btn {
  margin-top: 8px;
  box-shadow: var(--shadow-sm);
}

/* FAB supprime */

/* ══════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.18s ease;
}
.modal-overlay.hidden { display: none; }

.modal-stepper {
  width: 100%; max-width: 560px;
  max-height: 90vh; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border-radius: var(--radius-xl);
  padding: 32px;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  position: relative;
  animation: slideInUp 0.28s ease;
}
.modal-detail {
  width: 100%; max-width: 620px;
  max-height: 80vh; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border-radius: var(--radius-xl);
  padding: 32px;
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  position: relative;
  z-index: 3100;
  animation: slideInUp 0.28s ease;
}
#user-detail-modal {
  max-width: min(980px, 96vw);
}
.modal-close-btn {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  transition: var(--t);
  z-index: 10;
}
.modal-close-btn:hover { background: #FFE0E0; color: #8B0000; }

/* ══════════════════════════════════════════════════════════
   STEPPER
   ══════════════════════════════════════════════════════════ */
.stepper-header { margin-bottom: 28px; }
.stepper-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 22px;
  padding-right: 36px;
}
.stepper-progress { display: flex; align-items: center; gap: 0; }
.step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  flex: 1;
  position: relative;
}
.step-circle {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gray-100);
  border: 2px solid var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gray-400);
  transition: var(--t);
  position: relative;
  z-index: 1;
}
.step-circle.active {
  background: var(--black);
  border-color: var(--black);
  color: var(--white);
  box-shadow: 0 0 0 4px rgba(0,0,0,0.08);
}
.step-circle.done {
  background: #1A6035;
  border-color: #1A6035;
  color: var(--white);
}
.step-circle.done::after { content: '✓'; font-size: 0.82rem; }
.step-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  white-space: nowrap;
}
.step-indicator.active .step-label { color: var(--text-primary); }
.step-indicator.done   .step-label { color: #1A6035; }
.step-line {
  flex: 1;
  height: 2px;
  background: var(--gray-200);
  margin-bottom: 20px;
  transition: var(--t);
  max-width: 60px;
}
.step-line.done { background: #1A6035; }

/* ── Step content ─────────────────────────────────────────── */
.step-content { animation: fadeIn 0.22s ease; }
.step-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 18px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.article-item {
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
  position: relative;
}
.article-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.article-item-num {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.btn-remove-article { color: rgba(180,0,0,0.55); font-size: 0.88rem; padding: 3px 7px; border-radius: 4px; transition: var(--t); }
.btn-remove-article:hover { background: #FFE0E0; color: #8B0000; }
.btn-add-article {
  width: 100%;
  padding: 9px;
  background: var(--gray-50);
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 500;
  transition: var(--t);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
}
.btn-add-article:hover { background: var(--gray-100); border-color: var(--gray-400); border-style: solid; }

/* Summary */
.summary-section {
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 5px 0;
  font-size: 0.86rem;
  border-bottom: 1px solid var(--border);
}
.summary-row:last-child { border-bottom: none; }
.summary-label { color: var(--text-muted); font-weight: 500; min-width: 80px; }
.summary-value { color: var(--text-primary); font-weight: 600; text-align: right; }
.summary-total { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }

/* Stepper nav */
.stepper-nav { display: flex; gap: 10px; margin-top: 24px; justify-content: space-between; align-items: center; }
.stepper-nav-right { display: flex; gap: 10px; margin-left: auto; }
.step-validation-error {
  font-size: 0.8rem;
  color: #8B0000;
  padding: 7px 12px;
  background: #FFF0F0;
  border: 1px solid #FFAAAA;
  border-radius: var(--radius-sm);
  margin-top: 7px;
}

/* Stepper expédition */
.stepper-expedition-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.stepper-expedition-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--gray-50);
  cursor: pointer;
  text-align: left;
  font-size: .85rem;
  color: var(--text-primary);
  transition: border-color .2s, background .2s;
  position: relative;
}
.stepper-expedition-item:hover { border-color: var(--brown); background: rgba(139,90,43,.06); }
.stepper-expedition-item.active { border-color: var(--brown); background: rgba(139,90,43,.1); font-weight: 600; }
.stepper-expedition-item i:first-child { color: var(--brown); width: 16px; text-align: center; }
.stepper-expedition-item span { flex: 1; }
.stepper-expedition-check {
  font-size: .65rem; color: var(--brown); opacity: 0; transition: opacity .15s;
}
.stepper-expedition-item.active .stepper-expedition-check { opacity: 1; }

/* ══════════════════════════════════════════════════════════
   MODAL DETAIL
   ══════════════════════════════════════════════════════════ */
.detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
  padding-right: 36px;
}
.detail-avatar {
  width: 52px; height: 52px;
  border-radius: 10px;
  background: var(--gray-900);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .detail-avatar { display: none !important; }
}
.detail-name    { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; color: var(--text-primary); }
.detail-contact { font-size: 0.82rem; color: var(--text-muted); margin-top: 4px; }
.detail-meta    { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.detail-section { margin-bottom: 18px; }
.detail-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 9px;
}
/* Collapsible history section */
.detail-section--collapsible .detail-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  margin-bottom: 0;
}
.detail-section--collapsible .detail-section-chevron {
  font-size: 0.7rem;
  transition: transform 0.25s ease;
}
.detail-section--collapsible.is-open .detail-section-chevron {
  transform: rotate(180deg);
}
.detail-section-body {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease, margin-top 0.3s ease;
  margin-top: 0;
}
.detail-section--collapsible.is-open .detail-section-body {
  max-height: 2000px;
  margin-top: 12px;
}
.detail-article {
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  margin-bottom: 7px;
}
.detail-article-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
.detail-article-type { font-weight: 600; font-size: 0.86rem; color: var(--text-primary); }
.detail-article-prix { font-weight: 700; color: var(--text-primary); }
.detail-article-desc { font-size: 0.8rem; color: var(--text-muted); }
.detail-notes {
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  font-size: 0.86rem;
  color: var(--text-secondary);
  font-style: italic;
  min-height: 56px;
}
/* ── Uniform actions bar (user modal) ─────────────────── */
.detail-actions-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.detail-actions-spacer { flex: 1; min-width: 8px; }

/* ── Modal presta header ─────────────────────────────── */
.mph {
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 18px;
}
.mph-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.mph-ref {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 2px;
  font-weight: 700;
  background: var(--black);
  color: var(--white);
  padding: 3px 14px 3px 10px;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: opacity 0.15s;
}
.mph-ref:hover { opacity: 0.75; }
.mph-ref-icon { font-size: 0.7rem; opacity: 0.6; }
.mph-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.mph-status { font-size: 0.82rem !important; }
.mph-paid {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: #166534;
  font-weight: 600;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 3px 10px;
  border-radius: 20px;
}
.mph-client {
  display: flex;
  align-items: center;
  gap: 12px;
}
.mph-avatar {
  width: 38px !important;
  height: 38px !important;
  font-size: 1rem !important;
  flex-shrink: 0;
}
.mph-client-info { min-width: 0; }
.mph-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.mph-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.mph-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.mph-meta i { font-size: 0.68rem; color: var(--gray-400); }

/* ── form-input générique ────────────────────────────── */
.form-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  box-sizing: border-box;
}
.form-input:focus {
  background: var(--white);
  border-color: #C9A96E;
  box-shadow: 0 0 0 3px rgba(201,169,110,0.12);
}
.form-input::placeholder { color: var(--text-muted); }

/* ── Devis section ───────────────────────────────────── */
.devis-form-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
  margin-bottom: 10px;
}
.devis-form-grid .form-group { margin-bottom: 0; }
.devis-form-grid .form-group input { padding: 10px 14px; font-size: 0.88rem; border-radius: var(--radius); }
.devis-form-grid .form-group label { font-size: 0.65rem; margin-bottom: 6px; }
.btn-devis-submit {
  width: 100%;
  margin-top: 4px;
  justify-content: center;
}

/* ── Statut simple nav ───────────────────────────────── */
.statut-section .detail-section-title { margin-bottom: 12px; }
/* Statut select direct */
.statut-direct-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 10px;
}
.statut-select-input {
  flex: 1;
  font-size: 0.88rem !important;
  font-weight: 600;
}
.statut-save-btn {
  flex-shrink: 0;
  padding: 0 20px;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
}
.statut-paye-extra {
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 8px;
}
.statut-note-row { margin-top: 0; }
.statut-note-input { font-size: 0.84rem !important; }
.status-select-inline {
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 30px 7px 11px;
  font-size: 0.86rem;
  color: var(--text-primary);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23777' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  cursor: pointer;
  transition: var(--t);
}
.status-select-inline:focus { outline: none; border-color: var(--gray-600); }
.article-etat-row { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.article-etat-label { font-size: 0.74rem; color: var(--text-muted); font-weight: 500; white-space: nowrap; }

/* ══════════════════════════════════════════════════════════
   TOASTS
   ══════════════════════════════════════════════════════════ */
.toast-container {
  position: fixed;
  bottom: 30px; left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  pointer-events: none;
  align-items: center;
  max-width: calc(100vw - 24px);
  width: max-content;
}
.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--white);
  max-width: 360px;
  width: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.22);
  animation: toastIn 0.25s ease;
  pointer-events: all;
  white-space: normal; /* Permet au texte long de passer à la ligne */
  word-wrap: break-word;
  line-height: 1.4;
}
.toast.success { background: #1A6035; }
.toast.error   { background: #8B0000; }
.toast.info    { background: var(--gray-900); }
.toast.exit    { animation: toastOut 0.25s ease forwards; }

/* ══════════════════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════════════════ */
@keyframes fadeIn    { from { opacity:0; } to { opacity:1; } }
@keyframes fadeInUp  { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
@keyframes slideInUp { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:translateY(0); } }
@keyframes toastIn   { from { opacity:0; transform:translateY(8px) scale(0.96); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes toastOut  { from { opacity:1; transform:translateY(0) scale(1); } to { opacity:0; transform:translateY(8px) scale(0.96); } }
@keyframes spin      { to { transform:rotate(360deg); } }
.fa-spin { animation: spin 1s linear infinite; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE TABLET
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1023px) {
  .dashboard-stats-grid { grid-template-columns: repeat(2,1fr); }
  .stat-card.wide { grid-column: span 1; }
  .dashboard-charts-grid { grid-template-columns: 1fr; }
  .chart-card.wide { grid-column: span 1; }
  
  .sidebar { width: var(--sidebar-collapsed); }
  .sidebar .logo-full,
  .sidebar .nav-item span { opacity: 0; width: 0; display: none; }
  .sidebar:not(.mobile-open) .nav-badge {
    position: absolute; top: 6px; left: 30px; margin-left: 0;
    display: block; opacity: 1; width: auto;
  }

  /* Header collapsed : icône centrée, logo masqué */
  .sidebar .sidebar-header {
    justify-content: center;
    padding: 20px 0;
  }
  .sidebar .sidebar-logo {
    width: 0; overflow: hidden; margin: 0; padding: 0;
  }
  .sidebar .sidebar-toggle-btn {
    margin: 0;
  }

  .main-content { margin-left: var(--sidebar-collapsed); }

  /* Sidebar ouverte sur ce breakpoint (mobile-open via JS) */
  .sidebar.mobile-open { width: var(--sidebar-width) !important; box-shadow: 4px 0 24px rgba(0,0,0,0.2); z-index: 2100; }
  .sidebar.mobile-open .sidebar-header {
    justify-content: space-between;
    padding: 20px 16px;
  }
  .sidebar.mobile-open .sidebar-logo {
    width: auto; overflow: visible; margin: 0; padding: 0;
  }
  .sidebar.mobile-open .logo-full,
  .sidebar.mobile-open .nav-item span { opacity: 1; width: auto; display: block; }

  .view { padding: 16px 0 180px; }
  .app-header { padding: 0 20px; }
}

@media (max-width: 767px) {
  .main-content { margin-left: 0 !important; }
  .sidebar { transform: translateX(-100%); width: var(--sidebar-width) !important; box-shadow: none; z-index: 2100; }
  .sidebar.mobile-open { transform: translateX(0); box-shadow: 4px 0 32px rgba(0,0,0,0.3); }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE MOBILE
   ══════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
  :root { --header-height: 56px; }
  .toast-container { bottom: 80px; }
}
@media (max-width: 480px) {
  .toast-container {
    bottom: calc(72px + env(safe-area-inset-bottom));
    left: 12px;
    right: 12px;
    transform: none;
    max-width: 100%;
    width: auto;
    align-items: stretch;
  }
  .toast { max-width: 100%; text-align: left; }
}
@media (max-width: 767px) {

  /* ── Safe area header collé sous la barre de statut iOS ── */
  .app-header {
    padding: 0 16px;
    z-index: 1450;
    padding-top: env(safe-area-inset-top);
    padding-left: calc(16px + env(safe-area-inset-left));
    padding-right: calc(16px + env(safe-area-inset-right));
    height: calc(var(--header-height) + env(safe-area-inset-top));
  }
  .sidebar {
    padding-top: env(safe-area-inset-top);
    z-index: 2100;
  }

  /* ── Vue principale espace pour indicateur home ─────── */
  .view {
    padding: 0 0 calc(80px + env(safe-area-inset-bottom));
  }

  /* ── Sidebar ───────────────────────────────────────────── */
  .sidebar { transform: translateX(-100%); width: var(--sidebar-width) !important; box-shadow: none; }
  .sidebar.mobile-open { transform: translateX(0); box-shadow: 4px 0 24px rgba(0,0,0,0.25); }
  .sidebar.mobile-open .logo-full,
  .sidebar.mobile-open .nav-item span { opacity: 1; width: auto; }
  .main-content { margin-left: 0 !important; }
  .mobile-menu-btn { display: flex; }
  .mobile-back-boutique-btn { display: flex; }
  .sidebar-toggle-btn { display: none; }

  /* ── Fix App Header Overflow ───────────────────────────── */
  #user-email-display { display: none; }
  .user-badge { padding: 6px 8px; margin: 0; }
  .user-badge i { font-size: 0.8rem; }
  .header-actions { gap: 8px; }
  .header-actions .btn { padding: 6px 10px; font-size: 0.75rem; }
  .user-back-btn { padding: 6px 8px; font-size: 0.75rem; }
  .user-back-btn span { display: none; }
  .user-back-btn i { display: block; }

  /* ── Dashboard ─────────────────────────────────────────── */
  .dashboard-stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
  .stat-card { padding: 12px; gap: 10px; }
  .stat-card.wide { grid-column: span 2; }
  .stat-icon { width: 36px; height: 36px; font-size: 0.9rem; flex-shrink: 0; }
  .stat-label { font-size: 0.65rem; }
  .stat-value { font-size: 1.3rem; }
  .dashboard-charts-grid { grid-template-columns: 1fr; gap: 8px; margin-bottom: 12px; }
  .chart-card { padding: 14px; }
  .chart-card.wide { grid-column: span 1; }
  .chart-card canvas { max-height: 180px; }
  .chart-card.wide canvas { max-height: 200px; }
  .recent-activity { padding: 14px; }
  .activity-item { flex-wrap: wrap; gap: 7px; padding: 8px 10px; }
  .activity-text { min-width: 0; font-size: 0.8rem; }
  .activity-time { width: 100%; font-size: 0.72rem; text-align: right; padding-top: 2px; }

  /* ── Grille clients ────────────────────────────────────── */
  .clients-grid { grid-template-columns: 1fr; }

  /* ── Filtres prestations ───────────────────────────────── */
  .prest-filters {
    gap: 4px;
    margin-bottom: 16px;
  }
  .prest-filter-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    flex: 1 1 calc(50% - 2px);
    text-align: center;
  }

  /* ── User cart footer ──────────────────────────────────── */
  .user-cart-footer {
    gap: 12px;
    padding: 12px;
    margin-top: 12px;
  }
  .user-cart-total-row {
    font-size: 0.85rem;
  }
  .btn-primary {
    font-size: 0.8rem;
    padding: 10px 12px;
  }

  /* ── Toolbar (Non-flottante par défaut sur mobile) ───────── */
  .view-toolbar {
    position: relative;
    bottom: auto;
    right: auto;
    left: auto;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    max-width: none;
    flex-direction: row;
    gap: 6px;
    align-items: stretch;
  }
  .view-toolbar:has(.filter-group) {
    flex-direction: column;
    align-items: flex-start;
  }
  .search-box { min-width: 0; flex: 1; }
  .view-toolbar .btn-primary { flex-shrink: 0; white-space: nowrap; }
  .filter-group { width: 100%; flex-wrap: wrap; gap: 6px; }
  .filter-select {
    flex: 1; min-width: 0;
    font-size: 16px; /* Empêche le zoom iOS */
    padding: 10px 24px 10px 8px;
  }

  /* ── Drop zone mobile ────────────────────────────────── */
  .drop-zone { padding: 10px 12px; margin-top: 8px; }
  .drop-icon { font-size: 1rem; }
  .drop-label { font-size: 0.75rem; }
  .drop-file-chip { font-size: 0.7rem; padding: 3px 8px; }
  .drop-thumb { width: 24px; height: 24px; }

  /* ── FAB supprime (Nettoyage) ── */

  /* ── Modal bottom sheet natif ───────────────────────── */
  .modal-stepper, .modal-detail {
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
    max-height: 95dvh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    margin: 0; max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box;
  }
  #user-detail-modal { max-width: 100% !important; width: 100% !important; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .stepper-progress { gap: 0; }
  .step-label { font-size: 0.63rem; }
  .step-line { max-width: 28px; }

  /* ── Inputs CRITIQUE : empêche le zoom iOS (font-size < 16px) ── */
  .form-group input,
  .form-group select,
  .form-group textarea,
  .search-box input {
    font-size: 16px;
  }

  /* ── Misc ──────────────────────────────────────────────── */
  .user-badge span { display: inline; max-width: 140px; }
  .detail-actions { flex-direction: column; }
  .form-row { grid-template-columns: 1fr; }

  /* ── Profil iOS toggles compacts ─────────────────────── */
  .ios-toggle-wrap {
    gap: 10px;
  }
  .ios-toggle-wrap > div {
    font-size: 0.8rem;
  }
  .ios-toggle-wrap > div > div:first-child {
    font-size: 0.8rem;
  }
  .ios-toggle-wrap > div > div:last-child {
    font-size: 0.72rem;
  }

  /* ── User profil card info ─────────────────────────────── */
  .user-profil-info {
    min-width: 0;
    flex: 1;
  }
  .user-profil-title {
    font-size: 0.95rem;
    margin-bottom: 2px;
  }
  .user-profil-subtitle {
    font-size: 0.7rem;
  }
}

/* ── Newsletter Styles ──────────────────────────────────── */
.newsletter-content img {
  max-width: 100%; height: auto; display: block; margin: 20px 0; border-radius: var(--radius-sm);
}
.newsletter-mandatory-signature {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--gray-200);
  color: #BBBBBB !important; font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.1em; pointer-events: none; user-select: none;
  font-style: normal;
}

/* ── Newsletter Styles ──────────────────────────────────── */
.newsletter-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 24px 0;
  border-radius: var(--radius-sm);
}

.newsletter-mandatory-signature {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(0,0,0,0.05);
  color: #BBBBBB !important; 
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  pointer-events: none; /* Non modifiable */
  user-select: none;
  display: block !important;
}

/* ══════════════════════════════════════════════════════════
   MODE STANDALONE (ajouté à l'écran d'accueil iOS/Android)
   ══════════════════════════════════════════════════════════ */
@media (display-mode: standalone) {

  /* ── html + body occupent exactement l'écran, sans overflow ──
     Uniquement sur les pages app (admin/espace-user/login) qui ont leur
     propre conteneur scrollable (.app-container/.login-container) : sinon
     ça bloque tout scroll sur les pages publiques (accueil, boutique...)
     qui n'ont pas ce conteneur. */
  html:has(.app-container, .login-container) {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
  }
  body:has(.app-container, .login-container) {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    /* Le fond couvre la safe-area en bas défini par page-app / page-login */
  }

  /* ── App conteneur plein écran scrollable ─────────────── */
  .app-container {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
  }
  .main-content {
    /* Prend toute la hauteur restante, scroll uniquement ici */
    height: 100%;
    height: 100dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
  }

  /* ── Header pousse sous la barre de statut iOS ───────── */
  .app-header {
    height: calc(var(--header-height) + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
    padding-left: calc(16px + env(safe-area-inset-left));
    padding-right: calc(16px + env(safe-area-inset-right));
  }

  /* ── Sidebar commence sous la barre de statut ────────── */
  .sidebar {
    padding-top: env(safe-area-inset-top);
  }

  /* ── Vue espace pour l'indicateur home en bas ─────────── */
  .view {
    padding-bottom: calc(180px + env(safe-area-inset-bottom));
  }

  /* ── FAB ────────────────────────────────────────────────── */
  .fab {
    display: none !important;
  }

  /* ── Toolbar ─────────────────────────────────────────────── */
  .view-toolbar {
    position: relative;
    bottom: auto;
    right: auto;
    margin-bottom: 16px;
  }

  /* ── Modal bottom sheet ──────────────────────────────────── */
  .modal-stepper,
  .modal-detail {
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
    max-width: 100% !important;
    width: 100% !important;
  }
  #user-detail-modal { max-width: 100% !important; width: 100% !important; margin-top: calc(env(safe-area-inset-top) + 60px); max-height: calc(100vh - env(safe-area-inset-top) - 80px) !important; }

  /* ── Login ───────────────────────────────────────────────── */
  .login-container {
    height: 100%;
    height: 100dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-top: max(80px, calc(env(safe-area-inset-top) + 40px));
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
}

/* ══════════════════════════════════════════════════════════
   ADMIN TABLES (Users, etc.)
   ══════════════════════════════════════════════════════════ */
.admin-table-wrapper { width: 100%; overflow-x: auto; background: var(--white); border-radius: var(--radius-lg); border: 1px solid var(--border); -webkit-overflow-scrolling: touch; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 0; }
.admin-table th { text-align: left; padding: 14px 20px; font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); background: var(--gray-50); border-bottom: 1px solid var(--border); }
.admin-table td { padding: 14px 20px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table-row:hover { background: var(--gray-50); }
.admin-table-row.clickable { cursor: pointer; }

.row-user-info { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--gray-900); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: 600; flex-shrink: 0; }
.row-avatar--admin { background: #1a3a6b; box-shadow: 0 0 0 2px #C9A96E; }
.row-name { font-weight: 600; color: var(--text-primary); font-size: 0.92rem; }
.admin-role-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 20px; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.05em; background: rgba(26,58,107,0.12); color: #1a3a6b; border: 1px solid rgba(26,58,107,0.25); }
.row-contact { display: flex; flex-direction: column; gap: 2px; }
.contact-line { font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.contact-line i { width: 12px; opacity: 0.6; }
.row-location { font-size: 0.85rem; color: var(--text-primary); }

/* ══════════════════════════════════════════════════════════
   CATEGORY MANAGEMENT (Rows)
   ══════════════════════════════════════════════════════════ */
/* ── View header title (Catégories) ─────────────────────── */
.view-header-title { margin-bottom: 4px; }
.view-header-title h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.view-header-title p { font-size: 0.88rem; color: var(--text-secondary); }

.cat-manage-list { display: flex; flex-direction: column; gap: 32px; margin-top: 24px; padding-bottom: 60px; }
.cat-section-header { 
  font-family: var(--font-display); 
  font-size: 1.25rem; 
  letter-spacing: 0.5px; 
  margin-bottom: 20px; 
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gray-900);
  display: flex;
  align-items: center;
  gap: 12px;
}
.cat-management-grid { display: flex; flex-direction: column; gap: 16px; }

.cat-row-container { 
  margin-bottom: 12px;
  overflow: hidden; 
  border-radius: var(--radius-lg); 
  border: 1px solid var(--border); 
  transition: all 0.3s ease;
}
.cat-row-container.collapsed .cat-row-types { display: none; }
.cat-row-header { 
  padding: 10px 16px; 
  background: var(--white); 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  cursor: pointer;
  user-select: none;
}
.cat-row-header:hover { background: var(--gray-50); }
.cat-row-main-info { display: flex; align-items: center; gap: 10px; flex: 1; }
.cat-row-icon { 
  width: 30px; height: 30px; 
  background: var(--gray-100); 
  border-radius: 6px; 
  display: flex; align-items: center; justify-content: center; 
  color: var(--black); font-size: 0.9rem;
}
.cat-row-name { font-size: 0.9rem; font-weight: 700; color: var(--black); }
.cat-row-id { font-size: 0.6rem; color: var(--text-muted); font-family: monospace; text-transform: uppercase; }
.cat-row-types { display: flex; flex-wrap: wrap; background: var(--white); }
.cat-type-column { flex: 1; min-width: 0; padding: 12px 16px; border-right: 1px solid var(--border); }

/* Footer d'ajout par section */
.cat-add-footer { 
  margin-top: 16px; 
  display: flex; 
  gap: 12px; 
  background: var(--gray-50); 
  padding: 16px; 
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border);
}
.cat-new-input { 
  flex: 1; 
  padding: 10px 16px; 
  border: 1px solid var(--border); 
  border-radius: var(--radius-md);
  outline: none;
  font-size: 0.9rem;
}
.cat-new-input:focus { border-color: var(--gray-900); }
.cat-type-column:last-child { border-right: none; }

.cat-type-title { display: inline-block; padding: 4px 12px; border-radius: var(--radius-sm); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; margin-bottom: 16px; }
.sous-cat-list { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-direction: column; gap: 4px; }
.sous-cat-item { display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 6px 10px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 0.82rem; }
.sous-cat-item > span:first-child { flex: 1; min-width: 0; }
.sous-cat-actions { display: flex; gap: 4px; flex-shrink: 0; }
.text-muted-strikethrough { color: var(--text-muted); text-decoration: line-through; opacity: 0.6; }

/* Badge prix sous-catégorie (admin) */
.sous-cat-prix { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.prix-badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; background: rgba(0,120,60,0.1); color: #1A6035; white-space: nowrap; }
.prix-badge-empty { background: rgba(0,0,0,0.05); color: var(--text-muted); }
.sous-cat-prix-edit-input { width: 70px; padding: 3px 6px; font-size: 0.82rem; border: 1px solid var(--border); border-radius: var(--radius-sm); outline: none; }

.sous-cat-add-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sous-cat-input-inline { flex: 1; min-width: 120px; padding: 8px 12px; font-size: 0.85rem; border: 1px solid var(--border); border-radius: var(--radius-md); outline: none; transition: var(--t); }
.sous-cat-input-inline:focus { border-color: var(--gray-900); }
.sous-cat-prix-inline { width: 80px; padding: 8px 10px; font-size: 0.85rem; border: 1px solid var(--border); border-radius: var(--radius-md); outline: none; transition: var(--t); }
.sous-cat-prix-inline:focus { border-color: var(--gray-900); }
.btn-plus-cat { width: 34px; height: 34px; border-radius: var(--radius-md); background: var(--gray-900); color: var(--white); display: flex; align-items: center; justify-content: center; transition: var(--t); }
.btn-plus-cat:hover { transform: scale(1.05); }

.btn-icon { width: 30px; height: 30px; padding: 0; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; border: none; background: transparent; cursor: pointer; transition: var(--t); flex-shrink: 0; }
.btn-icon.btn-sm { padding: 0; width: 28px; height: 28px; font-size: 0.75rem; }
.btn-danger-soft { color: #8B0000; background: rgba(139,0,0,0.05); }
.btn-danger-soft:hover { background: rgba(139,0,0,0.1); }
.sous-cat-toggle.visible { color: var(--gray-900); }
.sous-cat-toggle.hidden-cat { color: var(--text-muted); }

/* Misc */
.clickable { cursor: pointer; }
.no-wrap { white-space: nowrap; }

/* ── ADMIN TABLE Mobile (≤ 600px) ──────────────────────── */
@media (max-width: 600px) {
  /* Masquer colonnes Localisation (3) et Inscrit le (5) */
  .admin-table th:nth-child(3),
  .admin-table td:nth-child(3),
  .admin-table th:nth-child(5),
  .admin-table td:nth-child(5) { display: none; }
  /* Réduire padding pour laisser de la place */
  .admin-table th,
  .admin-table td { padding: 10px 12px; }
  .row-name { font-size: 0.82rem; }
  .contact-line { font-size: 0.74rem; }
}

/* Responsive specifics */
@media (max-width: 900px) {
  .cat-row-types { flex-direction: column; }
  .cat-type-column { border-right: none; border-bottom: 1px solid var(--border); min-width: 0; padding: 16px; }
  .cat-type-column:last-child { border-bottom: none; }
}

@media (max-width: 767px) {
  .view-header-title h2 { font-size: 1.15rem; }
  .cat-manage-list { gap: 20px; margin-top: 16px; }
  .cat-row-header { padding: 12px 14px; flex-wrap: wrap; gap: 8px; }
  .cat-row-main-info { min-width: 0; flex: 1; }
  .cat-row-name { font-size: 0.95rem; word-break: break-word; }
  .cat-row-id { display: block; margin-left: 0; margin-top: 2px; }
  .cat-type-column { padding: 12px 14px; }
  .cat-add-footer { flex-direction: column; gap: 8px; padding: 12px; }
  .cat-new-input { font-size: 16px; } /* empêche zoom iOS */
  .sous-cat-item { flex-wrap: wrap; gap: 6px; padding: 8px 10px; }
  .sous-cat-actions { width: 100%; justify-content: flex-end; }
  .sous-cat-add-inline { flex-wrap: wrap; }
  .sous-cat-input-inline { min-width: 100px; flex: 1; font-size: 16px; }
  .sous-cat-prix-inline { font-size: 16px; }
  .cat-panels-split { gap: 16px; }
  .cat-panel-col .cat-management-grid { padding: 8px; gap: 8px; }
  .cat-panel-col .cat-section-header { padding: 12px 14px; font-size: .9rem; }
  .cat-panel-col .cat-add-footer { padding: 10px; }
}

/* ── RESPONSIVE SMALL MOBILE (≤ 480px) ─────────────────── */
@media (max-width: 480px) {
  /* Toast prevent horizontal overflow */
  .toast {
    white-space: normal;
    max-width: calc(100vw - 40px);
    text-align: center;
  }

  /* View title smaller */
  #view-title, #user-view-title { font-size: 1rem; }

  /* View padding optimisé pour le bottom nav */
  .view {
    padding: 16px 12px calc(80px + env(safe-area-inset-bottom));
  }

  /* Toolbar compact filter selects */
  .filter-select {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
  }

  /* Prest filters ultra compact */
  .prest-filters {
    gap: 2px;
    margin-bottom: 12px;
  }
  .prest-filter-btn {
    padding: 5px 10px;
    font-size: 0.7rem;
    flex: 1 1 calc(50% - 1px);
  }

  /* Category management compact add row */
  .sous-cat-add-inline { gap: 4px; align-items: stretch; }
  .sous-cat-input-inline { min-width: 0; flex: 1; }
  .sous-cat-prix-inline { width: 50px; flex-shrink: 0; }

  /* Stepper & Detail Modal compact */
  .stepper-title { font-size: 1.1rem; }
  .step-circle { width: 28px; height: 28px; font-size: 0.72rem; }
  .modal-detail { 
    padding: 24px 16px; 
    border-radius: 20px 20px 0 0; 
    max-width: 100% !important; 
    width: 100% !important; 
    max-height: 72vh !important; 
    bottom: 0;
    position: fixed;
  }
  #user-detail-modal { max-width: 100% !important; width: 100% !important; }
  .detail-header { flex-direction: column; gap: 12px; }
  .detail-section { margin-bottom: 20px; }
  .detail-notes { font-size: .85rem; }
  .devis-form-grid { grid-template-columns: 1fr; }
}

/* ── RESPONSIVE VERY SMALL (≤ 360px) ───────────────────── */
@media (max-width: 360px) {
  /* Stat cards compact */
  .stat-value { font-size: 1.15rem; }
  .stat-label { font-size: 0.62rem; letter-spacing: 0.04em; }
  .stat-card { padding: 10px; gap: 8px; }
  .stat-icon { width: 32px; height: 32px; font-size: 0.82rem; }

  /* View padding tighter */
  .view {
    padding: 12px 12px calc(80px + env(safe-area-inset-bottom));
  }

  /* Header smaller */
  .app-header { padding: 0 12px; }
  #view-title, #user-view-title { font-size: 1rem; }

  /* Toolbar tighter */
  .view-toolbar { padding: 8px 10px; }
  .filter-select { font-size: 14px; padding: 8px 22px 8px 6px; }

  /* Summary in stepper */
  .summary-row { font-size: 0.8rem; }
  .summary-label { min-width: 60px; }
}

/* ── Misc ─────────────────────────────────────────────────── */
.divider    { height: 1px; background: var(--border); margin: 14px 0; }
.text-muted { color: var(--text-muted); font-size: 0.84rem; }
.text-center{ text-align: center; }
.mt-auto    { margin-top: auto; }
.flex       { display: flex; }
.flex-center{ display: flex; align-items: center; justify-content: center; }
.gap-8      { gap: 8px; }
.gap-12     { gap: 12px; }

/* ── Drop zone fichiers/images (panier) ──────────────────── */
.drop-zone {
  margin-top: 12px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  background: var(--gray-50, #fafafa);
}
.drop-zone:hover,
.drop-zone.drag-over,
#np-img-dropzone.drag-over,
.np-img-dropzone.drag-over {
  border-color: var(--black) !important;
  background: var(--gray-100, #f0f0f0);
}
.drop-icon { font-size: 1.2rem; color: var(--text-muted); }
.drop-label { font-size: .8rem; color: var(--text-muted); line-height: 1.4; }
.drop-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  width: 100%;
  margin-top: 4px;
}
.drop-file-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 10px 4px 6px;
  font-size: .75rem;
  color: var(--black);
  max-width: 180px;
}
.drop-thumb {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}
.drop-file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100px;
}
.drop-file-remove {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-muted);
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
}
.drop-file-remove:hover { color: var(--danger, #c00); }
/* ══════════════════════════════════════════════════════════
   HISTORIQUE (Luxury V2 - Street Feed)
   ══════════════════════════════════════════════════════════ */
.detail-history {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 10px 0;
  position: relative;
}

.detail-history::before {
  content: '';
  position: absolute;
  top: 0;
  left: 21px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--border) 15%, var(--border) 85%, transparent);
}

.detail-history-item {
  position: relative;
  display: flex;
  gap: 16px;
  padding-left: 0;
  animation: revealUp 0.4s ease-out backwards;
}

/* Icon Wrap - Luxury Circle */
.history-icon-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(0,0,0,0.03);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.detail-history-item:hover .history-icon-wrap {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  border-color: var(--black);
}

.history-icon-wrap i {
  font-size: 0.95rem;
  color: var(--gray-600) !important;
}

/* Card - Glassmorphism style */
.history-card {
  flex: 1;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 12px;
  padding: 14px 18px;
  transition: var(--t);
  position: relative;
}

.detail-history-item:hover .history-card {
  background: var(--white);
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.history-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}

.history-statut-label {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--black);
}

.history-date {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.history-note {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Specific Status Colors for Icons */
.status-devis_soumis .history-icon-wrap i    { color: #6366f1 !important; } /* Blue/Indigo */
.status-devis_valide .history-icon-wrap i    { color: #059669 !important; } /* Emerald */
.status-paye .history-icon-wrap i            { color: #d97706 !important; } /* Amber */
.status-recu .history-icon-wrap i            { color: #2563eb !important; } /* Blue */
.status-en_transit .history-icon-wrap i      { color: #7c3aed !important; } /* Violet */
.status-expedie .history-icon-wrap i         { color: #0891b2 !important; } /* Cyan */
.status-livre .history-icon-wrap i           { color: #16a34a !important; } /* Green */
.status-annule .history-icon-wrap i          { color: #dc2626 !important; } /* Red */

@media (max-width: 480px) {
  .detail-history { gap: 12px; }
  .history-card { padding: 12px 14px; }
  .history-statut-label { font-size: 0.9rem; }
  .history-note { font-size: 0.8rem; }
  .history-icon-wrap { width: 36px; height: 36px; }
}

/* ══════════════════════════════════════════════════════════
   PREST FILTERS Espace User
   ══════════════════════════════════════════════════════════ */
.prest-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.prest-filter-btn {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.prest-filter-btn:hover {
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.prest-filter-btn.active {
  background: #C9A96E;
  border-color: #C9A96E;
  color: #000;
}

/* ── Commandes: accordion + cards ────────────────────────── */
.order-section { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.order-type-header {
  font-family: var(--font-display);
  letter-spacing: .08em;
  font-size: .95rem;
  text-transform: uppercase;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.prest-group {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.prest-group-header {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  padding: 12px 14px;
  background: #f8f8f7;
  border: 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: .84rem;
  font-weight: 700;
}
.prest-group-header::after {
  content: '\f078';
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-left: auto;
  font-size: .68rem;
  color: var(--text-muted);
  transition: transform .2s ease;
}
.prest-group-header[aria-expanded="false"]::after { transform: rotate(-90deg); }
.prest-group-count {
  font-size: .72rem;
  color: var(--text-muted);
  margin-left: auto;
  margin-right: 10px;
}
.prest-group-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 10px;
  padding: 12px;
}
.prest-group-cards.collapsed { display: none; }
.prestation-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
@media (hover: hover) {
  .prestation-card:hover { border-color: rgba(201,169,110,.55); box-shadow: 0 10px 30px rgba(0,0,0,.06); }
}
.pc-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.pc-meta { display: flex; align-items: center; gap: 6px; }
.pc-ref {
  font-family: var(--font-display);
  font-size: .9rem;
  letter-spacing: .08em;
  background: #111;
  color: #fff;
  padding: 2px 8px;
  border-radius: 6px;
}
.pc-type {
  display: inline-flex;
  align-items: center;
  font-size: .68rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.pc-lines { display: flex; flex-direction: column; gap: 5px; }
.pc-line { font-size: .78rem; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.pc-line i { width: 13px; opacity: .6; }
.pc-last-event {
  font-size: .74rem;
  color: var(--text-secondary);
  background: #f7f7f6;
  border: 1px solid var(--border);
  padding: 7px 9px;
  border-radius: 7px;
}
.pc-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pc-date { font-size: .7rem; color: var(--text-muted); }
.pc-price { font-weight: 700; font-size: .84rem; color: #111; }
.pc-price.muted { color: var(--text-muted); font-weight: 600; }
.pc-price.paid { color: #1a6035; }
.pc-photo-flag {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .64rem;
  font-weight: 700;
  background: rgba(201,169,110,.14);
  border: 1px solid rgba(201,169,110,.4);
  color: #83611e;
}

/* ── Profil: flat sections (no stacked cards) ───────────── */
#view-profil .user-profil-card:not(.glass):not(.glass-strong) {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 0 18px !important;
  margin-top: 0 !important;
  border-bottom: 1px solid var(--border) !important;
}
#view-profil .user-profil-card:not(.glass):not(.glass-strong):last-child { border-bottom: 0 !important; padding-bottom: 0 !important; }
#view-profil .user-profil-header { margin-bottom: 14px !important; }

/* ── Modal détail: gallery first ─────────────────────────── */
.detail-gallery { margin-bottom: 14px; }
.detail-gallery-stage {
  position: relative;
  height: clamp(240px, 52vh, 460px);
  background: #0c0c0c;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-gallery-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.detail-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.26);
  background: rgba(0,0,0,.45);
  color: #fff;
  z-index: 3;
}
.detail-gallery-nav.prev { left: 12px; }
.detail-gallery-nav.next { right: 12px; }
.detail-gallery-angle {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 3;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  padding: 4px 10px;
  border-radius: 999px;
}
.detail-gallery-counter {
  margin-top: 8px;
  text-align: center;
  font-size: .74rem;
  color: var(--text-muted);
}
.detail-gallery-thumbs {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.detail-gallery-thumb {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 62px;
  height: 62px;
  overflow: hidden;
  padding: 0;
  flex-shrink: 0;
}
.detail-gallery-thumb.active { border-color: #C9A96E; box-shadow: 0 0 0 2px rgba(201,169,110,.22); }
.detail-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-gallery-thumb-angle {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: .56rem;
  line-height: 1.3;
  text-align: center;
  padding: 1px 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ══════════════════════════════════════════════════════════
   TOGGLE IOS En cours seulement
   ══════════════════════════════════════════════════════════ */
.ios-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.ios-toggle-wrap input { display: none; }
.ios-toggle-track {
  position: relative;
  width: 40px;
  height: 22px;
  background: var(--gray-300);
  border-radius: 11px;
  transition: background 0.22s;
  flex-shrink: 0;
}
.ios-toggle-wrap input:checked + .ios-toggle-track { background: #111; }
.ios-toggle-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  transition: transform 0.22s cubic-bezier(.34,1.5,.64,1);
}
.ios-toggle-wrap input:checked + .ios-toggle-track .ios-toggle-thumb {
  transform: translateX(18px);
}
.ios-toggle-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════
   VIEW SWITCH Grille / Liste
   ══════════════════════════════════════════════════════════ */
.view-switch {
  display: flex;
  gap: 2px;
  background: var(--gray-100);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
}
.view-switch-btn {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: calc(var(--radius-sm) - 2px);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  transition: background 0.15s, color 0.15s;
}
.view-switch-btn[aria-pressed="true"] {
  background: #111;
  color: #fff;
}

/* ══════════════════════════════════════════════════════════
   CLIENTS Vue liste (défaut)
   ══════════════════════════════════════════════════════════ */
.clients-list-view {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.clients-grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Carte prestation vue liste (tableau aligné) */
.prest-row {
  display: grid;
  grid-template-columns: 36px 200px 1fr minmax(180px, auto);
  align-items: center;
  gap: 0 16px;
  padding: 10px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: none;
  cursor: pointer;
  transition: background 0.12s;
}
.clients-list-view .prest-row:first-child {
  border-top: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
}
.clients-list-view .prest-row:last-child {
  border-radius: 0 0 var(--radius) var(--radius);
}
.clients-list-view .prest-row:only-child {
  border-radius: var(--radius);
}
.prest-row:hover {
  background: var(--gray-50, #f9f9f9);
}
.prest-row-avatar {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #111;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
  justify-self: center;
}
.prest-row-info { min-width: 0; }
.prest-row-name {
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prest-row-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prest-row-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.prest-row-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.prest-row-alert-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  background: #ef4444;
  border-radius: 50%;
  border: 2px solid var(--white);
}
.prest-row-amount {
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
}
.prest-row-right .status-badge {
  flex-shrink: 0;
}
@media (max-width: 768px) {
  .prest-row {
    grid-template-columns: 36px 1fr auto;
    grid-template-areas:
      "avatar info  right"
      "tags   tags  tags";
    gap: 6px 10px;
    border-top: none;
  }
  .prest-row-avatar { grid-area: avatar; justify-self: start; }
  .prest-row-info   { grid-area: info; }
  .prest-row-right  { grid-area: right; flex-direction: column; align-items: flex-end; gap: 4px; }
  .prest-row-tags   { grid-area: tags; flex-wrap: wrap; }
  .prest-row-amount { font-size: 0.82rem; flex-shrink: 0; }
}

/* ── Client card (grille) unique num mis en évidence ── */
.client-num-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 1.5px;
  background: #fff;
  color: #111;
  border: 1.5px solid #111;
  border-radius: 4px;
  padding: 2px 8px;
  font-weight: 700;
  margin-bottom: 6px;
}



/* ══════════════════════════════════════════════════════════
   STATUT LOCK Payé, pas de retour en arrière
   ══════════════════════════════════════════════════════════ */
/* ── Statut payé notice verte ──────────────────────────── */
.statut-paid-notice {
  display: flex; align-items: center; gap: 8px;
  background: #f0fdf4; border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm); padding: 8px 14px;
  font-size: 0.78rem; color: #166534; font-weight: 500; margin-bottom: 12px;
}
.statut-paid-notice i { color: #16a34a; }

/* ── Statut prev/next navigation ────────────────────────── */
.statut-nav-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.statut-nav-prev, .statut-nav-next {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--gray-50);
  color: var(--text-secondary); font-size: 0.78rem; font-weight: 600;
  cursor: pointer; font-family: var(--font-body); transition: all 0.15s;
}
.statut-nav-prev:hover:not(:disabled), .statut-nav-next:hover:not(:disabled) {
  background: var(--black); color: #fff; border-color: var(--black);
}
.statut-nav-prev:disabled, .statut-nav-next:disabled { opacity: 0.28; cursor: not-allowed; }
.statut-current-pill {
  flex: 1; text-align: center; min-width: 110px;
  font-size: 0.8rem; font-weight: 700; padding: 7px 16px; border-radius: 20px;
}
.statut-custom-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }

/* ── Suivi readonly ─────────────────────────────────────── */
.suivi-readonly-block {
  display: flex; align-items: center; gap: 10px;
  background: var(--gray-50); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px; margin-top: 10px;
  font-size: 0.82rem; color: var(--text-secondary);
}
.suivi-readonly-label { font-weight: 600; white-space: nowrap; }
.suivi-readonly-code {
  font-family: 'Courier New', monospace; font-size: 0.8rem;
  background: var(--gray-100); padding: 3px 8px; border-radius: 4px;
  color: var(--text-primary); word-break: break-all;
}

/* ══ ADMIN PHOTO GALLERY ══════════════════════════════════ */
.admin-photo-gallery { margin-top: 12px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.admin-photo-main {
  position: relative; width: 100%; aspect-ratio: 4/3;
  background: #0a0a0a; overflow: hidden;
}
.admin-photo-main img {
  width: 100%; height: 100%; object-fit: contain;
  transition: opacity 0.14s ease; display: block;
}
.admin-photo-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(8px);
  overflow: visible !important; /* Correction crop boutons slide */
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; z-index: 4; transition: background 0.18s;
}
.admin-photo-prev { left: 10px; }
.admin-photo-next { right: 10px; }
.admin-photo-btn:hover { background: rgba(201,169,110,0.85); border-color: #C9A96E; }
.admin-photo-overlay-bar {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px;
  background: linear-gradient(to top, rgba(0,0,0,0.55), transparent); z-index: 3;
}
.admin-photo-counter {
  font-size: 0.68rem; font-weight: 600; color: rgba(255,255,255,0.75);
  background: rgba(0,0,0,0.4); padding: 2px 9px; border-radius: 20px;
}
.admin-photo-fullscreen {
  font-size: 0.65rem; font-weight: 600; color: rgba(255,255,255,0.65);
  text-decoration: none; display: flex; align-items: center; gap: 5px;
  background: rgba(0,0,0,0.35); padding: 3px 10px; border-radius: 4px;
  transition: color 0.15s;
}
.admin-photo-fullscreen:hover { color: #C9A96E; }
.admin-photo-angle {
  font-size: 0.68rem; font-weight: 600; color: #fff;
  background: rgba(0,0,0,0.4); padding: 2px 9px; border-radius: 20px;
}
.admin-photo-thumbs {
  display: flex; gap: 4px; padding: 8px;
  background: var(--gray-100); overflow-x: auto; scrollbar-width: none;
}
.admin-photo-thumbs::-webkit-scrollbar { display: none; }
.admin-photo-thumb {
  position: relative;
  flex: 0 0 64px; width: 64px; height: 64px;
  cursor: pointer; border-radius: 4px; border: 2px solid transparent;
  opacity: 0.6; transition: all 0.15s ease; overflow: hidden;
}
.admin-photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-photo-thumb:hover { opacity: 0.9; }
.admin-photo-thumb.active { border-color: var(--black); opacity: 1; }
.admin-photo-thumb-angle {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.6); color: #fff;
  font-size: .52rem; line-height: 1.3; text-align: center;
  padding: 1px 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

@media (max-width: 480px) {
  .statut-nav-row { flex-direction: column; align-items: stretch; }
  .statut-current-pill { text-align: left; }
  .statut-nav-prev, .statut-nav-next { justify-content: center; }
}

/* ══════════════════════════════════════════════════════════
   PRESTATIONS & BOUTIQUE ADMIN
   ══════════════════════════════════════════════════════════ */
.cat-panels-split {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 20px;
  padding-bottom: 60px;
}
.cat-panel-col { display: flex; flex-direction: column; gap: 16px; width: 100%; }
.cat-panel-col .cat-management-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.cat-panel-col .cat-section-header {
  padding: 16px 20px;
  font-size: 1rem;
  font-weight: 700;
  background: var(--gray-50);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cat-panel-col .cat-management-grid { padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.cat-panel-col .cat-add-footer { padding: 16px; border-top: 1px solid var(--border); background: #fafafa; }

/* Article Admin Card (Premium Row) */
.aac { 
  display: grid; 
  grid-template-columns: 64px 1fr auto auto; 
  gap: 20px; 
  align-items: center; 
  padding: 12px 20px; 
  background: var(--white); 
  border-bottom: 1px solid var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.aac:hover { background: var(--gray-50); transform: translateX(6px); border-left: 3px solid var(--black); }
.aac:last-child { border-bottom: none; }

.aac-thumb {
  width: 64px; height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--gray-100);
  flex-shrink: 0;
  position: relative;
  border: 1px solid var(--border);
}
.aac-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.aac:hover .aac-thumb img { transform: scale(1.08); }
.aac-thumb-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-400); font-size: 1.2rem;
}

/* ── Layout Slider Boutique (Grande Gauche, Petites Droites) ── */
.boutique-collection-slider {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 20px;
  position: relative;
  margin-bottom: 30px;
}
.boutique-main-img-wrap {
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.boutique-main-img-wrap img { width: 100%; height: 100%; object-fit: cover; }

.boutique-thumbs-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}
.boutique-slider-nav-bottom {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.aac-body { min-width: 0; }
.aac-title { font-size: 1rem; font-weight: 700; color: var(--black); margin-bottom: 5px; }
.aac-tags { display: flex; align-items: center; gap: 10px; }
.aac-cat { font-size: 0.72rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; background: var(--gray-100); padding: 3px 8px; border-radius: 5px; }
.aac-stock { font-size: 0.8rem; display: flex; align-items: center; gap: 5px; color: var(--text-secondary); }
.aac-stock.low { color: #f59e0b; font-weight: 700; }
.aac-stock.out { color: #dc2626; font-weight: 700; }

.aac-price { text-align: right; min-width: 100px; padding: 0 15px; }
.aac-price-main { font-size: 1.1rem; font-weight: 900; color: var(--black); }

.aac-actions { display: flex; gap: 8px; }
.aac-btn { 
  width: 36px; height: 36px; 
  border-radius: 10px; 
  border: 1px solid var(--border); 
  background: var(--white); 
  color: var(--text-secondary); 
  cursor: pointer; 
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.aac-btn:hover { background: var(--black); color: var(--white); border-color: var(--black); }
.aac-btn-featured.active { background: #fbbf24; color: #fff; border-color: #fbbf24; box-shadow: 0 0 10px rgba(251,191,36,0.3); }
.aac-btn-danger:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }

.aac-badge-feat { 
  position: absolute; top: 0; right: 0; 
  background: #fbbf24; color: #fff; 
  width: 20px; height: 20px; 
  border-bottom-left-radius: 8px; 
  display: flex; align-items: center; justify-content: center; 
  font-size: 0.7rem; 
  z-index: 2;
}
.aac-img-count { 
  position: absolute; bottom: 5px; right: 5px; 
  background: rgba(0,0,0,0.7); color: #fff; 
  font-size: 0.65rem; padding: 2px 6px; 
  border-radius: 4px; display: flex; align-items: center; gap: 4px; 
  backdrop-filter: blur(4px);
}

/* ══════════════════════════════════════════════════════════
   BOTTOM NAV Mobile (espace-user)
   ══════════════════════════════════════════════════════════ */
.bottom-nav {
  display: none; /* masqué par défaut, visible en mobile */
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(60px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: #111;
  border-top: 1px solid rgba(255,255,255,0.08);
  z-index: 1000;
  flex-direction: row;
  align-items: stretch;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.18);
}

.bottom-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: rgba(255,255,255,0.45);
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: color 0.18s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  padding: 6px 0 0;
}
.bottom-nav-btn i {
  font-size: 1.18rem;
  line-height: 1;
}
.bottom-nav-btn span {
  font-size: 0.63rem;
  line-height: 1;
}
.bottom-nav-btn:hover,
.bottom-nav-btn:active { color: rgba(255,255,255,0.75); }
.bottom-nav-btn.active {
  color: #fff;
}
.bottom-nav-btn.active::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 2px;
  background: #fff;
  border-radius: 0 0 2px 2px;
}

.bottom-nav-badge {
  position: absolute;
  top: 3px;
  left: calc(50% + 6px);
  background: #cc0000;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}
.bottom-nav-badge.hidden { display: none; }

/* ── Profil liens légaux ────────────────────────────────── */
.legal-link-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  color: var(--text-primary);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}
.legal-link-row i:first-child {
  width: 18px;
  text-align: center;
  color: var(--text-muted);
  flex-shrink: 0;
}
.legal-link-row:hover { background: var(--gray-50); border-color: var(--gray-300); }

/* ── Profil bouton suppression ─────────────────────────── */
.btn-danger-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1.5px solid #cc0000;
  border-radius: var(--radius-sm);
  background: transparent;
  color: #cc0000;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.btn-danger-outline:hover {
  background: #cc0000;
  color: #fff;
}

/* ── Mobile active bottom nav (espace-user uniquement) ─── */
@media (max-width: 767px) {
  .page-app .bottom-nav { display: flex; }

  /* Le contenu scrollable laisse de la place pour le bottom nav */
  .view {
    padding-bottom: calc(72px + env(safe-area-inset-bottom) + 12px);
  }

  /* Toast remonte au-dessus du bottom nav */
  .toast-container {
    bottom: calc(68px + env(safe-area-inset-bottom));
  }

  /* Masquer le hamburger sidebar le bottom nav suffit */
  .mobile-menu-btn { display: none !important; }

  /* Header simplifié : plus de bouton Ajouter/Accueil en double */
  .header-actions .btn-secondary,
  .header-actions .btn-primary { display: none; }
  .header-actions .user-badge { display: flex; }

  .prest-group-cards { grid-template-columns: 1fr; padding: 10px; }
  .order-type-header { font-size: .82rem; }
  .detail-gallery-stage { height: 280px; }
  .detail-gallery-nav { width: 36px; height: 36px; }
  .user-cart-submit-btn { width: 100%; margin-top: 4px; }
  .commandes-highlight-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE ADMIN APP (corrections page-app)
   ══════════════════════════════════════════════════════════ */

/* Bug fix : la règle bottom-nav masquait le hamburger admin */
@media (max-width: 767px) {
  .page-app .mobile-menu-btn { display: flex !important; }
}

/* ══════════════════════════════════════════════════════════
   BOUTIQUE ADMIN LISTE D'ARTICLES (.aac)
   ══════════════════════════════════════════════════════════ */
.boutique-admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.aac {
  display: grid;
  grid-template-columns: 72px 1fr minmax(90px,auto) auto;
  align-items: center;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.18s;
  min-height: 72px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.aac:hover {
  border-color: #d0d0d0;
  box-shadow: 0 6px 20px rgba(0,0,0,0.09);
  transform: translateY(-2px);
}
.aac.aac-hidden { opacity: 0.45; }

.aac-thumb {
  width: 72px;
  height: 72px;
  position: relative;
  overflow: hidden;
  background: var(--gray-100);
  border-right: 1px solid var(--border);
  flex-shrink: 0;
}
.aac-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.aac:hover .aac-thumb img { transform: scale(1.06); }
.aac-thumb-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--cat-color, var(--text-muted));
  font-size: 1.4rem;
  background: color-mix(in srgb, var(--cat-color, var(--gray-200)) 10%, white);
}
.aac-badge-feat {
  position: absolute; top: 0; right: 0;
  background: #fbbf24; color: #fff;
  width: 18px; height: 18px;
  border-bottom-left-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem; z-index: 2;
}
.aac-img-count {
  position: absolute; bottom: 4px; right: 4px;
  background: rgba(0,0,0,0.65); color: #fff;
  font-size: 0.58rem; padding: 2px 5px;
  border-radius: 4px; display: flex; align-items: center; gap: 3px;
  backdrop-filter: blur(4px);
}
.cat-panel-col .cat-section-header {
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 700;
  background: var(--gray-50);
  border-bottom: 1px solid var(--border);
  margin: 0;
}
.cat-panel-col .cat-management-grid { padding: 12px; display: flex; flex-direction: column; gap: 12px; }
.cat-panel-col .cat-add-footer { padding: 12px; border-top: 1px solid var(--border); display: flex; gap: 8px; }
@media (max-width: 900px) {
  .cat-panels-split { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════
   BOUTIQUE ADMIN ACCORDÉON PAR CATÉGORIE
   ══════════════════════════════════════════════════════════ */
.boutique-acc-group {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 8px;
  background: var(--white);
}
.boutique-acc-header {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  background: var(--gray-50);
  border: none; cursor: pointer;
  font-family: var(--font-body); font-size: .85rem;
  text-align: left; transition: background .15s;
  border-bottom: 1px solid var(--border);
}
.boutique-acc-header:hover { background: var(--gray-100); }
.boutique-acc-cat-icon {
  width: 28px; height: 28px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; flex-shrink: 0;
}
.boutique-acc-cat-name { flex: 1; font-weight: 700; font-size: 0.85rem; color: var(--black); }
.boutique-acc-count { font-size: .7rem; color: var(--text-muted); font-weight: 500; white-space: nowrap; }
.boutique-acc-chevron { font-size: .65rem; color: var(--text-muted); transition: transform .2s; flex-shrink: 0; }
.boutique-acc-body {
  overflow: hidden;
  display: none;
}
.boutique-acc-body.open {
  display: block;
}
.boutique-acc-grid { display: flex; flex-direction: column; }

/* Article Admin Card (Compact Row) */
/* Compact accordion row hérite de la définition principale .aac ci-dessus */
.boutique-acc-grid .aac {
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  box-shadow: none;
  min-height: 58px;
}
.boutique-acc-grid .aac:last-child { border-bottom: none; }
.boutique-acc-grid .aac:hover { transform: none; box-shadow: none; background: var(--gray-50); }
.boutique-acc-grid .aac-thumb { width: 42px; height: 42px; border-radius: 6px; border: none; border-right: none; }
.aac-body { min-width: 0; padding: 10px 0 10px 14px; }
.aac-title { font-size: 0.88rem; font-weight: 700; color: var(--black); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
.aac-tags { display: flex; align-items: center; gap: 6px; }
.aac-cat { font-size: 0.62rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; background: var(--gray-100); padding: 2px 7px; border-radius: 4px; font-weight: 700; }
.aac-stock { font-size: 0.72rem; display: flex; align-items: center; gap: 4px; color: var(--text-secondary); font-weight: 600; }
.aac-stock.low { color: #f59e0b; }
.aac-stock.out { color: #dc2626; }
.aac-vis-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(107,114,128,0.15);
  color: #4b5563;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.boutique-acc-grid .aac-price { text-align: right; min-width: 70px; padding: 0 8px; flex-direction: column; align-items: flex-end; justify-content: center; }
.boutique-acc-grid .aac-price-main { font-size: 0.8rem; font-weight: 700; color: var(--black); display: block; }
.aac-price-promo { font-size: 0.65rem; color: #dc2626; font-weight: 600; }
.boutique-acc-grid .aac-actions { display: flex; flex-direction: row; gap: 4px; border-left: none; padding: 0 8px; align-self: center; }
.boutique-acc-grid .aac-btn { width: 28px; height: 28px; padding: 0; border-radius: 5px; font-size: 0.75rem; }
.boutique-acc-grid .aac-btn:hover { background: var(--gray-100); color: var(--black); border-color: var(--black); }
.btn-aac-visibility.active {
  background: rgba(107,114,128,0.12);
  color: #4b5563;
  border-color: rgba(107,114,128,0.35);
}
.aac-badge-feat { position: absolute; top: 2px; right: 2px; background: rgba(212, 175, 55, 0.9); color: #fff; width: 14px; height: 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.5rem; z-index: 5; }
.aac-badge-special { position: absolute; top: 2px; left: 2px; background: rgba(201, 169, 110, 0.9); color: #fff; width: 14px; height: 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.5rem; z-index: 5; }
.aac-img-count { position: absolute; bottom: 2px; right: 2px; background: rgba(0,0,0,0.6); color: #fff; font-size: 0.55rem; padding: 1px 3px; border-radius: 2px; display: flex; align-items: center; gap: 2px; z-index: 5; }

/* ══════════════════════════════════════════════════════════
   DASHBOARD UTILISATEURS EN LIGNE
   ══════════════════════════════════════════════════════════ */
@keyframes _pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .6; transform: scale(1.2); }
}

/* ══════════════════════════════════════════════════════════
   ESPACE USER COLLAPSABLE DANGER ZONE
   ══════════════════════════════════════════════════════════ */
/* ── Danger Zone ── */
.danger-zone-card {
  border-radius: var(--radius-lg);
  border-color: rgba(185, 28, 28, 0.2);
  overflow: hidden;
}

.danger-zone-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 20px 16px;
}

.danger-zone-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ef4444;
  font-size: 1rem;
  flex-shrink: 0;
}

.danger-zone-title {
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #ef4444;
  margin: 0 0 2px;
}

.danger-zone-subtitle {
  font-size: .72rem;
  color: var(--text-muted);
  margin: 0;
  letter-spacing: .04em;
}

.danger-zone-divider {
  height: 1px;
  background: rgba(239, 68, 68, 0.12);
  margin: 0 20px;
}

.danger-zone-action-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px 20px;
}

.danger-zone-action-info {
  flex: 1;
  min-width: 0;
}

.danger-zone-action-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.danger-zone-action-desc {
  font-size: .73rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.danger-zone-delete-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background .2s, border-color .2s, color .2s;
  font-family: var(--font-body);
}

.danger-zone-delete-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: #fff;
}

/* ── Bouton retour boutique (mobile espace-user) ── */
.mobile-back-boutique-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
  transition: var(--t);
}

.mobile-back-boutique-btn:hover {
  background: rgba(0,0,0,0.06);
}
@media (max-width: 767px) {
  .mobile-back-boutique-btn { display: flex; }
}

.btn-muted {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 6px 12px;
  font-size: 0.78rem;
  border-radius: 6px;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-muted:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

/* Prestations View Full Width */
.prestations-full-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 10px 0;
}

/* ══════════════════════════════════════════════════════════
   CALENDRIER DASHBOARD
   ══════════════════════════════════════════════════════════ */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  font-family: var(--font-body);
}
.cal-day-header {
  text-align: center;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 6px 0;
  font-family: var(--font-body);
}
.cal-day {
  min-height: 52px;
  padding: 5px 6px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--font-body);
  transition: background 0.15s;
}
.cal-day:hover { background: var(--gray-50); }
.cal-day.other-month { background: transparent; border-color: transparent; }
.cal-day.today { border-color: rgba(201,169,110,0.5); background: rgba(201,169,110,0.04); }
.cal-day.cal-day-selected { background: var(--gray-50); border-color: var(--black); box-shadow: 0 0 0 2px rgba(0,0,0,0.1); }
.cal-day-num {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
  font-family: var(--font-body);
  line-height: 1;
}
.cal-today-num {
  font-size: 0.72rem;
  font-weight: 800;
  color: #C9A96E;
  font-family: var(--font-body);
  line-height: 1;
}
.cal-dots-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  margin-top: 2px;
}
.cal-event-dot {
  display: block;
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cal-event-dot.type-restauration { background: #6366f1; }
.cal-event-dot.type-vente        { background: #C9A96E; }
.cal-event-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--white);
  margin-bottom: 5px;
  font-family: var(--font-body);
  transition: background 0.15s;
}
.cal-event-item:hover { background: var(--gray-50); }
.cal-event-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  font-family: var(--font-body);
}
@media (max-width: 560px) {
  .cal-day { min-height: 36px; padding: 3px; }
  .cal-day-num, .cal-today-num { font-size: 0.62rem; }
  .cal-event-item { flex-wrap: wrap; gap: 5px; }
}

/* ══════════════════════════════════════════════════════════
   APP ADMIN GRILLE CATÉGORIES (différenciée de la boutique)
   ══════════════════════════════════════════════════════════ */
.page-app .acc-cat-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.page-app .acc-cat-card {
  height: auto !important;
  min-height: 0 !important;
  grid-row: span 1 !important;
  grid-column: auto !important;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  transition: box-shadow 0.15s, background 0.15s;
  cursor: pointer;
  overflow: hidden;
  position: relative;
}
.page-app .acc-cat-card:hover {
  background: var(--gray-50);
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  transform: none;
}
.page-app .acc-cat-card--img { display: none; }
.page-app .acc-cat-card-overlay { display: none; }
.page-app .acc-cat-card-num {
  display: none;
}
.page-app .acc-cat-icon {
  width: 34px; height: 34px;
  background: var(--gray-100);
  border-radius: 8px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem;
  color: var(--text-secondary);
  position: static;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.page-app .acc-cat-card:hover .acc-cat-icon {
  background: var(--black);
  color: #fff;
  border-color: var(--black);
}
.page-app .acc-cat-name {
  font-family: var(--font-body);
  font-size: .88rem;
  font-weight: 700;
  color: var(--black);
  position: static;
  padding: 0;
  margin: 0;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  bottom: auto; left: auto;
}
.page-app .acc-cat-name::after { display: none; }
.page-app .acc-cat-actions-inline {
  position: static;
  opacity: 1;
  transform: none;
  padding: 0;
  margin-top: 0;
  flex-shrink: 0;
}
.page-app .acc-cat-btn-single {
  white-space: nowrap;
  padding: 7px 12px;
  font-size: .68rem;
  background: var(--gray-100);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 7px;
  font-weight: 700;
  transition: all 0.15s;
}
.page-app .acc-cat-btn-single:hover { background: var(--black); color: #fff; border-color: var(--black); }
.page-app .acc-cat-card::after { display: none; }

/* ── Header espace-user blanc marqué ─────────────────── */
.page-app .app-header {
  background: #ffffff;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

/* ── Panier .aac-price dans le card admin ────────────────── */
.aac-price {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
}
.aac-price-main {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: .04em;
  color: var(--black);
  white-space: nowrap;
}
.aac-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-left: 1px solid var(--border);
  align-self: stretch;
  justify-content: center;
}
.aac-btn {
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem;
}
.aac-btn:hover { background: var(--black); color: var(--white); border-color: var(--black); }
.aac-btn-featured.active { background: #fbbf24; color: #fff; border-color: #fbbf24; }
.aac-btn-danger:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }

/* Neutraliser les hovers globaux accueil.css sur les cards admin */
.page-app .acc-cat-card:hover {
  box-shadow: 0 2px 10px rgba(0,0,0,0.07) !important;
}

@media (max-width: 600px) {
  .commandes-highlight-grid { grid-template-columns: 1fr; }
  .chc-step-label { font-size: .5rem; max-width: 36px; }
}

/* ══════════════════════════════════════════════════════════
   COMMANDES tabs + rows layout
   ══════════════════════════════════════════════════════════ */

/* Type tabs */
.cmd-type-tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 0;
}
.cmd-type-tab {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 14px 24px;
  font-size: .88rem; font-weight: 600;
  color: var(--text-muted);
  background: none; border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer; transition: color .15s, border-color .15s;
}
.cmd-type-tab:hover { color: var(--text-primary); }
.cmd-type-tab.active {
  color: var(--text-primary);
  border-bottom-color: #C9A96E;
}
.cmd-type-tab i { font-size: .75rem; }

.commandes-rows-list {
  display: flex;
  flex-direction: column;
}

.cmd-row {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  transition: background .15s;
}
@media (hover: hover) {
  .cmd-row:hover { background: var(--gray-50); }
}
.cmd-row--action {
  border-left: 3px solid #ea580c;
  background: #fffaf7;
}
@media (hover: hover) {
  .cmd-row--action:hover { background: #fff5ee; }
}

.cmd-row-img {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  background: var(--gray-50);
  overflow: hidden;
  position: relative;
  margin: 10px 0 10px 16px;
  border-radius: 8px;
}
.cmd-row-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cmd-row-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  color: var(--text-muted);
  background: var(--gray-50);
}

.cmd-row-body {
  flex: 1;
  padding: 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.cmd-row-ref {
  font-family: var(--font-display);
  font-size: .85rem;
  letter-spacing: .08em;
  color: var(--text-muted);
}
.cmd-row-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmd-row-desc {
  font-size: .82rem;
  color: var(--text-secondary);
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cmd-row-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.cmd-row-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  font-weight: 500;
  padding: 3px 9px;
  border-radius: 6px;
}
.cmd-row-status::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  opacity: .75;
}
.cmd-row-date {
  font-size: .73rem;
  color: var(--text-muted);
}
.cmd-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  font-size: .72rem;
  font-weight: 600;
  color: #ea580c;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  padding: 2px 8px;
  border-radius: 5px;
  width: fit-content;
}
.cmd-action-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ea580c;
  flex-shrink: 0;
  animation: pulse-dot 1.8s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(.7); }
}
.cmd-row-price {
  margin-left: auto;
  font-weight: 700;
  font-size: .9rem;
  color: var(--text-primary);
  padding-right: 16px;
  align-self: center;
  flex-shrink: 0;
}

.cmd-row-chevron {
  align-self: center;
  padding: 0 14px 0 0;
  color: var(--text-muted);
  font-size: .8rem;
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════
   SUIVI MA COMMANDE
   ══════════════════════════════════════════════════════════ */
.suivi-search-card,
.suivi-relay-card,
.suivi-atelier-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 32px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  position: relative;
  overflow: hidden;
}

.suivi-search-header,
.suivi-relay-header,
.suivi-atelier-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}
.suivi-search-header h3,
.suivi-relay-header h3,
.suivi-atelier-header h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 2px;
  color: var(--text-primary);
}
.suivi-search-header p,
.suivi-relay-header p,
.suivi-atelier-header p {
  font-size: .82rem;
  color: var(--text-muted);
  margin: 0;
}

.suivi-search-icon,
.suivi-relay-icon,
.suivi-atelier-icon {
  font-size: 1.4rem;
  color: #C9A96E;
  margin-top: 2px;
  flex-shrink: 0;
}

.suivi-search-row,
.suivi-relay-search-row {
  display: flex;
  gap: 8px;
}
.suivi-search-row input,
.suivi-relay-search-row input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: .9rem;
  font-family: inherit;
  background: var(--surface-2);
  color: var(--text-primary);
  outline: none;
  transition: border-color .15s;
}
.suivi-search-row input:focus,
.suivi-relay-search-row input:focus { border-color: #C9A96E; }

#suivi-search-result,
#relay-results {
  margin-top: 12px;
  font-size: .84rem;
  color: var(--text-secondary);
  min-height: 20px;
}

.suivi-section-title {
  font-family: var(--font-display);
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.suivi-expeditions-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.suivi-atelier-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.suivi-atelier-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .88rem;
  color: var(--text-secondary);
}
.suivi-atelier-row i { color: #C9A96E; width: 16px; text-align: center; flex-shrink: 0; }
.suivi-atelier-row a { color: var(--text-primary); text-decoration: none; font-weight: 600; }

.suivi-map-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  height: 220px;
}
.suivi-map-wrap iframe {
  width: 100%; height: 100%;
  border: 0; display: block;
  pointer-events: none;
  transition: pointer-events 0s;
}
.suivi-map-wrap.map-active iframe { pointer-events: auto; }
.suivi-map-lock-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  gap: 8px;
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
  z-index: 2;
}
.suivi-map-wrap.map-active .suivi-map-lock-overlay { opacity: 0; pointer-events: none; }

@media (max-width: 600px) {
  .cmd-row-img { width: 68px; height: 68px; min-height: unset; }
  .cmd-row-body { padding: 10px 8px 10px 12px; }
  .cmd-row-title { font-size: .88rem; }
  .cmd-row-price { padding-right: 8px; font-size: .8rem; }
  .cmd-row-chevron { padding: 0 8px 0 0; }
  .cmd-action-pill { font-size: .68rem; }
  .suivi-map-wrap { height: 170px; }
}

/* ══════════════════════════════════════════════════════════
   FAVORIS Section Mes Favoris espace-user
   ══════════════════════════════════════════════════════════ */
.fav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding: 8px 0;
}
.fav-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
}
.fav-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.fav-card-img {
  display: block;
  height: 180px;
  overflow: hidden;
  background: #f4f4f4;
}
.fav-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.3s ease;
}
.fav-card:hover .fav-card-img img { transform: scale(1.04); }
.fav-card-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: #ccc; font-size: 2rem;
}
.fav-card-body {
  padding: 12px 14px 6px;
  flex: 1;
}
.fav-card-cat {
  font-size: 0.68rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted); margin: 0 0 4px;
}
.fav-card-name {
  font-size: 0.9rem; font-weight: 600; margin: 0 0 6px;
  line-height: 1.3; color: var(--text-primary);
}
.fav-card-price {
  font-size: 0.95rem; font-weight: 700; color: #111; margin: 0;
}
.fav-card-actions {
  display: flex; gap: 8px; padding: 10px 14px 14px;
}
.fav-add-btn {
  flex: 1; padding: 9px 12px;
  background: #111; color: #fff;
  border: none; border-radius: 6px; cursor: pointer;
  font-size: 0.78rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: background 0.2s;
}
.fav-add-btn:hover { background: #000; }
.fav-add-btn:disabled { background: #aaa; cursor: not-allowed; }
.fav-rm-btn {
  width: 38px; flex-shrink: 0;
  background: #fff; border: 1px solid #e0e0e0; border-radius: 6px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: #bbb; font-size: 0.8rem;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.fav-rm-btn:hover { color: #e05c6e; border-color: #e05c6e; background: #fff0f2; }
.fav-empty {
  grid-column: 1/-1;
  text-align: center; padding: 60px 20px;
  color: var(--text-muted); font-size: 0.9rem;
}
.fav-empty p { margin: 0 0 8px; line-height: 1.6; }
@media (max-width: 600px) {
  .fav-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .fav-card-img { height: 140px; }
}
/* ── Collection Accordion ── */
.aac-accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
  margin-bottom: 12px;
  transition: var(--t);
  box-shadow: var(--shadow-sm);
}
.aac-accordion-header {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: var(--white);
  user-select: none;
  transition: background 0.2s;
}
.aac-accordion-header:hover {
  background: var(--gray-50);
}
.aac-accordion-content {
  display: none;
  padding: 0;
  border-top: 1px solid var(--border);
  background: #fdfdfd;
}
.aac-accordion.open {
  box-shadow: var(--shadow);
  border-color: var(--gray-300);
}
.aac-accordion.open .aac-accordion-content {
  display: block;
}
.aac-accordion.open .aac-chevron {
  transform: rotate(180deg);
}
.aac-chevron {
  transition: transform 0.3s ease;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.aac-col-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.aac-col-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aac-col-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.aac-badge {
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.aac-badge-active { background: #dcfce7; color: #166534; }
.aac-badge-hidden { background: #f1f5f9; color: #64748b; }

.aac-article-list {
  display: flex;
  flex-direction: column;
}
.aac-article-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--gray-100);
  transition: background 0.2s;
}
.aac-article-item:last-child { border-bottom: none; }
.aac-article-item:hover { background: var(--gray-50); }
.aac-art-img {
  width: 40px; height: 40px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--gray-100);
}
.aac-art-name {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aac-art-price {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gray-600);
}
.aac-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 18px;
  background: var(--gray-50);
  border-top: 1px solid var(--border);
}

/* ══════════════════════════════════════════════════════════
   SECURITY VIEW (RESPONSIVE FIXES)
   ══════════════════════════════════════════════════════════ */
#view-security .dashboard-stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-bottom: 24px;
}

#view-security .activity-name {
  word-break: break-all;
  line-height: 1.4;
}

@media (min-width: 1024px) {
  #view-security .dashboard-charts-grid {
    grid-template-columns: 1fr 2fr;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  #view-security .dashboard-charts-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  #view-security .recent-activity {
    margin-bottom: 16px;
  }
}

/* ── Spreadsheet Table Mode (Detail Modal) ── */
.user-detail-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.user-detail-table tr {
  border-bottom: 1px solid var(--border);
}
.user-detail-table tr:last-child {
  border-bottom: none;
}
.user-detail-table td {
  padding: 12px 10px;
  vertical-align: middle;
}
.user-detail-table td:first-child {
  width: 130px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--gray-50);
  border-right: 1px solid var(--border);
}
.user-detail-table td:last-child {
  color: var(--text-primary);
}
.user-detail-table .dir-val {
  margin: 0;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* ── Delete Order Popup (dop) ───────────────────────────── */
.dop-card {
  width: 100%;
  max-width: 400px;
  background: var(--white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  padding: 24px;
  animation: slideInUp 0.22s ease;
  position: relative;
}
.dop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.dop-title {
  font-size: .92rem;
  font-weight: 700;
  color: #8B0000;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dop-subtitle {
  font-size: .76rem;
  color: var(--text-muted);
  margin: 0 0 14px;
  line-height: 1.4;
}
.dop-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 240px;
  overflow-y: auto;
  margin-bottom: 12px;
}
.dop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  user-select: none;
}
.dop-item:hover {
  background: var(--gray-50);
  border-color: var(--border);
}
.dop-item input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #8B0000;
  flex-shrink: 0;
  cursor: pointer;
}
.dop-item-cat {
  flex: 1;
  font-size: .83rem;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: capitalize;
}
.dop-item-price {
  font-size: .78rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.dop-select-all {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .75rem;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: 16px;
  padding: 0 2px;
  user-select: none;
}
.dop-select-all input[type="checkbox"] {
  accent-color: #8B0000;
  cursor: pointer;
}
.dop-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}
.dop-btn-confirm {
  background: #8B0000;
  color: var(--white);
  border: none;
}
.dop-btn-confirm:hover:not(:disabled) {
  background: #a00000;
  transform: translateY(-1px);
}
.dop-btn-confirm:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}

/* ══════════════════════════════════════════════════════════
   MAINTENANCE BOUTIQUE — temporaire, à retirer avec le bloc
   HTML .maintenance-overlay + class body.maintenance-active
   quand la boutique rouvre.
   ══════════════════════════════════════════════════════════ */
body.maintenance-active { overflow: hidden; }
body.maintenance-active > *:not(.maintenance-overlay) {
  filter: blur(8px);
  pointer-events: none;
  user-select: none;
}
.maintenance-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: rgba(9,9,11,0.78);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  text-align: center;
  padding: 24px;
}
.maintenance-overlay i.fa-lock {
  font-size: clamp(64px, 15vw, 140px);
  color: #C9A96E;
}
.maintenance-overlay h2 {
  color: #fff;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.8rem, 5vw, 3rem);
  letter-spacing: 1px;
  margin: 0;
}
.maintenance-overlay p {
  color: rgba(255,255,255,0.72);
  max-width: 420px;
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
}
.maintenance-overlay a.maintenance-back {
  margin-top: 8px;
  background: #fff;
  color: #000;
  text-decoration: none;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
  transition: opacity .2s;
}
.maintenance-overlay a.maintenance-back:hover { opacity: 0.8; }

/* ── Fond flouté derrière le menu mobile (navbar) ──────────── */
body:has(#acc-mobile-menu:not(.hidden)) { overflow: hidden; }
body:has(#acc-mobile-menu:not(.hidden))::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 899;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: acc-menu-backdrop-in .25s ease;
}
@keyframes acc-menu-backdrop-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
