/**
 * EHUKA - Blog Cards Styling
 * Style moderne et cohérent avec le reste de la homepage
 */

/* Section blog sur la homepage */
.tvcmsblogdisplayposts {
  padding: 40px 0;
  background: var(--ehuka-yellow);
  margin: 0;
}

/* Titre de section "BLOG" */
.tvcmsblogdisplayposts .tvmain-title-wrapper {
  margin-bottom: 30px;
  text-align: center;
}

.tvcmsblogdisplayposts .tvmain-title h2 {
  font-size: 32px;
  font-weight: 700;
  color: #5d576b;
  margin: 0 0 10px 0;
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.tvcmsblogdisplayposts .tvmain-title h2::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--ehuka-accent) 0%, var(--ehuka-hover) 100%);
  margin: 15px auto 0;
  border-radius: 2px;
}

/* Conteneur des articles */
.tv_blog_post_area,
.tvblog-recent-post-slider-box {
  background: transparent !important;
  padding: 0 !important;
}

.tv_blog_post_inner.products {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 0 !important;
}

/* Lien enveloppant toute la carte - CLIQUABLE */
.ehuka-blog-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Article de blog - Style carte moderne */
article#blog_post.tvblog_post,
article.blog_pos.tvblog-img-content-wrapper {
  margin-bottom: 0 !important;
  padding: 0 !important;
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(93, 87, 107, 0.08);
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Hover sur le LIEN (toute la carte) */
.ehuka-blog-card-link:hover article.blog_pos.tvblog-img-content-wrapper,
article#blog_post.tvblog_post:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
  border-color: rgba(75, 157, 169, 0.3);
}

/* Conteneur principal du contenu */
.blog_post_content.tvblog-event-all-content-block {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: white;
}

/* Force les bords arrondis sur la colonne */
.tvblog-event-all-content-block {
  border-radius: 15px;
  overflow: hidden;
}

/* Wrapper de la carte */
.tvblog-img-content-wrapper {
  border-radius: 15px !important;
  overflow: hidden !important;
}

.tvblog-img-block {
  border-radius: 15px 15px 0 0 !important;
  overflow: hidden !important;
}

/* Image de l'article */
.post_thumbnail.blog_post_content_top {
  position: relative;
  overflow: hidden;
  background: white;
  height: 220px;
  margin: 0;
  border-radius: 15px 15px 0 0; /* Bords arrondis en haut seulement */
}

.post_thumbnail.blog_post_content_top .tvnews-event-hoverbtn,
.post_thumbnail.blog_post_content_top .img_content {
  position: relative;
  height: 100%;
  width: 100%;
  margin: 0;
  display: block;
}

.post_thumbnail.blog_post_content_top img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.ehuka-blog-card-link:hover .post_thumbnail img,
article#blog_post.tvblog_post:hover .post_thumbnail img {
  transform: scale(1.08);
}

/* Overlay au survol */
.tvnews-event-overly {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(112, 215, 116, 0.9) 0%, rgba(75, 157, 169, 0.9) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.ehuka-blog-card-link:hover .tvnews-event-overly,
article#blog_post.tvblog_post:hover .tvnews-event-overly {
  opacity: 1;
}

/* Bouton "Voir l'article" au survol */
.tvnews-event-buttons {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  opacity: 0;
  z-index: 2;
  transition: all 0.3s ease;
}

.ehuka-blog-card-link:hover .tvnews-event-buttons,
article#blog_post.tvblog_post:hover .tvnews-event-buttons {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.tvnews-event-buttons a,
.tvnews-event-buttons i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: white;
  border-radius: 50%;
  color: var(--ehuka-accent);
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  font-size: 32px;
}

.tvnews-event-buttons a:hover,
.tvnews-event-buttons i:hover {
  background: var(--ehuka-accent);
  color: white;
  transform: scale(1.1);
}

/* Contenu de l'article */
.post_content.tvnews-event-content-wrapper {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Date et métadonnées */
.clearfix.tvblog-date-username {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(93, 87, 107, 0.08);
}

/* Date stylée */
.date_time.tvdate-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
  padding: 10px;
  background: linear-gradient(135deg, var(--ehuka-accent) 0%, var(--ehuka-hover) 100%);
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(112, 215, 116, 0.3);
}

.date_time.tvdate-time p {
  margin: 0;
  color: white;
  line-height: 1.2;
  font-weight: 700;
  text-align: center;
}

.date_time.tvdate-time .tvday-time {
  font-size: 24px;
  letter-spacing: -0.5px;
}

.date_time.tvdate-time .tvmonth-time {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 2px;
}

.date_time.tvdate-time .tvyear-time {
  font-size: 11px;
  opacity: 0.9;
  margin-top: 1px;
}

/* Métadonnées (auteur + vues) */
.post_meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
}

.meta-author.tvnews-event-username p,
.tvcmsblog-view-count {
  margin: 0;
  font-size: 13px;
  color: #999;
  display: flex;
  align-items: center;
  gap: 5px;
  line-height: 1.3;
}

.meta-author.tvnews-event-username p {
  font-weight: 600;
  color: #5d576b;
}

.tvcmsblog-view-count {
  color: #999;
}

/* Titre de l'article */
.tvnews-event-titel {
  margin: 0;
}

