/*
 * tokens.css — Design system — seule source de vérité pour les variables CSS.
 * Rempli en D.2.
 */

/* ── Palette ─────────────────────────────────────────────────────── */

:root,
[data-theme="light"] {
	/* Rouge Brightway */
	--bw-red:          #E02B20;
	--bw-red-hover:    #B3231A;
	--bw-red-light:    #FEEAE8;

	/* Gradient signature Brightway (bascule auto light/dark via --bw-red + --bw-anthracite) */
	--gradient-bw:     linear-gradient(135deg, var(--bw-red) 0%, var(--bw-anthracite) 100%);

	/* Gris (texte & UI) */
	--bw-anthracite:   #1A1D21;
	--bw-gray-dark:    #54595F;
	--bw-gray-text:    #4A4F55;
	--bw-gray-muted:   #8A8F95;
	--bw-gray-border:  #E4E6E9;
	--bw-gray-bg:      #F7F8FA;
	--bw-white:        #FFFFFF;

	/* Accent technique */
	--bw-blue:         #0B5ED7;
	--bw-green:        #1E7E34;
	--bw-orange:       #C77700;

	/* Tokens sémantiques */
	--bg:              var(--bw-white);
	--fg:              var(--bw-anthracite);
	--fg-muted:        var(--bw-gray-text);
	--accent:          var(--bw-red);
	--accent-hover:    var(--bw-red-hover);
	--border:          var(--bw-gray-border);
	--surface:         var(--bw-gray-bg);
	--bg-alt:          var(--surface);
	--link:            var(--bw-red);
}

[data-theme="dark"] {
	--bw-red:          #FF5247;
	--bw-red-hover:    #E03C33;
	--bw-red-light:    #3D1715;

	--bw-anthracite:   #E8EAED;
	--bw-gray-dark:    #C1C6CC;
	--bw-gray-text:    #C1C6CC;
	--bw-gray-muted:   #8A8F95;
	--bw-gray-border:  #232830;
	--bw-gray-bg:      #161A1F;
	--bw-white:        #0E1014;

	--bw-blue:         #4C9AFF;
	--bw-green:        #4CAF72;
	--bw-orange:       #E8A020;

	--bg:              #0E1014;
	--fg:              #E8EAED;
	--fg-muted:        #C1C6CC;
	--accent:          #FF5247;
	--accent-hover:    #E03C33;
	--border:          #232830;
	--surface:         #161A1F;
	--bg-alt:          var(--surface);
	--link:            var(--bw-red);
}

/* ── Typography ──────────────────────────────────────────────────── */

:root {
	--font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--font-sans:    var(--font-body); /* alias sémantique */
	--font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
	--font-mono:    'JetBrains Mono', 'Cascadia Code', 'Fira Code', 'Courier New', monospace;

	--text-xs:    0.75rem;     /* 12px */
	--text-sm:    0.875rem;    /* 14px */
	--text-base:  1rem;        /* 16px */
	--text-md:    1.125rem;    /* 18px */
	--text-lg:    1.25rem;     /* 20px */
	--text-xl:    1.5rem;      /* 24px */
	--text-2xl:   1.875rem;    /* 30px */
	--text-3xl:   2.25rem;     /* 36px */
	--text-4xl:   3rem;        /* 48px */
	--text-5xl:   3.75rem;     /* 60px */
	--text-6xl:   4.5rem;      /* 72px — refonte hero */
	--text-7xl:   5.5rem;      /* 88px — stats impactantes */

	--lh-tight:   1.25;
	--lh-snug:    1.375;
	--lh-normal:  1.5;
	--lh-relaxed: 1.625;

	--fw-regular:   400;
	--fw-medium:    500;
	--fw-semi:      600;
	--fw-bold:      700;
	--fw-extrabold: 800;
}

/* ── Spacing ─────────────────────────────────────────────────────── */

:root {
	--space-1:    0.25rem;   /* 4px */
	--space-2:    0.5rem;    /* 8px */
	--space-3:    0.75rem;   /* 12px */
	--space-4:    1rem;      /* 16px */
	--space-5:    1.25rem;   /* 20px */
	--space-6:    1.5rem;    /* 24px */
	--space-8:    2rem;      /* 32px */
	--space-10:   2.5rem;    /* 40px */
	--space-12:   3rem;      /* 48px */
	--space-16:   4rem;      /* 64px */
	--space-24:   6rem;      /* 96px */
}

/* ── Layout ──────────────────────────────────────────────────────── */

:root {
	--container-max: 1240px;
	--container-pad: var(--space-6);

	/* Hauteur totale du header sticky (nav 72px + qualifs-bar une ligne
	   ~34px + bordures). Utilisé pour sticky offsets et scroll-margin-top
	   des ancres pour compenser le header fixe. */
	--header-h:      110px;

	--radius-sm:     4px;
	--radius-md:     8px;
	--radius-lg:     12px;

	--shadow-1:      0 1px 3px rgb(0 0 0 / .08), 0 1px 2px rgb(0 0 0 / .06);
	--shadow-2:      0 4px 12px rgb(0 0 0 / .12), 0 2px 4px rgb(0 0 0 / .08);

	--transition:    150ms ease;
	--transition-md: 200ms ease;
}

/* ── @font-face (auto-hébergées, woff2 uniquement) ───────────────── */

@font-face {
	font-family: 'Inter';
	font-style:  normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/inter/Inter-Regular.woff2') format('woff2');
}

@font-face {
	font-family: 'Inter';
	font-style:  normal;
	font-weight: 500;
	font-display: swap;
	src: url('../fonts/inter/Inter-Medium.woff2') format('woff2');
}

@font-face {
	font-family: 'Inter';
	font-style:  normal;
	font-weight: 600;
	font-display: swap;
	src: url('../fonts/inter/Inter-SemiBold.woff2') format('woff2');
}

@font-face {
	font-family: 'Inter';
	font-style:  normal;
	font-weight: 700;
	font-display: swap;
	src: url('../fonts/inter/Inter-Bold.woff2') format('woff2');
}

@font-face {
	font-family: 'Inter';
	font-style:  normal;
	font-weight: 800;
	font-display: swap;
	src: url('../fonts/inter/Inter-ExtraBold.woff2') format('woff2');
}

@font-face {
	font-family: 'JetBrains Mono';
	font-style:  normal;
	font-weight: 400;
	font-display: swap;
	src: url('../fonts/jetbrains-mono/JetBrainsMono-Regular.woff2') format('woff2');
}

@font-face {
	font-family: 'JetBrains Mono';
	font-style:  normal;
	font-weight: 600;
	font-display: swap;
	src: url('../fonts/jetbrains-mono/JetBrainsMono-SemiBold.woff2') format('woff2');
}

/* Fraunces — variable serif display (SIL OFL 1.1). Axe wght 100–900.
   `woff2-variations` est servi aux navigateurs qui gèrent l'axe variable ;
   `woff2` fallback pour les autres — même fichier, un seul téléchargement. */
@font-face {
	font-family: 'Fraunces';
	font-style:  normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('../fonts/fraunces/fraunces-latin-wght-normal.woff2') format('woff2-variations'),
	     url('../fonts/fraunces/fraunces-latin-wght-normal.woff2') format('woff2');
}

@font-face {
	font-family: 'Fraunces';
	font-style:  italic;
	font-weight: 100 900;
	font-display: swap;
	src: url('../fonts/fraunces/fraunces-latin-wght-italic.woff2') format('woff2-variations'),
	     url('../fonts/fraunces/fraunces-latin-wght-italic.woff2') format('woff2');
}
