/*
Theme Name: GrafiVault
Theme URI: https://www.grafivault.com
Author: GrafiVault
Author URI: https://www.grafivault.com
Description: Thème premium sur-mesure pour GrafiVault — blog SEO, marketing d'affiliation et boutique de produits digitaux (compatible Easy Digital Downloads).
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: grafivault
*/

/* ==========================================================================
   Typeface — self-hosted, no third-party request (privacy + speed)
   ========================================================================== */
@font-face {
  font-family: 'InterVar';
  src: url('assets/fonts/inter-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  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;
}

/* ==========================================================================
   Design tokens
   --------------------------------------------------------------------------
   Spacing is a strict 4px scale. Type is a modular scale. Two shadow levels
   only. These constraints are what read as "designed" rather than assembled.
   ========================================================================== */
:root {
  /* Neutrals — slight blue cast, as in Linear/Stripe. Never pure #000. */
  --gv-ink:        #09090B;
  --gv-ink-2:      #27272A;
  --gv-body:       #52525B;
  --gv-muted:      #71717A;
  --gv-line:       #E4E4E7;
  --gv-line-soft:  #F1F1F3;
  --gv-bg:         #FFFFFF;
  --gv-bg-soft:    #FAFAFA;

  /* Brand — used sparingly, as an accent, not a wash */
  --gv-blue:       #2563EB;
  --gv-blue-dark:  #1D4ED8;
  --gv-blue-tint:  #EFF4FF;

  /* Spacing: 4px scale */
  --sp-1:  4px;   --sp-2:  8px;   --sp-3:  12px;  --sp-4:  16px;
  --sp-5:  20px;  --sp-6:  24px;  --sp-8:  32px;  --sp-10: 40px;
  --sp-12: 48px;  --sp-16: 64px;  --sp-20: 80px;  --sp-24: 96px;

  /* Type scale */
  --fs-xs:   12px;
  --fs-sm:   13px;
  --fs-base: 15px;
  --fs-md:   16px;
  --fs-lg:   18px;
  --fs-xl:   20px;
  --fs-2xl:  24px;
  --fs-3xl:  30px;
  --fs-4xl:  clamp(32px, 4.2vw, 46px);

  /* Radii — three steps, no arbitrary values */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;

  /* Elevation — two levels. More than that reads as decoration. */
  --sh-1: 0 1px 2px rgba(9, 9, 11, .04), 0 1px 1px rgba(9, 9, 11, .03);
  --sh-2: 0 4px 16px rgba(9, 9, 11, .07), 0 1px 3px rgba(9, 9, 11, .04);

  --gv-container: 1200px;
  --gv-font: 'InterVar', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Backwards-compatible aliases (older rules still reference these) */
  --gv-black: var(--gv-ink);
  --gv-border: var(--gv-line);
  --gv-radius-sm: var(--r-sm);
  --gv-radius: var(--r-md);
  --gv-radius-lg: var(--r-lg);
  --gv-shadow: var(--sh-1);
  --gv-shadow-lg: var(--sh-2);
}

:root[data-theme="dark"] {
  --gv-ink:       #FAFAFA;
  --gv-ink-2:     #E4E4E7;
  --gv-body:      #A1A1AA;
  --gv-muted:     #8B8B93;
  --gv-line:      #27272A;
  --gv-line-soft: #1C1C1F;
  --gv-bg:        #09090B;
  --gv-bg-soft:   #131316;
  --gv-blue-tint: #101B33;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .5);
  --sh-2: 0 4px 20px rgba(0, 0, 0, .55);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --gv-ink:       #FAFAFA;
    --gv-ink-2:     #E4E4E7;
    --gv-body:      #A1A1AA;
    --gv-muted:     #8B8B93;
    --gv-line:      #27272A;
    --gv-line-soft: #1C1C1F;
    --gv-bg:        #09090B;
    --gv-bg-soft:   #131316;
    --gv-blue-tint: #101B33;
  }
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--gv-font);
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--gv-ink);
  background: var(--gv-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* Tight negative tracking on display sizes — the single clearest premium cue */
h1, h2, h3, h4 {
  margin: 0 0 var(--sp-3);
  font-weight: 650;
  line-height: 1.18;
  letter-spacing: -0.021em;
  color: var(--gv-ink);
  text-wrap: balance;
}
h1 { font-size: var(--fs-4xl); letter-spacing: -0.032em; line-height: 1.08; }
h2 { font-size: var(--fs-3xl); letter-spacing: -0.026em; }
h3 { font-size: var(--fs-xl); }

p { margin: 0 0 var(--sp-4); color: var(--gv-body); }

::selection { background: var(--gv-blue); color: #fff; }

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--gv-blue);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.gv-container {
  max-width: var(--gv-container);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}
@media (max-width: 640px) { .gv-container { padding-inline: var(--sp-5); } }

/* ==========================================================================
   Buttons
   ========================================================================== */
.gv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  height: 40px;
  padding-inline: var(--sp-4);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 550;
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, opacity .16s ease;
}
.gv-btn-primary { background: var(--gv-ink); color: var(--gv-bg); }
.gv-btn-primary:hover { background: var(--gv-ink-2); }

.gv-btn-outline {
  background: var(--gv-bg);
  border-color: var(--gv-line);
  color: var(--gv-ink);
  box-shadow: var(--sh-1);
}
.gv-btn-outline:hover { background: var(--gv-bg-soft); border-color: var(--gv-muted); }

.gv-btn-accent { background: var(--gv-blue); color: #fff; }
.gv-btn-accent:hover { background: var(--gv-blue-dark); }

.gv-btn-lg { height: 46px; padding-inline: var(--sp-6); font-size: var(--fs-base); }

/* ==========================================================================
   Badge
   ========================================================================== */
.gv-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding-inline: var(--sp-2);
  border-radius: 999px;
  background: var(--gv-bg-soft);
  border: 1px solid var(--gv-line);
  color: var(--gv-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.gv-badge-blue {
  background: var(--gv-blue-tint);
  border-color: transparent;
  color: var(--gv-blue-dark);
}
:root[data-theme="dark"] .gv-badge-blue { color: #93B4FF; }

/* ==========================================================================
   Card
   ========================================================================== */
.gv-card {
  position: relative;
  background: var(--gv-bg);
  border: 1px solid var(--gv-line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.gv-card:hover { border-color: var(--gv-muted); box-shadow: var(--sh-2); }

:root[data-theme="dark"] .gv-card { background: var(--gv-bg-soft); }

/* ==========================================================================
   Accessibility helpers
   ========================================================================== */
.gv-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--gv-ink);
  color: var(--gv-bg);
  padding: var(--sp-3) var(--sp-5);
  border-radius: 0 0 var(--r-sm) 0;
  font-size: var(--fs-sm);
}
.gv-skip-link:focus { left: 0; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
