/* =========================================================================
   Kaï Consulting — Design System v2 — BASE
   Hiérarchie typographique éditoriale + utilities texte
   ========================================================================= */

/* =========================================================================
   1. HIÉRARCHIE DES TITRES
   - H1 : display, serif (Fraunces), fluid, tight tracking
   - H2 : display, serif, fluid
   - H3-H6 : UI sans-serif (Inter Tight)
   ========================================================================= */

h1, .h1 {
    font-family: var(--font-display);
    font-weight: var(--weight-regular);
    font-size: var(--text-5xl);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--fg);
}

h2, .h2 {
    font-family: var(--font-display);
    font-weight: var(--weight-regular);
    font-size: var(--text-3xl);
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-tight);
    color: var(--fg);
}

h3, .h3 {
    font-family: var(--font-ui);
    font-weight: var(--weight-semibold);
    font-size: var(--text-xl);
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-tight);
    color: var(--fg);
}

h4, .h4 {
    font-family: var(--font-ui);
    font-weight: var(--weight-semibold);
    font-size: var(--text-lg);
    line-height: var(--leading-snug);
    letter-spacing: var(--tracking-tight);
    color: var(--fg);
}

h5, .h5 {
    font-family: var(--font-ui);
    font-weight: var(--weight-medium);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--fg);
}

h6, .h6 {
    font-family: var(--font-ui);
    font-weight: var(--weight-semibold);
    font-size: var(--text-sm);
    line-height: var(--leading-normal);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    color: var(--fg-muted);
}

/* =========================================================================
   2. PARAGRAPHES & TEXTE
   ========================================================================= */

p {
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--fg);
}

.lead {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    color: var(--fg-muted);
    font-weight: var(--weight-regular);
    max-width: var(--max-prose);
}

.text-muted    { color: var(--fg-muted); }
.text-subtle   { color: var(--fg-subtle); }
.text-brand    { color: var(--brand); }
.text-balance  { text-wrap: balance; }
.text-pretty   { text-wrap: pretty; }

/* Tailles utilities */
.text-xs  { font-size: var(--text-xs); }
.text-sm  { font-size: var(--text-sm); }
.text-lg  { font-size: var(--text-lg); }
.text-xl  { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }

/* Eyebrow — petit label au-dessus d'un titre (genre Stripe Press) */
.eyebrow {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    letter-spacing: var(--tracking-widest);
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: var(--sp-4);
}

/* Drop cap — première lettre éditoriale (articles magazine) */
.drop-cap::first-letter {
    font-family: var(--font-display);
    font-weight: var(--weight-regular);
    font-size: 5em;
    line-height: 0.85;
    float: inline-start;
    margin-inline-end: var(--sp-3);
    margin-block-start: var(--sp-1);
    color: var(--brand);
}

/* =========================================================================
   3. CODE & INLINE CODE
   ========================================================================= */

code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--code-inline-bg);
    color: var(--code-inline-fg);
    padding: 0.15em 0.4em;
    border-radius: var(--r-xs);
}

pre {
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    background: var(--code-bg);
    color: var(--code-fg);
    padding: var(--sp-5) var(--sp-6);
    border-radius: var(--r-md);
    overflow-x: auto;
    margin-block: var(--sp-5);
}

pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
}

/* =========================================================================
   4. BLOCKQUOTE
   ========================================================================= */

blockquote {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-style: italic;
    line-height: var(--leading-snug);
    color: var(--fg);
    border-inline-start: 3px solid var(--brand);
    padding-inline-start: var(--sp-6);
    margin-block: var(--sp-7);
}

blockquote cite {
    display: block;
    font-family: var(--font-ui);
    font-size: var(--text-sm);
    font-style: normal;
    color: var(--fg-muted);
    margin-top: var(--sp-3);
}
blockquote cite::before { content: '— '; }

/* =========================================================================
   5. LIENS RICHES (textuels in-content)
   ========================================================================= */

.prose a:not(.btn), p a:not(.btn) {
    color: var(--brand);
    text-decoration: underline;
    text-decoration-color: color-mix(in oklch, var(--brand) 40%, transparent);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
    transition: var(--transition-snappy);
}

.prose a:not(.btn):hover, p a:not(.btn):hover {
    text-decoration-color: var(--brand);
    text-decoration-thickness: 2px;
}

/* =========================================================================
   6. LISTES STYLÉES (dans le contenu prose)
   ========================================================================= */

.prose ul, .prose ol {
    padding-inline-start: var(--sp-6);
    margin-block: var(--sp-5);
}

.prose ul {
    list-style: none;
}

.prose ul li {
    position: relative;
    padding-inline-start: var(--sp-5);
    margin-block-end: var(--sp-2);
}

.prose ul li::before {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    top: 0.7em;
    width: 6px;
    height: 6px;
    border-radius: var(--r-full);
    background: var(--brand);
}

.prose ol {
    list-style: decimal;
    list-style-position: outside;
}

.prose ol li {
    margin-block-end: var(--sp-2);
    padding-inline-start: var(--sp-2);
}

.prose ol li::marker {
    color: var(--brand);
    font-family: var(--font-display);
    font-weight: var(--weight-medium);
}

/* =========================================================================
   7. STRONG / EM
   ========================================================================= */

strong, b {
    font-weight: var(--weight-semibold);
    color: var(--fg);
}

em, i {
    font-style: italic;
}

/* =========================================================================
   8. ACCESSIBILITÉ — visually-hidden + skip-link
   ========================================================================= */

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

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: var(--z-tooltip);
    background: var(--brand);
    color: var(--brand-contrast);
    padding: var(--sp-3) var(--sp-5);
    border-radius: var(--r-md);
    font-weight: var(--weight-semibold);
    text-decoration: none;
    box-shadow: var(--s-md);
}

.skip-link:focus {
    left: var(--sp-4);
    top: var(--sp-4);
}
