/* ==========================================
   FONTS
   ========================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ==========================================
   VARIABLES — LIGHT MODE
   ========================================== */
:root {
  /* Brand */
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-light: #818cf8;
  --primary-bg: #eef2ff;
  --primary-glow: rgba(79,70,229,.18);
  --secondary: #7c3aed;
  --gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --gradient-soft: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);

  /* Surfaces */
  --bg: #f0f4ff;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --surface-hover: #f5f7ff;

  /* Text */
  --text: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  /* Borders */
  --border: #e2e8f0;
  --border-light: #f1f5f9;

  /* Status */
  --success: #10b981;
  --success-bg: #d1fae5;
  --warning: #f59e0b;
  --warning-bg: #fef3c7;
  --danger: #ef4444;
  --danger-bg: #fee2e2;
  --info: #3b82f6;
  --info-bg: #dbeafe;

  /* Misc */
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.07), 0 2px 8px rgba(0,0,0,.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.1), 0 4px 10px rgba(0,0,0,.05);
  --shadow-primary: 0 4px 16px rgba(79,70,229,.3);

  --nav-height: 70px;
  --header-height: 60px;
  --transition: 200ms cubic-bezier(.4,0,.2,1);
  --transition-slow: 350ms cubic-bezier(.4,0,.2,1);
}

/* ==========================================
   DARK MODE VARIABLES
   ========================================== */
[data-theme="dark"] {
  --bg: #080d1a;
  --surface: #111827;
  --surface-2: #1a2236;
  --surface-3: #1e2d42;
  --surface-hover: #1e293b;

  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --text-light: #475569;

  --border: #1e293b;
  --border-light: #151f30;

  --primary-bg: #1e1b4b;
  --primary-glow: rgba(79,70,229,.3);
  --gradient-soft: linear-gradient(135deg, #1e1b4b 0%, #2e1065 100%);

  --success-bg: #064e3b;
  --warning-bg: #451a03;
  --danger-bg: #450a0a;
  --info-bg: #1e3a5f;

  --shadow: 0 1px 3px rgba(0,0,0,.3), 0 2px 8px rgba(0,0,0,.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,.4), 0 2px 4px rgba(0,0,0,.2);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.5), 0 4px 10px rgba(0,0,0,.3);
}

/* ==========================================
   RESET & BASE
   ========================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100%;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.5;
  transition: background var(--transition-slow), color var(--transition-slow);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ==========================================
   ANIMATED BACKGROUND
   ========================================== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% -10%, rgba(79,70,229,.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 30% at 80% 110%, rgba(124,58,237,.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  transition: opacity var(--transition-slow);
}

[data-theme="dark"] body::before {
  background:
    radial-gradient(ellipse 60% 40% at 20% -10%, rgba(79,70,229,.15) 0%, transparent 60%),
    radial-gradient(ellipse 50% 30% at 80% 110%, rgba(124,58,237,.12) 0%, transparent 60%);
}

/* ==========================================
   HEADER
   ========================================== */
#app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: var(--gradient);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 16px;
  box-shadow: 0 2px 20px rgba(79,70,229,.4);
}

[data-theme="dark"] #app-header {
  background: linear-gradient(135deg, #312e81 0%, #4c1d95 100%);
  box-shadow: 0 2px 20px rgba(0,0,0,.5);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
}

.app-logo {
  font-size: 19px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-logo-icon {
  background: rgba(255,255,255,.2);
  border-radius: 8px;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 900;
  backdrop-filter: blur(4px);
}

.app-logo-text { opacity: .95; }

.header-actions { display: flex; gap: 6px; }

.header-btn {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.2);
  color: white;
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: all var(--transition);
  backdrop-filter: blur(4px);
  position: relative;
}
.header-btn:hover {
  background: rgba(255,255,255,.25);
  transform: translateY(-1px);
}

.header-btn .notif-dot {
  position: absolute;
  top: -3px; right: -3px;
  width: 10px; height: 10px;
  background: #f87171;
  border-radius: 50%;
  border: 2px solid rgba(79,70,229,1);
  display: none;
}
.header-btn .notif-dot.visible { display: block; }

