/* ===================================================
   KBEEN — Styles communs à toutes les pages
   =================================================== */

/* === POLICES AUTO-HÉBERGÉES (plus de dépendance Google Fonts) === */

/* Inter — latin-ext (graisses 400 & 600) */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url(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;
}
/* Inter — latin (graisses 400 & 600) */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url(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;
}

/* League Spartan — latin-ext (graisses 800 & 900) */
@font-face {
    font-family: 'League Spartan';
    font-style: normal;
    font-weight: 800 900;
    font-display: swap;
    src: url(fonts/leaguespartan-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;
}
/* League Spartan — latin (graisses 800 & 900) */
@font-face {
    font-family: 'League Spartan';
    font-style: normal;
    font-weight: 800 900;
    font-display: swap;
    src: url(fonts/leaguespartan-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;
}

/* === DESIGN TOKENS KBEEN ===
   Source de verite unique pour couleurs, typo, radius, shadows, spacing.
   Pour TOUTES nouvelles features : utiliser ces variables.
   Cf finding P2 audit visuel (8 tailles h2, 17 radius, 12 shadows, 6 noirs).
   ============================================================ */
:root {
    /* --- COULEURS BRAND ---
       L'accent du site est le mauve K-work : c'est la vitrine de K-work, pas
       une marque à part. Le vert reste défini, mais il n'appartient plus qu'à
       la gamme cabines KBEEN, qui garde sa propre identité sur ses pages.

       Les tokens ont été RENOMMÉS plutôt que revalorisés : laisser une variable
       nommée « green » contenir du mauve est un piège pour la prochaine
       personne qui ouvre ce fichier. */
    --brand-accent: #8A1596;          /* Fond, bordure, icone decorative */
    --brand-accent-text: #8A1596;     /* Texte sur fond clair (8:1 sur blanc, AAA) */
    --accent-green: #74B094;          /* Gamme cabines KBEEN uniquement */
    --accent-green-text: #4F8B6E;     /* Idem, texte (AA 4.55:1) */
    --kwork-purple: #8A1596;          /* Mauve K work (B2B licences) */
    --kwork-purple-light: #BD29B5;    /* Gradient secondaire mauve */

    /* --- COULEURS DE BASE --- */
    --ink: #1d1d1f;                   /* Noir principal (titres, texte fort) — unifie #2C2A28, #1a1a1a, #0f0f0f */
    --bg-pure-black: #000000;
    --bg-section-dark: #0a0a0a;
    --bg-card: #111111;
    --bg-light: #f8f7f5;              /* Fond clair principal */
    --border-color: #1a1a1a;
    --border-dim: #222222;
    --border-light: rgba(0,0,0,0.1);  /* Bordure sur fond clair */
    --text-primary: #000000;
    --text-secondary: #ffffff;
    --text-muted: #6E6E73;            /* WCAG AA 4.83:1 sur #fff (avant: #888 = 3.54:1 fail) */
    --text-disabled: #595959;         /* AA 7:1 */

    /* --- TYPOGRAPHIE : echelle modulaire 4 niveaux --- */
    --h1-display: clamp(56px, 8vw, 120px);     /* Hero, page titles */
    --h2-section: clamp(36px, 4.5vw, 54px);    /* Section headings */
    --h3-sub: clamp(20px, 2.4vw, 28px);        /* Card titles, sub-sections */
    --h4-label: 14px;                          /* Eyebrow, tag, uppercase labels */
    --font-display: 'League Spartan', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* --- RADIUS : 4 niveaux --- */
    --radius-sm: 8px;     /* Boutons compacts, badges */
    --radius-md: 16px;    /* Cards standards, inputs */
    --radius-lg: 24px;    /* Cards principales, panneaux */
    --radius-pill: 9999px;

    /* --- SHADOWS : 4 niveaux d'elevation --- */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.12);
    --shadow-xl: 0 32px 80px rgba(0,0,0,0.18);

    /* --- SPACING : multiples de 4 --- */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;
    --space-9: 96px;
    --space-10: 120px;

    /* --- SECTION PADDING --- */
    --section-pad-y: 120px;
    --section-pad-x: clamp(24px, 5vw, 80px);
}

/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; }
* { -webkit-tap-highlight-color: transparent; }
a, button { touch-action: manipulation; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Inter', sans-serif; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: 'League Spartan', sans-serif; font-weight: 800; margin: 0; letter-spacing: -1px; }
p { line-height: 1.8; font-weight: 400; margin-bottom: 30px; }
a { text-decoration: none; transition: 0.3s; color: inherit; }
img { width: 100%; height: auto; display: block; }

/* === ACCESSIBILITÉ === */
.skip-link {
    position: absolute;
    top: -50px;
    left: 0;
    background: var(--brand-accent);
    color: #000;
    padding: 10px 20px;
    z-index: 100000;
    font-family: 'League Spartan', sans-serif;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 0 0 8px 0;
    transition: top 0.2s ease;
    text-decoration: none;
}
.skip-link:focus { top: 0; outline: 3px solid #000; outline-offset: 2px; }

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* === PAGE TRANSITION === */
#page-transition {
    position: fixed; top: 0; left: 0;
    width: 100%; height: 100%;
    background: #000;
    z-index: 99998;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* === SCROLL PROGRESS === */
#scroll-progress {
    position: fixed; top: 0; left: 0;
    height: 3px; width: 0%;
    background: linear-gradient(to right, var(--brand-accent), var(--kwork-purple-light));
    z-index: 10001;
    pointer-events: none;
    transition: width 0.1s linear;
}

/* === REVEAL ANIMATIONS === */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s cubic-bezier(0.2, 1, 0.3, 1), transform 0.5s cubic-bezier(0.2, 1, 0.3, 1);
}
.reveal-up.active { opacity: 1; transform: translateY(0); }

/* === ACCESSIBILITÉ : focus-visible === */
:focus-visible {
    outline: 2px solid var(--brand-accent, #8A1596);
    outline-offset: 3px;
    border-radius: 4px;
}

/* === ACCESSIBILITÉ : prefers-reduced-motion === */
@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;
    }
    .reveal-up { opacity: 1; transform: none; }
}
