/*
 * [2026-08-24] Design partagé du blog Ceramispot.
 *
 * Extrait du gabarit /blog/ pour être réutilisé à l'identique par les pages de catégorie,
 * qui n'avaient jusqu'ici aucun gabarit dédié : WordPress retombait sur le modèle générique
 * du thème parent, sans rapport visuel avec le blog. Un lecteur qui cliquait sur une
 * rubrique changeait de site.
 *
 * Les règles ci-dessous sont copiées sans modification ; les ajouts propres aux pages de
 * catégorie sont regroupés à la fin, sous « SPÉCIFIQUE CATÉGORIE ».
 */

/* ═══════════ BLOG TEMPLATE STYLES ═══════════ */
:root {
    --bg: #faf7f4;
    --bg2: #f3ede6;
    --bg3: #e8ddd2;
    --bg4: #d4c4b0;
    --white: #fff;
    --terra: var(--cs-terracotta, #c96a3a);
    --terra-l: #d97f52;
    --terra-p: #f5e3d8;
    --terra-bg: var(--cs-cream, #fdf6f0);
    --brown: var(--cs-brown-dark, #2d1810);
    --brown-m: var(--cs-brown-mid, #6b4423);
    --stone: #9a8070;
    --text: #2d1a08;
    --text-m: #5a3a20;
    --text-l: #8a6a50;
    --sh: 0 2px 16px rgba(61,37,16,.08);
    --shm: 0 10px 40px rgba(61,37,16,.12);
}

/* ═══════════ HERO ═══════════ */
.cs-blog-hero {
    padding: 44px clamp(16px,4vw,80px) 52px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cs-blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/wp-content/uploads/2026/02/Atelier-poterie-en-famille-a-caen.webp') center/cover;
    opacity: .05;
    pointer-events: none;
}
.cs-blog-hero-inner {
    position: relative;
    z-index: 1;
}
.cs-blog-sec-label {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--terra);
    margin-bottom: 6px;
}
.cs-blog-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(26px, 4.5vw, 38px);
    color: var(--brown);
    margin-bottom: 8px;
    line-height: 1.2;
}
.cs-blog-hero h1 em {
    color: var(--terra);
    font-style: italic;
    font-weight: 400;
}
.cs-blog-hero-sub {
    font-size: 15px;
    color: var(--stone);
    max-width: 480px;
    margin: 0 auto 22px;
    line-height: 1.6;
}

/* ═══════════ LAYOUT ═══════════ */
.cs-blog-layout {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 28px;
    max-width: 1160px;
    margin: 0 auto;
    padding: 24px clamp(16px,3vw,40px) 60px;
}

/* ═══════════ SIDEBAR ═══════════ */
.cs-blog-sidebar {
    position: sticky;
    top: calc(62px + 16px);
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: calc(100vh - 62px - 32px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--bg3) transparent;
    padding-right: 6px;
}
.cs-blog-sidebar::-webkit-scrollbar { width: 3px; }
.cs-blog-sidebar::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 4px; }
.sb-section { border-bottom: 1px solid var(--bg3); }
.sb-section:last-child { border-bottom: none; }
.sb-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    cursor: pointer;
    transition: all .15s;
    border-radius: 8px;
    user-select: none;
}
.sb-head:hover { background: rgba(201,106,58,.04); }
.sb-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: transform .2s;
    background: var(--terra);
}
.sb-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--brown);
    flex: 1;
    line-height: 1.25;
}
.sb-count-badge {
    font-size: 10px;
    color: var(--stone);
    background: var(--bg2);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}
.sb-chevron {
    width: 14px;
    height: 14px;
    stroke: var(--bg4);
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .25s;
    flex-shrink: 0;
}
.sb-section.open .sb-chevron { transform: rotate(90deg); }
.sb-section.open .sb-dot { transform: scale(1.3); }
.sb-links {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
    padding-left: 28px;
}
.sb-section.open .sb-links { max-height: 600px; }
.sb-link {
    display: block;
    padding: 5px 10px;
    font-size: 12px;
    color: var(--text-l);
    border-radius: 6px;
    cursor: pointer;
    transition: all .12s;
    line-height: 1.35;
    margin-bottom: 1px;
    position: relative;
}
.sb-link::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    border-radius: 2px;
    background: var(--terra);
    transition: height .15s;
}
.sb-link:hover { color: var(--terra); background: var(--terra-bg); }
.sb-link:hover::before { height: 14px; }
.sb-link-spacer { height: 6px; }

