/* ========================================================================
   LHCorp · Design Tokens — Source unique de vérité
   Version 1.7.0
   ========================================================================
   Ce fichier est chargé en PREMIER sur toutes les pages LHCorp (admin + public)
   et définit la palette, typographie, espacements, ombres, transitions.

   Toutes les autres CSS DEVRAIENT utiliser ces variables via var(--lhc-*).
   Les valeurs hardcodées qui restent sont volontairement laissées comme
   fallback gracieux pour garantir la rétrocompatibilité.
   ======================================================================== */

:root {
  /* ── Palette primaire ── */
  --lhc-primary:        #2271b1;   /* Bleu WordPress, marque LHCorp */
  --lhc-primary-hover:  #1d5f95;
  --lhc-primary-light:  #e7f1fa;
  --lhc-primary-dark:   #135e96;

  --lhc-success:        #1d8540;
  --lhc-success-light:  #e7f5e9;
  --lhc-success-dark:   #166634;

  --lhc-warning:        #dba617;
  --lhc-warning-light:  #fef8ee;
  --lhc-warning-dark:   #b86200;

  --lhc-danger:         #b32d2e;
  --lhc-danger-light:   #fde7e9;
  --lhc-danger-dark:    #8a1f20;

  --lhc-accent:         #8c4799;
  --lhc-accent-light:   #f3e5f5;

  /* ── Neutres ── */
  --lhc-fg:             #1d2327;   /* Texte principal */
  --lhc-fg-soft:        #50575e;   /* Texte secondaire */
  --lhc-fg-muted:       #646970;   /* Texte discret */
  --lhc-fg-subtle:      #8c8f94;   /* Texte très discret */

  --lhc-bg:             #ffffff;
  --lhc-bg-soft:        #fafafa;
  --lhc-bg-muted:       #f6f7f7;
  --lhc-bg-subtle:      #f0f0f1;

  --lhc-border:         #e5e7eb;
  --lhc-border-soft:    #f0f0f1;
  --lhc-border-strong:  #c3c4c7;

  /* ── Typographie ── */
  --lhc-font-base:      -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", system-ui, sans-serif;
  --lhc-font-mono:      ui-monospace, SFMono-Regular, "Menlo", "Consolas", monospace;

  --lhc-text-xs:        11px;
  --lhc-text-sm:        12px;
  --lhc-text-base:      14px;
  --lhc-text-md:        15px;
  --lhc-text-lg:        17px;
  --lhc-text-xl:        20px;
  --lhc-text-2xl:       24px;
  --lhc-text-3xl:       32px;
  --lhc-text-4xl:       40px;

  --lhc-line-tight:     1.25;
  --lhc-line-normal:    1.5;
  --lhc-line-relaxed:   1.7;

  --lhc-weight-normal:  400;
  --lhc-weight-medium:  500;
  --lhc-weight-semibold:600;
  --lhc-weight-bold:    700;

  /* ── Border radius (4 valeurs max) ── */
  --lhc-radius-sm:      4px;
  --lhc-radius:         8px;
  --lhc-radius-md:      12px;
  --lhc-radius-lg:      16px;
  --lhc-radius-full:    999px;

  /* ── Espacements ── */
  --lhc-space-1:        4px;
  --lhc-space-2:        8px;
  --lhc-space-3:        12px;
  --lhc-space-4:        16px;
  --lhc-space-5:        20px;
  --lhc-space-6:        24px;
  --lhc-space-8:        32px;
  --lhc-space-10:       40px;

  /* ── Ombres ── */
  --lhc-shadow-sm:      0 1px 2px rgba(0,0,0,.04);
  --lhc-shadow:         0 2px 8px rgba(0,0,0,.05);
  --lhc-shadow-md:      0 4px 12px rgba(0,0,0,.08);
  --lhc-shadow-lg:      0 8px 24px rgba(0,0,0,.12);
  --lhc-shadow-focus:   0 0 0 3px rgba(34,113,177,.25);

  /* ── Transitions ── */
  --lhc-transition-fast:  100ms ease;
  --lhc-transition:       150ms ease;
  --lhc-transition-slow:  300ms ease;

  /* ── Touch targets ── */
  --lhc-touch-min:      44px;   /* Apple HIG */
  --lhc-touch-comfort:  48px;   /* Material */

  /* ── Z-index ── */
  --lhc-z-dropdown:     100;
  --lhc-z-sticky:       200;
  --lhc-z-overlay:      900;
  --lhc-z-modal:        1000;
  --lhc-z-toast:        9999;
}

/* ── Focus visible global ── */
.lhc-focus-ring,
.lhc-pub-add-btn:focus-visible,
.lhc-pub-tab:focus-visible,
.lhc-pub-cart-fab:focus-visible,
.lhc-pub-cart-close:focus-visible,
.lhc-pub-cart-qty-btn:focus-visible,
.lhc-pub-btn:focus-visible,
.lhc-resa-btn:focus-visible,
.lhc-resa-stepper-btn:focus-visible,
.lhc-resa-slot:focus-visible,
.lhc-day-card:focus-visible,
.lhc-card--clickable:focus-visible,
.lhc-choice:focus-within,
.lhc-tab a:focus-visible {
  outline: 2px solid var(--lhc-primary);
  outline-offset: 2px;
  box-shadow: var(--lhc-shadow-focus);
}

/* ── Reduce motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
