/* ═══ CTA generique — conteneur commun ═══ */
.affiliate-cta,
.affiliate-cta p,
.affiliate-cta-text,
.affiliate-cta li,
.affiliate-cta strong {
    color: #333 !important;
}
.affiliate-cta {
    margin: 2em 0;
    padding: 1.2em 1.4em;
    border-radius: 8px;
    background: #f8f9fa;
    border-left: 4px solid #6d4aff;
    font-size: 1.05rem;
    line-height: 1.65;
}
.affiliate-cta-text {
    margin-bottom: 0.8em;
}
.affiliate-cta-button-wrap {
    text-align: center;
    margin: 1em 0 0.6em;
}
.affiliate-cta-disclaimer {
    font-size: 0.85rem;
    color: #888;
    text-align: center;
    margin-top: 0.5em;
    font-style: italic;
}

/* ═══ Liens dans les CTA — ecrase le vert clair du theme ═══ */
.affiliate-cta a {
    color: #6d4aff !important;
    font-weight: 600;
}
.affiliate-cta a:hover {
    color: #5a3adf !important;
    text-decoration: underline;
}
.affiliate-cta--contact a {
    color: #e67e22 !important;
}
.affiliate-cta--contact a:hover {
    color: #c96a1c !important;
}

/* ═══ VPN Text — Proton (violet) / Nord (bleu) ═══ */
.affiliate-cta--vpn-text.vpn-text--proton {
    border-left-color: #6d4aff;
}
.affiliate-cta--vpn-text.vpn-text--nord {
    border-left-color: #4687ff;
}

/* ═══ Tableau comparatif VPN ═══ */
.vpn-table-title {
    text-align: center;
    margin-bottom: 0.8em;
    font-size: 1rem;
}
.vpn-comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 auto;
    font-size: 0.9rem;
}
.vpn-comparison-table th {
    background: #6d4aff;
    color: #fff;
    padding: 0.6em 0.8em;
    font-weight: 700;
    font-size: 0.95rem;
}
.vpn-comparison-table th:first-child {
    border-radius: 6px 0 0 0;
}
.vpn-comparison-table th:last-child {
    border-radius: 0 6px 0 0;
    background: #4687ff;
}
.vpn-comparison-table td {
    padding: 0.55em 0.8em;
    border-bottom: 1px solid #e0e0e0;
    vertical-align: top;
    color: #333;
}
.vpn-comparison-table tbody tr:last-child td {
    border-bottom: 2px solid #ccc;
}
.vpn-comparison-table tfoot td {
    padding: 0.8em;
    text-align: center;
    background: #f0f0f0;
}
.vpn-comparison-table tfoot td:first-child {
    border-radius: 0 0 0 6px;
}
.vpn-comparison-table tfoot td:last-child {
    border-radius: 0 0 6px 0;
}

/* Couleurs boutons par VPN */
.affiliate-cta .vpn-btn-proton {
    background: #6d4aff;
    color: #fff !important;
}
.affiliate-cta .vpn-btn-proton:hover {
    background: #5a3adf;
    color: #fff !important;
}
.affiliate-cta .vpn-btn-nord {
    background: #4687ff;
    color: #fff !important;
}
.affiliate-cta .vpn-btn-nord:hover {
    background: #3575e8;
    color: #fff !important;
}

/* Forcer texte blanc sur tous les boutons dans les CTA (ecrase le theme) */
.affiliate-cta .custom-button {
    color: #fff !important;
}
.affiliate-cta .custom-button:hover {
    color: #fff !important;
}

/* ═══ Bloc repliable — comparaison détaillée (v1.9.0) ═══ */
.cta-comparison-details {
    margin-top: 1em;
    border-top: 1px dashed #d0d0d0;
    padding-top: 0.6em;
}
.cta-comparison-details summary {
    cursor: pointer;
    font-weight: 600;
    color: #6d4aff;
    padding: 0.4em 0;
    list-style: none;
}
.cta-comparison-details summary::-webkit-details-marker {
    display: none;
}
.cta-comparison-details summary:hover {
    color: #5a3adf;
    text-decoration: underline;
}
.cta-comparison-details[open] summary {
    margin-bottom: 0.6em;
}
.cta-comparison-details .vpn-comparison-table {
    margin-top: 0.4em;
}

