/*
 Theme Name:   AffiliationTime
 Theme URI:    https://affiliationtime.com
 Description:  Thème WordPress autonome pour sites d'affiliation et comparateurs. Design moderne avec templates listing, review et guide. Inclut champs ACF, sidebars dynamiques, footer 4 colonnes et personnalisation complète via le Customizer.
 Author:       AffiliationTime
 Author URI:   https://affiliationtime.com
 Version:      1.0.5
 Requires at least: 6.0
 Tested up to: 6.7
 Requires PHP: 7.4
 License:      GPL v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  affiliationtime
 Tags:         blog, affiliate, comparison, custom-menu, custom-logo, featured-images, sticky-post, threaded-comments
*/

/* ========== VARIABLES ========== */
:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --border: #d2d2d7;
  --accent: #3343EB;
  --accent-hover: #2733c7;
  --accent-soft: #eef0fe;
  --card: #ffffff;
  --navbar-bg: rgba(255, 255, 255, 0.72);
  --widget-affiliate-bg: #ffffff;
  --widget-reading-bg: #ffffff;
  --widget-toc-bg: #f5f5f7;
  --sidebar-text: #1d1d1f;
  --sidebar-link-hover: #3343EB;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.1);
  --radius: 18px;
}

html { scroll-behavior: smooth; }

/* ========== BASE ========== */
html, body {
  /* overflow-x: clip = bloque le scroll latéral SANS casser position: sticky */
  overflow-x: clip;
}

body, .entry-content, button, input, select, textarea, h1, h2, h3, h4, h5, h6 {
  font-family: 'Pangram Sans Rounded', 'SF Pro Rounded', ui-rounded, 'Nunito', -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  margin: 0;
}

* { box-sizing: border-box; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); }

/* ========== NAVBAR ========== */
.affiliationtime-navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--navbar-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  width: 100%;
}

.affiliationtime-nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.affiliationtime-logo {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px;
  max-width: 250px !important;
  overflow: hidden !important;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.affiliationtime-logo-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.affiliationtime-logo-mark svg { width: 22px; height: 22px; }

.affiliationtime-logo .custom-logo-link {
  display: inline-flex !important;
  align-items: center !important;
  text-decoration: none !important;
  border: none !important;
  line-height: 0 !important;
  max-width: 200px !important;
  overflow: hidden !important;
}

.affiliationtime-logo .custom-logo-link img,
.affiliationtime-logo .custom-logo {
  height: 36px !important;
  width: auto !important;
  max-width: 200px !important;
  max-height: 36px !important;
  display: block !important;
  object-fit: contain !important;
  object-position: left center !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: translateX(-5px) !important;
}

/* Titre texte à côté du logo */
.affiliationtime-site-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}

.affiliationtime-nav-links {
  display: flex; gap: 40px; list-style: none; margin: 0; padding: 0;
}

/* wp_nav_menu() génère des <li> avec des classes WP — on sélectionne les liens générés aussi */
.affiliationtime-nav-links > li > a,
.affiliationtime-nav-links a {
  color: var(--text); text-decoration: none;
  font-size: 16px; font-weight: 500;
  opacity: 0.85; transition: opacity .2s, color .2s;
}

.affiliationtime-nav-links a:hover { opacity: 1; color: var(--accent); }

/* Sous-menus (dropdown) */
.affiliationtime-nav-links li {
  position: relative;
}

.affiliationtime-nav-links .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: rgba(245, 245, 247, 0.85) !important;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  padding: 8px 0;
  margin: 0;
  min-width: 200px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 1000;
}

/* Retirer le backdrop-filter de la navbar au hover pour permettre le blur du sous-menu */
.affiliationtime-nav-links li:hover {
  position: relative;
}

.affiliationtime-navbar:has(.menu-item-has-children:hover) {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(255, 255, 255, 0.95) !important;
}

.affiliationtime-navbar:has(.menu-item-has-children:hover) .sub-menu {
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

.affiliationtime-nav-links li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.affiliationtime-nav-links .sub-menu li {
  margin: 0;
  padding: 0;
}

.affiliationtime-nav-links .sub-menu a {
  display: block;
  padding: 10px 20px;
  font-size: 15px;
  color: var(--text);
  opacity: 1;
  transition: background 0.2s, color 0.2s;
}

.affiliationtime-nav-links .sub-menu a:hover {
  background: var(--bg-alt);
  color: var(--accent);
}

/* Flèche indicateur pour items avec sous-menu */
.affiliationtime-nav-links .menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 6px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  vertical-align: middle;
  opacity: 0.6;
}

.affiliationtime-burger {
  display: none;
  width: 44px; height: 44px;
  border: none; background: transparent;
  cursor: pointer; padding: 0;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
  border-radius: 10px; transition: background .2s;
}

.affiliationtime-burger:hover { background: var(--bg-alt); }

.affiliationtime-burger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .3s, opacity .2s;
}

.affiliationtime-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.affiliationtime-burger.open span:nth-child(2) { opacity: 0; }
.affiliationtime-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.affiliationtime-mobile-menu {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(100vh - 72px) !important;
  height: calc(100dvh - 72px) !important;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  z-index: 999;
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: transform .3s, opacity .25s;
  overflow-y: auto;
}

.affiliationtime-mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.affiliationtime-mobile-menu ul,
.affiliationtime-mobile-links {
  list-style: none; padding: 24px; margin: 0;
  display: flex; flex-direction: column; gap: 4px;
}

.affiliationtime-mobile-menu a {
  display: block !important; color: var(--text) !important; text-decoration: none;
  font-size: 22px; font-weight: 600;
  letter-spacing: -0.02em;
  padding: 16px 8px;
  border-bottom: 1px solid var(--border);
  opacity: 1 !important;
  visibility: visible !important;
}

.affiliationtime-mobile-menu li {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.affiliationtime-mobile-menu .sub-menu {
  position: static !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 0 0 20px !important;
  margin: 0 !important;
  backdrop-filter: none !important;
}

.affiliationtime-mobile-menu .sub-menu a {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-muted) !important;
}

body.menu-open { overflow: hidden; }
body.admin-bar .affiliationtime-navbar { top: 32px; }
@media (max-width: 782px) { body.admin-bar .affiliationtime-navbar { top: 46px; } }

