

.bibliotheque-des-graphiques-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
    animation: fadeInSlideUp 0.8s ease-out 0.4s both;
}

.bibliotheque-des-graphiques-main {
    min-width: 0;
}

.bibliotheque-themes {
    margin-top: 0.5rem;
}

.bibliotheque-tabs-wrap {
    position: relative;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.75rem;
}

.bibliotheque-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    overflow: visible;
    overscroll-behavior: none;
    padding: 0;
}

.bibliotheque-tabs.bibliotheque-tabs--scrollable {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 2.25rem 2px 0;
}

.bibliotheque-tabs-wrap:has(.bibliotheque-tabs-scroll--left.is-visible) .bibliotheque-tabs.bibliotheque-tabs--scrollable {
    padding-left: 1.75rem;
}

.bibliotheque-tabs.bibliotheque-tabs--scrollable::-webkit-scrollbar {
    display: none;
}

.bibliotheque-tabs-scroll {
    display: none;
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2rem;
    align-items: center;
    justify-content: center;
    border: 0;
    background: var(--dark-component);
    color: var(--text-secondary, #8b949e);
    cursor: pointer;
    z-index: 2;
    font-size: 1.25rem;
    line-height: 1;
    user-select: none;
    padding: 0;
}

.bibliotheque-tabs-scroll:hover {
    color: var(--primary);
}

.bibliotheque-tabs-scroll--left {
    left: 0;
    background: linear-gradient(to right, var(--dark-component) 55%, transparent);
    justify-content: flex-start;
    padding-left: 0.15rem;
}

.bibliotheque-tabs-scroll--right {
    right: 0;
    background: linear-gradient(to left, var(--dark-component) 55%, transparent);
    justify-content: flex-end;
    padding-right: 0.15rem;
}

.bibliotheque-tabs-scroll.is-visible {
    display: flex;
}

.light-theme .bibliotheque-tabs-scroll {
    background: var(--dark-component);
}

.light-theme .bibliotheque-tabs-scroll--left {
    background: linear-gradient(to right, var(--dark-component) 55%, transparent);
}

.light-theme .bibliotheque-tabs-scroll--right {
    background: linear-gradient(to left, var(--dark-component) 55%, transparent);
}

.bibliotheque-tab {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0.85rem 1rem;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--text-secondary, #8b949e);
    white-space: nowrap;
    position: relative;
    border-radius: 6px 6px 0 0;
    flex-shrink: 0;
    transition: color 0.15s ease, background 0.15s ease;
}

.bibliotheque-tab:hover {
    color: var(--primary);
}

.bibliotheque-tab.is-active {
    color: var(--primary);
}

.bibliotheque-tab.is-active::after {
    content: "";
    position: absolute;
    left: 0.65rem;
    right: 0.65rem;
    bottom: -1px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px 2px 0 0;
}

.bibliotheque-panel {
    animation: bibliotheque-panel-in 0.2s ease;
}

.bibliotheque-panel[hidden] {
    display: none !important;
}

.bibliotheque-panel-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: var(--text-primary, #c9d1d9);
}

.light-theme .bibliotheque-panel-title {
    color: var(--text-primary, #24292f);
}

.bibliotheque-panel-body {
    padding: 1.25rem 0;
    border-radius: 8px;
    border: 1px dashed var(--border-color);
    background: var(--dark-alt, rgba(255, 255, 255, 0.02));
}

.bibliotheque-panel-placeholder {
    margin: 0;
    padding: 0 1.25rem;
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-secondary, #8b949e);
}

.bibliotheque-panel-body--data-sources {
    padding: 0;
    border: 0;
    background: transparent;
}

.bibliotheque-panel:has(.bibliotheque-panel-body--data-sources) .bibliotheque-panel-title {
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    font-weight: 400;
}

.bibliotheque-source {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    padding: 1.5rem;
    border-radius: 8px;
}

.bibliotheque-source:nth-child(odd) {
    background: var(--dark-alt, rgba(255, 255, 255, 0.03));
}

.light-theme .bibliotheque-source:nth-child(odd) {
    background: #f8f9fb;
}

.bibliotheque-source__heading {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.4;
}

.bibliotheque-source__heading a {
    color: var(--primary);
    text-decoration: none;
}

.bibliotheque-source__heading a:hover {
    text-decoration: underline;
}

.bibliotheque-source__heading a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 2px;
}

.bibliotheque-source__item p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-secondary, #8b949e);
}

.light-theme .bibliotheque-source__item p {
    color: #3c4043;
}

@keyframes bibliotheque-panel-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 720px) {
    .bibliotheque-tab {
        padding: 0.75rem 0.85rem;
        font-size: 0.875rem;
    }

    .bibliotheque-panel-title {
        font-size: 1.25rem;
    }

    .bibliotheque-panel:has(.bibliotheque-panel-body--data-sources) .bibliotheque-panel-title {
        font-size: 1.35rem;
    }

    .bibliotheque-source {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bibliotheque-des-graphiques-page {
        animation: none;
    }
}
