/* FICHIER: assets/gallery.css */
/* RÔLE: Styles galerie publique — design premium responsive */

/* ── Variables ───────────────────────────────── */
:root {
    --wcd-bg: #111827;
    --wcd-surface: #1f2937;
    --wcd-card-bg: #1f2937;
    --wcd-card-hover: #263244;
    --wcd-card-border: #374151;
    --wcd-primary: #6366f1;
    --wcd-primary-hover: #818cf8;
    --wcd-accent: #f43f5e;
    --wcd-accent-hover: #fb7185;
    --wcd-text: #f3f4f6;
    --wcd-text-muted: #9ca3af;
    --wcd-text-dim: #6b7280;
    --wcd-radius: 12px;
    --wcd-radius-sm: 6px;
    --wcd-font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* ── Reset ───────────────────────────────────── */
.wcd-gallery-page {
    margin: 0;
    padding: 0;
    background: var(--wcd-bg);
    color: var(--wcd-text);
    font-family: var(--wcd-font);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.wcd-gallery-page *, .wcd-gallery-page *::before, .wcd-gallery-page *::after {
    box-sizing: border-box;
}

.wcd-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Header ──────────────────────────────────── */
.wcd-header {
    background: rgba(17, 24, 39, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--wcd-card-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.wcd-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
}

.wcd-logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--wcd-text);
    text-decoration: none;
}

.wcd-back-link {
    font-size: 0.85rem;
    color: var(--wcd-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.wcd-back-link:hover { color: var(--wcd-primary-hover); }

/* ── Hero ────────────────────────────────────── */
.wcd-hero {
    text-align: center;
    padding: 48px 0 32px;
}

.wcd-hero-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
    color: #fff;
}

.wcd-hero-subtitle {
    font-size: 1.05rem;
    color: var(--wcd-text-muted);
    margin: 0;
}

/* ── Filtres ─────────────────────────────────── */
.wcd-filters {
    padding-bottom: 24px;
}

/* Category tabs */
.wcd-cat-tabs-wrap {
    position: relative;
    margin-bottom: 16px;
}

/* Desktop : wrap multi-lignes, collapsed à ~2 lignes par défaut */
.wcd-cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 94px;
    overflow: hidden;
    padding-bottom: 4px;
    transition: max-height 0.25s ease;
}
.wcd-cat-tabs.is-expanded {
    max-height: 1000px;
}
.wcd-cat-tabs-toggle {
    display: none;
    margin-top: 8px;
    background: transparent;
    border: 1px solid var(--wcd-card-border);
    color: var(--wcd-text-muted);
    font-size: 0.8125rem;
    font-family: inherit;
    padding: 6px 14px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s;
}
.wcd-cat-tabs-toggle:hover { border-color: var(--wcd-primary); color: var(--wcd-text); }
.wcd-cat-tabs-wrap.is-overflowing .wcd-cat-tabs-toggle { display: inline-block; }

/* Mobile : scroll horizontal natif (pas de wrap), fade visuel + masquage scrollbar */
@media (max-width: 640px) {
    .wcd-cat-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        max-height: none;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
        mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent);
        padding-right: 20px;
    }
    .wcd-cat-tabs::-webkit-scrollbar { display: none; }
    /* Pas de toggle en mobile : on swipe */
    .wcd-cat-tabs-wrap.is-overflowing .wcd-cat-tabs-toggle { display: none; }
}

.wcd-cat-tab {
    flex-shrink: 0;
    padding: 8px 18px;
    border: 1px solid var(--wcd-card-border);
    border-radius: 999px;
    background: transparent;
    color: var(--wcd-text-muted);
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
}
.wcd-cat-tab:hover { border-color: var(--wcd-primary); color: var(--wcd-text); }
.wcd-cat-tab.active {
    background: var(--wcd-primary);
    border-color: var(--wcd-primary);
    color: #fff;
}

/* Tags */
.wcd-tag-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.wcd-tag-btn {
    padding: 4px 12px;
    border: 1px solid var(--wcd-card-border);
    border-radius: 999px;
    background: transparent;
    color: var(--wcd-text-dim);
    font-size: 0.75rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}
.wcd-tag-btn:hover { border-color: var(--wcd-text-muted); color: var(--wcd-text-muted); }
.wcd-tag-btn.active {
    background: var(--wcd-accent);
    border-color: var(--wcd-accent);
    color: #fff;
}

