/* === WIDGET DIGI CUSTOM POSTS - CSS PROPRE === */

/* Conteneur principal */
.digi-custom-posts.digi-posts-grid {
  display: grid;
  gap: 30px;
}

.digi-custom-posts.digi-posts-slider {
  position: relative;
  overflow: hidden;
}

.digi-custom-posts.digi-posts-slider .digi-posts-slider-wrapper {
  display: flex;
  transition: transform 0.3s ease;
}

.digi-custom-posts.digi-posts-slider .digi-post {
  flex: 0 0 auto;
  width: 300px;
  margin-right: 20px;
}

/* Structure de base des articles */
.digi-custom-posts .digi-post {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* SKIN CLASSIC - Style simple et épuré sans ombres ni bordures arrondies */
.digi-custom-posts.digi-posts-skin-classic .digi-post {
  background: #fff;
  border: 1px solid var(--digi-border-color, #e1e8ed);
  border-radius: 0;
  box-shadow: none;
}

.digi-custom-posts.digi-posts-skin-classic .digi-post:hover {
  border-color: var(--digi-secondary-color, #3498db);
  transform: none;
  box-shadow: none;
}

/* SKIN CARDS - Style moderne avec plus d'effets */
.digi-custom-posts.digi-posts-skin-cards .digi-post {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  border-radius: 12px;
}

.digi-custom-posts.digi-posts-skin-cards .digi-post:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

.digi-custom-posts.digi-posts-skin-cards .digi-post__content {
  background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
}

/* SKIN SLIDER - Style compact pour slider avec largeur dynamique */
.digi-custom-posts.digi-posts-skin-slider .digi-posts-slider-wrapper {
  display: flex;
  transition: transform 0.3s ease;
}

.digi-custom-posts.digi-posts-skin-slider .digi-post {
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  flex: 0 0 auto;
  margin-right: 20px;
}

.digi-custom-posts.digi-posts-skin-slider .digi-post:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* Largeurs slider basées sur le nombre de colonnes */
.digi-custom-posts.digi-posts-skin-slider.slider-cols-1 .digi-post { width: calc(100% - 20px); }
.digi-custom-posts.digi-posts-skin-slider.slider-cols-2 .digi-post { width: calc(50% - 20px); }
.digi-custom-posts.digi-posts-skin-slider.slider-cols-3 .digi-post { width: calc(33.333% - 20px); }
.digi-custom-posts.digi-posts-skin-slider.slider-cols-4 .digi-post { width: calc(25% - 20px); }
.digi-custom-posts.digi-posts-skin-slider.slider-cols-5 .digi-post { width: calc(20% - 20px); }

/* Option maçonnerie - hauteur uniforme */
.digi-custom-posts.digi-posts-skin-slider.slider-equal-height .digi-post {
  height: 450px;
}

.digi-custom-posts.digi-posts-skin-slider.slider-equal-height .digi-post__content {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.digi-custom-posts.digi-posts-skin-slider.slider-equal-height .digi-post__excerpt {
  flex: 1;
}

/* Wrapper thumbnail + avatar */
.digi-custom-posts .digi-post__thumbnail-wrapper {
  position: relative;
}

/* Image de mise en avant */
.digi-custom-posts .digi-post__thumbnail {
  display: block;
  overflow: hidden;
}

.digi-custom-posts .digi-post__thumbnail img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.digi-custom-posts .digi-post:hover .digi-post__thumbnail img {
  transform: scale(1.05);
}

/* Avatar en haut à droite - ROND avec contrôles */
.digi-custom-posts .digi-post__avatar {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 2;
}

.digi-custom-posts .digi-post__avatar img {
  border-radius: 50%;
  object-fit: cover;
  border-style: solid;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.digi-custom-posts .digi-post__avatar.has-border img {
  border-width: 2px;
  border-color: #ffffff;
}

.digi-custom-posts .digi-post__avatar.no-border img {
  border-width: 0;
}

.digi-custom-posts .digi-post:hover .digi-post__avatar img {
  transform: scale(1.1);
}

/* Contenu des articles */
.digi-custom-posts .digi-post__content {
  padding: 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Titre */
.digi-custom-posts .digi-post__title {
  margin: 0 0 15px 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.digi-custom-posts .digi-post__title a {
  color: var(--digi-primary-color, #2c3e50);
  text-decoration: none;
  transition: color 0.3s ease;
}

.digi-custom-posts .digi-post__title a:hover {
  color: var(--digi-secondary-color, #3498db);
}

/* Badges SOUS LE TITRE dans le flux normal - PAS en float */
.digi-custom-posts .digi-post__badges {
  margin-bottom: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  /* Pas de float, position normale dans le flux */
  position: static;
  float: none;
  clear: both;
}

.digi-custom-posts .digi-post__badge {
  background: var(--digi-secondary-color, #3498db);
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  /* Empêche le float */
  float: none;
}

/* Badge de score de pertinence */
.digi-custom-posts .digi-post__badge-score {
  background: #ff6b35;
  color: #fff;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
}

/* Extrait */
.digi-custom-posts .digi-post__excerpt {
  color: var(--digi-text-color, #333);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
}

.digi-custom-posts .digi-post__excerpt p {
  margin: 0;
}

/* Bouton "Lire plus" */
.digi-custom-posts .digi-post__read-more {
  color: var(--digi-secondary-color, #3498db);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 15px;
  align-self: flex-start;
  transition: all 0.3s ease;
}

.digi-custom-posts .digi-post__read-more:hover {
  color: var(--digi-hover-color, #2980b9);
  transform: translateX(3px);
}

/* Meta footer APRÈS lire plus avec BORDER TOP */
.digi-custom-posts .digi-post__meta-footer {
  padding-top: 15px;
  border-top: 1px solid var(--digi-border-color, #e1e8ed);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--digi-meta-color, #7f8c8d);
  margin-top: auto;
}

/* Date À GAUCHE */
.digi-custom-posts .digi-post__date {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Commentaires À DROITE */
.digi-custom-posts .digi-post__comments {
  display: flex;
  align-items: center;
  gap: 6px;
}

.digi-custom-posts .digi-post__date i,
.digi-custom-posts .digi-post__comments i {
  font-size: 12px;
}

/* Pagination - Styles légers sans interférer */
.digi-custom-posts .elementor-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--digi-border-color, #e1e8ed);
}

.digi-custom-posts .elementor-pagination .page-numbers {
  padding: 12px 16px;
  color: var(--digi-text-color, #333);
  background: #fff;
  border: 1px solid var(--digi-border-color, #e1e8ed);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  min-width: 45px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.digi-custom-posts .elementor-pagination .page-numbers:hover {
  background: var(--digi-secondary-color, #3498db);
  color: #fff;
  border-color: var(--digi-secondary-color, #3498db);
}

.digi-custom-posts .elementor-pagination .page-numbers.current {
  background: var(--digi-secondary-color, #3498db);
  color: #fff;
  border-color: var(--digi-secondary-color, #3498db);
}

/* Contrôles slider */
.digi-custom-posts.digi-posts-skin-slider .digi-slider-controls {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.digi-custom-posts .digi-slider-btn {
  background: var(--digi-secondary-color, #3498db);
  color: #fff;
  border: none !important;
  padding: 12px 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

.digi-custom-posts .digi-slider-btn:hover {
  background: var(--digi-hover-color, #2980b9);
  transform: translateY(-2px);
}

.digi-custom-posts .digi-slider-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* SKIN CAROUSEL - Slider Hero avec image pleine largeur */
.digi-custom-posts.digi-posts-skin-carousel {
  position: relative;
  overflow: hidden;
  height: 500px;
  border-radius: 0;
  box-shadow: none;
}

.digi-custom-posts.digi-posts-skin-carousel .digi-posts-carousel-wrapper {
  display: flex;
  transition: transform 0.6s ease;
  height: 100%;
  width: calc(100% * var(--carousel-posts-count, 1));
}

.digi-custom-posts.digi-posts-skin-carousel .digi-post {
  flex: 0 0 calc(100% / var(--carousel-posts-count, 1));
  width: calc(100% / var(--carousel-posts-count, 1));
  height: 100%;
  position: relative;
  margin-right: 0;
  border-radius: 0;
  box-shadow: none;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.digi-custom-posts.digi-posts-skin-carousel .digi-post__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: white;
  padding: 60px 40px 40px;
  z-index: 2;
}

.digi-custom-posts.digi-posts-skin-carousel .digi-post__title {
  color: white;
  margin-bottom: 15px;
  font-size: 28px;
  font-weight: 700;
}

.digi-custom-posts.digi-posts-skin-carousel .digi-post__title a {
  color: white;
}

.digi-custom-posts.digi-posts-skin-carousel .digi-post__excerpt {
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  margin-bottom: 20px;
}

.digi-custom-posts.digi-posts-skin-carousel .digi-post__read-more {
  background: white;
  color: #333;
  border: 2px solid white;
  padding: 10px 20px;
  border-radius: 25px;
  display: inline-block;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 600;
}

.digi-custom-posts.digi-posts-skin-carousel .digi-post__read-more:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #000;
  transform: translateY(-2px);
}

/* Flèches de navigation dans l'image */
.digi-custom-posts.digi-posts-skin-carousel .digi-carousel-nav {
  position: absolute;
  top: 40%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid white;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  font-size: 20px;
  font-weight: bold;
  transition: all 0.3s ease;
  opacity: 1;
  visibility: visible;
}

.digi-custom-posts.digi-posts-skin-carousel .digi-carousel-nav:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #333;
  transform: translateY(-50%) scale(1.1);
}

.digi-custom-posts.digi-posts-skin-carousel .digi-carousel-prev {
  left: 20px;
}

.digi-custom-posts.digi-posts-skin-carousel .digi-carousel-next {
  right: 20px;
}

/* Points indicateurs */
.digi-custom-posts.digi-posts-skin-carousel .digi-carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
  opacity: 1;
  visibility: visible;
}

.digi-custom-posts.digi-posts-skin-carousel .digi-carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.digi-custom-posts.digi-posts-skin-carousel .digi-carousel-dot.active,
.digi-custom-posts.digi-posts-skin-carousel .digi-carousel-dot:hover {
  background: white;
  transform: scale(1.2);
}

/* SKIN LIST - Mode liste avec image configurable */
.digi-custom-posts.digi-posts-skin-list .digi-post {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  margin-bottom: 30px;
  border-radius: 0;
  border: 1px solid var(--digi-border-color, #e1e8ed);
  box-shadow: none;
}

.digi-custom-posts.list-image-left .digi-post {
  flex-direction: row;
}

.digi-custom-posts.list-image-right .digi-post {
  flex-direction: row-reverse;
}

.digi-custom-posts.digi-posts-skin-list .digi-post__thumbnail {
  flex: 0 0 var(--list-image-width, 40%);
  height: 250px;
}

.digi-custom-posts.digi-posts-skin-list .digi-post__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.digi-custom-posts.digi-posts-skin-list .digi-post__content {
  flex: 1;
  padding: 30px;
}

/* Largeurs d'images pour le mode liste */
.digi-custom-posts.list-width-20 .digi-post__thumbnail { flex: 0 0 20%; }
.digi-custom-posts.list-width-25 .digi-post__thumbnail { flex: 0 0 25%; }
.digi-custom-posts.list-width-30 .digi-post__thumbnail { flex: 0 0 30%; }
.digi-custom-posts.list-width-35 .digi-post__thumbnail { flex: 0 0 35%; }
.digi-custom-posts.list-width-40 .digi-post__thumbnail { flex: 0 0 40%; }
.digi-custom-posts.list-width-45 .digi-post__thumbnail { flex: 0 0 45%; }
.digi-custom-posts.list-width-50 .digi-post__thumbnail { flex: 0 0 50%; }

/* Responsive Design */
@media (max-width: 768px) {
  .digi-custom-posts .digi-post__content {
    padding: 20px;
  }

  .digi-custom-posts .digi-post__title {
    font-size: 18px;
  }

  .digi-custom-posts .digi-post__meta-footer {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .digi-custom-posts .elementor-pagination {
    gap: 8px;
  }

  .digi-custom-posts .elementor-pagination .page-numbers {
    padding: 10px 12px;
    min-width: 40px;
  }

  /* Slider responsive */
  .digi-custom-posts.digi-posts-slider .digi-post {
    width: 250px;
  }
}

@media (max-width: 480px) {
  .digi-custom-posts .digi-post__thumbnail img {
    height: 180px;
  }

  .digi-custom-posts .digi-post__content {
    padding: 15px;
  }

  /* Slider mobile */
  .digi-custom-posts.digi-posts-slider .digi-post {
    width: 200px;
    margin-right: 15px;
  }

  /* Carousel mobile - passage en colonne */
  .digi-custom-posts.digi-posts-skin-carousel .digi-post {
    flex-direction: column;
  }
  
  .digi-custom-posts.digi-posts-skin-carousel .digi-post__thumbnail {
    flex: 0 0 250px;
    height: 250px;
  }

  .digi-custom-posts.digi-posts-skin-carousel .digi-post__content {
    padding: 20px;
  }

  /* Liste mobile - passage en colonne */
  .digi-custom-posts.digi-posts-skin-list .digi-post,
  .digi-custom-posts.list-image-right .digi-post {
    flex-direction: column;
  }
  
  .digi-custom-posts.digi-posts-skin-list .digi-post__thumbnail {
    flex: 0 0 200px;
    height: 200px;
  }

  .digi-custom-posts.digi-posts-skin-list .digi-post__content {
    padding: 20px;
  }
}

/* === SKIN LIST-COLUMN - Hybride liste + colonnes === */
.digi-custom-posts.digi-posts-list-column {
  display: grid;
  gap: 30px;
}

.digi-custom-posts.digi-posts-list-column .digi-post-list-column {
  display: flex;
  flex-direction: row;
  background: #fff;
  border: 1px solid var(--digi-border-color, #e1e8ed);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  height: auto;
}

.digi-custom-posts.digi-posts-list-column .digi-post-list-column:hover {
  border-color: var(--digi-secondary-color, #3498db);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.digi-custom-posts.digi-posts-list-column .digi-post__thumbnail-wrapper {
  flex: 0 0 200px;
  height: 140px;
  position: relative;
  overflow: hidden;
}

.digi-custom-posts.digi-posts-list-column .digi-post__thumbnail {
  height: 100%;
  width: 100%;
}

.digi-custom-posts.digi-posts-list-column .digi-post__thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.digi-custom-posts.digi-posts-list-column .digi-post-list-column:hover .digi-post__thumbnail img {
  transform: scale(1.05);
}

.digi-custom-posts.digi-posts-list-column .digi-post__content {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.digi-custom-posts.digi-posts-list-column .digi-post__title {
  margin: 0 0 15px 0;
  font-size: 1.4em;
  font-weight: 600;
  line-height: 1.3;
}

.digi-custom-posts.digi-posts-list-column .digi-post__title a {
  color: var(--digi-text-color, #333);
  text-decoration: none;
  transition: color 0.3s ease;
}

.digi-custom-posts.digi-posts-list-column .digi-post__title a:hover {
  color: var(--digi-secondary-color, #3498db);
}

.digi-custom-posts.digi-posts-list-column .digi-post__excerpt {
  flex: 1;
  margin: 0 0 20px 0;
  color: var(--digi-text-light, #666);
  line-height: 1.6;
}

.digi-custom-posts.digi-posts-list-column .digi-post__badges {
  margin: 0 0 15px 0;
}

.digi-custom-posts.digi-posts-list-column .digi-post__badge {
  display: inline-block;
  padding: 4px 12px;
  background: var(--digi-secondary-color, #3498db);
  color: white;
  font-size: 0.85em;
  border-radius: 15px;
  margin-right: 8px;
}

.digi-custom-posts.digi-posts-list-column .digi-post__read-more {
  color: var(--digi-secondary-color, #3498db);
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
  margin-bottom: 15px;
  transition: color 0.3s ease;
}

.digi-custom-posts.digi-posts-list-column .digi-post__read-more:hover {
  color: var(--digi-secondary-color-hover, #2980b9);
}

.digi-custom-posts.digi-posts-list-column .digi-post__meta-footer {
  display: flex;
  gap: 20px;
  font-size: 0.9em;
  color: var(--digi-text-light, #666);
  border-top: 1px solid #f0f0f0;
  padding-top: 15px;
  margin-top: auto;
}

.digi-custom-posts.digi-posts-list-column .digi-post__date,
.digi-custom-posts.digi-posts-list-column .digi-post__comments {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Responsive pour list-column */
@media (max-width: 768px) {
  .digi-custom-posts.digi-posts-list-column .digi-post-list-column {
    flex-direction: column;
  }
  
  .digi-custom-posts.digi-posts-list-column .digi-post__thumbnail-wrapper {
    flex: 0 0 200px;
    width: 100%;
  }
  
  .digi-custom-posts.digi-posts-list-column .digi-post__content {
    padding: 20px;
  }
}


