/* Billetterie : le guichet n° 1.
   Le caisson lumineux des tarifs, le formulaire, puis le guichet : enseigne lumineuse, vitre (hygiaphone, note
   scotchée, loge vide), afficheur client, sonnette, comptoir et plaque d'impression. Le billet thermique
   sort de la fente ; son talon de contrôle se détache quand on entre dans le musée (src/client/ticket.js). */

/* ---------- Mise en page ----------
   Téléphone : une colonne (en-tête, tarifs, formulaire, guichet, suite).
   Tablette : le guichet à droite, sur toute la hauteur.
   Ordinateur : l'en-tête sur deux colonnes, les tarifs et le formulaire côte à côte, le guichet à droite ; la suite
   (statut, « Entrer dans le musée ») sous le formulaire. */
.box-office {
  display: grid; row-gap: var(--s-5); align-items: start;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: 'head' 'board' 'form' 'booth' 'after';
  padding-block: var(--s-5) var(--s-4);
}
.box-office__head { grid-area: head; }
.board { grid-area: board; }
.ticket-form { grid-area: form; }
.booth { grid-area: booth; }
.box-office__after { grid-area: after; }

@media (min-width: 760px) {
  .box-office {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto auto auto auto 1fr;
    grid-template-areas: 'head booth' 'board booth' 'form booth' 'after booth' '. booth';
    column-gap: var(--s-6);
    padding-top: var(--s-6);
  }
}
@media (min-width: 1180px) {
  .box-office {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr) minmax(0, 1.08fr);
    grid-template-rows: auto auto auto 1fr;
    grid-template-areas: 'head head booth' 'board form booth' 'board after booth' '. . booth';
    column-gap: var(--s-5);
    row-gap: var(--s-4);
    padding-top: var(--s-5);
  }
}

/* ---------- En-tête ---------- */
.box-office__head { display: grid; gap: var(--s-2); align-content: start; }
.box-office__title { font-family: var(--f-inscription); font-weight: 500; font-size: var(--step-5); line-height: 0.9; letter-spacing: -0.015em; }
.box-office__lede { display: grid; gap: var(--s-2); }
.box-office__intro { font-size: var(--step-1); line-height: 1.35; max-width: 24ch; }
.box-office__queue { font-family: var(--f-admin); font-size: 0.8rem; line-height: 1.5; color: var(--ink-2); }
/* Ordinateur : la phrase d'accueil à droite du titre, ou dessous s'il ne lui laisse pas la place (« Ticket office »). */
@media (min-width: 1180px) {
  .box-office__head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--s-2) var(--s-5); }
  .box-office__eyebrow { flex: 0 0 100%; }
  .box-office__title { font-size: min(var(--step-5), 6.4rem); }
  .box-office__lede { flex: 1 1 15rem; padding-bottom: 0.4rem; }
}

/* ---------- Le caisson lumineux des tarifs ----------
   Cadre en aluminium, diffuseur opalin éclairé par l'arrière, lettres noires ; il éclaire un peu le mur. */
