/* Jetons : polices, couleurs, espacements, marges des barres système. */

@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/static/fonts/outfit-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/static/fonts/outfit-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Jetons ---------- */

:root {
  color-scheme: dark;
  --font-display: "Outfit", "Avenir Next", system-ui, sans-serif;
  --display: var(--font-display);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font-ui: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font: var(--font-ui);
  --bg: #08090b;
  --surface-1: var(--bg);
  --bg-2: #121419;
  --surface: #181b21;
  --surface-2: #20242b;
  --surface-3: #2b3039;
  --menu-bg: #262a32;
  --hover: rgba(255, 255, 255, 0.07);
  --active: rgba(255, 255, 255, 0.11);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.24);
  --text: #f4f6f8;
  --text-1: var(--text);
  --text-2: #b4bbc6;
  --text-3: #7d8693;
  --accent: #1ed760;
  --accent-2: #3be477;
  --accent-ink: #03170a;
  --on-accent: #04150c;
  --selection: rgba(30, 215, 96, 0.35);
  --drop-bg: rgba(8, 9, 11, 0.82);
  --tile-bg: var(--surface-2);
  --danger: #ff6b6b;
  --track: rgba(255, 255, 255, 0.18);
  --buffer: rgba(255, 255, 255, 0.32);
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;
  --radius-s: var(--r-sm);
  --radius: var(--r-md);
  --radius-l: var(--r-lg);
  --white: #fff;
  --knob: #f4f6f8;
  --scrim: rgba(0, 0, 0, 0.5);
  --scrim-strong: rgba(0, 0, 0, 0.6);
  --toast-bg: #f4f6f8;
  --toast-ink: #0b0c0f;
  --toast-error-bg: #ff8080;
  --toast-error-ink: #200404;
  --fs-title: clamp(32px, 4vw, 40px);
  --fs-section: 20px;
  --fs-body: 16px;
  --fs-caption: 13px;
  /* Z-index (anciennes valeurs -> rôle) : 1,2,3 -> raised ; 9,10 -> sticky ; 30 -> bar ;
     45,50,60 -> panel ; 69,70,80 -> overlay (menus, voiles) ; 81 -> modal ; 90,95 -> toast. */
  --z-raised: 1;
  --z-sticky: 10;
  --z-bar: 30;
  --z-panel: 50;
  --z-overlay: 80;
  --z-modal: 90;
  --z-toast: 95;
  --sidebar-w: 280px;
  --panel-w: 360px;
  --player-h: 84px;
  --gutter: 32px;
  --tint: 56, 64, 84;
  --tint-vivid: 30, 215, 96;
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  /* Marges des barres système : encoche et barre d'accueil de l'iPhone ; application Android
     (affichage « bord à bord ») : valeurs transmises par l'application (native.js). */
  --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);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #e9ebef;
    --bg-2: #ffffff;
    --surface: #ffffff;
    --surface-2: #f1f2f5;
    --surface-3: #e3e6eb;
    --menu-bg: #ffffff;
    --hover: rgba(15, 18, 24, 0.05);
    --active: rgba(15, 18, 24, 0.09);
    --line: rgba(15, 18, 24, 0.09);
    --line-strong: rgba(15, 18, 24, 0.25);
    --text: #12151a;
    --text-2: #4b525d;
    --text-3: #7a828e;
    --accent: #0e7f3a;
    --accent-2: #0e8b3f;
    --accent-ink: #ffffff;
    --on-accent: #ffffff;
    --danger: #d93636;
    --track: rgba(15, 18, 24, 0.16);
    --buffer: rgba(15, 18, 24, 0.28);
    --shadow: 0 16px 40px rgba(15, 18, 24, 0.18);
  }
}

/* Tablette (768–1099 px) */
@media (max-width: 1099px) {
  :root { --sidebar-w: 76px; --gutter: 24px; }
}

/* Téléphone (< 768 px) */
@media (max-width: 767px) {
  :root { --gutter: 16px; --player-h: 64px; }
}