/* Search */
.wcd-search-bar { margin-bottom: 12px; }

.wcd-search-input {
    width: 100%;
    max-width: 400px;
    padding: 10px 16px;
    border: 1px solid var(--wcd-card-border);
    border-radius: var(--wcd-radius-sm);
    background: var(--wcd-surface);
    color: var(--wcd-text);
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.wcd-search-input::placeholder { color: var(--wcd-text-dim); }
.wcd-search-input:focus { border-color: var(--wcd-primary); }

.wcd-result-count {
    font-size: 0.85rem;
    color: var(--wcd-text-dim);
    margin: 0;
}

/* ── Grille ──────────────────────────────────── */
.wcd-gallery-section { padding-bottom: 48px; }

.wcd-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    contain: layout style;
}

.wcd-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 0;
    color: var(--wcd-text-muted);
}

/* ── Card ────────────────────────────────────── */
.wcd-card {
    background: var(--wcd-card-bg);
    border: 1px solid var(--wcd-card-border);
    border-radius: var(--wcd-radius);
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
    contain: layout style;
    will-change: transform;
}

.wcd-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
    border-color: var(--wcd-primary);
}

.wcd-card-link {
    display: block;
    overflow: hidden;
    text-decoration: none;
}

.wcd-card-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--wcd-bg);
}

.wcd-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left top;
    transition: transform 0.35s ease;
}

.wcd-card:hover .wcd-card-image img {
    transform: scale(1.05);
}

.wcd-card-body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.wcd-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: var(--wcd-text);
}

.wcd-card-tagline {
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--wcd-text-muted);
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wcd-card-category {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--wcd-primary-hover);
    margin-bottom: 8px;
}

.wcd-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
}

.wcd-card-tags .wcd-tag {
    padding: 2px 8px;
    font-size: 0.7rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--wcd-primary-hover);
}

.wcd-card-price {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--wcd-accent);
    margin-bottom: 12px;
}

.wcd-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.wcd-card-cta {
    display: inline-block;
    flex: 1;
    padding: 8px 18px;
    background: var(--wcd-primary);
    color: #fff;
    border-radius: var(--wcd-radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s;
}
.wcd-card-cta:hover { background: var(--wcd-primary-hover); }

.wcd-card-details {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: 1px solid var(--wcd-card-border);
    border-radius: var(--wcd-radius-sm);
    color: var(--wcd-text-muted);
    text-decoration: none;
    transition: all 0.2s;
}
.wcd-card-details:hover {
    border-color: var(--wcd-primary);
    color: var(--wcd-primary-hover);
}
.wcd-card-details:focus-visible {
    outline: 2px solid var(--wcd-primary);
    outline-offset: 2px;
}

/* ── CTA Promo Card ─────────────────────────── */
.wcd-card-promo {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #818cf8 100%);
    border-color: #6366f1;
    display: flex;
    flex-direction: column;
}
.wcd-card-promo:hover {
    border-color: #818cf8;
    box-shadow: 0 16px 48px rgba(99, 102, 241, 0.35);
}

.wcd-card-promo-inner {
    padding: 24px 20px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.wcd-card-promo-image {
    overflow: hidden;
    max-height: 120px;
    flex-shrink: 0;
}
.wcd-card-promo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    max-height: 120px;
}

.wcd-card-promo-icon {
    margin-bottom: 12px;
}
.wcd-card-promo-icon svg {
    color: rgba(255, 255, 255, 0.85);
}

.wcd-card-promo-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px;
}

.wcd-card-promo-text {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 24px;
    line-height: 1.5;
}

.wcd-card-promo-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.wcd-btn-promo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 24px;
    background: var(--wcd-accent);
    color: #fff;
    border-radius: var(--wcd-radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.wcd-btn-promo:hover { background: var(--wcd-accent-hover); }

.wcd-card-promo-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s;
}
.wcd-card-promo-phone:hover { color: #fff; }
.wcd-card-promo-phone svg { flex-shrink: 0; }

/* ── Pagination ──────────────────────────────── */
.wcd-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 40px;
}

.wcd-pagination button {
    min-width: 38px;
    height: 38px;
    border: 1px solid var(--wcd-card-border);
    border-radius: var(--wcd-radius-sm);
    background: transparent;
    color: var(--wcd-text-muted);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}