/* ========== HERO LISTING ========== */
.affiliationtime-hero {
  text-align: center;
  padding: 100px 24px 80px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.affiliationtime-hero h1 {
  font-size: clamp(40px, 6vw, 64px) !important;
  font-weight: 700 !important;
  letter-spacing: -0.04em !important;
  line-height: 1.05 !important;
  color: var(--accent) !important;
  margin: 0 0 20px !important;
}

.affiliationtime-hero-subtitle {
  font-size: 24px !important;
  font-weight: 400;
  color: var(--text-muted) !important;
  max-width: 920px; margin: 0 auto 40px !important;
  letter-spacing: -0.01em;
}

.affiliationtime-hero-meta {
  display: inline-flex; gap: 16px;
  color: var(--text-muted); font-size: 14px;
  flex-wrap: wrap; justify-content: center;
}

/* ========== RANKING SECTION ========== */
.affiliationtime-ranking {
  background: var(--bg-alt);
  padding: 80px 24px;
  /* Full-bleed : sort du conteneur pour aller pleine largeur */
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.affiliationtime-ranking-container { max-width: 1200px; margin: 0 auto; }

.affiliationtime-section-header { text-align: center; margin-bottom: 56px; }

.affiliationtime-section-header h2 {
  font-size: clamp(32px, 4vw, 44px) !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  color: var(--accent) !important;
  margin: 0 0 12px !important;
}

.affiliationtime-section-header p {
  font-size: 18px;
  color: var(--text-muted);
  letter-spacing: -0.01em;
  margin: 0;
}

.affiliationtime-ranking-list {
  display: flex; flex-direction: column; gap: 14px;
}

/* ----- Vpn row ----- */
.vpn-row {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 24px;
  display: grid;
  grid-template-columns: 50px 130px 1.3fr 1fr 1fr 1fr 1fr 44px 150px;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}

.vpn-row:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.rank-badge {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
}

.rank-badge.gold {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
}

.vpn-logo {
  width: 120px; height: 60px;
  border-radius: 12px;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  letter-spacing: -0.02em;
  flex-shrink: 0; padding: 0 8px;
  text-align: center;
}

.vpn-logo.alt {
  background: #fff;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}

.vpn-info h3 {
  font-size: 19px !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em;
  color: var(--accent) !important;
  margin: 0 0 4px !important;
}

.vpn-info a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}

.vpn-info a:hover { color: var(--text); }

.vpn-stat { text-align: center; }

.vpn-stat-value {
  font-size: 17px; font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}

.vpn-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.vpn-fav {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
  transition: background .2s, color .2s;
}

.vpn-fav:hover { background: var(--bg-alt); color: var(--accent); }
.vpn-fav svg { width: 22px; height: 22px; }

.vpn-cta {
  background: var(--accent); color: #fff !important;
  padding: 12px 20px;
  border-radius: 980px;
  font-size: 14px; font-weight: 600;
  text-decoration: none !important;
  text-align: center;
  transition: background .2s, transform .1s;
  border: none;
}

.vpn-cta:hover {
  background: var(--accent-hover);
  transform: scale(1.03);
  color: #fff !important;
}

/* ===== TABLET (1024px) — 4 stats en 2x2 ===== */
@media (max-width: 1024px) {
  .vpn-row {
    grid-template-columns: 48px 110px 1fr 1fr 130px;
    grid-template-areas:
      "rank logo info  info  cta"
      "rank logo stat1 stat2 cta"
      "rank logo stat3 stat4 cta";
    column-gap: 14px;
    row-gap: 10px;
    padding: 18px 20px;
  }
  .vpn-row .rank-badge   { grid-area: rank; align-self: center; }
  .vpn-row .vpn-logo     { grid-area: logo; align-self: center; }
  .vpn-row .vpn-info     { grid-area: info; }
  .vpn-row .vpn-stat:nth-of-type(1) { grid-area: stat1; display: block; }
  .vpn-row .vpn-stat:nth-of-type(2) { grid-area: stat2; display: block; }
  .vpn-row .vpn-stat:nth-of-type(3) { grid-area: stat3; display: block; }
  .vpn-row .vpn-stat:nth-of-type(4) { grid-area: stat4; display: block; }
  .vpn-row .vpn-fav      { display: none; }
  .vpn-row .vpn-cta      { grid-area: cta; align-self: center; }
}

/* ===== MOBILE (700px) — Carte verticale empilée ===== */
@media (max-width: 700px) {
  .vpn-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "rank rank"
      "logo logo"
      "info info"
      "stat1 stat2"
      "stat3 stat4"
      "cta cta";
    gap: 12px;
    padding: 24px 20px;
    text-align: center;
  }

  .vpn-row .rank-badge {
    grid-area: rank;
    width: 44px; height: 44px;
    font-size: 17px;
    margin: 0 auto;
  }

  .vpn-row .vpn-logo {
    grid-area: logo;
    width: 100%;
    max-width: 280px;
    height: 56px;
    margin: 0 auto;
    padding: 0 20px;
  }

  .vpn-row .vpn-info { grid-area: info; text-align: center; }
  .vpn-row .vpn-info h3 { font-size: 22px !important; margin: 0 0 4px !important; }

  .vpn-row .vpn-stat:nth-of-type(1) { grid-area: stat1; display: block; }
  .vpn-row .vpn-stat:nth-of-type(2) { grid-area: stat2; display: block; }
  .vpn-row .vpn-stat:nth-of-type(3) { grid-area: stat3; display: block; }
  .vpn-row .vpn-stat:nth-of-type(4) { grid-area: stat4; display: block; }

  .vpn-row .vpn-stat {
    padding: 14px 8px;
    background: var(--bg-alt);
    border-radius: 12px;
  }

  .vpn-row .vpn-fav { display: none; }

  .vpn-row .vpn-cta {
    grid-area: cta;
    padding: 14px 24px;
    font-size: 15px;
    margin-top: 4px;
  }
}

/* ========== REVIEW HERO ========== */
.review-hero {
  background: var(--bg);
  padding: 80px 24px 30px;
  border-bottom: 1px solid var(--border);
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.review-hero-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.review-hero .badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px; font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}

.review-hero h1 {
  font-size: clamp(36px, 5vw, 56px) !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.1 !important;
  color: var(--accent) !important;
  margin: 0 0 20px !important;
}

.review-meta {
  color: var(--text-muted);
  font-size: 14px;
  display: flex; gap: 12px; flex-wrap: wrap;
}

/* ========== PRODUCT CARD ========== */
.product-card-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 0;
}

