/* ==========================================================================
   Navigation (en-tete, menu compte, tiroir mobile) — refonte 2026
   Prefixe : nv-   |   Depend des variables de app.css
   ========================================================================== */

.nv {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
    box-shadow: none;
}

.nv-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 72px;
}

.nv-logo {
    flex-shrink: 0;
    font-size: 22px;
    color: var(--secondary);
}

/* ---------- Liens ---------- */
.nv-links {
    display: flex;
    align-items: center;
    gap: 2px;
}

.nv-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
}

.nv-link:hover {
    color: var(--secondary);
    background: var(--bg-app);
}

.nv-link.is-active {
    color: var(--primary-dark);
    background: var(--primary-light);
}

.nv-chevron {
    transition: transform 0.2s;
}

/* ---------- Menu deroulant Vehicules ---------- */
.nv-drop {
    position: relative;
}

.nv-drop-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all 0.18s ease;
    z-index: 120;
}

/* pont invisible entre le lien et le menu pour garder le survol */
.nv-drop::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 10px;
}

.nv-drop.is-open .nv-drop-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.nv-drop.is-open .nv-chevron {
    transform: rotate(180deg);
}

/* Lien « Vehicules » + bouton d'ouverture, dans une seule pastille */
.nv-drop-head {
    display: flex;
    align-items: center;
    border-radius: var(--radius-full);
    transition: background 0.15s;
}

.nv-drop-head:hover {
    background: var(--bg-app);
}

.nv-drop-head.is-active {
    background: var(--primary-light);
}

.nv-drop-head .nv-drop-link,
.nv-drop-head .nv-drop-link:hover,
.nv-drop-head .nv-drop-link.is-active {
    padding-right: 4px;
    background: none;
}

.nv-drop-toggle {
    width: 28px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    padding: 0;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
}

.nv-drop-head.is-active .nv-drop-toggle {
    color: var(--primary-dark);
}

.nv-drop-toggle:hover {
    color: var(--secondary);
}

.nv-drop-toggle:focus-visible,
.nv-avatar:focus-visible,
.nv-icon-btn:focus-visible,
.nv-link:focus-visible,
.nv-drop-menu a:focus-visible,
.nv-account-menu a:focus-visible,
.nv-account-logout:focus-visible,
.mbn-item:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.nv-drop-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    border-radius: 10px;
}

.nv-drop-menu a span {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    background: var(--bg-app);
    border-radius: 10px;
}

.nv-drop-menu a:hover,
.nv-drop-menu a:focus-visible {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.nv-drop-menu .nv-drop-all {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
    border-radius: 0 0 10px 10px;
    font-size: 13px;
    color: var(--primary-dark);
}

/* ---------- Recherche ---------- */
.nv-search {
    flex: 1 1 220px;
    max-width: 360px;
    min-width: 180px;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 16px;
    background: var(--bg-app);
    border: 1.5px solid transparent;
    border-radius: var(--radius-full);
    color: var(--text-muted);
    transition: all 0.18s;
}

.nv-search {
    position: relative;
}

.nv-search:focus-within {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(254, 120, 85, 0.14);
    color: var(--primary);
}

.nv-search input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--text-main);
}

.nv-search input::placeholder {
    color: var(--text-muted);
}

.nv-search input::-webkit-search-cancel-button {
    display: none;
}

/* ---------- Actions ---------- */
.nv-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.nv-icon-btn {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border-radius: 50%;
    transition: all 0.15s;
}

.nv-icon-btn {
    position: relative;
}

.nv-icon-btn:hover,
.nv-icon-btn.is-active {
    color: var(--primary);
    background: var(--primary-light);
}

.nv-icon-btn[hidden] {
    display: none;
}

/* Pastille de compteur (favoris, comparateur) */
.nv-badge {
    position: absolute;
    top: 2px;
    right: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    background: var(--primary-dark);
    border: 2px solid #fff;
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
}

.nv-badge[hidden],
.nv-count[hidden] {
    display: none;
}

