/* ═══════════════════════════════════════════════════════════════════════════
   🎨 THEME.CSS - Design System Premium
   Lavage Auto Pro 37 - Subscription Wizard
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────────
   📐 CSS Custom Properties (Design Tokens)
   OKLCH avec saturation réduite pour un look premium et sobre
   ───────────────────────────────────────────────────────────────────────────── */

:root {
  /* ══════════ PRIMARY COLORS ══════════
     Noir/Charbon premium - luxe automobile */
  --primary: oklch(22% 0.02 270);
  --primary-hover: oklch(28% 0.02 270);
  --primary-light: oklch(35% 0.02 270);
  --primary-muted: oklch(95% 0.01 270);
  
  /* Accent doré/champagne pour le luxe */
  --accent: oklch(78% 0.12 85);
  --accent-hover: oklch(72% 0.14 85);
  --accent-light: oklch(92% 0.06 85);
  
  /* Gradient premium - noir profond à charbon */
  --gradient-primary: linear-gradient(135deg, oklch(15% 0.02 270) 0%, oklch(25% 0.02 270) 100%);
  --gradient-subtle: linear-gradient(180deg, oklch(99% 0.003 270) 0%, oklch(97% 0.005 270) 100%);
  --gradient-gold: linear-gradient(135deg, oklch(78% 0.12 85) 0%, oklch(68% 0.14 75) 100%);
  --gradient-hero: radial-gradient(ellipse at 50% 0%, oklch(20% 0.03 270) 0%, oklch(8% 0.02 270) 100%);
  
  /* ══════════ SEMANTIC COLORS ══════════ */
  --success: oklch(62% 0.14 155);
  --success-muted: oklch(95% 0.04 155);
  --warning: oklch(78% 0.12 75);
  --warning-muted: oklch(96% 0.03 75);
  --error: oklch(58% 0.16 25);
  --error-muted: oklch(95% 0.03 25);
  
  /* ══════════ NEUTRAL COLORS ══════════
     Palette sobre avec une touche très légère de bleu */
  --bg-page: oklch(98.5% 0.003 250);
  --bg-card: oklch(100% 0 0);
  --bg-elevated: oklch(100% 0 0);
  --bg-muted: oklch(97% 0.005 250);
  --bg-subtle: oklch(96% 0.008 250);
  
  /* ══════════ TEXT COLORS ══════════ */
  --text-primary: oklch(18% 0.015 250);
  --text-secondary: oklch(42% 0.015 250);
  --text-muted: oklch(58% 0.01 250);
  --text-subtle: oklch(68% 0.008 250);
  --text-inverse: oklch(100% 0 0);
  
  /* ══════════ BORDER COLORS ══════════ */
  --border-default: oklch(92% 0.008 250);
  --border-muted: oklch(94% 0.005 250);
  --border-active: oklch(52% 0.14 250);
  --border-focus: oklch(70% 0.1 250);
  
  /* ══════════ SHADOWS ══════════
     Ombres subtiles et élégantes - moins agressives */
  --shadow-xs: 0 1px 2px oklch(0% 0 0 / 0.04);
  --shadow-sm: 0 2px 4px oklch(0% 0 0 / 0.05);
  --shadow-md: 0 4px 12px oklch(0% 0 0 / 0.06);
  --shadow-lg: 0 8px 24px oklch(0% 0 0 / 0.08);
  --shadow-xl: 0 16px 40px oklch(0% 0 0 / 0.1);
  
  /* Glow subtil pour éléments interactifs */
  --shadow-glow: 0 4px 16px oklch(52% 0.14 250 / 0.18);
  --shadow-glow-lg: 0 8px 28px oklch(52% 0.14 250 / 0.22);
  
  /* ══════════ SPACING SCALE ══════════ */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  
  /* ══════════ BORDER RADIUS ══════════ */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 9999px;
  
  /* ══════════ TYPOGRAPHY ══════════ */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  
  /* Font sizes avec clamp pour responsive */
  --text-xs: clamp(0.6875rem, 1.5vw, 0.75rem);    /* 11-12px */
  --text-sm: clamp(0.8125rem, 1.8vw, 0.875rem);   /* 13-14px */
  --text-base: clamp(0.9375rem, 2vw, 1rem);       /* 15-16px */
  --text-lg: clamp(1.0625rem, 2.2vw, 1.125rem);   /* 17-18px */
  --text-xl: clamp(1.1875rem, 2.5vw, 1.25rem);    /* 19-20px */
  --text-2xl: clamp(1.375rem, 3vw, 1.5rem);       /* 22-24px */
  --text-3xl: clamp(1.625rem, 4vw, 1.875rem);     /* 26-30px */
  --text-4xl: clamp(2rem, 5vw, 2.5rem);           /* 32-40px */
  
  /* Line heights */
  --leading-none: 1;
  --leading-tight: 1.2;
  --leading-snug: 1.35;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;
  
  /* Letter spacing */
  --tracking-tight: -0.025em;
  --tracking-normal: 0;
  --tracking-wide: 0.025em;
  --tracking-wider: 0.05em;
  
  /* Font weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  
  /* ══════════ TRANSITIONS ══════════ */
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
  
  /* ══════════ LAYOUT DIMENSIONS ══════════ */
  --header-height: 76px;
  --progress-height: 56px;
  --nav-height: 72px;
  --floating-price-height: 56px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --content-max-width: 960px;
  
  /* ══════════ Z-INDEX SCALE ══════════ */
  --z-base: 0;
  --z-elevated: 10;
  --z-sticky: 50;
  --z-fixed: 100;
  --z-overlay: 200;
  --z-modal: 300;
  --z-toast: 400;
}

/* ─────────────────────────────────────────────────────────────────────────────
   📱 Responsive Breakpoints
   ───────────────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  :root {
    --header-height: 68px;
    --progress-height: 48px;
    --nav-height: 68px;
    --floating-price-height: 52px;
  }
}

@media (max-width: 480px) {
  :root {
    --header-height: 60px;
    --progress-height: 44px;
    --nav-height: 64px;
    --floating-price-height: 48px;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   🔧 Global Reset & Base Styles
   ───────────────────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: var(--font-normal);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ─────────────────────────────────────────────────────────────────────────────
   📝 Typography Classes
   ───────────────────────────────────────────────────────────────────────────── */

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

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

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }

.tracking-tight { letter-spacing: var(--tracking-tight); }
.tracking-normal { letter-spacing: var(--tracking-normal); }
.tracking-wide { letter-spacing: var(--tracking-wide); }

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
}

/* Links */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-default);
}

a:hover {
  color: var(--primary-hover);
}

/* Selection */
::selection {
  background: oklch(52% 0.14 250 / 0.2);
  color: var(--text-primary);
}

/* Focus visible for accessibility */
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   🎯 Utility Classes
   ───────────────────────────────────────────────────────────────────────────── */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

