/* ============================================================
   Triptik — Design tokens
   Couche unique partagée par le site, la landing /offre et le dashboard.
   Règle : aucune valeur littérale hors de ce fichier.
   ============================================================ */

/* ── Polices auto-hébergées ─────────────────────────────── */

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/dm-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/dm-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/dm-sans-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/dm-sans-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/instrument-serif-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/instrument-serif-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/instrument-serif-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/instrument-serif-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* DM Mono — dashboard uniquement (chiffres tabulaires) */
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/dm-mono-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/dm-mono-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/dm-mono-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/dm-mono-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


:root {
  /* ══ 1. Primitives ══════════════════════════════════════
     Les seules valeurs littérales du projet.
     Changer --tk-brand repeint tout l'accent, ses teintes,
     sa variante sur fond sombre et les chips du dashboard. */
  --tk-cream:     #F4F2EE;
  --tk-cream-2:   #EFEDE8;
  --tk-cream-3:   #E4DFD5;
  --tk-white:     #FFFFFF;
  --tk-black:     #0D0D0D;   /* noir unique — remplace #0B0B0B */
  --tk-black-2:   #2A241C;   /* survol des CTA sombres */
  --tk-brand:     #7F663A;   /* or/bronze — ex #7A6547, teinte conservée */
  --tk-brand-dim: #C9B389;   /* accent sur fond sombre — ex #C4B49B */
  --tk-on-dark:   #8B857C;   /* texte secondaire sur fond sombre */
  --tk-on-dark-2: #B4AEA4;   /* liens secondaires sur fond sombre */
  --tk-on-dark-3: #7F7970;   /* mentions sur fond sombre — 4.51:1 sur #0D0D0D,
                                relevé de 3 crans pour passer le seuil AA */

  /* ══ 2. Sémantique — surface claire (défaut) ═══════════ */
  --bg:          var(--tk-cream);
  --surface:     var(--tk-white);
  --surface-2:   var(--tk-cream-2);
  --surface-3:   var(--tk-cream-3);

  --ink:         var(--tk-black);
  --ink-2:       #3A3630;
  --muted:       #57534D;    /* texte secondaire — absorbe #655F58 */
  --faint:       #706B63;    /* méta, notes — 4.52:1 sur la surface claire.
                                #8C877F ne donnait que 3.05, sous le seuil AA
                                de 4.5 exigé pour du texte de moins de 18 px. */
  --placeholder: #9A948B;
  --link-muted:  var(--muted);

  --accent:      var(--tk-brand);
  --accent-soft: color-mix(in srgb, var(--accent) 14%, var(--bg));
  --accent-line: color-mix(in srgb, var(--accent) 40%, transparent);

  --line:        rgba(13, 13, 13, .10);   /* séparateurs de section */
  --line-2:      rgba(13, 13, 13, .14);   /* listes, cartes, champs */
  --line-strong: rgba(13, 13, 13, .22);   /* boutons ghost, focus */

  --cta-bg:       var(--ink);
  --cta-fg:       var(--bg);
  --cta-bg-hover: var(--tk-black-2);
  --cta-shadow:   rgba(13, 13, 13, .22);
  --ghost-bg-hover: var(--surface-2);
  --row-hover:    #EAE7E0;   /* survol des lignes et liens texte */

  /* ══ 3. Typographie ═══════════════════════════════════ */
  --font-sans:  'DM Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono:  'DM Mono', ui-monospace, SFMono-Regular, monospace;

  --step--2:   12px;                          /* eyebrow, mentions */
  --step--1:   13px;                          /* labels espacés */
  --step-0:    15px;                          /* petit corps */
  --step-1:    16px;                          /* corps */
  --step-2:    17px;                          /* chapô */
  --step-3:    clamp(20px, 1.6vw, 22px);      /* titre de carte */
  --step-4:    clamp(24px, 2.8vw, 40px);      /* h3 */
  --step-5:    clamp(28px, 3.8vw, 58px);      /* h2 secondaire */
  --step-6:    clamp(30px, 4.4vw, 72px);      /* h2 */
  --step-7:    clamp(38px, 6.4vw, 110px);     /* h1 accueil */
  --step-7-sm: clamp(34px, 5vw, 76px);        /* h1 pages intérieures */

  --lh-tight: 1.04;
  --lh-snug:  1.2;
  --lh-body:  1.6;
  --tracking-wide: 0.26em;   /* eyebrows — absorbe .18/.20/.22/.24/.28/.30 */
  --tracking-logo: 0.24em;

  /* ══ 4. Espacement ════════════════════════════════════ */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  24px;
  --s-6:  32px;
  --s-7:  48px;
  --s-8:  64px;

  --gutter:         28px;
  --measure:        1280px;
  --pad-section:    clamp(56px, 8vw, 120px);
  --pad-section-lg: clamp(64px, 9vw, 132px);
  --pad-section-sm: clamp(40px, 6vw, 88px);
  --gap-col:        clamp(28px, 5vw, 72px);
  --gap-col-sm:     clamp(18px, 2.4vw, 28px);
  --pad-card:       clamp(24px, 3vw, 40px);

  /* ══ 5. États sémantiques ═════════════════════════════
     Utilisés par le dashboard (statuts de leads, températures).
     Désaturés pour rester dans la palette éditoriale. */
  --ok:          #3F6B52;  --ok-soft:     #E4EDE6;
  --warn:        #A5761F;  --warn-soft:   #F5EEDF;
  --danger:      #9E3B2E;  --danger-soft: #F3E4E1;
  --offer:       #6E5A8F;  --offer-soft:  #EBE6F1;
  --hot:         #B4562A;  --hot-soft:    #F5E7DE;
  --warm:        #A5761F;  --warm-soft:   #F5EEDF;
  --cool:        #5E7383;  --cool-soft:   #E9EDEF;
  --cold:        #6B7280;  --cold-soft:   #ECEDEF;

  /* ══ 6. Formes & mouvement ════════════════════════════ */
  --radius:      2px;
  --radius-pill: 999px;
  --shadow:      0 18px 40px -28px rgba(13, 13, 13, .35);

  /* Alias hérités du dashboard */
  --r-lg: var(--radius);
  --r-md: var(--radius);
  --r-sm: var(--radius);
  --sh:    var(--shadow);
  --sh-sm: none;

  --ease:      cubic-bezier(.22, .61, .36, 1);
  --dur-fast:  180ms;
  --dur:       300ms;
  --dur-slow:  850ms;
}