/* ==========================================
   LAYOUT
   ========================================== */
#app-main {
  position: fixed;
  top: var(--header-height);
  bottom: var(--nav-height);
  left: 0; right: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  z-index: 1;
}

.view {
  display: none;
  padding: 16px;
  max-width: 820px;
  margin: 0 auto;
  min-height: 100%;
  animation: fadeIn .2s ease;
}
.view.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   BOTTOM NAV
   ========================================== */
#bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

[data-theme="dark"] #bottom-nav {
  background: rgba(17,24,39,.9);
  border-color: var(--border);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-light);
  padding: 8px 4px;
  transition: color var(--transition);
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.nav-item::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 2px;
  background: var(--gradient);
  border-radius: 0 0 4px 4px;
  transform: scaleX(0);
  transition: transform var(--transition);
}

.nav-item.active { color: var(--primary); }
.nav-item.active::before { transform: scaleX(1); }

.nav-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-icon {
  font-size: 20px;
  line-height: 1;
  display: block;
  transition: transform var(--transition);
}

.nav-item.active .nav-icon { transform: scale(1.1); }

.nav-badge {
  position: absolute;
  top: -4px; right: -8px;
  background: var(--danger);
  color: white;
  font-size: 9px;
  font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--surface);
}
.nav-badge.visible { display: flex; }

.nav-label {
  font-size: 11px;
  font-weight: 500;
  display: block;
}
.nav-item.active .nav-label { font-weight: 600; color: var(--primary); }

/* ==========================================
   CARDS
   ========================================== */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  transition: box-shadow var(--transition), transform var(--transition), background var(--transition-slow);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-clickable { cursor: pointer; }
.card-clickable:hover { transform: translateY(-1px); }

.card + .card { margin-top: 10px; }

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  flex: 1;
}

.card-company {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 3px;
  letter-spacing: .1px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

/* ==========================================
   BADGES
   ========================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1px;
}

.badge-location { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.badge-type { background: var(--primary-bg); color: var(--primary); }
.badge-source { background: var(--surface-2); color: var(--text-light); border: 1px solid var(--border); }
.badge-date { color: var(--text-light); font-size: 11px; }

.badge-a_postuler  { background: #dbeafe; color: #1d4ed8; }
.badge-postule     { background: #ede9fe; color: #6d28d9; }
.badge-en_attente  { background: #fef3c7; color: #b45309; }
.badge-entretien   { background: #d1fae5; color: #065f46; }
.badge-offre       { background: #d1fae5; color: #047857; }
.badge-refuse      { background: #fee2e2; color: #b91c1c; }

[data-theme="dark"] .badge-a_postuler  { background: #1e3a5f; color: #93c5fd; }
[data-theme="dark"] .badge-postule     { background: #2e1065; color: #c4b5fd; }
[data-theme="dark"] .badge-en_attente  { background: #451a03; color: #fcd34d; }
[data-theme="dark"] .badge-entretien   { background: #064e3b; color: #6ee7b7; }
[data-theme="dark"] .badge-offre       { background: #064e3b; color: #34d399; }
[data-theme="dark"] .badge-refuse      { background: #450a0a; color: #fca5a5; }

.card-actions {
  display: flex;
  gap: 7px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: .1px;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover {
  opacity: .9;
  box-shadow: 0 6px 20px rgba(79,70,229,.4);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); box-shadow: var(--shadow-primary); }

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--surface-3); border-color: var(--primary-light); color: var(--primary); }

.btn-ghost {
  background: none;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: none;
}
.btn-danger:hover { background: #fecaca; }

.btn-success {
  background: var(--success-bg);
  color: var(--success);
  border: none;
}
.btn-success:hover { background: #a7f3d0; }

.btn-warning {
  background: var(--warning-bg);
  color: var(--warning);
  border: none;
}

.btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 7px; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon { width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 9px; }

/* ==========================================
   SEARCH & FILTERS
   ========================================== */
.search-section { margin-bottom: 14px; }

.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.search-bar input {
  flex: 1;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  outline: none;
  transition: all var(--transition);
}
.search-bar input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-select {
  padding: 7px 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
}
.filter-select:focus { border-color: var(--primary); }

/* ==========================================
   QUICK LINKS
   ========================================== */
.quick-links {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow);
}

