/* ============================================================
   UbMaker — Design Tokens
   « Du geste à l'objet. »
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&family=Caveat:wght@500;600&display=swap');

:root {
  /* ---- Brand colors ---- */
  --color-primary:        #0B5FFF;  /* Bleu Maker */
  --color-primary-hover:  #094BCC;
  --color-primary-soft:   rgba(11, 95, 255, 0.06);

  --color-ink:            #0A1530;  /* Encre 3D */
  --color-orange:         #FF6B2C;  /* Orange Atelier */
  --color-orange-hover:   #E85A1F;
  --color-violet:         #7B5BFF;  /* Violet Vision (AI ONLY) */
  --color-violet-hover:   #6948E0;
  --color-violet-soft:    rgba(123, 91, 255, 0.10);

  /* ---- Neutrals ---- */
  --color-paper:          #F7F8FA;  /* Papier */
  --color-graphite-30:    #B5BAC4;
  --color-graphite-60:    #5C6275;
  --color-graphite-90:    #1B1F2A;
  --color-white:          #FFFFFF;

  /* ---- Semantic ---- */
  --color-success:        #16A34A;
  --color-error:          #DC2626;
  --color-warning:        #F59E0B;

  /* ---- Surface (light) ---- */
  --bg-base:              var(--color-paper);
  --bg-surface:           var(--color-white);
  --bg-elevated:          var(--color-white);
  --fg-1:                 var(--color-graphite-90);
  --fg-2:                 var(--color-graphite-60);
  --fg-3:                 var(--color-graphite-30);
  --fg-on-primary:        var(--color-white);
  --border-subtle:        rgba(11, 21, 48, 0.08);
  --border-strong:        rgba(11, 21, 48, 0.16);

  /* ---- Typography ---- */
  --font-display:         'Space Grotesk', system-ui, sans-serif;
  --font-body:            'Inter', system-ui, sans-serif;
  --font-mono:            'JetBrains Mono', ui-monospace, monospace;
  --font-hand:            'Caveat', cursive;

  --fs-display:           72px;
  --fs-h1:                48px;
  --fs-h2:                36px;
  --fs-h3:                24px;
  --fs-body-l:            18px;
  --fs-body:              16px;
  --fs-small:             14px;
  --fs-caption:           12px;

  --lh-tight:             1.05;
  --lh-snug:              1.2;
  --lh-normal:            1.5;
  --lh-relaxed:           1.65;

  --tracking-tight:       -0.02em;
  --tracking-normal:      0;
  --tracking-wide:        0.04em;

  /* ---- Spacing (8px grid) ---- */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;
  --space-9:  96px;
  --space-10: 128px;

  /* ---- Radii ---- */
  --radius-sm:  4px;
  --radius-md:  8px;   /* buttons, inputs */
  --radius-lg:  16px;  /* cards */
  --radius-xl:  24px;  /* modals, panels */
  --radius-full: 999px;

  /* ---- Shadows (cool-toned, Encre 3D base) ---- */
  --shadow-sm: 0 1px 2px rgba(11, 21, 48, 0.06);
  --shadow-md: 0 8px 24px rgba(11, 21, 48, 0.08);
  --shadow-lg: 0 24px 48px rgba(11, 21, 48, 0.12);
  --shadow-focus: 0 0 0 3px rgba(11, 95, 255, 0.25);

  /* ---- Layout ---- */
  --container-max: 1280px;
  --gutter: 24px;
  --header-height-vitrine: 72px;
  --header-height-app: 48px;

  /* ---- Motion ---- */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 150ms;
  --duration-base: 240ms;
  --duration-slow: 400ms;
}

/* ---- Dark mode (application) ---- */
[data-theme="dark"], .theme-dark {
  --bg-base:        var(--color-ink);
  --bg-surface:     #131D3B;
  --bg-elevated:    #1A2547;
  --fg-1:           var(--color-paper);
  --fg-2:           #A4ABBE;
  --fg-3:           #6E768B;
  --border-subtle:  rgba(255, 255, 255, 0.08);
  --border-strong:  rgba(255, 255, 255, 0.16);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.6);
}

/* ============================================================
   Semantic element styles
   ============================================================ */

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--fg-1);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  line-height: var(--lh-tight);
  margin: 0;
  color: var(--fg-1);
}

.display { font-size: var(--fs-display); line-height: var(--lh-tight); }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-snug); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-snug); font-weight: 600; }

p { margin: 0; line-height: var(--lh-normal); color: var(--fg-1); }
.lead { font-size: var(--fs-body-l); color: var(--fg-2); line-height: var(--lh-relaxed); }
.small { font-size: var(--fs-small); color: var(--fg-2); }
.caption { font-size: var(--fs-caption); color: var(--fg-2); letter-spacing: var(--tracking-wide); text-transform: uppercase; }

code, .mono {
  font-family: var(--font-mono);
  font-size: 0.92em;
}

.hand { font-family: var(--font-hand); font-weight: 600; }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease);
}
a:hover { color: var(--color-primary-hover); }

/* ---- Container ---- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---- Background motif ---- */
.bg-axo {
  background-image:
    linear-gradient(rgba(11,21,48,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,21,48,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}
[data-theme="dark"] .bg-axo,
.theme-dark .bg-axo {
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
}
