/* --- MODAL BACKDROP --- */
.conditions-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.conditions-modal.fade-out {
  animation: fadeOutModal 0.5s forwards;
}

@keyframes fadeOutModal {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* --- CARD --- */
.conditions-modal-content {
  background: rgba(22, 22, 22, 0.7);
  border: 1px solid rgba(111, 36, 240, 0.274);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  padding: 3rem 2.5rem;
  border-radius: 20px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
  font-family:
    -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial,
    sans-serif;
}
/* >>> Lift supprimé : plus de transform sur :hover <<< */

/* --- TITRE & TEXTE --- */
.conditions-modal-content h2 {
  margin-top: 0;
  font-size: 1.8rem;
  font-weight: 600;
  color: #c4c4c4;
  letter-spacing: -0.015em;
}

.conditions-modal-content p {
  margin: 1rem 0 2.5rem;
  font-size: 1rem;
  color: #c4c4c4;
  line-height: 1.6;
}

.conditions-modal-content a {
  color: #6300a5;
  text-decoration: none;
  font-weight: 500;
}
.conditions-modal-content a:hover {
  text-decoration: underline;
}

/* --- CHECKBOX --- */
.conditions-modal-content label {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.7em;
  font-size: 0.95rem;
  margin: 1.5em 0 2em 0;
  color: #c4c4c4;
  cursor: pointer;
}

.conditions-modal-content input[type="checkbox"] {
  appearance: none;
  width: 22px;
  height: 22px;
  border: 2px solid #c7c7cc;
  border-radius: 6px;
  background: #fff;
  transition: all 0.25s ease;
  position: relative;
  cursor: pointer;
}
.conditions-modal-content input[type="checkbox"]:hover {
  border-color: #a0a0a5;
}

/* Effet halo + animation “pop” */
.conditions-modal-content input[type="checkbox"]:checked {
  background: #6300a5;
  border-color: #440072;
  box-shadow: 0 0 0 4px rgba(136, 0, 227, 0.2);
  animation: check-pop 0.3s ease;
}

@keyframes check-pop {
  0% {
    transform: scale(0.6) rotate(-10deg);
  }
  60% {
    transform: scale(1.2) rotate(10deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
  }
}

.conditions-modal-content input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 5%;
  left: 25%;
  width: 6px;
  height: 12px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -50%) rotate(45deg);
  transform-origin: center;
  animation: tick-draw 0.25s ease forwards;
}

@keyframes tick-draw {
  from {
    opacity: 0;
    transform: rotate(45deg) scaleY(0);
  }
  to {
    opacity: 1;
    transform: rotate(45deg) scaleY(1);
  }
}

/* --- BOUTON --- */
.conditions-modal-content button {
  padding: 0.8em 2.6em;
  font-size: 1.05rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #5d00b4, #552a8d);
  color: #fff;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  opacity: 0.4;
  transition:
    opacity 0.25s ease,
    transform 0.2s ease,
    background 0.3s ease;
}
.conditions-modal-content button.enabled {
  opacity: 1;
}
.conditions-modal-content button.enabled:hover {
  transform: scale(1.09);
}
.conditions-modal-content button:disabled {
  cursor: not-allowed;
}

/* --- RESPONSIVE --- */
@media (max-width: 480px) {
  .conditions-modal-content {
    width: 95%;
    max-width: 95%;
    padding: 1.5rem 1rem;
    margin: 0 1rem; /* pour éviter que ça colle */
    border-radius: 14px;
  }

  .conditions-modal-content h2 {
    font-size: 1.4rem;
  }

  .conditions-modal-content p {
    font-size: 0.9rem;
    margin: 0.8rem 0 1.5rem;
  }

  .conditions-modal-content button {
    width: 100%;
  }
}
