/* ============================================================================
   WWP MAILING — CTA + Modal + Bannière sticky concerts
   ============================================================================ */

/* ─── CTA inline (section concerts index.html) ──────────────────────────────── */

.btn-mailing-cta {
  position: relative;
  background: linear-gradient(135deg, #6b1a1a 0%, #8f2020 50%, #6b1a1a 100%);
  border: none;
  border-radius: 8px;
  padding: 0.65rem 2rem;
  width: 100%;
  max-width: 360px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 6px 20px rgba(107, 26, 26, 0.5),
    0 3px 10px rgba(0, 0, 0, 0.3),
    inset 0 2px 4px rgba(255, 255, 255, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.btn-mailing-cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.18),
    transparent
  );
  transition: left 0.6s ease;
}

.btn-mailing-cta:hover::before {
  left: 100%;
}

.btn-mailing-cta:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 10px 28px rgba(107, 26, 26, 0.6),
    0 5px 14px rgba(0, 0, 0, 0.4),
    inset 0 2px 4px rgba(255, 255, 255, 0.25);
}

.btn-mailing-cta:active {
  transform: translateY(-2px) scale(1);
}

.btn-mailing-cta .bi {
  font-size: 1.6rem;
  color: #ffffff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  animation: mailing-bell-pulse 2.4s ease-in-out infinite;
}

@keyframes mailing-bell-pulse {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  40% {
    transform: scale(1.12) rotate(-8deg);
    opacity: 0.9;
  }
  60% {
    transform: scale(1.12) rotate(8deg);
    opacity: 0.9;
  }
  80% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.btn-mailing-cta .btn-text {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #ffffff;
  text-transform: uppercase;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.4),
    0 0 20px rgba(255, 255, 255, 0.1);
  line-height: 1.2;
}

.btn-mailing-cta .mailing-badge {
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.3rem 1rem;
  border-radius: 16px;
  letter-spacing: 0.05em;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Responsive — aligne avec les breakpoints de .show-more-concerts-btn */
@media (max-width: 991px) {
  .btn-mailing-cta {
    padding: 0.8rem 2.25rem;
  }
  .btn-mailing-cta .bi {
    font-size: 1.85rem;
  }
  .btn-mailing-cta .btn-text {
    font-size: 1.15rem;
  }
  .btn-mailing-cta .mailing-badge {
    font-size: 0.9rem;
  }
}

@media (max-width: 767px) {
  .btn-mailing-cta {
    padding: 0.75rem 1.85rem;
    max-width: 100%;
  }
  .btn-mailing-cta .bi {
    font-size: 1.75rem;
  }
  .btn-mailing-cta .btn-text {
    font-size: 1.05rem;
    letter-spacing: 0.1em;
  }
  .btn-mailing-cta .mailing-badge {
    font-size: 0.85rem;
    padding: 0.35rem 1.1rem;
  }
}

@media (max-width: 575px) {
  .btn-mailing-cta {
    padding: 0.7rem 1.6rem;
  }
  .btn-mailing-cta .bi {
    font-size: 1.6rem;
  }
  .btn-mailing-cta .btn-text {
    font-size: 0.95rem;
    letter-spacing: 0.05em;
  }
  .btn-mailing-cta .mailing-badge {
    font-size: 0.8rem;
    padding: 0.3rem 0.95rem;
  }
}

@media (max-width: 399px) {
  .btn-mailing-cta {
    padding: 0.65rem 1.4rem;
  }
  .btn-mailing-cta .bi {
    font-size: 1.5rem;
  }
  .btn-mailing-cta .btn-text {
    font-size: 0.85rem;
  }
  .btn-mailing-cta .mailing-badge {
    font-size: 0.75rem;
    padding: 0.28rem 0.85rem;
  }
}

/* ─── Modal inscription ──────────────────────────────────────────────────────── */

.mailing-modal .modal-content {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  color: #f0f0f0;
}

.mailing-modal .modal-header {
  border-bottom: 1px solid #2a2a2a;
}

.mailing-modal .modal-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #f0f0f0;
}

.mailing-modal .modal-footer {
  border-top: 1px solid #2a2a2a;
}

.mailing-modal .btn-close {
  filter: invert(1);
}

.mailing-modal .form-control {
  background: #111;
  border: 1px solid #333;
  color: #f0f0f0;
  border-radius: 3px;
}

.mailing-modal .form-control:focus {
  background: #111;
  border-color: var(--wwp-red, #c0392b);
  color: #f0f0f0;
  box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.25);
}

