/* ============================================================
 * bonus-modal.css — Modal code promo bonus (indépendant)
 * ============================================================ */

/* ── BACKDROP ─────────────────────────────────────────────── */
#bonusModal {
  position: absolute;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
#bonusModal.bm-open {
  opacity: 1;
  pointer-events: auto;
}

.bm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  cursor: pointer;
}

/* ── DIALOG ───────────────────────────────────────────────── */
.bm-dialog {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: var(--surface, #fff);
  border-radius: 22px;
  padding: 22px 18px 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-height: calc(100% - 32px);
  overflow-y: auto;
}
#bonusModal.bm-open .bm-dialog {
  transform: translateY(0) scale(1);
}

/* ── CLOSE ────────────────────────────────────────────────── */
.bm-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: none;
  background: var(--bg-main, #f8f9fa);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text-secondary, #5a6874);
  transition: background 0.2s;
  z-index: 1;
}
.bm-close:hover { background: var(--border, #e2e8f0); }

/* ── HERO VISUEL BOOKMAKER ────────────────────────────────── */
.bm-hero {
  width: 100%;
  height: 90px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* background injecté par JS */
}
.bm-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(255,255,255,0.08) 0%, rgba(0,0,0,0.35) 100%);
}
/* Lignes décoratives */
.bm-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(255,255,255,0.04) 0px,
    rgba(255,255,255,0.04) 1px,
    transparent 1px,
    transparent 10px
  );
}
.bm-hero__logo {
  position: relative;
  z-index: 1;
  font-size: 1.6rem;
  font-weight: 900;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.45);
  text-align: center;
  padding: 0 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ── INFOS BOOKMAKER ──────────────────────────────────────── */
.bm-bk-name {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary, #5a6874);
  margin: 0 0 6px;
}
.bm-verified {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary, #5a6874);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 999px;
  padding: 4px 10px;
  width: fit-content;
  margin: 0 auto 12px;
}
.bm-verified i { color: #16a34a; }

/* ── TITRE OFFRE ──────────────────────────────────────────── */
.bm-title {
  font-size: 1.05rem;
  font-weight: 900;
  color: var(--text-main, #1e2a3e);
  text-align: center;
  margin: 0 0 14px;
  line-height: 1.25;
}

/* ── BLOC CODE PROMO ──────────────────────────────────────── */
.bm-code-wrap {
  position: relative;
  margin-bottom: 12px;
  padding-top: 8px;
}
.bm-code-label {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary, #0066cc);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 12px;
  border-radius: 999px;
  white-space: nowrap;
  z-index: 1;
}
.bm-code-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 14px 10px 10px 14px;
  border: 2px dashed var(--primary, #0066cc);
  border-radius: 14px;
  background: var(--bg-main, #f8f9fa);
}
.bm-code-icon {
  font-size: 1.8rem;
  color: var(--text-main, #1e2a3e);
  flex-shrink: 0;
}
.bm-code-text {
  flex: 1;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--text-main, #1e2a3e);
  letter-spacing: 1px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bm-copy-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: 10px;
  background: #e6f4ff;
  color: #0788ee;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  font-family: inherit;
  white-space: nowrap;
}
.bm-copy-btn:hover { background: #d7eeff; transform: translateY(-1px); }
.bm-copy-btn.copied { background: #dcfce7; color: #16a34a; }

/* Animation pulse sur le bouton copier */
@keyframes bmPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(7,136,238,0.4); }
  50%       { box-shadow: 0 0 0 6px rgba(7,136,238,0); }
}
.bm-copy-btn:not(.copied) { animation: bmPulse 1.5s ease-in-out infinite; }

/* ── STATUS ───────────────────────────────────────────────── */
.bm-status {
  font-size: 0.75rem;
  color: var(--text-secondary, #5a6874);
  text-align: center;
  margin: 0 0 14px;
  line-height: 1.4;
  min-height: 1em;
}

/* ── BOUTON S'INSCRIRE ────────────────────────────────────── */
.bm-signup-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  border-radius: 14px;
  /* couleur injectée par JS via --bm-color */
  background: linear-gradient(180deg, var(--bm-color, var(--primary, #0066cc)), color-mix(in srgb, var(--bm-color, var(--primary, #0066cc)) 80%, #000));
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  text-decoration: none;
  margin-bottom: 12px;
  transition: opacity 0.2s, transform 0.15s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.bm-signup-btn:hover { opacity: 0.92; transform: translateY(-1px); }
.bm-signup-btn.disabled {
  opacity: 0.45;
  pointer-events: none;
  cursor: not-allowed;
}

/* ── FEEDBACK ─────────────────────────────────────────────── */
.bm-feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  margin-bottom: 12px;
}
.bm-feedback span {
  font-size: 0.78rem;
  color: var(--text-secondary, #5a6874);
  font-weight: 500;
}
.bm-feedback-btns { display: flex; gap: 8px; }
.bm-fb-btn {
  width: 34px; height: 34px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 50%;
  background: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  transition: background 0.2s, border-color 0.2s;
}
.bm-fb-btn[data-fb="yes"]:hover { background: #dcfce7; border-color: #16a34a; color: #16a34a; }
.bm-fb-btn[data-fb="no"]:hover  { background: #fee2e2; border-color: #dc2626; color: #dc2626; }

/* ── DETAILS ──────────────────────────────────────────────── */
.bm-details {
  font-size: 0.75rem;
  color: var(--text-secondary, #5a6874);
  line-height: 1.5;
  border-top: 1px solid var(--border, #e2e8f0);
  padding-top: 10px;
  margin: 0;
}

/* ── MODE SOMBRE ──────────────────────────────────────────── */
[data-theme="dark"] .bm-dialog { background: var(--surface, #1e293b); }
[data-theme="dark"] .bm-code-box { background: var(--bg-main, #0f172a); }
[data-theme="dark"] .bm-copy-btn { background: rgba(7,136,238,0.15); color: #60a5fa; }
[data-theme="dark"] .bm-copy-btn:hover { background: rgba(7,136,238,0.25); }
[data-theme="dark"] .bm-close { background: var(--surface, #1e293b); }
