/* ================================================================
   CDTP — shop.css
   Boutique : banner + filterbar sticky + grille + cards + drawer + overrides WC
   Dépend de : tokens.css, global.css
   Phase 4
   ================================================================ */


/* ══════════════════════════════════════════════════════════════
   0. BANNER BOUTIQUE  (boutique/banner.jsx)
   ══════════════════════════════════════════════════════════════ */

.cdtp-boutique-banner {
    position: relative;
    padding: 48px 32px;
    border-bottom: 1px solid var(--ink-700);
}

.cdtp-boutique-banner__inner {
    position: relative;
    max-width: 1320px;
    margin: 0 auto;
}

.cdtp-boutique-crumbs {
    display: flex;
    gap: 10px;
    align-items: baseline;
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fg-3);
    margin-bottom: 32px;
}

.cdtp-boutique-crumbs__link {
    color: var(--paper-200);
    text-decoration: none;
}
.cdtp-boutique-crumbs__link:hover { color: var(--paper-100); }
.cdtp-boutique-crumbs__sep      { color: var(--ink-500); }
.cdtp-boutique-crumbs__current  { color: var(--paper-100); font-weight: 700; }
.cdtp-boutique-crumbs__all      { color: var(--blood-300); margin-left: auto; }

.cdtp-boutique-banner__title-row {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 48px;
    align-items: end;
}

.cdtp-boutique-banner__title {
    font-family: var(--font-blackletter);
    font-weight: 400;
    font-size: clamp(56px, 8vw, 116px);
    line-height: 0.92;
    margin: 0 0 4px -4px;
    color: var(--paper-100);
    text-shadow: 5px 5px 0 var(--ink-1000);
    letter-spacing: 0.005em;
}

.cdtp-boutique-banner__script {
    font-family: var(--font-script);
    font-size: 44px;
    line-height: 1;
    color: var(--paper-100);
    margin: 4px 0 0 4px;
    transform: rotate(-2deg);
}

.cdtp-boutique-banner__lead {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.6;
    color: var(--fg-1);
    margin: 0;
    padding-left: 18px;
    border-left: 2px solid var(--blood-500);
    text-wrap: pretty;
}

.cdtp-boutique-banner__lead-dot {
    color: var(--blood-500);
    margin-right: 6px;
    font-weight: 700;
}

.cdtp-boutique-banner__lead-em {
    font-style: normal;
    color: var(--paper-100);
    font-weight: 700;
}

@media (max-width: 768px) {
    .cdtp-boutique-banner { padding: 32px 16px; }
    .cdtp-boutique-banner__title-row { grid-template-columns: 1fr; gap: 24px; }
    .cdtp-boutique-banner__script { font-size: 32px; }
    .cdtp-boutique-crumbs { margin-bottom: 20px; }
    .cdtp-boutique-crumbs__all { display: none; }
}


/* ══════════════════════════════════════════════════════════════
   1. FILTERBAR STICKY  (boutique/filters.jsx)
   ══════════════════════════════════════════════════════════════ */

.cdtp-filterbar {
    position: sticky;
    top: 64px;
    z-index: 30;
    background: rgba(10, 8, 7, 0.92);
    backdrop-filter: blur(14px) saturate(120%);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    border-top: 1px solid var(--ink-700);
    border-bottom: 1px solid var(--ink-700);
    padding: 14px 32px;
}

.cdtp-filterbar-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.cdtp-filterbar-chip {
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.04em;
    padding: 8px 14px;
    background: transparent;
    color: var(--paper-100);
    border: 1px solid var(--ink-600);
    border-radius: 999px;
    cursor: pointer;
    transition: all 120ms cubic-bezier(0.16, 0.84, 0.30, 1);
    line-height: 1;
}

.cdtp-filterbar-chip:hover { border-color: var(--ink-500); }

.cdtp-filterbar-chip.is-active {
    background: var(--blood-600);
    border-color: var(--blood-700);
    color: var(--paper-100);
    box-shadow: var(--shadow-action);
}

.cdtp-filterbar-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 4px;
}

.cdtp-filterbar-count {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--blood-300);
    margin-right: auto;
}

.cdtp-filterbar-density { display: none; }

.cdtp-filterbar-sort {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 12px;
    border: 1px solid var(--ink-600);
    border-radius: 999px;
}

.cdtp-filterbar-sort-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fg-3);
    white-space: nowrap;
}

