/* =============================================================================
   Astrolabe — Widget : Catalogue (jxc-cat-*)
   Titres de section (ornement), is-loading → jxc-shared.css
   ============================================================================= */

/* ── 1. Encart Nouveautés ─────────────────────────────────────────────────────── */

.jxc-cat-nouveautes {
background-color: var(--jxc-bg-dark);
padding: 40px 0 44px;
margin-bottom: 50px;
}

.jxc-cat-nouveautes__inner {
max-width: 1400px;
margin: 0 auto;
padding: 0 20px;
}

.jxc-cat-office-date {
font-family: var(--jxc-font);
font-size: 13px;
letter-spacing: 0.10em;
text-transform: uppercase;
color: rgba(255, 255, 255, 0.55);
margin: -18px 0 20px;
text-align: center;
}

.jxc-cat-nouv-track {
display: flex;
flex-wrap: nowrap;
gap: 20px;
overflow-x: auto;
padding-bottom: 12px;
scroll-snap-type: x mandatory;
-webkit-overflow-scrolling: touch;
}

.jxc-cat-nouv-track::-webkit-scrollbar { height: 5px; }
.jxc-cat-nouv-track::-webkit-scrollbar-track { background: rgba(255,255,255,0.08); }
.jxc-cat-nouv-track::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.30); border-radius: 3px; }

.jxc-cat-nouv-card {
flex: 0 0 150px;
scroll-snap-align: start;
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}

