/*
 * Styles — Page catégorie Comparatifs VPN
 * Chargé uniquement sur is_category('comparatifs-vpn') via functions.php
 *
 * Variables à ajuster pour personnaliser les couleurs :
 */
:root {
    --vpnmalin-primary:     #1A3C5E;   /* bleu foncé : hero, thead, badges */
    --vpnmalin-accent:      #E8943A;   /* orange CTA : bouton featured */
    --vpnmalin-featured-bg: #FFF8E7;   /* fond ligne Top 1 */
    --vpnmalin-card-bg:     #f8fafc;   /* fond carte article pilier */
    --vpnmalin-border:      #e2e8f0;
    --vpnmalin-radius:      7px;
}

/* ═══════════════════════════════════════
   WRAPPER GLOBAL
═══════════════════════════════════════ */
.cat-comparatifs-vpn {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

/* ═══════════════════════════════════════
   TITRES DE SECTION
═══════════════════════════════════════ */
.ccat-section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--vpnmalin-primary);
    margin: 2.5rem 0 1.25rem;
    padding-bottom: .5rem;
    border-bottom: 3px solid var(--vpnmalin-accent);
    display: inline-block;
}

/* ═══════════════════════════════════════
   SECTION 1 — HERO
═══════════════════════════════════════ */
.ccat-hero {
    background: var(--vpnmalin-primary);
    color: #fff;
    padding: 2.5rem 2rem;
    border-radius: var(--vpnmalin-radius);
    margin-bottom: 2rem;
}

@media (max-width: 600px) {
    .ccat-hero { padding: 1.5rem 1.25rem; }
}

/* Fil d'ariane */
.ccat-breadcrumb ol {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
    font-size: .85rem;
    opacity: .85;
}

.ccat-breadcrumb li + li::before {
    content: '›';
    margin-right: .25rem;
}

.ccat-breadcrumb a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ccat-hero__title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 .75rem;
    color: #fff;
    line-height: 1.2;
}

@media (max-width: 600px) {
    .ccat-hero__title { font-size: 1.5rem; }
}

.ccat-hero__desc {
    font-size: 1rem;
    opacity: .9;
    margin: 0;
    max-width: 640px;
    line-height: 1.6;
}

.ccat-hero__desc p { margin: 0; }

/* ═══════════════════════════════════════
   SECTION 2 — TOP 5
═══════════════════════════════════════ */
.ccat-top5__wrap {
    overflow-x: auto;
    border-radius: var(--vpnmalin-radius);
    border: 1px solid var(--vpnmalin-border);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

.ccat-top5__table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
}

.ccat-top5__table thead tr {
    background: var(--vpnmalin-primary);
    color: #fff;
}

.ccat-top5__table th {
    padding: .875rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
}

.ccat-top5__table td {
    padding: .875rem 1rem;
    border-bottom: 1px solid var(--vpnmalin-border);
    vertical-align: middle;
}

.ccat-top5__row:last-child td { border-bottom: none; }

/* Ligne featured (n°1) */
.ccat-top5__row--featured {
    background: var(--vpnmalin-featured-bg);
}

.ccat-top5__row--featured td {
    border-bottom-color: #f0d9a8;
}

/* Badge "Notre choix #1" */
.ccat-top5__badge {
    display: inline-block;
    background: var(--vpnmalin-accent);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    padding: .3rem .5rem;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

/* Nom + tagline */
.ccat-top5__name {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--vpnmalin-primary);
}

.ccat-top5__tagline {
    display: block;
    font-size: .8rem;
    color: #64748b;
    margin-top: .15rem;
}

/* Note */
.ccat-top5__score {
    font-weight: 700;
    color: var(--vpnmalin-primary);
}

/* Boutons CTA */
.ccat-btn {
    display: inline-block;
    padding: .55rem 1.1rem;
    border-radius: 6px;
    font-size: .875rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity .15s, background .15s;
    cursor: pointer;
}

.ccat-btn--featured {
    background: var(--vpnmalin-accent);
    color: #fff;
    border: 2px solid var(--vpnmalin-accent);
}

.ccat-btn--featured:hover {
    opacity: .88;
    color: #fff;
}

.ccat-btn--outline {
    background: transparent;
    color: var(--vpnmalin-primary);
    border: 2px solid var(--vpnmalin-primary);
}

.ccat-btn--outline:hover {
    background: var(--vpnmalin-primary);
    color: #fff;
}