/* ══ Surface sombre ═══════════════════════════════════════
   Inverse les tokens au lieu de réécrire les couleurs.
   Le même composant fonctionne sur les deux fonds. */
[data-surface="dark"] {
  --bg:          var(--tk-black);
  --surface:     #141310;
  --surface-2:   #141310;
  --surface-3:   #1C1A16;

  --ink:         var(--tk-cream);
  --ink-2:       #D8D3CA;
  --muted:       var(--tk-on-dark);    /* absorbe #8C857B */
  --faint:       var(--tk-on-dark-3);
  --placeholder: var(--tk-on-dark-3);
  --link-muted:  var(--tk-on-dark-2);

  --accent:      var(--tk-brand-dim);
  --accent-soft: color-mix(in srgb, var(--accent) 18%, var(--bg));
  --accent-line: color-mix(in srgb, var(--accent) 45%, transparent);

  --line:        rgba(244, 242, 238, .16);
  --line-2:      rgba(244, 242, 238, .20);
  --line-strong: rgba(244, 242, 238, .32);

  --cta-bg:       var(--tk-cream);
  --cta-fg:       var(--tk-black);
  --cta-bg-hover: var(--tk-cream-3);
  --cta-shadow:   rgba(0, 0, 0, .35);
  --ghost-bg-hover: rgba(244, 242, 238, .10);
  --row-hover:    rgba(244, 242, 238, .07);
}
