/* Fenêtre modale (fiche d'un événement) : site public et tableau de bord. */

.modal {
  /* margin:auto rétabli explicitement (annulé par le reset) : centre le <dialog> */
  margin: auto;
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  width: min(44rem, calc(100vw - 2 * var(--gutter)));
  max-height: calc(100dvh - 2rem);
  box-shadow: var(--shadow-lg);
  background: var(--surface);
  color: var(--ink);
}

/* Modale ouverte : la page derrière ne défile plus (molette, clavier) */
html:has(.modal[open]) {
  overflow: hidden;
  scrollbar-gutter: stable;
}

.modal::backdrop {
  background: rgb(8 30 40 / 0.55);
  backdrop-filter: blur(2px);
}

.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-5) 0;
}

.modal__title {
  font-size: var(--text-2xl);
}

.modal__close {
  flex: none;
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-full);
  background: var(--bg-soft);
  color: var(--primary-dark);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.modal__close:hover {
  background: var(--line);
}

.modal__body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}


