/* ==========================================================================
   Copilote Vente - Styles CSS Modernes & Responsive avec IA Gemini
   ========================================================================== */

:root {
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Couleurs Mode Clair */
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-elevated: #ffffff;
  --bg-card: #ffffff;
  --bg-muted: #f1f5f9;
  --bg-subtle: #f8fafc;

  --border: #e2e8f0;
  --border-light: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-focus: #6366f1;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;

  /* Couleurs d'Accentuation */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;

  --ai-primary: #8b5cf6;
  --ai-gradient: linear-gradient(135deg, #7c3aed 0%, #2563eb 50%, #06b6d4 100%);
  --ai-light: #f5f3ff;

  --success: #10b981;
  --success-hover: #059669;
  --success-light: #ecfdf5;

  --warning: #f59e0b;
  --warning-light: #fef3c7;

  --danger: #ef4444;
  --danger-light: #fef2f2;

  --vinted: #09b1ba;
  --vinted-light: #e6f7f8;

  --leboncoin: #ff6e14;
  --leboncoin-light: #fff3ec;

  /* Statuts */
  --status-draft: #64748b;
  --status-draft-bg: #f1f5f9;
  --status-ready: #0284c7;
  --status-ready-bg: #e0f2fe;
  --status-published: #059669;
  --status-published-bg: #d1fae5;
  --status-nego: #d97706;
  --status-nego-bg: #fef3c7;
  --status-sold: #7c3aed;
  --status-sold-bg: #ede9fe;
  --status-stale: #dc2626;
  --status-stale-bg: #fee2e2;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;
}

/* Mode Sombre */
body.theme-dark {
  --bg-app: #090d16;
  --bg-surface: #111827;
  --bg-surface-elevated: #1f2937;
  --bg-card: #1f2937;
  --bg-muted: #1e293b;
  --bg-subtle: #0f172a;

  --border: #334155;
  --border-light: #334155;
  --border-medium: #475569;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --primary-light: rgba(79, 70, 229, 0.2);
  --ai-light: rgba(139, 92, 246, 0.2);
  --success-light: rgba(16, 185, 129, 0.2);
  --warning-light: rgba(245, 158, 11, 0.2);
  --danger-light: rgba(239, 68, 68, 0.2);
  --vinted-light: rgba(9, 177, 186, 0.2);
  --leboncoin-light: rgba(255, 110, 20, 0.2);

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.5);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
}

/* Base & Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100vh;
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Layout */
.app-layout {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* En-tête */
.app-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-light);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

.logo-icon {
  font-size: 1.4rem;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-tag {
  background: var(--ai-light);
  color: var(--ai-primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.brand-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.brand-subtitle strong {
  color: var(--text-secondary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Raccourci Recherche & Spotlight Central */
.header-search-center {
  flex: 1;
  max-width: 380px;
  margin: 0 1rem;
}

.header-search-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  background: var(--bg-muted);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 0.45rem 0.95rem;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-search-bar:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--primary);
  color: var(--text-primary);
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.12);
}

.header-search-icon {
  font-size: 0.85rem;
  opacity: 0.8;
}

.header-search-text {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-search-kbd {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: 4px;
  padding: 0.1rem 0.38rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-secondary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

/* Menu Déroulant Outils Vendeur */
.tools-dropdown-wrapper {
  position: relative;
}

.btn-tools-toggle {
  border-radius: var(--radius-full);
  padding: 0.45rem 0.85rem;
  font-weight: 600;
  font-size: 0.82rem;
  gap: 0.4rem;
}

.tools-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: auto;
  min-width: 280px;
  width: 320px;
  max-width: calc(100vw - 1.5rem);
  max-height: calc(100vh - 6.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-sizing: border-box;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
  padding: 0.55rem;
  z-index: 2500;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  animation: dropdownFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.tools-dropdown-menu::-webkit-scrollbar {
  width: 6px;
}

.tools-dropdown-menu::-webkit-scrollbar-track {
  background: transparent;
}

.tools-dropdown-menu::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.tools-dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.tools-dropdown-header {
  padding: 0.4rem 0.6rem 0.3rem 0.6rem;
  display: flex;
  flex-direction: column;
}

.tools-dropdown-header strong {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tools-dropdown-header small {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.tools-dropdown-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0.35rem 0;
}

.tools-dropdown-section-title {
  padding: 0.45rem 0.65rem 0.15rem;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.tools-dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  font-family: inherit;
  color: var(--text-primary);
}

.tools-dropdown-item:hover {
  background: var(--bg-muted);
  transform: translateX(2px);
}

.tools-item-icon {
  font-size: 1.1rem;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-muted);
  border-radius: 8px;
  border: 1px solid var(--border-light);
  flex-shrink: 0;
}

.tools-item-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.tools-item-text strong {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
}

.tools-item-text small {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Boutons Navigation Modernes */
.btn-cta-new {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.84rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.btn-cta-new:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(79, 70, 229, 0.45);
  filter: brightness(1.08);
}

.btn-pill-mobile {
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 0.45rem 0.85rem;
}

/* Statut de synchronisation & Clé API */
.sync-pill, .btn-api-pill {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  background: var(--bg-muted);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-api-pill:hover {
  background: var(--bg-surface-elevated);
  border-color: var(--primary);
  color: var(--text-primary);
}

.sync-dot, .api-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.sync-pill.offline .sync-dot, .api-dot.not-configured {
  background: var(--warning);
  box-shadow: 0 0 6px rgba(245, 158, 11, 0.6);
}

/* Boutons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.25);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(79, 70, 229, 0.35);
}

.btn-outline {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.btn-outline:hover {
  background: var(--bg-muted);
  border-color: var(--text-secondary);
}

.btn-secondary {
  background: var(--bg-muted);
  color: var(--text-secondary);
  border-color: var(--border-light);
}

.btn-secondary:hover {
  background: var(--border-light);
  color: var(--text-primary);
}

.btn-success {
  background: var(--success);
  color: #ffffff;
}

.btn-success:hover {
  background: var(--success-hover);
}

.btn-vinted {
  background: var(--vinted);
  color: #ffffff;
}

.btn-vinted:hover {
  background: #079aa2;
}

.btn-leboncoin {
  background: var(--leboncoin);
  color: #ffffff;
}

.btn-leboncoin:hover {
  background: #e25805;
}

/* Bouton IA Spécial */
.btn-ai {
  background: var(--ai-gradient);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
  border: none;
}

.btn-ai:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.45);
}

.btn-ai:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(0.5);
  transform: none;
  box-shadow: none;
}

.btn-ai-sparkle {
  font-size: 1.1rem;
  animation: sparkle-rotate 3s infinite linear;
}

@keyframes sparkle-rotate {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.15) rotate(180deg); }
  100% { transform: scale(1) rotate(360deg); }
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.18s ease;
}

.btn-icon:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}

body.theme-light .icon-sun { display: none; }
body.theme-light .icon-moon { display: inline-block; }
body.theme-dark .icon-sun { display: inline-block; }
body.theme-dark .icon-moon { display: none; }

/* Contenu Principal */
.main-content {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Dashboard KPIs */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.3rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.6rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.kpi-icon {
  font-size: 1.3rem;
}

.kpi-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.kpi-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.kpi-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-light);
}

.kpi-trend {
  font-weight: 500;
}

.alert-card {
  border-left: 4px solid var(--warning);
}

.alert-card:hover {
  border-color: var(--warning);
}

.alert-text {
  color: var(--warning);
}

.kpi-link {
  color: var(--warning);
  font-weight: 700;
}

.kpi-profit {
  border-left: 4px solid var(--success);
}

.profit-text {
  color: var(--success);
}

.kpi-badge-success {
  background: var(--success-light);
  color: var(--success);
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
}

/* Toolbar & Filtres */
.toolbar-section {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1.1rem;
  box-shadow: var(--shadow-sm);
}

.toolbar-container {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.status-tabs-wrapper {
  overflow-x: auto;
  padding: 0.2rem 0;
  scrollbar-width: none;
}

.status-tabs-wrapper::-webkit-scrollbar {
  display: none;
}

.status-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-muted);
  padding: 0.3rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  min-width: max-content;
}

.status-tab {
  background: transparent;
  border: none;
  padding: 0.38rem 0.85rem;
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.status-tab:hover {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
}

.status-tab.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.status-tab.tab-alert.active {
  background: var(--status-stale-bg);
  color: var(--status-stale);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15);
}

.tab-count {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-light);
}

.status-tab.active .tab-count {
  background: var(--primary);
  color: #ffffff;
  border-color: transparent;
}

.tab-count-alert {
  background: var(--warning-light);
  color: var(--warning);
}

.status-tab.tab-alert.active .tab-count-alert {
  background: var(--status-stale);
  color: #ffffff;
}

/* Recherche & Filtres Déroulants */
.search-sort-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.search-input-wrapper {
  flex: 1;
  min-width: 260px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 0.85rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-wrapper input {
  width: 100%;
  padding: 0.55rem 2.2rem 0.55rem 2.3rem;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.88rem;
  background: var(--bg-subtle);
  color: var(--text-primary);
  transition: all 0.18s ease;
}

.search-input-wrapper input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.clear-search-btn {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.2rem;
}

.filter-dropdowns {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.select-control {
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 500;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 0.18s ease;
}

.select-control:focus {
  outline: none;
  border-color: var(--primary);
}

/* Grille des Objets */
.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1.3rem;
}

/* Carte d'Objet */
.item-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
}

.item-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-medium);
}

.item-card.is-stale {
  border-color: rgba(245, 158, 11, 0.4);
}

/* Image de la carte */
.item-card-media {
  position: relative;
  width: 100%;
  height: 200px;
  background: var(--bg-muted);
  overflow: hidden;
}

.item-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.item-card:hover .item-card-img {
  transform: scale(1.03);
}

.item-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 2.5rem;
  background: linear-gradient(135deg, var(--bg-muted), var(--border-light));
}

.item-img-placeholder span {
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.3rem;
}

/* Badges Superposés sur l'Image */
.media-badges-top {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  pointer-events: none;
}