.lede {
  font-size: 19px !important;
  line-height: 1.55 !important;
  color: var(--text-muted) !important;
  margin: 0 0 36px !important;
  letter-spacing: -0.01em;
}

.product-card {
  background: var(--bg-alt);
  border-radius: 24px;
  padding: 32px;
  display: grid;
  grid-template-columns: 200px 1fr 280px;
  gap: 32px;
  align-items: center;
}

.product-logo {
  width: 200px; height: 140px;
  border-radius: 18px;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.02em;
}

.product-info h2 {
  font-size: 28px !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  color: var(--accent) !important;
  margin: 0 0 8px !important;
}

.product-info .tagline {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0 0 16px;
}

.stars {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}

.stars-row { display: flex; gap: 2px; color: var(--accent); }
.stars-row svg { width: 18px; height: 18px; }

.stars-score { font-size: 15px; font-weight: 600; color: var(--text); }
.stars-count { font-size: 13px; color: var(--text-muted); }

.product-stats {
  display: flex; gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
}

.product-cta {
  display: flex; flex-direction: column;
  gap: 10px; align-items: stretch;
}

.price-tag { text-align: center; padding: 8px 0; }

.price-tag .from {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.price-tag .price {
  font-size: 36px; font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 4px 0;
}

.price-tag .period {
  font-size: 13px;
  color: var(--text-muted);
}

.cta-btn {
  background: var(--accent); color: #fff !important;
  border: none;
  padding: 16px 24px;
  border-radius: 980px;
  font-size: 15px; font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .1s;
  text-decoration: none !important;
  text-align: center;
  display: inline-block;
}

.cta-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.02);
  color: #fff !important;
}

.cta-btn.secondary {
  background: transparent;
  color: var(--accent) !important;
  border: 1.5px solid var(--accent);
  padding: 14.5px 24px;
}

.cta-btn.secondary:hover {
  background: var(--accent-soft);
  color: var(--accent) !important;
}

.guarantee {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .product-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .product-logo { margin: 0 auto; }
  .product-stats { justify-content: center; }
}

/* ========== ARTICLE LAYOUT (review) ========== */
.article-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 28px 80px;
}

.article-main { min-width: 0; }

@media (max-width: 768px) {
  .article-wrap { padding: 0 20px 60px; }
}

/* ========== DISCLOSURE ========== */
.disclosure {
  background: var(--bg-alt);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 32px 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

.disclosure strong { color: var(--text); }

/* ========== AUTHOR ========== */
.author-block {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 32px 0;
}

.author-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--bg-alt);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px;
  letter-spacing: -0.02em;
}

.author-info .name {
  font-size: 15px; font-weight: 600;
  color: var(--text);
}

.author-info .role {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ========== TL;DR ========== */
.tldr {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 24px 28px;
  margin: 40px 0;
}

.tldr h3 {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--accent) !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 10px !important;
}

.tldr p {
  font-size: 17px !important;
  color: var(--sidebar-text) !important;
  line-height: 1.6 !important;
  margin: 0 !important;
}

/* ========== SCORES GRID ========== */
.scores-section { margin: 60px 0 40px; }

.scores-section h2 {
  font-size: clamp(28px, 3vw, 36px) !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  color: var(--accent) !important;
  margin: 0 0 16px !important;
}

.scores-section > p {
  font-size: 16px;
  color: var(--text);
  margin-bottom: 28px;
}

.scores-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.score-row {
  background: var(--bg-alt);
  border-radius: 14px;
  padding: 18px 20px;
}

.score-label {
  font-size: 15px; font-weight: 500;
  color: var(--text);
  display: flex; justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.score-label .value {
  color: var(--accent);
  font-weight: 700;
  font-size: 16px;
}

.score-bar {
  height: 6px;
  background: rgba(0,0,0,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width .8s ease;
}

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

/* ========== PROS / CONS ========== */
.proscons-section { margin: 60px 0 40px; }

.proscons-section h2 {
  font-size: clamp(28px, 3vw, 36px) !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  color: var(--accent) !important;
  margin: 0 0 28px !important;
}

.proscons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.pros, .cons {
  background: var(--bg-alt);
  border-radius: 18px;
  padding: 28px;
}

.pros h3, .cons h3 {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: var(--accent) !important;
  margin: 0 0 18px !important;
}

.pros ul, .cons ul {
  list-style: none; padding: 0; margin: 0;
}

.pros li, .cons li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 14px;
  color: var(--text);
}

.pros .check {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #d1fae5; color: #059669;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
  flex-shrink: 0;
  margin-top: 1px;
}

.cons .cross {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fee2e2; color: #dc2626;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
  flex-shrink: 0;
  margin-top: 1px;
}

@media (max-width: 700px) {
  .proscons { grid-template-columns: 1fr; }
}

/* ========== CONTENU GUTENBERG (.affiliationtime-prose) ========== */
.affiliationtime-prose {
  max-width: 100%;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
}

/* Listing : centrer le contenu Gutenberg (mais pas pour review ni guide) */
.affiliationtime-page:not(.affiliationtime-review):not(.affiliationtime-guide) .affiliationtime-prose {
  max-width: 960px;
  margin: 0 auto !important;
  padding: 60px 24px !important;
}

/* Guide : pas de padding (le wrapper article-body gère déjà l'espacement) */
.affiliationtime-guide .affiliationtime-prose {
  max-width: 100%;
  margin: 0 !important;
  padding: 0 !important;
}

.affiliationtime-prose p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 1.2em;
}

.affiliationtime-prose h2 {
  font-size: clamp(28px, 3.5vw, 40px) !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  color: var(--accent) !important;
  margin: 60px 0 24px !important;
  line-height: 1.15;
}

.affiliationtime-prose h3 {
  font-size: clamp(20px, 2.4vw, 26px) !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  color: var(--text) !important;
  margin: 40px 0 16px !important;
}

