/* A7 : contenu uniquement. Les barres, Plus, réglages et dialogues restent indépendants. */
/* Route announcements use a programmatic target, never a focusable control. */
[data-sp-route-focus][tabindex="-1"]:focus,
#spMainContent[tabindex="-1"]:focus,
:is(#homePage,#cataloguePage,#favoritesPage,#trainingPage,#detectorPage)[tabindex="-1"]:focus { outline:none; }
:where(#homePage,#cataloguePage,#favoritesPage,#trainingPage,#detectorPage,#bottomFilterSheet) {
    --sp-content-focus:#a31340;
    --sp-content-muted:#526176;
}
[data-theme=dark] :where(#homePage,#cataloguePage,#favoritesPage,#trainingPage,#detectorPage,#bottomFilterSheet) {
    --sp-content-focus:#b9d7ff;
    --sp-content-muted:#bdc8dc;
}
:where(#homePage,#cataloguePage,#favoritesPage,#trainingPage,#detectorPage,#bottomFilterSheet)
:is(button,a[href],input,select,summary,[role=button],[role=textbox]):focus-visible {
    outline:3px solid var(--sp-content-focus); outline-offset:3px;
}
:where(#homePage,#cataloguePage,#favoritesPage,#trainingPage,#detectorPage)
:is(button,a[href],input,select,summary,[tabindex]) {
    scroll-margin-block:110px calc(var(--sp-bottom-bar-clearance,84px) + 20px);
}
:where(#cataloguePage,#favoritesPage) :is(.card-id,.catalogue-variant-meta>small,.catalogue-variant-group summary small,.catalogue-method small,.catalogue-context-filter-heading,.card-brand) {
    color:var(--sp-content-muted);
}
#trainingPage :is(.train-stat-val small,.train-stat-sub,.train-category-count,.train-mastery-empty) { color:var(--sp-content-muted); }
:where(#cataloguePage,#favoritesPage) .card-badge { color:var(--text-primary)!important; }
#homePage .suggested-category { color:var(--sp-content-muted)!important; }
#trainingPage .train-btn-primary { background:#c81744; color:#fff; }
#homePage .sp-primary-button { background:linear-gradient(115deg,#c81744,#a31340); color:#fff; }
:where(#cataloguePage,#favoritesPage) .sp-catalogue-pro .pro-banner-cta { background:#c81744; color:#fff; }
:where(#cataloguePage,#favoritesPage) .cat-btn.active { background:#245bb4; border-color:#245bb4; color:#fff; }
:where(#cataloguePage,#favoritesPage) .cat-btn.active .cat-count { background:transparent; }
:where(#homePage,#cataloguePage,#favoritesPage,#trainingPage,#detectorPage,#bottomFilterSheet) :is(input,select) { color-scheme:light; }
[data-theme=dark] :where(#homePage,#cataloguePage,#favoritesPage,#trainingPage,#detectorPage,#bottomFilterSheet) :is(input,select) { color-scheme:dark; }
:where(#homePage,#cataloguePage,#favoritesPage,#trainingPage,#detectorPage,#bottomFilterSheet) input::placeholder { color:var(--sp-content-muted); opacity:1; }
:is(#homeSearchInput,#searchInput,#catalogueActivitySearch)::placeholder { color:var(--sp-content-muted); opacity:1; }
#homeSearchForm:focus-within,:where(#cataloguePage,#favoritesPage) .search-bar-inner:focus-within {
    outline:2px solid var(--sp-content-focus); outline-offset:3px;
}
#homeSearchInput { min-height:44px; }
#homePage :is(.sp-home-search-submit,.sp-home-search-clear) { width:44px; height:44px; min-width:44px; }
#homePage :is(.sp-suggestion-pause,.sp-suggested-open,.suggested-prev-btn,.suggested-next-btn,.sp-preferred-os) { min-height:44px; }
:where(#cataloguePage,#favoritesPage) :is(.catalogue-variant-group summary,.sp-activity-expand,.sp-filter-details summary) { min-height:44px; }
:where(#cataloguePage,#favoritesPage) .catalogue-variant-meta { flex-wrap:wrap; }
:where(#cataloguePage,#favoritesPage) .catalogue-variant-meta>small { flex:1 1 90px; min-width:0; }
:where(#cataloguePage,#favoritesPage) .catalogue-variant-actions { flex-wrap:wrap; }
:where(#cataloguePage,#favoritesPage) .catalogue-variant-actions :is(.card-act,.sp-guide-btn) { min-width:44px; min-height:44px; }
:where(#homePage,#cataloguePage,#favoritesPage,#trainingPage,#detectorPage) :is(.card-title,.card-desc,.train-card-title,.train-seg-btn,.train-poolinfo) { overflow-wrap:anywhere; }
#bottomFilterSheet { overscroll-behavior:contain; }
.sp-skip-content {
    position:fixed; left:16px; top:12px; z-index:10000; padding:12px 18px;
    color:#fff; background:#a31340; border:2px solid #fff; border-radius:12px;
    font:inherit; font-weight:700; text-decoration:none; transform:translateY(-160%);
}
.sp-skip-content:focus { transform:none; outline:3px solid #172b4d; outline-offset:3px; }
@media(max-width:699px) {
    :where(#homePage,#cataloguePage,#favoritesPage,#trainingPage,#detectorPage,#bottomFilterSheet) :is(input:not([type=checkbox]):not([type=radio]),select) { font-size:16px; }
    #homePage .sp-home-shortcut { display:none; }
    :where(#cataloguePage,#favoritesPage) .sp-catalogue-scope>button { min-height:44px; }
    :where(#cataloguePage,#favoritesPage) .sp-catalogue-toolbar { flex-wrap:wrap; }
}
@media(prefers-reduced-motion:reduce) {
    :where(#homePage,#cataloguePage,#favoritesPage,#trainingPage,#detectorPage,#bottomFilterSheet) *,
    :where(#homePage,#cataloguePage,#favoritesPage,#trainingPage,#detectorPage,#bottomFilterSheet) *::before,
    :where(#homePage,#cataloguePage,#favoritesPage,#trainingPage,#detectorPage,#bottomFilterSheet) *::after {
        animation:none!important; transition:none!important; scroll-behavior:auto!important;
    }
    :where(#cataloguePage,#favoritesPage) :is(.shortcut-card,.stat-tile) { opacity:1; transform:none; }
    #homePage .suggested-content { opacity:1!important; transform:none!important; }
}
@media(prefers-reduced-transparency:reduce) {
    :where(#homePage,#cataloguePage,#favoritesPage,#trainingPage,#detectorPage)
    :is(.chart-hero-section,.sidebar-section,.sp-home-tool,.suggested-section,.info-badge,.no-results,.train-card,.train-stat,.detector-hero,.sp-home-search,.search-bar-inner) {
        background:#f8f9fd; backdrop-filter:none; -webkit-backdrop-filter:none;
    }
    [data-theme=dark] :where(#homePage,#cataloguePage,#favoritesPage,#trainingPage,#detectorPage)
    :is(.chart-hero-section,.sidebar-section,.sp-home-tool,.suggested-section,.info-badge,.no-results,.train-card,.train-stat,.detector-hero,.sp-home-search,.search-bar-inner) { background:#192236; }
}
@media(forced-colors:active) {
    :where(#homePage,#cataloguePage,#favoritesPage,#trainingPage,#detectorPage,#bottomFilterSheet) { --sp-content-focus:Highlight; --sp-content-muted:CanvasText; }
    :where(#homePage,#cataloguePage,#favoritesPage,#trainingPage,#detectorPage)
    :is(.shortcut-card,.chart-hero-section,.sidebar-section,.sp-home-tool,.suggested-section,.train-card,.train-stat,.detector-hero,.no-results) { border:1px solid CanvasText; box-shadow:none; backdrop-filter:none; }
    :where(#cataloguePage,#favoritesPage) :is(.cat-btn.active,.stat-tile.is-active) { border:2px solid Highlight; }
    .sp-skip-content { background:Canvas; color:LinkText; border-color:CanvasText; }
}
@media print { .sp-skip-content { display:none; } }
