/* ================================
   Alert Popup - Styles
   ================================ */

/* Pop-up d'alerte */
.alert-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.alert-popup.active {
  opacity: 1;
  visibility: visible;
}

.alert-popup-content {
  background: var(--cpar-white);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 100%;
  position: relative;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--cpar-gray-600);
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.alert-popup-close:hover {
  color: var(--cpar-black);
}

.alert-popup-body {
  padding: 2rem;
  text-align: center;
}

.alert-popup-icon {
  margin-bottom: 1.5rem;
  color: var(--cpar-orange);
}

.alert-popup-icon svg {
  width: 48px;
  height: 48px;
}

.alert-popup-message h2 {
  font-family: "Balsamiq Sans", sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cpar-blue-700);
  margin: 0 0 1rem 0;
}

.alert-popup-message p {
  font-family: "Balsamiq Sans", sans-serif;
  font-size: 1rem;
  color: var(--cpar-black);
  margin: 0;
  line-height: 1.6;
}

/* Pied de page de la popup */
.alert-popup-footer {
  padding: 1.5rem 2rem 2rem;
  border-top: 1px solid var(--cpar-gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Case à cocher personnalisée */
.alert-popup-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-family: "Balsamiq Sans", sans-serif;
  font-size: 0.9rem;
  color: var(--cpar-gray-700);
  user-select: none;
  flex: 1;
  min-width: 200px;
}

.alert-popup-checkbox input[type="checkbox"] {
  cursor: pointer;
  width: 18px;
  height: 18px;
  accent-color: var(--cpar-blue-700);
}

.alert-popup-checkbox input[type="checkbox"]:hover {
  accent-color: var(--cpar-blue-600);
}

.alert-popup-checkbox span {
  font-size: 0.9rem;
}

/* Bouton Valider */
.alert-popup-footer .btn {
  padding: 0.6rem 1.5rem;
  font-size: 0.95rem;
  white-space: nowrap;
}

/* Responsive */
@media (max-width: 640px) {
  .alert-popup-content {
    max-width: calc(100% - 2rem);
  }

  .alert-popup-body {
    padding: 1.5rem;
  }

  .alert-popup-message h2 {
    font-size: 1.25rem;
  }

  .alert-popup-message p {
    font-size: 0.9rem;
  }

  .alert-popup-footer {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.5rem 1.5rem;
  }

  .alert-popup-checkbox {
    min-width: unset;
    margin-bottom: 0.5rem;
  }

  .alert-popup-footer .btn {
    width: 100%;
    text-align: center;
  }
}
