/* =====================================================
   CATEGORIE FILTRE — Double axe Type × Zone
   Carnet Catalan Pro
   ===================================================== */

/* ── Page wrapper ───────────────────────────────────── */
.cc-filtre-page {
    padding: 2.5rem 0 5rem;
}

/* ── En-tête ─────────────────────────────────────────── */
.cc-filtre-header {
    margin-bottom: 2.25rem;
}

.cc-filtre-title {
    font-family: var(--font-titres);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: var(--color-ink);
    margin: .75rem 0 .5rem;
    line-height: 1.2;
}

.cc-filtre-desc {
    font-family: var(--font-textes);
    color: #5a6a65;
    font-size: 1.05rem;
    max-width: 640px;
    margin: 0;
    line-height: 1.6;
}

/* ── Barre de filtres ────────────────────────────────── */
.cc-filtre-bar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: #fff;
    border: 1.5px solid #e8e4dd;
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(25, 36, 33, .06);
}

.cc-filtre-group {
    display: flex;
    align-items: center;
    gap: .875rem;
    flex-wrap: wrap;
}

.cc-filtre-group-label {
    font-family: var(--font-textes);
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--color-primary);
    white-space: nowrap;
    min-width: 44px;
}

/* ── Pills ───────────────────────────────────────────── */
.cc-pills {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.cc-pill {
    display: inline-block;
    padding: .375rem .875rem;
    border-radius: 100px;
    font-family: var(--font-textes);
    font-size: .85rem;
    font-weight: 500;
    color: var(--color-ink);
    background: var(--color-paper, #F9F8F6);
    border: 1.5px solid #ddd9d0;
    text-decoration: none;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
    line-height: 1.4;
    cursor: pointer;
}

.cc-pill:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: #eef3f7;
}

.cc-pill.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
    font-weight: 600;
}

/* ── Compteur résultats ──────────────────────────────── */
.cc-filtre-count {
    font-family: var(--font-textes);
    font-size: .85rem;
    color: #8a9e99;
    margin-bottom: 1.5rem;
}

/* ── Grille articles ─────────────────────────────────── */
.cc-filtre-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

/* ── Card ────────────────────────────────────────────── */
.cc-filtre-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(25, 36, 33, .07);
    transition: transform .2s ease, box-shadow .2s ease;
    display: flex;
    flex-direction: column;
}

.cc-filtre-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(25, 36, 33, .14);
}

.cc-filtre-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Image */
.cc-filtre-card-img-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e8e4dd;
    flex-shrink: 0;
}

.cc-filtre-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .38s ease;
}

.cc-filtre-card:hover .cc-filtre-card-img {
    transform: scale(1.05);
}

.cc-filtre-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ddd9d0 0%, #c2baae 100%);
}

/* Badge catégorie */
.cc-filtre-card-badge {
    position: absolute;
    top: .75rem;
    left: .75rem;
    background: var(--color-secondary);
    color: #fff;
    font-family: var(--font-textes);
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    padding: .22rem .6rem;
    border-radius: 4px;
    line-height: 1.4;
}

/* Corps */
.cc-filtre-card-body {
    padding: 1.1rem 1.25rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cc-filtre-card-meta {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-family: var(--font-textes);
    font-size: .75rem;
    color: #9aaca7;
    margin-bottom: .5rem;
}

.cc-filtre-card-title {
    font-family: var(--font-titres);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-ink);
    margin: 0 0 .5rem;
    line-height: 1.4;
}

.cc-filtre-card-excerpt {
    font-family: var(--font-textes);
    font-size: .875rem;
    color: #5a6a65;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

/* ── Pagination ──────────────────────────────────────── */
.cc-filtre-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: 3.5rem;
}

.cc-filtre-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 .8rem;
    border-radius: 8px;
    font-family: var(--font-textes);
    font-size: .875rem;
    font-weight: 500;
    color: var(--color-ink);
    background: #fff;
    border: 1.5px solid #ddd9d0;
    text-decoration: none;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.cc-filtre-pagination .page-numbers:hover,
.cc-filtre-pagination .page-numbers.current {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.cc-filtre-pagination .page-numbers.dots {
    background: none;
    border-color: transparent;
    cursor: default;
}

/* ── État vide ────────────────────────────────────────── */
.cc-filtre-empty {
    text-align: center;
    padding: 5rem 0;
}

.cc-filtre-empty p {
    font-family: var(--font-textes);
    font-size: 1.1rem;
    color: #7a8a85;
    margin-bottom: 1.5rem;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 1100px) {
    .cc-filtre-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.4rem;
    }
}

@media (max-width: 700px) {
    .cc-filtre-bar {
        padding: 1rem 1.1rem;
        gap: .875rem;
    }

    .cc-filtre-group {
        flex-direction: column;
        align-items: flex-start;
        gap: .5rem;
    }

    .cc-filtre-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .cc-filtre-card-img-wrap {
        aspect-ratio: 16 / 9;
    }
}

/* ==========================================================================
   DESIGN PREMIUM v2 — categorie-filtre.css
   ========================================================================== */

/* ── Cards — lift + ombre progressive ──────────────────────────────────── */
.cc-filtre-card {
    transition: transform .28s cubic-bezier(.25,.46,.45,.94), box-shadow .28s ease;
}

.cc-filtre-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(25,36,33,.14);
}