.badge-status {
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

.status-a-preparer {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.status-pret-a-publier {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
}

.status-publie {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.status-en-negociation {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fcd34d;
}

.status-vendu {
  background: #ede9fe;
  color: #6d28d9;
  border: 1px solid #c4b5fd;
}

.status-invendu {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.badge-platform {
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.platform-vinted {
  background: var(--vinted);
}

.platform-leboncoin {
  background: var(--leboncoin);
}

.platform-both {
  background: linear-gradient(90deg, var(--vinted) 50%, var(--leboncoin) 50%);
}

/* Alerte Invendu > 14 jours */
.stale-alert-pill {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  background: rgba(220, 38, 38, 0.95);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
  animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

/* Corps de la Carte */
.item-card-body {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.65rem;
}

.item-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.item-brand-left {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-brand-tag {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
}

.item-cat-bullet {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.item-category-label {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-condition-tag {
  background: var(--bg-muted);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  white-space: nowrap;
}

.item-card-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.item-notes-snippet {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.item-defect-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.73rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #b45309;
}

body.theme-dark .item-defect-badge {
  color: #fcd34d;
}

.item-tracking-row {
  margin: 0.2rem 0;
}

/* Indicateur de Finances Moderne */
.item-financial-modern, .item-financial-row {
  background: var(--bg-muted);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 0.6rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.fin-box-col, .fin-col {
  display: flex;
  flex-direction: column;
}

.fin-box-col.fin-box-main {
  text-align: center;
}

.fin-box-lbl, .fin-lbl {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-muted);
}

.fin-box-val, .fin-val {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.fin-box-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.fin-box-price.sold-price {
  color: var(--success);
}

.fin-profit-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.74rem;
  font-weight: 800;
  padding: 0.18rem 0.55rem;
  border-radius: var(--radius-full);
  background: var(--success-light);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.fin-profit-pill.is-sold {
  background: #ede9fe;
  color: #6d28d9;
  border-color: #c4b5fd;
}

/* Boutons de Copie Rapide */
.card-quick-copy-bar {
  display: flex;
  gap: 3px;
  width: 100%;
  background: var(--bg-muted);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
}

.btn-card-copy {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.38rem 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 7px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-secondary);
  font-family: inherit;
  white-space: nowrap;
}

.btn-card-copy:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.btn-card-copy-vinted:hover {
  background: #09b1ba;
  border-color: #09b1ba;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(9, 177, 186, 0.35);
}

.btn-card-copy-lbc:hover {
  background: #ff6e14;
  border-color: #ff6e14;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(255, 110, 20, 0.35);
}

.btn-card-copy-ebay:hover {
  background: #0064d2;
  border-color: #0064d2;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 100, 210, 0.35);
}

.btn-card-copy-etsy:hover {
  background: #f1641e;
  border-color: #f1641e;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(241, 100, 30, 0.35);
}

.btn-card-autofill:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

/* Checklist Compacte sur la carte */
.item-checklist-compact {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.checklist-compact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.progress-track-sm {
  width: 100%;
  height: 5px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill-sm {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.progress-fill-sm.is-complete {
  background: var(--success);
}

/* Actions de la Carte */
.item-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border-light);
  margin-top: auto;
}

.btn-generate {
  width: 100%;
  min-height: 40px;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.84rem;
  padding: 0.55rem 1rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

.btn-generate:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(79, 70, 229, 0.35);
}

.card-tools-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  width: 100%;
}

.card-pills-group {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.btn-card-pill, .btn-nego, .btn-boost, .btn-relist-item {
  padding: 0.32rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-card-pill:hover, .btn-nego:hover, .btn-boost:hover, .btn-relist-item:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.action-buttons-group, .card-icons-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.btn-card-action, .btn-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.15s ease;
}

.btn-card-action:hover, .btn-card-icon:hover {
  background: var(--bg-muted);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.btn-card-action.btn-mark-sold {
  color: var(--success);
  border-color: rgba(16, 185, 129, 0.3);
  background: var(--success-light);
}

.btn-card-action.btn-delete:hover {
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.4);
  background: var(--danger-light);
}

/* État vide */
.empty-state {
  background: var(--bg-surface);
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-xl);
  padding: 3.5rem 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: 550px;
  margin: 2rem auto;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.empty-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.empty-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 400px;
}

.empty-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ==========================================================================
   Modaux & Dialogues
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  overflow-y: auto;
}

.modal-dialog {
  background: var(--bg-surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modal-enter 0.22s ease-out;
}

@keyframes modal-enter {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-sm { max-width: 460px; }
.modal-md { max-width: 680px; }
.modal-lg { max-width: 920px; }

.modal-header {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
}

.modal-badge-sup {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--ai-primary);
  letter-spacing: 0.05em;
}

.modal-title {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.modal-meta-row {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.modal-close-btn,
.modal-close {
  background: var(--bg-muted);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.modal-close-btn:hover,
.modal-close:hover {
  background: var(--border-light);
  color: var(--text-primary);
}

/* Onglets des Modales (Génération & Authentification) */
.modal-tabs {
  display: flex;
  background: var(--bg-muted);
  border-bottom: 1px solid var(--border-light);
  padding: 0.4rem 1.5rem 0;
  gap: 0.4rem;
  overflow-x: auto;
  overflow-y: hidden !important;
  flex-shrink: 0;
  min-height: 48px;
  scrollbar-width: none;
}

.modal-tabs::-webkit-scrollbar {
  display: none;
}

.modal-tab {
  background: transparent;
  border: none;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
}

.modal-tab:hover {
  color: var(--text-primary);
}

.modal-tab.active {
  color: var(--primary);
  background: var(--bg-surface);
  border-bottom-color: var(--primary);
}

.tab-platform-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-vinted { background: var(--vinted); }
.dot-leboncoin { background: var(--leboncoin); }

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.tab-pane {
  display: none;
  flex-direction: column;
  gap: 1.2rem;
}

.tab-pane.active {
  display: flex;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-light);
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* Animation douce de rappel de focus modal si clic en dehors */
@keyframes modal-shake {
  0%, 100% { transform: scale(1) translateX(0); }
  20%, 60% { transform: scale(1.008) translateX(-5px); }
  40%, 80% { transform: scale(1.008) translateX(5px); }
}

.modal-dialog.modal-shake {
  animation: modal-shake 0.3s ease-in-out;
}

.tip-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Boîtes de Copie dans le Studio */
.platform-banner {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.banner-vinted {
  background: var(--vinted-light);
  border: 1px solid rgba(9, 177, 186, 0.3);
  color: #065e63;
}

body.theme-dark .banner-vinted {
  color: #67e8f9;
}

.banner-leboncoin {
  background: var(--leboncoin-light);
  border: 1px solid rgba(255, 110, 20, 0.3);
  color: #9a3412;
}

body.theme-dark .banner-leboncoin {
  color: #fdba74;
}

.banner-ebay {
  background: rgba(229, 50, 43, 0.08);
  border: 1px solid rgba(229, 50, 43, 0.3);
  color: #991b1b;
}

body.theme-dark .banner-ebay {
  color: #fca5a5;
}

.banner-etsy {
  background: rgba(241, 100, 30, 0.08);
  border: 1px solid rgba(241, 100, 30, 0.3);
  color: #9a3412;
}

body.theme-dark .banner-etsy {
  color: #fdba74;
}

.dot-ebay {
  background: #e5322b !important;
}

.dot-etsy {
  background: #f1641e !important;
}

.platform-banner-text {
  font-size: 0.84rem;
  flex: 1;
}

.gen-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.gen-field-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gen-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.char-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: none;
}

.btn-copy-chip {
  background: var(--bg-muted);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.6rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
}

.btn-copy-chip:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.copy-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-primary);
  user-select: text;
  white-space: pre-wrap;
  word-break: break-word;
  transition: border-color 0.18s ease;
}

.copy-box:focus-within, .copy-box:hover {
  border-color: var(--primary);
}

.code-style {
  font-weight: 600;
  background: var(--bg-muted);
}

.multiline-box {
  min-height: 140px;
}

.hashtags-box {
  color: var(--primary);
  font-weight: 600;
}

/* Grille des 3 Prix */
.pricing-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
}

.pricing-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  text-align: center;
  position: relative;
  transition: all 0.2s ease;
}

.pricing-card.highlighted-card {
  border: 2px solid var(--primary);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.18);
  transform: translateY(-2px);
}

.pricing-badge {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  display: inline-block;
  margin: 0 auto;
}

.badge-quick { background: var(--warning-light); color: var(--warning); }
.badge-realistic { background: var(--primary-light); color: var(--primary); }
.badge-max { background: var(--vinted-light); color: var(--vinted); }

.pricing-amount {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

.pricing-delay {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.pricing-justif {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  min-height: 50px;
}

.pricing-margin-est {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--success);
  background: var(--success-light);
  padding: 0.35rem;
  border-radius: var(--radius-sm);
}

.current-price-banner {
  background: var(--bg-muted);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.1rem;
  font-size: 0.88rem;
  text-align: center;
}

/* Checklist avant publication */
.checklist-header-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.checklist-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 700;
}

.checklist-status-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  background: var(--warning-light);
  color: var(--warning);
}

.checklist-status-badge.is-complete {
  background: var(--success-light);
  color: var(--success);
}

.progress-bar-track {
  width: 100%;
  height: 8px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--success));
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.checklist-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.checklist-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.checklist-item-row {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.checklist-item-row:hover {
  background: var(--bg-subtle);
  border-color: var(--border-medium);
}

.checklist-item-row.is-checked {
  background: var(--success-light);
  border-color: rgba(16, 185, 129, 0.4);
}

.checklist-checkbox-input {
  width: 20px;
  height: 20px;
  accent-color: var(--success);
  margin-top: 0.15rem;
  cursor: pointer;
}

.checklist-item-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.checklist-item-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.checklist-item-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Gestion des Photos Multiples & Panneau IA Gemini
   ========================================================================== */

.photos-manager-section {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.photos-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.photos-counter-pill {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  margin-left: 0.5rem;
}

.photos-hint-text {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.85rem;
  margin-top: 0.4rem;
}

.photo-card-item {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--border-light);
  background: var(--bg-surface);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.photo-card-item.is-cover {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.photo-card-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-orientation: from-image;
}

.photo-order-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(15, 23, 42, 0.8);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.photo-card-item.is-cover .photo-order-badge {
  background: var(--primary);
}

.photo-card-controls {
  position: absolute;
  bottom: 0;
  inset-x: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  padding: 0.4rem 0.3rem 0.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  opacity: 0.95;
}

.photo-ctrl-btn {
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.photo-ctrl-btn:hover {
  background: #ffffff;
}

.photo-ctrl-btn.btn-photo-del {
  background: rgba(239, 68, 68, 0.9);
  color: #ffffff;
}

.photo-ctrl-btn.btn-photo-del:hover {
  background: #ef4444;
}

/* Panneau de déclenchement IA */
.ai-trigger-panel {
  background: var(--bg-surface);
  border: 1px solid rgba(139, 92, 246, 0.35);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.08);
}

.ai-trigger-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.ai-pill-badge {
  background: var(--ai-gradient);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.ai-trigger-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.ai-inputs-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.ai-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ai-input-group.flex-1 {
  flex: 1;
  min-width: 240px;
}

.ai-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.select-sm, .input-sm {
  padding: 0.45rem 0.65rem;
  font-size: 0.82rem;
}

.ai-action-buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.3rem;
}

.privacy-note {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Carte des Résultats d'Analyse IA */
.ai-results-card {
  background: var(--bg-surface);
  border: 2px solid var(--ai-primary);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.15);
  animation: modal-enter 0.25s ease-out;
}

.ai-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.75rem;
}

.ai-badge-success {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--ai-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ai-results-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
}

/* Synthèse des Caractéristiques */
.ai-ident-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ai-chip {
  background: var(--bg-muted);
  border: 1px solid var(--border-medium);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-primary);
}

.ai-chip strong {
  color: var(--primary);
  margin-right: 0.25rem;
}

/* Blocs Défauts & Photos suggérées */
.ai-defects-block, .ai-photo-suggestions-block, .ai-pricing-block {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ai-block-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.ai-defects-list, .ai-suggested-photos-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ai-defect-item, .ai-suggested-photo-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.84rem;
  background: var(--bg-surface);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

.defect-severity-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  margin-left: auto;
}

.severity-mineur { background: var(--warning-light); color: var(--warning); }
.severity-moyen { background: #fed7aa; color: #c2410c; }
.severity-important { background: var(--danger-light); color: var(--danger); }

.ai-honest-note, .ai-market-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Mini Grille des Prix IA */
.ai-pricing-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.ai-mini-price-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.mini-price-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
}

.mini-price-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.mini-price-margin {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--success);
}

.ai-regenerate-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding-top: 0.4rem;
  border-top: 1px dashed var(--border-light);
}

.ai-regenerate-row input {
  flex: 1;
}

/* Modal de Progression de l'IA */
.modal-progress-backdrop {
  z-index: 5500;
}

.progress-dialog {
  text-align: center;
  padding: 2.2rem 1.8rem;
  align-items: center;
  gap: 1rem;
}

.progress-animation-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
}

.ai-orb {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--ai-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.6);
  animation: pulse-orb 2s infinite ease-in-out;
}

@keyframes pulse-orb {
  0% { transform: scale(0.95); box-shadow: 0 0 15px rgba(139, 92, 246, 0.4); }
  50% { transform: scale(1.06); box-shadow: 0 0 35px rgba(6, 182, 212, 0.8); }
  100% { transform: scale(0.95); box-shadow: 0 0 15px rgba(139, 92, 246, 0.4); }
}

.progress-title {
  font-size: 1.25rem;
  font-weight: 800;
}

.progress-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 320px;
}

.progress-steps-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  background: var(--bg-muted);
  padding: 0.9rem;
  border-radius: var(--radius-md);
  margin-top: 0.5rem;
}

.progress-step-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.progress-step-item.active {
  color: var(--primary);
  font-weight: 700;
}

.progress-step-item.done {
  color: var(--success);
}

.api-key-status-box {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--bg-muted);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.api-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--warning);
}

.api-status-dot.configured {
  background: var(--success);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.api-help-box {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: var(--primary-light);
  border: 1px solid rgba(79, 70, 229, 0.25);
  border-radius: var(--radius-md);
  padding: 0.8rem;
  font-size: 0.82rem;
  color: var(--primary);
}

.api-help-box a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
}

/* Fournisseurs IA (OpenAI, Gemini & Perplexity) */
.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 0.5rem;
}

@media (max-width: 640px) {
  .provider-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.provider-card {
  cursor: pointer;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.4rem;
  background: var(--bg-surface);
  text-align: center;
  transition: all var(--transition-fast);
  display: block;
}

.provider-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.provider-card.active {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 1px var(--primary);
}

.provider-card-content .provider-icon {
  font-size: 1.35rem;
  display: block;
  margin-bottom: 0.2rem;
}

.provider-card-content .provider-name {
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text-primary);
}

.provider-card-content .provider-desc {
  font-size: 0.65rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.api-badge.configured {
  background: rgba(16, 185, 129, 0.15) !important;
  color: var(--success) !important;
  font-weight: 700;
}

/* ==========================================================================
   Formulaires (Ajouter / Modifier)
   ========================================================================== */

.modal-form {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.form-body {
  gap: 1.1rem;
}

.form-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-row {
  display: grid;
  gap: 1rem;
}

.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }

.form-span-2 { grid-column: span 2; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.form-label.required::after {
  content: " *";
  color: var(--danger);
}

.form-input, .form-select, .form-textarea {
  font-family: inherit;
  font-size: 0.88rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-medium);
  background: var(--bg-surface);
  color: var(--text-primary);
  transition: all 0.18s ease;
  width: 100%;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.font-bold { font-weight: 700; }
.font-mono { font-family: var(--font-mono); }

.photo-upload-zone {
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1.3rem 1rem;
  text-align: center;
  background: var(--bg-surface);
  cursor: pointer;
  transition: all 0.2s ease;
}

.photo-upload-zone:hover, .photo-upload-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.photo-drop-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.photo-drop-icon {
  font-size: 2rem;
}

.photo-drop-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.photo-drop-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.flex-checkboxes {
  justify-content: flex-end;
}

.checkbox-options {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding-top: 0.4rem;
}

.custom-checkbox {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

/* Modal Vendu & Finances */
.financial-summary-box {
  background: var(--bg-muted);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-light);
}

.fin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
}

.tip-inline {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: normal;
}

.profit-calc-live-card {
  background: var(--success-light);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.calc-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #065f46;
  text-transform: uppercase;
}

.calc-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--success);
  letter-spacing: -0.03em;
}

.calc-margin {
  font-size: 0.85rem;
  font-weight: 700;
  color: #065f46;
}

/* Toasts */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 6000;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.toast {
  background: #0f172a;
  color: #ffffff;
  padding: 0.75rem 1.2rem;
  border-radius: var(--radius-lg);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  pointer-events: auto;
  animation: toast-in 0.25s ease-out;
  border: 1px solid #334155;
  max-width: 380px;
}

.toast.toast-success {
  border-left: 4px solid var(--success);
}

.toast.toast-vinted {
  border-left: 4px solid var(--vinted);
}

.toast.toast-leboncoin {
  border-left: 4px solid var(--leboncoin);
}

.toast.toast-ai {
  border-left: 4px solid var(--ai-primary);
}

