/* ═══════════════════════════════════════════════════════════════════════════
   Check-in BVA — feuille de style
   Mobile first, thème sombre unique, animations sobres et rapides.
   ═════════════════════════════════════════════════════════════════════════ */

:root {
  --bg: #070a0f;
  --bg-2: #0c1119;
  --card: rgba(255, 255, 255, 0.045);
  --card-hi: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.09);
  --line-hi: rgba(255, 255, 255, 0.16);
  --txt: #e9eef6;
  --txt-2: #8b98ab;
  /* 4,65:1 sur les cartes — au-dessus du seuil WCAG AA pour du texte normal.
     L'ancienne valeur (#5c6779) tombait à 3,31:1, illisible en plein hall. */
  --txt-3: #727f92;

  --ok: #22d37f;
  --ok-dim: rgba(34, 211, 127, 0.14);
  --busy: #ffa62b;
  --busy-dim: rgba(255, 166, 43, 0.14);
  --off: #ff4d64;
  --off-dim: rgba(255, 77, 100, 0.12);

  --agent: #3d8bff;
  --gilet: #ff4fa3;

  --r-s: 12px;
  --r-m: 18px;
  --r-l: 26px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fast: 0.18s var(--ease);
  --mid: 0.34s var(--ease);

  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  margin: 0;
}

body {
  background: var(--bg);
  color: var(--txt);
  font: 400 16px/1.45 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

/* ─────────────────────────────────────────────────────────── fond animé ── */

.aurora {
  position: fixed;
  inset: -20%;
  z-index: 0;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
}
.aurora span {
  position: absolute;
  display: block;
  border-radius: 50%;
  animation: drift 26s var(--ease) infinite alternate;
}
.aurora span:nth-child(1) {
  width: 55vmax;
  height: 55vmax;
  left: -12%;
  top: -8%;
  background: radial-gradient(circle, rgba(61, 139, 255, 0.5), transparent 68%);
}
.aurora span:nth-child(2) {
  width: 48vmax;
  height: 48vmax;
  right: -14%;
  top: 22%;
  background: radial-gradient(circle, rgba(255, 79, 163, 0.36), transparent 68%);
  animation-duration: 32s;
  animation-delay: -8s;
}
.aurora span:nth-child(3) {
  width: 44vmax;
  height: 44vmax;
  left: 18%;
  bottom: -18%;
  background: radial-gradient(circle, rgba(34, 211, 127, 0.28), transparent 68%);
  animation-duration: 38s;
  animation-delay: -16s;
}
@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(6vw, -7vh, 0) scale(1.18);
  }
}

/* ────────────────────────────────────────────────────────────── écrans ── */

#app {
  position: relative;
  z-index: 1;
  height: 100%;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  pointer-events: none;
  visibility: hidden;
  transition: opacity var(--mid), transform var(--mid), visibility 0s linear 0.34s;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.screen.active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  visibility: visible;
  transition: opacity var(--mid), transform var(--mid), visibility 0s;
}
.screen.leaving {
  transform: translateY(-10px) scale(0.985);
}

.center-wrap {
  width: 100%;
  max-width: 460px;
  margin: auto;
  padding: calc(var(--sat) + 28px) 22px calc(var(--sab) + 28px);
}
.center-wrap.wide {
  max-width: 560px;
}

/* ──────────────────────────────────────────────────────────── en-têtes ── */

