/* ============================================================
   ProspectIA — Design System v2
   ============================================================ */

:root {
  --primary:        #4F46E5;
  --primary-dark:   #4338CA;
  --primary-light:  #EEF2FF;
  --accent:         #7C3AED;
  --success:        #059669;
  --success-light:  #ECFDF5;
  --warning:        #D97706;
  --warning-light:  #FFFBEB;
  --danger:         #DC2626;
  --danger-light:   #FEF2F2;
  --gray-50:        #F9FAFB;
  --gray-100:       #F3F4F6;
  --gray-200:       #E5E7EB;
  --gray-300:       #D1D5DB;
  --gray-400:       #9CA3AF;
  --gray-500:       #6B7280;
  --gray-600:       #4B5563;
  --gray-700:       #374151;
  --gray-800:       #1F2937;
  --gray-900:       #111827;
  --white:          #FFFFFF;
  --radius-sm:      6px;
  --radius:         8px;
  --radius-lg:      12px;
  --radius-xl:      16px;
  --shadow-xs:      0 1px 2px rgba(0,0,0,.05);
  --shadow-sm:      0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow:         0 4px 6px rgba(0,0,0,.05), 0 2px 4px rgba(0,0,0,.04);
  --shadow-md:      0 10px 15px rgba(0,0,0,.06), 0 4px 6px rgba(0,0,0,.04);
  --shadow-lg:      0 20px 25px rgba(0,0,0,.08), 0 8px 10px rgba(0,0,0,.04);
  --font:           'Inter', system-ui, -apple-system, sans-serif;
  --sidebar-w:      256px;
  --topbar-h:       64px;
  --transition:     .15s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Reset ── */
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }
button { font-family: var(--font); cursor: pointer; }
input, select, textarea { font-family: var(--font); }
img { max-width: 100%; }

/* ================================================================
   BOUTONS
   ================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .5rem 1rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  outline: none;
}
.btn:focus-visible { box-shadow: 0 0 0 3px rgba(79,70,229,.3); }
.btn:active { transform: translateY(1px); }

.btn-primary   { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

.btn-secondary { background: var(--white); color: var(--gray-700); border-color: var(--gray-300); }
.btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-400); }

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

.btn-danger    { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #b91c1c; }

.btn-ghost     { background: transparent; color: var(--gray-600); border-color: transparent; }
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-800); }

.btn-sm  { padding: .375rem .75rem; font-size: .8125rem; }
.btn-lg  { padding: .75rem 1.5rem; font-size: 1rem; }
.btn-full { width: 100%; }

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-sm svg { width: 14px; height: 14px; }

/* ================================================================
   FORMULAIRES
   ================================================================ */
.form-group { margin-bottom: 1.25rem; }

label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: .375rem;
}

.input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: .5625rem .875rem;
  background: var(--white);
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: .875rem;
  color: var(--gray-900);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  appearance: none;
}
.input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79,70,229,.12);
}
input::placeholder, textarea::placeholder { color: var(--gray-400); }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .75rem center; padding-right: 2.5rem; }
textarea { resize: vertical; min-height: 80px; }

/* ================================================================
   ALERTES
   ================================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .875rem 1rem;
  border-radius: var(--radius);
  font-size: .875rem;
  border: 1px solid;
  margin-bottom: 1rem;
}
.alert-success { background: var(--success-light); border-color: #A7F3D0; color: #065F46; }
.alert-error   { background: var(--danger-light);  border-color: #FECACA; color: #991B1B; }
.alert-warning { background: var(--warning-light); border-color: #FDE68A; color: #92400E; }
.alert-info    { background: var(--primary-light);  border-color: #C7D2FE; color: #3730A3; }

/* ================================================================
   BADGES
   ================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .625rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.5;
}
.badge-trial    { background: #FEF3C7; color: #92400E; }
.badge-active   { background: #D1FAE5; color: #065F46; }
.badge-danger   { background: #FEE2E2; color: #991B1B; }
.badge-gray     { background: var(--gray-100); color: var(--gray-600); }
.badge-primary  { background: var(--primary-light); color: var(--primary-dark); }

/* ================================================================
   CARDS
   ================================================================ */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-xs);
}
.card-body   { padding: 1.5rem; }
.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title  { font-size: .9375rem; font-weight: 700; color: var(--gray-900); }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-100); }

