/**
 * Jetons et fondations « style Apple » — index, home (éditeur), auth, dashboard, messagerie.
 * Logs : window.__OKDAK_INDEX_DEBUG__ (index) · window.__OKDAK_HOME_DEBUG__ (home).
 */

:root {
  --apple-bg: #000000;
  --apple-bg-elevated: #1c1c1e;
  --apple-bg-page: #09090b;
  /* Surfaces iOS-like (fills) */
  --apple-fill: rgba(120, 120, 128, 0.2);
  --apple-fill-secondary: rgba(120, 120, 128, 0.28);
  --apple-fill-tertiary: rgba(118, 118, 128, 0.14);
  --apple-text: #f5f5f7;
  --apple-text-secondary: #a1a1a6;
  --apple-text-tertiary: #6e6e73;
  --apple-blue: #2997ff;
  --apple-blue-deep: #0071e3;
  --apple-glass: rgba(255, 255, 255, 0.055);
  --apple-glass-hover: rgba(255, 255, 255, 0.095);
  --apple-border: rgba(255, 255, 255, 0.1);
  --apple-border-strong: rgba(255, 255, 255, 0.16);
  --apple-separator: rgba(84, 84, 88, 0.55);
  --apple-radius-card: 22px;
  --apple-radius-sheet: 20px;
  --apple-radius-pill: 980px;
  --apple-radius-control: 14px;
  /* Ombres superposées (carte / matériau) */
  --apple-shadow-hairline: 0 0 0 0.5px rgba(255, 255, 255, 0.08);
  --apple-shadow-card: var(--apple-shadow-hairline), 0 2px 8px rgba(0, 0, 0, 0.14),
    0 16px 40px rgba(0, 0, 0, 0.32);
  --apple-shadow-float: var(--apple-shadow-hairline), 0 4px 12px rgba(0, 0, 0, 0.18),
    0 20px 48px rgba(0, 0, 0, 0.38);
  --apple-shadow-sm: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 1px 2px rgba(0, 0, 0, 0.22);
  --apple-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --apple-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --apple-ease-spring: cubic-bezier(0.34, 1.2, 0.64, 1);
  --apple-duration: 0.35s;
  --apple-duration-fast: 0.22s;
  --apple-scrim: rgba(0, 0, 0, 0.52);
  --apple-tap-min: 44px;
  --apple-focus-ring: 0 0 0 3px rgba(41, 151, 255, 0.35);
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Anneau de focus visible (sauf champs déjà stylés) */
:focus:not(:focus-visible) {
  outline: none;
}

button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--apple-blue);
  outline-offset: 2px;
}