/* Disclaimer */
.ccat-top5__disclaimer {
    font-size: .78rem;
    color: #94a3b8;
    margin: .6rem 0 0;
    text-align: right;
}

/* ── Responsive Top 5 : cartes verticales sous 768px ── */
@media (max-width: 768px) {

    .ccat-top5__table thead { display: none; }

    .ccat-top5__table,
    .ccat-top5__table tbody,
    .ccat-top5__table tr,
    .ccat-top5__table td {
        display: block;
        width: 100%;
    }

    .ccat-top5__table tr {
        border-bottom: 2px solid var(--vpnmalin-border);
        padding: 1rem;
    }

    .ccat-top5__row--featured {
        border-left: 4px solid var(--vpnmalin-accent);
    }

    .ccat-top5__table td {
        border: none;
        padding: .25rem 0;
        text-align: left;
    }

    /* Étiquette avant chaque valeur */
    .ccat-top5__table td[data-label]::before {
        content: attr(data-label) ' : ';
        font-weight: 600;
        font-size: .78rem;
        text-transform: uppercase;
        color: #64748b;
        letter-spacing: .05em;
        margin-right: .3rem;
    }

    /* Pas d'étiquette pour la position et le CTA */
    .ccat-top5__col-pos[data-label]::before,
    .ccat-top5__col-cta[data-label]::before { content: ''; }

    .ccat-top5__col-pos { margin-bottom: .25rem; }

    .ccat-top5__col-cta { margin-top: .75rem; }

    .ccat-btn { width: 100%; display: block; text-align: center; padding: .7rem; }
}

/* ═══════════════════════════════════════
   SECTION 3 — GRILLE COMPARATIFS
═══════════════════════════════════════ */
.ccat-articles__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

@media (max-width: 600px) {
    .ccat-articles__grid { grid-template-columns: 1fr; }
}

/* Carte article */
.ccat-card {
    background: #fff;
    border: 1px solid var(--vpnmalin-border);
    border-radius: var(--vpnmalin-radius);
    padding: 1.1rem 1.25rem;
    transition: box-shadow .15s;
}

.ccat-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
}

/* Carte pilier : fond légèrement différent */
.ccat-card--pilier {
    background: var(--vpnmalin-card-bg);
    border-color: #cbd5e1;
}

.ccat-card__meta {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .6rem;
}

.ccat-card__tag {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    padding: .2rem .55rem;
    border-radius: 4px;
}

.ccat-card__tag--duel {
    background: #e0f2fe;
    color: #0369a1;
}

.ccat-card__tag--pilier {
    background: #fef9c3;
    color: #854d0e;
}

.ccat-card__read-time {
    font-size: .78rem;
    color: #94a3b8;
}

.ccat-card__read-time::after { content: ' de lecture'; }

.ccat-card__title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 .5rem;
    line-height: 1.35;
}

.ccat-card__title a {
    color: var(--vpnmalin-primary);
    text-decoration: none;
}

.ccat-card__title a:hover {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.ccat-card__excerpt {
    font-size: .875rem;
    color: #64748b;
    margin: 0;
    line-height: 1.55;
}

/* ═══════════════════════════════════════
   SECTION 4 — PROCHAINEMENT
═══════════════════════════════════════ */
.ccat-soon {
    background: #f8fafc;
    border: 1px solid var(--vpnmalin-border);
    border-radius: var(--vpnmalin-radius);
    padding: 1.5rem 1.75rem;
    margin-top: .5rem;
}

.ccat-soon .ccat-section-title { margin-top: 0; }

.ccat-soon__list {
    margin: 0;
    padding-left: 1.25rem;
    color: #475569;
    font-size: .95rem;
    line-height: 2;
}

/* ═══════════════════════════════════════
   SECTION 5 — FAQ
═══════════════════════════════════════ */
.ccat-faq__item {
    border-bottom: 1px solid var(--vpnmalin-border);
    padding: 1.1rem 0;
}

.ccat-faq__item:last-child { border-bottom: none; }

.ccat-faq__question {
    font-size: 1rem;
    font-weight: 700;
    color: var(--vpnmalin-primary);
    margin: 0 0 .5rem;
}

.ccat-faq__answer {
    font-size: .95rem;
    color: #475569;
    margin: 0;
    line-height: 1.65;
}

/* ═══════════════════════════════════════
   RESPONSIVE GLOBAL — 900px
═══════════════════════════════════════ */
@media (max-width: 900px) {
    .ccat-hero { padding: 2rem 1.5rem; }
    .cat-comparatifs-vpn { padding: 0 .75rem 2rem; }
}
