/* ==========================================================================
   SMA.CSS — Visuel hero spécifique pages SMA / Social Ads / Facebook Ads
   ========================================================================== */

/* ==========================================================================
   VARIANTE FOND SMA (violet/rose)
   ========================================================================== */
.at-presta--sma .at-presta-hero-bg {
  background:
    radial-gradient(rgba(131, 58, 180, 0.15) 1px, transparent 1px) 0 0 / 24px 24px,
    radial-gradient(rgba(131, 58, 180, 0.08) 1px, transparent 1px) 12px 12px / 24px 24px,
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 100px,
      rgba(131, 58, 180, 0.05) 100px,
      rgba(131, 58, 180, 0.07) 101px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 100px,
      rgba(253, 29, 29, 0.04) 100px,
      rgba(253, 29, 29, 0.06) 101px
    ),
    linear-gradient(160deg, rgba(131,58,180,0.22) 0%, rgba(253,29,29,0.08) 40%, transparent 70%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

/* ==========================================================================
   FEED SOCIAL
   ========================================================================== */
.at-presta-feed {
  position: relative;
  width: 100%;
  max-width: 340px;
  perspective: 1000px;
}

/* Glow */
.at-presta-feed-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(ellipse at center, 
    rgba(131, 58, 180, 0.25) 0%,
    rgba(253, 29, 29, 0.12) 40%,
    transparent 70%
  );
  filter: blur(40px);
  animation: at-feed-glow-pulse 4s ease-in-out infinite;
  z-index: -1;
}

@keyframes at-feed-glow-pulse {
  0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.85; transform: translate(-50%, -50%) scale(1.05); }
}

/* Phone frame */
.at-presta-feed-phone {
  position: relative;
  background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
  border-radius: 32px;
  padding: 10px;
  box-shadow:
    0 4px 6px rgba(0,0,0,0.1),
    0 20px 40px rgba(0,0,0,0.2),
    inset 0 1px 0 rgba(255,255,255,0.1);
  transform: rotateY(-5deg) rotateX(2deg);
  transform-style: preserve-3d;
  transition: transform 0.4s ease;
}

.at-presta-feed:hover .at-presta-feed-phone {
  transform: rotateY(-2deg) rotateX(1deg);
}

/* Notch */
.at-presta-feed-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 24px;
  background: #000;
  border-radius: 16px;
  z-index: 10;
}

/* Screen */
.at-presta-feed-screen {
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  position: relative;
}

/* App header */
.at-presta-feed-app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
}

.at-presta-feed-app-logo {
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.02em;
}

.at-presta-feed-app-icons {
  display: flex;
  gap: 12px;
}

.at-presta-feed-app-icons span {
  font-size: 16px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

/* Post */
.at-presta-feed-post {
  padding: 0;
}

.at-presta-feed-post-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
}

.at-presta-feed-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #833ab4, #fd1d1d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  font-weight: 700;
}

.at-presta-feed-username {
  flex: 1;
}

.at-presta-feed-username strong {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--trafic-dark);
}

.at-presta-feed-username span {
  font-size: 10px;
  color: var(--trafic-dark);
  opacity: 0.5;
}

.at-presta-feed-sponsored {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  background: var(--trafic-grey);
  border-radius: 4px;
  color: var(--trafic-dark);
  opacity: 0.7;
}

/* Image post enrichie */
.at-presta-feed-image {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.at-presta-feed-image-bg {
  position: absolute;
  inset: 0;
  background: 
    linear-gradient(135deg, #f8f4ff 0%, #fff5f5 50%, #fffbeb 100%);
}

/* Carousel */
.at-presta-feed-carousel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.at-presta-feed-product {
  position: relative;
  width: 140px;
  height: 140px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  animation: at-product-appear 0.6s ease forwards 0.5s;
}

@keyframes at-product-appear {
  to { opacity: 1; transform: scale(1); }
}

.at-presta-feed-product-img {
  font-size: 64px;
  line-height: 1;
}

.at-presta-feed-product-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  padding: 4px 10px;
  background: linear-gradient(135deg, #fd1d1d, #ff6b35);
  border-radius: 999px;
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 4px 12px rgba(253,29,29,0.3);
}

.at-presta-feed-carousel-dots {
  display: flex;
  gap: 6px;
  margin-top: 16px;
}

.at-presta-feed-carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0,0,0,0.2);
  transition: all 0.3s ease;
}

.at-presta-feed-carousel-dot--active {
  width: 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #833ab4, #fd1d1d);
}

/* Tag prix */
.at-presta-feed-price-tag {
  position: absolute;
  bottom: 60px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,0.95);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  opacity: 0;
  transform: translateX(-20px);
  animation: at-price-appear 0.5s ease forwards 1s;
}

@keyframes at-price-appear {
  to { opacity: 1; transform: translateX(0); }
}

.at-presta-feed-price-old {
  font-size: 12px;
  color: var(--trafic-dark);
  opacity: 0.5;
  text-decoration: line-through;
}

.at-presta-feed-price-new {
  font-family: 'Oswald', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #fd1d1d;
}