.affiliationtime-prose a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(51, 67, 235, 0.2);
  transition: border-color .2s;
}

.affiliationtime-prose a:hover { border-bottom-color: var(--accent); }

/* Tables */
/* ========================================================
   TABLEAUX (style propre — fond clair, en-tête bleu pâle)
   ======================================================== */
.affiliationtime-prose .wp-block-table,
.affiliationtime-prose figure.wp-block-table {
  margin: 40px 0 !important;
  border-radius: 18px !important;
  overflow: hidden;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

.affiliationtime-prose table {
  margin: 0 !important;
  border-radius: 18px !important;
  overflow: hidden;
  background: var(--bg-alt) !important;
  border: none !important;
}

.affiliationtime-prose table {
  border-collapse: collapse;
  width: 100%;
  border: none !important;
}

/* En-tête : fond bleu pâle, texte bleu accent en uppercase */
.affiliationtime-prose table thead,
.affiliationtime-prose table thead tr {
  background: var(--accent-soft) !important;
}

.affiliationtime-prose table th {
  font-weight: 700 !important;
  text-align: left !important;
  padding: 22px 28px !important;
  color: var(--accent) !important;
  font-size: 13px !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: none !important;
  background: var(--accent-soft) !important;
  vertical-align: middle;
}

/* Cellules : fond gris très clair, séparateurs subtils */
.affiliationtime-prose table td {
  padding: 22px 28px !important;
  border: none !important;
  border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
  font-size: 16px !important;
  vertical-align: middle;
  color: var(--text-muted) !important;
  background: var(--bg-alt) !important;
  line-height: 1.5;
}

/* Pas de bordure entre le thead et la première ligne du tbody */
.affiliationtime-prose table tbody tr:first-child td {
  border-top: none !important;
}

/* Reset agressif : éliminer toutes les bordures héritées */
.affiliationtime-prose table,
.affiliationtime-prose table tr,
.affiliationtime-prose table thead,
.affiliationtime-prose table thead tr,
.affiliationtime-prose table thead th,
.affiliationtime-prose table tbody,
.affiliationtime-prose table tbody tr {
  border: none !important;
  border-top: none !important;
  border-bottom: none !important;
  border-left: none !important;
  border-right: none !important;
  box-shadow: none !important;
}

/* Restaurer uniquement les séparateurs entre lignes du tbody (sauf la première) */
.affiliationtime-prose table tbody tr:not(:first-child) td {
  border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
}

.affiliationtime-prose table tbody tr:first-child td {
  border-top: 0 !important;
}

/* Première colonne en gras noir (USAGE) */
.affiliationtime-prose table tbody td:first-child {
  color: var(--text) !important;
  font-weight: 600 !important;
}

/* Hover subtil */
.affiliationtime-prose table tbody tr:hover td {
  background: #ebebee !important;
}

.affiliationtime-prose table strong {
  color: var(--text) !important;
  font-weight: 600 !important;
}

/* Suppression des marges Gutenberg sur les figures de tableau */
.affiliationtime-prose figure.wp-block-table {
  padding: 0 !important;
}

@media (max-width: 768px) {
  .affiliationtime-prose table th,
  .affiliationtime-prose table td {
    padding: 16px 18px !important;
    font-size: 14px !important;
  }
}

/* Colonnes (cartes) */
.affiliationtime-prose .wp-block-columns {
  margin: 40px 0 !important;
  gap: 20px;
}

.affiliationtime-prose .wp-block-column {
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
}

.affiliationtime-prose .wp-block-column:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.affiliationtime-prose .wp-block-column h3 {
  margin: 0 0 12px !important;
  color: var(--text) !important;
}

.affiliationtime-prose .wp-block-column p {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 0;
}

/* Listes */
.affiliationtime-prose ul, .affiliationtime-prose ol {
  padding-left: 28px;
  margin: 20px 0 28px;
}

.affiliationtime-prose ul li, .affiliationtime-prose ol li {
  margin-bottom: 10px;
  font-size: 17px;
  line-height: 1.65;
}

.affiliationtime-prose ul li::marker { color: var(--accent); }

/* Citations */
.affiliationtime-prose blockquote, .affiliationtime-prose .wp-block-quote {
  background: var(--bg-alt);
  border-left: 4px solid var(--accent) !important;
  border-radius: 12px;
  padding: 22px 28px !important;
  margin: 36px 0 !important;
}

.affiliationtime-prose blockquote p {
  margin: 0;
  font-size: 17px;
  line-height: 1.6;
}

/* Code & kbd */
.affiliationtime-prose code, .affiliationtime-prose kbd {
  background: var(--bg-alt);
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.92em;
  font-family: 'SF Mono', 'Menlo', 'Monaco', monospace;
  color: var(--accent);
  border: 1px solid var(--border);
}

.affiliationtime-prose kbd {
  font-weight: 600;
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

/* ========== FOOTER ========== */
/* ============================================================
   FOOTER — 4 colonnes (brand + 3 menus) sur fond bleu
   ============================================================ */
.affiliationtime-footer {
  background: var(--accent);
  color: #fff;
  padding: 80px 24px 40px;
  margin-top: 100px;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.affiliationtime-footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.affiliationtime-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 56px;
}

/* Bloc brand (gauche) */
.affiliationtime-footer-brand-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin-bottom: 18px;
}

.affiliationtime-footer-tagline {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
  max-width: 320px;
}

/* Colonnes de liens */
.affiliationtime-footer-col-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 24px;
}