.mailing-modal .form-check-input:checked {
  background-color: var(--wwp-red, #c0392b);
  border-color: var(--wwp-red, #c0392b);
}

.mailing-modal .btn-subscribe {
  background: var(--wwp-red, #c0392b);
  border: none;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 10px 24px;
  border-radius: 3px;
  transition: opacity 0.2s;
}

.mailing-modal .btn-subscribe:hover {
  opacity: 0.85;
}

.mailing-modal .btn-subscribe:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mailing-modal-tagline {
  font-size: 0.8rem;
  color: #888;
  line-height: 1.5;
  margin-bottom: 16px;
}

.mailing-modal-alert {
  font-size: 0.85rem;
  border-radius: 3px;
  padding: 10px 14px;
  margin-top: 12px;
  display: none;
  line-height: 1.5;
}

/* Hint "Pensez à vérifier vos spams" */
.mailing-hint {
  font-weight: 700;
}

/* Dans la bannière concerts.html : gras, taille héritée (0.75rem) */
.banner-msg .mailing-hint {
  font-weight: 700;
}

/* Dans la modale index.html : gras + plus gros */
.mailing-modal-alert .mailing-hint {
  font-weight: 700;
  font-size: 1rem;
}


.mailing-modal-alert.show {
  display: block;
}
.mailing-modal-alert.alert-success {
  background: rgba(39, 174, 96, 0.15);
  border: 1px solid #27ae60;
  color: #2ecc71;
}
.mailing-modal-alert.alert-danger {
  background: rgba(192, 57, 43, 0.15);
  border: 1px solid #c0392b;
  color: #e74c3c;
}

/* ─── Bannière sticky top (concerts.html) ────────────────────────────────────── */

.mailing-sticky-banner {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #0e0e0e;
  border-bottom: 2px solid #c0392b;
  box-shadow: 0 2px 16px rgba(192, 57, 43, 0.18);
  min-height: 52px;
  height: auto;
  padding: 0 20px 0 16px;

  /* Ligne unique, pas de wrap */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0;

  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
  overflow: hidden;
}

.mailing-sticky-banner.hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* ─ État réduit (après clic ×) ─ */
.mailing-sticky-banner.collapsed {
  height: 28px;
  min-height: 0;
  padding: 0 16px 0 20px;
  cursor: pointer;
  justify-content: center;
  gap: 8px;
  border-bottom-color: rgba(192, 57, 43, 0.4);
  box-shadow: none;
}

/* En état réduit : masquer tout sauf l'icône cloche et le label mini */
.mailing-sticky-banner.collapsed .banner-lead,
.mailing-sticky-banner.collapsed .banner-divider,
.mailing-sticky-banner.collapsed .banner-form,
.mailing-sticky-banner.collapsed .banner-msg,
.mailing-sticky-banner.collapsed .banner-close {
  display: none;
}

/* Pseudo-content mini : icône + label inline */
.mailing-sticky-banner.collapsed::after {
  content: "🔔  S'inscrire à la newsletter  🔔";
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  white-space: nowrap;
  transition: color 0.2s;
  text-align: center;
}

.mailing-sticky-banner.collapsed:hover {
  border-bottom-color: #c0392b;
}

.mailing-sticky-banner.collapsed:hover::after {
  color: rgba(255, 255, 255, 0.7);
}

/* Pas de barre gauche en état réduit */
.mailing-sticky-banner.collapsed::before {
  display: none;
}


/* Barre rouge gauche */
.mailing-sticky-banner::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #c0392b;
}

/* ─ Accroche gauche ─ */
.banner-lead {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  padding-right: 20px;
}

.banner-icon {
  font-size: 1rem;
  color: #c0392b;
  animation: banner-bell 3s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes banner-bell {
  0%,
  85%,
  100% {
    transform: rotate(0deg);
  }
  88% {
    transform: rotate(-12deg);
  }
  92% {
    transform: rotate(12deg);
  }
  96% {
    transform: rotate(-6deg);
  }
}

.banner-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1;
}

.banner-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #f0f0f0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.banner-sub {
  font-size: 0.68rem;
  color: #666;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

/* ─ Séparateur vertical ─ */
.banner-divider {
  width: 1px;
  height: 28px;
  background: #2a2a2a;
  flex-shrink: 0;
  margin-right: 20px;
}

/* ─ Formulaire ─ */
.banner-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap; /* ← jamais de wrap */
  flex: 1;
  max-width: 680px;
}

.banner-input {
  flex: 1 1 180px;
  min-width: 160px;
  max-width: 240px;
  height: 32px;
  background: #1a1a1a;
  border: 1px solid #2e2e2e;
  border-radius: 3px;
  color: #f0f0f0;
  padding: 0 10px;
  font-size: 0.82rem;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.banner-input::placeholder {
  color: #444;
}

.banner-input:focus {
  border-color: #c0392b;
  box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.18);
}

/* Custom checkbox consent */
.banner-consent {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}

.banner-consent input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.banner-consent-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 1.5px solid #444;
  border-radius: 2px;
  background: #1a1a1a;
  flex-shrink: 0;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.banner-consent-check::after {
  content: "";
  display: none;
  width: 4px;
  height: 7px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translateY(-1px);
}

.banner-consent input[type="checkbox"]:checked + .banner-consent-check {
  background: #c0392b;
  border-color: #c0392b;
}

.banner-consent input[type="checkbox"]:checked + .banner-consent-check::after {
  display: block;
}

.banner-consent input[type="checkbox"]:focus + .banner-consent-check {
  box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.3);
}