.hero-head {
  text-align: center;
  margin-bottom: 34px;
}
.hero-head.tight {
  margin-bottom: 24px;
}
.logo {
  width: 62px;
  height: 62px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: #fff;
  background: linear-gradient(145deg, var(--agent), #7b5cff 55%, var(--gilet));
  box-shadow: 0 14px 40px -12px rgba(61, 139, 255, 0.75);
  animation: pop 0.6s var(--ease) both;
}
.logo svg {
  width: 34px;
  height: 34px;
}
.hero-head h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.hero-head h1 span {
  background: linear-gradient(100deg, var(--agent), var(--gilet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.sub {
  margin: 7px 0 0;
  color: var(--txt-2);
  font-size: 14px;
}
.q {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--txt-3);
  text-align: center;
}

.back {
  position: absolute;
  top: calc(var(--sat) + 16px);
  left: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 15px;
  color: var(--txt-2);
  transition: background var(--fast), color var(--fast);
}
.back:active {
  background: var(--card);
  color: var(--txt);
}

/* ─────────────────────────────────────────────────────── choix du rôle ── */

.role-cards {
  display: grid;
  gap: 14px;
}
.role-card {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  padding: 20px 18px;
  text-align: left;
  border-radius: var(--r-l);
  background: var(--card);
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform var(--fast), background var(--fast), border-color var(--fast);
  animation: rise 0.5s var(--ease) both;
}
.role-card:nth-child(2) {
  animation-delay: 0.07s;
}
.role-card:active {
  transform: scale(0.975);
  background: var(--card-hi);
}
.rc-ico {
  flex: none;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 16px;
}
.rc-ico svg {
  width: 26px;
  height: 26px;
}
.role-card.agent .rc-ico {
  color: var(--agent);
  background: rgba(61, 139, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(61, 139, 255, 0.22);
}
.role-card.gilet .rc-ico {
  color: var(--gilet);
  background: rgba(255, 79, 163, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 79, 163, 0.22);
}
.role-card.agent:active {
  border-color: rgba(61, 139, 255, 0.5);
}
.role-card.gilet:active {
  border-color: rgba(255, 79, 163, 0.5);
}
.rc-txt {
  flex: 1;
  display: grid;
  gap: 3px;
}
.rc-txt b {
  font-size: 17px;
  font-weight: 620;
  letter-spacing: -0.01em;
}
.rc-txt small {
  color: var(--txt-2);
  font-size: 13.5px;
}
.rc-arrow {
  color: var(--txt-3);
  font-size: 26px;
  line-height: 1;
}

/* ──────────────────────────────────────────────────────────── clavier ── */

.pin-dots {
  display: flex;
  justify-content: center;
  gap: 11px;
  margin: 6px 0 10px;
}
.pin-dots i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--line-hi);
  transition: transform var(--fast), background var(--fast), border-color var(--fast);
}
.pin-dots i.on {
  background: var(--txt);
  border-color: var(--txt);
  transform: scale(1.12);
}
.pin-dots.shake {
  animation: shake 0.42s var(--ease);
}
.pin-error {
  min-height: 20px;
  margin: 0 0 12px;
  text-align: center;
  font-size: 13.5px;
  color: var(--off);
  opacity: 0;
  transition: opacity var(--fast);
}
.pin-error.on {
  opacity: 1;
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 300px;
  margin: 0 auto;
}
.keypad button {
  height: 68px;
  border-radius: 22px;
  font-size: 26px;
  font-weight: 500;
  background: var(--card);
  border: 1px solid var(--line);
  transition: transform 0.1s var(--ease), background var(--fast);
}
.keypad button:active {
  transform: scale(0.93);
  background: var(--card-hi);
}
.keypad button.del {
  font-size: 22px;
  color: var(--txt-2);
}

/* ────────────────────────────────────────────────── choix de la banque ── */

.segmented {
  position: relative;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid var(--line);
}
.segmented button {
  position: relative;
  z-index: 1;
  padding: 9px 6px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 550;
  color: var(--txt-2);
  transition: color var(--mid);
}
.segmented button.on {
  color: #0a0d12;
}
.segmented.big button {
  padding: 12px 6px;
  font-size: 15px;
}
.segmented .thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  border-radius: 999px;
  background: var(--txt);
  transition: transform var(--mid), width var(--mid);
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.6);
}

.bank-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 10px;
  margin: 20px 0 24px;
}
.bank-picker button {
  aspect-ratio: 1;
  border-radius: var(--r-m);
  font-size: 20px;
  font-weight: 600;
  background: var(--card);
  border: 1px solid var(--line);
  transition: transform 0.12s var(--ease), background var(--fast), border-color var(--fast),
    color var(--fast);
  animation: rise 0.4s var(--ease) both;
}
.bank-picker button:active {
  transform: scale(0.92);
}
.bank-picker button.on {
  background: var(--txt);
  color: #0a0d12;
  border-color: var(--txt);
  box-shadow: 0 10px 26px -10px rgba(255, 255, 255, 0.5);
}