.affiliationtime-footer-col-links {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.affiliationtime-footer-col-links li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.affiliationtime-footer-col-links li::marker { display: none !important; content: "" !important; }

.affiliationtime-footer-col-links a {
  color: rgba(255, 255, 255, 0.85) !important;
  text-decoration: none !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  border: none !important;
  transition: color .2s;
}

.affiliationtime-footer-col-links a:hover {
  color: #fff !important;
}

/* Bottom bar */
.affiliationtime-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.affiliationtime-footer-copyright,
.affiliationtime-footer-legal {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.affiliationtime-footer-legal {
  text-align: right;
}

/* Menu légal : items en ligne séparés par · */
.affiliationtime-footer-legal-menu {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0;
  justify-content: flex-end;
}

.affiliationtime-footer-legal-menu li {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
}

.affiliationtime-footer-legal-menu li::marker { display: none !important; content: "" !important; }

.affiliationtime-footer-legal-menu li + li::before {
  content: " · ";
  color: rgba(255, 255, 255, 0.5);
  margin: 0 10px;
}

.affiliationtime-footer-legal-menu a {
  color: rgba(255, 255, 255, 0.7) !important;
  text-decoration: none !important;
  font-size: 14px !important;
  border: none !important;
  transition: color .2s;
}

.affiliationtime-footer-legal-menu a:hover {
  color: #fff !important;
}

@media (max-width: 900px) {
  .affiliationtime-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px 32px;
  }
  .affiliationtime-footer-brand {
    grid-column: 1 / -1;
    margin-bottom: 8px;
  }
}

@media (max-width: 600px) {
  .affiliationtime-footer { padding: 60px 20px 32px; }
  .affiliationtime-footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .affiliationtime-footer-bottom {
    flex-direction: column;
    text-align: center;
  }
  .affiliationtime-footer-legal { text-align: center; }
  .affiliationtime-footer-legal-menu { justify-content: center; }
}

@media (max-width: 768px) {
  .affiliationtime-nav-links { display: none; }
  .affiliationtime-burger { display: flex; }
  .affiliationtime-nav-container { padding: 0 20px; height: 64px; }
  .affiliationtime-mobile-menu { top: 64px; }
  .affiliationtime-hero { padding: 60px 20px 40px; }
  .affiliationtime-ranking { padding: 50px 16px; }
  .review-hero { padding: 50px 20px 24px; }
  .product-card-wrap { padding: 30px 20px 0; }
  .product-card { padding: 24px; }
  .article-wrap { padding: 0 20px 60px; }
}

/* ========================================================
   NOUVEAUX COMPOSANTS v3.2
   ======================================================== */

/* ---------- FIL D'ARIANE ---------- */
.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 24px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color .2s;
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb .sep {
  color: var(--border);
}

.breadcrumb .current {
  color: var(--text);
  font-weight: 500;
}

/* ---------- LOGOS UPLOADÉS (img) ---------- */
.vpn-logo.has-image,
.product-logo.has-image {
  background: transparent !important;
  border: none;
  padding: 0;
  overflow: hidden;
}

.vpn-logo.has-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
}

.product-logo.has-image {
  width: 200px;
  height: 140px;
}

.product-logo.has-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  border-radius: 12px;
  height: auto;
  object-fit: contain;
}

/* ---------- AUTHOR BLOCK (avatar Gravatar) ---------- */
.author-block .author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-alt);
  flex-shrink: 0;
}

.author-block .author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- FAQ (accordéon) ---------- */
.faq-section {
  margin: 80px 0 40px;
}

.faq-section h2 {
  font-size: clamp(32px, 4vw, 44px) !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  color: var(--accent) !important;
  margin: 0 0 32px !important;
  line-height: 1.1;
}

.faq-list {
  display: flex;
  flex-direction: column;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  padding: 24px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 19px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  letter-spacing: -0.01em;
  font-family: inherit;
  transition: color .2s;
}

.faq-question:hover {
  color: var(--accent);
}

.faq-icon {
  color: var(--accent);
  font-size: 24px;
  font-weight: 400;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform .3s;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
  padding: 0 8px 24px;
}

.faq-answer p {
  font-size: 16px !important;
  line-height: 1.65 !important;
  color: var(--text) !important;
  margin: 0 !important;
}

/* ---------- RECOMMANDATION FINALE ---------- */
.reco-section {
  margin: 60px 0 40px;
}

.reco-card {
  background: var(--accent);
  color: #fff;
  border-radius: 28px;
  padding: 48px 40px;
  text-align: center;
  /* Empêche le stretch vertical : la card ne fait que la hauteur de son contenu */
  display: block;
  height: auto;
  min-height: 0;
}

.reco-card > * {
  margin-left: auto;
  margin-right: auto;
}

.reco-score {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 999px;
  margin: 0 auto 20px;
  backdrop-filter: blur(10px);
}

.reco-score svg {
  width: 16px;
  height: 16px;
}

.reco-card h2 {
  font-size: clamp(32px, 4vw, 44px) !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  color: #fff !important;
  margin: 0 0 20px !important;
  line-height: 1.1;
}

.reco-card p {
  font-size: 17px !important;
  line-height: 1.6 !important;
  color: rgba(255, 255, 255, 0.92) !important;
  max-width: 640px;
  margin: 0 auto 32px !important;
}

.reco-btn {
  display: inline-block;
  background: #fff;
  color: var(--accent) !important;
  text-decoration: none !important;
  padding: 18px 36px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: transform .15s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.reco-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  color: var(--accent) !important;
}

@media (max-width: 600px) {
  .reco-card {
    padding: 40px 24px;
    border-radius: 20px;
  }
}

/* ========================================================
   SECTIONS MÉTHODE + FAQ DANS LE LISTING (home)
   ======================================================== */
.affiliationtime-prose-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.affiliationtime-prose-section .reco-section {
  margin: 20px 0 40px;
  display: block;
  min-height: 0;
}

.affiliationtime-prose-section .faq-section {
  margin: 40px 0 60px;
}

@media (max-width: 768px) {
  .affiliationtime-prose-section { padding: 0 20px; }
}

/* ========================================================
   TRUST SIGNALS (3 cartes "Pourquoi nous faire confiance")
   ======================================================== */
.trust-section {
  padding: 80px 24px;
  background: var(--bg);
}

.trust-container {
  max-width: 1200px;
  margin: 0 auto;
}

.trust-section .affiliationtime-section-header {
  text-align: center;
  margin-bottom: 48px;
}

