:root {
  --bg: #f3f5f8;
  --card: #ffffff;
  --text: #101828;
  --muted: #667085;
  --line: #e4e7ec;
  --primary: #101828;
  --danger: #b42318;
  --radius: 18px;
  --zone-size: 72px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #000; color: var(--text); -webkit-tap-highlight-color: transparent; }
body { overscroll-behavior: none; }
button, input, select { font: inherit; }
button { touch-action: manipulation; }
[hidden] { display: none !important; }

.runtime-screen { position: fixed; inset: 0; z-index: 1; overflow: hidden; background: #000; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.runtime-background { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.runtime-blank { position: absolute; inset: 0; background: #000; pointer-events: none; }
.runtime-zones { position: absolute; inset: 0; }
.runtime-zone { position: absolute; width: var(--zone-size); height: var(--zone-size); transform: translate(-50%, -50%); border: 0; background: transparent; padding: 0; margin: 0; opacity: 0; }
.peek-overlay { position: absolute; z-index: 8; transform: translate(0, -50%); max-width: 88vw; white-space: pre-wrap; text-align: left; font-weight: 600; line-height: 1.05; pointer-events: none; text-shadow: 0 0 1px rgba(0,0,0,.18); }
.peek-overlay .peek-line { display: block; color: inherit; }
.peek-overlay .peek-line + .peek-line { margin-top: .16em; }
.peek-overlay.peek-text-mode { transform: none; max-width: none; white-space: normal; overflow: hidden; display: flex; align-items: center; justify-content: flex-start; }
.peek-text-content { display: block; flex: 0 0 auto; width: max-content; max-width: none; white-space: pre; line-height: 1.05; }

.peek-card { display: inline-flex; align-items: flex-end; gap: .06em; white-space: nowrap; min-height: 1.10em; font-variant-numeric: tabular-nums; }
.peek-card-rank { display: inline-flex; align-items: flex-end; justify-content: flex-end; line-height: .9; font-weight: 700; }
.peek-card-rank-single { min-width: .62em; font-size: 1.18em; }
.peek-card-rank-double { min-width: 1.02em; font-size: 1.18em; letter-spacing: -.03em; }
.peek-card-rank-face { font-size: 1.18em; }
.peek-card-rank-ten { font-size: 1.18em; letter-spacing: -.05em; }
.peek-suit { display: inline-block; flex: 0 0 auto; background-color: currentColor; mask-size: contain; mask-repeat: no-repeat; mask-position: center; -webkit-mask-size: contain; -webkit-mask-repeat: no-repeat; -webkit-mask-position: center; }
.peek-suit-spade { width: .92em; height: 1.08em; margin-bottom: .01em; mask-image: url('assets/suits/spade.png'); -webkit-mask-image: url('assets/suits/spade.png'); }
.peek-suit-club { width: 1.00em; height: 1.00em; margin-bottom: .03em; mask-image: url('assets/suits/club.png'); -webkit-mask-image: url('assets/suits/club.png'); }
.peek-suit-heart { width: .98em; height: 1.00em; margin-bottom: .02em; mask-image: url('assets/suits/heart.png'); -webkit-mask-image: url('assets/suits/heart.png'); }
.peek-suit-diamond { width: .92em; height: 1.08em; margin-bottom: .01em; mask-image: url('assets/suits/diamond.png'); -webkit-mask-image: url('assets/suits/diamond.png'); }
.peek-suit-text { width: auto; height: auto; line-height: 1; background: none; }

.qr-overlay { position: fixed; inset: 0; z-index: 40; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: max(24px, env(safe-area-inset-top)) 22px max(24px, env(safe-area-inset-bottom)); }
.qr-overlay-stage { width: min(84vw, 560px); aspect-ratio: 1; display: grid; place-items: center; }
.qr-overlay canvas { width: 100%; height: 100%; image-rendering: pixelated; }
.qr-close { position: absolute; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); border: 0; border-radius: 999px; padding: 14px 32px; background: #101828; color: #fff; font-weight: 700; font-size: 17px; }

.login-overlay { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 22px; background: rgba(0,0,0,.72); backdrop-filter: blur(10px); }
.login-card { width: min(100%, 390px); background: #fff; border-radius: 22px; padding: 24px; box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.login-card h1 { margin: 3px 0 18px; font-size: 28px; }
.login-card input { width: 100%; font-size: 16px; letter-spacing: normal; text-align: left; padding: 13px; border: 1px solid #d0d5dd; border-radius: 13px; }
.form-error { color: var(--danger); font-size: 14px; margin: 10px 0 0; }

.admin-view { position: fixed; inset: 0; z-index: 50; overflow: auto; background: var(--bg); }
.admin-header { padding: max(8px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 8px max(10px, env(safe-area-inset-left)); background: rgba(243,245,248,.98); display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.admin-header-actions { display: flex; gap: 8px; flex: 0 0 auto; }
.tabs { min-width: 0; flex: 1 1 auto; display: flex; gap: 6px; padding: 0; background: transparent; overflow: hidden; }
.tab { flex: 1 1 0; min-width: 0; border: 0; border-radius: 999px; padding: 10px 10px; background: #fff; color: #475467; font-weight: 700; white-space: nowrap; }
.tab.active { background: #101828; color: #fff; }
.admin-content { width: min(1120px, 100%); margin: 0 auto; padding: 16px 14px 60px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.panel-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-bottom: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: 0 1px 3px rgba(16,24,40,.04); }
.wide-card { margin-top: 14px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-heading.compact { margin-top: 20px; margin-bottom: 10px; }
.section-heading h2, .section-heading h3 { margin: 2px 0 0; }
.section-heading h2 { font-size: 21px; }
.section-heading h3 { font-size: 17px; }
.eyebrow { margin: 0; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: #667085; font-weight: 800; }
.live-pill { border-radius: 999px; padding: 7px 10px; background: #ecfdf3; color: #027a48; font-size: 12px; font-weight: 800; }
.count-badge { display: inline-grid; min-width: 27px; height: 27px; padding: 0 7px; place-items: center; border-radius: 999px; background: #f2f4f7; font-size: 13px; }

.button { border: 0; border-radius: 11px; padding: 11px 15px; font-weight: 750; cursor: pointer; }
.button.primary { background: var(--primary); color: #fff; }
.button.secondary { background: #f2f4f7; color: #344054; }
.button.danger { color: var(--danger); }
.button.ghost { background: #fff5f4; }
.button.small { padding: 8px 11px; font-size: 13px; }
.button.full { width: 100%; margin-top: 14px; }
.button-row { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 16px; }
.button-row.left { justify-content: flex-start; }
.button-row.spread { justify-content: space-between; align-items: flex-end; flex-wrap: wrap; }
.round-add { width: 42px; height: 42px; border: 0; border-radius: 50%; background: #101828; color: #fff; font-size: 27px; line-height: 1; cursor: pointer; }
.small-add { width: 34px; height: 34px; font-size: 22px; }

.stack-form, .modal-card { display: grid; gap: 13px; }
.stack-form label, .modal-card label, .field-label { display: grid; gap: 7px; font-size: 13px; font-weight: 700; color: #475467; }
input[type="text"], input[type="url"], input[type="password"], select { width: 100%; border: 1px solid #d0d5dd; border-radius: 11px; padding: 11px 12px; background: #fff; color: #101828; outline: none; }
input:focus, select:focus { border-color: #667085; box-shadow: 0 0 0 3px rgba(102,112,133,.12); }
.file-picker { display: block; border: 1px dashed #98a2b3; border-radius: 13px; padding: 16px; text-align: center; font-weight: 750; background: #f9fafb; cursor: pointer; }
.file-picker input { display: none; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.45; margin: 12px 0 0; }
.top-hint { margin-top: -4px; margin-bottom: 12px; }
.color-line { grid-template-columns: 1fr auto; align-items: center; }
.color-line input { width: 58px; height: 38px; border: 0; background: transparent; }
output { color: #101828; font-weight: 800; }

.qr-config-visual { display: grid; justify-items: center; gap: 10px; margin-bottom: 18px; }
.qr-box { width: min(72vw, 260px); aspect-ratio: 1; padding: 12px; border-radius: 15px; border: 1px solid var(--line); background: #fff; }
.qr-box canvas { width: 100%; height: 100%; }
.code-line { width: 100%; padding: 9px 10px; border-radius: 9px; background: #f2f4f7; color: #475467; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.link-tools { display: grid; gap: 9px; }
.copy-tool { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 12px; text-align: left; color: #101828; }
.copy-tool strong, .copy-tool small { display: block; }
.copy-tool small { color: #667085; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 3px; }
.item-list { display: grid; gap: 9px; }
.item-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 13px; padding: 11px 12px; }
.item-row.active { border-color: #6ce9a6; background: #f6fef9; }
.item-copy { min-width: 0; }
.item-copy strong, .item-copy small { display: block; }
.item-copy small { color: #667085; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.item-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.mini-button { border: 0; border-radius: 9px; padding: 8px 9px; background: #f2f4f7; color: #344054; font-size: 12px; font-weight: 750; }
.mini-button.activate { background: #101828; color: #fff; }
.mini-button.danger { color: var(--danger); background: #fff5f4; }

.phone-preview { position: relative; width: min(100%, 390px); aspect-ratio: 9 / 19.5; margin: 0 auto; overflow: hidden; border-radius: 26px; border: 7px solid #101828; background: #000; touch-action: none; }
.preview-background { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.preview-blank { position: absolute; inset: 0; display: grid; place-items: center; padding: 25px; text-align: center; color: #98a2b3; background: #111; font-size: 13px; }
.preview-zones { position: absolute; inset: 0; }
.preview-zone { position: absolute; width: 58px; height: 58px; transform: translate(-50%,-50%); border: 2px dashed rgba(255,255,255,.9); border-radius: 10px; background: rgba(16,24,40,.28); color: #fff; display: grid; place-items: center; font-size: 10px; font-weight: 800; text-shadow: 0 1px 2px #000; overflow: hidden; touch-action: none; cursor: grab; }
.preview-zone.dragging, .peek-preview-badge.dragging, .peek-card-position-preview.dragging { cursor: grabbing; outline: 3px solid rgba(255,255,255,.5); }
.peek-preview-badge { position: absolute; transform: translate(0,-50%); color: #808080; font-size: 28px; font-weight: 650; white-space: nowrap; touch-action: none; cursor: grab; display: inline-flex; align-items: baseline; }
.peek-card-position-preview { position: absolute; z-index: 9; transform: translate(0,-50%); color: #808080; font-size: 28px; font-weight: 600; line-height: 1.05; white-space: nowrap; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; text-shadow: 0 0 1px rgba(0,0,0,.18); }

.peek-text-box-editor { cursor: crosshair; }
.peek-text-rect { position: absolute; z-index: 8; display: flex; align-items: center; justify-content: flex-start; overflow: visible; outline: 2px dashed rgba(255,255,255,.95); background: rgba(16,24,40,.16); color: #808080; touch-action: none; cursor: move; user-select: none; -webkit-user-select: none; }
.peek-text-rect.dragging, .peek-text-rect.resizing { outline: 3px solid rgba(255,255,255,.95); }
.peek-text-preview-content { display: block; flex: 0 0 auto; width: max-content; max-width: none; white-space: pre; line-height: 1.05; font-weight: 600; pointer-events: none; text-shadow: 0 0 1px rgba(0,0,0,.18); }
.peek-text-resize-handle { position: absolute; right: -9px; bottom: -9px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(16,24,40,.75); cursor: nwse-resize; touch-action: none; }

.listener-list, .action-list { display: grid; gap: 9px; }
.listener-row, .action-row { display: grid; grid-template-columns: 1fr 2fr auto; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.listener-row { grid-template-columns: auto 1fr 2fr auto; }
.listener-row input[type="checkbox"] { width: 20px; height: 20px; }
.remove-row { width: 34px; height: 34px; border: 0; border-radius: 9px; background: #fff5f4; color: var(--danger); font-size: 20px; }
.check-line { display: flex !important; grid-template-columns: none !important; flex-direction: row; align-items: center; gap: 9px !important; }
.check-line input { width: 20px; height: 20px; }
.nested-options { padding: 12px; border-radius: 12px; background: #f9fafb; border: 1px solid var(--line); display: grid; gap: 12px; }

.modal { border: 0; padding: 0; background: transparent; width: min(92vw, 560px); max-height: 90vh; }
.modal::backdrop { background: rgba(16,24,40,.68); backdrop-filter: blur(5px); }
.modal-card { background: #fff; border-radius: 20px; padding: 18px; max-height: 86vh; overflow: auto; }
.modal-large { width: 100%; }
.icon-close { border: 0; width: 36px; height: 36px; border-radius: 50%; background: #f2f4f7; font-size: 24px; line-height: 1; }

.toast { position: fixed; z-index: 100; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: calc(100vw - 34px); padding: 11px 15px; border-radius: 999px; background: #101828; color: #fff; font-size: 13px; font-weight: 700; box-shadow: 0 8px 30px rgba(0,0,0,.25); }

@media (max-width: 760px) {
  .panel-grid { grid-template-columns: 1fr; }
  .admin-content { padding-left: 10px; padding-right: 10px; }
  .card { border-radius: 15px; padding: 15px; }
  .listener-row, .action-row { grid-template-columns: 1fr auto; }
  .listener-row input[type="checkbox"] { grid-row: span 2; }
  .listener-row input[type="url"], .action-row input[type="url"] { grid-column: 1 / -1; }
  .action-row .remove-row { grid-column: 2; grid-row: 1; }
  .item-row { grid-template-columns: 1fr; }
  .item-actions { justify-content: flex-start; }
}

/* v2.0.1 — garde-fous anti-débordement horizontal sur mobile */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body,
.runtime-screen,
.admin-view,
.login-overlay,
.qr-overlay {
  max-width: 100vw;
}

.admin-view {
  width: 100%;
  overflow-x: hidden;
}

.admin-header,
.tabs,
.admin-content,
.tab-panel,
.panel-grid,
.card,
.section-heading,
.stack-form,
.nested-options,
.item-list,
.item-row,
.listener-list,
.listener-row,
.action-list,
.action-row,
.link-tools,
.copy-tool,
.modal-card {
  min-width: 0;
  max-width: 100%;
}

.admin-header > *,
.section-heading > *,
.button-row > *,
.item-row > *,
.listener-row > *,
.action-row > * {
  min-width: 0;
}

.admin-header-actions,
.button-row,
.section-heading,
.item-actions {
  max-width: 100%;
  flex-wrap: wrap;
}

input,
select,
button,
canvas,
img {
  max-width: 100%;
}

.copy-tool,
.item-copy,
.hint,
.field-label,
.modal-card,
.card {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.modal {
  width: min(560px, calc(100vw - 20px));
  max-width: calc(100vw - 20px);
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 760px) {
  .admin-header {
    flex-wrap: wrap;
  }

  .tabs {
    order: 1;
    width: 100%;
    flex-basis: 100%;
  }

  .tab {
    padding: 9px 6px;
    font-size: 12px;
  }

  .admin-header-actions {
    order: 2;
    width: 100%;
  }

  #closeAdminButton {
    width: 100%;
  }

  .section-heading {
    flex-wrap: wrap;
  }

  .button-row {
    flex-wrap: wrap;
  }

  .tabs {
    width: 100%;
    max-width: 100%;
  }

  .admin-content {
    width: 100%;
    max-width: 100%;
  }
}

/* v2.0.2 — le point X du peek représente désormais son bord gauche, pas son centre. */

/* v2.0.3 — navigation de configuration fixe en haut. */

/* v2.0.4 — sauvegarde/restauration complète et données persistantes hors des mises à jour. */
.backup-actions { align-items: stretch; }
.backup-actions .button { flex: 1 1 220px; }

/* v2.0.6 — tri tactile des QR Codes par glisser-déposer. */
.qr-drag-handle {
  flex: 0 0 36px;
  width: 36px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: #eef2f6;
  color: #667085;
  font-size: 20px;
  line-height: 1;
  font-weight: 800;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.qr-drag-handle:active { cursor: grabbing; }
.sortable-qr-row { transition: transform .12s ease, opacity .12s ease, box-shadow .12s ease; }
.qr-row-dragging {
  opacity: .72;
  box-shadow: 0 8px 24px rgba(16,24,40,.16);
  outline: 2px solid rgba(16,24,40,.10);
}
body.qr-sorting { user-select: none; -webkit-user-select: none; }
body.qr-sorting .admin-content { overscroll-behavior: contain; }


/* v2.0.7 — drag QR robuste via Pointer Events globaux. */

/* v2.0.8 — tri QR avec véritable élément flottant + emplacement de dépôt. */
.qr-row-floating {
  box-sizing: border-box;
  background: var(--surface, #fff);
  opacity: .98;
  box-shadow: 0 18px 48px rgba(16,24,40,.28);
  outline: 2px solid rgba(52,64,84,.16);
  border-radius: 13px;
  transition: none !important;
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.qr-row-floating .qr-drag-handle { cursor: grabbing; }
.qr-drop-placeholder {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  border: 2px dashed #98a2b3;
  border-radius: 13px;
  background: rgba(152,162,179,.10);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55);
}
body.qr-sorting,
body.qr-sorting * {
  cursor: grabbing !important;
}


/* v2.0.9 — bouton principal pour revenir au faux accueil. */
.button.home-launch {
  background: #12b76a;
  color: #fff;
  border: 1px solid #079455;
  box-shadow: 0 2px 8px rgba(18,183,106,.28);
  font-weight: 850;
  white-space: nowrap;
}
.button.home-launch:hover { background: #039855; }
.button.home-launch:active {
  background: #027a48;
  transform: translateY(1px);
  box-shadow: 0 1px 4px rgba(18,183,106,.25);
}
@media (max-width: 520px) {
  .button.home-launch.small { padding: 9px 10px; font-size: 12px; }
}


/* v2.0.10 — second affichage listener : pastille numérique. */
.peek-badge-overlay,
.peek-badge-preview {
  position: absolute;
  z-index: 9;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e51b23;
  color: #fff;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 1px 4px rgba(0,0,0,.55), inset 0 0 0 1px rgba(255,255,255,.3);
  text-shadow: 0 1px 1px rgba(0,0,0,.35);
  pointer-events: none;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.listener-display-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  width: min(680px, 100%);
  margin: 0 auto 14px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}
.listener-display-tab {
  min-width: 0;
  border: 0;
  border-radius: 11px;
  padding: 11px 12px;
  background: transparent;
  color: #667085;
  font-weight: 800;
}
.listener-display-tab.active {
  background: #101828;
  color: #fff;
}
.listener-display-panel { display: none; }
.listener-display-panel.active { display: block; }

.peek-badge-preview {
  width: 28px;
  height: 28px;
  font-size: 14.5px;
  cursor: grab;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.peek-badge-preview.dragging {
  cursor: grabbing;
  outline: 3px solid rgba(255,255,255,.55);
}

.badge-phone-preview, .card-phone-preview { overflow: hidden; }

.position-controller {
  position: absolute;
  z-index: 12;
  top: 12px;
  right: 12px;
  width: 168px;
  padding: 0 10px 10px;
  border: 1px solid rgba(255,255,255,.21);
  border-radius: 15px;
  background: rgba(17,23,34,.93);
  color: #fff;
  box-shadow: 0 12px 34px rgba(0,0,0,.68);
  backdrop-filter: blur(12px);
  touch-action: none;
}
.position-controller-handle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 -10px 8px;
  padding: 9px 11px 8px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  border-radius: 15px 15px 0 0;
  background: #202a38;
  font-size: .72rem;
  font-weight: 850;
  cursor: grab;
  touch-action: none;
}
.position-controller-handle.dragging { cursor: grabbing; background: #293648; }
.controller-grip { color: #8794a6; letter-spacing: 2px; line-height: 1; }
.nudge-pad {
  display: grid;
  grid-template-columns: 42px 42px 42px;
  grid-template-rows: 42px 42px 42px;
  justify-content: center;
  align-items: center;
  gap: 3px;
}
.nudge-button {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #445166;
  border-radius: 11px;
  background: #293344;
  color: #fff;
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.09);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.nudge-button:active,
.nudge-button.pressed { background: #52647e; transform: scale(.96); }
.nudge-up { grid-column: 2; grid-row: 1; }
.nudge-left { grid-column: 1; grid-row: 2; }
.nudge-right { grid-column: 3; grid-row: 2; }
.nudge-down { grid-column: 2; grid-row: 3; }
.nudge-center {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  place-items: center;
  color: #e51b23;
  font-size: 1rem;
}
.badge-coordinates {
  margin: 5px 0 8px;
  text-align: center;
  color: #aeb9c9;
  font-size: .67rem;
  font-variant-numeric: tabular-nums;
}
.position-confirm {
  width: 100%;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #f4f7fb;
  color: #111820;
  font-weight: 900;
  touch-action: manipulation;
}

.listener-row {
  grid-template-columns: auto minmax(100px,1fr) minmax(160px,2fr) auto auto;
}
.listener-badge-option {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  color: #344054;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.listener-badge-option input {
  width: 18px !important;
  height: 18px !important;
  margin: 0;
  flex: 0 0 auto;
}

@media (max-width: 760px) {
  .listener-row {
    grid-template-columns: auto minmax(0,1fr) auto;
  }
  .listener-row > input[type="text"] {
    grid-column: 2;
  }
  .listener-row > input[type="url"] {
    grid-column: 1 / -1;
  }
  .listener-badge-option {
    grid-column: 1 / 3;
    justify-self: start;
  }
  .listener-row .remove-row {
    grid-column: 3;
    grid-row: 1;
  }
}


/* v2.0.13 — Actions du bouton PeekStick */
.peekstick-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 14px 0 18px; }
.peekstick-action-block { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.62); }
.peekstick-action-block .action-list { display: grid; gap: 8px; }
@media (max-width: 760px) {
  .peekstick-action-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .admin-header .tab { white-space: normal; line-height: 1.05; min-height: 42px; }
}

.account-label { font-size: 12px; overflow-wrap: anywhere; }

/* Inscription email */
.login-overlay { overflow-y: auto; }
.login-card .email-consent { display: flex; align-items: flex-start; gap: 9px; font-weight: 400; }
.login-card .email-consent input { width: 20px; height: 20px; flex: 0 0 20px; padding: 0; }
.account-page { overflow: auto; background: #f2f4f7; color: #101828; }
.account-shell { max-width: 1000px; margin: auto; padding: 20px; display: grid; gap: 16px; }
.account-shell .card { padding: 18px; }
.account-check { display: flex !important; align-items: center; gap: 10px; }
.account-table { overflow-x: auto; }
.account-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.account-table th, .account-table td { text-align: left; padding: 10px; border-bottom: 1px solid #d0d5dd; white-space: nowrap; }

/* 3.2.1 : repli portrait pour les navigateurs sans verrouillage natif. */
.portrait-warning { display: none; }
html.portrait-blocked body { background: #000; overflow: hidden; }
html.portrait-blocked body > :not(.portrait-warning) { display: none !important; }
html.portrait-blocked dialog::backdrop { display: none !important; }
html.portrait-blocked .portrait-warning {
  position: fixed; inset: 0; display: grid; place-items: center;
  padding: 24px; background: #000; color: #fff; text-align: center;
  font-size: 16px; font-weight: 600;
}

/* PeekStick diagnostic */
.peek-test-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:10px 0;}
#peekTestControls h3{margin:18px 0 8px;}
#peekTestControls .button{white-space:normal;min-height:44px;}
#peekTestError{color:#b42318;}
#peekTestDevice{width:100%;}

.tab[hidden]{display:none!important}.module-card{padding:14px;border:1px solid #8885;border-radius:12px}.module-card .button-row{display:flex;flex-wrap:wrap;gap:8px}.module-card textarea{min-height:110px;width:100%;font:inherit}.module-card input[type=number]{width:100%}.module-card a{overflow-wrap:anywhere}.module-card .hint{margin:0}.module-action-select{grid-column:1/-1;width:100%}

/* 4.0.1 — défilement natif indépendant des pages de compte. */
html.account-document { height: 100%; overflow: hidden; background: #f2f4f7; }
html.account-document body.account-page { position: fixed; inset: 0; width: 100%; height: auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; -webkit-overflow-scrolling: touch; touch-action: auto; }
.account-shell { width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr); padding-bottom: max(32px, env(safe-area-inset-bottom)); }
.account-shell .card, .account-shell form, .account-table { min-width: 0; max-width: 100%; }
.account-shell .account-table { overflow-x: auto; }
.account-shell .account-check input { flex: 0 0 20px; width: 20px; height: 20px; padding: 0; }
.account-shell #module-access, .account-shell #saved-access { scroll-margin-top: 12px; }
@media (max-width: 760px) { .account-shell { padding-left: 12px; padding-right: 12px; } .account-shell .card { padding: 14px; } }
html.account-document.portrait-blocked body.account-page { overflow: hidden; background: #000; }

/* Destination feedback uses the existing text geometry, without changing the last actual peek. */
.runtime-screen.destination-notice-visible #peekOverlay { visibility: hidden !important; }