.jxc-cat-nouv-card__cover {
width: 150px;
aspect-ratio: 7 / 10;
object-fit: cover;
border-radius: 3px;
box-shadow: 3px 6px 18px rgba(0, 0, 0, 0.50);
display: block;
transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.jxc-cat-nouv-card__link:hover .jxc-cat-nouv-card__cover {
transform: translateY(-4px);
box-shadow: 5px 12px 28px rgba(0, 0, 0, 0.60);
}

.jxc-cat-nouv-card__body {
padding: 8px 4px 0;
display: flex;
flex-direction: column;
align-items: center;
gap: 3px;
}

.jxc-cat-nouv-card__title {
font-family: var(--jxc-font);
font-size: 13px;
font-weight: 700;
color: #fff;
margin: 0;
line-height: 1.3;
}

.jxc-cat-nouv-card__title a { color: inherit; text-decoration: none; }
.jxc-cat-nouv-card__title a:hover { color: var(--jxc-gold); }

.jxc-cat-nouv-card__serie {
font-family: var(--jxc-font);
font-size: 11px;
color: rgba(255, 255, 255, 0.60);
margin: 0;
}

.jxc-cat-nouv-card__tome {
font-family: var(--jxc-font);
font-size: 11px;
font-weight: 600;
color: var(--jxc-gold);
text-transform: uppercase;
letter-spacing: 0.06em;
}

/* ── 2. Layout : sidebar + résultats ─────────────────────────────────────────── */

.jxc-cat-wrap { padding: 10px 0 60px; }

.jxc-cat-layout {
display: grid;
grid-template-columns: 1fr 280px;
gap: 40px;
align-items: start;
}

.jxc-cat-main  { order: 1; }
.jxc-cat-aside { order: 2; }

/* ── Sidebar ─────────────────────────────────────────────────────────────────── */

.jxc-cat-aside {
position: sticky;
top: 80px;
max-height: calc(100vh - 100px);
overflow-y: auto;
scrollbar-width: thin;
scrollbar-color: rgba(116,46,71,0.2) transparent;
background: #fff;
border: 1px solid var(--jxc-border-light);
border-radius: 8px;
padding: 0 0 8px;
}

.jxc-cat-aside::-webkit-scrollbar { width: 4px; }
.jxc-cat-aside::-webkit-scrollbar-thumb { background: rgba(116,46,71,0.2); border-radius: 4px; }

/* Mobile toggle — masqué sur desktop */
.jxc-cat-aside__toggle { display: none; }

/* ── Recherche dans le sidebar ───────────────────────────────────────────────── */

.jxc-cat-filter-search {
position: relative;
padding: 16px 14px 14px;
border-bottom: 1px solid var(--jxc-border-light);
}

.jxc-cat-filter-search__icon {
position: absolute;
left: 24px;
top: 50%;
transform: translateY(-50%);
color: #bbb;
pointer-events: none;
}

.jxc-cat-search__input {
font-family: var(--jxc-font);
font-size: 14px;
width: 100%;
height: 40px;
padding: 0 32px 0 34px;
border: 1.5px solid #ddd;
border-radius: 6px;
background: #fafafa;
color: var(--jxc-dark);
outline: none;
transition: border-color 0.18s;
box-sizing: border-box;
}

.jxc-cat-search__input:focus {
border-color: var(--jxc-accent);
background: #fff;
box-shadow: 0 0 0 3px rgba(116,46,71,0.10);
}

.jxc-cat-search__input::placeholder { color: #bbb; }

.jxc-cat-search__clear {
position: absolute;
right: 20px;
top: 50%;
transform: translateY(-50%);
background: none;
border: none;
cursor: pointer;
font-size: 18px;
color: #999;
line-height: 1;
padding: 0;
}

.jxc-cat-search__clear:hover { color: var(--jxc-accent); }

/* ── Filtres actifs + reset global ──────────────────────────────────────────── */

.jxc-cat-active-filters {
display: flex;
flex-wrap: wrap;
gap: 6px;
padding: 12px 14px 4px;
}

.jxc-cat-pill {
display: inline-flex;
align-items: center;
gap: 4px;
background: rgba(116,46,71,0.10);
border: 1px solid rgba(116,46,71,0.25);
color: var(--jxc-accent);
font-family: var(--jxc-font);
font-size: 12px;
font-weight: 600;
padding: 3px 8px;
border-radius: 20px;
}

.jxc-cat-pill__remove {
background: none;
border: none;
cursor: pointer;
font-size: 14px;
color: var(--jxc-accent);
line-height: 1;
padding: 0;
margin-left: 2px;
}

.jxc-cat-reset-btn {
display: block;
font-family: var(--jxc-font);
font-size: 12px;
font-weight: 700;
letter-spacing: 0.06em;
text-transform: uppercase;
color: var(--jxc-accent);
background: none;
border: none;
cursor: pointer;
text-decoration: underline;
padding: 6px 14px 10px;
}

.jxc-cat-reset-btn:hover { color: #000000; }

/* ── Filter box ──────────────────────────────────────────────────────────────── */

.jxc-cat-filter-box {
border-top: 1px solid var(--jxc-border-light);
}

.jxc-cat-filter-box__head {
display: flex;
justify-content: space-between;
align-items: center;
padding: 14px 14px 8px;
}

.jxc-cat-filter-box__title {
font-family: var(--jxc-font);
font-size: 12px;
font-weight: 700;
letter-spacing: 0.07em;
text-transform: uppercase;
color: var(--jxc-dark);
margin: 0;
}

.jxc-cat-filter-box__reset {
background: none;
border: none;
cursor: pointer;
color: var(--jxc-ornament);
padding: 2px;
line-height: 1;
border-radius: 3px;
transition: color 0.15s;
}

.jxc-cat-filter-box__reset:hover { color: var(--jxc-accent); }

/* ── Boutons de filtre ───────────────────────────────────────────────────────── */

.jxc-cat-filter-box__list {
list-style: none;
margin: 0;
padding: 0 6px 10px;
}

.jxc-cat-filter-box__list li { margin: 0; }

.jxc-cat-filter-btn {
display: flex;
align-items: center;
gap: 6px;
width: 100%;
padding: 7px 8px;
font-family: var(--jxc-font);
font-size: 14px;
font-weight: 400;
color: var(--jxc-dark);
background: transparent;
border: none;
border-radius: 5px;
cursor: pointer;
text-align: left;
transition: background 0.15s, color 0.15s;
}

.jxc-cat-filter-btn:hover {
background: rgba(116,46,71,0.07);
color: var(--jxc-accent);
}

.jxc-cat-filter-btn.is-active {
background: rgba(116,46,71,0.12);
color: var(--jxc-accent);
font-weight: 700;
}

.jxc-cat-filter-btn__label { flex: 1; }

.jxc-cat-filter-btn__count {
color: var(--jxc-text-muted);
font-size: 12px;
font-weight: 400;
flex-shrink: 0;
margin-left: auto;
}

.jxc-cat-filter-btn.is-active .jxc-cat-filter-btn__count {
color: var(--jxc-accent);
opacity: 0.75;
}

/* Boutons collection avec logo */
.jxc-cat-filter-btn--col { gap: 8px; }

.jxc-cat-filter-btn__logo {
width: 28px;
height: 28px;
object-fit: contain;
border-radius: 3px;
flex-shrink: 0;
}

/* ── Zone de résultats ───────────────────────────────────────────────────────── */

.jxc-cat-main { min-width: 0; }

/* Topbar : titre + compteur + tri + par page */
.jxc-cat-topbar {
display: flex;
justify-content: space-between;
align-items: center;
gap: 16px;
margin-bottom: 20px;
padding-bottom: 16px;
border-bottom: 1px solid var(--jxc-border-light);
flex-wrap: wrap;
}

.jxc-cat-topbar__left {
display: flex;
align-items: baseline;
gap: 12px;
flex-wrap: wrap;
}

.jxc-cat-topbar__right {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
}

.jxc-cat-section-title--inline {
margin: 0;
font-size: 22px;
}

.jxc-cat-results-count {
font-family: var(--jxc-font);
font-size: 14px;
color: var(--jxc-text-muted);
font-weight: 400;
margin: 0;
}

.jxc-cat-select-wrap { position: relative; }

.jxc-cat-sort {
font-family: var(--jxc-font);
font-size: 14px;
height: 40px;
padding: 0 32px 0 12px;
border: 1.5px solid #ddd;
border-radius: 6px;
background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23742E47' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
-webkit-appearance: none;
appearance: none;
cursor: pointer;
color: var(--jxc-dark);
outline: none;
min-width: 200px;
transition: border-color 0.18s;
box-sizing: border-box;
}

.jxc-cat-sort:focus {
border-color: var(--jxc-accent);
box-shadow: 0 0 0 3px rgba(116,46,71,0.10);
}

/* ── Recherche dans une boîte de filtre ("Filtrer la liste") ─────────────── */

.jxc-cat-box-search {
display: block;
width: calc(100% - 28px);
margin: 0 14px 10px;
height: 34px;
padding: 0 10px;
font-family: var(--jxc-font);
font-size: 13px;
border: 1px solid #ddd;
border-radius: 5px;
background: #fafafa;
color: var(--jxc-dark);
outline: none;
box-sizing: border-box;
transition: border-color 0.18s, box-shadow 0.18s;
}

.jxc-cat-box-search:focus {
border-color: var(--jxc-accent);
box-shadow: 0 0 0 2px rgba(116,46,71,0.10);
background: #fff;
}

.jxc-cat-box-search::placeholder { color: #bbb; }

/* ── Sélecteur par page ──────────────────────────────────────────────────── */

.jxc-cat-per-page {
font-family: var(--jxc-font);
font-size: 14px;
height: 40px;
padding: 0 32px 0 12px;
border: 1.5px solid #ddd;
border-radius: 6px;
background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23742E47' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
-webkit-appearance: none;
appearance: none;
cursor: pointer;
color: var(--jxc-dark);
outline: none;
transition: border-color 0.18s;
box-sizing: border-box;
}

.jxc-cat-per-page:focus {
border-color: var(--jxc-accent);
box-shadow: 0 0 0 3px rgba(116,46,71,0.10);
}

/* Topbar : aligner sort + per-page côte à côte */
.jxc-cat-topbar__right {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: wrap;
}

.jxc-cat-grid {
display: grid;
gap: 36px 24px;
}

.jxc-cat-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.jxc-cat-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
.jxc-cat-grid--cols-5 { grid-template-columns: repeat(5, 1fr); }

/* ── Carte produit ────────────────────────────────────────────────────────────── */

.jxc-cat-card { display: flex; flex-direction: column; }

.jxc-cat-card--new .jxc-cat-card__cover-wrap {
outline: 3px solid #F6AD1F;
outline-offset: 3px;
}

.jxc-cat-card__cover-wrap { position: relative; line-height: 0; border-radius: 3px; overflow: hidden; }

.jxc-cat-card__cover {
width: 100%;
aspect-ratio: 7 / 10;
object-fit: cover;
display: block;
box-shadow: 2px 4px 14px rgba(0, 0, 0, 0.18);
transition: transform 0.3s ease;
}

.jxc-cat-card__cover-wrap:hover .jxc-cat-card__cover {
transform: scale(1.06);
}

.jxc-cat-badge {
position: absolute;
top: 8px;
left: 8px;
background-color: #C0392B !important;
color: #fff;
font-family: var(--jxc-font);
font-size: 10px;
font-weight: 700;
letter-spacing: 0.07em;
text-transform: uppercase;
padding: 3px 7px;
border-radius: 3px;
line-height: 1.5;
pointer-events: none;
z-index: 1;
}

.jxc-cat-card__body {
padding: 10px 4px 0;
display: flex;
flex-direction: column;
gap: 3px;
flex: 1;
}

.jxc-cat-card__title {
font-family: var(--jxc-font);
font-size: 16px;
font-weight: 700;
color: var(--jxc-dark);
margin: 0;
line-height: 1.3;
}

.jxc-cat-card__title a { color: inherit; text-decoration: none; }
.jxc-cat-card__title a:hover { color: var(--jxc-accent); }

.jxc-cat-card__serie {
font-family: var(--jxc-font);
font-size: 12px;
color: #777;
margin: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.jxc-cat-card__tome {
font-family: var(--jxc-font);
font-size: 11px;
font-weight: 600;
color: var(--jxc-ornament);
text-transform: uppercase;
letter-spacing: 0.06em;
}

.jxc-cat-card__price {
margin: 4px 0 0;
font-family: var(--jxc-font);
font-size: 13px;
font-weight: 700;
color: var(--jxc-dark);
}

.jxc-cat-card__price .woocommerce-Price-amount { color: var(--jxc-dark); }

/* ── Sentinel / Loader / Empty ───────────────────────────────────────────────── */

.jxc-cat-sentinel { height: 1px; margin-top: 40px; }

.jxc-cat-loader {
display: flex;
justify-content: center;
padding: 30px 0;
}

.jxc-cat-spinner {
display: inline-block;
width: 32px;
height: 32px;
border: 3px solid rgba(33, 33, 33, 0.15);
border-top-color: var(--jxc-accent);
border-radius: 50%;
animation: jxc-spin 0.7s linear infinite;
}

.jxc-cat-empty {
font-family: var(--jxc-font);
font-size: 16px;
color: var(--jxc-text-muted);
text-align: center;
padding: 60px 20px;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */

/* Large : rétréci sidebar */
@media (max-width: 1200px) {
.jxc-cat-layout { grid-template-columns: 240px 1fr; gap: 28px; }
.jxc-cat-grid--cols-5 { grid-template-columns: repeat(4, 1fr); }
}

/* Medium : sidebar collapsée en accordion mobile */
@media (max-width: 960px) {
.jxc-cat-layout { grid-template-columns: 1fr; }

.jxc-cat-aside {
position: static;
max-height: none;
overflow: visible;
margin-bottom: 24px;
}

.jxc-cat-aside__toggle {
display: flex;
justify-content: space-between;
align-items: center;
width: 100%;
padding: 14px 16px;
font-family: var(--jxc-font);
font-size: 14px;
font-weight: 700;
color: var(--jxc-dark);
background: #fff;
border: 1px solid var(--jxc-border-light);
border-radius: 8px;
cursor: pointer;
text-align: left;
}

.jxc-cat-aside__toggle[aria-expanded="true"] {
border-radius: 8px 8px 0 0;
border-bottom-color: transparent;
}

.jxc-cat-aside__chevron { transition: transform 0.22s; }

.jxc-cat-aside__toggle[aria-expanded="true"] .jxc-cat-aside__chevron {
transform: rotate(180deg);
}

.jxc-cat-aside__inner { display: none; border: 1px solid var(--jxc-border-light); border-top: none; border-radius: 0 0 8px 8px; }
.jxc-cat-aside__inner.is-open { display: block; }

.jxc-cat-grid--cols-4,
.jxc-cat-grid--cols-5 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
.jxc-cat-grid--cols-3,
.jxc-cat-grid--cols-4,
.jxc-cat-grid--cols-5 { grid-template-columns: repeat(2, 1fr); }

.jxc-cat-topbar { flex-direction: column; align-items: flex-start; }
.jxc-cat-sort { min-width: 100%; }
}