.cta {
  width: 100%;
  padding: 17px;
  border-radius: 999px;
  font-size: 16.5px;
  font-weight: 620;
  color: #0a0d12;
  background: linear-gradient(100deg, var(--agent), #7b5cff);
  box-shadow: 0 14px 34px -14px rgba(61, 139, 255, 0.9);
  transition: transform 0.12s var(--ease), opacity var(--fast);
  color: #fff;
}
.cta:active {
  transform: scale(0.975);
}
.cta:disabled {
  opacity: 0.35;
  box-shadow: none;
  pointer-events: none;
}

/* ── état des banques dans le sélecteur de poste ────────────────────────── */

.bank-picker button.held {
  border-color: rgba(61, 139, 255, 0.45);
  background: rgba(61, 139, 255, 0.1);
  color: var(--agent);
}
.bank-picker button.hs {
  border-color: rgba(255, 255, 255, 0.12);
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.05) 0 6px,
    transparent 6px 12px
  );
  color: var(--txt-3);
}
.bank-picker button .bp-mark {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.bank-picker button {
  position: relative;
}
.bank-picker button.on .bp-mark {
  color: inherit;
}

.picker-legend {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 16px 0 0;
  font-size: 12px;
  color: var(--txt-3);
}
.picker-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.lg {
  width: 10px;
  height: 10px;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.lg.free {
  background: var(--card);
}
.lg.held {
  background: rgba(61, 139, 255, 0.35);
  border-color: rgba(61, 139, 255, 0.5);
}
.lg.hs {
  background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.28) 0 3px, transparent 3px 6px);
}

.desk-state {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: var(--r-m);
  font-size: 14px;
  line-height: 1.5;
  background: var(--card);
  border: 1px solid var(--line);
  animation: rise 0.35s var(--ease) both;
}
.desk-state[hidden] {
  display: none;
}
.desk-state b {
  display: block;
  margin-bottom: 3px;
  font-size: 15px;
  font-weight: 620;
}
.desk-state small {
  color: var(--txt-2);
  font-size: 13px;
}
.desk-state.wait {
  border-color: rgba(255, 166, 43, 0.45);
  background: var(--busy-dim);
}
.desk-state.ok {
  border-color: rgba(34, 211, 127, 0.45);
  background: var(--ok-dim);
}
.desk-state.no {
  border-color: rgba(255, 77, 100, 0.4);
  background: var(--off-dim);
}
.notes-line {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}
.note-tag {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--txt);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--line-hi);
}

.cta.alt {
  background: var(--card-hi);
  color: var(--txt);
  border: 1px solid var(--line-hi);
  box-shadow: none;
}
.cta[hidden],
.linkish[hidden] {
  display: none;
}
.linkish {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  font-size: 14px;
  color: var(--txt-2);
}

/* ── relève : carte affichée à l'agent en place ─────────────────────────── */

.relief-card {
  padding: 16px 18px;
  border-radius: var(--r-m);
  background: rgba(61, 139, 255, 0.12);
  border: 1px solid rgba(61, 139, 255, 0.5);
  animation: rise 0.4s var(--ease) both, cta-pulse 2.6s ease-in-out 0.6s infinite;
}
.relief-card[hidden] {
  display: none;
}
.relief-card h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 650;
}
.relief-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--txt-2);
  line-height: 1.5;
}
.relief-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 14px;
}
.relief-actions button {
  padding: 13px;
  border-radius: 14px;
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid var(--line-hi);
  background: var(--card-hi);
  transition: transform 0.12s var(--ease);
}
.relief-actions button:active {
  transform: scale(0.97);
}
.relief-actions .yes {
  color: #04220f;
  background: var(--ok);
  border-color: transparent;
}
.relief-actions .no {
  color: var(--off);
}
.relief-actions .full {
  grid-column: 1 / -1;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 2px;
}
.chip-pick {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 550;
  background: var(--card-hi);
  border: 1px solid var(--line-hi);
  transition: transform 0.12s var(--ease), background var(--fast), border-color var(--fast);
}
.chip-pick:active {
  transform: scale(0.95);
}
.chip-pick.on {
  background: var(--txt);
  color: #0a0d12;
  border-color: var(--txt);
}

.hs-btn {
  width: 100%;
  padding: 13px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 550;
  color: var(--txt-2);
  background: transparent;
  border: 1px dashed var(--line-hi);
  transition: color var(--fast), border-color var(--fast), background var(--fast);
}
.hs-btn:active {
  background: var(--card);
}
.hs-btn.active {
  color: var(--txt);
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.28);
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.06) 0 6px,
    transparent 6px 12px
  );
}