.wcd-pagination button:hover { border-color: var(--wcd-primary); color: var(--wcd-text); }
.wcd-pagination button.active {
    background: var(--wcd-primary);
    border-color: var(--wcd-primary);
    color: #fff;
}

/* ── CTA Bar ─────────────────────────────────── */
.wcd-cta-bar {
    background: var(--wcd-surface);
    border-top: 1px solid var(--wcd-card-border);
    border-bottom: 1px solid var(--wcd-card-border);
    padding: 40px 0;
    content-visibility: auto;
}

.wcd-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.wcd-cta-text {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: #fff;
}

.wcd-cta-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.wcd-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--wcd-radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.wcd-btn-primary {
    background: var(--wcd-accent);
    color: #fff;
}
.wcd-btn-primary:hover { background: var(--wcd-accent-hover); }

.wcd-btn-phone {
    background: transparent;
    border: 1px solid var(--wcd-card-border);
    color: var(--wcd-text);
}
.wcd-btn-phone:hover { border-color: var(--wcd-primary); color: var(--wcd-primary-hover); }
.wcd-btn-phone svg { flex-shrink: 0; }

/* ── Footer ──────────────────────────────────── */
.wcd-footer {
    padding: 24px 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--wcd-text-dim);
    content-visibility: auto;
}
.wcd-footer p { margin: 0; }

/* ── Responsive ──────────────────────────────── */
@media (max-width: 1024px) {
    .wcd-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .wcd-tpl-previews-grid { grid-template-columns: 1fr; }

    .wcd-tpl-preview-main {
        border-radius: var(--wcd-radius);
        width: 100%;
    }
}

@media (max-width: 640px) {
    .wcd-gallery-grid { grid-template-columns: 1fr; gap: 16px; }

    .wcd-hero { padding: 32px 0 20px; }
    .wcd-hero-title { font-size: 1.5rem; }
    .wcd-hero-subtitle { font-size: 0.9rem; }

    .wcd-cta-inner {
        flex-direction: column;
        text-align: center;
    }
    .wcd-cta-text { font-size: 1.1rem; }
    .wcd-cta-actions { justify-content: center; }

    .wcd-search-input { max-width: 100%; }

    .wcd-tpl-hero { padding: 16px 0 24px; }
    .wcd-tpl-preview-main { max-height: 200px; overflow: hidden; border-radius: var(--wcd-radius); }
    .wcd-tpl-preview-main img { object-fit: cover; object-position: left top; }
    .wcd-tpl-name { font-size: 1.25rem; margin-bottom: 12px; }
    .wcd-tpl-meta { margin-bottom: 16px; gap: 8px; }
    .wcd-tpl-meta-row { flex-direction: row; flex-wrap: wrap; gap: 6px; align-items: center; }
    .wcd-tpl-meta-label { min-width: auto; font-size: 0.75rem; }
    .wcd-tpl-meta-value { font-size: 0.85rem; }
    .wcd-tpl-actions { flex-direction: row; flex-wrap: wrap; gap: 8px; }
    .wcd-tpl-actions .wcd-btn { width: auto; padding: 8px 14px; font-size: 0.8rem; flex: 1; min-width: 0; }
    .wcd-tpl-niche-link { margin-left: 0; display: block; margin-top: 4px; }
    .wcd-tpl-presentation-text { font-size: 0.9rem; }
    .wcd-tpl-nav-name { display: none; }
    .wcd-header-nav { gap: 12px; }
    .wcd-header-nav .wcd-back-link { font-size: 0.75rem; }
}

/* ── Header nav ──────────────────────────────── */
.wcd-header-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

/* ── Breadcrumb ─────────────────────────────── */
.wcd-breadcrumb {
    padding: 16px 0;
    border-bottom: 1px solid var(--wcd-card-border);
}

.wcd-breadcrumb ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--wcd-text-dim);
}

.wcd-breadcrumb li:not(:last-child)::after {
    content: '›';
    margin-left: 4px;
    color: var(--wcd-text-dim);
}

