/**
 * SkyAtlas — Design tokens (single source of truth)
 * Chargé par : public/globe/index.html ET templates/_layout.twig
 *
 * Convention : noms canoniques en --c-* / --fs-* / --sp-* / --r-* / --blur-*
 * Les anciens noms (--bg, --gold, --text…) sont conservés comme alias
 * pour la rétro-compatibilité des templates SEO.
 */

/* ── Polices auto-hébergées ─────────────────────────────────
 * Servies depuis iciel.fr, jamais depuis fonts.gstatic.com : aucune adresse
 * IP de visiteur n'est transmise à un tiers, et le rendu ne dépend plus d'un
 * domaine externe. Inter et Schibsted Grotesk sont des fontes variables
 * (400→700 dans un seul fichier). Fichiers sous OFL 1.1, cf. fonts/LICENSE.
 * Le découpage latin / latin-ext est celui de Google Fonts : un visiteur
 * francophone ne télécharge que le sous-ensemble latin.
 */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/inter-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: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/inter-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: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/schibsted-grotesk-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: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/schibsted-grotesk-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('/assets/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('/assets/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('/assets/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('/assets/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;
}

:root {
  /* ── Colors ─────────────────────────────────────────────── */
  --c-bg:           #000008;
  --c-surface:      rgba(4, 8, 24, 0.85);
  --c-surface-high: rgba(6, 12, 32, 0.80);
  --c-border:       rgba(255, 255, 255, 0.08);
  --c-border-glow:  rgba(255, 165, 30, 0.22);

  /* Text — --c-text-muted lifted to clear WCAG AA 4.5:1 (was .68 ≈ 3.7:1 sur
     les cartes/fonds atmosphériques) tout en restant sous --c-text-secondary. */
  --c-text-primary:   rgba(228, 240, 255, 0.96);
  --c-text-secondary: rgba(180, 210, 240, 0.82);
  --c-text-muted:     rgba(150, 182, 216, 0.88);

  /* Accent — golden hour */
  --c-golden:       #ffb020;
  --c-golden-dim:   rgba(255, 165, 30, 0.14);
  --c-golden-glow:  rgba(255, 165, 30, 0.30);
  --c-golden-solid: rgba(255, 176, 32, 1);

  /* Accent — sunrise / blue hour */
  --c-blue:         #6090e0;
  --c-blue-dim:     rgba(80, 120, 220, 0.14);

  /* Accent — terminator / orange */
  --c-term:         #ff7a30;

  /* ── Sunset spectrum (Atlas Tonight + Landing feed cards) ── */
  --c-amber:        #ff8a3c;
  --c-coral:        #ff5d3a;
  --c-rose:         #ff3d7f;
  --c-magenta:      #c83cff;

  /* ── Editorial / Magazine palette (City Reader) ─────────── */
  --c-cr-bg:        #050308;
  --c-cr-bg-2:      #0a070f;
  --c-cr-ink:       #f4e9d2;
  --c-cr-ink-2:     rgba(244, 233, 210, 0.62);
  --c-cr-mute:      rgba(244, 233, 210, 0.38);
  --c-cr-gold:      #d8a253;
  --c-cr-gold-hi:   #f0c485;
  --c-cr-rule:      rgba(216, 162, 83, 0.32);
  --c-cr-rule-soft: rgba(244, 233, 210, 0.10);

  /* Per-vertical accent colors */
  --c-cr-acc-golden:   #d8a253;
  --c-cr-acc-sunrise:  #f0a890;
  --c-cr-acc-moon:     #c8d4f0;
  --c-cr-acc-twilight: #8ab4f8;

  /* ── Font families ──────────────────────────────────────── */
  --font-sans:    'Inter', system-ui, sans-serif;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-mono:    'Schibsted Grotesk', 'Inter', system-ui, sans-serif;

  /* ── Type scale ─────────────────────────────────────────── */
  --fs-xs:    11px;
  --fs-sm:    12px;
  --fs-base:  13px;
  --fs-md:    14px;
  --fs-lg:    16px;
  --fs-xl:    20px;
  --fs-hero:  28px;

  /* Font weights */
  --fw-normal:    400;
  --fw-medium:    500;
  --fw-semibold:  600;
  --fw-bold:      700;
  --fw-extrabold: 800;

  /* ── Spacing (4px grid) ─────────────────────────────────── */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;

  /* ── Radius ─────────────────────────────────────────────── */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;

  /* ── Glass system (3-level depth) ───────────────────────── */
  --blur-bg:         blur(20px);
  --blur-card:       blur(14px);
  --blur-input:      blur(10px);
  --glass-blur:      blur(16px);
  --glass-shadow:    0 8px 40px rgba(0,0,0,0.65), inset 0 1px 0 rgba(255,255,255,0.06);
  --glass-shadow-sm: 0 4px 20px rgba(0,0,0,0.50), inset 0 1px 0 rgba(255,255,255,0.04);

  /* ── Elevation (rim-light dark-UI + ombre teintée nuit) ──── */
  --elev-card:       inset 0 1px 0 rgba(255,255,255,0.07), 0 1px 2px rgba(4,6,22,0.55), 0 12px 30px rgba(10,13,42,0.45);
  --elev-card-hover: inset 0 1px 0 rgba(255,255,255,0.10), 0 2px 4px rgba(4,6,22,0.55), 0 18px 40px rgba(10,13,42,0.52);
  --elev-glass:      inset 0 1px 0 rgba(255,255,255,0.06), 0 8px 30px rgba(6,9,30,0.50);

  /* ── Legacy aliases (back-compat avec les templates SEO) ── */
  --bg:       var(--c-bg);
  --surface:  var(--c-surface);
  --border:   var(--c-border);
  --gold:     var(--c-golden);
  --gold-dim: var(--c-golden-dim);
  --text:     var(--c-text-primary);
  --text2:    var(--c-text-secondary);
  --muted:    var(--c-text-muted);
  --r:        var(--r-md);
  --fs:       var(--fs-md);
}

/* ── Accessibility — respect reduced motion preferences ───── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
