/* Backdrop plein écran */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: grid;
  place-items: center;
  z-index: 1000;
  animation: fadeIn .15s ease-out;
}

/* Fenêtre */
.modal {
  background: #fff;
  color: #222;
  width: min(640px, 92vw);
  max-height: 90vh;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  display: flex;
  flex-direction: column;
  outline: none;
  animation: popIn .18s ease-out;
}

/* En-tête */
.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #e7e7e7;
}

  .modal__header h2 {
    font-size: 1.1rem;
    margin: 0;
  }

.modal__close {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 6px;
}

  .modal__close:hover {
    background: #f2f2f2;
  }

/* Corps */
.modal__body {
  padding: 14px 16px;
  overflow: auto;
}

/* Pied */
.modal__footer {
  padding: 12px 16px;
  border-top: 1px solid #e7e7e7;
  display: flex;
  gap: 8px;
  justify-content: end;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

@keyframes popIn {
  from {
    transform: translateY(8px);
    opacity: .95
  }

  to {
    transform: translateY(0);
    opacity: 1
  }
}
