/* ============================================================
   TRAKKT — Design System
   ============================================================ */

:root {
  --primary: #496D41;
  --primary-dark: #314B2C;
  --primary-light: #E0FFDB;
  --primary-100: #A5FC92;
  --primary-200: #98E487;
  --primary-300: #8BCF7B;
  --primary-400: #7DBA70;
  --primary-500: #72A766;
  --primary-600: #5F8C55;
  --dark: #0D1A0B;
  --dark-700: #182914;
  --dark-600: #2a3d24;
  --gray-100: #f4f7f3;
  --gray-200: #e2e8e0;
  --gray-300: #c5cfc3;
  --gray-400: #8a9a87;
  --gray-500: #5f6f5c;
  --white: #ffffff;
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-xl: 0 8px 30px rgba(13,26,11,0.12);
  --transition: all 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Anti-zoom iOS sur focus input — font-size < 16px déclenche auto-zoom Safari mobile */
@media (max-width: 768px) {
  input, textarea, select { font-size: 16px !important; }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--dark);
  background: var(--gray-100);
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

/* ============================================================
   LANDING PAGE
   ============================================================ */

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -0.5px;
}

.nav-logo span { color: var(--primary); }

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { color: var(--dark-600); font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--primary); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-white {
  background: var(--white);
  color: var(--dark);
  border: 1px solid var(--gray-200);
}
.btn-white:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-700) 100%);
  color: var(--white);
  padding: 6rem 2rem;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  max-width: 700px;
  margin: 0 auto 1.5rem;
  letter-spacing: -1px;
}

.hero h1 span { color: var(--primary); }

.hero p {
  font-size: 1.2rem;
  color: var(--gray-400);
  max-width: 550px;
  margin: 0 auto 2.5rem;
}

.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.hero-stats {
  display: flex;
  gap: 3rem;
  justify-content: center;
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.hero-stat { text-align: center; }
.hero-stat .number { font-size: 2rem; font-weight: 800; color: var(--primary); }
.hero-stat .label { font-size: 0.9rem; color: var(--gray-400); margin-top: 0.25rem; }

/* Sections */
.section {
  padding: 5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-alt { background: var(--white); }
.section-alt .section { padding: 5rem 2rem; }

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 0.75rem;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--gray-500);
  max-width: 500px;
  margin: 0 auto;
}

/* Steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2rem; }

.step {
  text-align: center;
  padding: 2rem 1.5rem;
}

.step-number {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  margin: 0 auto 1rem;
}

.step h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.step p { font-size: 0.9rem; color: var(--gray-500); }

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.pricing-card {
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
}

.pricing-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: var(--white);
  padding: 0.25rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.pricing-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.pricing-card .price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin: 1rem 0;
}

.pricing-card .price small {
  font-size: 0.9rem;
  color: var(--gray-500);
  font-weight: 400;
}

.pricing-card ul {
  list-style: none;
  text-align: left;
  margin: 1.5rem 0;
}

.pricing-card ul li {
  padding: 0.5rem 0;
  color: var(--dark-600);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pricing-card ul li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
}

.pricing-options {
  text-align: center;
  padding: 1.5rem;
  background: var(--gray-100);
  border-radius: var(--radius-lg);
}

.pricing-options h4 { margin-bottom: 0.75rem; color: var(--dark-600); }

.pricing-options .option {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--white);
  border-radius: var(--radius);
  margin: 0.25rem;
  font-size: 0.9rem;
}

/* Trades */
.trades-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.trade-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
  transition: var(--transition);
}

.trade-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.trade-card .icon { font-size: 2rem; margin-bottom: 0.5rem; }
.trade-card h4 { font-size: 0.95rem; color: var(--dark); }

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: 5rem 2rem;
  text-align: center;
}

.cta-section h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.cta-section p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
.footer {
  background: var(--dark);
  color: var(--gray-400);
  padding: 2rem;
  text-align: center;
  font-size: 0.9rem;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
}

.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 3rem;
  width: 100%;
  max-width: 420px;
}

.login-card h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