/* ── vols prioritaires ──────────────────────────────────────────────────── */

.flights {
  margin: 0 16px 14px;
  padding: 14px 16px;
  border-radius: var(--r-m);
  background: var(--card);
  border: 1px solid var(--line);
  animation: rise 0.4s var(--ease) both;
}
.flights[hidden] {
  display: none;
}
.flights h2 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 11px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--txt-3);
}
.fl-count {
  letter-spacing: 0;
  text-transform: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--busy);
}
.flight-list {
  display: grid;
  gap: 7px;
}
.flight {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  animation: rise 0.35s var(--ease) both;
}
.fl-term {
  flex: none;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--txt-2);
  background: rgba(255, 255, 255, 0.08);
}
.fl-main {
  min-width: 0;
}
.fl-no {
  font-size: 14.5px;
  font-weight: 650;
}
.fl-dest {
  display: block;
  font-size: 12.5px;
  color: var(--txt-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fl-left {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.fl-min {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.1;
}
.fl-lbl {
  display: block;
  font-size: 10.5px;
  color: var(--txt-3);
}
.flight.hot {
  border-color: rgba(255, 77, 100, 0.5);
  background: var(--off-dim);
}
.flight.hot .fl-min {
  color: var(--off);
}
.flight.warm {
  border-color: rgba(255, 166, 43, 0.42);
  background: var(--busy-dim);
}
.flight.warm .fl-min {
  color: var(--busy);
}
.flight.past .fl-min {
  color: var(--txt-3);
}
.fl-empty {
  margin: 4px 0;
  padding: 14px 8px;
  text-align: center;
  font-size: 13px;
  color: var(--txt-3);
}
.fl-foot {
  margin: 11px 0 0;
  font-size: 11.5px;
  color: var(--txt-3);
  text-align: center;
}
.fl-pick {
  width: 100%;
  margin-top: 10px;
  padding: 11px;
  border-radius: 13px;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--txt-2);
  background: transparent;
  border: 1px dashed var(--line-hi);
  transition: background var(--fast), color var(--fast);
}
.fl-pick:active {
  background: var(--card-hi);
  color: var(--txt);
}
.fl-pick.on {
  border-style: solid;
  border-color: rgba(255, 79, 163, 0.5);
  color: var(--gilet);
}

/* ── feuille de sélection des vols ──────────────────────────────────────── */

.sheet.tall {
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
}
.sheet-intro {
  margin: -6px 0 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--txt-2);
}
.pick-list {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding-bottom: 4px;
  min-height: 120px;
}
.pick-row {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  text-align: left;
  border-radius: 13px;
  background: var(--card);
  border: 1px solid var(--line);
  transition: background var(--fast), border-color var(--fast), transform 0.12s var(--ease);
}
.pick-row:active {
  transform: scale(0.985);
}
.pick-row.on {
  background: rgba(255, 79, 163, 0.11);
  border-color: rgba(255, 79, 163, 0.45);
}
.pick-box {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  font-size: 12px;
  color: transparent;
  border: 1.5px solid var(--line-hi);
}
.pick-row.on .pick-box {
  color: #0a0d12;
  background: var(--gilet);
  border-color: var(--gilet);
}
.pick-time {
  font-size: 13.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: var(--txt-2);
}
.pick-main {
  min-width: 0;
}
.pick-no {
  font-size: 14px;
  font-weight: 600;
}
.pick-dest {
  display: block;
  font-size: 12px;
  color: var(--txt-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pick-t {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 7px;
  color: var(--txt-2);
  background: rgba(255, 255, 255, 0.08);
}
.pick-row.gone {
  opacity: 0.42;
}

.sp-label.sub {
  margin-top: 18px;
  color: var(--txt-2);
}
.sp-note {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--txt-3);
}

/* ───────────────────────────────────────────────────────── barre haute ── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(var(--sat) + 12px) 16px 12px;
  background: linear-gradient(180deg, rgba(7, 10, 15, 0.92), rgba(7, 10, 15, 0.6) 70%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--txt-2);
}
.brand b {
  color: var(--txt);
  font-weight: 700;
}
.live {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--txt-3);
  transition: background var(--fast), box-shadow var(--fast);
}
.live.on {
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(34, 211, 127, 0.6);
  animation: ping 2.4s var(--ease) infinite;
}
.live.wait {
  background: var(--busy);
  animation: blink 1s ease-in-out infinite;
}
.live.off {
  background: var(--off);
}
.icon-btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--txt-2);
  transition: background var(--fast), color var(--fast), transform 0.12s var(--ease);
}
.icon-btn svg {
  width: 21px;
  height: 21px;
}
.icon-btn:active {
  background: var(--card-hi);
  color: var(--txt);
  transform: rotate(35deg);
}

/* ─────────────────────────────────────────────────────────── vue agent ── */

.agent-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 8px 20px calc(var(--sab) + 24px);
}

.desk-badge {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  animation: rise 0.5s var(--ease) both;
}
.db-term {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--txt-3);
}
.db-num {
  font-size: 46px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.db-lbl {
  font-size: 13px;
  color: var(--txt-3);
}

/* La carte de statut est aussi le bouton : un appui bascule
   Disponible ⇄ Occupé, et ouvre la banque quand elle est fermée. */
.hero-status {
  position: relative;
  display: grid;
  place-items: center;
  gap: 6px;
  width: 100%;
  padding: 36px 20px 30px;
  border-radius: var(--r-l);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
  transition: border-color var(--mid), background var(--mid), transform 0.12s var(--ease);
  animation: rise 0.5s 0.05s var(--ease) both;
}
.hero-status:active {
  transform: scale(0.982);
}
.hero-status:focus-visible {
  outline: 2px solid var(--txt);
  outline-offset: 3px;
}
.hs-next {
  position: relative;
  margin-top: 12px;
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--txt);
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.hero-status[data-status='hs'] .hs-next {
  display: none;
}
.hero-status .halo {
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  filter: blur(46px);
  opacity: 0.5;
  transition: background var(--mid), transform var(--mid);
  animation: breathe 5s ease-in-out infinite;
}
.hs-name {
  position: relative;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.hs-since {
  position: relative;
  font-size: 13.5px;
  color: var(--txt-2);
  font-variant-numeric: tabular-nums;
}
.hero-status[data-status='disponible'] {
  border-color: rgba(34, 211, 127, 0.4);
  background: var(--ok-dim);
}
.hero-status[data-status='disponible'] .halo {
  background: var(--ok);
}
.hero-status[data-status='disponible'] .hs-name {
  color: var(--ok);
}
.hero-status[data-status='occupe'] {
  border-color: rgba(255, 166, 43, 0.4);
  background: var(--busy-dim);
}
.hero-status[data-status='occupe'] .halo {
  background: var(--busy);
}
.hero-status[data-status='occupe'] .hs-name {
  color: var(--busy);
}
.hero-status[data-status='hs'] {
  border-color: rgba(255, 255, 255, 0.2);
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.06) 0 8px,
    transparent 8px 16px
  );
}
.hero-status[data-status='hs'] .halo {
  background: #94a3b8;
  opacity: 0.22;
}
.hero-status[data-status='hs'] .hs-name {
  color: #cbd5e1;
}
.hero-status[data-status='ferme'] {
  border-color: rgba(255, 77, 100, 0.32);
  background: var(--off-dim);
}
.hero-status[data-status='ferme'] .halo {
  background: var(--off);
  opacity: 0.32;
}
.hero-status[data-status='ferme'] .hs-name {
  color: var(--off);
}
.hero-status.bump {
  animation: bump 0.45s var(--ease);
}
/* Statut envoyé mais pas encore confirmé par le serveur */
.hero-status.pending .hs-name {
  animation: blink 1.1s ease-in-out infinite;
}

