/* ===== BREVO MODAL ===== */

/* Desktop : fade + slide */
#brevo-modal.is-open { animation: brevoFadeIn .2s ease both; }
#brevo-modal.is-open .brevo-card { animation: brevoSlideUp .3s ease both; }
@keyframes brevoFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes brevoSlideUp { from { opacity: 0; transform: scale(.95) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }

#brevo-close:hover { background: rgba(0,0,0,.12) !important; }

/* Mobile : bottom sheet plein écran */
@media (max-width: 767px) {
  #brevo-wrapper {
    align-items: flex-end !important;
    padding: 0 !important;
  }
  #brevo-modal .brevo-card {
    max-width: 100% !important;
    height: 96dvh;
    max-height: 96dvh !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  #brevo-modal.is-open .brevo-card {
    animation: brevoSlideSheet .3s cubic-bezier(.32,1,.23,1) both;
  }
  @keyframes brevoSlideSheet {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }

  /* Bouton fermer repositionné dans la sheet */
  #brevo-close {
    position: fixed !important;
    top: calc(4dvh + .5rem) !important;
    right: .75rem !important;
    background: rgba(255,255,255,.95) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.2) !important;
  }

  /* Contenu : max espace pour le form */
  #brevo-content {
    padding: 1rem 1rem .75rem !important;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0;
  }

  /* Titre compact mobile */
  #brevo-modal-title { font-size: 1.35rem !important; margin-bottom: .25rem !important; }
  #brevo-content > div:first-child { margin-bottom: .75rem !important; }
  #brevo-content > p:last-child { margin-top: .5rem !important; font-size: .7rem !important; }

  /* Form prend tout l'espace restant */
  #brevo-form-container { flex: 1; }
}

/* Brevo form overrides (tous écrans) */
.brevo-form-wrapper .sib-form { padding: 0 !important; }
.brevo-form-wrapper #sib-container { background-color: transparent !important; border: none !important; box-shadow: none !important; padding: 0 !important; max-width: 100% !important; }
.brevo-form-wrapper .sib-form-container { padding: 0 !important; }