/* ================================================================
   TABLEAU
   ================================================================ */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: .75rem 1rem;
  text-align: left;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-500);
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}
tbody td {
  padding: .875rem 1rem;
  font-size: .875rem;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--gray-50); }

/* ================================================================
   LAYOUT AUTH
   ================================================================ */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--white);
}

.auth-left {
  background: linear-gradient(135deg, #312E81 0%, #4F46E5 50%, #7C3AED 100%);
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-left::before {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  top: -100px; right: -100px;
}
.auth-left::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  bottom: -80px; left: -80px;
}

.auth-brand { display: flex; align-items: center; gap: .75rem; }
.auth-brand-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,.15);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
}
.auth-brand-icon svg { width: 22px; height: 22px; color: #fff; }
.auth-brand-name { font-size: 1.25rem; font-weight: 800; color: #fff; }

.auth-left-content { position: relative; z-index: 1; }
.auth-left-content h2 { font-size: 1.75rem; font-weight: 800; color: #fff; margin-bottom: .75rem; line-height: 1.3; }
.auth-left-content p  { color: rgba(255,255,255,.75); font-size: .9375rem; line-height: 1.7; }

.auth-features { list-style: none; margin-top: 1.5rem; }
.auth-features li {
  display: flex; align-items: center; gap: .625rem;
  color: rgba(255,255,255,.85);
  font-size: .875rem;
  padding: .4rem 0;
}
.auth-features li svg { width: 18px; height: 18px; color: #A5B4FC; flex-shrink: 0; }

.auth-right {
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
}
.auth-form-wrap {
  width: 100%;
  max-width: 400px;
}
.auth-form-wrap h1 { font-size: 1.625rem; font-weight: 800; color: var(--gray-900); margin-bottom: .375rem; }
.auth-form-wrap .auth-sub { color: var(--gray-500); font-size: .9375rem; margin-bottom: 2rem; }
.auth-footer-link { text-align: center; margin-top: 1.5rem; font-size: .875rem; color: var(--gray-500); }
.auth-footer-link a { font-weight: 600; color: var(--primary); }

.trial-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: .8125rem;
  font-weight: 600;
  padding: .5rem .875rem;
  border-radius: 999px;
  border: 1px solid #C7D2FE;
  margin-bottom: 1.5rem;
}
.trial-badge svg { width: 14px; height: 14px; }

@media (max-width: 768px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-left  { display: none; }
  .auth-right { padding: 1.5rem; }
}

/* ================================================================
   LAYOUT APP (sidebar + topbar)
   ================================================================ */
.app-layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--gray-900);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
  border-right: 1px solid rgba(255,255,255,.05);
}

.sidebar-logo {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}
.sidebar-logo .logo-icon {
  width: 34px; height: 34px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-logo .logo-icon svg { width: 18px; height: 18px; color: #fff; }
.sidebar-logo .logo-name { font-size: .9375rem; font-weight: 800; color: #fff; }

.sidebar-nav { flex: 1; padding: .75rem 0; }

.nav-section {
  padding: 1rem 1rem .375rem;
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.3);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .5625rem 1rem;
  margin: .125rem .625rem;
  border-radius: var(--radius);
  color: rgba(255,255,255,.55);
  font-size: .875rem;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: rgba(255,255,255,.85); text-decoration: none; }
.nav-item.active { background: var(--primary); color: #fff; }
.nav-item.active:hover { background: var(--primary-dark); }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.nav-item-upgrade {
  margin: .75rem .625rem;
  padding: .75rem 1rem;
  background: linear-gradient(135deg, rgba(79,70,229,.3), rgba(124,58,237,.3));
  border: 1px solid rgba(79,70,229,.4);
  border-radius: var(--radius);
  display: flex; align-items: center; gap: .75rem;
  color: #A5B4FC;
  font-size: .8125rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}
.nav-item-upgrade:hover { background: linear-gradient(135deg, rgba(79,70,229,.5), rgba(124,58,237,.5)); color: #C7D2FE; text-decoration: none; }
.nav-item-upgrade svg { width: 16px; height: 16px; flex-shrink: 0; }

.sidebar-user {
  padding: 1rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}
.sidebar-user-avatar {
  width: 32px; height: 32px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8125rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name  { font-size: .8125rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role  { font-size: .75rem; color: rgba(255,255,255,.4); }

/* Main */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Topbar */
.topbar {
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-left { display: flex; align-items: center; gap: .75rem; }
.topbar-title { font-size: 1.0625rem; font-weight: 700; color: var(--gray-900); }
.topbar-breadcrumb { font-size: .8125rem; color: var(--gray-400); }
.topbar-right,
.topbar-actions { display: flex; align-items: center; gap: .75rem; }

/* Page content */
.page-content { padding: 1.5rem; flex: 1; max-width: 1400px; }

/* ================================================================
   COMPOSANTS DASHBOARD
   ================================================================ */

/* Stat cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  box-shadow: var(--shadow-xs);
}
.stat-card-left { flex: 1; }
.stat-card-label { font-size: .8125rem; font-weight: 500; color: var(--gray-500); margin-bottom: .375rem; }
.stat-card-value { font-size: 1.875rem; font-weight: 800; color: var(--gray-900); line-height: 1; }
.stat-card-sub   { font-size: .75rem; color: var(--gray-400); margin-top: .375rem; }
.stat-card-icon  {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-card-icon svg { width: 22px; height: 22px; }
.stat-card-icon.indigo { background: #EEF2FF; color: #4F46E5; }
.stat-card-icon.purple { background: #F5F3FF; color: #7C3AED; }
.stat-card-icon.green  { background: #ECFDF5; color: #059669; }
.stat-card-icon.orange { background: #FFF7ED; color: #D97706; }

/* ================================================================
   WELCOME BANNER
   ================================================================ */
.welcome-banner {
  background: linear-gradient(135deg, #312E81 0%, #4F46E5 60%, #7C3AED 100%);
  border-radius: var(--radius-xl);
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
  overflow: hidden;
}
.welcome-banner::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,.05);
  right: -80px; top: -100px;
}
.welcome-banner h2 { font-size: 1.25rem; font-weight: 800; color: #fff; margin-bottom: .25rem; }
.welcome-banner p  { color: rgba(255,255,255,.75); font-size: .875rem; }
.welcome-banner .btn-white {
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.3);
  white-space: nowrap;
  flex-shrink: 0;
  position: relative; z-index: 1;
}
.welcome-banner .btn-white:hover { background: rgba(255,255,255,.25); }

/* ================================================================
   QUICK ACTIONS
   ================================================================ */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.quick-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.quick-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}
.quick-card-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
}
.quick-card-icon svg { width: 20px; height: 20px; }
.quick-card h3 { font-size: .875rem; font-weight: 700; color: var(--gray-900); }
.quick-card p  { font-size: .8125rem; color: var(--gray-400); }

/* ================================================================
   PROSPECTS — SEARCH PAGE
   ================================================================ */
.search-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.5rem;
  align-items: start;
}
.search-panel { position: sticky; top: calc(var(--topbar-h) + 1.5rem); }

.panel-label {
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gray-400);
  margin-bottom: .625rem;
  margin-top: 1rem;
}
.panel-label:first-child { margin-top: 0; }

.sector-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
  margin-bottom: 1rem;
}
.sector-tag {
  padding: .3rem .7rem;
  background: var(--gray-100);
  border: 1.5px solid var(--gray-200);
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--gray-600);
  cursor: pointer;
  transition: all var(--transition);
}
.sector-tag:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.sector-tag.active { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* Prospect card */
.prospect-card {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1.125rem 1.25rem;
  margin-bottom: .75rem;
  transition: all var(--transition);
  cursor: pointer;
}
.prospect-card:hover { border-color: var(--gray-300); box-shadow: var(--shadow); }
.prospect-card.selected { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }

.prospect-card-head {
  display: flex;
  align-items: flex-start;
  gap: .875rem;
  margin-bottom: .875rem;
}
.prospect-avatar {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  background: var(--primary-light);
  color: var(--primary);
  font-size: .9375rem;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.prospect-name { font-size: .9375rem; font-weight: 700; color: var(--gray-900); }
.prospect-activity { font-size: .8125rem; color: var(--gray-400); margin-top: .125rem; }

.prospect-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
  margin-bottom: .875rem;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .625rem;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: .75rem;
  color: var(--gray-600);
}
.chip svg { width: 12px; height: 12px; }

.prospect-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* IA Analysis box */
.ia-box {
  background: linear-gradient(135deg, var(--primary-light), #F5F3FF);
  border: 1.5px solid #C7D2FE;
  border-radius: var(--radius-lg);
  padding: 1.125rem 1.25rem;
  margin-bottom: 1.25rem;
  display: none;
}
.ia-box.visible { display: block; }
.ia-box-title { font-size: .875rem; font-weight: 700; color: #312E81; margin-bottom: .875rem; display: flex; align-items: center; gap: .5rem; }
.ia-box-title svg { width: 18px; height: 18px; }
.ia-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .875rem; }
.ia-item label { font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-400); }
.ia-item p     { font-size: .8125rem; color: var(--gray-800); margin-top: .2rem; }
.ia-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .5rem; }
.ia-tag {
  padding: .2rem .55rem;
  background: rgba(79,70,229,.1);
  color: #312E81;
  border-radius: 999px;
  font-size: .6875rem;
  font-weight: 600;
}

/* Results header */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--gray-200);
}
.results-count { font-size: .875rem; color: var(--gray-500); }
.results-count strong { color: var(--gray-900); font-weight: 700; }