.actions {
  display: grid;
  gap: 10px;
}
.actions button {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
  padding: 15px 18px;
  text-align: left;
  border-radius: var(--r-m);
  background: var(--card);
  border: 1px solid var(--line);
  transition: transform 0.12s var(--ease), background var(--fast), border-color var(--fast),
    opacity var(--fast);
  animation: rise 0.45s var(--ease) both;
}
.actions button:nth-child(1) {
  animation-delay: 0.08s;
}
.actions button:nth-child(2) {
  animation-delay: 0.13s;
}
.actions button:nth-child(3) {
  animation-delay: 0.18s;
}
.actions button:active {
  transform: scale(0.978);
}
.actions .a-dot {
  grid-row: 1 / 3;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  transition: box-shadow var(--fast), transform var(--fast);
}
.actions button b {
  font-size: 16.5px;
  font-weight: 600;
}
.actions button small {
  font-size: 13px;
  color: var(--txt-3);
}
.actions button[data-status='disponible'] .a-dot {
  background: var(--ok);
}
.actions button[data-status='occupe'] .a-dot {
  background: var(--busy);
}
.actions button[data-status='ferme'] .a-dot {
  background: var(--off);
}
.actions button.on[data-status='disponible'] {
  background: var(--ok-dim);
  border-color: rgba(34, 211, 127, 0.55);
}
.actions button.on[data-status='occupe'] {
  background: var(--busy-dim);
  border-color: rgba(255, 166, 43, 0.55);
}
.actions button.on[data-status='ferme'] {
  background: var(--off-dim);
  border-color: rgba(255, 77, 100, 0.5);
}
.actions button.on .a-dot {
  transform: scale(1.15);
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.07);
}
.actions button.on b::after {
  content: '✓';
  margin-left: 8px;
  font-size: 14px;
  opacity: 0.75;
}