.tvnews-event-titel .post_title {
  text-decoration: none;
  display: block;
  margin: 0;
  font-size: 19px;
  line-height: 1.4;
  font-weight: 700;
  color: #5d576b;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 53px;
  letter-spacing: -0.3px;
  transition: color 0.3s ease;
}

.tvnews-event-titel h3 {
  margin: 0;
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
  color: inherit;
}

.ehuka-blog-card-link:hover .tvnews-event-titel .post_title,
article#blog_post.tvblog_post:hover .tvnews-event-titel h3 {
  color: var(--ehuka-hover);
}

/* Description / Extrait */
.tvnews-event-description {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #666;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* Bouton "Voir tous les articles" */
.tvall-link-btn {
  text-align: center;
  margin-top: 40px;
}

.tvall-inner-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  background: var(--ehuka-hover);
  color: white;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(237, 106, 90, 0.3);
}

.tvall-inner-btn:hover {
  background: var(--ehuka-accent);
  box-shadow: 0 6px 25px rgba(112, 215, 116, 0.4);
  transform: translateY(-2px);
  color: white;
}

.tvall-inner-btn i {
  font-size: 20px;
  transition: transform 0.3s ease;
}

.tvall-inner-btn:hover i {
  transform: translateX(4px);
}

/* Responsive - TABLETTE */
@media (max-width: 1200px) {
  .tvcmsblogdisplayposts {
    padding: 40px 0;
  }

  .post_thumbnail.blog_post_content_top {
    height: 200px;
  }

  .tvnews-event-titel h3 {
    font-size: 18px;
    min-height: 50px;
  }

  .tvnews-event-description {
    font-size: 14px;
    -webkit-line-clamp: 2;
  }
}

/* Responsive - MOBILE */
@media (max-width: 992px) {
  .tvcmsblogdisplayposts {
    padding: 30px 0;
  }

  .tvcmsblogdisplayposts .tvmain-title h2 {
    font-size: 26px;
  }

  .tv_blog_post_inner.products {
    gap: 15px;
  }

  article#blog_post.tvblog_post {
    margin-bottom: 15px !important;
  }

  .post_thumbnail.blog_post_content_top {
    height: 180px;
  }

  .post_content.tvnews-event-content-wrapper {
    padding: 15px;
    gap: 10px;
  }

  .clearfix.tvblog-date-username {
    gap: 12px;
  }

  .date_time.tvdate-time {
    min-width: 55px;
    padding: 8px;
  }

  .date_time.tvdate-time .tvday-time {
    font-size: 22px;
  }

  .tvnews-event-titel h3 {
    font-size: 17px;
    min-height: 48px;
  }

  .tvnews-event-description {
    font-size: 13px;
    line-height: 1.5;
  }

  .tvall-link-btn {
    margin-top: 30px;
  }

  .tvall-inner-btn {
    padding: 12px 25px;
    font-size: 14px;
  }
}

/* Très petit mobile */
@media (max-width: 576px) {
  .tvcmsblogdisplayposts {
    padding: 25px 0;
  }

  .tvcmsblogdisplayposts .tvmain-title h2 {
    font-size: 22px;
  }

  .post_thumbnail.blog_post_content_top {
    height: 160px;
  }

  .post_content.tvnews-event-content-wrapper {
    padding: 12px;
    gap: 8px;
  }

  .clearfix.tvblog-date-username {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .date_time.tvdate-time {
    flex-direction: row;
    min-width: auto;
    width: 100%;
    justify-content: center;
    gap: 8px;
    padding: 6px 12px;
  }

  .date_time.tvdate-time p {
    margin: 0;
  }

  .date_time.tvdate-time .tvday-time {
    font-size: 20px;
  }

  .date_time.tvdate-time .tvmonth-time {
    font-size: 14px;
    margin-top: 0;
  }

  .date_time.tvdate-time .tvyear-time {
    font-size: 13px;
    margin-top: 0;
  }

  .post_meta {
    width: 100%;
  }

  .tvnews-event-titel h3 {
    font-size: 16px;
    min-height: 45px;
  }

  .tvnews-event-description {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }

  .tvall-inner-btn {
    padding: 11px 22px;
    font-size: 13px;
  }

  .tvnews-event-buttons a {
    width: 50px;
    height: 50px;
  }

  .tvnews-event-buttons a i {
    font-size: 28px;
  }
}

/* Fix pour le slider si présent */
.tvcmsblogdisplayposts .slick-slider,
.tvblog-recent-post-slider-box .slick-slider {
  margin: 0 -10px;
}

.tvcmsblogdisplayposts .slick-slide,
.tvblog-recent-post-slider-box .slick-slide {
  padding: 0 10px;
}

/* Flèches du slider si présent */
.tvcmsblogdisplayposts .slick-arrow,
.tvblog-recent-post-slider-box .slick-arrow {
  width: 45px;
  height: 45px;
  background: white !important;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  z-index: 10;
}

.tvcmsblogdisplayposts .slick-arrow:hover,
.tvblog-recent-post-slider-box .slick-arrow:hover {
  background: var(--ehuka-accent) !important;
  box-shadow: 0 6px 20px rgba(112, 215, 116, 0.4);
}

.tvcmsblogdisplayposts .slick-prev,
.tvblog-recent-post-slider-box .slick-prev {
  left: -20px;
}

.tvcmsblogdisplayposts .slick-next,
.tvblog-recent-post-slider-box .slick-next {
  right: -20px;
}
