/* ════════════════════════════════════════════════════════════════════
   _shared/css/tokens.css — Design tokens communs MCW Group
   ════════════════════════════════════════════════════════════════════
   À inclure en premier sur chaque page :
     <link rel="stylesheet" href="/_shared/css/tokens.css">
   Puis le brand override de l'app :
     <link rel="stylesheet" href="/_shared/css/brand-art-de-vivre.css">
     OU
     <link rel="stylesheet" href="/_shared/css/brand-vucko-edition.css">
   Puis les composants/motion/etc.
   ════════════════════════════════════════════════════════════════════ */

:root {
  /* ─── Typographie ────────────────────────────────────────── */
  --mcw-font-serif: 'Fraunces', 'Playfair Display', Georgia, serif;
  --mcw-font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mcw-font-mono: 'DM Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --mcw-fs-xs: 11px;
  --mcw-fs-sm: 13px;
  --mcw-fs-base: 15px;
  --mcw-fs-md: 17px;
  --mcw-fs-lg: 22px;
  --mcw-fs-xl: 32px;
  --mcw-fs-display: clamp(40px, 6vw, 56px);

  --mcw-lh-tight: 1.1;
  --mcw-lh-snug: 1.3;
  --mcw-lh-base: 1.6;
  --mcw-lh-relaxed: 1.75;

  /* ─── Espacements (échelle 4px) ──────────────────────────── */
  --mcw-space-1: 4px;
  --mcw-space-2: 8px;
  --mcw-space-3: 12px;
  --mcw-space-4: 16px;
  --mcw-space-5: 24px;
  --mcw-space-6: 32px;
  --mcw-space-7: 48px;
  --mcw-space-8: 72px;

  /* ─── Radius ─────────────────────────────────────────────── */
  --mcw-r-xs: 4px;
  --mcw-r-sm: 8px;
  --mcw-r-md: 12px;
  --mcw-r-lg: 18px;
  --mcw-r-xl: 28px;
  --mcw-r-pill: 999px;

  /* ─── Layers (z-index) ───────────────────────────────────── */
  --mcw-z-base: 0;
  --mcw-z-raised: 10;
  --mcw-z-overlay: 100;
  --mcw-z-modal: 200;
  --mcw-z-toast: 300;

  /* ─── Transitions / motion ───────────────────────────────── */
  --mcw-t-fast: 120ms;
  --mcw-t-base: 200ms;
  --mcw-t-slow: 320ms;
  --mcw-t-page: 400ms;
  --mcw-ease-out: cubic-bezier(.16, 1, .3, 1);
  --mcw-ease-in-out: cubic-bezier(.4, 0, .2, 1);
  --mcw-ease-back: cubic-bezier(.34, 1.56, .64, 1);

  /* ─── Tokens "rôle" (override par marque) ────────────────── */
  /* Defaults : palette neutre MCW (utilisée par le hub admin) */
  --mcw-bg:       #FAF6EC;
  --mcw-bg-2:     #F4EEE3;
  --mcw-bg-3:     #ECE3D2;
  --mcw-surface:  #FFFFFF;

  --mcw-ink:       #0E1A2C;
  --mcw-ink-soft:  #4A5568;
  --mcw-ink-muted: #8A8E94;

  --mcw-line:      #E5DFCF;
  --mcw-line-soft: #ECE3D2;

  --mcw-accent:        #B89968;        /* gold MCW Group */
  --mcw-accent-soft:   #D4BB8A;
  --mcw-accent-deep:   #8E7548;
  --mcw-accent-contrast: #0E1A2C;

  --mcw-secondary:     #0E1A2C;        /* navy */
  --mcw-secondary-2:   #1B2A40;

  --mcw-signal-ok:     #2FA878;
  --mcw-signal-warn:   #E8B840;
  --mcw-signal-err:    #C85A3F;
  --mcw-signal-info:   #4E7FA8;

  --mcw-shadow-sm: 0 1px 3px rgba(14,26,44,.06), 0 8px 18px -8px rgba(14,26,44,.08);
  --mcw-shadow-md: 0 2px 6px rgba(14,26,44,.08), 0 18px 38px -12px rgba(14,26,44,.14);
  --mcw-shadow-lg: 0 10px 50px rgba(14,26,44,.10), 0 2px 8px rgba(14,26,44,.04);

  /* ─── Brand identity (overridable) ───────────────────────── */
  --mcw-brand-name: 'MCW Édition';
  --mcw-brand-mark-bg: var(--mcw-secondary);
  --mcw-brand-mark-fg: var(--mcw-bg);
  --mcw-brand-mark-accent: var(--mcw-accent);
}

/* ─── Reset doux ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--mcw-font-sans);
  font-size: var(--mcw-fs-base);
  line-height: var(--mcw-lh-base);
  color: var(--mcw-ink);
  background: var(--mcw-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--mcw-accent-deep); text-decoration: none; }
a:hover { color: var(--mcw-secondary); }

/* Respecter prefers-reduced-motion : on coupe toutes les anims */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
