/* Styles de base pour la modal publicité */
#ad-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  -webkit-backdrop-filter: blur(2px);
          backdrop-filter: blur(2px);
}

/* boîte de la pub */
#ad-modal {
  width: min(920px, calc(100% - 40px));
  max-width: 920px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  transform: translateY(20px) scale(.98);
  opacity: 0;
  transition: transform .35s cubic-bezier(.2,.9,.3,1), opacity .35s;
}

/* contenu interne */
#ad-modal .content {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 22px;
}

/* zone visuelle image/vidéo */
#ad-modal .creative {
  flex: 0 0 360px;
  min-height: 180px;
  background: linear-gradient(135deg,#f5f7fa,#e9eef9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  font-weight: 600;
  font-size: 18px;
  border-radius: 8px;
}

/* zone texte / CTA */
#ad-modal .meta {
  flex: 1 1 auto;
}

/* titre */
#ad-modal .meta h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

/* description */
#ad-modal .meta p {
  margin: 0 0 14px;
  color: #333;
  line-height: 1.35;
}

/* bouton CTA */
.ad-cta {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  background: #007bff;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0,123,255,0.25);
}

/* pied: options et fermer */
#ad-modal .footer {
  display:flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-top: 1px solid #eee;
  background: #fafafa;
  font-size: 14px;
}

/* bouton fermer discret */
#ad-modal .close-btn {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: #666;
}

/* animation d'ouverture */
#ad-modal-backdrop.show { display: flex; }
#ad-modal-backdrop.show #ad-modal { transform: translateY(0) scale(1); opacity: 1; }

/* clique en dehors pour fermer : évite scroll */
body.ad-modal-open { overflow: hidden; }

/* responsive */
@media (max-width: 640px) {
  #ad-modal .content { flex-direction: column; gap: 12px; }
  #ad-modal .creative { width: 100%; flex: 0 0 auto; min-height: 140px; }
  .ad-cta { width: 100%; text-align:center; display:block; }
}