.quick-links h3 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-light);
  margin-bottom: 10px;
  font-weight: 700;
}

.links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.platform-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: var(--gradient-soft);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.platform-link:hover {
  background: var(--primary-bg);
  color: var(--primary);
  border-color: var(--primary-light);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.platform-icon { font-size: 13px; }

/* ==========================================
   SECTION HEADERS
   ========================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -.2px;
}

.section-count {
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

/* ==========================================
   REMINDER BANNER
   ========================================== */
.reminder-banner {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #fcd34d;
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(245,158,11,.15);
}

.reminder-banner:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(245,158,11,.2); }

[data-theme="dark"] .reminder-banner {
  background: linear-gradient(135deg, #451a03, #78350f);
  border-color: #92400e;
}

.reminder-banner-icon { font-size: 20px; flex-shrink: 0; }

.reminder-banner-content { flex: 1; }

.reminder-banner-title {
  font-size: 13px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 2px;
}

[data-theme="dark"] .reminder-banner-title { color: #fcd34d; }

.reminder-banner-desc { font-size: 12px; color: #a16207; }
[data-theme="dark"] .reminder-banner-desc { color: #d97706; }

/* ==========================================
   LOADING & EMPTY STATES
   ========================================== */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 50px 20px;
  gap: 14px;
  color: var(--text-muted);
}

.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 20px;
  gap: 10px;
  text-align: center;
}
.empty-icon { font-size: 52px; opacity: .45; line-height: 1; margin-bottom: 4px; }
.empty-title { font-size: 17px; font-weight: 700; color: var(--text); }
.empty-desc { font-size: 13px; color: var(--text-muted); max-width: 280px; line-height: 1.6; }

/* ==========================================
   KANBAN
   ========================================== */
.kanban-scroll {
  overflow-x: auto;
  margin: 0 -16px;
  padding: 0 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.kanban {
  display: flex;
  gap: 10px;
  min-width: max-content;
  padding-bottom: 8px;
  align-items: flex-start;
}

.kanban-col {
  width: 230px;
  flex-shrink: 0;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 12px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow);
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
}

.col-a_postuler .kanban-col-header { border-color: #93c5fd; }
.col-postule    .kanban-col-header { border-color: #a5b4fc; }
.col-en_attente .kanban-col-header { border-color: #fcd34d; }
.col-entretien  .kanban-col-header { border-color: #6ee7b7; }
.col-offre      .kanban-col-header { border-color: #34d399; }
.col-refuse     .kanban-col-header { border-color: #fca5a5; }

.kanban-col-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: .1px;
}

.kanban-col-count {
  font-size: 11px;
  font-weight: 700;
  background: var(--surface-2);
  padding: 1px 8px;
  border-radius: 10px;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.kanban-empty {
  color: var(--text-light);
  font-size: 12px;
  text-align: center;
  padding: 16px 0;
  font-style: italic;
}

.kanban-card {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  margin-bottom: 7px;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all var(--transition);
}

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

.kanban-card:last-child { margin-bottom: 0; }

.kanban-card-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
  line-height: 1.35;
}

.kanban-card-company {
  font-size: 11px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 5px;
}

.kanban-card-meta {
  font-size: 11px;
  color: var(--text-light);
  line-height: 1.5;
}

.kanban-card-reminder {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  color: var(--warning);
  background: var(--warning-bg);
  padding: 1px 6px;
  border-radius: 8px;
  margin-top: 4px;
}

.kanban-card-reminder.overdue {
  color: var(--danger);
  background: var(--danger-bg);
}

/* ==========================================
   DASHBOARD
   ========================================== */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity var(--transition);
}
.stat-card:hover::before { opacity: 1; }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-card.primary {
  background: var(--gradient);
  border: none;
  box-shadow: var(--shadow-primary);
}
.stat-card.primary .stat-number,
.stat-card.primary .stat-label { color: white; }
.stat-card.primary .stat-label { opacity: .8; }

.stat-number {
  font-size: 30px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: -1px;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .4px;
}

/* ==========================================
   PROGRESS BAR
   ========================================== */
.progress-bar-wrap {
  background: var(--surface-2);
  border-radius: 10px;
  height: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-bar-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 10px;
  transition: width .8s cubic-bezier(.4,0,.2,1);
}

/* ==========================================
   FORMS
   ========================================== */
.form-group { margin-bottom: 14px; }

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  outline: none;
  transition: all var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--surface);
}

.form-textarea { resize: vertical; min-height: 80px; line-height: 1.6; }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ==========================================
   MODAL
   ========================================== */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

#modal-overlay.hidden { display: none; }

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  animation: slideUp .28s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 -10px 40px rgba(0,0,0,.2);
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal.hidden { display: none; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 16px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.3px;
}

.modal-close {
  background: var(--surface-2);
  border: 1px solid var(--border);
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 14px;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }

.modal-body { padding: 20px; }

.modal-footer {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  position: sticky;
  bottom: 0;
  background: var(--surface);
}

/* ==========================================
   API CONFIG
   ========================================== */
.api-config-section {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--border-light);
}

.api-config-section h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}

.api-config-section p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.5;
}

.api-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 12px;
  margin-bottom: 10px;
}
.api-status.configured { background: var(--success-bg); color: var(--success); }
.api-status.not-configured { background: var(--surface-3); color: var(--text-muted); border: 1px solid var(--border); }

