/* Styles partagés des listings et fiches publics migrés : une seule définition
   pour la palette, la recherche, la navigation et les cartes. */
:is(.listing-shell, .detail-shell) {
    --public-paper: #f3f6fc;
    --public-surface: #ffffff;
    --public-ink: #19263d;
    --public-muted: #5c687b;
    --public-line: #dce3ed;
    --public-price: #334f89;
    --public-focus: #4f46e5;
    --public-active: #e8edf8;
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --text-primary: var(--public-ink);
    --text-secondary: var(--public-muted);
    --border-color: var(--public-line);
    background: var(--public-surface);
    color: var(--public-ink);
}
:is(.listing-shell, .detail-shell)::before { display: none; }
:is(.listing-shell, .detail-shell) .navbar { background: var(--public-surface); border-bottom: 1px solid var(--public-line); box-shadow: none; }
:is(.listing-shell, .detail-shell) .nav-link-cta { background: #4f46e5; border-radius: 6px; box-shadow: none; }
:is(.listing-shell, .detail-shell) .nav-link-cta:hover { background: #4338ca; box-shadow: none; transform: none; }
:is(.listing-shell, .detail-shell) .mobile-publish-btn { background: #4f46e5; color: #fff; box-shadow: none; }
:is(.listing-shell, .detail-shell) .mobile-publish-btn:hover { background: #4338ca; box-shadow: none; transform: none; }
:is(.listing-shell, .detail-shell) .avatar-guest { background: var(--public-paper); color: var(--public-price); border: 1px solid var(--public-line); box-shadow: none; }
:is(.listing-shell, .detail-shell) :is(a, button, input, select, summary):focus-visible { outline: 2px solid var(--public-focus); outline-offset: 3px; }

/* Recherche : une seule surface, séparation nette du choix de catégorie. */
:is(.listing-shell, .detail-shell) .classifieds-search-banner { padding: 0.5rem 0; background: var(--public-paper); border-bottom: 1px solid var(--public-line); }
:is(.listing-shell, .detail-shell) .classifieds-search-banner .search-category-container {
    grid-template-columns: minmax(0, 1fr) 250px; gap: 0; padding: 0.25rem;
    border: 1px solid #b4c1d6; border-radius: 8px; background: var(--public-surface); box-shadow: none;
}
:is(.listing-shell, .detail-shell) .classifieds-search-banner .search-bar-inner { min-height: 48px; padding: 0.25rem 0.625rem; border-radius: 4px; background: var(--public-surface); box-shadow: none; }
:is(.listing-shell, .detail-shell) .classifieds-search-banner .search-bar-inner input { color: var(--public-ink); }
:is(.listing-shell, .detail-shell) .classifieds-search-banner .search-bar-inner input::placeholder { color: var(--public-muted); }
:is(.listing-shell, .detail-shell) .classifieds-search-banner .search-bar-inner input:focus { outline: none; box-shadow: none; }
:is(.listing-shell, .detail-shell) .classifieds-search-banner .search-bar-inner:focus-within { box-shadow: 0 0 0 2px var(--public-focus), 0 0 0 4px rgb(79 70 229 / 10%); }
:is(.listing-shell, .detail-shell) .classifieds-search-banner .search-bar-submit { min-height: 40px; border-radius: 5px; padding: 0.5rem 1rem; background: #4f46e5; color: #fff; box-shadow: none; }
:is(.listing-shell, .detail-shell) .classifieds-search-banner .search-bar-submit:hover { background: #4338ca; }
:is(.listing-shell, .detail-shell) .classifieds-search-banner .category-selector-bar {
    min-height: 48px; margin-left: 0.5rem; padding-left: 1rem;
    border-radius: 0; border-left: 1px solid var(--public-line);
    background: var(--public-surface); color: var(--public-ink); box-shadow: none;
}
:is(.listing-shell, .detail-shell) .classifieds-search-banner .category-selector-bar:hover { background: var(--public-paper); transform: none; box-shadow: none; }
:is(.listing-shell, .detail-shell) .classifieds-search-banner .category-selector-current svg { color: var(--public-muted); }
:is(.listing-shell, .detail-shell) .breadcrumb a { color: var(--public-muted); }
:is(.listing-shell, .detail-shell) .breadcrumb a:hover { color: var(--public-price); text-decoration: underline; }

/* Navigation : le titre porte la hiérarchie, la sélection reste identifiable. */
:is(.listing-shell, .detail-shell) .listing-main { min-width: 0; }
:is(.listing-shell, .detail-shell) .listing-sidebar { top: 5.75rem; background: transparent; border-radius: 0; }
:is(.listing-shell, .detail-shell) .category-item a { border-radius: 5px; color: var(--public-ink); }
:is(.listing-shell, .detail-shell) .category-item a:hover { background: var(--public-paper); }
:is(.listing-shell, .detail-shell) .category-item.active > a {
    background: var(--public-active); color: var(--public-ink); font-weight: 600;
    box-shadow: inset 3px 0 var(--public-price);
}
:is(.listing-shell, .detail-shell) .category-item.active > a .category-count { color: var(--public-price); }
:is(.listing-shell, .detail-shell) .category-count { color: var(--public-muted); opacity: 1; }
:is(.listing-shell, .detail-shell) .category-item.in-path > a { color: var(--public-price); }
:is(.listing-shell, .detail-shell) .category-reset { color: var(--public-price); }
:is(.listing-shell, .detail-shell) .classifieds-card { background: var(--public-surface); border: 1px solid var(--public-line); border-radius: 6px; box-shadow: none; transition: border-color 0.15s; }
:is(.listing-shell, .detail-shell) .classifieds-card:hover { border-color: #8c9bc7; box-shadow: none; transform: none; }
/* Un seul anneau au clavier ; le clic souris ne laisse pas de contour persistant. */
@supports selector(:has(*)) {
    :is(.listing-shell, .detail-shell) .classifieds-card:has(> .classifieds-card-link:focus-visible) { border-color: var(--public-line); outline: 2px solid var(--public-focus); outline-offset: 3px; }
    :is(.listing-shell, .detail-shell) .classifieds-card > .classifieds-card-link:focus-visible { outline: none; }
}
:is(.listing-shell, .detail-shell) .classifieds-card-body { padding: 0.875rem; }
:is(.listing-shell, .detail-shell) .classifieds-card-title { font-size: 1rem; line-height: 1.45; min-height: 4.35em; -webkit-line-clamp: 3; overflow-wrap: break-word; }
:is(.listing-shell, .detail-shell) .classifieds-card-price { color: var(--public-price); font-size: 1.0625rem; }
:is(.listing-shell, .detail-shell) .classifieds-card-price.price-on-request { color: var(--public-muted); font-size: 1rem; }
:is(.listing-shell, .detail-shell) .classifieds-card-excerpt { color: var(--public-muted); font-size: 0.8125rem; line-height: 1.55; overflow-wrap: break-word; }
:is(.listing-shell, .detail-shell) .classifieds-card-footer { border-color: var(--public-line); color: var(--public-muted); }
:is(.listing-shell, .detail-shell) .classifieds-badge-new { background: #fff9ed; color: #80521a; border: 1px solid #e8d8b8; border-radius: 4px; font-weight: 600; box-shadow: none; }
:is(.listing-shell, .detail-shell) .classifieds-trust-pill-certified { background: #245daa; color: #fff; }

:is(.listing-shell, .detail-shell) .footer-columns { text-align: left; }
[data-theme="dark"] :is(.listing-shell, .detail-shell) {
    --public-paper: #162136; --public-surface: #101827; --public-ink: #edf2fa;
    --public-muted: #b1bdd0; --public-line: #33425a; --public-price: #b8c9ed;
    --public-focus: #a5b4fc; --public-active: #273556;
    --primary-color: #a5b4fc; --primary-hover: #c7d2fe; --primary-light: #273556;
}
[data-theme="dark"] :is(.listing-shell, .detail-shell) .classifieds-badge-new { background: #332b20; color: #edd3a5; border-color: #6b593b; }
[data-theme="dark"] :is(.listing-shell, .detail-shell) .navbar .btn-primary { background: #4f46e5; color: #fff; }
[data-theme="dark"] :is(.listing-shell, .detail-shell) .classifieds-search-banner .search-category-container { border-color: var(--public-line); }
[data-theme="dark"] :is(.listing-shell, .detail-shell) .classifieds-search-banner :is(.search-bar-inner, .category-selector-bar) { background: var(--public-surface) !important; border: 0 !important; }
[data-theme="dark"] :is(.listing-shell, .detail-shell) .classifieds-search-banner .category-selector-bar { border-left: 1px solid var(--public-line) !important; }
[data-theme="dark"] :is(.listing-shell, .detail-shell) .classifieds-search-banner .search-bar-inner:focus-within { box-shadow: 0 0 0 2px var(--public-focus), 0 0 0 4px rgb(165 180 252 / 12%) !important; }
@media (prefers-reduced-motion: reduce) {
    :is(.listing-shell, .detail-shell) *, :is(.listing-shell, .detail-shell) *::before, :is(.listing-shell, .detail-shell) *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (max-width: 768px) {
    :is(.listing-shell, .detail-shell) .classifieds-search-banner .search-category-container { grid-template-columns: minmax(0, 1fr); }
    :is(.listing-shell, .detail-shell) .classifieds-search-banner .category-selector-bar { border-left: 0; border-top: 1px solid var(--public-line); margin: 0.25rem 0 0; padding: 0.5rem; min-height: 44px; }
    :is(.listing-shell, .detail-shell) .classifieds-search-banner .search-bar-submit { min-height: 44px; }
    [data-theme="dark"] :is(.listing-shell, .detail-shell) .classifieds-search-banner .category-selector-bar { border-left: 0 !important; border-top: 1px solid var(--public-line) !important; }
}
@media (forced-colors: active) {
    :is(.listing-shell, .detail-shell) .classifieds-search-banner .search-bar-inner:focus-within { outline: 2px solid Highlight; outline-offset: 2px; }
}
