.sherwood-panel {
    --sherwood-border: #d7dee8;
    --sherwood-muted: #5b6472;
    --sherwood-bg: #f6f8fb;
    --sherwood-accent: #143f6b;
    margin: 2rem auto;
    max-width: 100%;
    color: #172033;
}

.sherwood-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
}

.sherwood-heading h2 {
    margin: .2rem 0 .65rem;
    font-size: clamp(1.45rem, 2.5vw, 2.15rem);
    line-height: 1.18;
}

.sherwood-eyebrow {
    margin: 0;
    color: var(--sherwood-accent);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.sherwood-intro,
.sherwood-source-note,
.sherwood-footnote {
    color: var(--sherwood-muted);
    line-height: 1.55;
}

.sherwood-source-link,
.sherwood-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: .65rem 1rem;
    border: 1px solid var(--sherwood-accent);
    border-radius: .55rem;
    background: #fff;
    color: var(--sherwood-accent);
    font-weight: 750;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.sherwood-source-link:hover,
.sherwood-reset:hover {
    background: #eef4fa;
}

.sherwood-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .8rem;
    margin: 1rem 0;
}

.sherwood-stats > div {
    padding: .85rem 1rem;
    border: 1px solid var(--sherwood-border);
    border-radius: .7rem;
    background: var(--sherwood-bg);
}

.sherwood-stats span,
.sherwood-stats strong {
    display: block;
}

.sherwood-stats span {
    margin-bottom: .25rem;
    color: var(--sherwood-muted);
    font-size: .78rem;
}

.sherwood-stats strong {
    font-size: .98rem;
}

.sherwood-alert {
    margin: .85rem 0;
    padding: .85rem 1rem;
    border: 1px solid;
    border-radius: .65rem;
    line-height: 1.5;
}