/* Compteur affiche a droite d'une entree de menu */
.nv-count {
    margin-left: auto;
    min-width: 22px;
    padding: 2px 8px;
    box-sizing: border-box;
    font-size: 12px;
    font-weight: 800;
    text-align: center;
    color: var(--primary-dark);
    background: var(--primary-light);
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
}

/* Texte reserve aux lecteurs d'ecran (annonces vocales) */
.nv-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.nv-cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 44px;
    margin-left: 6px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 700;
    color: #fff !important;
    background: var(--primary);
    border-radius: var(--radius-full);
    box-shadow: 0 6px 16px rgba(254, 120, 85, 0.3);
    white-space: nowrap;
    transition: all 0.18s;
}

.nv-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(254, 120, 85, 0.38);
}

.nv-login {
    height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 700;
    color: var(--secondary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    transition: all 0.15s;
}

.nv-login:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* ---------- Compte ---------- */
.nv-account {
    position: relative;
    margin-left: 4px;
}

.nv-account::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 10px;
}

.nv-avatar {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    background: var(--secondary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: box-shadow 0.15s;
}

.nv-account.is-open .nv-avatar {
    box-shadow: 0 0 0 4px var(--secondary-light);
}

.nv-avatar-lg {
    width: 46px;
    height: 46px;
    cursor: default;
}

.nv-account-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 272px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all 0.18s ease;
    z-index: 120;
}

.nv-account.is-open .nv-account-menu {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.nv-account-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 14px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--border-light);
}

.nv-account-head div {
    min-width: 0;
}