.cdtp-filterbar-sort-select {
    background: transparent;
    color: var(--paper-100);
    border: 0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    padding-right: 16px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--paper-300) 50%),
        linear-gradient(135deg, var(--paper-300) 50%, transparent 50%);
    background-position: calc(100% - 6px) center, calc(100% - 2px) center;
    background-size: 4px 4px, 4px 4px;
    background-repeat: no-repeat;
}

.cdtp-filterbar-sort-select option {
    background: var(--ink-900);
    color: var(--paper-100);
}

@media (max-width: 768px) {
    .cdtp-filterbar { padding: 10px 16px; top: 56px; }
    .cdtp-filterbar-chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 6px;
        margin-bottom: 10px;
    }
    .cdtp-filterbar-chips::-webkit-scrollbar { display: none; }
    .cdtp-filterbar-chip {
        scroll-snap-align: start;
        flex-shrink: 0;
        font-size: 11px;
        padding: 7px 12px;
    }
    .cdtp-filterbar-controls { gap: 10px; }
    .cdtp-filterbar-count { font-size: 10px; }
    .cdtp-filterbar-sort-label { display: none; }
    .cdtp-filterbar-sort { padding: 4px 8px; }
}


/* ══════════════════════════════════════════════════════════════
   2. GRILLE PRODUITS  (boutique/grid.jsx)
   ══════════════════════════════════════════════════════════════ */

/* Override grille WC — density comfortable = 4 colonnes */
.woocommerce ul.products,
ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 20px !important;
    list-style: none !important;
    padding: 0 32px !important;
    margin: 24px auto !important;
    max-width: 1320px !important;
}

@media (max-width: 1024px) {
    .woocommerce ul.products, ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .woocommerce ul.products, ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        padding: 0 16px !important;
        gap: 12px !important;
    }
}

@media (max-width: 480px) {
    .woocommerce ul.products, ul.products {
        grid-template-columns: 1fr !important;
    }
}

/* Reset li WC */
.woocommerce ul.products li.product,
ul.products li.product {
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    width: auto !important;
}

/* En-têtes de section pins / stickers */
.cdtp-section-label {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 32px;
    max-width: 1320px;
    margin: 24px auto 28px;
    padding: 0 32px 20px;
    border-bottom: 1px dashed var(--ink-700);
}

.cdtp-section-label__title {
    font-family: var(--font-blackletter);
    font-weight: 400;
    font-size: 56px;
    line-height: 0.95;
    letter-spacing: 0.005em;
    color: var(--paper-100);
    margin: 0;
    text-shadow: 4px 4px 0 var(--ink-1000);
}

.cdtp-section-label__script {
    font-family: var(--font-script);
    font-size: 28px;
    line-height: 1;
    color: var(--paper-200);
    margin: 4px 0 0 8px;
    transform: rotate(-2deg);
}

.cdtp-section-label__amp {
    font-family: var(--font-amp);
    font-style: italic;
    color: var(--blood-500);
    margin-right: 6px;
}

.cdtp-section-label__count {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blood-300);
    padding-bottom: 12px;
}

/* Note du grenier */
.cdtp-boutique-note {
    max-width: 1320px;
    margin: 88px auto 0;
    padding: 28px 32px;
    background: var(--ink-800);
    border: 1px solid var(--ink-700);
    border-left: 3px solid var(--blood-500);
}

.cdtp-boutique-note p {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 1.7;
    color: var(--fg-1);
    max-width: 720px;
}

.cdtp-boutique-note__head {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--blood-500);
    font-weight: 700;
}

@media (max-width: 768px) {
    .cdtp-section-label { padding: 0 16px 16px; }
    .cdtp-section-label__title { font-size: 40px; }
    .cdtp-boutique-note { margin-top: 48px; padding: 20px 16px; }
}


/* ══════════════════════════════════════════════════════════════
   3. CARD PRODUIT — density: comfortable  (shared/product-card.jsx)
   ══════════════════════════════════════════════════════════════ */

.cdtp-product-card {
    position: relative;
    background: var(--ink-800);
    border: 1px solid var(--ink-700);
    box-shadow: 0 24px 60px -28px rgba(0,0,0,0.9), inset 0 1px 0 rgba(255,255,255,0.03);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: transform 120ms cubic-bezier(0.16,0.84,0.30,1), border-color 120ms;
}

.cdtp-product-card:hover {
    transform: translateY(-2px);
    border-color: var(--ink-600);
}

.cdtp-product-card__photo {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--ink-1000);
    overflow: hidden;
}