.login-card p {
  text-align: center;
  color: var(--gray-500);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--dark-600);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.95rem;
  transition: var(--transition);
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-error {
  background: var(--danger-light);
  color: var(--danger);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  text-align: center;
}

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */
.dashboard {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background: var(--dark);
  color: var(--white);
  padding: 1.5rem 0;
  display: flex;
  flex-direction: column;
}

.sidebar-logo {
  padding: 0 1.5rem 1.5rem;
  font-size: 1.3rem;
  font-weight: 800;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1rem;
}

.sidebar-logo span { color: var(--primary); }

.sidebar-user {
  padding: 0.75rem 1.5rem;
  margin-bottom: 1rem;
}

.sidebar-user .name { font-weight: 600; font-size: 0.95rem; }
.sidebar-user .role { font-size: 0.8rem; color: var(--gray-400); }

.sidebar-nav { flex: 1; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--gray-400);
  font-size: 0.95rem;
  transition: var(--transition);
}

.sidebar-nav a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.05);
}

.sidebar-nav a.active {
  color: var(--white);
  background: rgba(73, 109, 65, 0.25);
  border-right: 3px solid var(--primary);
}

.sidebar-nav a .icon { width: 20px; text-align: center; }

.sidebar-bottom {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-bottom a {
  color: var(--gray-400);
  font-size: 0.9rem;
}

/* Main content */
.main-content {
  padding: 2rem;
  overflow-y: auto;
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.stat-card .label {
  font-size: 0.85rem;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
}

.stat-card .value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--dark);
}

.stat-card .change {
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.stat-card .change.positive { color: var(--success); }
.stat-card .change.negative { color: var(--danger); }

/* Tables */
.table-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 2rem;
}

.table-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.table-card-header h2 { font-size: 1.1rem; }

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 0.75rem 1.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-100);
}

td {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--gray-100);
}

tr:hover td { background: var(--gray-100); }

/* Status badges */
.badge {
  display: inline-flex;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: var(--warning); }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-primary { background: var(--primary-light); color: var(--primary); }

/* Client detail cards */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.detail-grid .table-card th,
.detail-grid .table-card td {
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
}

.detail-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.detail-card h3 {
  font-size: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--gray-200);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.95rem;
}

.detail-row .label { color: var(--gray-500); }
.detail-row .value { font-weight: 600; }

/* Documents list */
.doc-list { list-style: none; }

.doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.doc-item:last-child { border: none; }

.doc-item .doc-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.doc-item .doc-icon {
  width: 36px;
  height: 36px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.doc-item .doc-name { font-weight: 500; font-size: 0.9rem; }
.doc-item .doc-date { font-size: 0.8rem; color: var(--gray-400); }

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 1.5rem;
}

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

.upload-zone .icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.upload-zone p { color: var(--gray-500); }
.upload-zone input[type="file"] { display: none; }

/* Settings form */
.settings-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2rem;
  max-width: 600px;
}

.settings-card h2 {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.radio-group { display: flex; flex-direction: column; gap: 0.5rem; }

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.radio-option:hover { border-color: var(--primary); }
.radio-option input[type="radio"] { accent-color: var(--primary); }
.radio-option .option-label { font-weight: 500; }
.radio-option .option-desc { font-size: 0.85rem; color: var(--gray-500); }

/* ============================================================
   TABS
   ============================================================ */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--gray-200);
  margin-bottom: 1.5rem;
}

.tab {
  padding: 0.75rem 1.5rem;
  background: none;
  border: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  font-family: inherit;
}

.tab:hover { color: var(--dark); }

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ============================================================
   ALERTES (admin)
   ============================================================ */
.alertes-section { margin-bottom: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }

.alerte {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.alerte-danger { background: var(--danger-light); color: #991b1b; }
.alerte-warning { background: var(--warning-light); color: #92400e; }
.alerte-success { background: var(--success-light); color: #065f46; }

.alerte-icon { font-weight: 700; font-size: 1.1rem; }
.alerte-message { flex: 1; }
.alerte-link { font-weight: 600; font-size: 0.85rem; }

.alerte-danger .alerte-link { color: #991b1b; }
.alerte-warning .alerte-link { color: #92400e; }
.alerte-success .alerte-link { color: #065f46; }

/* Nav badge */
.nav-badge {
  background: var(--danger);
  color: var(--white);
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  margin-left: 0.5rem;
}

/* ============================================================
   ONBOARDING BAR
   ============================================================ */
.onboarding-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  flex-wrap: wrap;
}

.onboarding-title { font-weight: 600; color: var(--dark-600); }
.onboarding-step { color: var(--gray-400); }
.onboarding-step.done { color: var(--dark); }

/* ============================================================
   NOTES INTERNES (admin)
   ============================================================ */
.note-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.note-item:last-of-type { border: none; }
.note-date { font-size: 0.8rem; color: var(--gray-400); margin-bottom: 0.25rem; }
.note-text { font-size: 0.9rem; color: var(--dark-600); line-height: 1.5; }

/* ============================================================
   CONVERSATIONS LIST (admin messagerie)
   ============================================================ */
.conversations-list { display: flex; flex-direction: column; gap: 0; }

.conversation-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--white);
  border-bottom: 1px solid var(--gray-100);
  transition: var(--transition);
  color: var(--dark);
  text-decoration: none;
}

.conversation-item:hover { background: var(--gray-100); }
.conversation-item.unread { background: var(--primary-light); }

.conversation-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.conversation-info { flex: 1; min-width: 0; }

.conversation-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.conversation-time { font-size: 0.8rem; color: var(--gray-400); }

.conversation-preview {
  font-size: 0.9rem;
  color: var(--gray-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-author { color: var(--gray-400); }

.conversation-badge {
  background: var(--primary);
  color: var(--white);
  font-size: 0.75rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

/* ============================================================
   CAMPAGNE STATUS (client)
   ============================================================ */
.campagne-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.campagne-status.active { background: var(--success-light); color: var(--success); }
.campagne-status.creation { background: var(--warning-light); color: var(--warning); }
.campagne-status.paused { background: var(--danger-light); color: var(--danger); }

.status-dot-inline {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  display: inline-block;
}

.status-dot-inline.warning { background: var(--warning); }
.status-dot-inline.danger { background: var(--danger); }

/* ============================================================
   NOTIFICATION BAR (client)
   ============================================================ */
.notification-bar {
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  border-left: 4px solid var(--primary);
}

/* ============================================================
   FEEDBACK BUTTONS (client leads)
   ============================================================ */
.feedback-btns { display: flex; gap: 0.25rem; }

.feedback-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.feedback-btn:hover { transform: scale(1.15); }
.feedback-btn.good:hover { border-color: var(--success); background: var(--success-light); }
.feedback-btn.signed:hover { border-color: var(--success); background: var(--success-light); }
.feedback-btn.bad:hover { border-color: var(--danger); background: var(--danger-light); }

/* ============================================================
   ROI SIMULATOR (client)
   ============================================================ */
.roi-results {
  display: flex;
  gap: 0;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 1rem;
}

.roi-item {
  flex: 1;
  padding: 1rem;
  text-align: center;
  border-right: 1px solid var(--gray-200);
}

.roi-item:last-child { border: none; }
.roi-item .label { display: block; font-size: 0.8rem; color: var(--gray-500); margin-bottom: 0.25rem; }
.roi-item .value { font-size: 1.3rem; font-weight: 700; color: var(--dark); }
.roi-item.highlight { background: var(--primary-light); }
.roi-item.highlight .value { color: var(--primary); }

/* ============================================================
   TIPS (client)
   ============================================================ */
.tip-item {
  display: flex;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-100);
}

.tip-item:last-child { border: none; }

.tip-number {
  width: 28px;
  height: 28px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.tip-item strong { font-size: 0.95rem; display: block; margin-bottom: 0.2rem; }
.tip-item p { font-size: 0.85rem; color: var(--gray-500); margin: 0; line-height: 1.4; }

/* ============================================================
   CLIENT CARDS (admin)
   ============================================================ */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}

.client-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  transition: var(--transition);
  border-left: 4px solid var(--success);
}

.client-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.client-card.inactive {
  border-left-color: var(--warning);
  opacity: 0.85;
}

.client-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.client-card-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--dark);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.client-card-identity {
  flex: 1;
  min-width: 0;
}

.client-card-identity strong {
  display: block;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-card-identity span {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.client-card-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.client-tag {
  padding: 0.2rem 0.6rem;
  background: var(--gray-100);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--gray-500);
  font-weight: 500;
}

.client-tag.tag-duo {
  background: var(--primary-light);
  color: var(--primary);
}

.client-tag.tag-solo {
  background: var(--gray-100);
  color: var(--dark-600);
}

.client-card-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.client-kpi {
  text-align: center;
  padding: 0.6rem 0.25rem;
}

.client-kpi .kpi-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--dark);
}

.client-kpi .kpi-label {
  font-size: 0.7rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.client-kpi.highlight {
  background: var(--primary-light);
}

.client-kpi.highlight .kpi-value {
  color: var(--primary);
}

/* ROI bar */
.client-card-roi {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.roi-bar-bg {
  flex: 1;
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
}

.roi-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success), #34d399);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.roi-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--success);
  white-space: nowrap;
}

/* Onboarding dots */
.client-card-onboarding {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.onboarding-dots {
  display: flex;
  gap: 0.3rem;
}

.ob-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gray-300);
  transition: var(--transition);
}

.ob-dot.done {
  background: var(--success);
}

.ob-text {
  font-size: 0.75rem;
  color: var(--gray-500);
}

/* Actions */
.client-card-actions {
  display: flex;
  gap: 0.5rem;
}

/* ============================================================
   FILTERS BAR (admin clients)
   ============================================================ */
.filters-bar {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.filter-group { display: flex; flex-direction: column; gap: 0.3rem; }
.filter-group label { font-size: 0.75rem; font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.5px; }

.filter-group input,
.filter-group select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  transition: var(--transition);
}

.filter-group input:focus,
.filter-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.filter-group input { min-width: 200px; }

/* Onboarding mini progress bar */
.onboarding-mini {
  width: 60px;
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.4rem;
}

.onboarding-progress {
  height: 100%;
  background: var(--success);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* ============================================================
   CHARTS
   ============================================================ */
.chart-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.chart-header h2 { font-size: 1.1rem; }

.chart-container { height: 280px; position: relative; }

/* Period tabs */
.period-tabs { display: flex; gap: 0.5rem; }

.period-tab {
  padding: 0.5rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  background: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.period-tab:hover { border-color: var(--primary); color: var(--primary); }
.period-tab.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* ============================================================
   PLATFORM CARDS (Meta / Google)
   ============================================================ */
.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.platform-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.platform-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.platform-header h3 { font-size: 1rem; margin: 0; }
.platform-header span { font-size: 0.85rem; color: var(--gray-500); }

.platform-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  background: #1877f2;
  color: var(--white);
}

.platform-icon.google-icon {
  background: #4285f4;
}

.platform-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.platform-stat {
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.platform-stat .label { font-size: 0.9rem; color: var(--gray-500); }
.platform-stat .value { font-weight: 700; font-size: 1rem; }
.platform-stat.highlight { background: var(--primary-light); }
.platform-stat.highlight .value { color: var(--primary); }

.platform-card.upgrade {
  border: 2px dashed var(--gray-300);
  background: var(--gray-100);
}

/* ============================================================
   RAPPORT CARDS
   ============================================================ */
.rapport-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
  overflow: hidden;
}

.rapport-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--gray-200);
}

.rapport-stats {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--gray-200);
}