/* Select bar */
.select-bar {
  background: var(--gray-900);
  border-radius: var(--radius-lg);
  padding: .875rem 1.25rem;
  display: none;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.select-bar.visible { display: flex; }
.select-bar span { font-size: .875rem; font-weight: 600; color: #fff; }

/* Empty / loading states */
.state-box {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--gray-400);
}
.state-box .state-icon { font-size: 2rem; margin-bottom: .75rem; }
.state-box p { font-size: .9375rem; }
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .65s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Pagination */
.pagination { display: flex; gap: .375rem; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }
.page-btn {
  width: 34px; height: 34px;
  border-radius: var(--radius);
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  font-size: .8125rem;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--gray-600);
  text-decoration: none;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ================================================================
   MODAL
   ================================================================ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(16px) scale(.98);
  transition: all .2s;
}
.modal-overlay.open .modal { transform: none; }
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 1rem; font-weight: 700; color: var(--gray-900); }
.modal-close { background: none; border: none; color: var(--gray-400); font-size: 1.25rem; cursor: pointer; padding: .25rem; border-radius: var(--radius-sm); }
.modal-close:hover { background: var(--gray-100); color: var(--gray-700); }
.modal-body   { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-200); display: flex; gap: .75rem; justify-content: flex-end; }

.msg-output {
  background: var(--gray-50);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1rem;
  font-size: .875rem;
  line-height: 1.7;
  white-space: pre-wrap;
  min-height: 120px;
  color: var(--gray-700);
}