.trust-section .affiliationtime-section-header h2 {
  font-size: clamp(32px, 4vw, 44px) !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  color: var(--accent) !important;
  margin: 0 !important;
  line-height: 1.1;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.trust-card {
  background: var(--bg-alt);
  border-radius: 24px;
  padding: 32px 32px;
  transition: transform .2s ease, box-shadow .2s ease;
}

.trust-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* Header : icône + titre côte à côte */
.trust-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.trust-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trust-icon svg {
  width: 24px;
  height: 24px;
}

.trust-card h3 {
  font-size: 20px !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  color: var(--accent) !important;
  margin: 0 !important;
  line-height: 1.25;
}

.trust-card p {
  font-size: 16px !important;
  line-height: 1.6 !important;
  color: var(--text-muted) !important;
  margin: 0 !important;
}

@media (max-width: 900px) {
  .trust-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .trust-section { padding: 60px 20px; }
  .trust-card { padding: 28px 24px; }
}

/* ========================================================
   TEMPLATE GUIDE / ARTICLE ÉDITORIAL
   ======================================================== */

/* Reading progress bar */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(0,0,0,0.05);
  z-index: 1001;
  pointer-events: none;
}

.reading-progress-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.1s linear;
}

body.admin-bar .reading-progress { top: 32px; }
@media (max-width: 782px) { body.admin-bar .reading-progress { top: 46px; } }

/* GUIDE HERO */
.guide-hero {
  background: var(--bg);
  padding: 60px 24px 40px;
  border-bottom: 1px solid var(--border);
}

.guide-hero-inner {
  max-width: 960px;
  margin: 0 auto !important;
}

.article-header {
  margin-top: 24px;
}

.category-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
  text-decoration: none;
}

.category-tag svg { color: var(--accent); }

.article-header h1 {
  font-size: clamp(36px, 5vw, 56px) !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.1 !important;
  color: var(--text) !important;
  margin: 0 0 20px !important;
}

.article-header .lede {
  font-size: 21px !important;
  line-height: 1.55 !important;
  color: var(--text-muted) !important;
  margin: 0 0 32px !important;
  letter-spacing: -0.01em;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-muted);
}

.article-meta .author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.article-meta .author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-alt);
  flex-shrink: 0;
}

.article-meta .author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-meta .name {
  color: var(--text);
  font-weight: 600;
}

.article-meta .dot {
  color: var(--border);
}

/* COVER */
.guide-cover-wrap {
  max-width: 1100px;
  margin: 40px auto 0 !important;
  padding: 0 24px;
}

.article-cover {
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent), #5a66f0);
  aspect-ratio: 16 / 7;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Si une image mise en avant est définie : pas de dégradé, image full */
.article-cover.has-image {
  background: var(--bg-alt);
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cover-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cover-icon {
  width: 100px;
  height: 100px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.cover-icon svg { width: 50px; height: 50px; }

/* ARTICLE BODY */
.affiliationtime-guide .article-wrap-full {
  max-width: 960px;
  margin: 0 auto !important;
  padding: 60px 24px 40px;
}

.article-body { min-width: 0; }

/* TAKEAWAYS — bloc "L'essentiel à retenir" */
.takeaways {
  background: var(--bg-alt);
  border-radius: 18px;
  padding: 28px 32px;
  margin: 60px 0 24px !important;
  display: block !important;
}

/* Reset du 1er enfant du contenu Gutenberg pour éviter margin parasite */
.article-body .entry-content > *:first-child,
.article-body .affiliationtime-prose > *:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.takeaways h2 {
  font-size: 14px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent) !important;
  margin: 0 0 16px !important;
}

.takeaways ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.takeaways li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
}

.takeaways li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 16px;
}

/* ========================================================
   CALLOUTS (Patterns Gutenberg + shortcodes)
   3 variantes : tip (vert), warning (ambre), info (bleu)
   Structure : .callout.{type} contenant un titre (strong / .callout-title)
   et du texte
   ======================================================== */
.callout,
.wp-block-group.callout {
  border-radius: 16px !important;
  padding: 24px 32px !important;
  margin: 28px 0 !important;
  position: relative;
  border: none !important;
  border-left: none !important;
  background: var(--bg-alt);
}

/* Reset agressif des marges internes (à TOUS les niveaux, pas juste enfants directs) */
.callout *,
.wp-block-group.callout * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Icône + titre sur la même ligne via ::before sur le strong */
.callout strong,
.callout .callout-title,
.callout > p:first-child strong:first-child {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 8px !important;
  line-height: 1.3;
}

/* Icône avant le titre via ::before sur le strong */
.callout strong::before,
.callout .callout-title::before,
.callout > p:first-child strong:first-child::before {
  content: "";
  display: inline-flex;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 22px 22px;
}

/* On supprime le ::before du wrapper (plus utilisé) */
.callout::before { display: none !important; }

/* IMPORTANT : Gutenberg wrappe nos blocs dans .wp-block-group__inner-container.
   On cible les <p> via cet inner-container OU directement (si pas d'inner). */

.callout p,
.callout .wp-block-group__inner-container > p {
  margin: 0 !important;
  font-size: 16px !important;
  line-height: 1.65 !important;
  color: var(--text) !important;
}

/* Reset : aucun <p> n'a de padding par défaut */
.callout p {
  padding-left: 0 !important;
}

/* Le 1er paragraphe (titre) reste sans padding */
.callout > p:first-child,
.callout > .wp-block-group__inner-container > p:first-child {
  padding-left: 0 !important;
}

/* TOUS les <p> qui suivent le titre ont 32px de padding-left */
.callout > p:first-child ~ p,
.callout > .wp-block-group__inner-container > p:first-child ~ p {
  padding-left: 32px !important;
  margin-top: 8px !important;
}

/* Listes, headings, blockquote dans le callout (eux aussi à indenter) */
.callout > .wp-block-group__inner-container > ul,
.callout > .wp-block-group__inner-container > ol,
.callout > .wp-block-group__inner-container > h2,
.callout > .wp-block-group__inner-container > h3,
.callout > .wp-block-group__inner-container > h4,
.callout > .wp-block-group__inner-container > blockquote,
.callout > ul,
.callout > ol,
.callout > h3 {
  padding-left: 32px !important;
  margin-left: 0 !important;
  margin-top: 8px !important;
}

/* Reset des marges du wrapper Gutenberg lui-même */
.callout > .wp-block-group__inner-container {
  margin: 0 !important;
  padding: 0 !important;
}

.callout em,
.callout i {
  font-style: italic;
}

.callout a {
  color: var(--accent) !important;
  text-decoration: underline !important;
  border: none !important;
}