.rapport-stat {
  flex: 1;
  padding: 1rem 1.5rem;
  text-align: center;
  border-right: 1px solid var(--gray-100);
}

.rapport-stat:last-child { border: none; }
.rapport-stat .label { font-size: 0.8rem; color: var(--gray-500); display: block; }
.rapport-stat .value { font-size: 1.3rem; font-weight: 700; color: var(--dark); }

.rapport-detail {
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  color: var(--dark-600);
  line-height: 1.6;
}

/* ============================================================
   CHAT / MESSAGERIE
   ============================================================ */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}

.chat-header h1 { font-size: 1.3rem; margin-bottom: 0.25rem; }

.chat-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--gray-500);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--gray-100);
}

.chat-bubble {
  max-width: 70%;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-lg);
  line-height: 1.5;
}

.chat-bubble.theirs {
  background: var(--white);
  border: 1px solid var(--gray-200);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-bubble.mine {
  background: var(--primary);
  color: var(--white);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.bubble-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
}

.bubble-header strong { font-size: 0.85rem; }

.bubble-time {
  font-size: 0.75rem;
  opacity: 0.6;
}

.bubble-content { font-size: 0.95rem; }

.chat-bubble.mine .bubble-header strong { color: rgba(255,255,255,0.9); }
.chat-bubble.mine .bubble-time { color: rgba(255,255,255,0.6); }

.chat-input-area {
  padding: 1rem 2rem 1.5rem;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
}

.chat-form {
  display: flex;
  gap: 0.75rem;
}

.chat-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
}