/* ═══════════ FEATURED ═══════════ */
.cs-blog-featured {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 0;
    border-radius: 16px;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--bg3);
    box-shadow: var(--sh);
    margin-bottom: 32px;
    transition: box-shadow .3s;
}
.cs-blog-featured:hover { box-shadow: var(--shm); }
.cs-blog-featured-img {
    position: relative;
    overflow: hidden;
    min-height: 300px;
}
.cs-blog-featured-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s;
}
.cs-blog-featured:hover .cs-blog-featured-img img { transform: scale(1.03); }
.cs-blog-featured-body {
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.cs-blog-featured-cat {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border-radius: 20px;
    background: var(--terra-bg);
    color: var(--terra);
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 12px;
    width: fit-content;
}
.cs-blog-featured-body h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(19px, 2.2vw, 24px);
    color: var(--brown);
    line-height: 1.25;
    margin-bottom: 8px;
}
.cs-blog-featured-body > p {
    font-size: 13px;
    color: var(--text-m);
    line-height: 1.65;
    margin-bottom: 14px;
}
.cs-blog-featured-meta {
    font-size: 12px;
    color: var(--stone);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.cs-blog-featured-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--terra);
    font-size: 13px;
    font-weight: 700;
    transition: gap .2s;
}
.cs-blog-featured-link:hover { gap: 10px; }

/* ═══════════ CATEGORY SECTIONS ═══════════ */
.cs-blog-cat-section { margin-bottom: 32px; }
.cs-blog-cat-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--bg3);
}
.cs-blog-cs-bar {
    width: 4px;
    height: 22px;
    border-radius: 2px;
    flex-shrink: 0;
    background: var(--terra);
}
.cs-blog-cat-section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    color: var(--brown);
    line-height: 1.2;
}
.cs-blog-cat-section-header .cs-blog-cat-count {
    font-size: 11px;
    color: var(--stone);
    margin-left: auto;
    white-space: nowrap;
}

/* ═══════════ ARTICLES GRID ═══════════ */
.cs-blog-articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.cs-blog-article-card {
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--bg3);
    overflow: hidden;
    transition: all .2s;
    display: block;
    text-decoration: none;
    color: inherit;
}
.cs-blog-article-card:hover {
    border-color: var(--terra-p);
    transform: translateY(-2px);
    box-shadow: var(--sh);
}
.cs-blog-ac-img {
    height: 148px;
    overflow: hidden;
    position: relative;
}
.cs-blog-ac-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s;
}
.cs-blog-article-card:hover .cs-blog-ac-img img { transform: scale(1.04); }
.cs-blog-ac-cat {
    position: absolute;
    top: 9px;
    left: 9px;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(6px);
    font-size: 10px;
    font-weight: 600;
    color: var(--terra);
}
.cs-blog-ac-body {
    padding: 14px 16px 16px;
}
.cs-blog-ac-body h3 {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--brown);
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cs-blog-ac-body p {
    font-size: 11.5px;
    color: var(--stone);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cs-blog-ac-meta {
    margin-top: 7px;
    font-size: 10.5px;
    color: var(--bg4);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ═══════════ SHOW MORE ═══════════ */
.cs-blog-show-more-wrap { text-align: center; margin-top: 14px; }
.cs-blog-show-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 22px;
    border-radius: 30px;
    background: var(--white);
    color: var(--terra);
    font-size: 12px;
    font-weight: 600;
    border: 1.5px solid var(--bg3);
    transition: all .2s;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
}
.cs-blog-show-more-btn:hover { border-color: var(--terra); background: var(--terra-bg); }
.cs-blog-show-more-btn svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    transition: transform .2s;
}
.cs-blog-show-more-btn:hover svg { transform: translateY(2px); }
.cs-blog-show-more-btn.expanded svg { transform: rotate(180deg); }
.cs-blog-show-more-btn.expanded:hover svg { transform: rotate(180deg) translateY(2px); }
.cs-blog-hidden-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 16px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .4s ease, opacity .3s ease, margin .3s ease;
}
.cs-blog-hidden-cards.visible { max-height: 2000px; opacity: 1; }