/* ── Card img — overflow + zoom + overlay hover ─────────────────────────── */
.cc-filtre-card-img-wrap {
    overflow: hidden;
    position: relative;
}

.cc-filtre-card-img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(25,36,33,.42) 0%, transparent 55%);
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
}

.cc-filtre-card:hover .cc-filtre-card-img-wrap::after {
    opacity: 1;
}

.cc-filtre-card-img {
    transition: transform .5s cubic-bezier(.25,.46,.45,.94);
}

.cc-filtre-card:hover .cc-filtre-card-img {
    transform: scale(1.06);
}

/* ── Badge box-shadow ───────────────────────────────────────────────────── */
.cc-filtre-badge {
    box-shadow: 0 2px 8px rgba(25,36,33,.18);
    transition: transform .2s ease, box-shadow .2s ease;
}

.cc-filtre-card:hover .cc-filtre-badge {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(25,36,33,.22);
}

/* ── Section header gradient fond ──────────────────────────────────────── */
.cc-filtre-header {
    background: linear-gradient(135deg, #e8f0f5 0%, var(--color-paper) 100%);
    border-radius: 10px;
    padding: 1.6rem 2rem;
    margin-bottom: 1.8rem;
}

/* ── Pills transition cubic-bezier ─────────────────────────────────────── */
.cc-filtre-pill {
    transition: background .22s cubic-bezier(.25,.46,.45,.94),
                color .22s cubic-bezier(.25,.46,.45,.94),
                border-color .22s cubic-bezier(.25,.46,.45,.94),
                transform .22s cubic-bezier(.25,.46,.45,.94),
                box-shadow .22s cubic-bezier(.25,.46,.45,.94);
}

.cc-filtre-pill:hover:not(.is-active) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(56,90,112,.15);
}

.cc-filtre-pill.is-active {
    box-shadow: 0 3px 10px rgba(56,90,112,.25);
}

/* ── État loading pendant le fetch AJAX ────────────────────────────────── */
.cc-filtre-page {
    position: relative;
    transition: opacity .25s ease;
}
.cc-filtre-page.is-loading .cc-filtre-grid,
.cc-filtre-page.is-loading .cc-filtre-count,
.cc-filtre-page.is-loading .cc-filtre-pagination,
.cc-filtre-page.is-loading .cc-filtre-empty {
    opacity: .35;
    pointer-events: none;
    transition: opacity .2s ease;
}
.cc-filtre-page.is-loading::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border: 3px solid rgba(56,90,112,.2);
    border-top-color: var(--color-primary, #385A70);
    border-radius: 50%;
    animation: cc-spin .7s linear infinite;
    z-index: 9999;
}
@keyframes cc-spin {
    to { transform: rotate(360deg); }
}

/* ── Carte en bas d'archive ────────────────────────────────────────────── */
.cc-archive-map {
    margin-top: 4rem;
    padding: 3rem 0 4rem;
    background: linear-gradient(180deg, transparent 0%, #f3f0eb 100%);
}
.cc-archive-map.is-empty {
    display: none;
}
.cc-archive-map-title {
    font-family: 'Merriweather', serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--color-primary, #385A70);
    margin: 0 0 1.5rem;
    text-align: center;
}
.cc-archive-map #cc-map {
    height: 520px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(25,36,33,.12);
    overflow: hidden;
}
@media (max-width: 768px) {
    .cc-archive-map #cc-map { height: 380px; }
}

/* =========================================================
   NAVIGATION D'ARCHIVE — Switch univers + retour parent
   ========================================================= */
.cc-archive-nav {
    background: #fff;
    border-bottom: 1px solid rgba(25, 36, 33, 0.08);
    box-shadow: 0 2px 8px rgba(25, 36, 33, 0.04);
    position: sticky;
    top: 0;
    z-index: 50;
}
.cc-archive-nav-inner {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
}
.cc-archive-nav-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    align-self: flex-start;
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-primary, #385A70);
    text-decoration: none;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    background: rgba(56, 90, 112, 0.08);
    transition: background .2s ease, transform .2s ease;
}
.cc-archive-nav-back:hover {
    background: rgba(56, 90, 112, 0.16);
    transform: translateX(-2px);
}
.cc-archive-nav-cats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.4rem;
}
.cc-archive-nav-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(25, 36, 33, 0.55);
    margin-right: 0.4rem;
}
.cc-archive-nav-link {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-ink, #192421);
    text-decoration: none;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    border: 1px solid rgba(25, 36, 33, 0.12);
    background: #fff;
    transition: all .2s ease;
    white-space: nowrap;
}
.cc-archive-nav-link:hover {
    border-color: var(--color-primary, #385A70);
    color: var(--color-primary, #385A70);
    transform: translateY(-1px);
}
.cc-archive-nav-link.is-current {
    background: var(--color-primary, #385A70);
    border-color: var(--color-primary, #385A70);
    color: #fff;
    box-shadow: 0 2px 8px rgba(56, 90, 112, 0.25);
}
.cc-archive-nav-link.is-current:hover {
    color: #fff;
    transform: translateY(-1px);
}
@media (max-width: 768px) {
    .cc-archive-nav { position: static; }
    .cc-archive-nav-label { width: 100%; margin-bottom: 0.15rem; }
    .cc-archive-nav-cats { gap: 0.4rem; }
    .cc-archive-nav-link { font-size: 0.85rem; padding: 0.4rem 0.8rem; }
}