.sherwood-alert-info { background: #edf6ff; border-color: #9bc8ef; }
.sherwood-alert-success { background: #edf9f0; border-color: #9bd2a6; }
.sherwood-alert-warning { background: #fff8e6; border-color: #e6c46b; }
.sherwood-alert-error { background: #fff0f0; border-color: #e6a0a0; }

.sherwood-toolbar {
    display: grid;
    grid-template-columns: minmax(15rem, 1fr) auto auto;
    align-items: end;
    gap: .75rem;
    margin: 1.2rem 0 .8rem;
}

.sherwood-search-label span {
    display: block;
    margin-bottom: .35rem;
    color: var(--sherwood-muted);
    font-size: .84rem;
    font-weight: 650;
}

.sherwood-search-label input {
    box-sizing: border-box;
    width: 100%;
    min-height: 2.75rem;
    padding: .7rem .8rem;
    border: 1px solid var(--sherwood-border);
    border-radius: .55rem;
    background: #fff;
    color: inherit;
    font: inherit;
}

.sherwood-result-count {
    align-self: center;
    color: var(--sherwood-muted);
    font-size: .9rem;
    white-space: nowrap;
}

.sherwood-table-scroll {
    max-width: 100%;
    overflow: auto;
    border: 1px solid var(--sherwood-border);
    border-radius: .75rem;
    background: #fff;
    box-shadow: 0 8px 22px rgba(20, 40, 70, .06);
}

.sherwood-table {
    width: 100%;
    min-width: 1100px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: .86rem;
}

.sherwood-table th,
.sherwood-table td {
    padding: .62rem .7rem;
    border-right: 1px solid #e6eaf0;
    border-bottom: 1px solid #e6eaf0;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.sherwood-table th:last-child,
.sherwood-table td:last-child {
    border-right: 0;
}

.sherwood-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #eaf0f7;
    color: #152a43;
    font-weight: 800;
    cursor: pointer;
    user-select: none;
}

.sherwood-table thead th::after {
    content: " ↕";
    color: #77869a;
    font-size: .75em;
}

.sherwood-table tbody tr:nth-child(even) td {
    background: #fafbfd;
}

.sherwood-table tbody tr:hover td {
    background: #eef5fb;
}

.sherwood-table tr[hidden] {
    display: none;
}

.sherwood-footnote {
    margin-top: .85rem;
    font-size: .82rem;
}

@media (max-width: 900px) {
    .sherwood-heading {
        display: block;
    }

    .sherwood-source-link {
        margin-top: .75rem;
    }

    .sherwood-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sherwood-toolbar {
        grid-template-columns: 1fr auto;
    }

    .sherwood-result-count {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .sherwood-stats {
        grid-template-columns: 1fr;
    }

    .sherwood-toolbar {
        grid-template-columns: 1fr;
    }

    .sherwood-reset {
        width: 100%;
    }
}

/* ===== F1SYH SHERWOOD DARK MODE V1 START ===== */

.sherwood-panel.sherwood-dark-mode,
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel {
    --sherwood-border: #2b4a67;
    --sherwood-muted: #a8bbce;
    --sherwood-bg: #10263b;
    --sherwood-accent: #61c9ff;
    --sherwood-panel: #0d2135;
    --sherwood-panel-alt: #112a42;
    --sherwood-panel-hover: #193b58;
    --sherwood-text: #eaf3fc;
    --sherwood-text-strong: #ffffff;
    --sherwood-shadow: 0 10px 28px rgba(0, 0, 0, .32);

    color: var(--sherwood-text) !important;
    color-scheme: dark;
}

.sherwood-panel.sherwood-dark-mode .sherwood-heading h2,
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel .sherwood-heading h2 {
    color: var(--sherwood-text-strong) !important;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .2);
}

.sherwood-panel.sherwood-dark-mode .sherwood-eyebrow,
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel .sherwood-eyebrow {
    color: var(--sherwood-accent) !important;
}

.sherwood-panel.sherwood-dark-mode :is(
    .sherwood-intro,
    .sherwood-source-note,
    .sherwood-footnote,
    .sherwood-result-count,
    .sherwood-search-label span
),
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel :is(
    .sherwood-intro,
    .sherwood-source-note,
    .sherwood-footnote,
    .sherwood-result-count,
    .sherwood-search-label span
) {
    color: var(--sherwood-muted) !important;
}

.sherwood-panel.sherwood-dark-mode :is(.sherwood-source-note, .sherwood-footnote) strong,
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel :is(.sherwood-source-note, .sherwood-footnote) strong {
    color: var(--sherwood-text) !important;
}

/* Boutons */
.sherwood-panel.sherwood-dark-mode :is(.sherwood-source-link, .sherwood-reset),
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel :is(.sherwood-source-link, .sherwood-reset) {
    border-color: #39749d !important;
    background: #163650 !important;
    color: #eaf7ff !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .18);
}

.sherwood-panel.sherwood-dark-mode :is(.sherwood-source-link, .sherwood-reset):hover,
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel :is(.sherwood-source-link, .sherwood-reset):hover {
    border-color: var(--sherwood-accent) !important;
    background: #1c496c !important;
    color: #ffffff !important;
}

/* Cartes */
.sherwood-panel.sherwood-dark-mode .sherwood-stats > div,
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel .sherwood-stats > div {
    border-color: var(--sherwood-border) !important;
    background: linear-gradient(145deg, #10283f, #0d2135) !important;
    color: var(--sherwood-text) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
}

.sherwood-panel.sherwood-dark-mode .sherwood-stats span,
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel .sherwood-stats span {
    color: var(--sherwood-muted) !important;
}

.sherwood-panel.sherwood-dark-mode .sherwood-stats strong,
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel .sherwood-stats strong {
    color: var(--sherwood-text-strong) !important;
}

/* Alertes */
.sherwood-panel.sherwood-dark-mode .sherwood-alert,
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel .sherwood-alert {
    color: var(--sherwood-text) !important;
    box-shadow: 0 5px 16px rgba(0, 0, 0, .16);
}

.sherwood-panel.sherwood-dark-mode .sherwood-alert-info,
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel .sherwood-alert-info {
    background: #102d48 !important;
    border-color: #3275a5 !important;
}

.sherwood-panel.sherwood-dark-mode .sherwood-alert-success,
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel .sherwood-alert-success {
    background: #123829 !important;
    border-color: #338761 !important;
}

.sherwood-panel.sherwood-dark-mode .sherwood-alert-warning,
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel .sherwood-alert-warning {
    background: #3a2d14 !important;
    border-color: #94712b !important;
}

.sherwood-panel.sherwood-dark-mode .sherwood-alert-error,
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel .sherwood-alert-error {
    background: #432020 !important;
    border-color: #a94b4b !important;
}

/* Recherche */
.sherwood-panel.sherwood-dark-mode .sherwood-search-label input,
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel .sherwood-search-label input {
    border-color: var(--sherwood-border) !important;
    background: #091b2d !important;
    color: var(--sherwood-text-strong) !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .3);
}

.sherwood-panel.sherwood-dark-mode .sherwood-search-label input::placeholder,
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel .sherwood-search-label input::placeholder {
    color: #7f96ab !important;
    opacity: 1;
}

.sherwood-panel.sherwood-dark-mode .sherwood-search-label input:focus,
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel .sherwood-search-label input:focus {
    border-color: var(--sherwood-accent) !important;
    outline: 3px solid rgba(97, 201, 255, .18);
}

/* Tableau */
.sherwood-panel.sherwood-dark-mode .sherwood-table-scroll,
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel .sherwood-table-scroll {
    border-color: var(--sherwood-border) !important;
    background: var(--sherwood-panel) !important;
    box-shadow: var(--sherwood-shadow) !important;
    scrollbar-color: #426785 #0b1d2e;
}

.sherwood-panel.sherwood-dark-mode .sherwood-table,
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel .sherwood-table {
    background: var(--sherwood-panel) !important;
    color: var(--sherwood-text) !important;
}

.sherwood-panel.sherwood-dark-mode .sherwood-table :is(th, td),
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel .sherwood-table :is(th, td) {
    border-right-color: #27455f !important;
    border-bottom-color: #27455f !important;
    color: var(--sherwood-text) !important;
}

.sherwood-panel.sherwood-dark-mode .sherwood-table thead th,
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel .sherwood-table thead th {
    background: #173650 !important;
    color: #f4f9ff !important;
    text-shadow: 0 1px 0 rgba(0, 0, 0, .25);
}

.sherwood-panel.sherwood-dark-mode .sherwood-table thead th::after,
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel .sherwood-table thead th::after {
    color: #8ecff0 !important;
}

.sherwood-panel.sherwood-dark-mode .sherwood-table tbody tr td,
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel .sherwood-table tbody tr td {
    background: var(--sherwood-panel) !important;
}

.sherwood-panel.sherwood-dark-mode .sherwood-table tbody tr:nth-child(even) td,
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel .sherwood-table tbody tr:nth-child(even) td {
    background: var(--sherwood-panel-alt) !important;
}

.sherwood-panel.sherwood-dark-mode .sherwood-table tbody tr:hover td,
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel .sherwood-table tbody tr:hover td {
    background: var(--sherwood-panel-hover) !important;
}

.sherwood-panel.sherwood-dark-mode a:not(.sherwood-source-link),
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel a:not(.sherwood-source-link) {
    color: var(--sherwood-accent) !important;
}

.sherwood-panel.sherwood-dark-mode code,
:is(
    html[data-theme="dark"],
    html[data-bs-theme="dark"],
    html.dark,
    body.dark,
    body.dark-mode,
    body.theme-dark,
    body[data-theme="dark"]
) .sherwood-panel code {
    border: 1px solid #31516c;
    border-radius: .3rem;
    background: #081827;
    color: #bfeaff;
    padding: .1rem .3rem;
}

/* Scrollbars */
.sherwood-panel.sherwood-dark-mode .sherwood-table-scroll::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.sherwood-panel.sherwood-dark-mode .sherwood-table-scroll::-webkit-scrollbar-track {
    background: #0a1a2a;
}

.sherwood-panel.sherwood-dark-mode .sherwood-table-scroll::-webkit-scrollbar-thumb {
    border: 3px solid #0a1a2a;
    border-radius: 999px;
    background: #416987;
}

/* ===== F1SYH SHERWOOD DARK MODE V1 END ===== */
