/* ═══════════════════════════════════════════════════════════════════════════
   Newsletter « nouveautés » — section, pied de page, popup
   ---------------------------------------------------------------------------
   Rendu : includes/newsletter-cta.php. Comportement : js/newsletter.js.
   Fichier identique sur les deux sites : tout passe par les jetons --vtp-*
   de vtp.css, qui portent la palette de chacun.
   ═════════════════════════════════════════════════════════════════════════ */

/* ── Formulaire (commun) ──────────────────────────────────────────────── */

.vtp-nl-form { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

/* Champ et bouton empilés sur mobile, côte à côte dès 480px. */
.vtp-nl-row { display: flex; flex-direction: column; gap: 8px; }
.vtp-nl-row .vtp-btn { justify-content: center; white-space: nowrap; }
@media (min-width: 480px) {
  .vtp-nl-row { flex-direction: row; align-items: center; }
  .vtp-nl-row .vtp-field { flex: 1 1 auto; min-width: 0; }
}
.vtp-nl-form button[disabled] { opacity: .6; cursor: default; transform: none; }

.vtp-nl-msg { margin: 0; font-size: 13px; font-weight: 700; line-height: 1.5; }
.vtp-nl-msg.is-ok    { color: var(--vtp-violet-dark); }
.vtp-nl-msg.is-error { color: var(--vtp-rasp-dark); }

.vtp-nl-legal { margin: 0; font-size: 11.5px; font-weight: 600; line-height: 1.5; color: var(--vtp-ink-3); }
.vtp-nl-legal a { color: inherit; text-decoration: underline; }

/* Piège à robots : hors écran plutôt que display:none, que certains
   robots savent repérer. */
.vtp-nl-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.vtp-nl-emoji { margin: 0; font-size: 30px; line-height: 1; }

/* ── Section de page ──────────────────────────────────────────────────── */

.vtp-nl-card {
  display: flex; flex-direction: column; gap: 16px;
  background: var(--vtp-grad-avatar); border: 2px solid var(--vtp-violet-line);
  border-radius: 24px; padding: 22px 20px;
}
.vtp-nl-intro { display: flex; align-items: flex-start; gap: 14px; }
.vtp-nl-intro .vtp-h2 { font-size: 19px; margin: 0 0 6px; }
@media (min-width: 768px) {
  .vtp-nl-card { flex-direction: row; align-items: center; gap: 28px; padding: 26px 28px; }
  .vtp-nl-card > .vtp-nl-intro { flex: 1 1 50%; }
  .vtp-nl-card > .vtp-nl-form  { flex: 1 1 50%; }
}

/* ── Pied de page (fond sombre) ───────────────────────────────────────── */

.vtp-footer-nl {
  max-width: 520px; margin-bottom: 22px; padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.vtp-footer-nl .vtp-field { border-color: transparent; }
.vtp-footer-nl .vtp-nl-msg.is-ok,
.vtp-footer-nl .vtp-nl-msg.is-error { color: #fff; }
.vtp-footer-nl .vtp-nl-legal { color: rgba(255,255,255,0.55); }

/* ── Popup ────────────────────────────────────────────────────────────────
   Modale (dialog.showModal()) : la page s'assombrit derrière, un clic sur
   le fond ou Échap la ferment. Elle passe au-dessus de tout, nav basse
   comprise : feuille collée au bas de l'écran sur mobile, carte en bas à
   droite dès 768px. */

.vtp-nl-pop {
  position: fixed; inset: auto 12px calc(12px + env(safe-area-inset-bottom, 0px)) 12px;
  margin: 0; width: auto; max-width: none;
  padding: 22px 20px 18px; border: 0; border-radius: 22px;
  background: var(--vtp-surface); color: var(--vtp-ink);
  box-shadow: 0 18px 50px rgba(0,0,0,0.25);
}
.vtp-nl-pop[open] { display: flex; flex-direction: column; gap: 10px; animation: vtp-nl-in .28s ease-out; }
.vtp-nl-pop::backdrop { background: rgba(48,26,16,0.55); animation: vtp-nl-fade .28s ease-out; }
.vtp-nl-pop .vtp-h3 { margin: 0; padding-right: 28px; }
.vtp-nl-pop .vtp-nl-form { margin-top: 4px; }
@media (min-width: 768px) {
  .vtp-nl-pop { inset: auto 24px 24px auto; width: 380px; }
}

.vtp-nl-pop-close {
  position: absolute; top: 12px; right: 12px;
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; background: var(--vtp-violet-tint);
  color: var(--vtp-violet-dark); cursor: pointer;
}
.vtp-nl-pop-close:hover { background: var(--vtp-violet-line); }

@keyframes vtp-nl-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
@keyframes vtp-nl-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .vtp-nl-pop[open], .vtp-nl-pop::backdrop { animation: none; }
}