.foot-hint {
  margin: auto 0 0;
  text-align: center;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--txt-3);
}
.foot-hint b {
  color: var(--txt-2);
  font-weight: 600;
}
.foot-hint.warn {
  color: var(--busy);
}

/* ───────────────────────────────────────────────────── vue gilet rose ── */

/* Bandeau « activer le son » — iOS exige un geste utilisateur par chargement */
.audio-cta {
  display: flex;
  align-items: center;
  gap: 13px;
  width: calc(100% - 32px);
  margin: 0 16px 12px;
  padding: 14px 16px;
  text-align: left;
  border-radius: var(--r-m);
  color: var(--gilet);
  background: rgba(255, 79, 163, 0.13);
  border: 1px solid rgba(255, 79, 163, 0.45);
  animation: rise 0.4s var(--ease) both, cta-pulse 2.6s ease-in-out 0.6s infinite;
  transition: transform 0.12s var(--ease);
}
.audio-cta:active {
  transform: scale(0.98);
}
.audio-cta[hidden] {
  display: none;
}
.ac-ico {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 79, 163, 0.16);
}
.ac-ico svg {
  width: 21px;
  height: 21px;
}
.ac-txt {
  display: grid;
  gap: 2px;
}
.ac-txt b {
  font-size: 15px;
  font-weight: 620;
  color: var(--txt);
}
.ac-txt small {
  font-size: 12.5px;
  color: var(--txt-2);
}
@keyframes cta-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 79, 163, 0);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(255, 79, 163, 0.12);
  }
}

/* Éclair plein écran, coloré selon le statut */
.flash-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 45%, var(--flash, rgba(34, 211, 127, 0.55)), transparent 68%);
}
.flash-screen.on {
  animation: screen-flash 1.05s var(--ease);
}
/* Occupé / Fermé : plus bref et plus discret, sinon le tableau clignote sans arrêt */
.flash-screen.soft.on {
  animation: screen-flash-soft 0.6s var(--ease);
}
@keyframes screen-flash {
  0% {
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  38% {
    opacity: 0.25;
  }
  58% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
  }
}
@keyframes screen-flash-soft {
  0% {
    opacity: 0;
  }
  20% {
    opacity: 0.62;
  }
  100% {
    opacity: 0;
  }
}

.board-tools {
  display: grid;
  gap: 12px;
  padding: 2px 16px 14px;
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}
.counters {
  display: flex;
  gap: 8px;
}
.chip {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 6px;
  border-radius: 14px;
  font-size: 13px;
  color: var(--txt-2);
  background: var(--card);
  border: 1px solid var(--line);
}
.chip b {
  color: var(--txt);
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.chip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.chip.ok i {
  background: var(--ok);
}
.chip.busy i {
  background: var(--busy);
}
.chip.off i {
  background: var(--off);
}
.chip.ok b {
  color: var(--ok);
}
.chip.hs[hidden] {
  display: none;
}
.chip.hs i {
  background: repeating-linear-gradient(-45deg, var(--txt-2) 0 2px, transparent 2px 4px);
}
.chip.hs {
  border-style: dashed;
}

.switch {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  user-select: none;
}
.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.switch .track {
  position: relative;
  flex: none;
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line);
  transition: background var(--mid);
}
.switch .knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--txt-2);
  transition: transform var(--mid), background var(--mid);
}
.switch input:checked + .track {
  background: var(--ok);
  border-color: transparent;
}
.switch input:checked + .track .knob {
  transform: translateX(18px);
  background: #06210f;
}
.switch-lbl {
  font-size: 14px;
  color: var(--txt-2);
}

