/* ===================================================
   tokens.css — Design System Maxime Decarrière
   Projet : Nestorys — Conseil & Management
   Toujours importé en premier.
   =================================================== */

:root {
  /* Typographie */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;

  /* Scale */
  --text-xs:      clamp(0.7rem, 1vw, 0.75rem);
  --text-sm:      clamp(0.85rem, 1.2vw, 0.9rem);
  --text-base:    clamp(1rem, 1.5vw, 1.05rem);
  --text-lg:      clamp(1.15rem, 2vw, 1.25rem);
  --text-xl:      clamp(1.4rem, 2.5vw, 1.6rem);
  --text-2xl:     clamp(1.8rem, 3vw, 2.2rem);
  --text-3xl:     clamp(2.4rem, 4vw, 3rem);
  --text-4xl:     clamp(3.5rem, 6vw, 5rem);
  --text-display: clamp(4.2rem, 11vw, 10rem);

  /* Poids */
  --weight-light:   300;
  --weight-regular: 400;
  --weight-medium:  500;
  --weight-bold:    700;
  --weight-black:   900;

  /* Line-height */
  --leading-tight:   1.05;
  --leading-snug:    1.3;
  --leading-normal:  1.6;
  --leading-relaxed: 1.75;

  /* Letter-spacing */
  --tracking-tight:   -0.03em;
  --tracking-normal:  0;
  --tracking-wide:    0.08em;
  --tracking-widest:  0.2em;
  --tracking-mega:    0.42em;

  /* Espacement */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;
  --space-48: 12rem;

  /* Border radius */
  --radius-sm:   2px;
  --radius-md:   4px;
  --radius-lg:   8px;
  --radius-xl:   16px;
  --radius-full: 9999px;
  --radius-none: 0;

  /* Motion */
  --ease-out:     cubic-bezier(0.0, 0, 0.2, 1);
  --ease-in-out:  cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring:  cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-power:   cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast:  150ms;
  --duration-base:  250ms;
  --duration-slow:  400ms;
  --duration-enter: 600ms;

  /* Layout */
  --max-width:       1640px;
  --max-width-prose: 760px;
  --max-width-tight: 1100px;
  --gutter:          clamp(1.5rem, 4vw, 4rem);
  --nav-h:           72px;

  /* Signature manuscrite du fondateur (or, indépendant du thème) */
  --signature-gold:      #C49A3E;
  --signature-gold-hi:   #E7C877;
}

/* ===================================================
   THÈME — Dark (sélectionné pour Nestorys)
   L'accent du système est "gold" ; pour Nestorys nous
   réaffectons l'accent à la couleur de marque (bleu du
   logo) via --color-gold* afin que tout composant gold
   du système hérite automatiquement de l'identité.
   Le bleu nuit profond évoque la sagesse de Nestor ;
   le bleu électrique = la marque (la barre du logo).
   =================================================== */
html[data-theme="dark"] {
  /* Surfaces — encrier profond, légèrement bleuté */
  --color-bg:             #07090F;
  --color-bg-subtle:      #0A0D16;
  --color-surface:        #0F131F;
  --color-surface-raised: #161B29;

  /* Texte */
  --color-text-primary:   #F1EEE8;
  --color-text-secondary: #A9AEBE;
  --color-text-tertiary:  #5E6478;
  --color-text-disabled:  #343A4A;

  /* Bordures */
  --color-border:         #1B2030;
  --color-border-subtle:  #12161F;
  --color-border-strong:  #2B3247;

  /* Accent de marque (= "gold" du système, réaffecté en bleu) */
  --color-gold:           #2F56F0;   /* bleu de marque (la barre du logo) */
  --color-gold-light:     #5B79FF;
  --color-gold-bright:    #8FA6FF;
  --color-gold-muted:     #2F56F022;
  --color-gold-shimmer:   linear-gradient(90deg, #2F56F0, #8FA6FF, #5B79FF, #2F56F0);

  /* Alias sémantiques de marque (lisibilité) */
  --brand:                var(--color-gold);
  --brand-light:          var(--color-gold-light);
  --brand-bright:         var(--color-gold-bright);
  --brand-glow:           rgba(47, 86, 240, 0.45);
  --brand-glow-soft:      rgba(47, 86, 240, 0.16);

  /* Couleur secondaire — violet électrique, réservée aux CTA */
  --brand-2:              #7A5BFF;
  --brand-2-rgb:          122, 91, 255;
  --cta-gradient:         linear-gradient(115deg, var(--brand) 0%, #4A52F5 45%, var(--brand-2) 100%);
  --cta-glow:             rgba(122, 91, 255, 0.45);
  --signature-gold:       #D8B25A;
  --signature-gold-hi:    #F0D588;

  /* États */
  --color-focus:   #2F56F055;
  --color-error:   #E74C3C;
  --color-success: #52B788;

  /* Ombres (dépendantes du thème) */
  --shadow-sm:    0 1px 2px rgba(0,0,0,0.4);
  --shadow-md:    0 10px 40px rgba(0,0,0,0.45);
  --shadow-lg:    0 30px 80px rgba(0,0,0,0.55);
  --shadow-gold:  0 0 40px var(--brand-glow-soft);
  --shadow-inset: inset 0 1px 0 rgba(255,255,255,0.05);
}

/* Thème Classic conservé pour réversibilité éventuelle */
:root,
[data-theme="classic"] {
  --color-bg:             #FFFFFF;
  --color-bg-subtle:      #F8F7F5;
  --color-surface:        #FAFAF9;
  --color-surface-raised: #F2F0ED;
  --color-text-primary:   #0A0A0A;
  --color-text-secondary: #3D3D3D;
  --color-text-tertiary:  #7A7A7A;
  --color-text-disabled:  #BEBEBE;
  --color-border:         #E8E5E0;
  --color-border-subtle:  #F0EDE8;
  --color-border-strong:  #C8C3BB;
  --color-gold:           #2F56F0;
  --color-gold-light:     #5B79FF;
  --color-gold-bright:    #2948E0;
  --color-gold-muted:     #2F56F018;
  --color-gold-shimmer:   linear-gradient(90deg, #2948E0, #5B79FF, #2F56F0, #2948E0);
  --brand:                var(--color-gold);
  --brand-light:          var(--color-gold-light);
  --brand-bright:         var(--color-gold-bright);
  --brand-glow:           rgba(47, 86, 240, 0.3);
  --brand-glow-soft:      rgba(47, 86, 240, 0.12);
  --brand-2:              #6A45F0;
  --brand-2-rgb:          106, 69, 240;
  --cta-gradient:         linear-gradient(115deg, var(--brand) 0%, #4138E6 48%, var(--brand-2) 100%);
  --cta-glow:             rgba(106, 69, 240, 0.32);
  --shadow-sm:    0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg:    0 8px 32px rgba(0,0,0,0.10);
  --shadow-gold:  0 0 20px var(--color-gold-muted);
  --shadow-inset: inset 0 1px 0 rgba(255,255,255,0.5);
}
