/* tap4Book — habillage commun du centre de documentation.
   Chargé après le <style> de chaque page : il redéfinit les variables
   historiques (--tap4book-*) et aligne la documentation sur la charte du
   site (voir /tap4book.css). Aucune structure HTML n'est modifiée. */

/* Inter, auto-hébergée (mêmes fichiers que le site, voir /tap4book.css) */
@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 400 800;
    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;
}
@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 400 800;
    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;
}

:root {
    --tap4book-primary: #059669;
    --tap4book-secondary: #047857;
    --tap4book-accent: #f59e0b;
    --tap4book-dark: #0b1220;
    --tap4book-light: #f8fafc;

    --docs-ink: #0b1220;
    --docs-text: #334155;
    --docs-muted: #64748b;
    --docs-line: #e2e8f0;
    --docs-surface: #f8fafc;
    --docs-tint: #ecfdf5;
    --docs-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --docs-shadow-md: 0 10px 30px -12px rgba(15, 23, 42, 0.15);
}

body {
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--docs-text);
    background-color: var(--docs-surface);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--docs-ink);
    letter-spacing: -0.02em;
}
h1 { font-weight: 800; }
h2, h3 { font-weight: 700; }
h4, h5, h6 { font-weight: 600; }

/* Bandeau supérieur et en-tête de page : à-plat encre, plus de dégradé vert */
.navbar,
.hero-section {
    background: var(--docs-ink) !important;
}
.navbar {
    box-shadow: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.hero-section h1,
.hero-section h2,
.hero-section p {
    color: #fff;
}
.hero-section h1 {
    letter-spacing: -0.03em;
}

/* Cartes et blocs : filet fin plutôt qu'ombre diffuse */
.doc-card,
.feature-card,
.endpoint-card,
.example-card,
.code-card,
.content-section,
.table-custom,
.alert-custom {
    border-radius: 1rem;
    box-shadow: var(--docs-shadow-sm);
}
.doc-card,
.feature-card,
.endpoint-card,
.example-card,
.content-section {
    background: #fff;
    border: 1px solid var(--docs-line);
}
.doc-card:hover,
.feature-card:hover,
.endpoint-card:hover {
    border-color: #cbd5e1;
    box-shadow: var(--docs-shadow-md);
    transform: translateY(-2px);
}
.doc-card .icon {
    color: var(--tap4book-primary);
    font-size: 2.5rem;
}

/* Sommaire latéral */
.sidebar {
    background: #fff;
    border-right: 1px solid var(--docs-line);
}
.sidebar a,
.sidebar .nav-link {
    color: var(--docs-text);
    border-radius: 0.5rem;
}
.sidebar a:hover,
.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: var(--tap4book-primary);
    background-color: var(--docs-tint);
}

/* Boutons */
.btn-primary {
    --bs-btn-bg: var(--tap4book-primary);
    --bs-btn-border-color: var(--tap4book-primary);
    --bs-btn-hover-bg: var(--tap4book-secondary);
    --bs-btn-hover-border-color: var(--tap4book-secondary);
    --bs-btn-active-bg: var(--tap4book-secondary);
    --bs-btn-active-border-color: var(--tap4book-secondary);
    border-radius: 0.75rem;
    font-weight: 600;
}
.doc-card .btn-primary,
.copy-btn,
.back-to-top {
    background: var(--tap4book-primary);
    border: 0;
}
.doc-card .btn-primary:hover,
.copy-btn:hover,
.back-to-top:hover {
    background: var(--tap4book-secondary);
    transform: none;
}

/* Pied de page du centre de documentation */
.footer {
    background: var(--docs-ink);
}

@media (prefers-reduced-motion: reduce) {
    .doc-card:hover,
    .feature-card:hover,
    .endpoint-card:hover {
        transform: none;
    }
}
