/* Jetons de design de SadaReel.
   Une seule couleur d'accent : changer --accent (et ses dérivés) suffit à rethémer l'application. */

:root {
  color-scheme: light;

  /* Accent */
  --accent: #4F46E5;          /* fonds pleins : boutons, sélections (blanc dessus : contraste 6,3) */
  --accent-strong: #4338CA;   /* survol et appui */
  --accent-text: #4338CA;     /* texte et icônes d'accent sur fond clair */
  --accent-soft: rgba(79, 70, 229, .10);
  --accent-soft-2: rgba(79, 70, 229, .16);
  --on-accent: #FFFFFF;
  --focus: #4F46E5;

  /* Surfaces et textes */
  --bg: #F4F4F7;
  --surface: #FFFFFF;
  --surface-2: #EDEDF2;
  --text: #111114;
  --text-2: #5C5C66;
  --text-3: #6E6E78;
  --sep: rgba(17, 17, 20, .10);
  --sep-strong: rgba(17, 17, 20, .18);
  --bar: rgba(244, 244, 247, .72);
  --bar-solid: #F4F4F7;
  --overlay: rgba(17, 17, 20, .42);

  /* États */
  --success: #15803D;
  --success-soft: rgba(21, 128, 61, .12);
  --warning: #A1500A;
  --warning-soft: rgba(217, 119, 6, .14);
  --danger: #C02A1F;
  --danger-soft: rgba(192, 42, 31, .10);

  /* Familles de concepts publicitaires (catalogue de l'étape Idée) */
  --fam-show: #1D4ED8;
  --fam-desire: #BE185D;
  --fam-story: #C2410C;
  --fam-proof: #15803D;
  --fam-attention: #6D28D9;

  /* Squelettes */
  --sk-1: rgba(17, 17, 20, .06);
  --sk-2: rgba(17, 17, 20, .12);

  /* Ombres */
  --shadow-1: 0 1px 2px rgba(17, 17, 20, .05), 0 1px 1px rgba(17, 17, 20, .03);
  --shadow-2: 0 10px 30px rgba(17, 17, 20, .10), 0 2px 6px rgba(17, 17, 20, .05);
  --shadow-3: 0 -8px 40px rgba(17, 17, 20, .16);

  /* Formes */
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  /* Mouvement */
  --dur-1: 200ms;
  --dur-2: 250ms;
  --dur-3: 350ms;
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* Typographie */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --font-ar: "Segoe UI", "Noto Sans Arabic", "Geeza Pro", "Noto Naskh Arabic", Tahoma, system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace;

  /* Gabarits */
  --topbar-h: 56px;
  --tabbar-h: 62px;
  --actionbar-h: 76px;
  --tap: 44px;
}

/* Mode sombre : préférence du système, sauf si le client a choisi « clair ». */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --accent: #5B52F0;
    --accent-strong: #6C63F5;
    --accent-text: #ABA6FF;
    --accent-soft: rgba(139, 133, 255, .16);
    --accent-soft-2: rgba(139, 133, 255, .26);
    --focus: #ABA6FF;
    --bg: #0B0B0F;
    --surface: #17171C;
    --surface-2: #222229;
    --text: #F5F5F7;
    --text-2: #A8A8B3;
    --text-3: #92929D;
    --sep: rgba(255, 255, 255, .12);
    --sep-strong: rgba(255, 255, 255, .22);
    --bar: rgba(11, 11, 15, .70);
    --bar-solid: #0B0B0F;
    --overlay: rgba(0, 0, 0, .62);
    --success: #4ADE80;
    --success-soft: rgba(74, 222, 128, .14);
    --warning: #FBBF24;
    --warning-soft: rgba(251, 191, 36, .14);
    --danger: #FF8A80;
    --danger-soft: rgba(255, 138, 128, .14);
    --fam-show: #93C5FD;
    --fam-desire: #F9A8D4;
    --fam-story: #FDBA74;
    --fam-proof: #86EFAC;
    --fam-attention: #C4B5FD;
    --sk-1: rgba(255, 255, 255, .06);
    --sk-2: rgba(255, 255, 255, .12);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .40);
    --shadow-2: 0 10px 30px rgba(0, 0, 0, .50);
    --shadow-3: 0 -8px 40px rgba(0, 0, 0, .60);
  }
}

/* Mode sombre choisi à la main. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --accent: #5B52F0;
  --accent-strong: #6C63F5;
  --accent-text: #ABA6FF;
  --accent-soft: rgba(139, 133, 255, .16);
  --accent-soft-2: rgba(139, 133, 255, .26);
  --focus: #ABA6FF;
  --bg: #0B0B0F;
  --surface: #17171C;
  --surface-2: #222229;
  --text: #F5F5F7;
  --text-2: #A8A8B3;
  --text-3: #92929D;
  --sep: rgba(255, 255, 255, .12);
  --sep-strong: rgba(255, 255, 255, .22);
  --bar: rgba(11, 11, 15, .70);
  --bar-solid: #0B0B0F;
  --overlay: rgba(0, 0, 0, .62);
  --success: #4ADE80;
  --success-soft: rgba(74, 222, 128, .14);
  --warning: #FBBF24;
  --warning-soft: rgba(251, 191, 36, .14);
  --danger: #FF8A80;
  --danger-soft: rgba(255, 138, 128, .14);
  --fam-show: #93C5FD;
  --fam-desire: #F9A8D4;
  --fam-story: #FDBA74;
  --fam-proof: #86EFAC;
  --fam-attention: #C4B5FD;
  --sk-1: rgba(255, 255, 255, .06);
  --sk-2: rgba(255, 255, 255, .12);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .40);
  --shadow-2: 0 10px 30px rgba(0, 0, 0, .50);
  --shadow-3: 0 -8px 40px rgba(0, 0, 0, .60);
}

:root[data-theme="light"] {
  color-scheme: light;
}