.board-main {
  flex: 1;
  padding: 0 16px calc(var(--sab) + 28px);
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}
.term-block {
  margin-bottom: 26px;
}
/* Collant sous la barre haute : les numéros de banque recommencent à 1 dans
   chaque terminal, un titre disparu au défilement fait envoyer un passager au
   mauvais terminal. */
.term-block h2 {
  position: sticky;
  top: calc(var(--sat) + 58px);
  z-index: 3;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0 -16px 12px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--txt-2);
  background: linear-gradient(180deg, rgba(7, 10, 15, 0.96) 65%, rgba(7, 10, 15, 0));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.term-block h2 .count {
  letter-spacing: 0;
  text-transform: none;
  font-size: 12.5px;
  font-weight: 500;
}
.term-block h2 .count b {
  color: var(--ok);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 10px;
}

.tile {
  position: relative;
  display: grid;
  gap: 4px;
  place-items: center;
  padding: 16px 6px 13px;
  border-radius: var(--r-m);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  transition: transform 0.16s var(--ease), background var(--mid), border-color var(--mid),
    opacity var(--mid);
  animation: rise 0.4s var(--ease) both;
}
.tile:active {
  transform: scale(0.94);
}
.tile .num {
  font-size: 27px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.tile .st {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.tile .pres {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0;
  transition: opacity var(--mid);
}
.tile.online .pres {
  opacity: 0.55;
}
.tile[data-status='disponible'] {
  background: var(--ok-dim);
  border-color: rgba(34, 211, 127, 0.42);
  color: var(--ok);
}
.tile[data-status='disponible'] .num {
  color: var(--ok);
}
.tile[data-status='occupe'] {
  background: var(--busy-dim);
  border-color: rgba(255, 166, 43, 0.34);
  color: var(--busy);
}
.tile[data-status='occupe'] .num {
  color: var(--busy);
}
.tile[data-status='ferme'] {
  color: var(--txt-3);
  opacity: 0.6;
}
.tile[data-status='ferme'] .num {
  color: var(--txt-2);
}
/* Hors service : rayé, impossible d'y envoyer un passager */
.tile[data-status='hs'] {
  color: var(--txt-3);
  border-color: rgba(255, 255, 255, 0.14);
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.055) 0 7px,
    transparent 7px 14px
  );
}
.tile[data-status='hs'] .num {
  color: var(--txt-3);
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}
.tile[data-status='hs'] .st {
  color: var(--txt-2);
  letter-spacing: 0.08em;
}
.tile.hide {
  display: none;
}
.tile.flash::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 2px currentColor;
  animation: flash 1.1s var(--ease);
}
.tile.flash {
  animation: bump 0.5s var(--ease);
}

.empty {
  padding: 44px 20px;
  text-align: center;
  color: var(--txt-3);
  font-size: 14px;
}

/* ──────────────────────────────────────────────── feuille de réglages ── */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity var(--mid);
}
.sheet-backdrop.on {
  opacity: 1;
}
.sheet {
  position: fixed;
  z-index: 21;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 10px 20px calc(var(--sab) + 22px);
  border-radius: 28px 28px 0 0;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  transform: translateY(102%);
  transition: transform 0.42s var(--ease);
  box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, 0.8);
}
.sheet.on {
  transform: none;
}
.grabber {
  width: 40px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: var(--line-hi);
}
.sheet h3 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 650;
}
.sheet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.sheet-row[hidden] {
  display: none;
}
.sr-txt {
  display: grid;
  gap: 2px;
}
.sr-txt b {
  font-size: 15.5px;
  font-weight: 550;
}
.sr-txt small {
  font-size: 12.5px;
  color: var(--txt-3);
  line-height: 1.4;
}
.switch.bare {
  gap: 0;
}
/* ── réglage fin des alertes (gilet rose) ───────────────────────────────── */

