/* Platform.UI — Design tokens (source unique de vérité).
   Thème plateforme de base : sombre sobre, accent laiton.
   Structuré pour surcharge par [data-theme="..."] en U2 (theming par plugin). */

:root {
  /* ---- Surfaces ---- */
  --app-bg:         #14181f;
  --app-surface:    #1b2230;
  --app-surface-2:  #232c3d;
  --app-border:     #2e3950;

  /* ---- Texte (ratios sur --app-bg, cf. spec §10) ---- */
  --app-text:        #e6e9ef; /* ≈13:1  AAA */
  --app-text-muted:  #9aa4b2; /* ≈6.8:1 AA  */
  --app-text-subtle: #828ca0; /* ≈5.0:1 AA  */

  /* ---- Accent laiton / or assourdi ---- */
  --app-accent:        #c9a24a;
  --app-accent-rgb:    201, 162, 74;
  --app-accent-hover:  #d9b65f;
  --app-on-accent:     #1a1407;
  --app-focus:         #e0c069;

  /* ---- Sémantique (aligné palette DED existante) ---- */
  --app-success: #34d399;
  --app-warning: #fbbf24;
  --app-danger:  #f87171;
  --app-info:    #93c5fd;
  /* Compagnons RGB (fonds translucides : rgba(var(--app-<sem>-rgb), a)) */
  --app-success-rgb: 52, 211, 153;
  --app-warning-rgb: 251, 191, 36;
  --app-danger-rgb:  248, 113, 113;
  --app-info-rgb:    147, 197, 253;

  /* ---- Espacement (base 4px) ---- */
  --app-space-1: 4px;
  --app-space-2: 8px;
  --app-space-3: 12px;
  --app-space-4: 16px;
  --app-space-5: 24px;
  --app-space-6: 32px;
  --app-space-7: 48px;

  /* ---- Rayons ---- */
  --app-radius-sm:   6px;
  --app-radius-md:   10px;
  --app-radius-lg:   14px;
  --app-radius-pill: 999px;

  /* ---- Ombres (discrètes, fond sombre) ---- */
  --app-shadow-1: 0 1px 2px rgba(0, 0, 0, .35);
  --app-shadow-2: 0 6px 20px rgba(0, 0, 0, .45);

  /* ---- Typographie ---- */
  --app-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
                   sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --app-text-xs:   .78rem;
  --app-text-sm:   .875rem;
  --app-text-base: 1rem;
  --app-text-lg:   1.125rem;
  --app-text-xl:   1.375rem;
  --app-text-2xl:  1.75rem;
  --app-weight-normal:   400;
  --app-weight-medium:   500;
  --app-weight-semibold: 600;
  --app-weight-bold:     700;
  --app-leading-tight:   1.25;
  --app-leading-normal:  1.5;
  --app-leading-relaxed: 1.7;

  /* ---- Z-index (alignés sur l'échelle Bootstrap) ---- */
  --app-z-dropdown: 1000;
  --app-z-sticky:   1020;
  --app-z-fixed:    1030;
  --app-z-modal:    1050;
  --app-z-popover:  1070;
  --app-z-toast:    1080;

  /* ---- Motion ---- */
  --app-duration-fast: 120ms;
  --app-duration-base: 200ms;
  --app-duration-slow: 320ms;
  --app-ease-standard: cubic-bezier(.2, 0, 0, 1);
  --app-ease-out:      cubic-bezier(0, 0, .2, 1);
}

/* Taille extra-small (non standard Bootstrap — usage DED uniquement) */
.btn-xs { font-size: .75rem; padding: .15rem .4rem; }

/* Respect de prefers-reduced-motion : neutralise les durées au niveau token. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --app-duration-fast: 1ms;
    --app-duration-base: 1ms;
    --app-duration-slow: 1ms;
  }
}
