/* ======================================================
   Iliade Digital — Form Newsletters (Reusable)
   File: assets/css/form-newsletters.css
   Dépend : variables.css + styles.css
   Scope : .il-newsletter
   ====================================================== */

.il-newsletter{
  position: relative;
}

/* Titre : reprend votre ADN sidebar */
.il-newsletter__title{
  display:flex;
  align-items:center;
  gap: 10px;
  margin: 0 0 8px;
}

.il-newsletter__title .dashicons{
  color: rgba(23,160,81,.90);
}

.il-newsletter__text{
  margin: 0 0 14px;
  color: var(--muted);
}

/* Form */
.il-newsletter__form{
  display: grid;
  gap: 10px;
}

.il-newsletter__input{
  width: 100%;
}

/* Bouton : gardez vos classes globales, on ajoute juste le confort UX */
.il-newsletter__btn{
  width: 100%;
  justify-content: center;
  gap: 8px;
}

.il-newsletter__btn .dashicons{
  width: 18px;
  height: 18px;
  font-size: 18px;
}

@media (min-width: 520px){
  /* layout compact quand on l’utilise hors sidebar */
  .il-newsletter--inline .il-newsletter__form{
    grid-template-columns: 1fr auto;
    align-items: center;
  }
  .il-newsletter--inline .il-newsletter__btn{
    width: auto;
    padding-inline: 14px;
  }
}

/* Message (success/error/loading) */
.il-newsletter__msg{
  margin: 6px 0 0;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
  padding: 10px 12px;
  border-radius: var(--r-14);
  border: 1px solid var(--alpha-ink-10);
  background: rgba(255,255,255,.78);
}

/* Etats via data-state */
.il-newsletter[data-state="loading"] .il-newsletter__msg{
  color: var(--text-2);
}

.il-newsletter[data-state="success"] .il-newsletter__msg{
  color: rgba(23,160,81,.98);
  border-color: rgba(23,160,81,.18);
  background: rgba(23,160,81,.06);
}

.il-newsletter[data-state="error"] .il-newsletter__msg{
  color: rgba(209, 58, 58, .98);
  border-color: rgba(209, 58, 58, .18);
  background: rgba(209, 58, 58, .06);
}

/* Accessibilité / feedback disabled */
.il-newsletter__btn:disabled{
  opacity: .75;
  cursor: not-allowed;
}
