/* =========================================================
   STUDY — Design Tokens (Inspiration Encore & Apple Dark)
   ========================================================= */

:root {
  color-scheme: dark;

  /* Fonds & Surfaces */
  --bg-pure: #000000;
  --bg-elevated: #121214;
  --surface-card: #202020;
  --surface-secondary: #303030;
  --surface-hover: #2A2A2D;
  --surface-glass: rgba(32, 32, 32, 0.86);
  --surface-glass-strong: rgba(28, 28, 30, 0.94);

  /* Bordures */
  --border-subtle: #3A3A3C;
  --border-faint: rgba(255, 255, 255, 0.08);
  --border-orange: rgba(245, 160, 68, 0.42);

  /* Identité Orange Encore */
  --orange: #F5A044;
  --orange-light: #FFB45F;
  --orange-pressed: #E08D32;
  --orange-soft: rgba(245, 160, 68, 0.14);
  --orange-soft-strong: rgba(245, 160, 68, 0.24);

  /* Textes */
  --text-primary: #FFFFFF;
  --text-secondary: #8E8E93;
  --text-tertiary: #636366;

  /* États sémantiques discrets */
  --green: #32D74B;
  --green-soft: rgba(50, 215, 75, 0.14);
  --red: #FF453A;
  --red-soft: rgba(255, 69, 58, 0.14);

  /* Typographie native Apple / Système */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", Roboto, Inter, system-ui, sans-serif;

  /* Rayons & Espacements */
  --radius-xl: 26px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  /* Safe Areas iPhone */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);

  /* Ombres très discrètes */
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-float: 0 14px 36px rgba(0, 0, 0, 0.72);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background-color: var(--bg-pure);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background-color: var(--bg-pure);
  color: var(--text-primary);
  overflow-x: hidden;
  padding-top: var(--safe-top);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--text-secondary);
}

.small {
  font-size: 13px;
}

.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;
}

@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;
  }
}