.cdtp-product-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 300ms cubic-bezier(0.16,0.84,0.30,1);
}

.cdtp-product-card:hover .cdtp-product-card__img {
    transform: scale(1.03);
}

.cdtp-product-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    padding: 5px 9px;
    line-height: 1;
}

.cdtp-product-card__sold-stamp {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    pointer-events: none;
    background: rgba(10,8,7,0.62);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--paper-300);
}

.cdtp-product-card__body {
    padding: 20px 22px 22px;
    display: grid;
    gap: 10px;
    flex: 1;
}

.cdtp-product-card__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 22px;
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--paper-100);
    margin: 0;
}

.cdtp-product-card__desc {
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 1.5;
    color: var(--fg-2);
    margin: 0;
}

.cdtp-product-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fg-3);
    padding-top: 8px;
    border-top: 1px dashed var(--ink-700);
}

.cdtp-product-card__price {
    color: var(--paper-100);
    font-size: 14px;
    font-weight: 700;
}

.cdtp-product-card__cta {
    margin-top: 4px;
    width: 100%;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 12px 14px;
    cursor: pointer;
    background: transparent;
    color: var(--paper-100);
    border: 1px solid var(--ink-500);
    border-radius: 2px;
    transition: all 120ms cubic-bezier(0.16,0.84,0.30,1);
}

.cdtp-product-card__cta:hover:not(:disabled) {
    background: var(--blood-600);
    border-color: var(--blood-500);
}

.cdtp-product-card__cta.is-added {
    background: var(--blood-600);
    border-color: var(--blood-500);
}

.cdtp-product-card__cta--sold {
    color: var(--fg-3);
    border-style: dashed;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .cdtp-product-card__title { font-size: 18px; }
    .cdtp-product-card__body  { padding: 14px 16px 16px; gap: 8px; }
}


/* ══════════════════════════════════════════════════════════════
   4. DRAWER PRODUIT  (shared/product-drawer.jsx)
   ══════════════════════════════════════════════════════════════ */

.cdtp-drawer-scrim {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(10,8,7,0.72);
    backdrop-filter: blur(8px) saturate(110%);
    -webkit-backdrop-filter: blur(8px) saturate(110%);
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
}

.cdtp-drawer-scrim.is-open {
    opacity: 1;
    pointer-events: all;
}

/* ── Desktop : panneau latéral ── */
.cdtp-drawer-desktop {
    width: min(560px, 100vw);
    height: 100vh;
    background: var(--ink-900);
    border-left: 1px solid var(--ink-700);
    box-shadow: -30px 0 80px -20px rgba(0,0,0,0.85);
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    transform: translateX(100%);
    transition: transform 250ms cubic-bezier(0.16,0.84,0.30,1);
}

.cdtp-drawer-scrim.is-open .cdtp-drawer-desktop {
    transform: translateX(0);
}

.cdtp-drawer-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 4;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    background: rgba(20,17,15,0.85);
    color: var(--paper-100);
    border: 1px solid var(--ink-600);
    border-radius: 999px;
    cursor: pointer;
    backdrop-filter: blur(6px);
    font-size: 18px;
    line-height: 1;
    transition: background 120ms;
}

.cdtp-drawer-close:hover { background: var(--ink-700); }

.cdtp-drawer-hero {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--ink-1000);
    border-bottom: 1px solid var(--ink-700);
    overflow: hidden;
}

.cdtp-drawer-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cdtp-drawer-hero__spot {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse 75% 65% at 50% 40%, rgba(246,241,234,0.20) 0%, transparent 65%);
    mix-blend-mode: screen;
}

.cdtp-drawer-content {
    padding: 32px 36px 64px;
    display: grid;
    gap: 18px;
}

.cdtp-drawer-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.cdtp-drawer-cats {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--blood-500);
    text-transform: lowercase;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cdtp-drawer-edition {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    color: var(--paper-300);
    text-transform: uppercase;
    border: 1px dashed var(--ink-600);
    padding: 4px 8px;
    white-space: nowrap;
}

.cdtp-drawer-title {
    font-family: var(--font-blackletter);
    font-weight: 400;
    font-size: 56px;
    line-height: 0.95;
    letter-spacing: 0.01em;
    color: var(--paper-100);
    margin: 0;
    text-shadow: 4px 4px 0 var(--ink-1000);
}

.cdtp-drawer-kind {
    margin: 0 0 4px 0;
    font-family: var(--font-script);
    font-size: 30px;
    color: var(--paper-100);
    line-height: 1;
}