.chat-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.chat-hint {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-top: 0.5rem;
  text-align: center;
}

/* ============================================================
   QUICK LINKS (dashboard)
   ============================================================ */
.quick-link {
  display: block;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-100);
  color: var(--dark-600);
  font-size: 0.95rem;
  transition: var(--transition);
}

.quick-link:last-child { border: none; }
.quick-link:hover { color: var(--primary); padding-left: 0.5rem; }

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline { position: relative; padding-left: 1.5rem; }

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray-200);
}

.timeline-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1.25rem;
  position: relative;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
  margin-top: 0.3rem;
  position: relative;
  z-index: 1;
}

.timeline-dot.campagne { background: var(--primary); }
.timeline-dot.rapport { background: var(--success); }
.timeline-dot.site { background: var(--warning); }
.timeline-dot.admin { background: var(--gray-400); }

.timeline-date { font-size: 0.8rem; color: var(--gray-400); }
.timeline-action { font-size: 0.9rem; color: var(--dark-600); line-height: 1.4; }

.timeline.compact .timeline-item { padding-bottom: 0.75rem; }
.timeline.compact .timeline-content { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.timeline.compact .timeline-date { white-space: nowrap; }

/* ============================================================
   MONTANT FORM (lead signé)
   ============================================================ */
.montant-form {
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* ============================================================
   RESPONSIVE — Mobile (max 768px)
   ============================================================ */
@media (max-width: 768px) {

  /* ---- MOBILE HEADER (replaces sidebar) ---- */
  .dashboard {
    grid-template-columns: 1fr;
    grid-template-rows: 56px 1fr;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    z-index: 1000;
    transition: left 0.3s ease;
    padding-top: 0;
    overflow-y: auto;
  }

  /* When sidebar has .open class (toggled by JS) */
  .sidebar.open {
    left: 0;
  }

  /* Mobile overlay behind sidebar */
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
  }

  .sidebar-overlay.active {
    display: block;
  }

  /* Mobile top header bar */
  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    height: 56px;
    background: var(--dark);
    color: var(--white);
    position: sticky;
    top: 0;
    z-index: 998;
  }

  .mobile-header .sidebar-logo {
    font-size: 1.2rem;
    font-weight: 800;
    padding: 0;
    border: none;
    margin: 0;
  }

  .hamburger-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }

  .hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
  }

  /* ---- MAIN CONTENT ---- */
  .main-content {
    padding: 1rem;
  }

  /* ---- PAGE HEADER ---- */
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .page-header h1 {
    font-size: 1.25rem;
  }

  /* ---- STATS GRID : 2 colonnes ---- */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-card .value {
    font-size: 1.4rem;
  }

  /* ---- TABLES : scroll horizontal ---- */
  .table-card {
    position: relative;
  }

  .table-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 24px;
    background: linear-gradient(to left, rgba(255,255,255,0.9), transparent);
    pointer-events: none;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    z-index: 1;
  }

  .table-card table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-card thead,
  .table-card tbody,
  .table-card tr {
    display: table;
    width: 100%;
    table-layout: fixed;
  }

  /* Ensure table doesn't get too squished */
  .table-card table {
    min-width: 550px;
  }

  .table-card-header {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 1rem;
  }

  th, td {
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
  }

  /* ---- CHARTS : hauteur reduite ---- */
  .chart-container {
    height: 150px;
  }

  .chart-card {
    padding: 1rem;
  }

  .chart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .period-tabs {
    flex-wrap: wrap;
  }

  .period-tab {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }

  /* ---- CHAT / MESSAGERIE : plein ecran ---- */
  .main-content:has(.chat-header) {
    padding: 0;
  }

  .chat-header {
    padding: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .chat-header h1 {
    font-size: 1.1rem;
  }

  .chat-messages {
    padding: 1rem;
    gap: 0.75rem;
  }

  .chat-bubble {
    max-width: 88%;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  .chat-input-area {
    padding: 0.75rem 1rem 1rem;
  }

  .chat-form {
    gap: 0.5rem;
  }

  .chat-form input {
    padding: 0.65rem 0.75rem;
    font-size: 0.9rem;
  }

  .chat-form .btn {
    padding: 0.65rem 1rem;
    min-width: 44px;
    min-height: 44px;
  }

  /* ---- CLIENT CARDS (admin/clients) : 1 colonne ---- */
  .clients-grid {
    grid-template-columns: 1fr;
  }

  .client-card-kpis {
    grid-template-columns: repeat(2, 1fr);
  }

  /* ---- FILTERS BAR : empiles verticalement ---- */
  .filters-bar {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
  }

  .filter-group {
    width: 100%;
  }

  .filter-group input,
  .filter-group select {
    width: 100%;
    min-width: unset;
  }

  /* ---- DETAIL GRID : 1 colonne ---- */
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-card {
    padding: 1rem;
  }

  .detail-row {
    font-size: 0.9rem;
  }

  /* ---- PRICING CARDS : 1 colonne ---- */
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .pricing-card {
    padding: 1.5rem;
  }

  .pricing-card .price {
    font-size: 2rem;
  }

  .pricing-options {
    padding: 1rem;
  }

  .pricing-options .option {
    display: flex;
    width: 100%;
    justify-content: center;
  }

  /* ---- HERO : texte plus petit, stats en colonne ---- */
  .hero {
    padding: 3rem 1.25rem;
  }

  .hero h1 {
    font-size: 1.8rem;
    letter-spacing: -0.5px;
  }

  .hero p {
    font-size: 1rem;
    margin-bottom: 1.5rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .hero-cta .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
  }

  .hero-stat .number {
    font-size: 1.5rem;
  }

  /* ---- NAV (landing page) ---- */
  .nav {
    padding: 0.75rem 1rem;
  }

  .nav-logo {
    font-size: 1.25rem;
  }

  .nav-links {
    display: none;
  }

  /* ---- FEEDBACK BUTTONS (leads) : gros pour les doigts (44px min) ---- */
  .feedback-btns {
    gap: 0.5rem;
  }

  .feedback-btn {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
    border-radius: var(--radius);
  }

  /* ---- UPLOAD ZONE : pleine largeur ---- */
  .upload-zone {
    padding: 2rem 1rem;
    margin: 0 0 1rem 0;
  }

  .upload-zone .icon {
    font-size: 2rem;
  }

  /* ---- TIMELINE : compacte ---- */
  .timeline {
    padding-left: 1rem;
  }

  .timeline::before {
    left: 3px;
  }

  .timeline-item {
    gap: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .timeline-dot {
    width: 10px;
    height: 10px;
  }

  .timeline-date {
    font-size: 0.75rem;
  }

  .timeline-action {
    font-size: 0.85rem;
  }

  .timeline.compact .timeline-item {
    padding-bottom: 0.5rem;
  }

  /* ---- TABS : scroll horizontal ---- */
  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }

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

  .tab {
    flex-shrink: 0;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    white-space: nowrap;
  }

  /* ---- PLATFORM GRID ---- */
  .platform-grid {
    grid-template-columns: 1fr;
  }

  .platform-stat {
    padding: 0.6rem 1rem;
  }

  /* ---- RAPPORT CARDS ---- */
  .rapport-stats {
    flex-wrap: wrap;
  }

  .rapport-stat {
    flex: 1 1 45%;
    padding: 0.75rem;
  }

  .rapport-header {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
    padding: 0.75rem 1rem;
  }

  /* ---- ROI RESULTS ---- */
  .roi-results {
    flex-direction: column;
  }

  .roi-item {
    border-right: none;
    border-bottom: 1px solid var(--gray-200);
    padding: 0.75rem;
  }

  .roi-item:last-child {
    border-bottom: none;
  }

  /* ---- CONVERSATIONS LIST ---- */
  .conversation-item {
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }

  .conversation-preview {
    font-size: 0.85rem;
  }

  /* ---- ALERTES ---- */
  .alerte {
    font-size: 0.85rem;
    padding: 0.65rem 0.75rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* ---- ONBOARDING BAR ---- */
  .onboarding-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }

  /* ---- NOTIFICATION BAR ---- */
  .notification-bar {
    font-size: 0.85rem;
    padding: 0.65rem 1rem;
  }

  /* ---- SECTIONS (landing) ---- */
  .section {
    padding: 3rem 1.25rem;
  }

  .section-header h2 {
    font-size: 1.5rem;
  }

  .section-header p {
    font-size: 0.95rem;
  }

  .cta-section {
    padding: 3rem 1.25rem;
  }

  .cta-section h2 {
    font-size: 1.5rem;
  }

  /* ---- STEPS ---- */
  .steps {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .step {
    padding: 1.5rem 1rem;
  }

  /* ---- TRADES GRID ---- */
  .trades-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  /* ---- SETTINGS ---- */
  .settings-card {
    padding: 1.25rem;
    max-width: 100%;
  }

  /* ---- LOGIN ---- */
  .login-card {
    padding: 2rem 1.5rem;
    margin: 1rem;
    max-width: calc(100% - 2rem);
  }

  /* ---- BUTTONS general mobile touch ---- */
  .btn {
    min-height: 44px;
    padding: 0.65rem 1.25rem;
  }

  .btn-lg {
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
  }

  /* ---- DOCS LIST ---- */
  .doc-item {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .doc-item .doc-info {
    flex: 1;
    min-width: 0;
  }

  /* ---- CAMPAGNE STATUS ---- */
  .campagne-status {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
  }

  /* ---- TIPS ---- */
  .tip-item {
    gap: 0.75rem;
  }

  .tip-item strong {
    font-size: 0.9rem;
  }

  .tip-item p {
    font-size: 0.8rem;
  }
}

/* ============================================================
   RESPONSIVE — Very small screens (max 480px)
   ============================================================ */
@media (max-width: 480px) {

  /* ---- STATS : full width single column on tiny screens ---- */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .stat-card {
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .stat-card .label {
    margin-bottom: 0;
    order: 1;
    flex: 1;
  }

  .stat-card .value {
    font-size: 1.3rem;
    order: 2;
  }

  .stat-card .change {
    display: none;
  }

  /* ---- HERO encore plus compact ---- */
  .hero {
    padding: 2rem 1rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .hero p {
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
  }

  .hero-stat .number {
    font-size: 1.3rem;
  }

  .hero-stat .label {
    font-size: 0.8rem;
  }

  /* ---- MAIN CONTENT padding ---- */
  .main-content {
    padding: 0.75rem;
  }

  /* ---- PAGE HEADER ---- */
  .page-header h1 {
    font-size: 1.1rem;
  }

  /* ---- CHARTS encore plus petits ---- */
  .chart-container {
    height: 120px;
  }

  .chart-header h2 {
    font-size: 0.95rem;
  }

  /* ---- CHAT bubbles ---- */
  .chat-bubble {
    max-width: 92%;
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
  }

  .bubble-header strong {
    font-size: 0.8rem;
  }

  .bubble-time {
    font-size: 0.7rem;
  }

  /* ---- CLIENT CARDS ---- */
  .client-card {
    padding: 1rem;
  }

  .client-card-kpis {
    grid-template-columns: repeat(2, 1fr);
  }

  .client-kpi .kpi-value {
    font-size: 0.95rem;
  }

  .client-kpi .kpi-label {
    font-size: 0.65rem;
  }

  .client-card-actions {
    flex-wrap: wrap;
  }

  .client-card-actions .btn {
    flex: 1;
    justify-content: center;
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    min-height: 44px;
  }

  /* ---- TABLES ---- */
  .table-card table {
    min-width: 450px;
  }

  th, td {
    padding: 0.5rem 0.5rem;
    font-size: 0.8rem;
  }

  /* ---- PRICING ---- */
  .pricing-card {
    padding: 1.25rem;
  }

  .pricing-card .price {
    font-size: 1.8rem;
  }

  .pricing-card h3 {
    font-size: 1.1rem;
  }

  .pricing-card ul li {
    font-size: 0.85rem;
    padding: 0.4rem 0;
  }

  /* ---- FILTERS ---- */
  .filters-bar {
    padding: 0.75rem;
  }

  .filter-group input,
  .filter-group select {
    padding: 0.6rem;
    font-size: 0.85rem;
  }

  /* ---- DETAIL CARDS ---- */
  .detail-card {
    padding: 0.75rem;
  }

  .detail-card h3 {
    font-size: 0.9rem;
  }

  .detail-row {
    font-size: 0.85rem;
    flex-direction: column;
    gap: 0.15rem;
  }

  /* ---- UPLOAD ZONE ---- */
  .upload-zone {
    padding: 1.5rem 0.75rem;
  }

  .upload-zone .icon {
    font-size: 1.75rem;
  }

  .upload-zone p {
    font-size: 0.85rem;
  }

  /* ---- RAPPORT STATS ---- */
  .rapport-stat {
    flex: 1 1 100%;
  }

  .rapport-stat .value {
    font-size: 1.1rem;
  }

  /* ---- TABS ---- */
  .tab {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
  }

  /* ---- CONVERSATIONS ---- */
  .conversation-avatar {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  .conversation-item {
    padding: 0.6rem 0.75rem;
    gap: 0.5rem;
  }

  /* ---- TIMELINE ---- */
  .timeline {
    padding-left: 0.75rem;
  }

  .timeline-dot {
    width: 8px;
    height: 8px;
  }

  .timeline-action {
    font-size: 0.8rem;
  }

  .timeline-date {
    font-size: 0.7rem;
  }

  /* ---- TRADES ---- */
  .trades-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .trade-card {
    padding: 0.75rem;
  }

  .trade-card .icon {
    font-size: 1.5rem;
  }

  .trade-card h4 {
    font-size: 0.8rem;
  }

  /* ---- SECTION headers ---- */
  .section {
    padding: 2rem 1rem;
  }

  .section-header h2 {
    font-size: 1.3rem;
  }

  .section-header p {
    font-size: 0.85rem;
  }

  /* ---- CTA ---- */
  .cta-section {
    padding: 2.5rem 1rem;
  }

  .cta-section h2 {
    font-size: 1.3rem;
  }

  .cta-section p {
    font-size: 0.95rem;
  }

  /* ---- BUTTONS global ---- */
  .btn {
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
  }

  .btn-lg {
    font-size: 0.95rem;
    padding: 0.75rem 1.25rem;
  }

  /* ---- NAV ---- */
  .nav {
    padding: 0.6rem 0.75rem;
  }

  .nav-logo {
    font-size: 1.15rem;
  }

  /* ---- FOOTER ---- */
  .footer {
    padding: 1.5rem 1rem;
    font-size: 0.8rem;
  }

  /* ---- LOGIN ---- */
  .login-card {
    padding: 1.5rem 1.25rem;
  }

  .login-card h1 {
    font-size: 1.3rem;
  }

  /* ---- SETTINGS ---- */
  .settings-card {
    padding: 1rem;
  }

  .settings-card h2 {
    font-size: 1.1rem;
  }

  .radio-option {
    padding: 0.6rem 0.75rem;
    font-size: 0.9rem;
  }
}

/* ============================================================
   UTILITY — Mobile header (hidden on desktop, visible on mobile)
   These classes are used by JS to toggle the sidebar.
   Add this HTML before <main> in your dashboard templates:

   <div class="mobile-header">
     <div class="sidebar-logo">trakk<span>t</span></div>
     <button class="hamburger-btn" onclick="document.querySelector('.sidebar').classList.toggle('open');document.querySelector('.sidebar-overlay').classList.toggle('active');">
       <span></span><span></span><span></span>
     </button>
   </div>
   <div class="sidebar-overlay" onclick="document.querySelector('.sidebar').classList.remove('open');this.classList.remove('active');"></div>
   ============================================================ */
.mobile-header {
  display: none;
}

.sidebar-overlay {
  display: none;
}

@media (max-width: 768px) {
  .mobile-header {
    display: flex;
  }
}