.nv-account-head strong,
.nv-drawer-user strong {
    display: block;
    font-size: 14px;
    color: var(--secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nv-account-head small,
.nv-drawer-user small {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nv-account-group {
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
}

.nv-account-group:empty {
    display: none;
}

.nv-account-group:last-of-type {
    border-bottom: none;
}

.nv-account-group > a {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 12px;
    box-sizing: border-box;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    border-radius: 10px;
}

.nv-account-group > a:hover,
.nv-account-group > a:focus-visible {
    background: var(--bg-app);
    color: var(--primary-dark);
}

.nv-account-group > a[aria-current="page"] {
    color: var(--primary-dark);
    background: var(--primary-light);
}

.nv-account-menu > a,
.nv-account-logout {
    display: block;
    width: 100%;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    color: var(--text-main);
    background: none;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.nv-account-menu > a:hover {
    background: var(--bg-app);
    color: var(--primary-dark);
}

.nv-account-admin {
    color: var(--primary-dark) !important;
}

.nv-account-menu form {
    margin-top: 0;
    padding-top: 6px;
    border-top: 1px solid var(--border-light);
}

.nv-account-logout {
    color: var(--danger);
}

.nv-account-logout:hover {
    background: #fef2f2;
}

/* Icone de recherche : uniquement sur tablette (le champ complet n'y tient pas) */
.nv-search-link {
    display: none;
}

/* ---------- Recherche mobile ---------- */
.nv-mobile-search {
    display: none;
    padding: 0 0 12px;
}

.nv-mobile-search .nv-search {
    max-width: none;
    margin: 0;
}

/* ---------- Tablette ---------- */
@media (min-width: 769px) and (max-width: 1100px) {
    .nv-bar {
        gap: 10px;
    }

    .nv-link {
        padding: 0 10px;
        font-size: 13px;
    }

    .nv-bar > .nv-search {
        display: none;
    }

    .nv-search-link {
        display: inline-flex;
        margin-left: 0;
    }

    .nv-actions {
        margin-left: auto;
    }

    .nv-hide-sm {
        display: none !important;
    }

    .nv-account.nv-hide-sm,
    .nv-login.nv-hide-sm {
        display: inline-flex !important;
    }
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
    .nv-bar {
        height: 60px;
        gap: 10px;
    }

    .nv-logo {
        font-size: 20px;
    }

    .nv-links,
    .nv-bar > .nv-search,
    .nv-hide-sm,
    .nv-actions .nv-cta,
    #header-favorites-link,
    #header-compare-link {
        display: none !important;
    }

    .nv-actions {
        margin-left: auto;
    }

    .nv-mobile-search {
        display: block;
    }
}

/* ---------- Tiroir mobile ---------- */
.nv-drawer {
    width: min(330px, 88vw);
    padding: 18px 18px 24px;
    border-radius: 24px 0 0 24px;
}

.nv-drawer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.nv-drawer-user {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.nv-drawer-user div {
    min-width: 0;
}

.nv-drawer-close {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.nv-drawer-cta {
    width: 100%;
    justify-content: center;
    margin: 0 0 14px;
}

.nv-drawer-links {
    list-style: none;
    display: grid;
    gap: 2px;
    margin: 0 0 6px;
    padding: 0;
    flex: none;
}

.nv-drawer-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 14px 0 4px;
    padding: 0 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.nv-drawer-title .nv-count {
    margin-left: 0;
    text-transform: none;
    letter-spacing: 0;
}

.nv-drawer-small a {
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.nv-drawer-foot {
    margin-top: auto;
}

.nv-drawer-links a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 7px 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    border-radius: 14px;
}

.nv-drawer-links a:hover,
.nv-drawer-links a.is-active {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.nv-drawer-ico {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: var(--bg-app);
    border-radius: 12px;
}

.nv-drawer-links a.is-active .nv-drawer-ico {
    background: #fff;
}

.nv-drawer-foot {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border-light);
}

.nv-drawer-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    color: var(--secondary);
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
}

.nv-drawer-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.nv-drawer-logout {
    color: var(--danger);
}

/* ---------- Compteurs du tiroir et de la barre basse ---------- */
.nv-drawer-links a .nv-count {
    margin-left: auto;
}

.nv-drawer-btn[aria-current="page"] {
    color: var(--primary-dark);
    border-color: var(--primary);
    background: var(--primary-light);
}

.mbn-ico {
    position: relative;
    display: inline-flex;
}

.mbn-ico .nv-badge {
    top: -6px;
    right: -10px;
    border-color: #fff;
}

/* ---------- Fil d'Ariane ---------- */
.bc {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.bc ol {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.bc li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.bc a {
    color: var(--text-secondary);
    font-weight: 600;
    border-radius: 4px;
}

.bc a:hover {
    color: var(--primary);
}

.bc a:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.bc svg {
    flex-shrink: 0;
}

.bc [aria-current="page"] {
    max-width: 38ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--secondary);
    font-weight: 600;
}

@media (max-width: 768px) {
    .bc {
        margin-bottom: 12px;
    }

    .bc [aria-current="page"] {
        max-width: 22ch;
    }
}

/* ---------- Suggestions de recherche ---------- */
.ss-pop {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 100%;
    width: max(100%, 320px);
    max-height: min(70vh, 420px);
    overflow-y: auto;
    padding: 6px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 130;
}

.ss-pop[hidden] {
    display: none;
}

.ss-head {
    padding: 10px 12px 4px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.ss-opt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    border-radius: 10px;
    cursor: pointer;
}

.ss-opt:hover,
.ss-opt[aria-selected="true"] {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.ss-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ss-hint {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.ss-clear {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 9px 12px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    text-align: left;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-top: 1px solid var(--border-light);
    border-radius: 0 0 10px 10px;
    cursor: pointer;
}

.ss-clear:hover {
    color: var(--danger);
}

@media (max-width: 768px) {
    .ss-pop {
        width: 100%;
    }
}

/* ---------- Menu Vehicules en colonnes ---------- */
.nv-mega {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr;
    gap: 4px 14px;
    width: min(680px, 92vw);
    padding: 14px;
}

.nv-mega-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.nv-mega-title {
    margin: 0 0 4px;
    padding: 0 12px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.nv-mega-brands a {
    padding: 8px 12px;
    font-weight: 600;
}

.nv-mega .nv-drop-all {
    grid-column: 1 / -1;
}

/* ---------- Pastilles : actions a faire, nombre d'elements d'une rubrique ---------- */
.nv-avatar-btn {
    position: relative;
}

.nv-dot {
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 12px;
    box-sizing: border-box;
    background: var(--primary);
    border: 2px solid #fff;
    border-radius: 50%;
}

.mbn-ico .nv-dot {
    top: -2px;
    right: -3px;
}

/* Liste « A faire » (menu compte et tiroir) */
.nv-todo a,
.nv-drawer-todo a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    background: #fff7ed;
    border-radius: 10px;
}

.nv-todo a + a,
.nv-drawer-todo a + a {
    margin-top: 4px;
}

.nv-todo a:hover,
.nv-drawer-todo a:hover {
    background: #ffedd5;
    color: var(--primary-dark);
}

.nv-todo-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

.nv-drawer-todo {
    margin: 0 0 8px;
}

/* ---------- Invitation avant de deposer (visiteurs) ---------- */
.dg {
    margin: auto; /* la feuille de style globale remet les marges a zero : sans cela le dialogue colle en haut a gauche */
    width: min(400px, calc(100vw - 32px));
    padding: 26px 24px 22px;
    box-sizing: border-box;
    color: var(--text-main);
    background: #fff;
    border: none;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.dg::backdrop {
    background: rgba(15, 23, 42, 0.55);
}

.dg h2 {
    margin: 0 0 4px;
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--secondary);
}

.dg-lead {
    margin: 0 0 18px;
    font-size: 14px;
    color: var(--text-secondary);
}

.dg-close {
    position: absolute;
    top: 10px;
    right: 10px;
}

.dg-close button {
    width: 40px;
    height: 40px;
    font-size: 24px;
    line-height: 1;
    color: var(--text-muted);
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.dg-close button:hover {
    background: var(--bg-app);
}

.dg-steps {
    display: grid;
    gap: 12px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

.dg-steps li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.dg-steps li > span {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: var(--primary-dark);
    background: var(--primary-light);
    border-radius: 50%;
}

.dg-steps strong {
    display: block;
    font-size: 14px;
    color: var(--secondary);
}

.dg-steps small {
    font-size: 13px;
    color: var(--text-secondary);
}

.dg-actions {
    display: grid;
    gap: 8px;
}

.dg-actions form {
    margin: 0;
}

.dg-go {
    justify-content: center;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
}

.dg-later {
    width: 100%;
    padding: 11px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    background: none;
    border: none;
    border-radius: 999px;
    cursor: pointer;
}

.dg-later:hover {
    color: var(--secondary);
    background: var(--bg-app);
}

.dg button:focus-visible,
.dg a:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* ---------- Feuille « Categories » (barre du bas) ---------- */
.cs {
    width: 100%;
    max-width: none;
    margin: auto 0 0;
    padding: 18px 16px calc(20px + env(safe-area-inset-bottom));
    box-sizing: border-box;
    color: var(--text-main);
    background: #fff;
    border: none;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.25);
}

.cs::backdrop {
    background: rgba(15, 23, 42, 0.5);
}

.cs[open] {
    animation: cs-up 0.22s ease-out;
}

@keyframes cs-up {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: none; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .cs[open] { animation: none; }
}

.cs-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cs-head h2 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 20px;
    color: var(--secondary);
}

.cs-head form {
    margin: 0;
}

.cs-close {
    width: 44px;
    height: 44px;
    font-size: 26px;
    line-height: 1;
    color: var(--text-muted);
    background: var(--bg-app);
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

.cs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.cs-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 6px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    color: var(--secondary);
    background: var(--bg-app);
    border-radius: 14px;
}

.cs-tile > span:first-child {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: #fff;
    border-radius: 12px;
}

.cs-sub {
    margin: 18px 0 8px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.cs-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cs-chips a {
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary);
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: 999px;
}

.cs a:focus-visible,
.cs button:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}
