/* ============================================================
   MadaSTQB – /css/newsletter.css
   Styles : bannière flottante · section blog · widget footer
   ============================================================ */

/* ── Variables locales ─────────────────────────────────────── */
:root {
  --nl-accent : #2563eb;
  --nl-accent2: #1d4ed8;
  --nl-success : #16a34a;
  --nl-error   : #dc2626;
  --nl-radius  : 14px;
  --nl-shadow  : 0 8px 32px rgba(0,0,0,.18);
}

/* ══════════════════════════════════════════════════════════════
   1. BANNIÈRE FLOTTANTE (bas de page)
   ══════════════════════════════════════════════════════════════ */
#nlBanner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 9999;
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  color: #fff;
  padding: 1.1rem 1.5rem;
  box-shadow: 0 -4px 24px rgba(0,0,0,.22);
  transform: translateY(100%);
  transition: transform .4s cubic-bezier(.22,1,.36,1), opacity .4s;
  opacity: 0;
}
#nlBanner.visible {
  transform: translateY(0);
  opacity: 1;
}
.nl-banner-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.nl-banner-text {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.nl-banner-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .01em;
}
.nl-banner-sub {
  font-size: .82rem;
  opacity: .85;
}
.nl-form {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}
.nl-input {
  flex: 1 1 140px;
  min-width: 120px;
  padding: .55rem .85rem;
  border: 1.5px solid rgba(255,255,255,.3);
  border-radius: 8px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: .87rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s, background .2s;
}
.nl-input::placeholder { color: rgba(255,255,255,.55); }
.nl-input:focus {
  border-color: #fff;
  background: rgba(255,255,255,.22);
}
.nl-select {
  padding: .55rem .6rem;
  border: 1.5px solid rgba(255,255,255,.3);
  border-radius: 8px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: .87rem;
  font-family: inherit;
  cursor: pointer;
}
.nl-select option { background: #1e3a5f; }
.nl-btn {
  padding: .55rem 1.2rem;
  background: #fff;
  color: var(--nl-accent);
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: .87rem;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, color .2s, transform .15s;
}
.nl-btn:hover { background: #e0eaff; transform: translateY(-1px); }
.nl-btn:disabled { opacity: .6; cursor: default; transform: none; }
.nl-close {
  background: transparent;
  border: none;
  color: rgba(255,255,255,.6);
  font-size: 1.1rem;
  cursor: pointer;
  padding: .3rem .5rem;
  line-height: 1;
  border-radius: 6px;
  transition: color .2s, background .2s;
}
.nl-close:hover { color: #fff; background: rgba(255,255,255,.12); }
.nl-banner-rgpd {
  font-size: .72rem;
  opacity: .65;
}
.nl-banner-rgpd a { color: #93c5fd; text-decoration: underline; }

/* ── Alertes bannière ────────────────────────────────────── */
.nl-alert {
  font-size: .82rem;
  padding: .45rem .9rem;
  border-radius: 7px;
  margin-top: .2rem;
}
.nl-alert-success { background: rgba(22,163,74,.2); color: #bbf7d0; border: 1px solid rgba(22,163,74,.35); }
.nl-alert-error   { background: rgba(220,38,38,.2);  color: #fca5a5;  border: 1px solid rgba(220,38,38,.35); }

/* ══════════════════════════════════════════════════════════════
   2. WIDGET NEWSLETTER DANS LE FOOTER
   ══════════════════════════════════════════════════════════════ */
.footer-nl {
  grid-column: 1 / -1;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--nl-radius);
  padding: 1.4rem 1.6rem;
  margin-top: .5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}
.footer-nl-text h4 {
  font-size: .95rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 .3rem;
}
.footer-nl-text p {
  font-size: .78rem;
  color: rgba(255,255,255,.55);
  margin: 0;
  line-height: 1.5;
}
.footer-nl-form {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  flex: 1 1 320px;
}
.footer-nl-input {
  flex: 1 1 130px;
  padding: .5rem .8rem;
  border: 1.5px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  color: #fff;
  font-size: .82rem;
  font-family: inherit;
  outline: none;
  transition: border-color .2s;
}
.footer-nl-input::placeholder { color: rgba(255,255,255,.4); }
.footer-nl-input:focus { border-color: rgba(255,255,255,.5); }
.footer-nl-btn {
  padding: .5rem 1rem;
  background: var(--nl-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: .82rem;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s, transform .15s;
}
.footer-nl-btn:hover { background: var(--nl-accent2); transform: translateY(-1px); }
.footer-nl-btn:disabled { opacity: .6; cursor: default; transform: none; }
.footer-nl-rgpd {
  width: 100%;
  font-size: .69rem;
  color: rgba(255,255,255,.4);
}
.footer-nl-rgpd a { color: rgba(255,255,255,.55); text-decoration: underline; }

/* ══════════════════════════════════════════════════════════════
   3. SECTION NEWSLETTER DANS LE BLOG
   ══════════════════════════════════════════════════════════════ */
#nlBlogSection {
  margin: 3.5rem auto 2rem;
  max-width: 860px;
  padding: 0 1rem;
}
.nl-blog-inner {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-radius: 18px;
  padding: 2rem 2.2rem;
  box-shadow: 0 4px 24px rgba(37,99,235,.08);
}
.nl-blog-content {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.4rem;
}
.nl-blog-icon {
  font-size: 2.2rem;
  line-height: 1;
  flex-shrink: 0;
}
.nl-blog-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1e40af;
  margin: 0 0 .4rem;
}
.nl-blog-content p {
  font-size: .87rem;
  color: #374151;
  margin: 0;
  line-height: 1.6;
}
.nl-blog-form { display: flex; flex-direction: column; gap: .8rem; }
.nl-blog-fields {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}
.nl-blog-input {
  flex: 1 1 160px;
  padding: .65rem 1rem;
  border: 1.5px solid #bfdbfe;
  border-radius: 9px;
  background: #fff;
  font-size: .88rem;
  font-family: inherit;
  color: #111827;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.nl-blog-input::placeholder { color: #374151; }
.nl-blog-input:focus {
  border-color: var(--nl-accent);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.nl-blog-select {
  padding: .65rem .8rem;
  border: 1.5px solid #bfdbfe;
  border-radius: 9px;
  background: #fff;
  font-size: .88rem;
  font-family: inherit;
  color: #111827;
  cursor: pointer;
}
.nl-blog-btn {
  padding: .7rem 1.6rem;
  background: var(--nl-accent);
  color: #fff;
  border: none;
  border-radius: 9px;
  font-weight: 700;
  font-size: .9rem;
  font-family: inherit;
  cursor: pointer;
  align-self: flex-start;
  transition: background .2s, transform .15s, box-shadow .2s;
}
.nl-blog-btn:hover {
  background: var(--nl-accent2);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37,99,235,.25);
}
.nl-blog-btn:disabled { opacity: .6; cursor: default; transform: none; box-shadow: none; }
.nl-blog-rgpd {
  font-size: .73rem;
  color: #6b7280;
  line-height: 1.5;
}
.nl-blog-rgpd a { color: var(--nl-accent); text-decoration: underline; }

/* ── Alertes blog ────────────────────────────────────────── */
#nlBlogSection .nl-alert {
  font-size: .85rem;
  padding: .55rem 1rem;
  border-radius: 8px;
}
#nlBlogSection .nl-alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
#nlBlogSection .nl-alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* ══════════════════════════════════════════════════════════════
   4. RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  #nlBanner { padding: .9rem 1rem; }
  .nl-form { flex-direction: column; }
  .nl-input, .nl-btn, .nl-select { width: 100%; flex: none; }
  .nl-blog-inner { padding: 1.4rem 1.2rem; }
  .nl-blog-content { flex-direction: column; }
  .nl-blog-fields { flex-direction: column; }
  .nl-blog-btn { width: 100%; text-align: center; }
  .footer-nl { flex-direction: column; }
  .footer-nl-form { flex-direction: column; }
  .footer-nl-input, .footer-nl-btn { width: 100%; }
}

/* ══════════════════════════════════════════════════════════════
   5. ISOLEMENT BANNIÈRE — surcharge les CSS de pages (contact, etc.)
   Ces règles préfixées #nlBanner ont priorité sur tout CSS local.
   ══════════════════════════════════════════════════════════════ */
#nlBanner .nl-form {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: .5rem !important;
}
#nlBanner .nl-input {
  flex: 1 1 140px !important;
  width: auto !important;
  min-width: 120px !important;
  max-width: none !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}
#nlBanner .nl-select {
  width: auto !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
}
#nlBanner .nl-btn {
  flex: 0 0 auto !important;
  width: auto !important;
  margin: 0 !important;
}
#nlBanner .nl-close {
  flex: 0 0 auto !important;
  width: auto !important;
  margin: 0 !important;
}