/* ═══ CTA Contact — carte de visite DGEDL ═══ */
.affiliate-cta--contact {
    border-left-color: #e67e22;
    background: #fdf6f0;
}
.affiliate-cta--contact .contact-card-label {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.5em;
    color: #e67e22;
}

/* ═══ CTA Engagement — commentaire + favoris (v1.8.0, dark-mode) ═══ */
.affiliate-cta--engagement {
    border-left-color: #0D9488;
    background: #1F2937;
}
.affiliate-cta--engagement,
.affiliate-cta--engagement p,
.affiliate-cta--engagement .affiliate-cta-text,
.affiliate-cta--engagement strong {
    color: #E5E7EB !important;
}
.affiliate-cta--engagement .custom-button {
    background: #0D9488;
    border-color: #0D9488;
}
.affiliate-cta--engagement .custom-button:hover {
    background: #0F766E;
    border-color: #0F766E;
}
.affiliate-cta--engagement .cta-micro-copy {
    color: #94A3B8 !important;
    font-size: 0.85rem;
    text-align: center;
    margin-top: 0.6em;
}

/* ═══ Responsive ═══ */
@media (max-width: 750px) {
    .vpn-comparison-table {
        font-size: 0.85rem;
    }
    .vpn-comparison-table th {
        white-space: normal;
        padding: 0.5em 0.4em;
        font-size: 0.8rem;
    }
    .vpn-comparison-table td {
        padding: 0.5em 0.5em;
    }
}

@media (max-width: 600px) {
    /* Card layout : transforme chaque ligne en carte */
    .vpn-comparison-table,
    .vpn-comparison-table thead,
    .vpn-comparison-table tbody,
    .vpn-comparison-table tfoot,
    .vpn-comparison-table tr,
    .vpn-comparison-table td {
        display: block;
    }
    .vpn-comparison-table thead {
        display: none;
    }
    .vpn-comparison-table tr {
        margin-bottom: 1em;
        border-radius: 10px;
        overflow: hidden;
        background: #fff;
        box-shadow: 0 3px 8px rgba(109,74,255,0.08);
        border: 1px solid #e8e0f8;
    }
    .vpn-comparison-table td {
        display: flex;
        align-items: center;
        padding: 0.65em 1em;
        border: none;
        border-bottom: 1px solid #f3effc;
        text-align: left;
        line-height: 1.45;
    }
    .vpn-comparison-table td:last-child {
        border-bottom: none;
    }

    /* Labels (colonne) en pseudo-element */
    .vpn-comparison-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        width: 90px;
        min-width: 90px;
        color: #7c6bb0;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        flex-shrink: 0;
    }

    /* Premiere cellule = titre de la carte */
    .vpn-comparison-table tbody td:first-child {
        background: linear-gradient(135deg, #6d4aff, #4687ff);
        color: #fff;
        font-weight: 700;
        font-size: 1rem;
        display: flex;
        justify-content: center;
        padding: 0.8em;
        border-bottom: none;
    }
    .vpn-comparison-table tbody td:first-child::before {
        display: none;
    }

    /* Ligne gratuite/OS en fond alterne */
    .vpn-comparison-table tbody tr:nth-child(odd) td:not(:first-child) {
        background: #fdfcff;
    }
    .vpn-comparison-table tbody tr:nth-child(even) td:not(:first-child) {
        background: #f7f4fe;
    }

    /* tfoot — boutons empiles */
    .vpn-comparison-table tfoot td {
        display: block;
        padding: 0.6em;
        text-align: center;
        background: #faf7ff;
    }
    .vpn-comparison-table tfoot td:first-child {
        display: none;
    }
    .vpn-comparison-table tfoot .custom-button {
        margin: 0.25em 0;
    }
}