/* ==========================================================================
   CRB — Tokens (Charte graphique officielle + DOPAMINE)
   Source de vérité absolue. IDENTIQUE Maquette A et Maquette B.
   ========================================================================== */

:root {
    /* ==== Palette officielle CRB ==== */
    --crb-c-green-deep:    #0F5132;
    --crb-c-green-primary: #1B6B43;
    --crb-c-green-leaf:    #2D8F5A;
    --crb-c-orange-ci:     #F77F00;
    --crb-c-orange-warm:   #E76F0F;
    --crb-c-gold:          #C68642;
    --crb-c-blue-water:    #5BA3C7;
    --crb-c-cream:         #FAF7EE;
    --crb-c-paper:         #FFFFFF;
    --crb-c-ink:           #1A2A1F;
    --crb-c-glass-border:  rgba(15, 81, 50, 0.12);

    /* ==== Sémantiques (alertes, états) ==== */
    --crb-c-success:  #15803D;
    --crb-c-warning:  #D97706;
    --crb-c-error:    #B91C1C;
    --crb-c-info:     #1D4ED8;

    /* ==== Surfaces dérivées (transparences) ==== */
    --crb-c-green-deep-08:   rgba(15, 81, 50, 0.08);
    --crb-c-green-deep-15:   rgba(15, 81, 50, 0.15);
    --crb-c-green-deep-40:   rgba(15, 81, 50, 0.40);
    --crb-c-green-deep-70:   rgba(15, 81, 50, 0.70);
    --crb-c-green-leaf-25:   rgba(45, 143, 90, 0.25);
    --crb-c-orange-ci-15:    rgba(247, 127, 0, 0.15);
    --crb-c-orange-ci-30:    rgba(247, 127, 0, 0.30);
    --crb-c-blue-water-12:   rgba(91, 163, 199, 0.12);
    --crb-c-blue-water-25:   rgba(91, 163, 199, 0.25);
    --crb-c-gold-15:         rgba(198, 134, 66, 0.15);
    --crb-c-gold-30:         rgba(198, 134, 66, 0.30);
    --crb-c-gold-60:         rgba(198, 134, 66, 0.60);
    --crb-c-cream-on-dark:   rgba(250, 247, 238, 0.42);
    --crb-c-cream-on-dark-strong: rgba(250, 247, 238, 0.78);

    /* ==== Glass tokens (DOPAMINE MAX) ==== */
    --crb-glass-bg:        linear-gradient(135deg, rgba(250, 247, 238, 0.07), rgba(250, 247, 238, 0.03));
    --crb-glass-bg-strong: linear-gradient(135deg, rgba(250, 247, 238, 0.14), rgba(250, 247, 238, 0.06));
    --crb-glass-border:    1px solid rgba(198, 134, 66, 0.22);
    --crb-glass-border-strong: 1px solid rgba(198, 134, 66, 0.45);
    --crb-glass-shadow:
        inset 0 1px 0 rgba(250, 247, 238, 0.12),
        0 12px 40px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(15, 81, 50, 0.08);
    --crb-glass-shadow-hover:
        inset 0 1px 0 rgba(250, 247, 238, 0.22),
        0 24px 60px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(198, 134, 66, 0.35);
    --crb-glass-blur:      blur(20px) saturate(180%);
    --crb-glass-blur-soft: blur(10px) saturate(140%);

    /* ==== Animations & motion ==== */
    --crb-cursor-size:        8px;
    --crb-cursor-ring-size:   40px;
    --crb-magnetic-radius:    60px;
    --crb-tilt-max:           3deg;
    --crb-tilt-max-strong:    14deg;
    --crb-aurora-blur:        80px;
    --crb-grain-opacity:      0.045;
    --crb-halo-radius:        180px;
    --crb-halo-pulse-duration: 6s;
    --crb-aurora-duration:    32s;
    --crb-marquee-duration:   42s;

    /* ==== Typographies ==== */
    --crb-font-display: "Marcellus", "Bricolage Grotesque", "Trajan Pro", "Times New Roman", "Cambria", serif;
    --crb-font-body:    "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
    --crb-font-mono:    "JetBrains Mono", "Fira Code", ui-monospace, "SF Mono", Consolas, monospace;

    /* ==== Échelle d'espacement (rythmique 4px) ==== */
    --crb-space-1:  4px;
    --crb-space-2:  8px;
    --crb-space-3:  12px;
    --crb-space-4:  16px;
    --crb-space-5:  24px;
    --crb-space-6:  32px;
    --crb-space-7:  48px;
    --crb-space-8:  64px;
    --crb-space-9:  96px;
    --crb-space-10: 128px;

    /* ==== Rayons ==== */
    --crb-radius-sm: 6px;
    --crb-radius-md: 12px;
    --crb-radius-lg: 22px;
    --crb-radius-xl: 36px;
    --crb-radius-pill: 999px;

    /* ==== Ombres ==== */
    --crb-shadow-soft:   0 2px 8px rgba(15, 81, 50, 0.08);
    --crb-shadow-medium: 0 8px 24px rgba(15, 81, 50, 0.14);
    --crb-shadow-strong: 0 16px 48px rgba(0, 0, 0, 0.35);
    --crb-shadow-glow-green:  0 0 32px rgba(45, 143, 90, 0.45);
    --crb-shadow-glow-orange: 0 0 40px rgba(247, 127, 0, 0.50);
    --crb-shadow-glow-gold:   0 0 36px rgba(198, 134, 66, 0.55);

    /* ==== Easing functions UX.md ==== */
    --crb-ease-out-expo:    cubic-bezier(0.16, 1, 0.3, 1);
    --crb-ease-in-out-circ: cubic-bezier(0.85, 0, 0.15, 1);
    --crb-ease-spring:      cubic-bezier(0.34, 1.56, 0.64, 1);
    --crb-ease-smooth:      cubic-bezier(0.4, 0, 0.2, 1);

    /* ==== Transitions ==== */
    --crb-transition-fast: 0.18s ease-out;
    --crb-transition-base: 0.25s var(--crb-ease-smooth);
    --crb-transition-slow: 0.5s var(--crb-ease-out-expo);

    /* ==== Z-index (ordre canonique) ==== */
    --crb-z-bg:      0;
    --crb-z-base:    1;
    --crb-z-overlay: 50;
    --crb-z-drawer:  90;
    --crb-z-modal:   100;
    --crb-z-toast:   200;
    --crb-z-cursor:  9999;

    /* ==== Layout ==== */
    --crb-container-max: 1280px;
    --crb-content-max:   920px;
    --crb-header-h:      80px;
    --crb-header-h-mobile: 64px;
}