.wcd-breadcrumb a {
    color: var(--wcd-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}
.wcd-breadcrumb a:hover { color: var(--wcd-primary-hover); }

.wcd-breadcrumb li:last-child { color: var(--wcd-text); }

/* ── Category page ──────────────────────────── */
.wcd-cat-description-wrap {
    max-width: 700px;
    margin: 0 auto;
}

.wcd-cat-description {
    color: var(--wcd-text-muted);
    font-size: 1rem;
    line-height: 1.7;
    text-align: center;
    transition: max-height 0.3s ease;
}

.wcd-cat-description-wrap.is-truncatable .wcd-cat-description {
    max-height: 96px;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent);
            mask-image: linear-gradient(to bottom, #000 55%, transparent);
}

.wcd-cat-description-wrap.is-expanded .wcd-cat-description {
    max-height: none;
    -webkit-mask-image: none;
            mask-image: none;
}

.wcd-cat-description-toggle {
    display: block;
    margin: 12px auto 0;
    padding: 6px 16px;
    border: 1px solid var(--wcd-card-border);
    border-radius: 999px;
    background: transparent;
    color: var(--wcd-text-muted);
    font-size: 0.825rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}
.wcd-cat-description-toggle:hover {
    border-color: var(--wcd-primary);
    color: var(--wcd-text);
}
.wcd-cat-description-toggle:focus-visible {
    outline: 2px solid var(--wcd-primary);
    outline-offset: 2px;
}

.wcd-count-label {
    font-size: 0.9rem;
    color: var(--wcd-text-dim);
    margin: 0 0 20px;
}

/* Lien vers page niche */
.wcd-cat-niche-link {
    margin-top: 16px;
    font-size: 0.9rem;
}

.wcd-cat-niche-link a {
    color: var(--wcd-primary-hover);
    text-decoration: none;
    transition: color 0.2s;
}

.wcd-cat-niche-link a:hover {
    color: var(--wcd-text);
    text-decoration: underline;
}

.wcd-tpl-niche-link {
    margin-left: 12px;
    font-size: 0.8rem;
    color: var(--wcd-primary-hover);
    text-decoration: none;
    transition: color 0.2s;
}

.wcd-tpl-niche-link:hover {
    color: var(--wcd-text);
    text-decoration: underline;
}

.wcd-cat-description-bottom-section {
    padding: 48px 0 16px;
    position: relative;
}
.wcd-cat-description-bottom-section::before {
    content: "";
    display: block;
    width: 80px;
    height: 2px;
    margin: 0 auto 40px;
    background: linear-gradient(90deg, transparent, var(--wcd-primary), transparent);
    border-radius: 2px;
    opacity: 0.6;
}

.wcd-cat-description-bottom {
    max-width: 800px;
    margin: 0 auto;
    color: var(--wcd-text-muted);
    font-size: 1rem;
    line-height: 1.75;
}

.wcd-cat-description-bottom > *:first-child {
    margin-top: 0;
}

.wcd-cat-description-bottom > *:last-child {
    margin-bottom: 0;
}

.wcd-cat-description-bottom h2 {
    position: relative;
    color: #fff;
    margin: 3rem 0 1.25rem;
    padding-bottom: 0.65rem;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.015em;
    line-height: 1.25;
}
.wcd-cat-description-bottom h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 56px;
    height: 3px;
    background: linear-gradient(90deg, var(--wcd-primary), var(--wcd-accent));
    border-radius: 2px;
}

.wcd-cat-description-bottom h3 {
    color: #fff;
    margin: 2.25rem 0 0.85rem;
    padding-left: 0.85rem;
    border-left: 3px solid var(--wcd-primary);
    font-size: 1.22rem;
    font-weight: 700;
    line-height: 1.35;
}

.wcd-cat-description-bottom h4 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--wcd-text);
    margin: 1.65rem 0 0.55rem;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    text-transform: none;
}
.wcd-cat-description-bottom h4::before {
    content: "";
    flex-shrink: 0;
    width: 18px;
    height: 2px;
    background: var(--wcd-accent);
    border-radius: 2px;
}

.wcd-cat-description-bottom p {
    margin: 0 0 1rem;
}

.wcd-cat-description-bottom ul,
.wcd-cat-description-bottom ol {
    margin: 0 0 1.25rem;
    padding-left: 1.5rem;
}

.wcd-cat-description-bottom ul {
    list-style: disc outside;
}

.wcd-cat-description-bottom ol {
    list-style: decimal outside;
}

.wcd-cat-description-bottom li {
    margin: 0.35rem 0;
    padding-left: 0.25rem;
}

.wcd-cat-description-bottom li::marker {
    color: var(--wcd-primary-hover);
}

.wcd-cat-description-bottom ul ul,
.wcd-cat-description-bottom ul ol,
.wcd-cat-description-bottom ol ul,
.wcd-cat-description-bottom ol ol {
    margin: 0.5rem 0;
}