/* ================================================================
   DRAWER (prospects)
   ================================================================ */
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.drawer-overlay.open { opacity: 1; pointer-events: all; }
.drawer {
  position: fixed;
  top: 0; right: -540px; bottom: 0;
  width: 500px; max-width: 95vw;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  z-index: 201;
  display: flex; flex-direction: column;
  transition: right .25s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.drawer-overlay.open .drawer { right: 0; }
.drawer-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
}
.drawer-title { font-size: 1rem; font-weight: 800; color: var(--gray-900); }
.drawer-sub   { font-size: .8125rem; color: var(--gray-400); margin-top: .2rem; }
.drawer-close { background: none; border: none; color: var(--gray-400); font-size: 1.25rem; cursor: pointer; flex-shrink: 0; }
.drawer-body  { flex: 1; overflow-y: auto; padding: 1.25rem 1.5rem; }
.drawer-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--gray-200); display: flex; gap: .5rem; }

.drawer-section { margin-bottom: 1.5rem; }
.drawer-section-title { font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-400); margin-bottom: .75rem; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.info-item label { font-size: .6875rem; font-weight: 700; text-transform: uppercase; color: var(--gray-400); }
.info-item p { font-size: .875rem; color: var(--gray-800); margin-top: .15rem; }

/* ================================================================
   STATUT BADGES PROSPECTS
   ================================================================ */