/* CTA shop */
.at-presta-feed-shop-btn {
  position: absolute;
  bottom: 60px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #833ab4, #fd1d1d);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 4px 12px rgba(131,58,180,0.3);
  opacity: 0;
  transform: translateX(20px);
  animation: at-shop-appear 0.5s ease forwards 1.2s;
}

@keyframes at-shop-appear {
  to { opacity: 1; transform: translateX(0); }
}

/* Engagement overlay */
.at-presta-feed-engagement {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.at-presta-feed-heart {
  font-size: 60px;
  color: #ed4956;
  opacity: 0;
  transform: scale(0);
  animation: at-heart-pop 0.8s ease forwards 2s;
}

@keyframes at-heart-pop {
  0% { opacity: 0; transform: scale(0); }
  50% { opacity: 1; transform: scale(1.3); }
  70% { transform: scale(0.9); }
  100% { opacity: 0; transform: scale(1); }
}

/* Actions */
.at-presta-feed-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 6px;
}

.at-presta-feed-action {
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.at-presta-feed-action:hover {
  transform: scale(1.15);
}

.at-presta-feed-action--liked {
  color: #ed4956;
  animation: at-like-bounce 0.5s ease forwards 2.5s;
}

@keyframes at-like-bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

/* Stats */
.at-presta-feed-stats {
  padding: 0 12px 10px;
}

.at-presta-feed-likes {
  font-size: 12px;
  font-weight: 600;
  color: var(--trafic-dark);
  margin-bottom: 2px;
}

.at-presta-feed-likes span {
  display: inline-block;
  opacity: 0;
  animation: at-likes-count 0.5s ease-out forwards 1.5s;
}

@keyframes at-likes-count {
  0% { opacity: 0; transform: translateY(5px); }
  100% { opacity: 1; transform: translateY(0); }
}

.at-presta-feed-comments {
  font-size: 11px;
  color: var(--trafic-dark);
  opacity: 0.5;
}

/* ==========================================================================
   LOGOS FLOTTANTS
   ========================================================================== */
.at-presta-feed-logo {
  position: absolute;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  padding: 8px;
  opacity: 0;
  animation: at-feed-logo-appear 0.5s ease forwards, at-feed-logo-float 4s ease-in-out infinite;
}

.at-presta-feed-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Haut gauche */
.at-presta-feed-logo--1 {
  top: 5%;
  left: -18%;
  animation-delay: 0.8s, 1.3s;
}

/* Milieu droite */
.at-presta-feed-logo--2 {
  top: 35%;
  right: -16%;
  animation-delay: 1.2s, 1.7s;
}

/* Bas gauche */
.at-presta-feed-logo--3 {
  bottom: 20%;
  left: -16%;
  animation-delay: 1.6s, 2.1s;
}

@keyframes at-feed-logo-appear {
  to { opacity: 1; }
}

@keyframes at-feed-logo-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-6px) rotate(2deg); }
  75% { transform: translateY(4px) rotate(-2deg); }
}

/* ==========================================================================
   KPIs FLOTTANTS
   ========================================================================== */
.at-presta-feed-kpi {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(255,255,255,0.92));
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  opacity: 0;
  animation: at-feed-kpi-appear 0.5s ease forwards, at-feed-kpi-float 3s ease-in-out infinite;
}

/* Haut droite */
.at-presta-feed-kpi--1 {
  top: 8%;
  right: -22%;
  animation-delay: 1s, 1.5s;
}

/* Milieu gauche */
.at-presta-feed-kpi--2 {
  top: 50%;
  left: -24%;
  animation-delay: 1.4s, 1.9s;
}

/* Bas droite */
.at-presta-feed-kpi--3 {
  bottom: 12%;
  right: -20%;
  animation-delay: 1.8s, 2.3s;
}

@keyframes at-feed-kpi-appear {
  to { opacity: 1; }
}

@keyframes at-feed-kpi-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.at-presta-feed-kpi-value {
  font-family: 'Oswald', sans-serif;
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(135deg, #833ab4, #fd1d1d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.at-presta-feed-kpi-label {
  font-size: 10px;
  color: var(--trafic-dark);
  opacity: 0.7;
}

/* ==========================================================================
   REFLET
   ========================================================================== */
.at-presta-feed-reflection {
  position: absolute;
  bottom: -50%;
  left: 10%;
  right: 10%;
  height: 50%;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, transparent 100%);
  transform: rotateX(180deg) rotateY(-5deg);
  opacity: 0.4;
  filter: blur(3px);
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, transparent 50%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, transparent 50%);
  pointer-events: none;
  border-radius: 32px;
}

/* ==========================================================================
   A11Y : Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .at-presta-feed-glow,
  .at-presta-feed-kpi,
  .at-presta-feed-logo,
  .at-presta-feed-heart,
  .at-presta-feed-action--liked,
  .at-presta-feed-likes span {
    animation: none;
  }

  .at-presta-feed-kpi,
  .at-presta-feed-logo,
  .at-presta-feed-likes span,
  .at-presta-feed-product,
  .at-presta-feed-price-tag,
  .at-presta-feed-shop-btn {
    opacity: 1;
    transform: none;
  }

  .at-presta-feed-heart {
    display: none;
  }
}
