/* ==========================================================================
   base.css — Reset, variables CSS, typographie, styles de base
   KekOnFait Design System — Theme clair contemporain
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
  /* Palette principale */
  --primary:        #6366F1;
  --primary-light:  #818CF8;
  --primary-dark:   #4F46E5;

  /* Accents */
  --coral:          #FF6B6B;
  --coral-light:    #FF8585;
  --mint:           #10B981;
  --mint-light:     #34D399;
  --amber:          #F59E0B;
  --amber-light:    #FBBF24;

  /* Fonds */
  --bg:             #FFFFFF;
  --bg-secondary:   #F9FAFB;
  --bg-tertiary:    #F3F4F6;

  /* Texte */
  --text:           #111827;
  --text-secondary: #6B7280;
  --text-tertiary:  #9CA3AF;

  /* Bordures */
  --border:         #E5E7EB;
  --border-hover:   #D1D5DB;

  /* Etats */
  --success:        #10B981;
  --error:          #EF4444;
  --info:           #6366F1;

  /* Typographie */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Tailles de texte */
  --text-xs:    0.75rem;    /* 12px */
  --text-sm:    0.875rem;   /* 14px */
  --text-base:  1rem;       /* 16px */
  --text-lg:    1.125rem;   /* 18px */
  --text-xl:    1.25rem;    /* 20px */
  --text-2xl:   1.5rem;     /* 24px */
  --text-3xl:   2rem;       /* 32px */
  --text-4xl:   2.5rem;     /* 40px */
  --text-5xl:   3.5rem;     /* 56px */
  --text-6xl:   4.5rem;     /* 72px */

  /* Espacements */
  --space-xs:   0.25rem;    /* 4px */
  --space-sm:   0.5rem;     /* 8px */
  --space-md:   1rem;       /* 16px */
  --space-lg:   1.5rem;     /* 24px */
  --space-xl:   2rem;       /* 32px */
  --space-2xl:  3rem;       /* 48px */
  --space-3xl:  4rem;       /* 64px */

  /* Rayons de bordure */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --radius-full: 9999px;

  /* Ombres */
  --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 rgba(0, 0, 0, 0.1);
  --shadow-lg:   0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-xl:   0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
  --shadow-up:   0 -4px 6px rgba(0, 0, 0, 0.05);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   200ms ease;
  --transition-slow:   300ms ease;
  --transition-spring: 400ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Z-index */
  --z-base:     1;
  --z-nav:      10;
  --z-header:   20;
  --z-modal:    100;
  --z-toast:    200;

  /* Dimensions */
  --header-height: 56px;
  --nav-height:    60px;
  --max-width:     1280px;
}

/* --------------------------------------------------------------------------
   Reset & Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   Typographie
   -------------------------------------------------------------------------- */

h1, .h1,
h2, .h2 {
  font-family: var(--font-body);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
}

h1, .h1 {
  font-size: var(--text-5xl);
}

h2, .h2 {
  font-size: var(--text-3xl);
}

h3, .h3,
h4, .h4 {
  font-family: var(--font-body);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

h3, .h3 {
  font-size: var(--text-2xl);
}

h4, .h4 {
  font-size: var(--text-xl);
}

p {
  margin-bottom: var(--space-md);
  color: var(--text-secondary);
}

small, .text-sm {
  font-size: var(--text-sm);
}

.text-xs {
  font-size: var(--text-xs);
}

.text-lg {
  font-size: var(--text-lg);
}

/* Texte accent */
.text-primary {
  color: var(--primary);
}

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

/* --------------------------------------------------------------------------
   Liens
   -------------------------------------------------------------------------- */
a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-base);
}

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

a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* --------------------------------------------------------------------------
   Selection
   -------------------------------------------------------------------------- */
::selection {
  background-color: rgba(99, 102, 241, 0.2);
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Scrollbar
   -------------------------------------------------------------------------- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

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

[hidden] {
  display: none !important; /* Exception justifiee : hidden doit toujours masquer */
}

/* --------------------------------------------------------------------------
   Reduced Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important; /* Exception justifiee : accessibilite */
    animation-iteration-count: 1 !important; /* Exception justifiee : accessibilite */
    transition-duration: 0.01ms !important; /* Exception justifiee : accessibilite */
    scroll-behavior: auto !important; /* Exception justifiee : accessibilite */
  }
}

/* --------------------------------------------------------------------------
   Breakpoints (reference — utiliser en min-width)
   480px  — mobile large
   768px  — tablette
   1024px — desktop
   1280px — desktop large
   -------------------------------------------------------------------------- */