/* ═══════════ NEWSLETTER ═══════════ */
.cs-blog-newsletter {
    background: linear-gradient(135deg, var(--brown) 0%, #5a3520 100%);
    border-radius: 16px;
    padding: 28px 26px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}
.cs-blog-newsletter::before {
    content: '';
    position: absolute;
    right: -40px;
    top: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(201,106,58,.08);
}
.cs-blog-newsletter::after {
    content: '';
    position: absolute;
    right: 80px;
    bottom: -20px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(201,106,58,.05);
}
.cs-blog-nl-text {
    color: #fff;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}
.cs-blog-nl-text h3 {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    margin-bottom: 4px;
}
.cs-blog-nl-text h3 em {
    color: var(--terra-l);
    font-style: italic;
}
.cs-blog-nl-text p {
    font-size: 12px;
    color: rgba(255,255,255,.5);
    line-height: 1.5;
}
.cs-blog-nl-form {
    position: relative;
    z-index: 1;
}

/* ═══════════ CTA BANNER ═══════════ */
.cs-blog-cta-banner {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    min-height: 170px;
    display: flex;
    align-items: center;
    margin-bottom: 32px;
}
.cs-blog-cta-banner > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cs-blog-cta-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(45,26,8,.92) 0%, rgba(45,26,8,.72) 45%, rgba(45,26,8,.2) 100%);
}
.cs-blog-cta-content {
    position: relative;
    z-index: 1;
    padding: 26px 28px;
    color: #fff;
}
.cs-blog-cta-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    margin-bottom: 5px;
    line-height: 1.25;
}
.cs-blog-cta-content h3 em {
    color: var(--terra-l);
    font-style: italic;
}
.cs-blog-cta-content > p {
    font-size: 12px;
    color: rgba(255,255,255,.5);
    margin-bottom: 12px;
}
.cs-blog-cta-btns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.cs-blog-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 20px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    transition: all .2s;
    text-decoration: none;
}
.cs-blog-cta-primary {
    background: var(--terra);
    color: #fff;
    box-shadow: 0 4px 16px rgba(201,106,58,.3);
}
.cs-blog-cta-primary:hover { background: var(--terra-l); color: #fff; }
.cs-blog-cta-ghost {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255,255,255,.2);
}
.cs-blog-cta-ghost:hover { border-color: #fff; background: rgba(255,255,255,.05); color: #fff; }

/* ═══════════ MOBILE SIDEBAR TOGGLE ═══════════ */
.cs-blog-mob-sidebar-btn {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 600;
    padding: 8px 14px 8px 10px;
    border-radius: 30px;
    border: 1.5px solid var(--bg3);
    background: var(--white);
    box-shadow: 0 2px 12px rgba(0,0,0,.1);
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: var(--brown);
    align-items: center;
    gap: 6px;
    transition: all .18s;
}
.cs-blog-mob-sidebar-btn:hover { border-color: var(--terra); color: var(--terra); }
.cs-blog-mob-sidebar-btn svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
}

/* ═══════════ MOBILE OVERLAY ═══════════ */
.cs-blog-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 700;
    opacity: 0;
    transition: opacity .25s;
}
.cs-blog-sidebar-overlay.show { display: block; opacity: 1; }

/* ═══════════ RESPONSIVE ═══════════ */
@media (max-width: 900px) {
    .cs-blog-mob-sidebar-btn { display: flex; }
    .cs-blog-layout { grid-template-columns: 1fr; gap: 0; padding-top: 16px; }
    .cs-blog-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        width: 270px;
        max-height: 100vh;
        background: var(--white);
        z-index: 800;
        padding: 16px 12px;
        box-shadow: 4px 0 30px rgba(0,0,0,.15);
        transition: left .3s ease;
        border-radius: 0;
    }
    .cs-blog-sidebar.open-mob { left: 0; }
    .cs-blog-sb-close {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 8px 4px 14px;
        border-bottom: 1px solid var(--bg3);
        margin-bottom: 8px;
    }
    .cs-blog-sb-close-label { font-size: 13px; font-weight: 700; color: var(--brown); }
    .cs-blog-sb-close-x {
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        cursor: pointer;
        transition: background .15s;
    }
    .cs-blog-sb-close-x:hover { background: var(--bg2); }
    .cs-blog-sb-close-x svg {
        width: 18px;
        height: 18px;
        stroke: var(--brown);
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
    }
    .cs-blog-featured { grid-template-columns: 1fr; }
    .cs-blog-featured-img { min-height: 200px; }
    .cs-blog-featured-body { padding: 22px 20px; }
    .cs-blog-articles-grid { grid-template-columns: 1fr; }
    .cs-blog-hidden-cards { grid-template-columns: 1fr; }
    .cs-blog-cta-banner::after {
        background: linear-gradient(to bottom, rgba(45,26,8,.15) 0%, rgba(45,26,8,.9) 100%);
    }
    .cs-blog-cta-content { padding: 20px; }
}
@media (max-width: 480px) {
    .cs-blog-hero { padding: 32px 16px 40px; }
    .cs-blog-hero h1 { font-size: 24px; }
    .cs-blog-cta-btns { flex-direction: column; }
    .cs-blog-cta-btn { justify-content: center; }
}
@media (min-width: 901px) {
    .cs-blog-sb-close { display: none !important; }
}


