/*
 * Thalaxo — newsletter (bloc principal + micro-nudge post-like)
 */

.thalaxo-newsletter-block {
  margin: 2.25rem 0 2.75rem;
}

.thalaxo-newsletter-card {
  position: relative;
  overflow: hidden;
  padding: 1.5rem 1.5rem 1.35rem;
  border: 1px solid var(--thalaxo-border, #333333);
  border-radius: 20px;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(255, 165, 0, 0.12) 0%, transparent 55%),
    radial-gradient(90% 70% at 0% 100%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    var(--thalaxo-bg-card, #1a1a1a);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 18px 40px rgba(0, 0, 0, 0.28);
}

.thalaxo-newsletter-glow {
  position: absolute;
  inset: 0 auto auto 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(
    180deg,
    var(--thalaxo-orange, #ffa500) 0%,
    var(--thalaxo-blue, #3b82f6) 100%
  );
  border-radius: 20px 0 0 20px;
  pointer-events: none;
}

.thalaxo-newsletter-header {
  margin-bottom: 1.15rem;
  padding-left: 0.35rem;
}

.thalaxo-newsletter-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.55rem;
  padding: 0.22rem 0.65rem;
  border: 1px solid rgba(255, 165, 0, 0.28);
  border-radius: 999px;
  background: rgba(255, 165, 0, 0.08);
  color: var(--thalaxo-orange, #ffa500);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.thalaxo-newsletter-title {
  margin: 0 0 0.45rem;
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--thalaxo-text-primary, #ffffff);
}

.thalaxo-newsletter-subtitle {
  margin: 0;
  max-width: 52ch;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--thalaxo-text-secondary, #a3a3a3);
}

.thalaxo-newsletter-body {
  padding-left: 0.35rem;
}

.thalaxo-newsletter-fieldgroup {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  padding: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.thalaxo-newsletter-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 46px;
  padding: 0.55rem 1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--thalaxo-text-primary, #ffffff);
  font-size: 0.9375rem;
}

.thalaxo-newsletter-input::placeholder {
  color: #737373;
}

.thalaxo-newsletter-input:focus-visible {
  outline: none;
}

.thalaxo-newsletter-fieldgroup:focus-within {
  border-color: rgba(255, 165, 0, 0.45);
  box-shadow:
    0 0 0 3px rgba(255, 165, 0, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.thalaxo-newsletter-submit {
  flex: 0 0 auto;
  min-height: 46px;
  padding: 0.55rem 1.15rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.thalaxo-newsletter-submit:hover,
.thalaxo-newsletter-submit:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(255, 165, 0, 0.28);
}

.thalaxo-newsletter-submit:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.thalaxo-newsletter-meta {
  display: grid;
  gap: 0.35rem;
}

.thalaxo-newsletter-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #cbd5e1;
  cursor: pointer;
}

.thalaxo-newsletter-consent input {
  margin-top: 0.15rem;
  flex: 0 0 auto;
  accent-color: var(--thalaxo-orange, #ffa500);
}

.thalaxo-newsletter-frequency {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: #737373;
}

.thalaxo-newsletter-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1rem;
  padding-top: 0.95rem;
  padding-left: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.thalaxo-newsletter-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0.15rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
}

.thalaxo-newsletter-message {
  margin: 0.75rem 0 0;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.5;
}

.thalaxo-newsletter-message.is-success {
  color: #34d399;
  background: rgba(52, 211, 153, 0.08);
}

.thalaxo-newsletter-message.is-error {
  color: #f87171;
  background: rgba(248, 113, 113, 0.08);
}

/* Micro-nudge post-like — bandeau CTA (sans formulaire dupliqué) */
body.thalaxo-single-article .thalaxo-newsletter-nudge {
  max-width: var(--thalaxo-single-shell, min(1120px, calc(100vw - 2rem)));
  margin: 0 auto;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.thalaxo-newsletter-nudge[hidden] {
  display: none !important;
}

.thalaxo-newsletter-nudge.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.thalaxo-newsletter-nudge-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  flex-wrap: wrap;
  padding: 0.7rem 0.95rem;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(255, 165, 0, 0.06) 100%),
    rgba(26, 26, 26, 0.92);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

.thalaxo-newsletter-nudge-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1 1 16rem;
  min-width: 0;
  margin: 0;
}

.thalaxo-newsletter-nudge-icon {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(255, 165, 0, 0.12);
  position: relative;
}

.thalaxo-newsletter-nudge-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1rem;
  height: 1rem;
  background: currentColor;
  color: var(--thalaxo-orange, #ffa500);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M4 4h16v16H4z'/%3E%3Cpath d='m22 6-10 7L2 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M4 4h16v16H4z'/%3E%3Cpath d='m22 6-10 7L2 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.thalaxo-newsletter-nudge-text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  font-weight: 600;
  color: var(--thalaxo-text-primary, #ffffff);
}

.thalaxo-newsletter-nudge-cta {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0.45rem 1rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 0.875rem;
  font-weight: 600;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.thalaxo-newsletter-nudge-cta:hover,
.thalaxo-newsletter-nudge-cta:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(255, 165, 0, 0.28);
}

.thalaxo-newsletter-block.is-focused .thalaxo-newsletter-card {
  border-color: rgba(255, 165, 0, 0.45);
  box-shadow:
    0 0 0 3px rgba(255, 165, 0, 0.12),
    0 18px 40px rgba(0, 0, 0, 0.28);
}

.thalaxo-newsletter-block.is-subscribed,
.thalaxo-newsletter-nudge.is-subscribed {
  display: none !important;
}

@media (max-width: 640px) {
  .thalaxo-newsletter-nudge-card {
    flex-direction: column;
    align-items: stretch;
  }

  .thalaxo-newsletter-nudge-cta {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .thalaxo-newsletter-card {
    padding: 1.2rem 1.1rem 1.1rem;
  }

  .thalaxo-newsletter-fieldgroup {
    flex-direction: column;
    border-radius: 16px;
    padding: 0.45rem;
  }

  .thalaxo-newsletter-input,
  .thalaxo-newsletter-submit {
    width: 100%;
    border-radius: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .thalaxo-newsletter-nudge,
  .thalaxo-newsletter-submit {
    transition: none;
  }
}
