/* ============================================================
   TOKENS.CSS — Variables, reset, base typographie, layout
   vitrier-urgence.surdijon.fr
   Palette: Crystal Vitrier — Nuit d'abîme + Cyan glacier + Ambre
   ============================================================ */

/* ─── LAYER ORDER ────────────────────────────────────────── */
@layer reset, tokens, base, layout, components, animations, darkmode;

/* ─── RESET ─────────────────────────────────────────────── */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "liga" 1, "kern" 1;
  }
  img, svg { display: block; max-width: 100%; }
  input, button, select, textarea { font: inherit; }
  ul, ol { list-style: none; }
  a { text-decoration: none; color: inherit; }
  button { cursor: pointer; border: none; background: none; }
  picture { display: block; }
}

/* ─── TOKENS ─────────────────────────────────────────────── */
@layer tokens {
  :root {
    /* ══════════════════════════════════════════════
       PALETTE — Teal & Gold Vitrier Premium
       Concept : Teal profond (verre teinté) + Or/Amber (reflets)
       Anti-clone : Unique au vitrier, pas de violet
       ══════════════════════════════════════════════ */

    /* Primaire — Teal profond (verre teinté, vitrage) */
    --primary:       #0d7377;    /* Teal profond */
    --primary-dark:  #095c5f;    /* Teal foncé */
    --primary-light: #14a3a8;    /* Teal lumineux */

    /* Accent — Or/Amber (reflets sur verre, soudure) */
    --accent:        #ffb347;    /* Or/Amber chaud */
    --accent-dark:   #e69a2f;    /* Or foncé */
    --accent-light:  #fff4e6;    /* Blanc doré */
    --accent-glow:   rgba(255, 179, 71, 0.25); /* Halo doré */

    /* Warm — Orange cuivré (complément chaud) */
    --warm:          #ff8c42;    /* Orange cuivré */
    --warm-dark:     #e67a35;    /* Cuivre foncé */
    --warm-light:    #ffe8d6;    /* Orange très clair */

    /* Effets verre (glassmorphism) */
    --glass:         rgba(255, 255, 255, 0.06);
    --glass-border:  rgba(255, 255, 255, 0.12);
    --glass-shine:   rgba(255, 255, 255, 0.45);

    /* Fonds & surfaces light mode */
    --bg:            #FAFCFE;    /* Blanc glacier — légèrement bleuté */
    --text:          #0D1B2A;    /* Encre profonde */
    --text-muted:    #4A5E73;    /* Ardoise moyenne */
    --surface:       #EEF4FB;    /* Bleu givré très clair */
    --surface2:      #DDE8F4;    /* Bleu clair secondaire */
    --border:        #CBD8E8;    /* Gris-bleu subtil */
    --border-soft:   #E4EDF7;    /* Bordure très douce */

    /* Sémantiques */
    --success:       #059669;
    --danger:        #DC2626;
    --info:          #0284C7;

    /* Typographie — Zodiak + Satoshi (inchangé) */
    --font-display: 'Zodiak', Georgia, serif;
    --font-body:    'Satoshi', 'Helvetica Neue', Arial, sans-serif;

    /* Rayons — hiérarchie précise */
    --r-xs:   .25rem;
    --r-sm:   .375rem;
    --r:      .5rem;
    --r-md:   .75rem;
    --r-lg:   1rem;
    --r-xl:   1.5rem;
    --r-2xl:  2rem;
    --r-full: 9999px;

    /* Ombres — Teal & Gold premium */
    --shadow-sm: 0 1px 2px rgba(13,115,119,.06), 0 1px 4px rgba(255,179,71,.04);
    --shadow:    0 4px 16px rgba(13,115,119,.09), 0 1px 6px rgba(255,179,71,.07);
    --shadow-lg: 0 8px 32px rgba(13,115,119,.13), 0 2px 10px rgba(255,179,71,.10);
    --shadow-xl: 0 20px 60px rgba(13,115,119,.18), 0 6px 20px rgba(255,179,71,.14);
    --shadow-glow: 0 0 24px rgba(255,179,71,.3), 0 0 60px rgba(255,179,71,.12);
    --shadow-warm: 0 8px 32px rgba(255,140,66,.2);

    /* Transitions fluides */
    --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --trans:       .25s var(--ease-out);
    --trans-slow:  .45s var(--ease-out);
    --section-py:  clamp(3.5rem, 6vw, 6rem);

    /* Espacements optiques */
    --gap-card:  1.5rem;
    --gap-prose: 1.125rem;
  }
}

/* ─── BASE ───────────────────────────────────────────────── */
@layer base {
  body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
  }

  /* Titres — hiérarchie Zodiak avec tracking fin */
  h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5.5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.03em;
    color: var(--primary);
  }
  h2 {
    font-family: var(--font-display);
    font-size: clamp(1.55rem, 3.8vw, 2.4rem);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -.025em;
    color: var(--primary);
  }
  h3 {
    font-family: var(--font-display);
    font-size: clamp(1.075rem, 2.2vw, 1.3rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.015em;
    color: var(--primary);
  }
  h4, h5 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.35;
    color: var(--primary);
  }

  p      { color: var(--text-muted); line-height: 1.78; }
  strong { color: var(--text); font-weight: 700; }
  em     { color: inherit; font-style: italic; }
  u      {
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
  }

  :focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: var(--r-sm);
  }
  ::selection {
    background: var(--accent);
    color: #fff;
  }

  /* Scrollbar premium */
  ::-webkit-scrollbar        { width: 8px; }
  ::-webkit-scrollbar-track  { background: var(--surface); }
  ::-webkit-scrollbar-thumb  {
    background: var(--accent-dark);
    border-radius: 4px;
    border: 2px solid var(--surface);
  }
  ::-webkit-scrollbar-thumb:hover { background: var(--accent); }
}

/* ─── LAYOUT ─────────────────────────────────────────────── */
@layer layout {
  .container {
    width: 100%;
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 2rem);
  }
  .container--narrow  { max-width: 820px; }
  .container--wide    { max-width: 1400px; }

  .grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--gap-card); }
  .grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--gap-card); }
  @media (min-width: 992px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

  .section {
    padding-block: var(--section-py);
    position: relative;
  }
  .section--surface  { background: var(--surface); }
  .section--surface2 { background: var(--surface2); }
  .section--dark     {
    background:
      linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 60%, #0d2840 100%);
  }
  .section--cv       { content-visibility: auto; contain-intrinsic-size: 0 500px; }

  /* Diviseur de section optique */
  .section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
    margin: 0;
    border: none;
  }
}

/* ─── UTILITIES ──────────────────────────────────────────── */
.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-muted   { color: var(--text-muted); }
.mt-1         { margin-top: .375rem; }
.mt-2         { margin-top: .75rem; }
.mt-3         { margin-top: 1.5rem; }
.mt-4         { margin-top: 2rem; }
.mb-1         { margin-bottom: .5rem; }
.mb-p         { margin-bottom: 1.25rem; }
.fs-lead      { font-size: 1.0625rem; }
.fs-sm        { font-size: .875rem; }
.fs-xs        { font-size: .8125rem; }
.color-accent { color: var(--accent); }
.color-warm   { color: var(--warm); }
.color-white  { color: #fff; }
.color-muted  { color: var(--text-muted); }
.color-primary{ color: var(--primary); }
.color-success{ color: var(--success); }
.svg-inline   { display: inline; vertical-align: -.2em; }
.fw-700       { font-weight: 700; }
.fw-800       { font-weight: 800; }
.lh-tight     { line-height: 1.3; }