.banner-consent-label {
  font-size: 0.75rem;
  color: #888;
  line-height: 1;
}

/* "(newsletter WWP)" — masqué sous 1280px */
.banner-consent-detail {
  color: #555;
}

@media (max-width: 1280px) {
  .banner-consent-detail {
    display: none;
  }
}

/* Bouton S'inscrire */
.banner-btn {
  height: 32px;
  padding: 0 14px;
  background: #c0392b;
  border: none;
  border-radius: 3px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition:
    background 0.2s,
    transform 0.15s;
}

.banner-btn:hover {
  background: #a93226;
  transform: translateY(-1px);
}
.banner-btn:active {
  transform: translateY(0);
}
.banner-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Message feedback */
.banner-msg {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 3px;
  display: none;
  flex-shrink: 0;
  white-space: normal;
  margin-left: 8px;
  line-height: 1.4;
}

.banner-msg.show {
  display: inline-flex;
  align-items: center;
}
.banner-msg.success {
  background: rgba(39, 174, 96, 0.15);
  color: #2ecc71;
}
.banner-msg.error {
  background: rgba(192, 57, 43, 0.15);
  color: #e74c3c;
}

/* Bouton fermer — toujours visible */
.banner-close {
  flex-shrink: 0;
  margin-left: 12px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
}

.banner-close:hover {
  background: rgba(192, 57, 43, 0.3);
  border-color: rgba(192, 57, 43, 0.6);
  color: #fff;
}

/* ─── Responsive ────────────────────────────────────────────────────────────── */

/* Tablette (768–1023px) : cacher l'accroche, garder le formulaire sur une ligne */
@media (max-width: 1023px) {
  .mailing-sticky-banner {
    height: auto;
    min-height: 52px;
    padding: 8px 16px 8px 20px;
    justify-content: space-between;
  }

  .banner-lead {
    padding-right: 14px;
  }

  .banner-sub {
    display: none;
  }
  .banner-divider {
    margin-right: 14px;
  }

  .banner-form {
    gap: 6px;
    max-width: none;
    flex: 1;
  }

  .banner-input {
    min-width: 140px;
    max-width: 180px;
  }
}

/* Petit desktop / tablette large : raccourcir l'accroche */
@media (max-width: 900px) {
  .banner-title {
    font-size: 0.78rem;
  }
  .banner-lead {
    padding-right: 10px;
  }
  .banner-divider {
    margin-right: 10px;
  }
}

/* Mobile (< 768px) : empilement vertical centré */
@media (max-width: 767px) {
  .mailing-sticky-banner {
    height: auto;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px 12px;
    gap: 10px;
    position: relative; /* close en absolu */
    justify-content: flex-start;
  }

  .mailing-sticky-banner::before {
    display: none;
  }

  /* Accroche centrée */
  .banner-lead {
    justify-content: center;
    padding-right: 0;
    padding-right: 32px; /* espace pour le bouton close */
  }

  .banner-sub {
    display: block;
  }
  .banner-divider {
    display: none;
  }

  /* Formulaire : colonne centrée */
  .banner-form {
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
  }

  .banner-input {
    width: 100%;
    max-width: none;
    min-width: 0;
    flex: none;
    height: 38px;
    font-size: 0.9rem;
    text-align: center;
  }

  .banner-consent {
    justify-content: center;
  }

  .banner-consent-detail {
    display: inline;
    color: #555;
  }
  .banner-consent-label {
    font-size: 0.8rem;
  }

  .banner-btn {
    width: 100%;
    height: 38px;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
  }

  .banner-msg {
    text-align: center;
    justify-content: center;
    margin-left: 0;
  }

  /* Close — absolu en haut à droite, bien visible */
  .banner-close {
    position: absolute;
    top: 6px;
    right: 12px;
    margin-left: 0;
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
  }
}

/* Très petit mobile (< 360px) */
@media (max-width: 359px) {
  .banner-title {
    font-size: 0.76rem;
  }
  .banner-input {
    font-size: 0.82rem;
  }
  .banner-btn {
    font-size: 0.75rem;
  }
}