.board {
  position: relative; padding: 6px; border-radius: 7px;
  background: linear-gradient(180deg, #fbfbf9 0%, #d3d4d0 14%, #b5b6b2 50%, #cbccc8 86%, #8e8f8b 100%);
  box-shadow:
    0 0 0 1px rgba(27, 26, 24, 0.3),
    0 26px 34px -24px rgba(27, 26, 24, 0.7),
    0 0 46px 12px rgba(255, 250, 236, 0.8);
}
.board__panel {
  position: relative; padding: 1rem 1.2rem 0.85rem; border-radius: 3px;
  background: radial-gradient(140% 100% at 50% 38%, #fffffc 0%, #fdfbf4 46%, #f2eee2 100%);
  box-shadow: inset 0 0 0 1px rgba(27, 26, 24, 0.2), inset 0 1px 7px rgba(27, 26, 24, 0.14);
  color: #151412;
}
/* Reflet sur le diffuseur. */
.board__panel::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 24%);
}
.board__table { width: 100%; border-collapse: collapse; }
.board__title {
  caption-side: top; text-align: left; padding-bottom: 0.5rem; border-bottom: 3px solid currentColor;
  font-family: var(--f-sign); font-stretch: 75%; font-weight: 800; font-size: 1.3rem; line-height: 1; letter-spacing: 0.24em; text-transform: uppercase;
}
.board__table :is(th, td) { padding: 0.6rem 0; border-top: 1px solid rgba(27, 26, 24, 0.14); vertical-align: top; }
.board__table tr:first-child :is(th, td) { border-top: 0; }
.board__table th { text-align: left; font-weight: inherit; padding-right: 1rem; }
.board__table td { text-align: right; white-space: nowrap; }
.board__label { display: block; font-family: var(--f-sign); font-stretch: 82%; font-weight: 700; font-size: 0.9rem; line-height: 1.2; letter-spacing: 0.07em; text-transform: uppercase; }
.board__note { display: block; max-width: 26ch; margin-top: 0.15rem; font-family: var(--f-sign); font-size: 0.74rem; line-height: 1.35; color: #4f4c46; }
.board__price { display: block; font-family: var(--f-sign); font-stretch: 88%; font-weight: 700; font-size: 1.02rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.board__unit { display: block; font-family: var(--f-sign); font-size: 0.7rem; line-height: 1.35; color: #4f4c46; }
.board__fine { margin-top: 0.1rem; padding-top: 0.5rem; border-top: 1px solid rgba(27, 26, 24, 0.14); font-family: var(--f-sign); font-size: 0.68rem; color: #5d5953; }

/* ---------- Formulaire ---------- */
.ticket-form { display: grid; gap: var(--s-4); align-content: start; }
.field { display: grid; gap: 0.45rem; }
.field__label { font-family: var(--f-sign); font-stretch: 80%; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.8rem; }
.field__input {
  width: 100%; min-height: 52px; padding: 0.75rem 0.9rem;
  font-family: var(--f-admin); font-size: 1.05rem;
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: var(--radius);
}
.field__input::placeholder { color: var(--ink-2); opacity: 1; }
.field__input:focus-visible { outline: 2px solid var(--bordeaux); outline-offset: 2px; }

/* Le tarif : trois cases, une seule enfoncée. */
.tariff { min-width: 0; margin: 0; padding: 0; border: 0; }
.tariff legend { padding: 0; margin-bottom: 0.45rem; }
.tariff__options {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--paper); overflow: hidden;
}
.tariff__option { position: relative; display: grid; }
.tariff__option + .tariff__option { border-left: 1.5px solid var(--ink); }
.tariff__input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tariff__face {
  display: grid; place-items: center; min-height: 52px; padding: 0.45rem 0.5rem; text-align: center;
  font-family: var(--f-sign); font-stretch: 82%; font-weight: 700; font-size: 0.8rem; line-height: 1.15; letter-spacing: 0.07em; text-transform: uppercase;
  transition: background-color 0.15s, color 0.15s;
}
.tariff__option:hover .tariff__input:not(:checked) + .tariff__face { background: var(--plaster-2); }
.tariff__input:checked + .tariff__face { background: var(--ink); color: var(--paper); }
.tariff__input:focus-visible + .tariff__face { outline: 2px solid var(--bordeaux); outline-offset: -5px; }
.tariff__input:checked:focus-visible + .tariff__face { outline-color: var(--paper); }

.check { position: relative; display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 0.85rem; align-items: start; min-height: 44px; padding-block: 0.2rem; cursor: pointer; }
.check__input { position: absolute; opacity: 0; width: 24px; height: 24px; margin: 0; }
.check__box {
  width: 24px; height: 24px; margin-top: 0.05rem;
  border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--paper);
  display: grid; place-items: center;
}
.check__box::after {
  content: ''; width: 12px; height: 7px; margin-top: -3px;
  border-left: 2px solid var(--paper); border-bottom: 2px solid var(--paper);
  transform: rotate(-45deg); opacity: 0;
}
.check__input:checked + .check__box { background: var(--ink); }
.check__input:checked + .check__box::after { opacity: 1; }
.check__input:focus-visible + .check__box { outline: 2px solid var(--bordeaux); outline-offset: 3px; }
.check__label { line-height: 1.45; padding-top: 0.05rem; }

.ticket-form__submit { justify-self: start; min-width: 14rem; }
.ticket-form__submit[aria-busy='true'] { cursor: progress; }
/* Un billet est déjà sorti : « Émettre un nouveau billet » passe au second plan. */
.box-office:is([data-state='issued'], [data-state='checked']) .ticket-form__submit { background: transparent; color: var(--ink); border-color: var(--ink); }
.box-office:is([data-state='issued'], [data-state='checked']) .ticket-form__submit:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 559px), (min-width: 1180px) { .ticket-form__submit { justify-self: stretch; } }

/* ---------- Le guichet ---------- */
.booth { display: grid; justify-items: center; align-content: start; scroll-margin-top: var(--s-3); }
.booth__unit { --top: 0.7rem; --front: 4.7rem; position: relative; width: 100%; max-width: 25rem; }

/* L'enseigne : lettres rétroéclairées, voyant vert. */
.booth__sign {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.62rem 0.95rem 0.56rem; border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #35383b, #202224 60%, #1a1b1d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(0, 0, 0, 0.5);
  color: #f5f2e9;
  font-family: var(--f-sign); font-stretch: 76%; font-weight: 800; font-size: 0.86rem; line-height: 1; letter-spacing: 0.18em; text-transform: uppercase;
}
.booth__counter { text-shadow: 0 0 6px rgba(255, 250, 235, 0.4); }
.booth__lamp { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 0.64rem; letter-spacing: 0.16em; color: #aee8c4; }
.booth__lamp::before {
  content: ''; width: 0.6rem; height: 0.6rem; border-radius: 50%;
  background: radial-gradient(circle at 38% 34%, #effff4 0 12%, #55e292 40%, #14894d 78%, #0b5c33);
  box-shadow: 0 0 5px 1px rgba(85, 226, 146, 0.75), 0 0 14px 4px rgba(85, 226, 146, 0.28);
}

/* La vitre, dans son cadre en aluminium : derrière, la loge vide (une lampe de bureau, un dossier de chaise). */
.booth__window {
  position: relative; height: 9.2rem; overflow: hidden;
  border: 7px solid transparent; border-top-width: 5px; border-bottom-width: 0;
  background:
    radial-gradient(55% 80% at 20% 0%, rgba(255, 204, 138, 0.2), rgba(255, 204, 138, 0) 70%) padding-box,
    linear-gradient(180deg, #2c2f2e, #1d1f1f 68%, #161817) padding-box,
    linear-gradient(90deg, #8b8d89, #e4e5e2 16%, #c1c2be 50%, #e8e9e6 84%, #878985) border-box;
  box-shadow: inset 0 9px 14px -9px rgba(0, 0, 0, 0.8);
}
.booth__window::before {
  content: ''; position: absolute; left: 50%; bottom: -0.6rem; width: 3.8rem; height: 4.6rem; margin-left: -1.9rem;
  border-radius: 1.2rem 1.2rem 0.4rem 0.4rem;
  background: linear-gradient(180deg, #131414, #0c0d0d);
  box-shadow: inset 0 1px 0 rgba(255, 210, 150, 0.14);
}
/* Reflets : deux traits de lumière, et le hall qui se reflète en bas de la vitre. */
.booth__window::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(112deg, transparent 0 21%, rgba(255, 255, 255, 0.1) 21% 24%, transparent 24% 28%, rgba(255, 255, 255, 0.055) 28% 37%, transparent 37%),
    linear-gradient(0deg, rgba(233, 230, 223, 0.16), rgba(233, 230, 223, 0) 42%);
}
/* L'hygiaphone. */
.booth__phone {
  position: absolute; z-index: 1; left: 50%; top: 1.05rem; width: 3.8rem; height: 3.8rem; margin-left: -1.9rem; border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #f3f4f2, #c0c3c1 42%, #8f9391 78%, #6d716f);
  box-shadow: 0 0 0 2px #dadcd9, 0 0 0 3.5px #7c7f7c, 0 3px 7px rgba(0, 0, 0, 0.55);
}
.booth__phone::before {
  content: ''; position: absolute; inset: 0.42rem; border-radius: 50%;
  background: radial-gradient(circle, rgba(10, 11, 11, 0.88) 0 0.95px, transparent 1.3px) center / 5px 5px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
}
/* La note scotchée à l'intérieur de la vitre. */
.booth__note {
  position: absolute; z-index: 1; left: 5%; top: 1.3rem; max-width: 7.4rem; padding: 0.5rem 0.6rem 0.5rem;
  background: #f7f5ef; color: #1b1a18;
  font-family: var(--f-sign); font-stretch: 80%; font-weight: 700; font-size: 0.64rem; line-height: 1.25; letter-spacing: 0.05em; text-transform: uppercase;
  transform: rotate(-2.5deg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
.booth__note::before {
  content: ''; position: absolute; top: -0.4rem; left: 50%; width: 2.6rem; height: 0.8rem; margin-left: -1.3rem;
  background: rgba(240, 236, 222, 0.5); transform: rotate(3deg);
}

/* L'afficheur client, posé sur le comptoir : deux lignes de vingt caractères, en matrice de points. */
.booth__vfd {
  position: absolute; z-index: 2; right: 5%; bottom: calc(var(--front) + var(--top) * 0.5);
  padding: 0.3rem 0.32rem 0.34rem; border-radius: 5px;
  background: linear-gradient(180deg, #3b3e41, #1e2022 55%, #131415);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 8px 9px -5px rgba(0, 0, 0, 0.7);
}
.booth__screen {
  position: relative; display: grid; padding: 0.28rem 0.42rem; border-radius: 2px; overflow: hidden;
  background: radial-gradient(130% 160% at 50% -10%, #0f2522, #061110 60%, #040909);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.9), inset 0 2px 5px rgba(0, 0, 0, 0.9);
}
.booth__screen::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle, transparent 0.5px, rgba(4, 10, 10, 0.55) 0.85px) 0 0 / 2px 2px;
}
.booth__screen::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(172deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 45%);
}
.booth__line {
  width: 20ch; overflow: hidden; white-space: pre;
  font-family: var(--f-admin); font-weight: 500; font-size: 0.68rem; line-height: 1.4;
  color: #74f7d8; text-shadow: 0 0 2px rgba(116, 247, 216, 0.9), 0 0 7px rgba(116, 247, 216, 0.45);
}

/* La sonnette : personne ne vient. */
.booth__bell {
  position: absolute; z-index: 2; left: 6%; bottom: calc(var(--front) + var(--top) * 0.45);
  width: 3.2rem; height: 2.75rem; padding: 0; border: 0; border-radius: 4px; background: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.booth__bell::before {
  content: ''; position: absolute; left: 0.28rem; right: 0.28rem; bottom: 0.44rem; height: 1.45rem;
  border-radius: 50% 50% 12% 12% / 100% 100% 14% 14%;
  background: radial-gradient(120% 110% at 34% 22%, #ffffff 0 6%, #e4e7e8 16%, #aab0b2 48%, #6f7577 78%, #4c5153);
  box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.35);
  transform-origin: 50% 100%;
}
.booth__bell::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 0.52rem; border-radius: 3px;
  background: linear-gradient(180deg, #4a4d4f, #222425 60%, #151616);
  box-shadow: 0 5px 6px -3px rgba(0, 0, 0, 0.7);
}
.booth__knob {
  position: absolute; left: 50%; bottom: 1.84rem; width: 0.46rem; height: 0.42rem; margin-left: -0.23rem;
  border-radius: 50% 50% 2px 2px;
  background: radial-gradient(circle at 40% 30%, #ffffff, #a3a8aa 60%, #5f6466);
}
.booth__bell:hover::before { filter: brightness(1.06); }
.booth__bell:focus-visible { outline: 2px solid var(--bordeaux); outline-offset: 3px; }
.booth__bell.is-rung .booth__knob { animation: bell-press 0.24s ease-out; }
.booth__bell.is-rung::before { animation: bell-ring 0.9s ease-out; }
@keyframes bell-press { 35% { transform: translateY(3px); } }
@keyframes bell-ring { 10% { transform: rotate(-2deg); } 25% { transform: rotate(1.5deg); } 42% { transform: rotate(-0.9deg); } 62% { transform: rotate(0.4deg); } }

/* Le comptoir, un peu plus large que la vitre ; la plaque d'impression au bas de sa façade. */
.booth__counter-top {
  position: relative; z-index: 1; height: var(--top); margin-inline: -0.7rem;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #f1ebde, #dad0be 55%, #c9bea9);
  box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
.booth__front {
  position: relative; display: grid; justify-items: center; align-content: end;
  height: var(--front); margin-inline: -0.7rem; padding: 0 1rem 0.55rem;
  border-radius: 0 0 3px 3px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0) 22%),
    repeating-linear-gradient(176deg, rgba(120, 100, 72, 0) 0 9px, rgba(120, 100, 72, 0.07) 9px 11px, rgba(120, 100, 72, 0) 11px 23px),
    linear-gradient(180deg, #d7ccb8, #d2c6b0 60%, #c4b79f);
  box-shadow: 0 26px 30px -22px rgba(27, 26, 24, 0.6);
}
.booth__plate {
  position: relative; z-index: 3; display: grid; justify-items: center; gap: 0.32rem;
  width: min(100%, 20rem); padding: 0.36rem 0.8rem 0.4rem; border-radius: 3px;
  background: linear-gradient(180deg, #3c3f42, #26282b 50%, #1c1d1f);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 0 rgba(255, 255, 255, 0.45), 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.booth__slot-label {
  font-family: var(--f-sign); font-stretch: 78%; font-weight: 700; font-size: 0.58rem; line-height: 1; letter-spacing: 0.18em; text-transform: uppercase; color: #d9d4ca;
}
.booth__slot-label::after { content: ' ↓'; letter-spacing: 0; }
.booth__slot {
  position: relative; display: block; width: 100%; height: 8px; border-radius: 4px;
  background: #050505;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.95), 0 1px 0 rgba(255, 255, 255, 0.16);
}
/* La lame de coupe, dentelée, sur la lèvre basse de la fente. */
.booth__slot::after {
  content: ''; position: absolute; left: 6px; right: 6px; bottom: -3px; height: 3px;
  background: conic-gradient(from -45deg at 50% 100%, transparent, #c7cac8 1deg 89deg, transparent 90deg) 0 0 / 6px 3px repeat-x;
}
/* L'étiquette collée sur la façade. */
.booth__sticker {
  position: absolute; right: 1.1rem; top: 0.55rem; padding: 0.22rem 0.45rem;
  background: #fbfaf6; color: #1b1a18; border: 1px solid #1b1a18;
  font-family: var(--f-sign); font-stretch: 78%; font-weight: 800; font-size: 0.54rem; line-height: 1.2; letter-spacing: 0.08em; text-transform: uppercase;
  transform: rotate(1.5deg);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.25);
}

/* ---------- La sortie ----------
   Le billet est ancré en bas : il apparaît par son bord inférieur, le talon d'abord. Le haut du conteneur est à
   hauteur de la fente, sous la plaque (qui passe devant). */
.booth__out {
  position: relative; z-index: 2; width: 18.5rem; max-width: 100%;
  margin-top: calc(-0.95rem - 4px);
  display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden;
}
.booth__out.is-out { overflow: visible; }
.booth__waiting { padding: var(--s-5) 0 var(--s-3); text-align: center; font-family: var(--f-admin); font-size: 0.82rem; color: var(--ink-2); }

/* ---------- Le billet ---------- */
.ticket {
  flex: none; position: relative; outline: none;
  filter: drop-shadow(0 1px 1px rgba(27, 26, 24, 0.14)) drop-shadow(0 9px 10px rgba(27, 26, 24, 0.16));
  transition: transform 140ms cubic-bezier(0.3, 1.6, 0.6, 1);
}
.ticket.is-torn { transform: translateY(10px) rotate(-0.8deg); }
.ticket:focus-visible { outline: 2px solid var(--bordeaux); outline-offset: 6px; }
.ticket__body, .ticket__stub {
  --z: 7px; --perf: 3px;
  position: relative;
  background-color: #f6f4ee;
  background-image:
    linear-gradient(90deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0) 9%, rgba(0, 0, 0, 0) 88%, rgba(0, 0, 0, 0.06)),
    linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0) 14%);
  color: #2b2926;
  font-family: var(--f-admin); font-size: 0.72rem; line-height: 1.42; text-align: center;
}
/* Bords : dents de la lame de coupe, et les perforations entre le billet et son talon. */
.ticket__body {
  padding: calc(var(--z) + 0.8rem) 1.2rem 0.9rem;
  -webkit-mask:
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(2 * var(--z)) var(--z) repeat-x,
    linear-gradient(#000 0 0) 0 var(--z) / 100% calc(100% - var(--z) - var(--perf)) no-repeat,
    radial-gradient(circle at 50% 100%, #0000 2.2px, #000 2.7px) bottom / 9px var(--perf) repeat-x;
  mask:
    conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / calc(2 * var(--z)) var(--z) repeat-x,
    linear-gradient(#000 0 0) 0 var(--z) / 100% calc(100% - var(--z) - var(--perf)) no-repeat,
    radial-gradient(circle at 50% 100%, #0000 2.2px, #000 2.7px) bottom / 9px var(--perf) repeat-x;
}
.ticket__stub {
  padding: 0.7rem 1.2rem calc(var(--z) + 0.65rem);
  -webkit-mask:
    radial-gradient(circle at 50% 0, #0000 2.2px, #000 2.7px) top / 9px var(--perf) repeat-x,
    linear-gradient(#000 0 0) 0 var(--perf) / 100% calc(100% - var(--perf) - var(--z)) no-repeat,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--z)) var(--z) repeat-x;
  mask:
    radial-gradient(circle at 50% 0, #0000 2.2px, #000 2.7px) top / 9px var(--perf) repeat-x,
    linear-gradient(#000 0 0) 0 var(--perf) / 100% calc(100% - var(--perf) - var(--z)) no-repeat,
    conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / calc(2 * var(--z)) var(--z) repeat-x;
}
.ticket__body > * + * { margin-top: 0.15rem; }
.ticket__museum { font-size: 1.3rem; padding-bottom: 0.7rem; border-bottom: 1px dashed #8d8980; }
.ticket__museum .obj-i { color: inherit; } /* impression thermique : une seule encre */
.ticket__kind { margin-top: 0.65rem !important; font-weight: 500; font-size: 0.72rem; letter-spacing: 0.24em; text-transform: uppercase; }
.ticket__number { display: flex; justify-content: center; align-items: baseline; gap: 0.45rem; margin-top: 0.15rem !important; }
.ticket__k { font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }
.ticket__n { font-weight: 500; font-size: 1.75rem; line-height: 1.15; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }
.ticket__name { margin-top: 0.4rem !important; font-weight: 500; font-size: 0.92rem; text-transform: uppercase; letter-spacing: 0.06em; overflow-wrap: anywhere; }
.ticket__when { display: flex; justify-content: center; gap: 1.2rem; font-variant-numeric: tabular-nums; padding-bottom: 0.65rem; border-bottom: 1px dashed #8d8980; }
.ticket__lines { display: grid; margin-top: 0.6rem !important; text-align: left; text-transform: uppercase; }
.ticket__row { display: flex; align-items: baseline; gap: 0.4rem; }
.ticket__row dt { display: flex; flex: 1; align-items: baseline; gap: 0.4rem; min-width: 0; }
.ticket__row dt::after { content: ''; flex: 1; min-width: 1rem; border-bottom: 1px dotted #6b675f; transform: translateY(-0.28em); }
.ticket__row dd { margin: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ticket__row--total { margin-block: 0.1rem; font-weight: 500; font-size: 0.84rem; }
/* En réserve, comme les lignes promotionnelles des tickets de caisse. */
.ticket__saving { margin-top: 0.5rem !important; padding: 0.22rem 0.4rem; background: #2b2926; color: #f6f4ee; font-weight: 500; font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase; }
.ticket__access { margin-top: 0.5rem !important; padding-bottom: 0.6rem; border-bottom: 1px dashed #8d8980; text-align: left; text-transform: uppercase; }
.ticket__terms { display: grid; margin-top: 0.6rem !important; font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; }
.ticket__barcode { display: block; width: 100%; height: 2.9rem; margin-top: 0.7rem !important; color: #1f1d1a; }
.ticket__digits { margin-top: 0.25rem !important; font-size: 0.7rem; letter-spacing: 0.34em; font-variant-numeric: tabular-nums; }
.ticket__thanks { margin-top: 0.6rem !important; font-size: 0.66rem; line-height: 1.4; letter-spacing: 0.04em; text-transform: uppercase; }
.ticket__stub-head { display: flex; justify-content: space-between; gap: 0.6rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.ticket__stub-note { margin-top: 0.1rem; font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: #5a5751; }

/* Le talon détaché : on tire, un côté cède, il tombe. */
.ticket__stub.is-off { transform-origin: 14% 0; animation: stub-off 0.62s cubic-bezier(0.45, 0, 0.7, 0.2) forwards; }
@keyframes stub-off {
  0% { transform: none; }
  22% { transform: translateY(3px) rotate(-1.5deg); }
  36% { transform: translateY(6px) rotate(5deg); opacity: 1; }
  100% { transform: translate(-1rem, 11rem) rotate(26deg); opacity: 0; }
}

/* ---------- Après l'impression ---------- */
.box-office__after { display: grid; gap: var(--s-3); align-content: start; justify-items: center; }
.ticket-status { width: min(100%, 26rem); font-family: var(--f-admin); font-size: 0.85rem; line-height: 1.5; color: var(--ink-2); text-align: center; }
.ticket-actions { display: grid; gap: var(--s-2); width: min(100%, 22rem); }
@media (min-width: 760px) { .ticket-actions { width: 100%; } }
.ticket-actions .btn { width: 100%; }
.ticket-actions__enter span { transition: transform 0.2s var(--ease-out); }
.ticket-actions__enter:hover span { transform: translateX(3px); }
@media (min-width: 760px) {
  .box-office__after { justify-items: stretch; }
  .ticket-status { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .ticket { transition: none; }
  .tariff__face { transition: none; }
  .booth__bell.is-rung .booth__knob, .booth__bell.is-rung::before { animation: none; }
}