.toast.toast-danger {
  border-left: 4px solid var(--danger);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Mobile */
@media (max-width: 768px) {
  .header-container {
    padding: 0.75rem 1rem;
  }

  .brand-subtitle {
    display: none;
  }

  .main-content {
    padding: 1rem;
    gap: 1.1rem;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .kpi-card {
    padding: 0.9rem;
  }

  .kpi-value {
    font-size: 1.4rem;
  }

  .form-row-2, .form-row-3 {
    grid-template-columns: 1fr;
  }

  .form-span-2 {
    grid-column: span 1;
  }

  .search-sort-group {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-dropdowns {
    width: 100%;
  }

  .select-control {
    flex: 1;
  }

  .items-grid {
    grid-template-columns: 1fr;
  }

  .modal-dialog {
    max-height: 96vh;
    border-radius: var(--radius-lg);
  }

  .pricing-cards-grid {
    grid-template-columns: 1fr;
  }

  .photo-preview-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================================
   NOUVELLES FONCTIONNALITÉS v3 — Négo, Réponses, Boost, Analytics
   ============================================================ */

/* --- Négo Copilote --- */
.nego-rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1rem;
  width: 100%;
  justify-content: center;
}
.nego-rating-excellent { background: var(--success-light, #e6f9f0); color: var(--success, #16a34a); }
.nego-rating-ok        { background: #fff9e6; color: #b45309; }
.nego-rating-low       { background: var(--danger-light, #fef2f2); color: var(--danger, #dc2626); }

.nego-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.nego-counter-card {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.nego-counter-card:hover { border-color: var(--primary); background: var(--primary-light, #eff6ff); }
.nego-counter-card .nc-label { font-size: 0.72rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
.nego-counter-card .nc-price { font-size: 1.3rem; font-weight: 800; color: var(--text-primary); }
.nego-counter-card .nc-desc  { font-size: 0.75rem; color: var(--text-secondary); margin-top: 0.25rem; }
.nego-counter-card.nc-selected { border-color: var(--primary); background: var(--primary-light, #eff6ff); }

/* --- Réponses Types --- */
.replies-list { display: flex; flex-direction: column; gap: 0.75rem; }
.reply-card {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.reply-card:hover { border-color: var(--primary); background: var(--primary-light, #eff6ff); }
.reply-card-title { font-weight: 700; font-size: 0.9rem; color: var(--text-primary); margin-bottom: 0.4rem; display: flex; align-items: center; gap: 0.5rem; }
.reply-card-preview { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.reply-card-copy { position: absolute; top: 0.75rem; right: 0.75rem; font-size: 0.8rem; }
.reply-category-badge { font-size: 0.7rem; padding: 0.15rem 0.5rem; border-radius: 1rem; background: var(--primary-light, #eff6ff); color: var(--primary); font-weight: 600; }

/* --- Booster Invendus --- */
.btn-group-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem; }
.boost-pct-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.boost-price-preview {
  background: linear-gradient(135deg, var(--primary-light, #eff6ff), var(--bg-muted));
  border: 1.5px solid var(--primary);
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  margin: 0.75rem 0;
}
.boost-price-preview .old-price { text-decoration: line-through; color: var(--text-secondary); font-size: 0.95rem; }
.boost-price-preview .new-price { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.boost-price-preview .discount-badge { display: inline-block; background: var(--danger); color: #fff; border-radius: 1rem; padding: 0.15rem 0.6rem; font-size: 0.8rem; font-weight: 700; margin-left: 0.5rem; }

.boost-tabs { display: flex; gap: 0.5rem; margin-bottom: 1rem; border-bottom: 2px solid var(--border); }
.boost-tab { background: none; border: none; padding: 0.5rem 1rem; font-size: 0.9rem; font-weight: 600; color: var(--text-secondary); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.boost-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.boost-pane { display: block; }

/* --- Analytics & Centre de données --- */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.analytics-kpi {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
}
.analytics-kpi .ak-label { font-size: 0.75rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; }
.analytics-kpi .ak-value { font-size: 1.5rem; font-weight: 800; color: var(--primary); margin: 0.25rem 0; }
.analytics-kpi .ak-sub   { font-size: 0.8rem; color: var(--text-secondary); }

.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.chart-card { background: var(--bg-muted); border: 1px solid var(--border); border-radius: 0.75rem; padding: 1rem; }
.chart-card.chart-full { grid-column: 1 / -1; }
.chart-title { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); margin-bottom: 1rem; }

.bar-chart-container { display: flex; flex-direction: column; gap: 0.5rem; }
.bar-row { display: flex; align-items: center; gap: 0.75rem; font-size: 0.8rem; }
.bar-label { flex: 0 0 110px; text-align: right; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { flex: 1; background: var(--border); border-radius: 1rem; height: 1.1rem; overflow: hidden; }
.bar-fill  { height: 100%; border-radius: 1rem; background: linear-gradient(90deg, var(--primary), #818cf8); transition: width 0.6s cubic-bezier(.4,0,.2,1); }
.bar-fill.bar-profit { background: linear-gradient(90deg, #16a34a, #4ade80); }
.bar-fill.bar-platform { background: linear-gradient(90deg, #7c3aed, #c084fc); }
.bar-fill.bar-delay { background: linear-gradient(90deg, #d97706, #fbbf24); }
.bar-value { flex: 0 0 50px; text-align: left; font-weight: 700; color: var(--text-primary); }

/* --- Sauvegarde / Restauration --- */
.backup-section { padding: 1rem 0; }
.backup-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.75rem; }
.restore-preview-box { background: var(--bg-muted); border: 1.5px solid var(--border); border-radius: 0.75rem; padding: 1rem; font-size: 0.85rem; }

/* --- Suivi Expédition --- */
.shipping-list { display: flex; flex-direction: column; gap: 0.75rem; }
.shipping-item {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.shipping-item-info { flex: 1; min-width: 0; }
.shipping-item-title { font-weight: 700; font-size: 0.9rem; color: var(--text-primary); margin-bottom: 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shipping-item-meta  { font-size: 0.8rem; color: var(--text-secondary); }
.shipping-tracking   { display: flex; gap: 0.5rem; align-items: center; margin-top: 0.5rem; }
.shipping-tracking input { flex: 1; font-size: 0.85rem; padding: 0.35rem 0.6rem; border: 1px solid var(--border); border-radius: 0.4rem; background: var(--bg-card); color: var(--text-primary); }
.tracking-link-btn { font-size: 0.8rem; padding: 0.35rem 0.6rem; }

/* Bouton Négo dans les cartes article */
.btn-nego { background: linear-gradient(135deg, #7c3aed, #9333ea); color: #fff; border: none; }
.btn-nego:hover { background: linear-gradient(135deg, #6d28d9, #7e22ce); }
.btn-boost { background: linear-gradient(135deg, #d97706, #f59e0b); color: #fff; border: none; }
.btn-boost:hover { background: linear-gradient(135deg, #b45309, #d97706); }

/* Checklist anti-litige */
.litige-checklist { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.75rem; }
.litige-item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--text-secondary); }
.litige-item input[type=checkbox]:checked + span { color: var(--success); text-decoration: line-through; }

/* Modal taille medium */
.modal-md { max-width: 580px; }

@media (max-width: 640px) {
  .nego-grid { grid-template-columns: 1fr; }
  .chart-row { grid-template-columns: 1fr; }
  .analytics-grid { grid-template-columns: 1fr 1fr; }
}

/* ==========================================================================
   NOUVELLES FONCTIONNALITÉS : 5 QUICK WINS
   ========================================================================== */

/* --- 1. BOUTONS DE COPIE RAPIDE 1-CLIC SUR CARTE --- */
.card-quick-copy-bar {
  display: flex;
  gap: 0.4rem;
  margin: 0.6rem 0 0.4rem 0;
}
.btn-card-copy {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.38rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}
.btn-card-copy-vinted {
  background: rgba(14, 165, 233, 0.12);
  color: #0284c7;
  border-color: rgba(14, 165, 233, 0.25);
}
.btn-card-copy-vinted:hover {
  background: #0284c7;
  color: #ffffff;
}
.btn-card-copy-lbc {
  background: rgba(249, 115, 22, 0.12);
  color: #ea580c;
  border-color: rgba(249, 115, 22, 0.25);
}
.btn-card-copy-lbc:hover {
  background: #ea580c;
  color: #ffffff;
}
.btn-card-copy.btn-copied-pulse {
  background: #10b981 !important;
  color: #ffffff !important;
  border-color: #10b981 !important;
  transform: scale(1.02);
}

/* --- 2. MISE EN VALEUR MARQUANTE DES ARTICLES VENDUS --- */
.item-card.is-sold {
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.08);
}
.item-card.is-sold .item-card-img {
  filter: saturate(0.85) contrast(0.95);
  transition: filter 0.25s ease;
}
.item-card.is-sold:hover .item-card-img {
  filter: saturate(1.05) contrast(1);
}
.sold-watermark-ribbon {
  position: absolute;
  top: 14px;
  right: -32px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  font-weight: 900;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  padding: 0.35rem 2.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 10;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  pointer-events: none;
}
.sold-pill-badge {
  background: rgba(16, 185, 129, 0.16);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-full);
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.badge-status-sold {
  background: #10b981 !important;
  color: #ffffff !important;
}

/* --- 4. ANALYSE DE MARCHÉ EN DIRECT (PERPLEXITY & WEB) --- */
.market-live-card {
  margin-top: 1.25rem;
  background: var(--bg-muted);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
}
.market-live-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.market-live-title-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.live-pulse-dot {
  width: 10px;
  height: 10px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: livePulse 1.8s infinite;
}
@keyframes livePulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.market-live-heading {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}
.market-live-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  margin-bottom: 0.75rem;
}
.market-live-loading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-top: 0.75rem;
}
.market-live-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.6rem;
  margin: 0.85rem 0;
}
.market-stat-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.market-stat-pill.highlighted {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.06);
}
.market-stat-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}
.market-stat-val {
  font-size: 1.1rem;
  font-weight: 800;
}
.market-live-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.market-live-text {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0.5rem 0;
}
.market-live-reco {
  background: rgba(99, 102, 241, 0.08);
  border-left: 3px solid var(--primary);
  padding: 0.6rem 0.85rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.82rem;
  color: var(--text-primary);
  margin: 0.6rem 0;
}
.market-listings-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 0.75rem 0 0.4rem 0;
}
.market-listings-table {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 180px;
  overflow-y: auto;
}
.market-listing-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  font-size: 0.78rem;
}
.platform-tag {
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}
.platform-vinted { background: #0ea5e9; color: #fff; }
.platform-leboncoin { background: #f97316; color: #fff; }
.platform-ebay { background: #eab308; color: #1e293b; }
.market-listing-name {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
  font-weight: 600;
}
.market-listing-cond {
  color: var(--text-muted);
  font-size: 0.72rem;
}
.market-listing-price {
  font-weight: 800;
  color: var(--success);
}
.market-apply-row {
  margin-top: 0.85rem;
}

/* --- 5. STYLES D'IMPRESSION & EXPORT PDF --- */
@media print {
  body {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 11pt !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .app-shell, .app-header, .app-sidebar, .dashboard-kpis, .filter-section, .items-section,
  .modal-backdrop, .toast-container, .theme-toggle-btn {
    display: none !important;
  }
  #printableSalesSheet, .printable-sheet {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .print-page {
    page-break-after: always;
    padding: 1.5cm;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  }
  .print-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #0f172a;
    padding-bottom: 0.8cm;
    margin-bottom: 0.8cm;
  }
  .print-logo {
    font-size: 20pt;
    font-weight: 800;
    color: #4f46e5;
    display: block;
  }
  .print-sub {
    font-size: 10pt;
    color: #64748b;
  }
  .print-meta-right {
    font-size: 9pt;
    text-align: right;
    color: #334155;
    line-height: 1.5;
  }
  .print-hero-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1.2cm;
    margin-bottom: 0.8cm;
  }
  .print-photo {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
  }
  .print-no-photo {
    width: 180px;
    height: 180px;
    background: #f1f5f9;
    border: 1px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 10pt;
  }
  .print-title {
    font-size: 16pt;
    font-weight: 800;
    margin: 0 0 0.4cm 0;
    color: #0f172a;
  }
  .print-specs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9.5pt;
    margin-bottom: 0.4cm;
  }
  .print-specs-table th {
    text-align: left;
    width: 35%;
    padding: 3px 6px;
    color: #64748b;
    font-weight: 600;
    border-bottom: 1px solid #f1f5f9;
  }
  .print-specs-table td {
    padding: 3px 6px;
    color: #0f172a;
    border-bottom: 1px solid #f1f5f9;
  }
  .print-finance-strip {
    display: flex;
    gap: 0.4cm;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 6px 12px;
    margin-top: 0.4cm;
  }
  .p-fin-box {
    display: flex;
    flex-direction: column;
  }
  .p-lbl {
    font-size: 7.5pt;
    text-transform: uppercase;
    color: #64748b;
  }
  .p-val {
    font-size: 11pt;
    font-weight: 800;
    color: #0f172a;
  }
  .p-val.highlight { color: #4f46e5; }
  .p-val.gain { color: #059669; }
  .print-listings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8cm;
    margin-top: 0.8cm;
  }
  .print-listing-block {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0.6cm;
  }
  .print-listing-header {
    font-size: 10pt;
    font-weight: 800;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 4px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
  }
  .print-listing-title {
    font-size: 10pt;
    font-weight: 700;
    margin-bottom: 6px;
    color: #0f172a;
  }
  .print-listing-body {
    font-size: 8.5pt;
    line-height: 1.4;
    color: #334155;
    margin-bottom: 6px;
  }
  .print-listing-tags {
    font-size: 8pt;
    color: #4f46e5;
    font-style: italic;
  }
  .print-footer {
    position: fixed;
    bottom: 0.8cm;
    left: 1.5cm;
    right: 1.5cm;
    display: flex;
    justify-content: space-between;
    font-size: 7.5pt;
    color: #94a3b8;
    border-top: 1px solid #e2e8f0;
    padding-top: 4px;
  }
}

/* ============================================================
   GESTION DES COMPTES UTILISATEURS & ESPACES DE SUIVI (v2)
   ============================================================ */

/* --- Widget Header Utilisateur --- */
.user-account-widget {
  position: relative;
  display: inline-block;
  z-index: 1050;
}

.btn-user-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  padding: 0.35rem 0.75rem 0.35rem 0.45rem;
  border-radius: 2rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-primary);
  font-family: inherit;
  box-shadow: var(--shadow-sm);
}

.btn-user-pill:hover {
  border-color: var(--primary);
  background: var(--bg-hover, var(--bg-muted));
  transform: translateY(-1px);
}

.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 50%;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.12);
}

.user-pill-texts {
  display: flex;
  flex-direction: column;
  text-align: left;
  line-height: 1.15;
}

.user-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.user-shop {
  font-size: 0.7rem;
  color: var(--text-secondary);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-arrow {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-left: 0.15rem;
  transition: transform 0.2s;
}

/* --- Menu Déroulant Utilisateur --- */
.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: auto;
  width: 290px;
  max-width: min(290px, calc(100vw - 2rem));
  max-height: calc(100vh - 6.5rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  background: var(--bg-surface-elevated, #ffffff);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 1rem;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.08);
  padding: 0.75rem;
  z-index: 2500;
  animation: dropdownFadeIn 0.18s ease-out;
}

body.theme-dark .user-dropdown-menu,
body.theme-dark .tools-dropdown-menu {
  background: var(--bg-surface-elevated, #1f2937);
  border-color: var(--border-light, #334155);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

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

.user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.4rem 0.65rem;
}

.dropdown-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  border-radius: 50%;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.dropdown-user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dropdown-user-info strong {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.dropdown-shop-name {
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-user-email {
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-divider {
  height: 1px;
  background: var(--border-light, #e2e8f0);
  margin: 0.5rem 0;
}

.user-dropdown-section-title {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 0.2rem 0.4rem;
}

.user-quick-switchers {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0.3rem 0;
}

.quick-switch-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.45rem 0.6rem;
  border-radius: 0.6rem;
  background: var(--bg-muted);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all 0.15s;
}

.quick-switch-item:hover {
  background: var(--primary-light, #eff6ff);
  border-color: var(--primary);
}

.quick-switch-item.active {
  background: var(--primary-light, #eff6ff);
  border-color: var(--primary);
  font-weight: 700;
}

.quick-switch-avatar {
  font-size: 1.1rem;
}

.quick-switch-texts {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  overflow: hidden;
}

.quick-switch-name {
  font-size: 0.82rem;
  color: var(--text-primary);
}

.quick-switch-shop {
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 0.6rem;
  border-radius: 0.5rem;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.84rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background 0.15s;
}

.user-dropdown-item:hover {
  background: var(--bg-muted);
}

.user-dropdown-item.item-danger {
  color: var(--danger, #ef4444);
}

.user-dropdown-item.item-danger:hover {
  background: var(--danger-light, #fef2f2);
}

.dropdown-item-icon {
  font-size: 1rem;
}

/* --- Bannière Espace de Suivi --- */
.workspace-banner {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 40%, #4338ca 100%);
  color: #ffffff;
  border-radius: 1rem;
  padding: 1.25rem 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 24px rgba(49, 46, 129, 0.22);
  position: relative;
  z-index: 0;
}

.workspace-banner-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.workspace-banner-left {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.workspace-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border-radius: 1rem;
  font-size: 1.8rem;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.workspace-details {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.workspace-title-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.workspace-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.workspace-badge {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #e0e7ff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.6rem;
  border-radius: 2rem;
  letter-spacing: 0.04em;
}

.workspace-subtitle {
  margin: 0;
  font-size: 0.85rem;
  color: #c7d2fe;
}

.workspace-banner-actions {
  display: flex;
  gap: 0.6rem;
}

.btn-outline-white {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(4px);
  font-weight: 600;
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.26);
  border-color: #ffffff;
  color: #ffffff;
}

.btn-workspace-primary {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
  transition: all 0.2s ease;
}

.btn-workspace-primary:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.45);
}

/* ==========================================================================
   HERO STUDIO IA VENDIKO (SHOWCASE COMMERCIAL HAUTE CONVERSION)
   ========================================================================== */
.hero-ia-showcase {
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.96) 0%, rgba(49, 46, 129, 0.94) 50%, rgba(67, 56, 202, 0.96) 100%);
  border-radius: var(--radius-xl, 1.25rem);
  padding: 2rem 2.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 14px 38px rgba(49, 46, 129, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.14) inset;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.hero-ia-showcase::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.24) 0%, rgba(99, 102, 241, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.hero-ia-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 9999px;
  padding: 4px 14px 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fef3c7;
  backdrop-filter: blur(8px);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.hero-badge-pill {
  background: #f59e0b;
  color: #1e1b4b;
  border-radius: 9999px;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-ia-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 2rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-ia-title {
  font-size: clamp(1.4rem, 2.5vw, 2.05rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.85rem 0;
  color: #ffffff;
}

.text-gradient-amber {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #f97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-ia-description {
  font-size: 0.92rem;
  line-height: 1.55;
  color: #e0e7ff;
  margin: 0 0 1.4rem 0;
  max-width: 620px;
}

.hero-ia-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.btn-hero-cta {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #fbbf24 100%) !important;
  color: #1e1b4b !important;
  border: none !important;
  padding: 0.75rem 1.4rem !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 8px 22px rgba(245, 158, 11, 0.42) !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 12px !important;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.58) !important;
}

.btn-cta-icon {
  font-size: 1.5rem;
}

.btn-cta-texts {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.btn-cta-texts strong {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
}

.btn-cta-texts small {
  font-size: 0.72rem;
  opacity: 0.88;
  font-weight: 500;
}

.btn-hero-secondary {
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(8px);
  padding: 0.65rem 1.15rem !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  border-radius: var(--radius-md) !important;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.22) !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
}

.hero-ia-pills-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stat-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #c7d2fe;
}

.hero-stat-pill strong {
  color: #ffffff;
}

/* Carte Interactive Démo IA */
.hero-ia-interactive-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.hero-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  font-size: 0.75rem;
}

.hero-card-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #10b981;
  font-weight: 700;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 1.8s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.hero-card-tag {
  background: rgba(99, 102, 241, 0.35);
  color: #c7d2fe;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.7rem;
}

.hero-preview-item {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.hero-preview-badge-ai {
  display: inline-block;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(5, 150, 105, 0.22));
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.45);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.hero-preview-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.hero-preview-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.pill-tag {
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.12);
  color: #e0e7ff;
  padding: 2px 6px;
  border-radius: 3px;
}

.hero-preview-desc {
  font-size: 0.76rem;
  color: #cbd5e1;
  font-style: italic;
  line-height: 1.4;
  margin: 0 0 10px 0;
}

.hero-preview-pricing-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  text-align: center;
}

.price-mini-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 4px 6px;
}

.price-mini-box small {
  display: block;
  font-size: 0.64rem;
  color: #94a3b8;
}

.price-mini-box strong {
  font-size: 0.82rem;
  color: #ffffff;
}

.price-mini-box.active-rec {
  background: rgba(245, 158, 11, 0.25);
  border-color: #f59e0b;
}

.price-mini-box.active-rec small {
  color: #fde68a;
  font-weight: 700;
}

.price-mini-box.active-rec strong {
  color: #fbbf24;
  font-weight: 800;
}

/* Volet Discret Conformité Fiscale (Non intrusif) */
.discreet-fiscal-bar {
  margin-top: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

@media (max-width: 900px) {
  .hero-ia-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ==========================================================================
   BANNIÈRE SUPER-POUVOIRS VENDIKO (SHOWCASE COMPÉTITIF)
   ========================================================================== */
.superpowers-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.4rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.superpowers-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 35%, #10b981 70%, #f59e0b 100%);
}

.superpowers-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.superpowers-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.superpowers-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.16), rgba(139, 92, 246, 0.16));
  border: 1px solid rgba(99, 102, 241, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.superpowers-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  margin: 0;
}

.superpowers-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.btn-superpowers-toggle {
  background: var(--bg-muted);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.btn-superpowers-toggle:hover {
  background: var(--border-light);
  color: var(--text-primary);
  transform: scale(1.05);
}

.superpowers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
  transition: all 0.3s ease;
}

.superpower-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem;
  border-radius: var(--radius-md);
  background: var(--bg-muted);
  border: 1px solid var(--border-light);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.superpower-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-medium);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.superpower-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.superpower-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.superpower-body strong {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-primary);
}

.superpower-body p {
  font-size: 0.76rem;
  color: var(--text-secondary);
  line-height: 1.35;
  margin: 0;
}

/* --- Modals d'Authentification & Paramètres --- */
#authModal .modal-dialog {
  max-width: 520px;
  max-height: 90vh;
}

#authModal .modal-header {
  flex-shrink: 0;
  padding: 1.1rem 1.4rem;
}

#authModal .modal-tabs {
  background: var(--bg-muted, #f8fafc);
  border-bottom: 1px solid var(--border-light, #e2e8f0);
  padding: 0.5rem 1.25rem 0;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden !important;
  flex-shrink: 0;
  min-height: 48px;
  align-items: flex-end;
}

#authModal .modal-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.2;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

#authModal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
}

#authModal .modal-footer {
  flex-shrink: 0;
  padding: 0.85rem 1.5rem;
}

.auth-pane {
  padding-top: 0.5rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-error-msg {
  padding: 0.6rem 0.85rem;
  background: var(--danger-light, #fef2f2);
  border: 1px solid var(--danger, #ef4444);
  color: var(--danger, #dc2626);
  font-size: 0.82rem;
  border-radius: 0.5rem;
  font-weight: 600;
}

.auth-success-msg {
  padding: 0.6rem 0.85rem;
  background: var(--success-light, #ecfdf5);
  border: 1px solid var(--success, #10b981);
  color: var(--success, #059669);
  font-size: 0.82rem;
  border-radius: 0.5rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.btn-block {
  width: 100%;
  justify-content: center;
  padding: 0.75rem;
  font-size: 0.95rem;
}

.auth-demo-divider {
  position: relative;
  text-align: center;
  margin: 1.5rem 0 1rem;
}

.auth-demo-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border);
  z-index: 1;
}

.auth-demo-divider span {
  position: relative;
  z-index: 2;
  background: var(--bg-card);
  padding: 0 0.75rem;
  font-size: 0.74rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}

.auth-demo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.auth-demo-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 0.85rem;
  background: var(--bg-muted);
  border: 1.5px solid var(--border);
  border-radius: 0.75rem;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all 0.2s;
}

.auth-demo-card:hover {
  border-color: var(--primary);
  background: var(--primary-light, #eff6ff);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.demo-avatar {
  font-size: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--bg-card);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.demo-texts {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.demo-texts strong {
  font-size: 0.85rem;
  color: var(--text-primary);
}

.demo-texts small {
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-arrow {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: transform 0.2s;
}

.auth-demo-card:hover .demo-arrow {
  transform: translateX(3px);
  color: var(--primary);
}

/* --- Sélecteur d'Avatar --- */
.avatar-picker-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.avatar-opt {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  height: 44px;
  border: 2px solid var(--border);
  border-radius: 0.65rem;
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.15s;
}

.avatar-opt:hover {
  border-color: var(--primary);
  background: var(--primary-light, #eff6ff);
  transform: scale(1.08);
}

.avatar-opt.selected {
  border-color: var(--primary);
  background: var(--primary-light, #eff6ff);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
  transform: scale(1.08);
}

@media (max-width: 640px) {
  .workspace-banner {
    padding: 1rem;
  }
  .workspace-banner-content {
    flex-direction: column;
    align-items: flex-start;
  }
  .workspace-banner-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .auth-demo-grid {
    grid-template-columns: 1fr;
  }
  .avatar-picker-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================================
   SYSTÈME DE FORFAITS & ABONNEMENTS (Gratuit, Pro, Expert)
   ============================================================ */

.user-name-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.user-plan-badge {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
}

.badge-plan-free {
  background: var(--bg-muted);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.badge-plan-pro {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #b45309;
  border: 1px solid #fcd34d;
  box-shadow: 0 1px 3px rgba(217, 119, 6, 0.15);
}

.badge-plan-expert {
  background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
  color: #4338ca;
  border: 1px solid #a5b4fc;
  box-shadow: 0 1px 4px rgba(79, 70, 229, 0.2);
}

.workspace-plan-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 2rem;
  letter-spacing: 0.02em;
}

.btn-pill-admin {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff !important;
  border: 1px solid #b45309;
  font-weight: 700;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s ease;
  font-size: 0.8rem;
  cursor: pointer;
}
.btn-pill-admin:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(217, 119, 6, 0.4);
}

.badge-superadmin {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.65rem;
  border-radius: 9999px;
  border: 1px solid #fcd34d;
  box-shadow: 0 2px 4px rgba(180, 83, 9, 0.25);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.badge-superadmin-mini {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  border-radius: 9999px;
  margin-left: 0.4rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.badge-plan-mini {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  margin-left: 0.35rem;
}

.badge-plan-banner {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  margin-left: 0.5rem;
}

.active-services-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 1rem;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.active-services-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--text-primary);
}

.services-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
}

.services-dot.pulse {
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.active-services-badges {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.service-pill-active {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.service-pill-active.expert {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
  border-color: rgba(99, 102, 241, 0.3);
}

.admin-user-plan-select {
  padding: 0.2rem 0.4rem;
  font-size: 0.75rem;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

/* --- Box Plan dans Paramètres --- */
.settings-plan-box {
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.85rem;
}

.settings-plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.3rem;
}

.settings-plan-pill {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary);
}

/* --- Grille des Abonnements & Forfaits --- */
.sub-notice-banner {
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1.5px solid #60a5fa;
  color: #1e40af;
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.88rem;
  line-height: 1.45;
  animation: modal-enter 0.2s ease-out;
}

.subscription-plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 0.5rem 0 1rem;
}

.sub-plan-card {
  position: relative;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
}

.sub-plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

.sub-plan-card.popular {
  border-color: #f59e0b;
  background: linear-gradient(to bottom, rgba(254, 243, 199, 0.25), var(--bg-card) 25%);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
}

.sub-plan-card.expert {
  border-color: #6366f1;
  background: linear-gradient(to bottom, rgba(238, 242, 255, 0.4), var(--bg-card) 25%);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.16);
}

.sub-plan-card.current-active {
  border-color: var(--success, #10b981) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25) !important;
}

.sub-badge-popular {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.35);
}

.sub-badge-expert {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.35);
}

.sub-plan-header {
  text-align: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.sub-plan-icon {
  font-size: 2rem;
  display: inline-block;
  margin-bottom: 0.35rem;
}

.sub-plan-name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
}

.sub-plan-price {
  margin: 0.5rem 0 0.35rem;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem;
}

.sub-amount {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--text-primary);
}

.sub-freq {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.sub-plan-desc {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.sub-features-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.sub-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-primary);
  line-height: 1.35;
}

.sub-feature.highlight {
  color: var(--text-primary);
}

.sub-feature.disabled {
  color: var(--text-secondary);
  opacity: 0.55;
}

.feat-check {
  color: var(--success, #10b981);
  font-weight: 800;
  flex-shrink: 0;
}

.sub-feature.highlight .feat-check {
  color: var(--primary);
}

.feat-lock {
  color: var(--text-secondary);
  font-size: 0.75rem;
  flex-shrink: 0;
}

.sub-plan-footer {
  margin-top: 1rem;
}

.sub-action-btn.active-current {
  background: var(--success-light, #ecfdf5) !important;
  border-color: var(--success, #10b981) !important;
  color: var(--success, #059669) !important;
  font-weight: 800;
  pointer-events: none;
}

.sub-alert-notice {
  background: rgba(245, 158, 11, 0.12);
  border: 1.5px solid #f59e0b;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 1.25rem;
  animation: modal-enter 0.25s ease-out;
}

.sub-credits-pack-section {
  margin-top: 1.5rem;
  background: var(--bg-muted);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 14px 18px;
  transition: all 0.2s ease;
}

.sub-credits-pack-section:hover {
  border-color: var(--border-medium);
}

@media (max-width: 900px) {
  .subscription-plans-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ==========================================================================
   STUDIO AUTO-FILL 1-CLIC (BOOKMARKLET & USERSCRIPT VINTED / LEBONCOIN)
   ========================================================================== */

.platform-banner-actions {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  flex-wrap: wrap;
}

.banner-vinted .btn-outline-white {
  background: #ffffff !important;
  color: #09b1ba !important;
  border: 1.5px solid #09b1ba !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(9, 177, 186, 0.2);
}
.banner-vinted .btn-outline-white:hover {
  background: #f0fdfa !important;
  color: #065e63 !important;
  border-color: #065e63 !important;
}

.banner-leboncoin .btn-outline-white {
  background: #ffffff !important;
  color: #ea580c !important;
  border: 1.5px solid #ea580c !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(234, 88, 12, 0.2);
}
.banner-leboncoin .btn-outline-white:hover {
  background: #fff7ed !important;
  color: #c2410c !important;
  border-color: #c2410c !important;
}

.banner-ebay .btn-outline-white {
  background: #ffffff !important;
  color: #e5322b !important;
  border: 1.5px solid #e5322b !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(229, 50, 43, 0.2);
}
.banner-ebay .btn-outline-white:hover {
  background: #fef2f2 !important;
  color: #b91c1c !important;
  border-color: #b91c1c !important;
}

.banner-etsy .btn-outline-white {
  background: #ffffff !important;
  color: #f1641e !important;
  border: 1.5px solid #f1641e !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(241, 100, 30, 0.2);
}
.banner-etsy .btn-outline-white:hover {
  background: #fff7ed !important;
  color: #c2410c !important;
  border-color: #c2410c !important;
}

.btn-outline-white {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-outline-white:hover {
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  border-color: #ffffff;
}

/* Grille de sélection des plateformes utilisateur */
.platform-toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.platform-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 2px solid var(--border-light, #e2e8f0);
  border-radius: 12px;
  background: var(--bg-surface, #ffffff);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.platform-toggle-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.platform-toggle-card.active {
  border-color: var(--primary, #4f46e5);
  background: rgba(79, 70, 229, 0.05);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1);
}

.platform-toggle-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.platform-toggle-icon {
  font-size: 26px;
}

.platform-toggle-text strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-primary, #0f172a);
}

.platform-toggle-text small {
  display: block;
  font-size: 0.76rem;
  color: var(--text-secondary, #64748b);
  margin-top: 2px;
}

.platform-toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: #cbd5e1;
  border-radius: 24px;
  transition: background 0.25s ease;
  flex-shrink: 0;
}

.platform-toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.platform-toggle-card.active .platform-toggle-switch {
  background: #10b981;
}

.platform-toggle-card.active .platform-toggle-switch::after {
  transform: translateX(20px);
}

.btn-autofill-action {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  font-weight: 800;
  letter-spacing: 0.2px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  animation: pulseAutofill 3s infinite ease-in-out;
}

@keyframes pulseAutofill {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}

.btn-card-copy.btn-card-autofill {
  background: rgba(124, 58, 237, 0.12);
  color: #7c3aed;
  border-color: rgba(124, 58, 237, 0.25);
  font-weight: 800;
}

.btn-card-copy.btn-card-autofill:hover {
  background: #7c3aed;
  color: #ffffff;
  border-color: #7c3aed;
}

/* Badges et Cartes de liaison de comptes (eBay / Etsy) */
.badge-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.badge-status-pill.disconnected {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.badge-status-pill.connected {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.account-link-card {
  transition: all 0.2s ease;
}

.account-link-card:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.account-notice-bar {
  transition: all 0.2s ease;
}

/* Modal AutoFill Components */
.autofill-intro-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(79, 70, 229, 0.08) 100%);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.autofill-intro-icon {
  font-size: 2rem;
  line-height: 1;
}

.autofill-intro-text strong {
  display: block;
  font-size: 0.98rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.autofill-intro-text p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.autofill-step-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  margin-bottom: 1rem;
}

.autofill-step-header {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 0.85rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

.step-title {
  margin: 0 0 0.2rem 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.step-desc {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Zone Drag Bookmarklet */
.bookmarklet-drag-zone {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem;
  background: var(--bg-secondary, #f8fafc);
  border: 2px dashed rgba(124, 58, 237, 0.35);
  border-radius: var(--radius-md);
}

.bookmarklet-button-draggable {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  color: #ffffff !important;
  text-decoration: none !important;
  font-weight: 800;
  font-size: 0.9rem;
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
  cursor: grab;
  user-select: none;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.bookmarklet-button-draggable:active {
  cursor: grabbing;
}

.bookmarklet-button-draggable:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.45);
}

.bm-drag-hint {
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}

/* Guide d'installation Bookmarklet */
.bookmarklet-guide-box {
  margin-top: 0.85rem;
  padding: 1rem;
  background: var(--bg-primary, #ffffff);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  animation: fadeIn 0.2s ease-in-out;
}

.bookmarklet-guide-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.bookmarklet-guide-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-primary);
}

@media (max-width: 640px) {
  .bookmarklet-guide-methods {
    grid-template-columns: 1fr;
  }
}

.bookmarklet-guide-col {
  background: var(--bg-secondary, #f8fafc);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.bookmarklet-guide-col strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
  font-size: 0.84rem;
}

.bookmarklet-guide-col p {
  margin: 0;
  color: var(--text-secondary);
}

.bookmarklet-guide-col kbd {
  display: inline-block;
  padding: 2px 5px;
  font-size: 0.75rem;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  font-family: inherit;
  font-weight: 600;
}

/* Item Preview */
.autofill-preview-card {
  margin: 0.75rem 0;
  padding: 0.85rem 1rem;
  background: var(--bg-secondary, #f8fafc);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.autofill-preview-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  overflow: hidden;
}

.autofill-preview-img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.autofill-preview-info h5 {
  margin: 0 0 0.2rem 0;
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autofill-preview-meta {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.autofill-preview-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  flex-shrink: 0;
}

/* Launch Buttons */
.autofill-launch-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.btn-launch-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  text-align: left;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-launch-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.launch-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.launch-labels {
  flex: 1;
  margin: 0 0.65rem;
}

.launch-labels strong {
  display: block;
  font-size: 0.88rem;
  line-height: 1.2;
}

.launch-labels small {
  display: block;
  font-size: 0.72rem;
  opacity: 0.85;
}

.launch-arrow {
  font-size: 1.1rem;
  font-weight: 800;
  transition: transform 0.2s ease;
}

.btn-launch-pill:hover .launch-arrow {
  transform: translateX(3px);
}

/* Advanced Tampermonkey Box */
.autofill-advanced-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  border-left: 3px solid #7c3aed;
}

.autofill-advanced-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.advanced-badge {
  font-size: 0.68rem;
  text-transform: uppercase;
  background: #7c3aed;
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.autofill-advanced-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.65rem;
  flex-wrap: wrap;
}

@media (max-width: 640px) {
  .autofill-launch-buttons {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   1. MOBILITÉ & CAMÉRA DIRECTE (PWA)
   ========================================================================== */

.photo-upload-actions-bar {
  display: flex;
  gap: 0.65rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.btn-camera-pulse {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border: none;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
  transition: all 0.2s ease;
}

.btn-camera-pulse:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.45);
}

/* ==========================================================================
   2. BASCULE DE VUE (GRILLE / KANBAN) & RACCOURCIS
   ========================================================================== */

.search-kbd-badge {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  margin-right: 0.5rem;
  display: inline-flex;
  align-items: center;
  transition: all 0.15s ease;
}

.search-kbd-badge:hover {
  background: var(--border);
  color: var(--text-primary);
}

.search-kbd-badge kbd {
  font-family: inherit;
}

.view-mode-toggle {
  display: inline-flex;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.btn-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: calc(var(--radius-sm) - 2px);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-view-toggle:hover {
  color: var(--text-primary);
}

.btn-view-toggle.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}

.view-icon {
  font-size: 0.95rem;
}

/* ==========================================================================
   3. TABLEAU KANBAN PIPELINE (DRAG & DROP)
   ========================================================================== */

.kanban-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(260px, 1fr));
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1.5rem;
  min-height: 480px;
  align-items: start;
}

.kanban-column {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 280px);
  min-height: 380px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.kanban-column-header {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary, #f8fafc);
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
}

.kanban-column-title-group {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.kanban-col-icon {
  font-size: 1.1rem;
}

.kanban-col-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.kanban-count-badge {
  background: var(--border);
  color: var(--text-primary);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.kanban-value-sub {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.kanban-cards-list {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  overflow-y: auto;
  flex: 1;
  min-height: 250px;
  transition: background-color 0.2s ease;
}

.kanban-cards-list.drag-over {
  background: rgba(79, 70, 229, 0.08);
  border: 2px dashed var(--primary);
  border-radius: var(--radius-sm);
}

.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  cursor: grab;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  user-select: none;
}

.kanban-card:active {
  cursor: grabbing;
}

.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
  border-color: rgba(79, 70, 229, 0.4);
}

.kanban-card.is-dragging {
  opacity: 0.4;
  transform: scale(0.95);
  border: 1px dashed var(--primary);
}

.kanban-card-top {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.kanban-card-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.kanban-card-thumb-empty {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.kanban-card-body-meta {
  flex: 1;
  overflow: hidden;
}

.kanban-card-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.15rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kanban-card-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.kanban-card-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid var(--border);
}

.kanban-card-price {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--primary);
}

.kanban-card-actions {
  display: flex;
  gap: 0.35rem;
}

.btn-kanban-action {
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-kanban-action:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.kanban-empty-hint {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-style: italic;
}

/* ==========================================================================
   4. PALETTE DE COMMANDES (SPOTLIGHT / CTRL+K)
   ========================================================================== */

.cmd-palette-backdrop {
  align-items: flex-start !important;
  padding-top: 10vh !important;
  backdrop-filter: blur(6px);
  background: rgba(15, 23, 42, 0.65) !important;
}

.cmd-palette-dialog {
  width: 100%;
  max-width: 640px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg, 14px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  animation: cmdScaleDown 0.18s ease-out;
}

@keyframes cmdScaleDown {
  from { opacity: 0; transform: translateY(-16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.cmd-palette-header {
  display: flex;
  align-items: center;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--border);
  gap: 0.85rem;
  background: var(--bg-secondary, #f8fafc);
}

.cmd-search-icon {
  font-size: 1.25rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.cmd-palette-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: inherit;
}

.cmd-palette-input::placeholder {
  color: var(--text-secondary);
  font-weight: 400;
}

.cmd-close-esc-badge {
  background: var(--border);
  border: none;
  color: var(--text-secondary);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
  letter-spacing: 0.5px;
}

.cmd-palette-results {
  max-height: 380px;
  overflow-y: auto;
  padding: 0.5rem;
}

.cmd-group-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary);
  padding: 0.5rem 0.65rem 0.25rem 0.65rem;
}

.cmd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--text-primary);
}

.cmd-item:hover,
.cmd-item.selected {
  background: var(--primary);
  color: #ffffff !important;
}

.cmd-item.selected .cmd-item-sub,
.cmd-item.selected .cmd-item-tag {
  color: rgba(255, 255, 255, 0.8) !important;
}

.cmd-item-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
}

.cmd-item-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: rgba(124, 58, 237, 0.1);
}

.cmd-item.selected .cmd-item-icon {
  background: rgba(255, 255, 255, 0.2);
}

.cmd-item-thumb {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.cmd-item-label {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cmd-item-sub {
  font-size: 0.74rem;
  color: var(--text-secondary);
}

.cmd-item-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--border);
  color: var(--text-secondary);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.cmd-item.selected .cmd-item-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.cmd-palette-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: var(--bg-secondary, #f8fafc);
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.cmd-footer-hints {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.cmd-footer-hints kbd,
.cmd-footer-shortcuts kbd {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.1rem 0.35rem;
  font-size: 0.68rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.cmd-footer-shortcuts {
  display: flex;
  gap: 0.65rem;
}

@media (max-width: 768px) {
  .cmd-footer-shortcuts {
    display: none;
  }
}

/* ==========================================================================
   MODULE 14 : JAUGE FISCALE DAC7 & MODALE EXPLICATIVE
   ========================================================================== */
.kpi-card.kpi-fiscal {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.kpi-card.kpi-fiscal:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.kpi-fiscal-progress-group {
  margin-top: 0.25rem;
}

.fiscal-metric-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.fiscal-metric-line strong {
  color: var(--text-primary);
  font-size: 0.82rem;
}

.progress-track-sm {
  background: var(--border);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin: 0.25rem 0 0.45rem 0;
}

.progress-fill-sm {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.kpi-fiscal-alert .progress-fill-sm {
  background: #ef4444;
}

.kpi-fiscal-warning .progress-fill-sm {
  background: #f59e0b;
}

.kpi-badge-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
}

.kpi-badge-alert {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
}

.fiscal-modal-summary-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.fiscal-kpi-highlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.fiscal-sub-label {
  display: block;
  font-size: 0.76rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.fiscal-big-num {
  margin: 0.35rem 0 0 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
}

.fiscal-status-pill {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.fiscal-faq-section {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.fiscal-faq-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.25rem 0;
}

.fiscal-faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 0.95rem;
  font-size: 0.85rem;
  line-height: 1.5;
}

.fiscal-faq-item strong {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--text-primary);
}

.fiscal-faq-item p {
  margin: 0;
  color: var(--text-secondary);
}

/* ==========================================================================
   MODULE 15 : SCORE ATTRACTIVITÉ & SEO D'ANNONCE EN DIRECT
   ========================================================================== */
.seo-score-panel {
  margin-top: 0.65rem;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.seo-score-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.seo-score-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.seo-score-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
}

.seo-score-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
}

.badge-excellent {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.badge-good {
  background: rgba(2, 132, 199, 0.15);
  color: #0284c7;
}

.badge-average {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.badge-poor {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.seo-criteria-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.seo-pill {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
}

.seo-pill.pill-pass {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.seo-pill.pill-fail {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

/* ==========================================================================
   MODULE 16 : SIMULATEUR DE FRAIS DE PORT & GUIDE COLISAGE
   ========================================================================== */
.shipping-sim-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
  padding: 1rem 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.shipping-recom-box {
  flex: 1;
  min-width: 240px;
}

.recom-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  background: rgba(2, 132, 199, 0.12);
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  text-transform: uppercase;
}

.shipping-rates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
  margin-top: 0.85rem;
}

.shipping-rate-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.95rem;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.shipping-rate-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--primary);
}

.shipping-card-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.carrier-logo {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.carrier-name {
  font-size: 0.9rem;
  display: block;
}

.carrier-type {
  display: block;
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.carrier-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  margin-left: auto;
}

.shipping-card-price {
  margin-top: 0.75rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-top: 1px dashed var(--border);
  padding-top: 0.5rem;
}

.rate-price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
}

.rate-note {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.shipping-tips-card {
  padding: 0.75rem 1rem;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 8px;
}

/* ==========================================================================
   MODULE 17 : MOT DE REMERCIEMENT COLIS PERSONNALISÉ
   ========================================================================== */
.package-note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.package-note-actions {
  display: flex;
  gap: 0.5rem;
}

.package-note-card {
  border: 2px dashed #94a3b8;
  border-radius: 12px;
  padding: 1.5rem;
  background: #ffffff;
  color: #1e293b;
  max-width: 580px;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.package-note-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.package-note-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.note-avatar {
  font-size: 2rem;
  background: #f1f5f9;
  padding: 0.35rem 0.6rem;
  border-radius: 50%;
}

.note-shop-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
}

.note-shop-sub {
  font-size: 0.75rem;
  color: #64748b;
}

.note-divider {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 0.5rem 0;
}

.note-body-text {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #334155;
}

.note-body-text p {
  margin: 0 0 0.5rem 0;
}

.note-rating-hint {
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  text-align: center;
  margin-top: 0.75rem;
}

.note-rating-hint span {
  font-size: 1.1rem;
  letter-spacing: 2px;
  color: #d97706;
}

.note-rating-hint p {
  margin: 0.2rem 0 0 0;
  font-size: 0.78rem;
  color: #92400e;
  font-weight: 600;
}

.note-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: #64748b;
}

/* ==========================================================================
   MODULE 18 : CRÉATEUR DE LOT & RÉDUCTIONS DRESSING
   ========================================================================== */

#bundleModal .modal-dialog {
  max-width: 960px;
  width: 96%;
  max-height: 92vh;
}

#bundleModal .modal-body {
  padding: 1.4rem 1.6rem 2rem 1.6rem;
  overflow-y: auto;
  max-height: calc(92vh - 130px);
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.bundle-layout-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.25rem;
  margin-top: 0.25rem;
  align-items: start;
}

@media (max-width: 820px) {
  .bundle-layout-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.bundle-items-selector {
  display: flex;
  flex-direction: column;
}

.bundle-selector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.bundle-available-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-muted);
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  border: 1px solid var(--border-light);
}

.bundle-items-checklist {
  max-height: 330px;
  overflow-y: auto;
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  padding: 0.6rem;
  background: var(--bg-surface);
  scrollbar-width: thin;
}

.bundle-item-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1.5px solid var(--border-light);
  margin-bottom: 0.45rem;
  background: var(--bg-card);
  user-select: none;
}

.bundle-item-row:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.bundle-item-row.is-selected {
  background: rgba(79, 70, 229, 0.08);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.12);
}

.bundle-item-check {
  width: 19px;
  height: 19px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.bundle-item-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-muted);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
}

.bundle-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-placeholder {
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

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

.bundle-item-title {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.bundle-item-meta {
  display: block;
  font-size: 0.74rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bundle-item-price {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--primary);
  flex-shrink: 0;
  white-space: nowrap;
  margin-left: auto;
}

.bundle-discount-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.btn-discount-pill {
  padding: 0.6rem 0.35rem;
  border: 1.5px solid var(--border-light);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  transition: all 0.18s ease;
}

.btn-discount-pill:hover {
  border-color: var(--primary);
  background: var(--bg-hover);
}

.btn-discount-pill.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

.btn-discount-pill .discount-pill-pct {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.1;
}

.btn-discount-pill .discount-pill-sub {
  font-size: 0.65rem;
  opacity: 0.85;
  white-space: nowrap;
}

.bundle-summary-card {
  background: var(--bg-secondary);
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.85rem;
}

.bundle-calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  margin-bottom: 0.35rem;
  color: var(--text-secondary);
}

.bundle-calc-row strong {
  color: var(--text-primary);
}

.highlight-green {
  color: #10b981 !important;
  font-weight: 700;
}

.bundle-final-row {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0;
  padding-top: 0.25rem;
}

.bundle-big-price {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--primary);
}

.bundle-actions-group {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

/* Aperçu carte annonce de lot */
.bundle-preview-card {
  margin-top: 1.25rem;
  background: var(--bg-card);
  border: 1.5px solid var(--primary-light, #e0e7ff);
  border-radius: 12px;
  box-shadow: 0 4px 18px rgba(79, 70, 229, 0.08);
  padding: 1.25rem 1.4rem;
  animation: fadeIn 0.25s ease-out;
}

.bundle-preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
  gap: 0.5rem;
}

.bundle-preview-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 0.2rem;
}

.bundle-preview-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.bundle-preview-stats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.bundle-stat-badge {
  background: var(--bg-muted);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-weight: 600;
  color: var(--text-secondary);
}

.bundle-price-badge {
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-weight: 800;
}

.bundle-desc-box {
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.bundle-preview-actions-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-light);
}

.btn-create-bundle-cta {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.btn-create-bundle-cta:hover {
  background: linear-gradient(135deg, #4338ca, #3730a3);
  transform: translateY(-1px);
}

/* ==========================================================================
   MODULE 19 : MINI-STUDIO RETOUCHE PHOTO CANVAS
   ========================================================================== */
.photo-editor-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 768px) {
  .photo-editor-layout {
    grid-template-columns: 1fr;
  }
}

.photo-editor-canvas-wrapper {
  background: #0f172a;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  max-height: 440px;
  padding: 0.5rem;
}

.photo-editor-canvas {
  max-width: 100%;
  max-height: 420px;
  object-fit: contain;
  border-radius: 4px;
}

.photo-editor-controls {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.editor-tool-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.editor-tool-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

.editor-slider {
  width: 100%;
  accent-color: var(--primary);
}

.editor-tool-buttons {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   MODULE 20 : SAISIE VOCALE AU MICRO (WEB SPEECH API)
   ========================================================================== */
.form-label-with-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.form-label-with-action .form-label {
  margin-bottom: 0;
}

.btn-voice-dictate {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 14px;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s ease;
}

.btn-voice-dictate:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-voice-dictate.is-listening {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
  animation: pulseVoice 1.2s infinite;
}

@keyframes pulseVoice {
  0% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
  }
}




/* ==========================================================================
   21. MODULES PRO AVANCÉS : RADAR HEURES, RELIST, SCANNER, SUIVI, FLASH OFFER
   ========================================================================== */

/* 21.1 Widget & Modale Radar des Meilleures Heures de Publication */
.timing-radar-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}

.timing-radar-pill:hover {
  border-color: var(--primary);
  background: var(--bg-secondary);
  transform: translateY(-1px);
}

.radar-live-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: radarLivePulse 1.8s infinite;
}

.radar-live-indicator.traffic-high {
  background: #f59e0b;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
}

.radar-live-indicator.traffic-peak {
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
}

@keyframes radarLivePulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.radar-title {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.timing-radar-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 12px;
}

.timing-radar-badge.badge-peak {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.timing-radar-badge.badge-high {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.timing-radar-badge.badge-calm {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

/* Modale Radar */
.radar-live-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(236, 72, 153, 0.08) 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}

.radar-live-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.radar-countdown-box {
  margin-top: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.radar-countdown-box .countdown-value {
  color: var(--primary);
  font-weight: 700;
}

.radar-countdown-box .countdown-timer {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.radar-gauge-visual {
  flex-shrink: 0;
}

.radar-gauge-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 6px solid var(--primary);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.radar-gauge-circle .gauge-percent {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.radar-gauge-circle .gauge-sub {
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-top: 0.15rem;
}

.timing-week-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.timing-day-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  text-align: center;
  transition: all 0.2s ease;
}

.timing-day-card.is-today {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.timing-day-card.is-best-day {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, var(--bg-card) 100%);
  border-color: #f59e0b;
}

.timing-day-name {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.timing-peak-badge {
  display: inline-block;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-primary);
}

.timing-algo-tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.timing-tip-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem;
}

.tip-card-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
  font-size: 0.88rem;
}

.timing-tip-card p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* 21.2 Bouton Relist & Refresh 1-Clic */
.btn-relist-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.28rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-relist-item:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* 21.3 Scanner Code-Barres / ISBN par Caméra */
.barcode-camera-container {
  position: relative;
  width: 100%;
  height: 280px;
  background: #090d16;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.barcode-scanner-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.barcode-scan-guide {
  position: absolute;
  width: 220px;
  height: 140px;
  border: 2px dashed rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.4);
}

.barcode-scan-laser {
  width: 100%;
  height: 2px;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  position: absolute;
  top: 0;
  animation: scanLaserAnim 2s infinite alternate ease-in-out;
}

@keyframes scanLaserAnim {
  0% { top: 5%; }
  100% { top: 95%; }
}

.barcode-scanner-notice {
  position: absolute;
  bottom: 12px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  font-size: 0.75rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.barcode-detected-box {
  margin-top: 1rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  text-align: center;
}

.barcode-detected-box .detected-badge {
  font-size: 0.8rem;
  font-weight: 800;
  color: #10b981;
}

.barcode-detected-box .detected-code {
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0.25rem 0;
}

.barcode-detected-box .detected-product {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.barcode-manual-fallback {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
}

/* 21.4 Suivi Colis & Raccourci Transporteur */
.tracking-link-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #059669;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tracking-link-pill:hover {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
  transform: translateY(-1px);
}

/* 21.5 Offre Flash 24h */
.flash-offer-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(239, 68, 68, 0.08) 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.flash-banner-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.flash-controls-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-bottom: 1rem;
}

.flash-discount-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0.5rem 0 1rem 0;
}

.btn-flash-pill {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-flash-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-flash-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

.flash-price-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  text-align: center;
}

.flash-price-item .label {
  display: block;
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.flash-price-item .value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.flash-price-item .strike {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.flash-price-item .discount-green {
  color: #10b981;
}

.flash-price-item.total .big-flash {
  font-size: 1.25rem;
  color: #ef4444;
  font-weight: 800;
}

.flash-strategy-tip {
  margin-top: 1rem;
  background: var(--bg-secondary);
  border-left: 3px solid #f59e0b;
  border-radius: 4px;
  padding: 0.65rem 0.85rem;
}

/* ==========================================================================
   22. MASTER RESPONSIVE DESIGN & ERGONOMIE MOBILE & TABLETTE
   ========================================================================== */

/* Bouton Flottant d'Action Rapide sur Mobile (FAB) */
.mobile-fab-btn {
  display: none;
  position: fixed;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  right: 18px;
  z-index: 1060;
  align-items: center;
  gap: 0.45rem;
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.45), 0 2px 6px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mobile-fab-btn:active {
  transform: scale(0.94);
}

.mobile-fab-btn .fab-icon {
  font-size: 1.15rem;
}

.mobile-fab-btn .fab-text {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

/* -------------------------------------------------------------
   TABLETTES & ÉCRANS MOYENS (max-width: 1024px)
   ------------------------------------------------------------- */
@media (max-width: 1024px) {
  .items-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }

  .bundle-layout-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .photo-editor-layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .photo-editor-canvas-wrapper {
    max-height: 380px;
  }

  .header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

/* -------------------------------------------------------------
   SMARTPHONES & PETITES TABLETTES (max-width: 768px)
   ------------------------------------------------------------- */
@media (max-width: 768px) {
  /* En-tête mobile en 2 rangées nettes et lisibles */
  .app-header {
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  .header-container {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    width: 100%;
    box-sizing: border-box;
  }

  .brand-group {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .brand-title {
    font-size: 1.2rem;
  }

  .brand-subtitle {
    display: none !important;
  }

  .header-search-center {
    display: none !important;
  }

  .header-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
    padding: 0.15rem 0.2rem 0.4rem 0.2rem;
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .header-actions::-webkit-scrollbar {
    display: none;
  }

  .header-actions .btn,
  .header-actions .btn-api-pill,
  .header-actions .sync-pill,
  .header-actions .user-account-widget {
    flex-shrink: 0;
    white-space: nowrap;
    min-height: 40px;
    font-size: 0.8rem;
  }

  .header-actions #newItemBtn {
    order: -2;
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
  }

  /* Menu déroulant compte utilisateur */
  .user-dropdown-menu {
    right: 0 !important;
    left: auto !important;
    max-width: calc(100vw - 1.5rem) !important;
    width: 290px !important;
  }

  /* Affichage du FAB d'ajout rapide sur smartphone */
  .mobile-fab-btn {
    display: inline-flex;
  }

  /* Bannière d'espace de suivi */
  .workspace-banner {
    padding: 0.85rem;
    margin-bottom: 0.75rem;
    border-radius: var(--radius-md);
  }

  .workspace-banner-content {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .workspace-banner-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .workspace-avatar {
    width: 48px;
    height: 48px;
    font-size: 1.85rem;
    border-radius: 12px;
  }

  .workspace-title {
    font-size: 1.05rem;
  }

  .workspace-title-row {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .workspace-banner-actions {
    display: flex;
    width: 100%;
    gap: 0.5rem;
  }

  .workspace-banner-actions .btn {
    flex: 1;
    justify-content: center;
    min-height: 38px;
    font-size: 0.8rem;
  }

  /* Tableau de bord & KPIs */
  .main-content {
    padding: 0.75rem;
    gap: 0.85rem;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }

  .kpi-card {
    padding: 0.75rem;
  }

  .kpi-label {
    font-size: 0.72rem;
  }

  .kpi-value {
    font-size: 1.25rem;
    font-weight: 800;
  }

  .kpi-sub {
    font-size: 0.68rem;
  }

  .dac7-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  /* Barre d'outils, Recherche & Filtres */
  .toolbar-container {
    padding: 0.75rem;
    gap: 0.65rem;
  }

  .status-tabs-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    padding-bottom: 0.3rem;
  }

  .status-tabs-wrapper::-webkit-scrollbar {
    display: none;
  }

  .status-tab {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 38px;
  }

  .search-sort-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  .search-input-wrapper {
    width: 100%;
    min-width: 0;
  }

  .search-input-wrapper input {
    font-size: 16px !important;
    min-height: 42px;
    padding: 0.6rem 2.2rem;
  }

  .search-kbd-badge {
    display: none !important;
  }

  .filter-dropdowns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
    width: 100%;
  }

  .select-control {
    width: 100%;
    font-size: 16px !important;
    min-height: 42px;
    padding: 0.5rem 0.65rem;
  }

  #sortControl {
    grid-column: span 2;
    width: 100%;
  }

  .view-mode-toggle {
    grid-column: span 1;
    width: 100%;
    justify-content: center;
    min-height: 40px;
  }

  #timingRadarWidget {
    grid-column: span 1;
    width: 100%;
    justify-content: center;
    min-height: 40px;
    padding: 0.35rem 0.5rem;
  }

  /* Cartes d'objets du catalogue */
  .items-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .item-card {
    border-radius: var(--radius-md);
  }

  .item-card-media {
    height: 220px;
  }

  .item-card-body {
    padding: 0.85rem;
    gap: 0.5rem;
  }

  .item-card-title {
    font-size: 0.98rem;
  }

  .card-quick-copy-bar {
    display: flex;
    gap: 0.35rem;
    width: 100%;
  }

  .btn-card-copy {
    flex: 1;
    min-height: 40px;
    font-size: 0.75rem;
    padding: 0.35rem 0.45rem;
    justify-content: center;
  }

  .item-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    width: 100%;
  }

  .btn-generate {
    flex: 1 1 100%;
    min-height: 42px;
    justify-content: center;
    font-size: 0.86rem;
  }

  .btn-nego, .btn-boost, .btn-relist-item {
    flex: 1 1 auto;
    min-height: 38px;
    justify-content: center;
    text-align: center;
    font-size: 0.78rem;
  }

  .action-buttons-group {
    display: flex;
    width: 100%;
    justify-content: flex-end;
    gap: 0.4rem;
    margin-top: 0.25rem;
  }

  .btn-card-action {
    min-width: 40px;
    min-height: 40px;
    justify-content: center;
    font-size: 1rem;
  }

  /* Tableau Kanban sur Mobile avec Défilement Horizontal Naturel */
  .kanban-board {
    display: flex;
    overflow-x: auto;
    gap: 0.85rem;
    padding: 0.5rem 0.25rem 1.75rem 0.25rem;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }

  .kanban-column {
    min-width: 82vw;
    max-width: 86vw;
    flex-shrink: 0;
    scroll-snap-align: center;
    border-radius: var(--radius-md);
  }

  .kanban-cards-list {
    min-height: 180px;
    max-height: 58vh;
  }

  .kanban-card {
    padding: 0.75rem;
    touch-action: pan-y;
  }

  /* Modales Adaptées Mobile (Bottom-Sheet UX) */
  .modal-backdrop {
    padding: 0.4rem 0.25rem;
    align-items: flex-end;
  }

  .modal-dialog {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 94vh !important;
    border-radius: 18px 18px 0 0 !important;
    margin-bottom: 0 !important;
  }

  .modal-header {
    padding: 0.75rem 1rem;
  }

  .modal-title {
    font-size: 1.1rem;
  }

  .modal-close-btn, .modal-close {
    min-width: 38px;
    min-height: 38px;
    font-size: 1.2rem;
  }

  .modal-body {
    padding: 0.85rem;
    max-height: calc(94vh - 125px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-tabs {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 0.35rem;
    padding: 0.35rem 0.5rem;
  }

  .modal-tabs::-webkit-scrollbar {
    display: none;
  }

  .modal-tab {
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 38px;
    font-size: 0.82rem;
    padding: 0.4rem 0.75rem;
  }

  .modal-footer {
    padding: 0.75rem 0.85rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .modal-footer .btn {
    flex: 1 1 auto;
    min-height: 42px;
    justify-content: center;
  }

  /* Champs de saisie & Formulaires (Évite le zoom involontaire iOS Safari) */
  .form-input, .select-control, textarea.form-input {
    font-size: 16px !important;
    min-height: 42px;
  }

  .form-row, .form-row-2, .form-row-3 {
    grid-template-columns: 1fr !important;
    gap: 0.65rem;
  }

  /* Mini-Studio Photo Canvas sur Mobile */
  .photo-editor-layout {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .photo-editor-canvas-wrapper {
    max-height: 250px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #photoEditorCanvas {
    max-height: 240px;
    max-width: 100%;
    object-fit: contain;
  }

  .editor-tool-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
  }

  .editor-slider {
    height: 32px;
  }

  /* Scanner de code-barres sur mobile */
  .barcode-camera-container {
    height: 240px;
  }

  .barcode-scan-guide {
    width: 200px;
    height: 120px;
  }

  /* Modale Radar des heures sur mobile */
  .radar-live-hero-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 1rem;
  }

  .timing-week-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .timing-algo-tips-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  /* Onglet Offre Flash */
  .flash-discount-pills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
  }

  .btn-flash-pill {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .flash-price-summary {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  /* Simulateur Colis & Mot de remerciement */
  .shipping-sim-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .shipping-rates-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .package-note-actions {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    width: 100%;
  }

  .package-note-actions .btn {
    width: 100%;
    min-height: 42px;
    justify-content: center;
  }

  /* Toast flottant sur mobile */
  .toast-container {
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    left: 14px;
    right: 14px;
    max-width: calc(100% - 28px);
  }

  .toast {
    font-size: 0.85rem;
    padding: 0.75rem 1rem;
    width: 100%;
  }
}

/* -------------------------------------------------------------
   TRÈS PETITS SMARTPHONES (max-width: 480px)
   ------------------------------------------------------------- */
@media (max-width: 480px) {
  .brand-title {
    font-size: 1.1rem;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
  }

  .logo-icon {
    font-size: 1.2rem;
  }

  .badge-tag {
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
  }

  .item-card-media {
    height: 195px;
  }

  .photo-preview-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
  }

  .photo-preview-item {
    height: 90px;
  }

  .kpi-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .kpi-card {
    padding: 0.65rem;
  }

  .kpi-value {
    font-size: 1.15rem;
  }
}

/* ==========================================================================
   MODULE 23 : SAUVEGARDE DE BROUILLON (ANTI-PERTE) & PARTAGE 1-CLIC MOBILE
   ========================================================================== */

/* Bannière de statut du brouillon dans la modale de création */
.draft-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: rgba(14, 165, 233, 0.08);
  border-bottom: 1px solid rgba(14, 165, 233, 0.2);
  font-size: 0.85rem;
}

body.theme-dark .draft-status-banner {
  background: rgba(14, 165, 233, 0.12);
  border-bottom-color: rgba(14, 165, 233, 0.25);
}

.draft-status-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-weight: 500;
}

.draft-status-icon {
  font-size: 1rem;
}

.btn-clear-draft {
  background: transparent;
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger);
  font-size: 0.78rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-clear-draft:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
}

/* Boutons de Partage Natif 1-Clic */
.btn-card-action.btn-card-share {
  color: #0284c7;
}

.btn-card-action.btn-card-share:hover {
  background: rgba(2, 132, 199, 0.1);
  color: #0369a1;
  border-color: rgba(2, 132, 199, 0.3);
}

.btn-kanban-share {
  background: rgba(2, 132, 199, 0.1);
  color: #0284c7;
  border: 1px solid rgba(2, 132, 199, 0.25);
  border-radius: 4px;
  padding: 0.2rem 0.45rem;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-kanban-share:hover {
  background: rgba(2, 132, 199, 0.2);
}

/* ==========================================================================
   MODULE 24 : APPLICATION SMARTPHONE NATIVE (ANDROID & APPLE iOS) & PWA
   ========================================================================== */

.pwa-tabs-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.pwa-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.pwa-tab-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.pwa-tab-btn.active {
  background: rgba(79, 70, 229, 0.12);
  color: var(--primary);
  border-color: rgba(79, 70, 229, 0.3);
}

/* ==========================================================================
   MODULE IMPORT DE CATALOGUE & ASPIRATEUR DE DRESSING COMPLET
   ========================================================================== */

#importCatalogModal .modal-dialog {
  max-width: 960px;
  width: 95%;
  max-height: 92vh;
}

#importCatalogModal .modal-body {
  padding: 1.5rem 1.75rem 2.5rem 1.75rem;
  overflow-y: auto;
  max-height: calc(92vh - 130px);
  scrollbar-width: thin;
}

#importCatalogModal .pwa-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-light, #e2e8f0);
  padding-bottom: 0.75rem;
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  height: auto !important;
  min-height: auto;
}

#importCatalogModal .pwa-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  border: 1px solid var(--border-light, #e2e8f0);
  background: var(--bg-surface, #ffffff);
  color: var(--text-secondary, #475569);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s ease;
}

#importCatalogModal .pwa-tab-btn:hover {
  background: var(--bg-secondary, #f8fafc);
  color: var(--text-primary, #0f172a);
  border-color: #cbd5e1;
}

#importCatalogModal .pwa-tab-btn.active {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  color: #ffffff;
  border-color: #4338ca;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.batch-import-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  max-height: 380px;
  overflow-y: auto;
  padding: 8px 4px 16px 4px;
  scrollbar-width: thin;
}

.batch-import-item-card {
  display: flex;
  gap: 12px;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-light, #e2e8f0);
  border-radius: 10px;
  padding: 10px;
  align-items: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.batch-import-item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border-color: var(--primary, #4f46e5);
}

.batch-import-item-card img {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-light, #e2e8f0);
}

.batch-import-item-info {
  flex: 1;
  min-width: 0;
}

.batch-import-item-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary, #0f172a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.batch-import-item-meta {
  font-size: 0.74rem;
  color: var(--text-muted, #64748b);
  display: flex;
  gap: 6px;
  align-items: center;
}

.batch-import-item-price {
  font-size: 0.86rem;
  font-weight: 800;
  color: #059669;
  margin-top: 2px;
}

.pwa-feature-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
  border: 1px solid rgba(79, 70, 229, 0.2);
  border-radius: 12px;
  margin-bottom: 1.25rem;
}

.pwa-feature-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.pwa-feature-text strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.pwa-feature-text p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.pwa-steps-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pwa-step-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
}

.pwa-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pwa-step-desc strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.pwa-step-desc span {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.pwa-code-instructions {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem;
}

.pwa-cli-box {
  background: #0f172a;
  color: #38bdf8;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow-x: auto;
}

/* ==========================================================================
   SYNCHRONISATION CLOUD PROFESSIONNELLE (SUPABASE POSTGRESQL + S3 STORAGE)
   ========================================================================== */

.sync-pill[role="button"] {
  cursor: pointer;
  transition: all 0.2s ease;
}

.sync-pill[role="button"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.sync-pill.cloud-active {
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.4);
  color: #0284c7;
}

body.theme-dark .sync-pill.cloud-active {
  background: rgba(14, 165, 233, 0.18);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #38bdf8;
}

.sync-dot.sync-dot-cloud {
  background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%);
  box-shadow: 0 0 8px rgba(14, 165, 233, 0.6);
  animation: pulseCloud 2s infinite ease-in-out;
}

@keyframes pulseCloud {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.75;
  }
}

/* Carte de statut Cloud */
.cloud-status-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  transition: all 0.3s ease;
}

.cloud-status-card.local {
  background: var(--bg-secondary, #f8fafc);
  border: 1px solid var(--border);
}

.cloud-status-card.connected {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(79, 70, 229, 0.08) 100%);
  border: 1px solid rgba(14, 165, 233, 0.4);
}

.cloud-status-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.cloud-status-content {
  flex: 1;
  min-width: 0;
}

.cloud-status-content strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.cloud-status-content p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.badge-status-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-status-pill.local {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.badge-status-pill.connected {
  background: #10b981;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.cloud-form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.key-field-toggle {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.25rem;
}

.btn-text-action {
  background: transparent;
  border: none;
  color: var(--primary);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 2px 4px;
  font-weight: 600;
}

.btn-text-action:hover {
  text-decoration: underline;
}

/* Zone d'opérations */
.cloud-operations-box {
  background: var(--bg-secondary, #f8fafc);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.cloud-ops-header {
  font-size: 0.88rem;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.cloud-ops-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Guide box */
.cloud-guide-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 1.25rem;
}

.cloud-guide-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.cloud-guide-text strong {
  display: block;
  font-size: 0.84rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.cloud-guide-text p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ==========================================================================
   BANDEAU MODE FENÊTRE AUTONOME SUR PC & NOTICES APPLIS SMARTPHONE
   ========================================================================== */

.desktop-standalone-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #f8fafc;
  padding: 0.65rem 1.25rem;
  border-bottom: 2px solid #3b82f6;
  font-size: 0.84rem;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  animation: fadeIn 0.3s ease;
}

.standalone-banner-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.standalone-banner-content .banner-icon {
  font-size: 1.4rem;
}

.standalone-banner-content .banner-text strong {
  display: block;
  color: #60a5fa;
  font-size: 0.85rem;
}

.standalone-banner-content .banner-text span {
  color: #cbd5e1;
  font-size: 0.78rem;
}

.standalone-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.btn-banner-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.btn-banner-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.desktop-device-notice {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
}

.desktop-device-notice .notice-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  background: rgba(79, 70, 229, 0.15);
  color: var(--primary);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.desktop-device-notice p {
  margin: 0 0 0.75rem 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.pwa-url-share-box {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ==========================================================================
   PORTAIL D'ADMINISTRATION & BACK-OFFICE SUPER-ADMIN
   ========================================================================== */

.modal-admin {
  max-width: 1120px;
  width: 95%;
  height: 88vh;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}

.admin-modal-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  border-bottom: 2px solid #f59e0b;
}

.admin-modal-header .modal-title {
  color: #ffffff !important;
}

.admin-modal-header .modal-subtitle {
  color: #94a3b8 !important;
}

.admin-modal-header .modal-close-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #f8fafc;
}

.admin-modal-header .modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.admin-badge-glow {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.admin-badge-mini {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  border-radius: var(--radius-pill);
  margin-left: auto;
  letter-spacing: 0.03em;
}

.admin-modal-body {
  padding: 0 !important;
  overflow: hidden;
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
}

.admin-layout {
  display: flex;
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

/* Sidebar Admin */
.admin-sidebar {
  width: 250px;
  background: #0f172a;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  height: 100%;
  min-height: 0;
}

.admin-sidebar-header {
  padding: 1.25rem 1rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-platform-badge {
  font-size: 0.85rem;
  font-weight: 800;
  color: #60a5fa;
  letter-spacing: 0.02em;
}

.admin-nav-list {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 0.5rem;
  gap: 0.25rem;
  flex: 1;
  overflow-y: auto;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  width: 100%;
}

.admin-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #f8fafc;
}

.admin-nav-item.active {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.25) 0%, rgba(59, 130, 246, 0.15) 100%);
  color: #ffffff;
  border-left: 3px solid #60a5fa;
  font-weight: 700;
}

.admin-nav-icon {
  font-size: 1.15rem;
  flex-shrink: 0;
}

.admin-sidebar-footer {
  padding: 0.85rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-version {
  font-size: 0.72rem;
  color: #64748b;
}

.admin-env-pill {
  font-size: 0.68rem;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-pill);
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  font-weight: 700;
}

/* Contenu Admin */
.admin-content {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  padding: 1.5rem 1.5rem 4rem 1.5rem;
  overflow-y: auto;
  background: var(--bg-primary);
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 rgba(0, 0, 0, 0.05);
}

.admin-content::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.admin-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 4px;
}

.admin-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.admin-content::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.admin-tab-pane {
  padding-bottom: 3rem;
}

.admin-pane-header {
  margin-bottom: 1.25rem;
}

.admin-pane-header h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.admin-pane-header p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.admin-pane-header.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}

/* KPIs Grid */
.admin-kpis-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
  .admin-kpis-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.admin-kpi-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.kpi-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  flex-shrink: 0;
}

.kpi-icon-box.blue { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.kpi-icon-box.purple { background: rgba(168, 85, 247, 0.12); color: #a855f7; }
.kpi-icon-box.green { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.kpi-icon-box.amber { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }

.kpi-info {
  display: flex;
  flex-direction: column;
}

.kpi-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin: 0.15rem 0;
}

.kpi-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* System Health Card */
.admin-system-health-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1rem;
}

.admin-system-health-card h4 {
  margin: 0 0 0.85rem 0;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.system-health-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.health-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0.65rem;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}

.health-service {
  font-weight: 600;
  color: var(--text-secondary);
}

.health-status {
  font-weight: 700;
}

.health-status.ok {
  color: #10b981;
}

/* Table Utilisateurs */
.admin-table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  margin-bottom: 2.5rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.admin-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  background: var(--bg-hover);
  color: var(--text-secondary);
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: var(--bg-hover);
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.user-cell-avatar {
  font-size: 1.25rem;
}

.user-cell-name {
  font-weight: 700;
}

.role-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 800;
}

.role-badge.admin {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.role-badge.user {
  background: rgba(59, 130, 246, 0.12);
  color: #2563eb;
}

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
}

.status-badge.active {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.status-badge.suspended {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

/* ==========================================================================
   SUPER-ADMIN : LIENS DIRECTS AUX BASES DE DONNÉES & AUTO-SYNC
   ========================================================================== */

.admin-auto-sync-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(59, 130, 246, 0.08) 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.08);
}

.auto-sync-status-indicator {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.auto-sync-status-indicator strong {
  display: block;
  font-size: 0.92rem;
  color: #10b981;
  margin-bottom: 0.2rem;
}

.auto-sync-status-indicator p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
  line-height: 1.35;
}

.auto-sync-pulse-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: autoSyncPulse 2s infinite;
  flex-shrink: 0;
}

@keyframes autoSyncPulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.auto-sync-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}

.auto-sync-badge-ok {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
}

.auto-sync-time {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Grille de Liens vers les Bases de Données */
.admin-db-links-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.admin-db-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 800px) {
  .admin-db-links-grid {
    grid-template-columns: 1fr;
  }
}

.admin-db-card {
  background: var(--bg-surface, var(--bg-hover));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.admin-db-card-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.db-card-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.admin-db-card-header strong {
  display: block;
  font-size: 0.88rem;
  color: var(--text-primary);
}

.admin-db-card-header small {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.db-badge {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
}

.db-badge.local {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.db-badge.cloud {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.admin-db-card-links {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.admin-db-link-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.admin-db-link-btn:hover {
  background: var(--bg-hover);
  border-color: #3b82f6;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.admin-db-link-btn code.link-url {
  font-family: monospace;
  font-size: 0.72rem;
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.admin-db-link-btn.cloud-link code.link-url {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.admin-quick-db-links-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  margin-top: 1rem;
}

.quick-db-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Form box admin */
.admin-form-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.admin-actions-bar {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

/* Toggles & Monétisation */
.billing-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--bg-hover);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.plans-grid-mini {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-top: 0.75rem;
}

.plan-mini-card {
  display: flex;
  flex-direction: column;
  padding: 0.85rem;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
}

.plan-mini-card.featured {
  border-color: #4f46e5;
  background: rgba(79, 70, 229, 0.06);
}

.plan-mini-card strong {
  font-size: 0.95rem;
  color: var(--text-primary);
}

.plan-mini-card span {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0.2rem 0;
}

.plan-mini-card small {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Switch Toggle */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

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

.slider-toggle {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cbd5e1;
  transition: .3s;
  border-radius: 26px;
}

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

.switch-toggle input:checked + .slider-toggle {
  background-color: #4f46e5;
}

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

/* ========================================================================== */
/* MODULE ÉTIQUETTES SKU PHYSIQUES & RAYONNAGES DE STOCK                      */
/* ========================================================================== */

.sku-physical-label {
  background: #ffffff;
  color: #0f172a;
  border: 2px solid #0f172a;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease;
}

.sku-physical-label:hover {
  transform: translateY(-2px);
}

.storage-bin-badge {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

[data-theme="dark"] .storage-bin-badge {
  background: rgba(129, 140, 248, 0.18);
  color: #a5b4fc;
  border-color: rgba(129, 140, 248, 0.35);
}

.storage-bin-card {
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.2s ease;
}

.storage-bin-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

.storage-bin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.storage-bin-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.storage-bin-count {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

/* Print Stylesheet for Physical SKU Label */
@media print {
  body * {
    visibility: hidden !important;
  }
  #printableSkuLabelCard, #printableSkuLabelCard * {
    visibility: visible !important;
  }
  #printableSkuLabelCard {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: 60mm !important;
    max-width: 60mm !important;
    margin: 0 !important;
    padding: 8px !important;
    border: 2px solid #000 !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #000 !important;
  }
}

/* ========================================================================== */
/* MULTI-PLATEFORMES : EBAY, ETSY & IMPORT PREVIEW                           */
/* ========================================================================== */

.platform-ebay {
  background: rgba(229, 50, 43, 0.15);
  color: #e5322b;
}

.platform-etsy {
  background: rgba(241, 100, 30, 0.15);
  color: #f1641e;
}

.platform-all {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(16, 185, 129, 0.15));
  color: #4f46e5;
  font-weight: 800;
}

.btn-card-copy-ebay {
  background: rgba(229, 50, 43, 0.08);
  color: #e5322b;
  border-color: rgba(229, 50, 43, 0.25);
}

.btn-card-copy-ebay:hover {
  background: #e5322b;
  color: #ffffff;
}

.btn-card-copy-etsy {
  background: rgba(241, 100, 30, 0.08);
  color: #f1641e;
  border-color: rgba(241, 100, 30, 0.25);
}

.btn-card-copy-etsy:hover {
  background: #f1641e;
  color: #ffffff;
}

.delist-action-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg, #ffffff);
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.86rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.delist-action-btn:hover {
  border-color: var(--danger);
  background: rgba(239, 68, 68, 0.05);
}

.delist-action-btn.delisted {
  opacity: 0.6;
  text-decoration: line-through;
  background: var(--bg-secondary);
}

/* ========================================================================== */
/* EXPÉRIENCE D'AUTHENTIFICATION & SÉCURITÉ COMPTE (INSCRIPTION / FORGOT PWD) */
/* ========================================================================== */

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrap input {
  padding-right: 40px !important;
  width: 100%;
}

.btn-toggle-password {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text-secondary);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.btn-toggle-password:hover {
  color: var(--text-primary);
}

.password-strength-container {
  margin-top: 6px;
  margin-bottom: 8px;
}

.password-strength-bars {
  display: flex;
  gap: 4px;
  height: 4px;
  margin-bottom: 4px;
}

.strength-segment {
  flex: 1;
  background: var(--border, #e2e8f0);
  border-radius: 2px;
  transition: background-color 0.3s ease;
}

.strength-segment.active-weak {
  background-color: #ef4444;
}

.strength-segment.active-medium {
  background-color: #f59e0b;
}

.strength-segment.active-strong {
  background-color: #10b981;
}

.password-strength-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.platform-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 6px;
}

.platform-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-secondary);
  transition: all 0.2s ease;
  user-select: none;
}

.platform-checkbox-label:hover {
  border-color: var(--primary);
}

.platform-checkbox-label input:checked + span {
  color: var(--primary);
}

.platform-checkbox-label:has(input:checked) {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
}

.verification-code-input {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 12px;
  padding: 12px 16px;
  font-family: monospace, monospace;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.verification-code-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.verify-email-badge {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 700;
  display: inline-block;
  margin: 6px 0 14px 0;
  font-size: 0.9rem;
}

.transactional-email-card {
  background: var(--card-bg, #ffffff);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 1.25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.email-card-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.email-card-body {
  padding: 14px;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-primary);
}

.email-code-box {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(6, 182, 212, 0.08));
  border: 2px dashed var(--primary);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  margin: 10px 0;
}

.email-code-digits {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 6px;
  color: var(--primary);
  font-family: monospace;
}

/* ==========================================================================
   MODULES AVANCÉS PRO : MESSAGERIE UNIFIÉE, DELIST & RELIST, BOT FAVORIS
   ========================================================================== */

/* Pastille non lue dans le header */
.btn-pill-inbox {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
}

.inbox-unread-bubble {
  background: #ef4444;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-pill);
  min-width: 18px;
  text-align: center;
  line-height: 1.2;
}

/* Layout Messagerie Unifiée */
.inbox-layout {
  display: flex;
  height: 540px;
  max-height: 72vh;
  background: var(--bg-card);
}

.inbox-sidebar {
  width: 320px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--bg-surface, var(--bg-card));
  flex-shrink: 0;
}

.inbox-sidebar-header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inbox-filter-pills {
  display: flex;
  gap: 4px;
}

.inbox-pill {
  flex: 1;
  padding: 4px 6px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  border: 1px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
}

.inbox-pill.active {
  background: var(--primary);
  color: #ffffff;
}

.inbox-conv-list {
  flex: 1;
  overflow-y: auto;
}

.inbox-conv-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
}

.inbox-conv-item:hover {
  background: var(--bg-hover);
}

.inbox-conv-item.active {
  background: rgba(59, 130, 246, 0.1);
  border-left: 3px solid #3b82f6;
}

.inbox-conv-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  position: relative;
}

.inbox-platform-badge-mini {
  position: absolute;
  bottom: -2px;
  right: -2px;
  font-size: 0.65rem;
  padding: 1px 4px;
  border-radius: 4px;
  color: #fff;
  font-weight: 800;
}

.inbox-conv-content {
  flex: 1;
  min-width: 0;
}

.inbox-conv-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2px;
}

.inbox-conv-name {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox-conv-time {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.inbox-conv-item-title {
  font-size: 0.73rem;
  color: var(--primary);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.inbox-conv-snippet {
  font-size: 0.74rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inbox-conv-item.unread .inbox-conv-snippet {
  font-weight: 700;
  color: var(--text-primary);
}

/* Chat Pane */
.inbox-chat-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
}

.inbox-chat-header {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface, var(--bg-card));
}

.inbox-chat-item-summary {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inbox-chat-thumb {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.inbox-messages-container {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-primary, #f8fafc);
}

.inbox-bubble {
  max-width: 75%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.4;
  position: relative;
}

.inbox-bubble.buyer {
  align-self: flex-start;
  background: var(--bg-card, #ffffff);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-bottom-left-radius: 2px;
}

.inbox-bubble.seller {
  align-self: flex-end;
  background: #3b82f6;
  color: #ffffff;
  border-bottom-right-radius: 2px;
}

.inbox-bubble-time {
  display: block;
  font-size: 0.65rem;
  margin-top: 4px;
  opacity: 0.75;
  text-align: right;
}

/* Réponses 1-clic */
.inbox-quick-replies-bar {
  padding: 6px 12px;
  background: var(--bg-surface, var(--bg-card));
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

.inbox-quick-pills {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}

.btn-quick-reply {
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.btn-quick-reply:hover {
  background: var(--bg-hover);
  border-color: #3b82f6;
  color: #3b82f6;
}

.inbox-input-box {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: flex-end;
  background: var(--bg-card);
}

.inbox-textarea {
  flex: 1;
  padding: 8px 10px;
  font-size: 0.82rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-surface, #ffffff);
  color: var(--text-primary);
  resize: none;
  font-family: inherit;
}

.inbox-textarea:focus {
  outline: none;
  border-color: #3b82f6;
}

/* ========================================================================== */
/* APIS DIRECTES MARKETPLACES (EBAY SELL API & ETSY OPEN API V3)              */
/* ========================================================================== */
.card-api-publish-bar {
  display: flex;
  gap: 0.4rem;
  margin: 0.35rem 0 0.4rem 0;
}

.btn-card-api-publish {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.32rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-card-api-ebay {
  background: rgba(229, 50, 43, 0.1);
  color: #e5322b;
  border-color: rgba(229, 50, 43, 0.28);
}

.btn-card-api-ebay:hover {
  background: #e5322b;
  color: #ffffff;
}

.btn-card-api-etsy {
  background: rgba(241, 100, 30, 0.1);
  color: #f1641e;
  border-color: rgba(241, 100, 30, 0.28);
}

.btn-card-api-etsy:hover {
  background: #f1641e;
  color: #ffffff;
}

.badge-api-online {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.32rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
}

.badge-api-online.ebay {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-api-online.ebay:hover {
  background: rgba(16, 185, 129, 0.2);
}

.badge-api-online.etsy {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.badge-api-online.etsy:hover {
  background: rgba(16, 185, 129, 0.2);
}

.btn-api-ebay {
  color: #e5322b !important;
  border-color: rgba(229, 50, 43, 0.4) !important;
}

.btn-api-ebay:hover {
  background: #e5322b !important;
  color: #ffffff !important;
}

.btn-api-etsy {
  color: #f1641e !important;
  border-color: rgba(241, 100, 30, 0.4) !important;
}

.btn-api-etsy:hover {
  background: #f1641e !important;
  color: #ffffff !important;
}

.admin-marketplaces-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* =====================================================================
   ADMIN BACK-OFFICE : MODÈLES D'EMAILS & GESTION SMTP
   ===================================================================== */
.email-template-selector-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.email-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.email-tab-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.email-tab-btn.active {
  background: rgba(67, 97, 238, 0.12);
  color: var(--primary);
  border-color: rgba(67, 97, 238, 0.3);
}

.email-template-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

@media (max-width: 992px) {
  .email-template-grid {
    grid-template-columns: 1fr;
  }
}

.email-tags-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.email-tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.email-tag-pill code {
  color: var(--primary);
  font-weight: 800;
  font-size: 0.76rem;
}

.email-tag-pill:hover {
  background: rgba(67, 97, 238, 0.15);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.email-template-textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.8rem;
  line-height: 1.45;
  tab-size: 2;
  white-space: pre;
}

/* Aperçu direct de l'email */
.admin-email-preview-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.email-preview-client-header {
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.6rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.client-dots {
  display: flex;
  gap: 5px;
}

.client-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.client-dots .dot.red { background: #ef4444; }
.client-dots .dot.yellow { background: #f59e0b; }
.client-dots .dot.green { background: #10b981; }

.client-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.email-preview-meta {
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.8rem;
  color: #334155;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.email-preview-meta strong {
  color: #0f172a;
}

.email-preview-body-container {
  padding: 1.25rem;
  max-height: 520px;
  overflow-y: auto;
  background: #ffffff;
}

/* =====================================================================
   ADMIN BACK-OFFICE : CARNET D'ADRESSES & LISTES DE CONTACTS
   ===================================================================== */
.admin-broadcast-box {
  animation: fadeInDown 0.2s ease-out;
}

.btn-contact-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  border-radius: var(--radius-sm);
  background: rgba(67, 97, 238, 0.1);
  color: var(--primary);
  border: 1px solid rgba(67, 97, 238, 0.25);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-contact-copy:hover {
  background: var(--primary);
  color: #ffffff;
}

/* =====================================================================
   ADMIN BACK-OFFICE : KPIS, FILTRES AVANCÉS & GESTION FORFAITS / MDP
   ===================================================================== */

.admin-kpi-subgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}

.admin-kpi-minibar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.admin-kpi-minibar:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.kpi-minibar-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.kpi-minibar-val {
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
}

.kpi-minibar-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.admin-users-filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-filter-select {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  font-weight: 600;
  cursor: pointer;
}

.badge-table-plan {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.badge-table-plan.free {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-table-plan.pro {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.badge-table-plan.expert {
  background: rgba(139, 92, 246, 0.15);
  color: #7c3aed;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.btn-plan-quick-pill {
  padding: 0.15rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-plan-quick-pill.upgrade-pro {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.3);
}

.btn-plan-quick-pill.upgrade-pro:hover {
  background: #f59e0b;
  color: #ffffff;
}

.btn-plan-quick-pill.upgrade-expert {
  background: rgba(139, 92, 246, 0.15);
  color: #6d28d9;
  border-color: rgba(139, 92, 246, 0.3);
}

.btn-plan-quick-pill.upgrade-expert:hover {
  background: #8b5cf6;
  color: #ffffff;
}

.btn-plan-quick-pill.downgrade {
  background: var(--bg-hover);
  color: var(--text-secondary);
  border-color: var(--border-color);
}

.btn-plan-quick-pill.downgrade:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

@media (max-width: 860px) {
  .modal-admin {
    width: 98%;
    height: 94vh;
    max-height: 94vh;
  }
  .admin-layout {
    flex-direction: column;
  }
  .admin-sidebar {
    width: 100%;
    height: auto;
    max-height: 170px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .admin-nav-list {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.5rem;
  }
  .admin-nav-item {
    white-space: nowrap;
  }
  .admin-sidebar-footer {
    display: none;
  }
  .admin-content {
    padding: 1rem 1rem 3.5rem 1rem;
  }
}

/* ==========================================================================
   LAYOUT SAAS MODERNE & SIDEBAR RÉTRACTABLE (P1)
   ========================================================================== */

.btn-toggle-sidebar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 1.15rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 12px;
  flex-shrink: 0;
}

.btn-toggle-sidebar:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
  color: var(--primary);
}

.app-layout-wrapper {
  display: flex;
  min-height: calc(100vh - 72px);
  width: 100%;
  position: relative;
  background: var(--bg-primary);
}

/* Sidebar principale */
.app-sidebar {
  width: 250px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  flex-shrink: 0;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s ease;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 90;
}

/* Mode rétracté (icônes seules) */
.app-sidebar.collapsed {
  width: 72px;
}

.app-sidebar.collapsed .sidebar-user-details,
.app-sidebar.collapsed .sidebar-section-title,
.app-sidebar.collapsed .sidebar-nav-label,
.app-sidebar.collapsed .sidebar-nav-badge,
.app-sidebar.collapsed .sidebar-nav-tag,
.app-sidebar.collapsed .sidebar-ext-text {
  display: none !important;
}

.app-sidebar.collapsed .sidebar-user-card {
  padding: 12px 8px;
  justify-content: center;
}

.app-sidebar.collapsed .sidebar-nav-item {
  justify-content: center;
  padding: 10px 0;
}

.app-sidebar.collapsed .sidebar-collapse-btn span {
  transform: rotate(180deg);
}

/* Carte utilisateur en tête de sidebar */
.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(245, 158, 11, 0.05) 100%);
  border-bottom: 1px solid var(--border);
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-light, #ede9fe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  border: 1.5px solid var(--primary);
}

.sidebar-user-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: #059669;
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  width: fit-content;
  margin-top: 2px;
}

/* Sections & Liens de navigation */
.sidebar-section {
  padding: 12px 10px 4px;
}

.sidebar-section-title {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0 10px 6px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  position: relative;
}

.sidebar-nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sidebar-nav-item.active {
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
  font-weight: 700;
}

.sidebar-nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--primary);
}

.sidebar-nav-icon {
  font-size: 17px;
  line-height: 1;
  flex-shrink: 0;
}

.sidebar-nav-label {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-nav-badge {
  background: var(--border);
  color: var(--text-primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

.sidebar-nav-item.active .sidebar-nav-badge {
  background: var(--primary);
  color: #fff;
}

.sidebar-nav-tag {
  background: #f59e0b;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* Pied de Sidebar */
.sidebar-footer {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-extension-pill {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 8px;
  padding: 7px 10px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.sidebar-extension-pill:hover {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.45);
}

.sidebar-ext-icon {
  font-size: 18px;
}

.sidebar-ext-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-ext-text strong {
  font-size: 0.78rem;
  color: #059669;
  line-height: 1.2;
}

.sidebar-ext-text small {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.sidebar-collapse-btn {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.sidebar-collapse-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Backdrop Mobile */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  z-index: 1150;
}

/* Responsive Tablette & Mobile */
@media (max-width: 992px) {
  .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100vh;
    z-index: 1200;
    transform: translateX(-100%);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
  }

  .app-sidebar.mobile-open {
    transform: translateX(0);
  }

  .sidebar-backdrop.active {
    display: block;
  }
}

/* ==========================================================================
   PIED DE PAGE (FOOTER) & MODALES LÉGALES & CONTACT
   ========================================================================== */

.app-footer {
  margin-top: 3.5rem;
  padding: 1.75rem 0.5rem 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
}

.footer-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-secondary);
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--primary);
}

.footer-email-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.footer-email-badge:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-hover);
}

.legal-article-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.legal-article-card h3 {
  font-size: 0.95rem;
  margin: 0 0 6px 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.legal-article-card p,
.legal-article-card ul {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.legal-article-card ul {
  margin: 6px 0 0 16px;
  padding: 0;
}

.legal-article-card code {
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-size: 0.8rem;
}

/* ==========================================================================
   STUDIO MANNEQUIN IA VIRTUEL & TRY-ON PORTÉ
   ========================================================================== */

.btn-mannequin-pulse {
  background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
  border: none;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.35);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-mannequin-pulse:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(236, 72, 153, 0.5);
  color: #ffffff;
}

.badge-mini-sparkle {
  background: #ffffff;
  color: #db2777;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.mannequin-intro-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
  border: 1px solid rgba(236, 72, 153, 0.25);
  border-radius: 10px;
  margin-bottom: 1.25rem;
}
.mannequin-intro-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}
.mannequin-intro-text strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.95rem;
  margin-bottom: 2px;
}
.mannequin-intro-text p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.mannequin-studio-layout {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 860px) {
  .mannequin-studio-layout {
    grid-template-columns: 1fr;
  }
}

.mannequin-canvas-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.mannequin-studio-canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.mannequin-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.mannequin-thumbs-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 8px;
}
.mannequin-thumb-btn {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 8px;
  border: 2px solid var(--border-color);
  background: var(--bg-surface);
  padding: 2px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}
.mannequin-thumb-btn.active {
  border-color: #ec4899;
  box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.3);
}
.mannequin-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
}
.mannequin-thumb-btn span {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 4px;
}

.mannequin-models-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mannequin-model-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  background: var(--bg-surface);
  cursor: pointer;
  transition: all 0.15s ease;
}
.mannequin-model-card:hover {
  border-color: #ec4899;
  background: rgba(236, 72, 153, 0.04);
}
.mannequin-model-card.active {
  border-color: #ec4899;
  background: rgba(236, 72, 153, 0.08);
  box-shadow: 0 0 0 1px #ec4899;
}
.mannequin-model-card .model-emoji {
  font-size: 1.6rem;
  line-height: 1;
}
.mannequin-model-card .model-info strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-primary);
}
.mannequin-model-card .model-info small {
  display: block;
  font-size: 0.72rem;
  color: var(--text-secondary);
  line-height: 1.25;
}

.mannequin-backdrop-grid {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.mannequin-backdrop-btn.active {
  background: #ec4899;
  color: #fff;
  border-color: #ec4899;
}