.statut-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .625rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.statut-nouveau       { background: var(--gray-100); color: var(--gray-600); }
.statut-contacté      { background: #DBEAFE; color: #1E40AF; }
.statut-en_discussion { background: #FEF3C7; color: #92400E; }
.statut-converti      { background: #D1FAE5; color: #065F46; }
.statut-perdu         { background: #FEE2E2; color: #991B1B; }

.score-pill { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; font-weight: 800; font-size: .75rem; }
.score-faible    { background: #FEE2E2; color: #991B1B; }
.score-moyen     { background: #FEF3C7; color: #92400E; }
.score-fort      { background: #D1FAE5; color: #065F46; }
.score-excellent { background: #EDE9FE; color: #5B21B6; }

/* ================================================================
   FILTER BAR
   ================================================================ */
.filter-bar {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: flex-end;
}
.filter-bar .form-group { margin: 0; flex: 1; min-width: 140px; }

/* Status tabs */
.status-tabs { display: flex; gap: .375rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.status-tab {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .875rem;
  border-radius: 999px;
  font-size: .8125rem;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--gray-200);
  background: var(--white);
  color: var(--gray-600);
  transition: all var(--transition);
}
.status-tab:hover { border-color: var(--primary); color: var(--primary); }
.status-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.status-tab .count { background: rgba(0,0,0,.1); border-radius: 999px; padding: .05rem .4rem; font-size: .6875rem; }
.status-tab.active .count { background: rgba(255,255,255,.2); }

/* ================================================================
   MINI STATS (prospects page)
   ================================================================ */
.mini-stats { display: flex; gap: .75rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.mini-stat {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: .875rem 1.25rem;
  flex: 1; min-width: 120px;
}
.mini-stat .val { font-size: 1.5rem; font-weight: 800; color: var(--gray-900); }
.mini-stat .lbl { font-size: .75rem; color: var(--gray-400); margin-top: .15rem; }

/* ================================================================
   TOAST
   ================================================================ */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 500;
  background: var(--gray-900); color: #fff;
  padding: .875rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: .875rem; font-weight: 600;
  max-width: 320px;
  box-shadow: var(--shadow-lg);
  transform: translateY(80px); opacity: 0;
  transition: all .25s;
  border-left: 4px solid transparent;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: var(--success); }
.toast.error   { border-color: var(--danger); }

/* ================================================================
   PRICING PAGE
   ================================================================ */
.pricing-page { min-height: 100vh; background: var(--gray-50); }
.pricing-nav {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 1rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
}
.pricing-hero { text-align: center; padding: 4rem 1rem 3rem; }
.pricing-hero h1 { font-size: 2.5rem; font-weight: 800; color: var(--gray-900); margin-bottom: .75rem; }
.pricing-hero p  { font-size: 1.0625rem; color: var(--gray-500); max-width: 480px; margin: 0 auto 2rem; }

.billing-toggle {
  display: inline-flex; align-items: center; gap: .75rem;
  background: var(--white); border: 1.5px solid var(--gray-200);
  border-radius: 999px; padding: .5rem 1rem;
  font-size: .875rem; font-weight: 600; color: var(--gray-700);
}
.toggle-switch {
  width: 40px; height: 22px; background: var(--gray-300);
  border-radius: 999px; position: relative; cursor: pointer; transition: background .2s;
}
.toggle-switch.on { background: var(--primary); }
.toggle-knob {
  width: 16px; height: 16px; background: #fff; border-radius: 50%;
  position: absolute; top: 3px; left: 3px; transition: left .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle-switch.on .toggle-knob { left: 21px; }
.discount-badge { background: #D1FAE5; color: #065F46; font-size: .6875rem; font-weight: 700; padding: .2rem .5rem; border-radius: 999px; }

.plans-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; max-width: 1000px; margin: 0 auto 4rem; padding: 0 1.5rem; }
.plan-card {
  background: var(--white); border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-xl); padding: 2rem 1.75rem;
  position: relative; display: flex; flex-direction: column;
  transition: box-shadow .2s, transform .15s;
}
.plan-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.plan-card.featured { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(79,70,229,.08); }
.plan-best-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff;
  font-size: .6875rem; font-weight: 700; padding: .3rem .875rem;
  border-radius: 999px; white-space: nowrap;
}
.plan-name   { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--gray-400); margin-bottom: .5rem; }
.plan-amount { font-size: 2.75rem; font-weight: 800; color: var(--gray-900); line-height: 1; }
.plan-period { font-size: .875rem; color: var(--gray-400); }
.plan-yearly-note { font-size: .75rem; color: var(--gray-400); margin: .5rem 0 1.25rem; min-height: 1.1em; }
.plan-features { list-style: none; flex: 1; margin-bottom: 1.75rem; }
.plan-features li { display: flex; align-items: flex-start; gap: .5rem; font-size: .875rem; color: var(--gray-700); padding: .45rem 0; border-bottom: 1px solid var(--gray-100); }
.plan-features li:last-child { border-bottom: none; }
.plan-features li svg { width: 16px; height: 16px; color: var(--success); flex-shrink: 0; margin-top: 2px; }

/* FAQ */
.faq-section { max-width: 680px; margin: 0 auto 4rem; padding: 0 1.5rem; }
.faq-title { font-size: 1.5rem; font-weight: 800; text-align: center; margin-bottom: 1.5rem; }
.faq-item { border-bottom: 1px solid var(--gray-200); padding: 1.125rem 0; cursor: pointer; }
.faq-q { font-weight: 600; font-size: .9375rem; color: var(--gray-800); display: flex; justify-content: space-between; align-items: center; }
.faq-arrow { transition: transform .2s; color: var(--gray-400); }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-a { font-size: .875rem; color: var(--gray-500); margin-top: .75rem; line-height: 1.7; display: none; }
.faq-item.open .faq-a { display: block; }

/* ================================================================
   ADMIN
   ================================================================ */
.admin-sidebar { background: #0F172A !important; }
.admin-sidebar .logo-icon { background: #DC2626 !important; }
.admin-badge { background: #DC2626; color: #fff; font-size: .65rem; font-weight: 700; padding: .15rem .45rem; border-radius: 999px; margin-left: .4rem; vertical-align: middle; }

/* User table rows */
.user-row {
  display: grid;
  grid-template-columns: 40px 1fr 110px 100px 80px 80px 110px;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1.25rem;
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition);
  cursor: pointer;
}
.user-row:hover { background: var(--gray-50); }
.user-row-head {
  display: grid;
  grid-template-columns: 40px 1fr 110px 100px 80px 80px 110px;
  gap: .75rem;
  padding: .625rem 1.25rem;
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-400);
}
.u-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  font-weight: 700; font-size: .8125rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.u-name  { font-size: .875rem; font-weight: 600; color: var(--gray-900); }
.u-email { font-size: .75rem; color: var(--gray-400); }

/* ================================================================
   NOTICE UTILISATEUR GLOBALE
   ================================================================ */
.site-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .625rem 1.25rem;
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.4;
  transition: opacity .2s;
  position: relative;
  z-index: 100;
}
.site-notice--info    { background: var(--primary-light); color: #3730a3; border-bottom: 1px solid #c7d2fe; }
.site-notice--warning { background: var(--warning-light); color: #92400e; border-bottom: 1px solid #fde68a; }
.site-notice--danger  { background: #FFF1F2; color: #9f1239; border-bottom: 1px solid #fecdd3; }

.site-notice__content {
  display: flex; align-items: center; gap: .625rem; flex: 1;
}
.site-notice__icon {
  width: 16px; height: 16px; flex-shrink: 0;
}
.site-notice__btn {
  display: inline-flex; align-items: center;
  font-weight: 700; text-decoration: none; white-space: nowrap;
  padding: .2rem .625rem; border-radius: var(--radius-sm);
  margin-left: .25rem; border: 1.5px solid currentColor;
  transition: opacity var(--transition);
  color: inherit;
}
.site-notice__btn:hover { opacity: .75; }
.site-notice__close {
  background: none; border: none; cursor: pointer;
  color: inherit; opacity: .5; padding: .25rem;
  display: flex; align-items: center; flex-shrink: 0;
  border-radius: var(--radius-sm); transition: opacity var(--transition);
}
.site-notice__close:hover { opacity: 1; }
.site-notice__close svg { width: 14px; height: 14px; }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1024px) {
  .search-layout { grid-template-columns: 1fr; }
  .search-panel  { position: static; }
  .plans-grid    { grid-template-columns: 1fr; max-width: 420px; }
}
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-256px); transition: transform .25s; }
  .sidebar.open { transform: translateX(0); width: 256px; }
  .main-content { margin-left: 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-content { padding: 1rem; }
  .user-row, .user-row-head { grid-template-columns: 34px 1fr 100px 90px; }
  .col-hide { display: none; }
}