/* ==========================================
   OFFER DETAIL
   ========================================== */
.offer-detail-description {
  font-size: 13px;
  line-height: 1.75;
  color: var(--text);
  white-space: pre-line;
}

.offer-detail-section { margin-bottom: 14px; }

.offer-detail-section h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 4px;
}

/* ==========================================
   INFO / WARNING BANNERS
   ========================================== */
.info-banner {
  background: var(--info-bg);
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: #1e40af;
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 12px;
  line-height: 1.5;
}

[data-theme="dark"] .info-banner { color: #93c5fd; border-color: #1e3a5f; }

/* ==========================================
   TOAST
   ========================================== */
#toast-container {
  position: fixed;
  top: calc(var(--header-height) + 10px);
  right: 12px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--text);
  color: white;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn .22s cubic-bezier(.4,0,.2,1);
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 290px;
  pointer-events: all;
}

.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }
.toast.warning { background: var(--warning); color: #1c1917; }

.toast-icon {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  font-weight: 900;
  flex-shrink: 0;
}

@keyframes toastIn {
  from { transform: translateX(110%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================
   MISC
   ========================================== */
.divider { height: 1px; background: var(--border); margin: 16px 0; }

.tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }

.tag {
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: .1px;
}

.entreprise-card-rating { color: #f59e0b; font-size: 13px; letter-spacing: 1px; }

.activity-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}
.activity-item:last-child { border-bottom: none; padding-bottom: 0; }

/* Scrollbars */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* Smooth transitions for dark mode */
*, *::before, *::after {
  transition-property: background-color, border-color, color, box-shadow;
  transition-duration: 200ms;
  transition-timing-function: ease;
}

/* Override transition for animations that should not be affected */
.spinner, .progress-bar-fill, .view, .modal, .toast,
.nav-item::before, .platform-link, .card, .kanban-card,
.btn, .header-btn {
  transition: unset;
}

.spinner { animation: spin .7s linear infinite; }
.progress-bar-fill { transition: width .8s cubic-bezier(.4,0,.2,1); }
.view { animation: fadeIn .2s ease; }
.modal { animation: slideUp .28s cubic-bezier(.4,0,.2,1); }
.toast { animation: toastIn .22s cubic-bezier(.4,0,.2,1); }
.nav-item::before { transition: transform 200ms cubic-bezier(.4,0,.2,1); }
.platform-link { transition: all 200ms cubic-bezier(.4,0,.2,1); }
.card { transition: box-shadow 200ms ease, transform 200ms ease, background-color 200ms ease; }
.kanban-card { transition: all 200ms cubic-bezier(.4,0,.2,1); }
.btn { transition: all 200ms cubic-bezier(.4,0,.2,1); }
.header-btn { transition: all 200ms cubic-bezier(.4,0,.2,1); }
