/* ============================================
   M2R PRINTING SYSTEM — Design Tokens
   Version 2.0 — Premium × Accessible
   ============================================ */

:root {
  /* ── Couleurs principales ─────────────────── */
  --primary:         #0f1b2d;   /* Navy profond — autorité, sophistication */
  --primary-light:   #1e3352;   /* Navy clair — hovers, sous-titres */
  --primary-lighter: #2a4a72;   /* Navy moyen — bordures actives */
  --secondary:       #0091d5;   /* Cyan vif — technologie, confiance */
  --secondary-dark:  #0078b3;   /* Cyan foncé — hover liens */
  --secondary-light: #e6f4fc;   /* Cyan pastel — fonds légers */
  --secondary-ultra: #f0f8ff;   /* Cyan ultra-clair — bg cartes */
  --accent:          #e6007e;   /* Magenta — CTA, énergie, action */
  --accent-hover:    #cc006e;   /* Magenta foncé — hover CTA */
  --accent-soft:     #fce4f0;   /* Magenta pastel — badges */
  --highlight:       #f5a623;   /* Or — badges, étoiles, "bonnes affaires" */
  --success:         #22c55e;   /* Vert — validations, succès */
  --warning:         #f59e0b;   /* Ambre — alertes */

  /* ── Neutres raffinés ─────────────────────── */
  --text:            #1a1a2e;   /* Quasi-noir bleuté — texte principal */
  --text-secondary:  #4a5568;   /* Gris moyen — texte secondaire */
  --text-muted:      #5b6a7d;   /* Gris moyen — labels, dates (assombri le 17/08 : #8896a6 tombait à 2,8 de contraste) */
  --bg:              #ffffff;
  --bg-warm:         #fafbfd;   /* Blanc chaud — fond de page */
  --bg-alt:          #f4f6f9;   /* Gris très clair — sections alternées */
  --bg-card:         #ffffff;
  --bg-dark:         #0f1b2d;   /* Navy profond — footer, sections sombres */
  --bg-dark-soft:    #162236;   /* Navy légèrement éclairci */
  --border:          #e5e9f0;   /* Bordure douce */
  --border-light:    #f0f2f6;   /* Bordure ultra-douce */

  /* ── Typographie ──────────────────────────── */
  --font-heading:    'Satoshi', 'Inter', system-ui, -apple-system, sans-serif;
  --font-body:       'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono:       'JetBrains Mono', 'Fira Code', monospace;

  /* Échelle typographique (fluid) */
  --text-xs:    0.75rem;    /* 12px */
  --text-sm:    0.8125rem;  /* 13px */
  --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.75rem;    /* 44px */
  --text-5xl:   3.5rem;     /* 56px — hero home */

  /* ── Espacements ──────────────────────────── */
  --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;
  --space-32:   128px;

  /* Section spacing (fluid) */
  --section-py:  clamp(64px, 8vw, 120px);
  --section-py-sm: clamp(48px, 6vw, 80px);

  /* ── Dimensions ───────────────────────────── */
  --max-width:   1320px;
  --max-width-narrow: 960px;
  --max-width-text:   720px;

  /* ── Radius ───────────────────────────────── */
  --radius-sm:   4px;
  --radius:      8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  /* ── Ombres (élégantes, multi-couches) ───── */
  --shadow-xs:   0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm:   0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow:      0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-md:   0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
  --shadow-lg:   0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.03);
  --shadow-xl:   0 25px 50px -12px rgba(0,0,0,0.15);
  --shadow-glow: 0 0 40px rgba(0,145,213,0.12);
  --shadow-accent: 0 8px 24px rgba(230,0,126,0.2);

  /* ── Transitions ──────────────────────────── */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration:    250ms;
  --duration-slow: 400ms;
  --transition:  all var(--duration) var(--ease-out);
  --transition-fast: all var(--duration-fast) var(--ease-out);

  /* ── Z-index ──────────────────────────────── */
  --z-dropdown:  100;
  --z-sticky:    200;
  --z-navbar:    1000;
  --z-mega:      1001;
  --z-overlay:   2000;
  --z-modal:     3000;


  /* ── Alias de compatibilité (utilisés en inline dans les pages) ── */
  --light:       #f4f6f9;   /* = --bg-alt : fonds de sections alternées */
  --text-light:  #5b6a7d;   /* = --text-muted : texte secondaire (contraste AA) */
  --dark:        #0f1b2d;   /* = --primary */
  --white:       #ffffff;

  /* ── Cursor glow ──────────────────────────── */
  --glow-size:   400px;
  --glow-color:  rgba(0, 145, 213, 0.04);
}

/* ===== RESET ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg-warm);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: var(--transition-fast);
}

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

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

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p { line-height: 1.7; }

::selection {
  background: var(--secondary);
  color: #fff;
}

/* ── Utility: visually hidden ─────────────── */
.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;
}
