/* ============================================
   QLOA Design System - Monochrome Moderne
   Inspiré de Quote-Master
   ============================================ */

/* === VARIABLES CSS === */
:root {
  /* Light Mode */
  --bg-primary: #F5F5F7;
  --bg-secondary: #FFFFFF;
  --bg-card: rgba(255, 255, 255, 0.8);
  --border: rgba(0, 0, 0, 0.1);
  --text-primary: #000000;
  --text-secondary: #6B7280;
  
  /* Glass Effects */
  --glass-bg: rgba(255, 255, 255, 0.4);
  --glass-border: rgba(0, 0, 0, 0.1);
  --blur: 20px;
}

.dark {
  /* Dark Mode */
  --bg-primary: #000000;
  --bg-secondary: #151516;
  --bg-card: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.1);
  --text-primary: #FFFFFF;
  --text-secondary: #9CA3AF;
  
  --glass-bg: rgba(0, 0, 0, 0.4);
  --glass-border: rgba(255, 255, 255, 0.1);
}

/* === LIQUID GLASS BACKGROUND === */
.liquid-background {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.liquid-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.55;
  animation: blob 20s infinite;
}

.dark .liquid-blob {
  mix-blend-mode: lighten;
}

.liquid-blob-1 {
  top: -10%;
  left: -10%;
  width: 50rem;
  height: 50rem;
  background: linear-gradient(135deg, #C7D2FE 0%, #E5E7EB 100%); /* indigo soft (maquette) */
}

.dark .liquid-blob-1 {
  background: rgba(255, 255, 255, 0.05);
}

.liquid-blob-2 {
  bottom: -20%;
  right: -10%;
  width: 40rem;
  height: 40rem;
  background: linear-gradient(135deg, #FBCFE8 0%, #D1D5DB 100%); /* rose soft (maquette) */
  animation-delay: 2s;
}

.dark .liquid-blob-2 {
  background: rgba(255, 255, 255, 0.08);
}

.liquid-blob-3 {
  top: 40%;
  left: 35%;
  width: 30rem;
  height: 30rem;
  background: linear-gradient(135deg, #BFDBFE 0%, #E0E7FF 100%); /* bleu soft (maquette) */
  opacity: 0.4;
  animation-delay: 4s;
}

.dark .liquid-blob-3 {
  background: rgba(255, 255, 255, 0.03);
}

@keyframes blob {
  0% { transform: translate(0px, 0px) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
  100% { transform: translate(0px, 0px) scale(1); }
}

/* === NAVBAR TOP (Quote-Master Style) === */
.navbar-glass {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark .navbar-glass {
  background: rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* === COLLAPSIBLE SECTIONS (accordion — fermé par défaut, .open pour ouvrir) === */
.sidebar-section .section-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

.sidebar-section.open .section-content {
  max-height: 500px;
  opacity: 1;
  overflow: visible;
}

.chevron-icon {
  transform: rotate(-90deg);
  transition: transform 0.2s ease;
}

.sidebar-section.open .chevron-icon {
  transform: rotate(0deg);
}

/* === UTILITY CLASSES === */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.dark .glass-card:hover {
  box-shadow: 0 25px 50px -12px rgba(255, 255, 255, 0.1);
}

/* === SCROLLBAR HIDDEN === */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* === TRANSITIONS GLOBALES === */
* {
  transition-property: background-color, border-color, color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

/* ===== Canon titre de page (H1) — toutes les pages admin V3 =====
   Règle : chaque page affiche son nom en H1 24px / 900 / -0.02em, sous-titre 12px secondaire dessous.
   Réf : dashboard_unified.html + chat_sessions.html (2026-06-04) */
.page-title-h1 {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  color: #000;
}
.dark .page-title-h1 { color: #fff; }
.page-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 4px 0 0;
}

/* ===================================================================
   Canon UI pages V3 (dashboard + CRM) — UNIFORMISATION 2026-06-04
   Boutons pill 999px · padding 6/12 · 12px/600 · selects pill · tabs pill.
   !important : les <style> de page chargent après ce fichier.
   =================================================================== */
.dash-btn, .crm-btn, .ent-btn, .ls-btn, .pipe-btn,
.dash-btn-primary, .crm-btn-primary, .ent-btn-primary {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border: 1px solid var(--border);
  background: #fff; color: #000;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: all 0.15s;
}
.dark .dash-btn, .dark .crm-btn, .dark .ent-btn, .dark .ls-btn, .dark .pipe-btn { background: rgba(255,255,255,0.06); color: #fff; }
.dash-btn:hover, .crm-btn:hover, .ent-btn:hover, .ls-btn:hover, .pipe-btn:hover { background: #f5f5f5; }
.dark .dash-btn:hover, .dark .crm-btn:hover, .dark .ent-btn:hover { background: rgba(255,255,255,0.1); }
.dash-btn-primary, .crm-btn-primary, .ent-btn-primary { background: #000 !important; color: #fff !important; border-color: #000 !important; }
.dark .dash-btn-primary, .dark .crm-btn-primary, .dark .ent-btn-primary { background: #fff !important; color: #000 !important; border-color: #fff !important; }

.dash-select, .crm-select, .ent-select {
  border-radius: 999px !important;
  padding: 6px 12px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border: 1px solid var(--border);
  background: #fff; color: #000;
}
.dark .dash-select, .dark .crm-select, .dark .ent-select { background: rgba(255,255,255,0.06); color: #fff; }

/* ===== Top-menus = canon INBOX (.v3-filters / .v3-ftab) sur TOUTES les pages 2026-06-04 ===== */
/* Conteneurs de tabs (nowrap + scroll horizontal si long) */
/* §fix #227 (2026-07-28) : #view-tabs / .pipe-view-tabs / .ls-tabs / .ent-view-switcher RETIRÉS
   du sélecteur — l'ID écrasait la barre canon du dashboard (incident 2026-07-28), les 3 autres
   étaient morts ou re-neutralisés page par page. */
.crm-sub-tabs, .ent-sub-tabs, .tl-tabs, .fent-tabs {
  display: flex !important; gap: 2px !important; padding: 4px !important;
  background: rgba(0,0,0,0.03) !important; border-radius: 14px !important;
  flex-wrap: nowrap !important; overflow-x: auto; width: fit-content; max-width: 100%; scrollbar-width: none;
  margin-bottom: 16px !important;
}
.crm-sub-tabs::-webkit-scrollbar, .ent-sub-tabs::-webkit-scrollbar, .tl-tabs::-webkit-scrollbar,
.fent-tabs::-webkit-scrollbar { display: none; }
.dark .crm-sub-tabs, .dark .ent-sub-tabs, .dark .tl-tabs, .dark .fent-tabs { background: rgba(255,255,255,0.05) !important; }
/* Items de tabs */
.ent-view-btn, .ent-sub-tab, .crm-sub-tab, .pipe-view-tab, .ls-tab,
.tl-tab, .fent-tab, .tl-tabs > button, .view-tab {
  padding: 7px 11px !important; font-size: 11.5px !important; font-weight: 600 !important;
  border-radius: 9px !important; background: none !important; border: none !important;
  color: rgba(0,0,0,0.5) !important; white-space: nowrap; cursor: pointer; transition: all 0.15s; flex-shrink: 0;
}
.dark .ent-view-btn, .dark .ent-sub-tab, .dark .crm-sub-tab, .dark .pipe-view-tab,
.dark .ls-tab, .dark .tl-tab, .dark .fent-tab, .dark .tl-tabs > button, .dark .view-tab { color: rgba(255,255,255,0.45) !important; }
/* Item actif = pastille blanche (inbox) */
.ent-view-btn.active, .ent-sub-tab.active, .crm-sub-tab.active, .pipe-view-tab.active,
.ls-tab.active, .tl-tab.active, .fent-tab.active, .tl-tabs > button.active, .view-tab.active {
  color: #000 !important; background: rgba(255,255,255,0.9) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04) !important;
}
.dark .ent-view-btn.active, .dark .ent-sub-tab.active, .dark .crm-sub-tab.active,
.dark .pipe-view-tab.active, .dark .ls-tab.active, .dark .tl-tab.active, .dark .fent-tab.active,
.dark .tl-tabs > button.active, .dark .view-tab.active {
  color: #fff !important; background: rgba(255,255,255,0.12) !important;
}

/* §fix #227 (2026-07-28) : bloc « panels slide-in 2026-06-04 » SUPPRIMÉ — IDs morts
   (#deal-panel-content, #pipe-filters-panel-content) et son `border !important` cassait le
   liseré gauche canon QSide (design-tokens.css bloc SIDE PANELS CANON) sur toutes les pages. */
