/**
 * Doctiva Design System - Tokens globaux
 * Inspiré de Doctolib - Utilisé sur tout le site
 */

:root {
  /* Premium Fonts */
  --font-heading: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  
  /* Brand colors */
  --brand-600: #2563EB;
  --brand-500: #3B82F6;
  --brand-400: #60A5FA;
  
  /* Accent medical */
  --accent-500: #06B6D4;
  
  /* Ink (texte) */
  --ink-900: #0F172A;
  --ink-700: #1E293B;
  --ink-600: #334155;
  --ink-400: #94A3B8;
  
  /* Backgrounds */
  --bg-50: #F8FAFC;
  --bg-100: #F1F5F9;
  --card: #FFFFFF;
  
  /* Border radius */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  
  /* Shadows */
  --shadow-md: 0 10px 20px rgba(2, 6, 23, .06);
  --shadow-lg: 0 20px 40px rgba(2, 6, 23, .08);
  
  /* Typography - Fluid responsive */
  --fs-hero: clamp(28px, 3.8vw, 44px);
  --fs-h2: clamp(20px, 2.2vw, 28px);
  --fs-body: clamp(14px, 1.2vw, 16px);
  --fs-meta: 13px;
  
  /* Transitions */
  --transition: all 0.3s ease;
  
  /* Z-index scale */
  --z-dropdown: 100;
  --z-sticky: 50;
  --z-modal: 200;
  
  /* Icon sizes (Flows V2) */
  --icon-xl: 56px;
  --icon-lg: 48px;
  --icon-md: 28px;
  
  /* Flow cards */
  --halo-bg: rgba(37, 99, 235, .12);
  --card-border: #E7ECF3;
}

/* Responsive icon sizes */
@media (max-width: 768px) {
  :root {
    --icon-xl: 40px;
  }
}

/* Base typography */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--ink-900);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.kpi .num {
  font-variant-numeric: tabular-nums lining-nums;
}

/* Skip link (accessibilité) - visible uniquement au focus clavier */
.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-600);
  color: white;
  padding: 12px 24px;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
}

.skip-link:focus {
  top: 0;
  opacity: 1;
  pointer-events: auto;
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

/* Focus visible (accessibilité) */
:focus-visible {
  outline: 2px solid var(--brand-600);
  outline-offset: 2px;
}

/* Reduced motion (accessibilité) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

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

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Buttons base */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--fs-body);
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  min-height: 44px;
}

.btn-primary {
  background: var(--brand-600);
  color: white;
}

.btn-primary:hover {
  background: var(--brand-500);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: white;
  color: var(--brand-600);
  border: 2px solid var(--brand-600);
}

.btn-secondary:hover {
  background: var(--bg-50);
}

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

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