.cdtp-drawer-desc {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.65;
    color: var(--fg-1);
    margin: 4px 0 0 0;
}

.cdtp-drawer-specs {
    margin: 16px 0 8px;
    padding: 0;
    border-top: 1px dashed var(--ink-700);
}

.cdtp-drawer-spec-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    padding: 12px 0;
    border-bottom: 1px dashed var(--ink-700);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cdtp-drawer-spec-row dt { color: var(--fg-3); margin: 0; }
.cdtp-drawer-spec-row dd { color: var(--paper-100); margin: 0; font-weight: 700; }

.cdtp-drawer-actions {
    display: grid;
    gap: 12px;
    margin-top: 8px;
}

.cdtp-drawer-cta {
    width: 100%;
    padding: 18px 24px;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: var(--blood-600);
    color: var(--paper-100);
    border: 1px solid var(--blood-700);
    border-radius: 999px;
    cursor: pointer;
    box-shadow: var(--shadow-action);
    transition: all 120ms cubic-bezier(0.16,0.84,0.30,1);
}

.cdtp-drawer-cta:hover:not(:disabled) { background: var(--blood-500); }

.cdtp-drawer-cta.is-added {
    background: var(--ink-800);
    border-color: var(--ink-600);
    box-shadow: none;
}

.cdtp-drawer-cta.is-sold {
    background: var(--ink-800);
    border-color: var(--ink-600);
    color: var(--fg-2);
    cursor: not-allowed;
    box-shadow: none;
}

.cdtp-drawer-note {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--fg-2);
    line-height: 1.5;
}

.cdtp-drawer-note-script {
    font-family: var(--font-script);
    font-size: 20px;
    color: var(--paper-100);
    margin-left: 6px;
}

/* ── Mobile : modale slide-up ── */
.cdtp-drawer-mobile {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 91;
    flex-direction: column;
    background: var(--ink-900);
    transform: translateY(100%);
    transition: transform 300ms cubic-bezier(0.16,0.84,0.30,1);
}

.cdtp-drawer-mobile.is-open { transform: translateY(0); }

.cdtp-drawer-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--ink-700);
    position: sticky;
    top: 0;
    background: var(--ink-900);
    z-index: 2;
}

.cdtp-drawer-mobile-title {
    font-family: var(--font-blackletter);
    font-weight: 400;
    font-size: 22px;
    color: var(--paper-100);
    letter-spacing: 0.01em;
}

.cdtp-drawer-mobile-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.cdtp-drawer-mobile-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--ink-700);
    background: var(--ink-900);
}

@media (max-width: 768px) {
    .cdtp-drawer-desktop { display: none; }
    .cdtp-drawer-mobile  { display: flex; }
    .cdtp-drawer-content { padding: 24px 20px 32px; }
    .cdtp-drawer-title   { font-size: 40px; }
}


/* ══════════════════════════════════════════════════════════════
   5. OVERLAY CHARGEMENT AJAX
   ══════════════════════════════════════════════════════════════ */

.cdtp-shop-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10,8,7,0.55);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: all;
    transition: opacity 150ms ease;
}

.cdtp-shop-loading-overlay .cdtp-loader { display: flex; gap: 6px; }

.cdtp-shop-loading-overlay .cdtp-loader span {
    width: 8px;
    height: 8px;
    background: var(--blood-400);
    border-radius: 50%;
    animation: cdtpBounce 1.1s infinite;
}

.cdtp-shop-loading-overlay .cdtp-loader span:nth-child(2) { animation-delay: 0.18s; }
.cdtp-shop-loading-overlay .cdtp-loader span:nth-child(3) { animation-delay: 0.36s; }

@keyframes cdtpBounce {
    0%, 80%, 100% { transform: scale(0.75); opacity: 0.5; }
    40%           { transform: scale(1.15); opacity: 1; }
}


/* ══════════════════════════════════════════════════════════════
   6. OVERRIDES WOOCOMMERCE
   ══════════════════════════════════════════════════════════════ */

.woocommerce-ordering,
.woocommerce-result-count { display: none !important; }

.woocommerce .products, ul.products { position: relative; }

/* Masquer les boutons natifs WC sur les cards */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button { display: none !important; }

.cdtp-no-results {
    text-align: center;
    padding: 60px 20px;
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--fg-3);
}

/* Alias — span matière dans .cdtp-product-card__meta */
.cdtp-product-card__material {
    color: var(--fg-3);
}