/* ═══════════ SPÉCIFIQUE CATÉGORIE ═══════════ */
.cs-cat-crumbs {
    max-width: 1240px; margin: 0 auto; padding: 18px clamp(16px,4vw,80px) 0;
    font-size: 12.5px; color: var(--text-l);
}
.cs-cat-crumbs a { color: var(--text-l); text-decoration: none; }
.cs-cat-crumbs a:hover { color: var(--terra); text-decoration: underline; }
.cs-cat-crumbs span[aria-current] { color: var(--text-m); font-weight: 600; }

.cs-cat-hero { padding: 30px clamp(16px,4vw,80px) 40px; text-align: center; }
.cs-cat-hero h1 {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(28px,4.6vw,44px); line-height: 1.15;
    color: var(--brown); margin: 10px 0 14px; font-weight: 400;
}
.cs-cat-hero p {
    max-width: 66ch; margin: 0 auto; font-size: 15.5px;
    line-height: 1.75; color: var(--text-m);
}
.cs-cat-count-pill {
    display: inline-block; margin-top: 16px; padding: 5px 14px;
    background: var(--terra-p); color: var(--terra);
    border-radius: 20px; font-size: 12px; font-weight: 700;
}

.cs-cat-wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px,4vw,80px) 60px; }

.cs-cat-nav {
    display: flex; flex-wrap: wrap; gap: 8px;
    justify-content: center; margin: 0 0 38px;
}
.cs-cat-nav a {
    padding: 8px 15px; border-radius: 22px; font-size: 13px; font-weight: 600;
    text-decoration: none; color: var(--text-m); background: var(--bg2);
    border: 1px solid transparent; transition: all .18s;
}
.cs-cat-nav a:hover { background: var(--terra-p); color: var(--terra); }
.cs-cat-nav a[aria-current="page"] {
    background: var(--terra); color: #fff; border-color: var(--terra);
}

.cs-cat-pagination {
    display: flex; gap: 8px; justify-content: center; margin-top: 44px; flex-wrap: wrap;
}
.cs-cat-pagination .page-numbers {
    min-width: 38px; height: 38px; display: inline-flex; align-items: center;
    justify-content: center; padding: 0 12px; border-radius: 8px;
    background: var(--bg2); color: var(--text-m); text-decoration: none;
    font-size: 14px; font-weight: 600; transition: all .18s;
}
.cs-cat-pagination .page-numbers:hover { background: var(--terra-p); color: var(--terra); }
.cs-cat-pagination .page-numbers.current { background: var(--terra); color: #fff; }

.cs-cat-cta {
    margin-top: 52px; padding: 34px clamp(20px,4vw,44px);
    background: var(--brown); border-radius: 14px; text-align: center;
}
.cs-cat-cta h2 {
    font-family: Georgia, serif; font-weight: 400; color: #fff;
    font-size: clamp(21px,3vw,29px); margin: 0 0 10px;
}
.cs-cat-cta p {
    color: #e8ddd2; font-size: 15px; line-height: 1.7;
    max-width: 58ch; margin: 0 auto 22px;
}
.cs-cat-cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cs-cat-cta-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 13px 26px; border-radius: 8px; font-size: 14px; font-weight: 700;
    text-decoration: none; transition: all .2s;
}
.cs-cat-cta-btn.primary { background: var(--terra); color: #fff; }
.cs-cat-cta-btn.primary:hover { background: var(--terra-l); }
.cs-cat-cta-btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); }
.cs-cat-cta-btn.ghost:hover { background: rgba(255,255,255,.1); }

.cs-blog-card-soon { cursor: default; opacity: .72; }
.cs-blog-card-soon:hover { transform: none; box-shadow: var(--sh); }
.cs-blog-card-soon .cs-blog-ac-img img { filter: grayscale(.55); }
.cs-blog-ac-soon { background: var(--bg4) !important; color: var(--brown) !important; }
.cs-cat-soon-head {
    margin: 46px 0 16px; font-family: Georgia, serif; font-weight: 400;
    font-size: 20px; color: var(--brown);
}
.cs-cat-soon-note {
    font-size: 13.5px; color: var(--text-l); margin: 0 0 20px; line-height: 1.65;
}
@media (max-width: 640px) {
    .cs-cat-cta-btns { flex-direction: column; }
    .cs-cat-cta-btn { justify-content: center; }
}
