/*
 * The marketing site's guide pages, loaded on top of platform.css by their own entrypoint.
 * Layout, spacing, sizes and weights are Bootstrap utilities in the templates; this file holds
 * the reading width, the type and the --pf-* colors, handed to Bootstrap's own variables wherever
 * a utility or component reads them.
 */

.pf-art {
    --bs-border-color: var(--pf-line-dash);
    --bs-secondary-color: var(--pf-muted);
    --bs-tertiary-color: var(--pf-faint);
    --bs-emphasis-color: var(--pf-ink);
    max-width: 1180px;
    margin-inline: auto;
    padding-inline: var(--pf-gutter);
}

/* ---- Type ---- */
.pf-art__display {
    font-family: var(--pf-font-display);
    font-stretch: 115%;
    letter-spacing: -0.02em;
}

.pf-art__sans {
    font-family: var(--pf-font-body);
}

.pf-art__label {
    font-family: var(--pf-font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.08em;
    color: var(--pf-muted);
}

.pf-art__title {
    font-family: var(--pf-font-display);
    font-stretch: 115%;
    font-weight: 600;
    font-size: clamp(2.3rem, 5vw, 3.9rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
    text-wrap: balance;
}

.pf-art__lead {
    font-family: var(--pf-font-serif);
    font-size: clamp(1.2rem, 1.9vw, 1.42rem);
    line-height: 1.5;
    color: color-mix(in srgb, var(--pf-ink) 78%, var(--pf-bg));
    text-wrap: pretty;
}

.pf-art__body {
    font-family: var(--pf-font-serif);
    font-size: 1.2rem;
    line-height: 1.7;
    color: color-mix(in srgb, var(--pf-ink) 90%, var(--pf-bg));
}

.pf-art__body h2 {
    font-family: var(--pf-font-display);
    font-stretch: 115%;
    font-weight: 600;
    font-size: clamp(1.6rem, 2.6vw, 2rem);
    line-height: 1.15;
    letter-spacing: -0.025em;
    color: var(--pf-ink);
    scroll-margin-top: 96px;
    text-wrap: balance;
}

.pf-art__body p,
.pf-art__body li {
    text-wrap: pretty;
}

.pf-art__body strong {
    color: var(--pf-ink);
}

/* ---- Sommaire ---- */
.pf-art__toc {
    top: 96px;
}

.pf-art__toc-link {
    font-size: 0.9rem;
    line-height: 1.35;
    color: var(--pf-muted);
    box-shadow: inset 1px 0 0 var(--bs-border-color);
    transition: color 0.2s, box-shadow 0.2s;
}

.pf-art__toc-link:hover,
.pf-art__toc-link.is-active {
    color: var(--pf-ink);
}

.pf-art__toc-link.is-active {
    box-shadow: inset 2px 0 0 var(--pf-ink);
}

/* The bar follows the scroll position, so Bootstrap's width transition would only lag it. */
.pf-art__toc .progress {
    --bs-progress-height: 3px;
    --bs-progress-bg: var(--pf-line);
    --bs-progress-bar-bg: var(--pf-ink);
    --bs-progress-bar-transition: none;
}

/* ---- Tiles ---- */
.pf-art__icon {
    width: 40px;
    height: 40px;
    background: var(--pf-lime);
    color: var(--pf-ink);
}

.pf-art__yes {
    color: var(--pf-lime-deep);
}

/* ---- Bars ---- */
.pf-art__bar {
    --bs-progress-height: 10px;
    --bs-progress-bg: var(--pf-line);
    --bs-progress-bar-bg: var(--pf-faint);
}

.pf-art__bar--self {
    --bs-progress-bar-bg: var(--pf-lime-deep);
}

/* ---- Surfaces ---- */
.pf-art__panel {
    background: var(--pf-surface-2);
}

.pf-art__hl-panel {
    background: var(--pf-lime-tint);
}

.pf-art__tray {
    background: color-mix(in srgb, var(--pf-ink) 5%, var(--pf-bg));
}

.pf-art__dark {
    background: var(--pf-dark);
    color: var(--pf-cream);
    --pf-focus: var(--pf-lime);
}

.pf-art__on-dark {
    color: var(--pf-on-dark);
}

.pf-art__final-title {
    font-weight: 600;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1;
    letter-spacing: -0.035em;
    max-width: 16ch;
    text-wrap: balance;
}

/* ---- Tables ---- */
.pf-art__table .table {
    --bs-table-bg: transparent;
    --bs-table-border-color: var(--pf-line);
    --bs-table-active-bg: var(--pf-lime-tint);
    min-width: 560px;
    font-size: 0.93rem;
    line-height: 1.4;
}

.pf-art__table th,
.pf-art__table td {
    padding: 13px 16px;
}

.pf-art__table tbody tr:last-child > * {
    border-bottom: 0;
}

/* ---- Templates ---- */
.pf-art__shot .pf-onb-card__preview {
    height: auto;
    aspect-ratio: 1280 / 1100;
}

/* ---- Questions ---- */
.pf-art summary::-webkit-details-marker {
    display: none;
}

.pf-art__plus {
    font-family: var(--pf-font-body);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1;
    transition: transform 0.25s ease;
}

details[open] > summary .pf-art__plus {
    transform: rotate(45deg);
}

@media (prefers-reduced-motion: reduce) {
    .pf-art__toc-link,
    .pf-art__plus {
        transition: none;
    }
}