/* ══════════════════════════════════════════════════════════════
   7. CORRECTIONS VISUELLES BOUTIQUE
   ══════════════════════════════════════════════════════════════ */

/* Fix 1 — Masquer hero-section Blocksy (titre natif "Boutique") et header WC vide */
.woocommerce .hero-section[data-type="type-2"],
.woocommerce-products-header {
    display: none !important;
}

/* Fix 2 — Filterbar pleine largeur : casser le ct-container Blocksy
   Le ct-container impose max-width + padding latéral.
   On utilise margin négatifs + left/right 0 pour sortir du flux du container
   et couvrir tout le viewport, tout en gardant position: sticky opérationnel. */
.cdtp-filterbar {
    margin-left: calc(-1 * var(--theme-container-edge-spacing, 5vw));
    margin-right: calc(-1 * var(--theme-container-edge-spacing, 5vw));
    width: 100vw;
    max-width: 100vw;
    position: sticky;
    left: 0;
}

/* Fix 3 — Filterbar 2 rangées : types + thématiques */

/* Rangée wrapper */
.cdtp-filterbar-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cdtp-filterbar-row--types {
    /* rangée 1 : chips + contrôles côte à côte */
    flex-wrap: wrap;
}

.cdtp-filterbar-row--tags {
    /* rangée 2 : chips thématiques seules, séparées par un séparateur discret */
    border-top: 1px solid var(--ink-700);
    margin-top: 10px;
    padding-top: 10px;
}

/* Chips thématiques — style légèrement distinct (plus petites, couleur différente) */
.cdtp-filterbar-chip--tag {
    font-size: 11px;
    padding: 6px 12px;
    border-color: var(--ink-500);
    color: var(--fg-2);
}

.cdtp-filterbar-chip--tag:hover {
    border-color: var(--ink-400);
    color: var(--paper-100);
}

.cdtp-filterbar-chip--tag.is-active {
    background: var(--ink-700);
    border-color: var(--ink-600);
    color: var(--paper-100);
    box-shadow: none;
}

@media (max-width: 768px) {
    .cdtp-filterbar-row { gap: 10px; }
    .cdtp-filterbar-chips--tags {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .cdtp-filterbar-chips--tags::-webkit-scrollbar { display: none; }
}


/* ══════════════════════════════════════════════════════════════
   8. PAGINATION — override ct-pagination Blocksy
   ══════════════════════════════════════════════════════════════ */

.ct-pagination {
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 48px 32px 32px;
    flex-wrap: wrap;
    width: 100%;
}

/* Conteneur des numéros (Blocksy wrappe dans .ct-hidden-sm sur desktop) */
.ct-pagination .ct-hidden-sm {
    display: flex !important;
    align-items: center;
    gap: 6px;
}

/* Base commune : numéros + prev/next */
.ct-pagination .page-numbers {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    font-family: var(--font-mono) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--paper-200) !important;
    background: var(--ink-800) !important;
    border: 1px solid var(--ink-700) !important;
    border-radius: 2px !important;
    text-decoration: none !important;
    transition: all 120ms cubic-bezier(0.16, 0.84, 0.30, 1);
    /* Reset Blocksy */
    box-shadow: none !important;
    outline: none;
}

.ct-pagination .page-numbers:hover {
    background: var(--ink-700) !important;
    border-color: var(--ink-600) !important;
    color: var(--paper-100) !important;
}

/* Page active */
.ct-pagination .page-numbers.current {
    background: var(--blood-600) !important;
    border-color: var(--blood-700) !important;
    color: var(--paper-100) !important;
    cursor: default;
}

/* Prev / Next — style outline */
.ct-pagination .page-numbers.prev,
.ct-pagination .page-numbers.next {
    padding: 0 14px;
    border-color: var(--ink-600) !important;
    color: var(--paper-100) !important;
    gap: 6px;
}

/* Masquer le SVG Blocksy dans next/prev et remplacer par texte seul */
.ct-pagination .page-numbers.next svg,
.ct-pagination .page-numbers.prev svg {
    display: none !important;
}

/* Dots de continuité */
.ct-pagination .page-numbers.dots {
    background: transparent !important;
    border-color: transparent !important;
    color: var(--fg-3) !important;
    cursor: default;
    pointer-events: none;
}

@media (max-width: 768px) {
    .ct-pagination { padding: 32px 16px 24px; gap: 4px; }
    .ct-pagination .page-numbers { min-width: 32px; height: 32px; font-size: 11px !important; }
}
