/* =========================================================
   MODAL SYSTEM
========================================================= */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;

  background: rgba(4, 8, 5, 0.72);
  backdrop-filter: blur(6px);

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: 88vh;
  overflow-y: auto;

  transform: scale(0.92) translateY(14px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

.modal-backdrop.open .modal-box {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border, rgba(240, 200, 105, 0.35));
  background: rgba(17, 14, 38, 0.6);
  color: var(--text-dim, #b9a6e8);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.modal-close:hover {
  color: var(--gold, #f0c869);
  border-color: rgba(240, 200, 105, 0.5);
  transform: rotate(90deg);
}

body.modal-open {
  overflow: hidden;
}

.modal-text {
  color: var(--text-dim, #a9c2ac);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 20px;
}

/* Déclencheurs de modale : boutons standards, pas de style dédié nécessaire,
   ils réutilisent .cta-button. */
