/* Galerie publique des émojis et autocollants (emojis/, en/emojis/) — chargé seulement sur cette page.
   Espacements réguliers, noms tronqués proprement, aucune barre décorative. */
.emj-wrap { min-height: 480px; }
.emj-h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin: 0; font-size: 1.15rem; }
.h3 { font-size: 1.28rem; }
.emj-stats { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 22px 0 0; }
.emj-stats div { display: grid; gap: 0; }
.emj-stats dd { order: -1; margin: 0; font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; line-height: 1.15; }
.emj-stats dt { color: var(--muted); font-size: .88rem; }
.emj-demo { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 18px; }
.emj-demo .i { flex: none; margin-top: 2px; }

/* filtres */
.emj-filters { display: grid; gap: 16px; margin-bottom: 26px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.emj-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.emj-search { flex: 1 1 300px; min-width: 0; }
.emj-search .input { width: 100%; }
.emj-seg { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.emj-seg-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: 8px; background: none; color: var(--text-2); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
.emj-seg-btn:hover { color: var(--text); }
.emj-seg-btn.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.emj-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px solid var(--border); }
.emj-chips-label { margin-right: 4px; color: var(--muted); font-size: .84rem; font-weight: 600; }
.emj-chip { padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer; }
.emj-chip:hover { border-color: var(--border-strong); background: var(--surface-2); }
.emj-chip.is-active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }

/* packs */
.emj-packs-wrap { margin-bottom: 30px; }
.emj-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 14px; min-height: 34px; }
.emj-pager-mini { display: flex; align-items: center; gap: 8px; }
.emj-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.emj-pack { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.emj-pack:hover { border-color: var(--border-strong); background: var(--surface-2); }
.emj-pack.is-open { border-color: var(--primary); box-shadow: 0 0 0 3px var(--ring); }
.emj-pack img, .emj-pack-ph { flex: none; width: 48px; height: 48px; object-fit: contain; }
.emj-pack-text { display: grid; justify-items: start; gap: 3px; min-width: 0; }
.emj-pack-text strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* grille */
.emj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; transition: opacity .15s; }
.emj-grid.is-stickers { grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); }
.emj-grid.is-busy { opacity: .55; }
.emj-item { display: grid; justify-items: center; align-content: start; gap: 7px; min-width: 0; padding: 16px 8px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: inherit; font: inherit; cursor: pointer; }
.emj-item:hover, .emj-item:focus-visible { border-color: var(--primary); }
.emj-item img { width: 56px; height: 56px; object-fit: contain; }
.emj-grid.is-stickers .emj-item img { width: 120px; height: 120px; }
.emj-item-name { max-width: 100%; font-family: var(--font-mono); font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.emj-item-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.emj-empty { grid-column: 1 / -1; padding: 40px 0; text-align: center; }
.emj-pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 22px; }

/* appel à proposer */
.emj-submit { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.emj-submit > div { flex: 1 1 360px; }
.emj-submit p { margin: 0; }
.emj-submit .cluster { gap: 12px 18px; }

/* aperçu */
.emj-dialog { width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.emj-dialog::backdrop { background: var(--overlay, rgba(10, 14, 30, .55)); }
.emj-dialog-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.emj-dialog-head h2 { margin: 0; font-family: var(--font-mono); font-size: 1rem; overflow-wrap: anywhere; }
.emj-dialog-head .btn { margin-left: auto; }
.emj-dialog-body { display: grid; gap: 18px; padding: 18px; }
.emj-dialog-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: start; }
.emj-dialog-img { display: grid; place-items: center; aspect-ratio: 1; border-radius: 12px; background: var(--surface-2); background-image: linear-gradient(45deg, var(--surface-3) 25%, transparent 25%, transparent 75%, var(--surface-3) 75%), linear-gradient(45deg, var(--surface-3) 25%, transparent 25%, transparent 75%, var(--surface-3) 75%); background-size: 20px 20px; background-position: 0 0, 10px 10px; }
.emj-dialog-img img { width: 128px; height: 128px; object-fit: contain; }
.emj-dialog-img.is-sticker img { width: 180px; height: 180px; }
.emj-dialog-info { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: .9rem; }
.emj-dialog-info dt { color: var(--muted); }
.emj-dialog-info dd { margin: 0; overflow-wrap: anywhere; }
.emj-dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.emj-report-wrap summary { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .88rem; cursor: pointer; }
.emj-report { display: grid; gap: 12px; margin-top: 12px; }
.emj-report .field { margin: 0; }
.emj-report .btn { justify-self: start; }

@media (max-width: 640px) {
  .emj-packs { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
  .emj-pack { scroll-snap-align: start; }
  .emj-filters { padding: 12px; }
  .emj-seg { flex: 1 1 auto; }
  .emj-seg-btn { flex: 1; justify-content: center; padding: 7px 8px; }
  .emj-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
  .emj-grid.is-stickers { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); }
  .emj-grid.is-stickers .emj-item img { width: 96px; height: 96px; }
  .emj-dialog-grid { grid-template-columns: 1fr; }
  .emj-dialog-img { max-width: 200px; width: 100%; margin: 0 auto; }
  .emj-stats dd { font-size: 1.35rem; }
}
.emj-wrap { padding-top: 28px; }