.callout code {
  background: rgba(0,0,0,0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.92em;
  border: none !important;
  color: var(--text) !important;
}

/* === TIP / NOTRE CONSEIL — Vert ampoule === */
.callout.tip {
  background: #ecfdf5;
}
.callout.tip strong,
.callout.tip .callout-title,
.callout.tip > p:first-child strong:first-child {
  color: #047857;
}
.callout.tip p,
.callout.tip { color: #064e3b; }
.callout.tip strong::before,
.callout.tip .callout-title::before,
.callout.tip > p:first-child strong:first-child::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23047857' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 22h4M12 2a7 7 0 00-4 12.7c.7.5 1 1 1 2v.3h6V17c0-1 .3-1.5 1-2A7 7 0 0012 2z'/%3E%3C/svg%3E");
}

/* === WARNING / À SURVEILLER — Ambre triangle === */
.callout.warning {
  background: #fff7ed;
}
.callout.warning strong,
.callout.warning .callout-title,
.callout.warning > p:first-child strong:first-child {
  color: #b45309;
}
.callout.warning p,
.callout.warning { color: #7c2d12; }
.callout.warning strong::before,
.callout.warning .callout-title::before,
.callout.warning > p:first-child strong:first-child::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b45309' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0zM12 9v4M12 17h.01'/%3E%3C/svg%3E");
}

/* === INFO / BON À SAVOIR — Bleu i === */
.callout.info {
  background: #eef0ff;
}
.callout.info strong,
.callout.info .callout-title,
.callout.info > p:first-child strong:first-child {
  color: var(--accent);
}
.callout.info p,
.callout.info { color: #1e1b4b; }
.callout.info strong::before,
.callout.info .callout-title::before,
.callout.info > p:first-child strong:first-child::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233343EB' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E");
}

@media (max-width: 600px) {
  .callout, .wp-block-group.callout {
    padding: 14px 16px !important;
  }
}

/* ========================================================
   STEPS — Card avec fond gris, numéro bleu rond à gauche
   ======================================================== */
.step,
.wp-block-group.step {
  display: flex !important;
  flex-direction: row !important;
  gap: 28px !important;
  margin: 24px 0 !important;
  align-items: flex-start !important;
  background: var(--bg-alt) !important;
  border-radius: 18px !important;
  padding: 32px 36px !important;
}

/* Reset du wrapper Gutenberg interne pour le step (comme pour les callouts) */
.step > .wp-block-group__inner-container {
  display: contents !important;
}

/* Reset des marges Gutenberg dans le step */
.step *,
.wp-block-group.step * {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* NUMÉRO : cercle bleu */
.step-number,
.step .step-number,
.step p.step-number,
.wp-block-group.step .step-number {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  background: var(--accent) !important;
  color: #fff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

/* CONTENU : titre + paragraphes à droite */
.step-content,
.wp-block-group.step-content {
  flex: 1 !important;
  min-width: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

/* Reset wrapper interne du step-content */
.step-content > .wp-block-group__inner-container {
  display: contents !important;
}

.step-content h3,
.step-content > .wp-block-group__inner-container > h3 {
  font-size: 22px !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  color: var(--text) !important;
  margin: 4px 0 14px !important;
  line-height: 1.25 !important;
}

.step-content p,
.step-content > .wp-block-group__inner-container > p {
  font-size: 16px !important;
  line-height: 1.65 !important;
  color: var(--text-muted) !important;
  margin: 0 0 14px !important;
}

.step-content p:last-child,
.step-content > .wp-block-group__inner-container > p:last-child {
  margin-bottom: 0 !important;
}

/* Code inline dans les steps : pilule bleue */
.step-content code {
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
  padding: 2px 8px !important;
  border-radius: 6px !important;
  font-size: 0.92em !important;
  border: none !important;
  font-family: 'SF Mono', 'Menlo', 'Monaco', monospace !important;
}

/* Strong dans les paragraphes du step (mots-clés en gras noir) */
.step-content p strong {
  color: var(--text) !important;
  font-weight: 600 !important;
}

@media (max-width: 600px) {
  .step, .wp-block-group.step {
    gap: 16px !important;
    padding: 24px 20px !important;
    border-radius: 14px !important;
  }
  .step-number, .step .step-number, .step p.step-number {
    width: 40px !important;
    height: 40px !important;
    font-size: 16px !important;
  }
  .step-content h3 { font-size: 19px !important; }
}

/* PULL QUOTE (shortcode) */
.pull-quote {
  border-left: 4px solid var(--accent);
  background: transparent !important;
  border-radius: 0 !important;
  margin: 48px 0 !important;
  padding: 8px 0 8px 24px !important;
}

.pull-quote p {
  font-size: 22px !important;
  line-height: 1.4 !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  letter-spacing: -0.01em !important;
  margin: 0 0 12px !important;
}

.pull-quote cite {
  font-style: normal;
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

/* SHARE BLOCK */
.share-block {
  margin: 64px 0 48px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.share-block .label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.share-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-alt);
  color: var(--text) !important;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s, border-color .2s, color .2s;
}

.share-btn:hover {
  background: #fff;
  border-color: var(--accent);
  color: var(--accent) !important;
}

.share-btn svg {
  flex-shrink: 0;
}

/* AUTHOR CARD étendue */
.author-card {
  background: var(--bg-alt);
  border-radius: 18px;
  padding: 28px;
  margin: 32px 0;
  display: flex;
  gap: 24px;
  align-items: center;
}

.author-card .author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg);
}

.author-card .author-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.author-card .author-info { flex: 1; min-width: 0; }

.author-card .name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.author-card .role {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.author-card .author-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent) !important;
  text-decoration: none !important;
}

.author-card .author-link:hover { color: var(--accent-hover) !important; }

@media (max-width: 600px) {
  .author-card { flex-direction: column; text-align: center; padding: 24px; }
}

/* RELATED */
.related {
  margin: 48px 0;
}

.related h2 {
  font-size: clamp(28px, 3vw, 36px) !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
  color: var(--accent) !important;
  margin: 0 0 24px !important;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.related-card {
  background: var(--bg-alt);
  border-radius: 14px;
  padding: 24px;
  text-decoration: none !important;
  color: var(--text) !important;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .2s, box-shadow .2s;
  position: relative;
  border: none !important;
}

.related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.related-tag {
  display: inline-block;
  background: var(--bg);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  align-self: flex-start;
}

.related-card h3 {
  font-size: 17px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  color: var(--text) !important;
  margin: 0 !important;
  line-height: 1.35;
  flex: 1;
}

.related-arrow {
  font-size: 18px;
  color: var(--accent);
  margin-top: 4px;
}

@media (max-width: 800px) {
  .related-grid { grid-template-columns: 1fr; }
}

/* Compact table (utilisable dans Gutenberg) */
.affiliationtime-prose .compact-table,
.affiliationtime-prose table.compact-table {
  font-size: 14px !important;
}

.affiliationtime-prose .compact-table th,
.affiliationtime-prose .compact-table td {
  padding: 12px 16px !important;
}

/* ========================================================
   SIDEBAR ARTICLE (review + guide) — widgets dynamiques
   ======================================================== */

/* Layout 2 colonnes : article + sidebar à droite */
.article-wrap.article-wrap-with-sidebar {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 60px;
  align-items: stretch; /* stretch = la sidebar prend toute la hauteur de l'article */
  max-width: 1200px !important;
}

/* La sidebar s'étire sur toute la hauteur du grid */
.article-wrap.article-wrap-with-sidebar .article-sidebar {
  align-self: stretch !important;
  height: 100%;
}

.article-wrap.article-wrap-with-sidebar .article-main,
.article-wrap.article-wrap-with-sidebar .article-body {
  min-width: 0;
  max-width: none !important;
}

.article-sidebar {
  position: relative;
  /* align-self: start est appliqué via la règle du grid parent ci-dessus */
}

/* Sticky : la sidebar reste visible au scroll */
.sidebar-sticky {
  position: sticky;
  top: 92px; /* calculé dynamiquement par le JS */
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  /* PAS de max-height ni overflow — ça crée un scroll container qui casse le sticky */
}

/* Avec admin bar */
body.admin-bar .sidebar-sticky { top: 124px; margin-top: 60px; }

/* Wrapper widget commun */
.affiliationtime-widget {
  background: var(--widget-toc-bg);
  border-radius: 18px;
  padding: 20px;
}

.affiliationtime-widget .widget-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  padding: 0 14px;
}

/* ========================================================
   WIDGET 1 : SOMMAIRE (TOC)
   ======================================================== */
/* Widget Sommaire — !important pour battre les styles globaux .affiliationtime-prose */
.affiliationtime-toc-widget ul {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.affiliationtime-toc-widget li {
  border-left: 2px solid transparent;
  margin: 0 !important;
  padding: 0 !important;
  font-size: inherit !important;
  line-height: inherit !important;
  list-style: none !important;
  transition: border-color .2s;
}

.affiliationtime-toc-widget li::marker {
  display: none !important;
  content: "" !important;
}

.affiliationtime-toc-widget li.active,
.affiliationtime-toc-widget li:has(a.active) {
  border-left-color: var(--sidebar-link-hover);
}

.affiliationtime-toc-widget a {
  display: block !important;
  padding: 6px 14px !important;
  margin: 0 !important;
  font-size: 15px !important;
  color: var(--text) !important;
  text-decoration: none !important;
  border: none !important;
  transition: color .2s;
  line-height: 1.4 !important;
}

.affiliationtime-toc-widget a:hover { color: var(--sidebar-link-hover); }

.affiliationtime-toc-widget a.active {
  color: var(--sidebar-link-hover);
  font-weight: 600;
}

.affiliationtime-toc-widget li.toc-sub a {
  padding-left: 28px;
  font-size: 14px;
  color: var(--text-muted);
}

.affiliationtime-toc-widget li.toc-sub a:hover,
.affiliationtime-toc-widget li.toc-sub a.active {
  color: var(--sidebar-link-hover);
}

/* ========================================================
   WIDGET 2 : OFFRE AFFILIÉE
   ======================================================== */
.widget-affiliate {
  background: var(--widget-affiliate-bg);
  border: 1.5px solid var(--accent);
  border-radius: 18px;
  padding: 28px 24px;
  text-align: center;
}

.widget-affiliate-logo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.widget-affiliate-logo.has-image {
  background: transparent;
  border: none;
  padding: 0;
}

.widget-affiliate-logo.has-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.widget-affiliate-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 6px;
}

.widget-affiliate-price {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.widget-affiliate-cta {
  display: block;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none !important;
  padding: 14px 20px;
  border-radius: 980px;
  font-size: 14px;
  font-weight: 600;
  border: none !important;
  transition: background .2s, transform .1s;
}

.widget-affiliate-cta:hover {
  background: var(--accent-hover);
  transform: scale(1.02);
  color: #fff !important;
}

/* Si l'affiliate est dans un .affiliationtime-widget, on neutralise le wrapper */
.affiliationtime-widget:has(.widget-affiliate),
.widget_affiliationtime_affiliate {
  background: transparent !important;
  padding: 0 !important;
}

/* ========================================================
   WIDGET 3 : TEMPS DE LECTURE (barre dynamique)
   ======================================================== */
.widget-reading-time {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--widget-reading-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
}

.widget-reading-time .reading-clock {
  width: 22px;
  height: 22px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.widget-reading-time .reading-time-bar {
  flex: 1;
  height: 6px;
  background: rgba(0,0,0,0.06);
  border-radius: 3px;
  overflow: hidden;
}

.widget-reading-time .reading-time-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.15s linear;
}

/* Si dans un affiliationtime-widget, on neutralise le wrapper */
.affiliationtime-widget:has(.widget-reading-time),
.widget_affiliationtime_reading_time {
  background: transparent !important;
  padding: 0 !important;
}

/* ========================================================
   RESPONSIVE : sidebar passe sous l'article < 1024px
   ======================================================== */
@media (max-width: 1024px) {
  .article-wrap.article-wrap-with-sidebar {
    grid-template-columns: 1fr !important;
    gap: 40px;
  }

  .sidebar-sticky {
    position: static;
    max-height: none;
    overflow: visible;
  }
}


/* ============================================================
   ESPACEMENT TAKEAWAYS
   ============================================================ */
.takeaways {
  margin-top: 60px !important;
  margin-bottom: 48px !important;
}
