.hero-gradient {
    background: linear-gradient(135deg, #f2ca50 0%, #d4af37 100%);
}

.tech-document-grid {
    display: grid;
    grid-template-columns: minmax(0, 250px) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    min-width: 0;
}

.tech-document-grid > article {
    min-width: 0;
}

@media (max-width: 1024px) {
    .tech-document-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.prose h2 {
    font-family: 'Noto Serif', serif;
    font-size: clamp(1.35rem, 4.5vw, 2.5rem);
    font-weight: 900;
    margin-top: 4rem;
    margin-bottom: 2rem;
    color: #f2ca50;
    border-bottom: 1px solid rgba(242, 202, 80, 0.2);
    padding-bottom: 0.5rem;
    letter-spacing: -0.025em;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.prose h2:first-child {
    margin-top: 0;
}

.prose h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1rem, 3.5vw, 1.25rem);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: #e5e2e1;
    overflow-wrap: anywhere;
}

.prose h4 {
    font-family: 'Manrope', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #d0c5af;
}

.prose {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Ancres sous la barre fixe (sommaire mobile + desktop) */
.tech-document-grid article.prose section[id] {
    scroll-margin-top: 6.5rem;
}

@media (min-width: 640px) {
    .tech-document-grid article.prose section[id] {
        scroll-margin-top: 7.5rem;
    }
}

@media (min-width: 1024px) {
    .tech-document-grid article.prose section[id] {
        scroll-margin-top: 8.5rem;
    }
}

.prose p {
    font-size: clamp(1rem, 2.8vw, 1.125rem);
    line-height: 1.75;
    margin-bottom: 1.5rem;
    color: #a3a3a3;
    font-weight: 300;
}

.prose ul {
    margin-bottom: 2rem;
    list-style-type: none;
    padding-left: 0;
}

.prose ol {
    margin-bottom: 2rem;
    padding-left: clamp(1rem, 4vw, 1.5rem);
    list-style: decimal;
    color: #d0c5af;
}

.prose ol > li {
    padding-left: 0.35rem;
    margin-bottom: 0.75rem;
    line-height: 1.7;
    list-style: decimal;
}

.prose li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: #d0c5af;
}

.prose ul > li::before {
    content: "—";
    position: absolute;
    left: 0;
    color: #f2ca50;
}

.prose code {
    font-family: ui-monospace, monospace;
    font-size: clamp(0.8em, 2.5vw, 0.9em);
    background: rgba(255, 255, 255, 0.06);
    padding: 0.15em 0.4em;
    border-radius: 0.25rem;
    color: #f2ca50;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.prose hr {
    border: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(242, 202, 80, 0.25), transparent);
    margin: 3rem 0;
}

.prose strong {
    color: #e5e2e1;
    font-weight: 600;
}

.sticky-nav {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.sticky-nav a {
    display: block;
    line-height: 1.35;
    hyphens: auto;
    word-break: break-word;
}

.doc-figure {
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.doc-figure img {
    display: block;
    width: 100%;
    height: auto;
}

/* Deux visuels : même traitement — repos très lisible (N&B + léger voile), survol couleur légèrement boostée */
figure.doc-figure-color img {
    filter: grayscale(1) brightness(0.82) contrast(1.1);
    transition: filter 0.85s cubic-bezier(0.4, 0, 0.2, 1);
}

figure.doc-figure-color:hover img,
figure.doc-figure-color:focus-within img {
    filter: grayscale(0) brightness(1.04) contrast(1.06) saturate(1.12);
}
