/* ============================================================
   ARTICLES RECOMMANDÉS & SIMILAIRES (SINGLE POST & SIDEBAR)
   Conforme BEM, Responsive mobile first & Tokens ClassPro
   ============================================================ */

/* 1. SECTION RECOMMANDATIONS EN FIN D'ARTICLE */
.cp-related-section {
  margin-top: 4.5rem;
  margin-bottom: 4rem;
  padding-top: 3rem;
  border-top: 2px solid #F1F5F9;
}

.cp-related-section__header {
  margin-bottom: 2rem;
}

.cp-related-section__header .cp-section-eyebrow {
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--cp-color-secondary, #EB7630);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}

.cp-related-section__title {
  font-size: var(--cp-h2-size);
  font-weight: 800;
  color: var(--cp-color-primary, #20467B);
  margin: 0;
  line-height: 1.25;
}

/* Grille des cartes recommandées */
.cp-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .cp-related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
}

@media (max-width: 580px) {
  .cp-related-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* Carte individuelle */
.cp-related-card {
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: var(--cp-radius-md, 16px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.cp-related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
  border-color: #CBD5E1;
}

/* Vignette avec badge de catégorie */
.cp-related-card__thumb-link {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0F172A;
  overflow: hidden;
  text-decoration: none;
}

.cp-related-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cp-related-card:hover .cp-related-card__img {
  transform: scale(1.05);
}

.cp-related-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1E3A5F 0%, #0F172A 100%);
  color: rgba(255, 255, 255, 0.35);
  font-size: 2rem;
}

.cp-related-card__cat {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--cp-color-secondary, #EB7630);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.75rem;
  border-radius: var(--cp-radius-pill, 50px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  z-index: 2;
  pointer-events: none;
}

/* Corps de la carte */
.cp-related-card__body {
  padding: 1.25rem 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.cp-related-card__meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: var(--cp-meta-size);
  color: #64748B;
  margin-bottom: 0.65rem;
}

.cp-related-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.cp-related-card__meta i {
  color: var(--cp-color-secondary, #EB7630);
}

.cp-related-card__title {
  font-size: var(--cp-h4-size);
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
  color: var(--cp-color-primary, #20467B);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cp-related-card__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.cp-related-card:hover .cp-related-card__title a {
  color: var(--cp-color-secondary, #EB7630);
}

/* 2. ANCIEN FORMAT COMPACT (POUR WIDGETS ET SIDEBARS ÉVENTUELLES) */
.cp-related-posts {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cp-related-post-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
}

.cp-related-thumb {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  background: #F1F5F9;
}

.cp-related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.cp-related-post-item:hover .cp-related-thumb img {
  transform: scale(1.08);
}

.cp-related-date {
  font-size: 0.78rem;
  color: #94A3B8;
  display: block;
  margin-bottom: 0.2rem;
}

.cp-related-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--cp-color-primary, #20467B);
  margin: 0;
  line-height: 1.35;
  transition: color 0.2s ease;
}

.cp-related-post-item:hover .cp-related-title {
  color: var(--cp-color-secondary, #EB7630);
}

.cp-cta-widget {
  background: linear-gradient(135deg, var(--cp-color-primary) 0%, #0F172A 100%);
  color: #ffffff;
  border: none;
  text-align: center;
  border-radius: 16px;
  padding: 1.75rem;
}

.cp-cta-icon {
  font-size: 2.2rem;
  color: var(--cp-color-secondary);
  margin-bottom: 1rem;
}

.cp-cta-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.65rem;
}

.cp-cta-desc {
  font-size: 1rem;
  color: #94A3B8;
  line-height: 1.55;
  margin: 0 0 1.5rem;
}

.cp-btn-full {
  width: 100%;
  justify-content: center;
  box-sizing: border-box;
}