.wcd-cat-description-bottom strong {
    color: var(--wcd-text);
    font-weight: 700;
}

.wcd-cat-description-bottom em {
    color: var(--wcd-text);
}

.wcd-cat-description-bottom a {
    color: var(--wcd-primary-hover);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}
.wcd-cat-description-bottom a:hover {
    color: var(--wcd-text);
}

.wcd-cat-description-bottom blockquote {
    margin: 1.5rem 0;
    padding: 0.75rem 1.25rem;
    border-left: 3px solid var(--wcd-primary);
    background: rgba(99, 102, 241, 0.08);
    color: var(--wcd-text);
    border-radius: 0 var(--wcd-radius-sm) var(--wcd-radius-sm) 0;
}

.wcd-cat-description-bottom blockquote p:last-child {
    margin-bottom: 0;
}

.wcd-cat-description-bottom hr {
    border: 0;
    border-top: 1px solid var(--wcd-card-border);
    margin: 2rem 0;
}

.wcd-cat-description-bottom code {
    padding: 0.15em 0.4em;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    font-size: 0.9em;
    color: var(--wcd-text);
}

.wcd-other-cats {
    padding: 40px 0;
    content-visibility: auto;
}

.wcd-other-cats-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 16px;
    color: #fff;
}

.wcd-other-cats-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wcd-cat-badge-wrap {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.wcd-cat-badge {
    padding: 8px 18px;
    border: 1px solid var(--wcd-card-border);
    border-radius: 999px;
    color: var(--wcd-text-muted);
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s;
}
.wcd-cat-badge:hover { border-color: var(--wcd-primary); color: var(--wcd-text); }

.wcd-cat-badge-niche {
    color: var(--wcd-primary-hover);
    text-decoration: none;
    font-size: 0.75rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.wcd-cat-badge-niche:hover { opacity: 1; }

/* ── Template page — Hero ───────────────────── */
.wcd-tpl-hero {
    padding: 32px 0 48px;
}

.wcd-tpl-hero-inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    align-items: start;
}

.wcd-tpl-preview-main {
    border-radius: var(--wcd-radius);
    overflow: hidden;
    border: 1px solid var(--wcd-card-border);
    background: var(--wcd-bg);
}

.wcd-tpl-preview-main img {
    width: 100%;
    display: block;
}

.wcd-tpl-no-preview {
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wcd-text-dim);
    font-size: 0.9rem;
}

.wcd-tpl-name {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0 0 24px;
    letter-spacing: -0.02em;
    color: #fff;
}

.wcd-tpl-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.wcd-tpl-meta-row {
    display: flex;
    gap: 12px;
    align-items: baseline;
}

.wcd-tpl-meta-label {
    font-size: 0.8rem;
    color: var(--wcd-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    min-width: 80px;
}

.wcd-tpl-meta-value {
    font-size: 0.9rem;
    color: var(--wcd-text);
}

.wcd-tpl-meta-link {
    color: var(--wcd-primary-hover);
    text-decoration: none;
}
.wcd-tpl-meta-link:hover { text-decoration: underline; }

.wcd-tpl-price {
    font-weight: 600;
    color: var(--wcd-accent) !important;
}

.wcd-tpl-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wcd-tpl-actions .wcd-btn {
    justify-content: center;
    text-align: center;
}

.wcd-btn-outline {
    background: transparent;
    border: 1px solid var(--wcd-card-border);
    color: var(--wcd-text);
}
.wcd-btn-outline:hover { border-color: var(--wcd-primary); color: var(--wcd-primary-hover); }

/* ── Template page — Présentation ──────────── */
.wcd-tpl-presentation {
    padding: 0 0 48px;
}

.wcd-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: #fff;
}

.wcd-tpl-presentation-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--wcd-text-muted);
    max-width: 800px;
    margin: 0;
}

/* ── Template page — Fiche tech (archétype, palette, signature) ───────────── */
.wcd-tpl-techsheet {
    padding: 0 0 48px;
}

.wcd-tpl-techsheet-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin: 0;
}

.wcd-tpl-techsheet-row {
    background: var(--wcd-surface);
    border: 1px solid var(--wcd-card-border);
    border-radius: var(--wcd-radius-sm);
    padding: 14px 16px;
}

