/* ============================================================
   Zinéma — le panneau d'achat, posé par-dessus la fiche film.
   S'appuie sur film-mondrian.css : c'est un tableau comme les
   autres, simplement présenté au-dessus de la page.
   ============================================================ */

.m-achat {
  width: min(38rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: none;
  background: none;
  color: var(--ink);
  overflow: auto;
  overscroll-behavior: contain;
}
.m-achat::backdrop {
  background: rgba(16, 15, 12, 0.75);
}

.mondrian--achat {
  /* Le panneau s'ouvre déjà bordé par le tableau : pas de marge
     interne supplémentaire. */
  margin: 0;
}

/* ---------- La séance rappelée en tête ---------- */

.m-achat__film {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}
.m-achat__quand {
  font-weight: 400;
}

/* ---------- Les compteurs de billets ---------- */

.m-achat__compteur {
  flex: 1 1 12rem;
  gap: 0.75rem;
}
.m-achat__reglage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
}
/* Les deux boutons − et + : des carrés, assez grands pour être
   touchés au doigt sans viser (44px est le minimum confortable). */
.m-achat__pas {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  border: var(--ligne) solid currentColor;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--taille-texte);
  line-height: 1;
  transition: background 0.2s ease-out, color 0.2s ease-out;
}
.m-achat__pas:hover,
.m-achat__pas:focus-visible {
  background: var(--ink);
  color: var(--paper);
}
.m-achat__nombre {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--taille-titre);
  line-height: 1;
}

/* Le panneau d'achat n'est pas une page : il tient dans 38rem, et
   la marge des cases y reste serrée quand celle des pages s'élargit
   avec l'écran (voir .m-cell dans film-mondrian.css). */
@media (min-width: 900px) {
  .m-achat .m-cell { padding: 1.25rem; }
}

/* ---------- La séance ----------
   Deux formes pour la même information : une phrase quand la
   séance est déjà choisie, une liste déroulante quand elle reste
   à choisir. La liste a l'allure du reste du panneau — pas de
   cadre gris de navigateur au milieu d'un tableau noir et blanc. */

.m-achat__horaires {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.5rem 0;
  border: none;
  border-bottom: var(--ligne) solid currentColor;
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  appearance: none;
  cursor: pointer;
}
.m-achat__horaires:focus {
  outline: none;
}

/* ---------- L'adresse e-mail ---------- */

.m-achat__email {
  cursor: text;
}
.m-achat__email input {
  width: 100%;
  padding: 0.5rem 0;
  border: none;
  border-bottom: var(--ligne) solid currentColor;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
}
.m-achat__email input:focus {
  outline: none;
}
.m-achat__email input::placeholder {
  color: currentColor;
  opacity: 0.4;
}

/* ---------- Le message d'erreur ---------- */

/* Rouge : c'est un avertissement, pas une décoration — il échappe
   au tirage au sort des couleurs, comme les séances annulées. */
.m-achat__erreur {
  padding: 1rem;
  background: var(--paper);
  color: var(--red);
  font-weight: 700;
  font-size: var(--taille-texte);
  line-height: 1.35;
}

/* ---------- Les deux boutons du bas ---------- */

.m-achat__annuler {
  flex: 1 1 auto;
}
.m-achat__payer {
  flex: 2 1 auto;
  justify-content: flex-start;
}
.m-achat__payer:disabled {
  cursor: default;
  background: var(--paper);
  color: var(--ink);
  opacity: 0.5;
}

/* ---------- Mobile : une case par ligne ---------- */

@media (max-width: 599px) {
  .mondrian--achat .m-bande > * {
    flex: 1 1 100%;
  }
}
