/* Animation publicité Meta avec social proof */

.exemple_meta-container {
  position: relative;
  width: 100%;
  height: 520px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0; /* Marge supprimée pour un affichage plus compact */
  overflow: visible;
}

/* Style de la publicité Meta */
.exemple_meta {
  position: absolute;
  width: 320px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  padding: 16px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* Suppression de la rotation 3D qui peut causer des problèmes */
  z-index: 5; /* Réduire le z-index pour que les commentaires restent visibles par-dessus */
  overflow: hidden;
  transition: all 0.5s ease;
}

.exemple_meta:hover {
  transform: translate(-50%, -50%) rotateY(-2deg) rotateX(2deg) scale(1.05);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* En-tête de la publicité */
.ad-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-color);
  margin-right: 10px;
  background-image: linear-gradient(135deg, var(--primary-color), #9b89ff);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 600;
  font-size: 14px;
  color: #1c1e21;
}

.ad-info {
  font-size: 12px;
  color: #65676b;
}

/* Contenu de la publicité */
.ad-text {
  font-size: 14px;
  line-height: 1.4;
  color: #1c1e21;
  margin-bottom: 12px;
}

.ad-image {
  width: 100%;
  height: 180px;
  background-color: #f0f2f5;
  border-radius: 8px;
  margin-bottom: 12px;
  background-image: linear-gradient(120deg, var(--secondary-color), #f9f9ff);
  position: relative;
  overflow: hidden;
}

.ad-image::before {
  content: '';
  position: absolute;
  width: 150%;
  height: 100%;
  background: linear-gradient(90deg, 
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%);
  top: 0;
  left: -50%;
  transform: skewX(-20deg);
  animation: imageShine 3s infinite;
}

.ad-cta {
  display: none; /* Bouton masqué selon la demande */
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 6px;
  margin-bottom: 12px;
  cursor: pointer;
}

/* Indicateurs de social proof */
.social-proof-indicators {
  display: flex;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid #f0f2f5;
}

.like-count, .comment-count, .share-count {
  display: flex;
  align-items: center;
  margin-right: 16px;
  font-size: 14px;
  color: #65676b;
}

.count-num {
  font-weight: 600;
  margin-right: 4px;
  display: inline-block;
  position: relative;
}

/* Animation de comptage */
.count-num {
  animation: countUp 4s forwards;
  counter-reset: count 0;
}

/* Bulles de commentaires */
.comment-bubble {
  position: absolute;
  width: 240px;
  background: white;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
  display: flex;
  opacity: 0;
  z-index: 15;
}

.comment-bubble::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background: white;
  transform: rotate(45deg);
  z-index: -1;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Positionnement des commentaires pour une entrée/sortie dynamique */
.comment-1 {
  top: 10%;
  right: -40px; /* Position initiale hors écran */
  transform-origin: right center;
}

.comment-2 {
  top: 40%;
  left: -40px; /* Position initiale hors écran */
  transform-origin: left center;
}

.comment-3 {
  bottom: 25%;
  right: -40px; /* Position initiale hors écran */
  transform-origin: right center;
}

/* Animations en boucle des commentaires */
.comment-1 {
  animation: commentLoop 8s ease-in-out infinite;
  animation-delay: 0s;
}

.comment-2 {
  animation: commentLoop 8s ease-in-out infinite;
  animation-delay: 2.5s;
}

.comment-3 {
  animation: commentLoop 8s ease-in-out infinite;
  animation-delay: 5s;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  margin-right: 8px;
  flex-shrink: 0;
  background-color: #f0f2f5;
  position: relative;
}

/* Badge vérifié pour certains utilisateurs */
.user-verified::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: #1DA1F2;
  border: 2px solid white;
  border-radius: 50%;
  right: -2px;
  bottom: -2px;
}

.comment-content, .reply-content {
  flex: 1;
}

.commenter-name, .replier-name {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 5px;
}

.commenter-name {
  color: #1c1e21;
}

.replier-name {
  color: var(--primary-color);
}

.comment-text, .reply-text {
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.2px;
}

.comment-text {
  color: #4a4c4f;
}

.reply-text {
  color: #000B10;
}

/* Indicateur de croissance */
.growth-indicator {
  position: absolute;
  bottom: 5%;
  right: 5%;
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  padding: 10px 16px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  box-shadow: 0 8px 25px rgba(32, 201, 151, 0.25);
  z-index: 10; /* Réduire le z-index pour ne pas couvrir les commentaires */
  opacity: 0;
  transform: scale(0.8) translateY(20px);
  animation: growthAppear 0.8s cubic-bezier(0.17, 0.89, 0.32, 1.49) forwards;
  animation-delay: 2.5s;
}

.growth-icon {
  margin-right: 8px;
  font-size: 16px;
}

.growth-text {
  font-weight: 700;
  font-size: 16px;
}

/* Animations */
@keyframes adFloat {
  0% {
    transform: translate(-50%, -50%) rotateY(-5deg) rotateX(5deg);
  }
  50% {
    transform: translate(-50%, -50%) rotateY(-5deg) rotateX(2deg) translateY(-10px);
  }
  100% {
    transform: translate(-50%, -50%) rotateY(-5deg) rotateX(5deg);
  }
}

@keyframes imageShine {
  0% {
    transform: translateX(-150%) skewX(-20deg);
  }
  50%, 100% {
    transform: translateX(150%) skewX(-20deg);
  }
}

/* Animation en boucle pour les commentaires */
@keyframes commentLoop {
  0%, 100% {
    opacity: 0;
    transform: translateX(25px);
  }
  15%, 85% {
    opacity: 1;
    transform: translateX(0);
  }
  30%, 70% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-3px) scale(1.02);
  }
}

@keyframes commentFloat {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes growthAppear {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  60% {
    opacity: 1;
    transform: scale(1.1) translateY(-5px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes growthPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 8px 25px rgba(32, 201, 151, 0.25);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(32, 201, 151, 0.4);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 8px 25px rgba(32, 201, 151, 0.25);
  }
}

@keyframes countUp {
  from {
    content: "0";
  }
  to {
    content: attr(data-count);
  }
}

/* Modification des styles pour responsive */
@media screen and (max-width: 992px) {
  .exemple_meta {
    width: 280px;
  }
  
  .comment-bubble {
    width: 180px;
  }
}

@media screen and (max-width: 768px) {
  .exemple_meta-container {
    height: 400px;
  }
  
  .exemple_meta {
    width: 240px;
  }
  
  .ad-image {
    height: 140px;
  }
  
  .comment-bubble {
    display: flex;
    width: 180px !important;
    height: 80px !important;
    font-size: 0.7rem;
    transform: scale(0.8);
    transform-origin: center center;
    padding: 8px 12px;
    margin-top: -5px;
    box-sizing: border-box;
  }
  
  .comment-avatar {
    width: 18px;
    height: 18px;
    min-width: 18px;
  }
  
  .commenter-name {
    font-size: 0.65rem;
  }
  
  .comment-text {
    font-size: 0.65rem;
    line-height: 1.1;
  }
  
  /* Repositionnement des bulles sur mobile */
  .comment-1 {
    top: 0%;
    bottom: auto;
    left: -25px;
  }
  
  .comment-2 {
    top: 25%;
    bottom: auto;
    left: -30px;
  }
  
  .comment-3 {
    bottom: 27%;
    top: auto;
    right: -25px;
    /* Position remontée pour une meilleure visibilité */
  }
  
  .growth-indicator {
    bottom: auto;
    top: 70%;
    right: 5%;
    transform: scale(0.8);
  }
}