.sound-panel {
  padding: 4px 0 14px;
  border-top: 1px solid var(--line);
  margin-top: -1px;
}
.sound-panel[hidden] {
  display: none;
}
.sp-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin: 14px 0 9px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--txt-3);
}
.sp-label b {
  color: var(--txt-2);
  font-weight: 700;
}
.sp-tip,
.sp-val {
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  font-size: 12.5px;
}
.sp-val {
  color: var(--txt);
  font-variant-numeric: tabular-nums;
}

.tone-list {
  display: grid;
  gap: 7px;
}
.tone {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  text-align: left;
  border-radius: 15px;
  background: var(--card);
  border: 1px solid var(--line);
  transition: background var(--fast), border-color var(--fast), transform 0.12s var(--ease);
}
.tone:active {
  transform: scale(0.98);
}
.tone.on {
  background: rgba(255, 79, 163, 0.12);
  border-color: rgba(255, 79, 163, 0.5);
}
.tone-play {
  flex: none;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--gilet);
  background: rgba(255, 79, 163, 0.16);
  font-size: 11px;
}
.tone-name {
  flex: 1;
  font-size: 15px;
  font-weight: 550;
}
.tone-check {
  flex: none;
  color: var(--gilet);
  font-size: 15px;
  opacity: 0;
  transition: opacity var(--fast);
}
.tone.on .tone-check {
  opacity: 1;
}
.tone.ringing .tone-play {
  animation: bump 0.5s var(--ease);
}

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 34px;
  background: none;
  margin: 0;
}
.slider::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}
.slider::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  margin-top: -9px;
  border-radius: 50%;
  background: var(--gilet);
  border: 3px solid var(--bg-2);
  box-shadow: 0 3px 12px -3px rgba(255, 79, 163, 0.9);
}
.slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gilet);
  border: 3px solid var(--bg-2);
}

.sheet-row.nested {
  margin-top: 16px;
  padding: 13px 0 0;
}

.sheet-actions {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}
.ghost {
  padding: 14px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 550;
  background: var(--card);
  border: 1px solid var(--line);
  transition: background var(--fast), transform 0.12s var(--ease);
}
.ghost:active {
  transform: scale(0.98);
  background: var(--card-hi);
}
.ghost.danger {
  color: var(--off);
}
.sheet-foot {
  margin: 16px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--txt-3);
}

/* ───────────────────────────────────────────────────────────── toasts ── */

.toasts {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: calc(var(--sab) + 22px);
  transform: translateX(-50%);
  display: grid;
  gap: 8px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 16px;
  border-radius: 16px;
  font-size: 14px;
  background: rgba(20, 26, 36, 0.94);
  border: 1px solid var(--line-hi);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 14px 40px -14px rgba(0, 0, 0, 0.9);
  animation: toast-in 0.4s var(--ease) both;
}
.toast.out {
  animation: toast-out 0.3s var(--ease) forwards;
}
.toast i {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--txt-2);
}
.toast.ok i {
  background: var(--ok);
}
.toast.busy i {
  background: var(--busy);
}
.toast.off i {
  background: var(--off);
}
.toast b {
  font-weight: 620;
}
.toast span {
  color: var(--txt-2);
}

/* ────────────────────────────────────────────────────────── animations ── */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes bump {
  0% {
    transform: scale(1);
  }
  38% {
    transform: scale(1.055);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes flash {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.13);
  }
}
@keyframes ping {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 211, 127, 0.55);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(34, 211, 127, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 211, 127, 0);
  }
}
@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.35;
  }
}
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-9px);
  }
  40% {
    transform: translateX(8px);
  }
  60% {
    transform: translateX(-5px);
  }
  80% {
    transform: translateX(3px);
  }
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.08s !important;
  }

  /* Exception : l'éclair et le clignotement des tuiles ne sont pas de la
     décoration mais le canal d'alerte visuel — les supprimer priverait
     l'utilisateur de l'information elle-même. On les ralentit sans les tuer. */
  .flash-screen.on {
    animation-duration: 0.9s !important;
  }
  .flash-screen.soft.on {
    animation-duration: 0.6s !important;
  }
  .tile.flash::after {
    animation-duration: 1s !important;
  }
}

/* Écrans larges : le tableau respire un peu plus */
@media (min-width: 700px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  }
}
