/* styles.css */
/* KONNECT - Design System Tokens */

:root {
  /* TYPOGRAPHY */
  --font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 10px;
  --font-size-sm: 12px;
  --font-size-base: 14px;
  --font-size-md: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-size-3xl: 28px;
  --font-size-4xl: 32px;

  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-black: 800;

  /* BRAND COLORS */
  --green: #22C55E;
  --green-dark: #16A34A;
  --green-light: #DCFCE7;
  --blue: #3B82F6;
  --blue-dark: #2563EB;
  --blue-light: #DBEAFE;
  --orange: #F59E0B;
  --orange-dark: #D97706;
  --orange-light: #FEF3C7;
  --red: #EF4444;
  --red-dark: #DC2626;
  --red-light: #FEE2E2;
  --purple: #8B5CF6;
  --purple-dark: #7C3AED;
  --purple-light: #EDE9FE;

  /* SEMANTIC COLORS */
  --color-success: var(--green);
  --color-info: var(--blue);
  --color-warning: var(--orange);
  --color-error: var(--red);

  /* GRAYS */
  --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;
  --gray-950: #030712;

  /* APP COLORS */
  --app-bg: #F8FAFC;
  --app-text: #1A1A2E;
  --app-text-secondary: #64748B;

  /* SPACING */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* BORDER RADIUS */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --radius-3xl: 24px;
  --radius-full: 9999px;

  /* SHADOWS */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-brand: 0 4px 14px rgba(34, 197, 94, 0.3);
  --shadow-blue: 0 4px 14px rgba(59, 130, 246, 0.3);

  /* TRANSITIONS */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;

  /* Z-INDEX */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal-backdrop: 300;
  --z-modal: 400;
  --z-tooltip: 500;

  /* GRADIENTS */
  --gradient-green: linear-gradient(135deg, var(--green), var(--green-dark));
  --gradient-brand: linear-gradient(135deg, var(--green), var(--blue));
  --gradient-blue: linear-gradient(135deg, var(--blue), var(--blue-dark));
  --gradient-orange: linear-gradient(135deg, var(--orange), var(--orange-dark));

  /* COMPONENT HEIGHTS */
  --height-topbar: 44px;
  --height-tabbar: 56px;
  --height-input: 44px;
  --height-button: 44px;
}

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

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.5;
  color: var(--app-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* LAYOUT HELPERS */

.screen { display: flex; flex-direction: column; height: 100%; flex: 1; overflow-y: auto; }
.screen__body { flex: 1; overflow-y: auto; padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-4); }
.screen__footer { flex-shrink: 0; padding: var(--space-3) var(--space-4) var(--space-6); }
.screen__body--center { align-items: center; justify-content: center; text-align: center; }
.screen__body--no-pad { padding: 0; }

.row { display: flex; align-items: center; gap: var(--space-3); }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; }
.flex-1 { flex: 1; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

/* CARD */

.card {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-100);
  padding: var(--space-4);
}
.card--shadow { box-shadow: var(--shadow-sm); border: none; }
.card--gradient-green { background: var(--gradient-green); color: white; border: none; }
.card--gradient-brand { background: var(--gradient-brand); color: white; border: none; }
.card--flat { background: var(--gray-50); border: none; }

/* TYPOGRAPHY */

.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-md { font-size: var(--font-size-md); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }
.text-4xl { font-size: var(--font-size-4xl); }

.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }
.font-black { font-weight: var(--font-weight-black); }

.text-secondary { color: var(--app-text-secondary); }
.text-green { color: var(--green); }
.text-blue { color: var(--blue); }
.text-orange { color: var(--orange); }
.text-red { color: var(--red); }
.text-white { color: white; }
.text-center { text-align: center; }

/* DIVIDER */

.divider {
  height: 1px;
  background: var(--gray-100);
  border: none;
  margin: var(--space-3) 0;
}

/* LIST */

.list-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--gray-100);
}
.list-item:last-child { border-bottom: none; }
.list-item__icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-lg);
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.list-item__icon img { width: 18px; height: 18px; opacity: 0.6; }
.list-item__body { flex: 1; min-width: 0; }
.list-item__title { font-size: var(--font-size-base); font-weight: var(--font-weight-medium); }
.list-item__subtitle { font-size: var(--font-size-sm); color: var(--app-text-secondary); }
.list-item__chevron { width: 16px; height: 16px; opacity: 0.3; }

/* BADGE (inline) */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
}
.badge--green { background: var(--green-light); color: var(--green-dark); }
.badge--blue { background: var(--blue-light); color: var(--blue-dark); }
.badge--orange { background: var(--orange-light); color: var(--orange-dark); }
.badge--red { background: var(--red-light); color: var(--red-dark); }
.badge--gray { background: var(--gray-100); color: var(--gray-600); }

/* STAT */

.stat { text-align: center; }
.stat__value { font-size: var(--font-size-xl); font-weight: var(--font-weight-bold); }
.stat__label { font-size: var(--font-size-xs); color: var(--app-text-secondary); }

/* MAP PLACEHOLDER */

.map-placeholder {
  flex: 1;
  min-height: 200px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: var(--font-size-sm);
  position: relative;
}
.map-placeholder::after { content: 'Carte'; }

/* OTP */

.otp { display: flex; gap: var(--space-3); justify-content: center; }
.otp__box {
  width: 52px;
  height: 56px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  background: white;
}
.otp__box--filled { border-color: var(--green); background: var(--green-light); }

/* SUCCESS SCREEN */

.success-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-8);
  gap: var(--space-4);
  flex: 1;
}
.success-screen--green { background: var(--gradient-green); color: white; }
.success-screen--orange { background: var(--gradient-orange); color: white; }
.success-screen__icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-3xl);
}
.success-screen__title { font-size: var(--font-size-2xl); font-weight: var(--font-weight-bold); }
.success-screen__subtitle { font-size: var(--font-size-base); opacity: 0.85; max-width: 280px; }