.wcd-tpl-techsheet-row dt {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--wcd-text-dim);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin: 0 0 6px;
}

.wcd-tpl-techsheet-row dd {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--wcd-text);
}

.wcd-tpl-swatches {
    display: inline-flex;
    gap: 6px;
    margin-left: 10px;
    vertical-align: middle;
}

.wcd-tpl-swatch {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ── Template page — Argumentaire ─────────────────────────── */
.wcd-tpl-argumentaire {
    padding: 0 0 48px;
}

.wcd-tpl-argumentaire-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
    max-width: 880px;
}

.wcd-tpl-argumentaire-list li {
    background: var(--wcd-surface);
    border-left: 3px solid var(--wcd-primary);
    border-radius: 0 var(--wcd-radius-sm) var(--wcd-radius-sm) 0;
    padding: 12px 16px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--wcd-text-muted);
}

/* ── Template page — Previews ───────────────── */
.wcd-tpl-previews {
    padding: 0 0 48px;
}

.wcd-tpl-previews-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.wcd-tpl-previews-single {
    grid-template-columns: 1fr;
    max-width: 800px;
}

.wcd-tpl-preview-label {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 12px;
    color: #fff;
}

.wcd-tpl-preview-scroll {
    border: 1px solid var(--wcd-card-border);
    border-radius: var(--wcd-radius);
    overflow-y: auto;
    max-height: 600px;
    background: var(--wcd-bg);
}

.wcd-tpl-preview-scroll img {
    width: 100%;
    display: block;
}

.wcd-tpl-preview-scroll-mobile {
    max-width: 375px;
}

/* ── Template page — Navigation ─────────────── */
.wcd-tpl-nav {
    padding: 24px 0;
    border-top: 1px solid var(--wcd-card-border);
    border-bottom: 1px solid var(--wcd-card-border);
}

.wcd-tpl-nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wcd-tpl-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--wcd-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.wcd-tpl-nav-link:hover { color: var(--wcd-primary-hover); }

.wcd-tpl-nav-arrow { font-size: 1.1rem; }

/* ── Focus visible (accessibilité) ───────────── */
.wcd-btn:focus-visible,
.wcd-card-link:focus-visible,
.wcd-cat-tab:focus-visible,
.wcd-tag-btn:focus-visible,
.wcd-card-cta:focus-visible,
.wcd-tpl-nav-link:focus-visible,
.wcd-cat-badge:focus-visible,
.wcd-back-link:focus-visible {
    outline: 2px solid var(--wcd-primary);
    outline-offset: 2px;
}

/* ── 404 pages ──────────────────────────────── */
.wcd-404 {
    text-align: center;
    padding: 120px 24px;
}

.wcd-404-title {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
}

.wcd-404-text {
    color: var(--wcd-text-muted);
    margin: 16px 0 32px;
}

/* ── WP admin bar fix ────────────────────────── */
.admin-bar .wcd-header { top: 32px; }
@media (max-width: 782px) {
    .admin-bar .wcd-header { top: 46px; }
}

/* ── Template page responsive (après définitions de base) ── */
@media (max-width: 1024px) {
    .wcd-tpl-hero-inner {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 640px) {
    .wcd-tpl-hero-inner {
        gap: 16px;
    }

    .wcd-tpl-info {
        text-align: center;
    }

    .wcd-tpl-meta-row {
        justify-content: center;
    }

    .wcd-tpl-actions .wcd-btn {
        width: 100%;
    }
}

/* ── Boutons niches (création site / SEO) ───── */
.wcd-cat-niche-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 1.5rem;
    justify-content: center;
}

.wcd-btn-niche {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: 1px solid var(--wcd-primary);
    color: var(--wcd-primary);
    border-radius: var(--wcd-radius);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.wcd-btn-niche:hover {
    background: var(--wcd-primary);
    color: #fff;
}

.wcd-btn-niche-seo {
    border-color: #10b981;
    color: #10b981;
}

.wcd-btn-niche-seo:hover {
    background: #10b981;
    color: #fff;
}

.wcd-tpl-niche-section {
    padding: 1.5rem 0;
}

.wcd-tpl-niche-section .wcd-cat-niche-buttons {
    margin-top: 0;
}

@media (max-width: 600px) {
    .wcd-cat-niche-buttons {
        flex-direction: column;
    }

    .wcd-btn-niche {
        width: 100%;
        justify-content: center;
    }
}
