/*
 * Bankroll — l'espace admin.
 *
 * Une colonne de téléphone, la matière du jeu : l'or de la marque pour ce qui
 * est actif, les tuiles à tranche pour ce qu'on touche, les capitales espacées
 * pour les intertitres, des filets plutôt que des cadres. Les chiffres se
 * posent sur un bandeau séparé par des filets, pas dans des cartes.
 *
 * Sur un grand écran, la même colonne reste au centre : l'admin se tient au
 * téléphone, et la barre du bas se pose comme celle du salon.
 */

body.adm {
  --col: 560px;
  --tete: 56px;
  --vert: #4ccf6a;
  --rouge: var(--danger);
  --tranche: #10131a;
  min-height: 100vh;
  padding: calc(var(--sa-top) + var(--tete)) 0 calc(var(--bas) + 86px);
}

.adm-vue {
  width: min(var(--col), 100%);
  margin: 0 auto;
  padding: 14px 16px 24px;
}

/* ------------------------------ le haut ----------------------------- */

.adm-tete {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  height: calc(var(--sa-top) + var(--tete));
  padding: var(--sa-top) max(16px, calc((100% - var(--col)) / 2 + 16px)) 0;
  background: rgba(20, 22, 28, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.adm-marque {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.adm-marque img {
  border-radius: 7px;
}

.adm-tete h1 {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  font-size: 1rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adm-tete-droite {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* un bouton rond, sourd : retour, menu « ⋮ » */
.adm-rond {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
}

.adm-rond:active {
  background: rgba(255, 255, 255, 0.14);
}

.adm-rond .ico {
  width: 19px;
  height: 19px;
}

/* ------------------------------ la barre ---------------------------- */

.adm-barre .onglet {
  text-decoration: none;
}

.adm-barre i .ico {
  width: 21px;
  height: 21px;
}

/* le bouton du milieu porte le compte des tables qui se jouent en ce moment */
.adm-direct {
  position: relative;
  text-decoration: none;
}

.adm-direct.is-on {
  box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px color-mix(in srgb, var(--accent) 60%, transparent);
}

.adm-direct b {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border: 3px solid var(--bg);
  border-radius: 11px;
  background: var(--vert);
  color: #0d2414;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 16px;
  text-align: center;
}

/* ------------------------------ intertitres ------------------------- */

.adm-inter {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 10px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}

.adm-inter:first-child {
  margin-top: 4px;
}

.adm-inter a,
.adm-inter button {
  border: none;
  background: none;
  padding: 0;
  color: var(--accent);
  font: inherit;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
}

.adm-vide {
  margin: 14px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ------------------------------ la molette -------------------------- */
/* Celle de la salle d'attente : on change de période comme on change de mode. */

.adm-molette {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.adm-molette .molette-valeur {
  text-align: center;
  font-weight: 800;
}

.adm-molette small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

/* ------------------------------ maintenant -------------------------- */
/* Ce qui se passe en ce moment, quelle que soit la période : une seule ligne. */

.adm-maintenant {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
  text-decoration: none;
}

.adm-maintenant b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.adm-maintenant .sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line);
}

.adm-battement {
  position: relative;
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--vert);
}

.adm-battement::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--vert);
  opacity: 0;
  animation: adm-bat 2s ease-out infinite;
}

.adm-battement.est-calme {
  background: var(--muted);
}

.adm-battement.est-calme::after {
  display: none;
}

@keyframes adm-bat {
  0% {
    transform: scale(0.6);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

/* ------------------------------ le pouls ---------------------------- */
/*
 * Le panneau de l'accueil : une tuile à tranche, quatre chiffres en tête qui
 * servent aussi de légende — toucher un chiffre montre sa courbe — puis la
 * courbe elle-même.
 */

.adm-tuile {
  border-radius: 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-card) 88%, #fff) 0%, var(--bg-card) 50%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 0 var(--tranche),
    0 8px 18px rgba(0, 0, 0, 0.32);
}

.adm-pouls {
  padding: 4px 0 12px;
}

.adm-chiffres {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.adm-chiffre {
  position: relative;
  display: grid;
  gap: 3px;
  padding: 12px 10px 12px;
  border: none;
  border-right: 1px solid var(--line);
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.adm-chiffre:last-child {
  border-right: none;
}

.adm-chiffre small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.adm-chiffre b {
  font-size: 1.32rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

/* le chiffre choisi porte l'or sous lui, comme un onglet actif */
.adm-chiffre::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
}

.adm-chiffre.is-on::after {
  background: var(--accent);
}

.adm-chiffre.is-on small {
  color: var(--accent);
}

.adm-delta {
  font-size: 0.68rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.adm-delta.monte {
  color: var(--vert);
}

.adm-delta.baisse {
  color: var(--rouge);
}

.adm-courbe-zone {
  padding: 14px 14px 0;
  border-top: 1px solid var(--line);
}

/* ------------------------------ les graphiques ---------------------- */

.adm-graphe {
  position: relative;
  height: 150px;
  touch-action: pan-y;
  user-select: none;
}

.adm-graphe svg {
  position: absolute;
  inset: 0 0 18px;
  width: 100%;
  height: calc(100% - 18px);
  overflow: visible;
}

.adm-graphe .grille {
  stroke: var(--line);
  stroke-dasharray: 2 4;
  vector-effect: non-scaling-stroke;
}

.adm-graphe .trait {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.2;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.adm-graphe .barre-g {
  fill: color-mix(in srgb, var(--accent) 78%, #000);
}

.adm-graphe .barre-g.est-vue {
  fill: var(--accent);
}

/* les étiquettes vivent hors du SVG, pour rester nettes à toute largeur */
.adm-axe {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 14px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
}

.adm-axe span {
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
}

.adm-axe span:first-child {
  transform: none;
}

.adm-axe span:last-child {
  transform: translateX(-100%);
}

.adm-max {
  position: absolute;
  top: -2px;
  left: 0;
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 700;
}

.adm-bulle {
  position: absolute;
  top: 0;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 8px;
  background: #0d0f14;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  color: var(--text);
  font-size: 0.72rem;
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%);
}

.adm-bulle b {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.adm-repere {
  position: absolute;
  top: 0;
  bottom: 18px;
  width: 1px;
  background: color-mix(in srgb, var(--accent) 60%, transparent);
  pointer-events: none;
}

/* ------------------------------ le bandeau -------------------------- */
/* Des chiffres séparés par des filets, sans cadre : on lit, on ne touche pas. */

.adm-bandeau {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.adm-bandeau.est-trois {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.adm-bandeau.est-trois b {
  font-size: 1.3rem;
}

.adm-bandeau > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 12px 10px 12px 0;
  border-right: 1px solid var(--line);
}

.adm-bandeau > div + div {
  padding-left: 10px;
}

.adm-bandeau > div:last-child {
  border-right: none;
}

.adm-bandeau small {
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.adm-bandeau b {
  font-size: 1.12rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.adm-bandeau em {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* une précision sous un bloc : plus petite que le texte qu'elle accompagne */
.adm-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.adm-bandeau .est-or b {
  color: var(--accent);
}

/* ------------------------------ les modes --------------------------- */

.adm-pile {
  display: flex;
  height: 12px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--bg-soft);
  gap: 2px;
}

.adm-pile i {
  display: block;
  min-width: 3px;
}

.adm-legende {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin-top: 12px;
  font-size: 0.82rem;
}

.adm-legende span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}

.adm-legende span i {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 3px;
}

.adm-legende span b {
  margin-left: auto;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* les heures où l'on joue : vingt-quatre petites colonnes */
.adm-heures {
  display: grid;
  grid-template-columns: repeat(24, 1fr);
  align-items: end;
  gap: 2px;
  height: 56px;
}

.adm-heures i {
  display: block;
  min-height: 2px;
  border-radius: 2px 2px 0 0;
  background: color-mix(in srgb, var(--accent) 70%, var(--bg-card));
}

.adm-heures-axe {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
}

/* ------------------------------ les rangées ------------------------- */
/* Une liste de filets, comme les réglages du jeu. */

.adm-liste {
  display: grid;
}

.adm-ligne {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 0;
  border: none;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.adm-ligne:last-child {
  border-bottom: none;
}

.adm-ligne:active {
  background: rgba(255, 255, 255, 0.03);
}

.adm-ligne-dit {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.adm-ligne-dit > b {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 0.98rem;
  font-weight: 800;
}

.adm-ligne-dit > b > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adm-ligne-dit > small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adm-ligne-fin {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.adm-ligne-fin .ico {
  width: 15px;
  height: 15px;
  transform: rotate(-90deg);
}

.adm-ligne-fin b {
  color: var(--text);
}

/*
 * Une rangée qui porte un geste au bout : le lien vers la fiche à gauche, le
 * geste à droite, sur le même filet. Le geste est un mot souligné, pas un
 * bouton plein : on vient lire la fiche, pas débloquer à la chaîne.
 */
.adm-ligne-avec {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.adm-ligne-avec:last-child {
  border-bottom: none;
}

.adm-ligne-avec .adm-ligne {
  grid-template-columns: auto 1fr;
  border-bottom: none;
}

.adm-ligne-avec .adm-ligne .adm-ligne-fin {
  display: none;
}

.adm-lien-geste {
  padding: 10px 0;
  border: none;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
}

.adm-lien-geste b {
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.adm-lien-geste.est-arme {
  color: var(--rouge);
}

/* « en ligne » se lit en vert, partout où l'on dit quand on l'a vu */
.adm-vue .en-ligne {
  color: var(--vert);
  font-weight: 800;
}

/* les mots qui qualifient un compte : des capitales dans leur couleur, sans fond */
.adm-mot {
  flex: 0 0 auto;
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.adm-mot.est-rouge {
  color: var(--rouge);
}

.adm-mot.est-vert {
  color: var(--vert);
}

.adm-mot.est-gris {
  color: var(--muted);
}

/* ------------------------------ les visages ------------------------- */
/* Le médaillon de niveau au coin bas gauche, comme partout dans le jeu. */

.adm-visage {
  position: relative;
  display: inline-grid;
  width: var(--v, 44px);
  height: var(--v, 44px);
  flex: 0 0 auto;
}

.adm-visage img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-soft);
}

.adm-visage .niv {
  position: absolute;
  left: -4px;
  bottom: -3px;
  box-shadow: 0 0 0 2px var(--bg);
}

.adm-visage.en-ligne img {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--vert);
}

.adm-visage.est-bot img {
  filter: saturate(0.8);
}

.adm-initiale {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--muted);
  font-weight: 900;
}

/* une rangée de visages qui se chevauchent : les joueurs d'une table */
.adm-tablee {
  display: flex;
  align-items: center;
}

.adm-tablee .adm-visage {
  --v: 26px;
}

.adm-tablee .adm-visage + .adm-visage {
  margin-left: -7px;
}

.adm-tablee .adm-visage img {
  box-shadow: 0 0 0 2px var(--bg);
}

.adm-tablee .est-sorti img {
  opacity: 0.35;
}

.adm-tablee .est-lui img {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--accent);
}

/* ------------------------------ la recherche ------------------------ */

.adm-cherche {
  position: relative;
  margin-bottom: 10px;
}

.adm-cherche .ico {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  color: var(--muted);
}

.adm-cherche input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-soft);
  color: var(--text);
  /* seize pixels : l'iPhone ne zoome pas sur le champ */
  font-size: 16px;
  outline: none;
}

.adm-cherche input:focus {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
}

/* les onglets soulignés : un filtre par mot, sur une ligne qui défile */
.adm-onglets {
  display: flex;
  gap: 20px;
  margin: 0 -16px 4px;
  padding: 0 16px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.adm-onglets::-webkit-scrollbar {
  display: none;
}

.adm-onglets button {
  position: relative;
  flex: 0 0 auto;
  padding: 10px 0 11px;
  border: none;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.adm-onglets button em {
  margin-left: 5px;
  font-style: normal;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.8;
}

.adm-onglets button.is-on {
  color: var(--text);
}

.adm-onglets button.is-on::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
}

.adm-outils {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 10px 0 2px;
  color: var(--muted);
  font-size: 0.8rem;
}

/* le tri : un menu natif habillé, qui dit ce qu'il fait */
.adm-tri {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.adm-tri select {
  appearance: none;
  -webkit-appearance: none;
  padding: 6px 26px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
}

.adm-tri .ico {
  position: absolute;
  right: 8px;
  width: 13px;
  height: 13px;
  color: var(--muted);
  pointer-events: none;
}

.adm-encore span {
  font-weight: 600;
  opacity: 0.75;
}

.adm-encore {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

/* ------------------------------ la fiche ---------------------------- */

.adm-identite {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  margin: 4px 0 16px;
}

.adm-identite .adm-visage {
  --v: 78px;
}

/* le vrai médaillon, posé au coin du visage */
.adm-identite .niv-badge {
  position: absolute;
  left: -12px;
  bottom: -12px;
}

.adm-identite h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 0;
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1.15;
  word-break: break-word;
}

.adm-identite p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.adm-identite p .en-ligne {
  color: var(--vert);
  font-weight: 800;
}

.adm-bio {
  margin: -4px 0 16px;
  padding-left: 12px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  font-size: 0.86rem;
  font-style: italic;
  line-height: 1.5;
}

.adm-banni {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  margin: 0 0 16px;
  /* un aplat sourd teinté de rouge, pas de liseré : le liseré à gauche fait
     l'encadré que produit n'importe quel assistant */
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--rouge) 12%, transparent);
  color: var(--text);
  font-size: 0.86rem;
  line-height: 1.45;
}

.adm-banni .ico {
  margin-top: 2px;
  color: var(--rouge);
}

.adm-niveau-jauge {
  display: grid;
  gap: 6px;
  margin: 14px 0 4px;
}

.adm-niveau-jauge small {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* la dernière partie : la première chose qu'on cherche sur une fiche */
.adm-derniere {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 14px;
  color: var(--text);
  text-decoration: none;
}

.adm-derniere small {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.adm-derniere b {
  display: block;
  margin-top: 2px;
  font-size: 1rem;
}

.adm-derniere em {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
}

/* le bouton se tient comme le lien : à gauche, sans habillage de bouton */
button.adm-derniere,
button.adm-ligne {
  width: 100%;
  border: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.adm-issue {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 900;
}

.adm-issue.est-gagnee {
  background: color-mix(in srgb, var(--accent) 18%, rgba(0, 0, 0, 0.3));
  color: var(--accent);
}

.adm-issue.est-perdue {
  color: var(--rouge);
}

.adm-issue.est-direct {
  color: var(--vert);
}

.adm-issue.est-menu {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

/* un geste de menu peut être un lien : il ne se souligne pas */
a.adm-geste-menu {
  text-decoration: none;
}

.adm-feuille h3 .adm-mot {
  margin-left: 6px;
  vertical-align: 0.25em;
}

.adm-issue .ico {
  width: 19px;
  height: 19px;
}

/* le graphique des parties d'un joueur : jouées en sourd, gagnées en or */
.adm-colonnes {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  align-items: end;
  gap: 4px;
  height: 92px;
}

.adm-colonne {
  position: relative;
  display: grid;
  align-items: end;
  height: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

.adm-colonne i {
  display: block;
  width: 100%;
  min-height: 2px;
  border-radius: 3px 3px 0 0;
  background: color-mix(in srgb, var(--muted) 34%, var(--bg-card));
  overflow: hidden;
  position: relative;
}

.adm-colonne i em {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--accent);
}

.adm-colonne.is-on i {
  box-shadow: 0 0 0 2px var(--text);
}

.adm-colonnes-axe {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 700;
  text-align: center;
}

.adm-filtre-actif {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.adm-filtre-actif .ico {
  width: 14px;
  height: 14px;
}

/* un message du chat, cité */
.adm-cite {
  display: grid;
  gap: 3px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.adm-cite:last-child {
  border-bottom: none;
}

.adm-cite p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  word-break: break-word;
}

.adm-cite small {
  color: var(--muted);
  font-size: 0.72rem;
}

.adm-cite small a {
  color: var(--accent);
  text-decoration: none;
}

/* un fait, sur deux colonnes : ce qu'il est, ce qu'il vaut */
.adm-faits {
  display: grid;
}

.adm-faits div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
}

.adm-faits div:last-child {
  border-bottom: none;
}

.adm-faits span {
  color: var(--muted);
}

.adm-faits b {
  text-align: right;
  font-weight: 700;
}

/* ------------------------------ le journal -------------------------- */

.adm-jour {
  margin: 22px 0 4px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.adm-geste {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.adm-geste-signe {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--muted);
}

.adm-geste-signe .ico {
  width: 17px;
  height: 17px;
}

.adm-geste-signe.est-or {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, rgba(0, 0, 0, 0.3));
}

.adm-geste-signe.est-rouge {
  color: var(--rouge);
}

.adm-geste-signe.est-vert {
  color: var(--vert);
}

.adm-geste p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

.adm-geste p b {
  font-weight: 800;
}

.adm-geste small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.74rem;
}

.adm-geste small a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

/* les régisseurs, en tête du journal : une rangée qui défile et qui filtre */
.adm-regisseurs {
  display: flex;
  gap: 14px;
  margin: 0 -16px 6px;
  padding: 4px 16px 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.adm-regisseurs::-webkit-scrollbar {
  display: none;
}

.adm-regisseur {
  display: grid;
  justify-items: center;
  gap: 5px;
  width: 64px;
  flex: 0 0 auto;
  padding: 0;
  border: none;
  background: none;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.adm-regisseur .adm-visage {
  --v: 50px;
}

.adm-regisseur span {
  max-width: 64px;
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adm-regisseur em {
  font-size: 0.64rem;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.adm-regisseur.is-on {
  color: var(--text);
}

.adm-regisseur.is-on .adm-visage img {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);
}

.adm-regisseur.est-retire {
  opacity: 0.55;
}

.adm-regisseur .adm-tous .ico {
  width: 22px;
  height: 22px;
}

.adm-regisseur .adm-tous {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--text);
}

/* ------------------------------ la feuille du bas ------------------- */

.adm-voile {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(6, 7, 10, 0.62);
  animation: adm-fondu 0.18s ease;
}

.adm-feuille {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 41;
  width: min(var(--col), 100%);
  max-height: 88vh;
  overflow-y: auto;
  padding: 10px 18px calc(var(--bas) + 14px);
  border-radius: 22px 22px 0 0;
  background: var(--bg-soft);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.45);
  transform: translateX(-50%);
  animation: adm-monte 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes adm-monte {
  from {
    transform: translate(-50%, 100%);
  }
  to {
    transform: translate(-50%, 0);
  }
}

@keyframes adm-fondu {
  from {
    opacity: 0;
  }
}

.adm-poignee {
  display: block;
  width: 40px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 2px;
  background: var(--line);
}

.adm-feuille h3 {
  margin: 0 0 4px;
  font-size: 1.12rem;
  font-weight: 900;
}

.adm-feuille .adm-sous {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

/* les gestes d'un menu : un signe, un titre, ce que ça fait */
.adm-geste-menu {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 12px 0;
  border: none;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.adm-geste-menu:last-child {
  border-bottom: none;
}

.adm-geste-menu > i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--muted);
}

.adm-geste-menu > i .ico {
  width: 19px;
  height: 19px;
}

.adm-geste-menu b {
  display: block;
  font-size: 0.96rem;
  font-weight: 800;
}

.adm-geste-menu small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.adm-geste-fin .ico {
  width: 15px;
  height: 15px;
  color: var(--muted);
  transform: rotate(-90deg);
}

.adm-geste-menu.est-grave b,
.adm-geste-menu.est-grave > i {
  color: var(--rouge);
}

.adm-geste-menu.est-or > i {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, rgba(0, 0, 0, 0.3));
}

/* l'interrupteur du jeu, au bout d'un geste qui se bascule */
.adm-interrupteur {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 13px;
  background: var(--line);
  transition: background 0.15s ease;
}

.adm-interrupteur::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}

.adm-interrupteur.is-on {
  background: var(--accent);
}

.adm-interrupteur.is-on::after {
  transform: translateX(18px);
}

/* la grille de « Plus » */
.adm-grille {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 4px 0 18px;
}

.adm-case {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 16px 6px 13px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 800;
}

.adm-case .ico {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.adm-case em {
  position: absolute;
  top: 8px;
  right: 10px;
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.adm-qui {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: center;
}

/* ------------------------------ formulaires ------------------------- */

.adm-champ {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.adm-champ > span {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.adm-champ > span em {
  font-style: normal;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.adm-champ > span em.est-plein {
  color: var(--rouge);
}

.adm-champ input,
.adm-champ select,
.adm-champ textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  outline: none;
  resize: none;
}

.adm-champ input:focus,
.adm-champ textarea:focus {
  border-color: color-mix(in srgb, var(--accent) 60%, var(--line));
}

.adm-champ-ligne {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
}

.adm-champ-ligne input {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  letter-spacing: 0.04em;
}

.adm-erreur {
  margin: -4px 0 12px;
  color: var(--rouge);
  font-size: 0.84rem;
}

.adm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 6px;
}

.adm-actions.seule {
  grid-template-columns: 1fr;
}

.adm-actions .gbtn {
  width: 100%;
}

.gbtn.est-or {
  --face: #e9b414;
  --edge: #7d5f05;
  color: var(--accent-ink);
}

.gbtn.est-or b {
  text-shadow: none;
}

.gbtn.est-rouge {
  --face: #c93a2c;
  --edge: #5e1810;
}

.gbtn.est-sourd {
  --face: #2b3140;
  --edge: #151922;
}

.gbtn[disabled] {
  opacity: 0.45;
  cursor: default;
}

/* la molette du niveau : grande, au centre, avec ce qu'elle va écrire dessous */
.adm-niveau {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin: 6px 0 12px;
}

.adm-niveau .molette-fleche {
  width: 46px;
  height: 46px;
}

.adm-niveau .molette-fleche .ico {
  width: 20px;
  height: 20px;
}

.adm-niveau input {
  width: 100%;
  border: none;
  background: none;
  color: var(--text);
  font-size: 2.6rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-align: center;
  outline: none;
  -moz-appearance: textfield;
}

.adm-niveau input::-webkit-outer-spin-button,
.adm-niveau input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.adm-sauts {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: -4px 0 14px;
}

.adm-sauts button {
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

/* ------------------------------ l'aperçu de la notification --------- */
/* Telle qu'elle tombera sur un écran verrouillé : c'est ce qu'on relit. */

.adm-ecran {
  margin: 0 0 18px;
  padding: 18px 12px 22px;
  border-radius: 18px;
  background:
    radial-gradient(260px 160px at 20% 0%, rgba(242, 193, 27, 0.16), transparent 70%),
    linear-gradient(180deg, #232838, #12141a);
}

.adm-ecran-heure {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 2.4rem;
  font-weight: 300;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.adm-notif {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 16px;
  background: rgba(60, 64, 78, 0.72);
  backdrop-filter: blur(12px);
}

.adm-notif img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

.adm-notif-haut {
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.adm-notif b {
  display: block;
  margin-top: 2px;
  font-size: 0.9rem;
  word-break: break-word;
}

.adm-notif p {
  margin: 1px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.86rem;
  line-height: 1.35;
  word-break: break-word;
}

.adm-notif .est-vide {
  color: rgba(255, 255, 255, 0.4);
}

.adm-portee {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.adm-portee b {
  color: var(--text);
}

/* ------------------------------ divers ------------------------------ */

.adm-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bas) + 86px);
  z-index: 50;
  max-width: min(420px, calc(100% - 32px));
  padding: 11px 16px;
  border-radius: 12px;
  background: #0d0f14;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  color: var(--text);
  font-size: 0.88rem;
  transform: translateX(-50%);
  animation: adm-fondu 0.2s ease;
}

.adm-toast.est-erreur {
  box-shadow: inset 3px 0 0 var(--rouge), 0 8px 24px rgba(0, 0, 0, 0.45);
}

.adm-chargement {
  display: grid;
  gap: 12px;
  margin-top: 8px;
}

.adm-chargement i {
  display: block;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--bg-soft) 0%, var(--bg-card) 50%, var(--bg-soft) 100%);
  background-size: 200% 100%;
  animation: adm-luit 1.2s linear infinite;
}

@keyframes adm-luit {
  to {
    background-position: -200% 0;
  }
}

.adm-texte {
  margin: 8px 0 0;
  font-size: 0.92rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.adm-pli {
  border-bottom: 1px solid var(--line);
}

.adm-pli summary {
  padding: 10px 0;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.adm-pli summary::-webkit-details-marker {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .adm-feuille,
  .adm-voile,
  .adm-toast,
  .adm-battement::after,
  .adm-chargement i {
    animation: none;
  }
}

/* le nom d'un joueur dans un fil : un lien qui ne se souligne pas */
.adm-geste p a {
  color: var(--text);
  text-decoration: none;
}

/* ------------------------------ la conversation --------------------- */
/*
 * Le fil d'une table : les autres à gauche avec leur visage, celui dont on
 * vient à droite, en or. Les bulles gardent la matière du jeu : une face, pas
 * de queue de bande dessinée.
 */

.adm-fil {
  display: grid;
  gap: 4px;
  margin-top: 14px;
}

.adm-fil-jour {
  margin: 14px 0 6px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-align: center;
  text-transform: uppercase;
}

.adm-bulle-ligne {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: end;
  gap: 8px;
  margin-top: 8px;
  padding-right: 44px;
}

.adm-bulle-ligne.est-suite {
  margin-top: 0;
}

.adm-bulle-ligne.est-lui {
  grid-template-columns: minmax(0, 1fr);
  justify-items: end;
  padding: 0 0 0 44px;
}

.adm-bulle-visage {
  align-self: start;
  margin-top: 2px;
}

.adm-bulle-corps {
  max-width: 100%;
  padding: 7px 11px 8px;
  border-radius: 14px 14px 14px 4px;
  background: var(--bg-card);
  box-shadow: 0 2px 0 var(--tranche);
}

.est-lui .adm-bulle-corps {
  border-radius: 14px 14px 4px 14px;
  background: color-mix(in srgb, var(--accent) 16%, var(--bg-card));
  box-shadow: 0 2px 0 color-mix(in srgb, var(--accent) 35%, var(--tranche));
}

.adm-bulle-qui {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
  font-size: 0.72rem;
}

.adm-bulle-qui a {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.adm-bulle-qui time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.est-lui .adm-bulle-qui {
  justify-content: flex-end;
}

.adm-bulle-corps p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

/* l'en-tête d'une feuille de détail : le visage, puis qui et quand */
.adm-feuille-tete {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.adm-feuille-tete .adm-sous {
  margin: 2px 0 0;
}

.adm-feuille-tete .adm-sous a,
.adm-feuille .adm-banni b {
  color: var(--accent);
  text-decoration: none;
}

/* le texte d'un joueur, en entier : un liseré d'or, pas un encadré */
.adm-lettre {
  margin: 0 0 16px;
  padding: 2px 0 2px 14px;
  border-left: 2px solid var(--accent);
  font-size: 0.98rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.adm-feuille .adm-faits {
  margin-bottom: 12px;
}

.adm-feuille .adm-inter {
  margin-top: 18px;
}

/* la langue choisie : son drapeau devant son nom, comme au choix de la langue du jeu */
.adm-cible {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: center;
  align-items: center;
  column-gap: 8px;
}

.adm-cible small {
  grid-column: 1 / -1;
}

.adm-drapeau {
  width: 22px;
  height: 15px;
  border-radius: 3px;
  vertical-align: -2px;
}

/* un lien dans une phrase : l'or, sans soulignement criard */
.adm-lien {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

/* le compte à gauche, les deux menus serrés à droite */
.adm-outils #adm-total {
  margin-right: auto;
  white-space: nowrap;
}

/* le dernier appareil, sous le nom : son signe, puis où et quand */
.adm-appareil {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text);
}

.adm-appareil .ico {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.adm-appareil.est-inconnu {
  color: var(--muted);
}

.adm-appareil.est-inconnu .ico {
  color: var(--muted);
}

/* ------------------------------------------------------------------ */
/* L'onglet Économie d'une fiche (public/js/admin/fiche-economie.js)    */
/* ------------------------------------------------------------------ */

/* les cartes stratégiques du jeu, réduites : quatre par rangée sur un téléphone */
.adm-cartes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 12px 10px;
  justify-items: center;
  padding-bottom: 6px;
}

.adm-cartes .carte-contre {
  zoom: 0.58;
}

.adm-montures {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
}

.adm-monture {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 4px;
  padding: 10px 6px 9px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  text-align: center;
}

.adm-monture img {
  width: 76px;
  height: 52px;
  object-fit: contain;
}

.adm-monture-avion {
  display: grid;
  place-items: center;
  width: 76px;
  height: 52px;
  color: var(--muted);
}

.adm-monture-avion .ico {
  width: 30px;
  height: 30px;
}

.adm-monture small {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
}

.adm-monture em {
  color: var(--gold);
  font-size: 0.6rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.adm-monture.est-portee {
  box-shadow: inset 0 0 0 2px var(--gold);
}

.adm-visages-gagnes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.adm-visages-gagnes img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

/* un mouvement de lingots : le montant d'abord, signé et coloré */
.adm-mouvement {
  grid-template-columns: 64px 1fr auto;
}

.adm-delta-lingots {
  font-size: 0.95rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.adm-delta-lingots.monte {
  color: var(--vert);
}

.adm-delta-lingots.baisse {
  color: var(--rouge);
}

.adm-mouvement.est-or .adm-delta-lingots {
  color: var(--gold);
}

.adm-ligne-fin small {
  color: var(--muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

/* la rangée de badges du jeu, alignée sur la colonne de l'admin */
.adm-vue .dis-defile {
  margin: 0;
}

.adm-vue .dis-piste {
  justify-content: flex-start;
  padding: 2px 0;
}

/* ------------------------------------------------------------------ */
/* L'espace Data (public/js/admin/data.js)                              */
/* ------------------------------------------------------------------ */

.adm-sous.est-large {
  margin: 4px 0 16px;
}

/* les catégories : des tuiles à tranche, deux par rangée */
.adm-cats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 12px;
}

.adm-cat {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 118px;
  padding: 14px 14px 13px;
  border-radius: 16px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-card) 88%, #fff) 0%, var(--bg-card) 55%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 4px 0 var(--tranche),
    0 8px 18px rgba(0, 0, 0, 0.32);
  color: var(--text);
  text-decoration: none;
}

.adm-cat:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 2px 0 var(--tranche);
}

.adm-cat-signe {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 4px;
  border-radius: 12px;
  background: rgba(242, 193, 27, 0.13);
  color: var(--accent);
}

.adm-cat-signe .ico {
  width: 20px;
  height: 20px;
}

.adm-cat b {
  font-size: 1rem;
  font-weight: 900;
}

.adm-cat small {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

/* les onglets d'une catégorie, et la période dessous */
.adm-onglets a {
  position: relative;
  flex: 0 0 auto;
  padding: 10px 0 11px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.adm-onglets a.is-on {
  color: var(--text);
}

.adm-onglets a.is-on::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--accent);
}

.adm-periodes,
.adm-puces {
  display: flex;
  gap: 6px;
  margin: 14px -16px 6px;
  padding: 0 16px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.adm-periodes::-webkit-scrollbar,
.adm-puces::-webkit-scrollbar {
  display: none;
}

.adm-periodes button,
.adm-puces button {
  flex: 0 0 auto;
  padding: 7px 12px;
  border: none;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.adm-periodes button.is-on,
.adm-puces button.is-on {
  background: var(--accent);
  color: #1a1405;
}

.adm-puces {
  margin-top: 4px;
}

.adm-note.est-haut {
  margin: -4px 0 10px;
}

.adm-courbe-seule {
  padding: 14px 14px 0;
}

/* ce que désigne une barre : la carte du jeu en miniature, la monture, le badge */
.adm-signe-carte {
  display: block;
  width: 40px;
  height: 40px;
}

.adm-signe-carte .carte-contre {
  zoom: 0.303;
}

.adm-signe-monture {
  display: block;
  width: 52px;
  height: 36px;
  object-fit: contain;
}

.adm-signe-monture.est-avion {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.adm-signe-lingot {
  width: 30px;
  height: 27px;
}

.adm-signe-badge {
  display: block;
  width: 30px;
}

.adm-signe-badge svg {
  display: block;
}

.adm-lingot-mini {
  width: 15px;
  height: 14px;
  margin-left: 3px;
  vertical-align: -2px;
}

/* les cohortes : une ligne par semaine d'inscription, l'or plus soutenu quand on revient */
.adm-cohortes {
  display: grid;
  gap: 4px;
  font-variant-numeric: tabular-nums;
}

.adm-cohorte {
  display: grid;
  grid-template-columns: 1.25fr 1.05fr repeat(4, minmax(0, 1fr));
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
}

.adm-cohorte.est-tete {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.adm-cohorte.est-tete span:nth-child(n + 3) {
  text-align: center;
}

.adm-cohorte > span {
  color: var(--muted);
}

.adm-cohorte i {
  display: grid;
  place-items: center;
  height: 30px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 800;
}

.adm-cohorte i[style] {
  background: color-mix(in srgb, var(--accent) calc(var(--p) * 75%), rgba(0, 0, 0, 0.25));
  color: color-mix(in srgb, #1a1405 calc(var(--p) * 100%), var(--text));
}

/* une liste : la valeur et la date empilées à droite */
.adm-ligne-fin.est-pile {
  display: grid;
  justify-items: end;
  gap: 2px;
  text-align: right;
}

.adm-unite {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.adm-texte {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.adm-texte:last-child {
  border-bottom: none;
}

.adm-texte small {
  color: var(--muted);
  font-size: 0.72rem;
}

.adm-texte p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

/* la pastille de l'onglet Messages : ce qui attend une réponse */
.adm-onglet-messages {
  position: relative;
}

.adm-onglet-messages b {
  position: absolute;
  top: 2px;
  left: calc(50% + 6px);
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid var(--bg);
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 900;
  line-height: 14px;
  text-align: center;
}

.adm-tete {
  grid-template-columns: auto 1fr auto auto;
}

.adm-tete #adm-plus[hidden] {
  display: none;
}

/* l'argent et le temps, au Pouls : deux par rangée, chacun mène à sa catégorie */
.adm-bandeau.est-liens {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.adm-bandeau.est-liens > a {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 12px 10px 12px 0;
  color: var(--text);
  text-decoration: none;
}

.adm-bandeau.est-liens > a:nth-child(2n) {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.adm-bandeau.est-liens > a:nth-child(n + 3) {
  border-top: 1px solid var(--line);
}

.adm-bandeau.est-liens > a.est-or b {
  color: var(--accent);
}

@media (min-width: 560px) {
  .adm-bandeau.est-liens {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .adm-bandeau.est-liens > a {
    padding-left: 12px;
    border-top: none !important;
    border-left: 1px solid var(--line);
  }

  .adm-bandeau.est-liens > a:first-child {
    padding-left: 0;
    border-left: none;
  }
}

/* une colonne de grille qui peut rétrécir : sans elle, un nom long élargit tout */
.adm-classement,
.adm-etapes,
.adm-cohortes,
.adm-liste {
  grid-template-columns: minmax(0, 1fr);
}

/* ------------------------------------------------------------------ */
/* La fiche d'un joueur : six onglets, le résumé, le journal             */
/* ------------------------------------------------------------------ */

/* trois par rangée, sur deux rangées : un aplat sourd, l'or pour celui qu'on lit */
.adm-onglets-grille {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.adm-onglets-grille button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 6px;
  border: none;
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.adm-onglets-grille button em {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.66rem;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.adm-onglets-grille button.is-on {
  background: var(--accent);
  color: #1a1405;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 45%, black);
}

.adm-onglets-grille button.is-on em {
  background: rgba(0, 0, 0, 0.16);
}

/* son temps, trente jours en colonnes */
.adm-jours {
  display: grid;
  grid-template-columns: repeat(30, 1fr);
  align-items: end;
  gap: 2px;
  height: 64px;
}

.adm-jours i {
  display: block;
  min-height: 2px;
  border-radius: 2px 2px 0 0;
  background: color-mix(in srgb, var(--accent) 70%, var(--bg-card));
}

.adm-jours-axe {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
}

/* son parcours : une étape franchie porte la coche d'or */
.adm-parcours {
  display: grid;
  gap: 2px;
}

.adm-pas {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.adm-pas-signe {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.14);
}

.adm-pas.est-fait {
  color: var(--text);
}

.adm-pas.est-fait .adm-pas-signe {
  background: var(--accent);
  box-shadow: none;
  color: #1a1405;
}

.adm-pas-signe .ico {
  width: 13px;
  height: 13px;
}

.adm-pas small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

/* le journal : une ligne par fait, le montant et l'heure à droite */
.adm-evenement .adm-ligne-fin b {
  font-size: 0.86rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.adm-evenement .adm-ligne-fin b.est-or {
  color: var(--accent);
}

.adm-evenement.est-achat .adm-geste-signe,
.adm-evenement.est-partie .adm-geste-signe {
  color: var(--accent);
}

.adm-evenement.est-signale-par .adm-geste-signe {
  color: var(--rouge);
}

/* le chat d'une table : qui a parlé (à toucher), la recherche, le message visé */
.adm-parleurs {
  display: flex;
  gap: 6px;
  margin: 14px -16px 0;
  padding: 0 16px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.adm-parleurs::-webkit-scrollbar {
  display: none;
}

.adm-parleurs button {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 4px 10px 4px 5px;
  border: none;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

.adm-parleurs button:first-child {
  padding-left: 12px;
}

.adm-parleurs button b {
  color: var(--pion, var(--text));
  font-weight: 800;
}

.adm-parleurs button em {
  color: var(--muted);
  font-size: 0.7rem;
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.adm-parleurs button.is-on {
  background: var(--accent);
}

.adm-parleurs button.is-on b,
.adm-parleurs button.is-on em {
  color: #1a1405;
}

.adm-cherche {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--muted);
}

.adm-cherche .ico {
  width: 16px;
  height: 16px;
}

.adm-cherche input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: none;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  outline: none;
}

.adm-bulle-corps mark {
  border-radius: 3px;
  background: color-mix(in srgb, var(--accent) 55%, transparent);
  color: inherit;
}

.adm-bulle-ligne.est-vise .adm-bulle-corps {
  box-shadow: 0 0 0 2px var(--accent), 0 0 18px rgba(242, 193, 27, 0.35);
}

/* ------------------------------------------------------------------ */
/* L'assistance (public/js/admin/messages.js)                           */
/* ------------------------------------------------------------------ */

.adm-onglets-grille.est-quatre {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.adm-onglets-grille.est-quatre button {
  padding-inline: 4px;
  font-size: 0.76rem;
}

.adm-apercu {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.adm-point {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.adm-fil-ligne.est-ouvert .adm-ligne-dit > b > span:first-child {
  font-weight: 900;
}

.adm-fil-joueur {
  margin-top: 2px;
}

.adm-statut {
  padding: 3px 9px;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.adm-statut.est-ouvert {
  background: var(--accent);
  color: #1a1405;
}

.adm-statut.est-resolu {
  color: var(--vert);
}

/* ce qui a ouvert le fil : le signalement, ce que l'autre a écrit, la table */
.adm-origine {
  display: grid;
  gap: 8px;
  margin: 10px 0 4px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.86rem;
}

.adm-origine p {
  margin: 0;
}

.adm-origine a {
  color: var(--accent);
  text-decoration: none;
}

.adm-origine-texte {
  color: var(--muted);
  font-style: italic;
}

.adm-texte-releve {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.adm-origine .adm-origine-lien {
  justify-self: start;
  color: var(--text);
}

/* la traduction sous un message : ce qui est parti, ce qui est arrivé */
.adm-traduit {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.4;
}

.adm-original {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.74rem;
}

.adm-original summary {
  cursor: pointer;
}

.adm-original p {
  margin: 4px 0 0;
  font-size: 0.82rem;
}

.adm-bulle-qui b {
  color: var(--accent);
  font-weight: 800;
}

/* répondre : des réponses toutes prêtes, puis le champ */
.adm-reponse {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.adm-puces.est-rapides {
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  overflow: visible;
}

.adm-puces.est-rapides button {
  flex: 0 1 auto;
  max-width: 100%;
  white-space: normal;
  text-align: left;
  line-height: 1.3;
}

.adm-reponse textarea {
  width: 100%;
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  resize: vertical;
}

.adm-rapides summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.adm-rapides summary::-webkit-details-marker {
  display: none;
}

.adm-rapides summary .ico {
  width: 16px;
  height: 16px;
}

.adm-rapides[open] summary {
  margin-bottom: 8px;
  color: var(--text);
}

/* ------------------------------------------------------------------ */
/* Data en cartes (16 novembre 2026, le client : « des jauges des      */
/* années 2000, illisible » ; une carte par chiffre, par élément, par   */
/* étape, le chiffre en grand)                                         */
/* ------------------------------------------------------------------ */

.adm-kpi,
.adm-rang,
.adm-etape-carte,
.adm-lieu {
  border-radius: 14px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-card) 90%, #fff) 0%, var(--bg-card) 75%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 3px 0 var(--tranche);
}

/* les chiffres : deux cartes par rangée sur un téléphone, quatre sur un écran large */
.adm-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 8px;
}

.adm-kpis.est-1 {
  grid-template-columns: 1fr;
}

.adm-kpi {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
  padding: 13px 14px 14px;
}

.adm-kpi small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.adm-kpi b {
  font-size: 1.6rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.adm-kpi.est-or b {
  color: var(--accent);
}

.adm-kpi em {
  color: var(--muted);
  font-size: 0.74rem;
  font-style: normal;
  line-height: 1.35;
}

.adm-kpis.est-petits .adm-kpi b {
  font-size: 1.2rem;
}

@media (min-width: 560px) {
  .adm-kpis.est-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .adm-kpis.est-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* un classement : une carte par élément, le rang, la valeur en grand et sa part */
.adm-classement {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.adm-rang {
  display: grid;
  grid-template-columns: 22px auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
}

.adm-rang:not(:has(.adm-rang-signe)) {
  grid-template-columns: 22px minmax(0, 1fr) auto;
}

.adm-rang-n {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.adm-rang.est-premier .adm-rang-n {
  color: var(--accent);
}

.adm-rang-signe {
  display: grid;
  place-items: center;
}

.adm-rang-pastille {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.adm-rang-dit {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.adm-rang-dit b {
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.adm-rang-dit small,
.adm-rang-val small {
  color: var(--muted);
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}

.adm-rang-val {
  display: grid;
  justify-items: end;
  gap: 1px;
  text-align: right;
}

.adm-rang-val b {
  font-size: 1.15rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.adm-rang.est-premier .adm-rang-val b {
  color: var(--accent);
}

/* un parcours : une carte par étape, et ce que l'étape a perdu entre deux */
.adm-etapes {
  display: grid;
}

.adm-etape-carte {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
}

.adm-etape-n {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.3);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.adm-etape-carte.est-depart .adm-etape-n {
  background: var(--accent);
  color: #1a1405;
}

.adm-etape-dit {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.adm-etape-dit b {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.3;
}

.adm-etape-dit small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.adm-etape-dit small em {
  color: var(--text);
  font-style: normal;
  font-weight: 800;
}

.adm-etape-val {
  font-size: 1.5rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.adm-etape-carte.est-depart .adm-etape-val {
  color: var(--accent);
}

/* les retours se mesurent sur leur propre base : une carte à part, plus bas */
.adm-etape-carte.est-retour {
  margin-top: 10px;
}

.adm-etape-perte {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0 7px 22px;
  color: color-mix(in srgb, var(--rouge) 70%, var(--muted));
  font-size: 0.76rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.adm-etape-perte .ico {
  width: 14px;
  height: 14px;
}

.adm-etape-perte.est-nulle {
  color: var(--muted);
}

/* les lieux des pubs : une carte par tuile, le taux de clic en grand */
.adm-lieux {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.adm-lieu {
  display: grid;
  align-content: start;
  gap: 2px;
  min-width: 0;
  padding: 12px 12px 10px;
}

.adm-lieu h4 {
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 900;
}

.adm-lieu-taux {
  color: var(--accent);
  font-size: 1.35rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.adm-lieu > small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
}

.adm-lieu dl {
  display: grid;
  gap: 5px;
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.adm-lieu dl div {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

.adm-lieu dt {
  color: var(--muted);
  font-size: 0.68rem;
}

.adm-lieu dd {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* la suite d'un long classement, derrière un vrai bouton */
.adm-classement-suite {
  margin-top: 8px;
}

.adm-classement-suite summary {
  display: flex;
  justify-content: center;
  padding: 11px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.adm-classement-suite summary::-webkit-details-marker {
  display: none;
}

.adm-classement-suite summary span + span,
.adm-classement-suite[open] summary span:first-child {
  display: none;
}

.adm-classement-suite[open] summary span + span {
  display: inline;
}

.adm-classement-suite[open] summary {
  margin-bottom: 8px;
}

/* trois chiffres sur un téléphone : le premier en tête, sur toute la largeur, les deux autres dessous */
@media (max-width: 559px) {
  .adm-kpis.est-3 .adm-kpi:first-child {
    grid-column: 1 / -1;
  }
}

.adm-lieu h4 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* Donner des lingots, donner des cartes (public/js/admin/dons.js)     */
/* ------------------------------------------------------------------ */

.adm-don-tete {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  margin: 4px 0 16px;
}

.adm-don-tete h3 {
  margin: 0 0 2px;
}

.adm-don-tete p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.adm-don-tete p b {
  color: var(--accent);
  font-weight: 900;
}

.adm-don-cartes {
  display: block;
  width: 58px;
  height: 58px;
}

.adm-don-cartes .carte-contre {
  zoom: 0.44;
}

/* un choix à deux ou trois positions, en aplat */
.adm-segment {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.3);
}

.adm-segment button {
  min-height: 38px;
  border: none;
  border-radius: 10px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
}

.adm-segment button.is-on {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: 0 2px 0 var(--tranche);
}

/* le montant : en grand, entre un moins et un plus */
.adm-montant {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  align-items: center;
  gap: 10px;
  margin: 18px 0 12px;
}

.adm-montant-pas {
  display: grid;
  place-items: center;
  height: 52px;
  border: none;
  border-radius: 14px;
  background: var(--bg-card);
  box-shadow: 0 3px 0 var(--tranche);
  color: var(--text);
  cursor: pointer;
}

.adm-montant-pas:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--tranche);
}

.adm-montant-pas .ico {
  width: 20px;
  height: 20px;
}

.adm-montant input {
  width: 100%;
  min-width: 0;
  height: 64px;
  border: none;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--accent);
  font: inherit;
  font-size: 2rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-align: center;
  -moz-appearance: textfield;
}

.adm-montant input::-webkit-outer-spin-button,
.adm-montant input::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.adm-montant.est-petit {
  grid-template-columns: 42px 56px 42px;
  margin: 0;
}

.adm-montant.est-petit .adm-montant-pas {
  height: 42px;
  border-radius: 12px;
}

.adm-montant.est-petit b {
  color: var(--accent);
  font-size: 1.4rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.adm-raccourcis {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.adm-raccourcis button,
.adm-lien-bouton {
  min-height: 34px;
  padding: 6px 12px;
  border: none;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.adm-raccourcis button.is-on {
  background: var(--accent);
  color: #1a1405;
}

.adm-don-apres {
  margin: 14px 0 4px;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
}

.adm-don-apres b {
  color: var(--text);
  font-weight: 900;
}

/* les cartes à choisir : les vraies cartes, trois ou quatre par rangée */
.adm-cartes-barre {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  margin: 12px 0 10px;
}

.adm-cartes-choix {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 12px 8px;
}

.adm-carte-choix {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 4px;
  padding: 8px 4px 7px;
  border: none;
  border-radius: 14px;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.adm-carte-choix.is-on {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.adm-carte-choix[disabled] {
  opacity: 0.3;
  cursor: default;
}

.adm-carte-visuel {
  position: relative;
  display: block;
  width: 66px;
  height: 66px;
}

.adm-carte-visuel .carte-contre {
  zoom: 0.5;
}

.adm-carte-coche {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 2px solid var(--bg-soft);
  border-radius: 50%;
  background: var(--accent);
  color: #1a1405;
}

.adm-carte-coche .ico {
  width: 12px;
  height: 12px;
}

.adm-carte-choix small {
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.2;
}

.adm-carte-choix em {
  color: var(--muted);
  font-size: 0.6rem;
  font-style: normal;
}

.adm-combien {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.88rem;
  font-weight: 800;
}

/* le pied de la fenêtre des cartes : collé en bas pendant qu'on fait défiler les cartes */
.adm-don-pied {
  position: sticky;
  bottom: calc(-1 * (var(--bas) + 14px));
  z-index: 2;
  margin: 12px -18px calc(-1 * (var(--bas) + 14px));
  padding: 4px 18px calc(var(--bas) + 14px);
  background: var(--bg-soft);
  box-shadow: 0 -12px 18px -8px rgba(0, 0, 0, 0.55);
}

.adm-don-pied .adm-combien {
  margin-top: 10px;
}

.adm-don-pied .adm-don-apres {
  margin: 10px 0 2px;
}

.adm-cartes-choix {
  gap: 10px 8px;
}

/* les couleurs premium d'un joueur (onglet Économie) : un pion par couleur, la portée cerclée d'or */
.adm-couleurs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.adm-couleur {
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 70px;
  padding: 8px 4px;
  border-radius: 12px;
  background: var(--bg-card);
}

.adm-couleur.est-portee {
  box-shadow: 0 0 0 2px var(--accent);
}

.adm-couleur i {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #f3f4f8;
}

.adm-couleur small {
  font-size: 0.68rem;
  text-align: center;
  line-height: 1.2;
}

.adm-couleur em {
  font-style: normal;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent);
}

/* une carte jouée se lit en entier : laquelle, par qui, contre qui, au tour combien (sur deux lignes s'il le faut) */
.adm-evenement.est-carte-jouee .adm-ligne-dit > b > span:first-child,
.adm-evenement.est-carte-jouee .adm-ligne-dit > small {
  overflow: visible;
  white-space: normal;
  line-height: 1.25;
}

/* ------------------------------------------------------------------ */
/* Data › Cartes : sept onglets en grille, et le journal stratégique   */
/* ------------------------------------------------------------------ */

/* quatre par rangée, le journal sur deux cases : tout se voit, rien ne défile */
.adm-onglets-grille.est-data {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 4px 0 2px;
}

.adm-onglets-grille.est-data a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 4px;
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.adm-onglets-grille.est-data a.est-large {
  grid-column: span 2;
}

.adm-onglets-grille.est-data a.is-on {
  background: var(--accent);
  color: #1a1405;
  box-shadow: 0 3px 0 color-mix(in srgb, var(--accent) 45%, black);
}

/* une carte des « plus jouées » mène à son journal */
.adm-rang.est-touchable {
  cursor: pointer;
}

.adm-rang.est-touchable:active {
  transform: translateY(1px);
}

/* le tri : une ligne qui défile */
.adm-puces.est-tri {
  margin-top: 2px;
}

/* les filtres d'une feuille : des puces qui passent à la ligne */
.adm-puces.est-pli {
  flex-wrap: wrap;
  margin: 0 0 6px;
  padding: 0;
  overflow: visible;
}

.adm-puces button em {
  margin-left: 6px;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

/* le bouton des filtres, puis ceux qui sont posés */
.adm-jc-outils {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 14px;
}

.adm-jc-filtrer,
.adm-jc-pose {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 12px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.adm-jc-filtrer .ico,
.adm-jc-pose .ico {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.adm-jc-filtrer em {
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.18);
  font-style: normal;
  font-size: 0.7rem;
}

.adm-jc-filtrer.est-actif {
  background: var(--accent);
  color: #1a1405;
}

.adm-jc-pose {
  max-width: 100%;
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--accent);
}

.adm-jc-pose span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adm-jc-pose.est-tout {
  background: rgba(0, 0, 0, 0.28);
  color: var(--muted);
}

/* une ligne : la carte, qui, ce qu'elle a contré, contre qui, au tour combien */
.adm-jc-ligne {
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.adm-jc-ligne .adm-ligne-dit > small {
  overflow: visible;
  white-space: normal;
  line-height: 1.25;
}

/* trié par usage : un en-tête par carte, combien de fois, puis ses lignes */
.adm-jc-groupe {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 22px 0 8px;
}

.adm-jc-groupe b {
  font-size: 0.92rem;
  line-height: 1.25;
}

.adm-jc-compte {
  display: grid;
  justify-items: end;
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.adm-jc-compte small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
}

/* la fiche d'une carte jouée : la carte en grand, puis les faits */
.adm-jc-tete {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}

.adm-jc-tete h3 {
  margin: 0 0 4px;
}

.adm-jc-tete .adm-sous {
  margin: 0;
}

.adm-jc-grande {
  display: block;
  width: 86px;
  height: 86px;
}

.adm-jc-grande .carte-contre {
  zoom: 0.65;
}

.adm-faits a {
  color: var(--accent);
  text-decoration: none;
}

/* le tri du journal : quatre cases, deux par rangée sur un téléphone */
.adm-jc-tri {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 2px 0 8px;
}

.adm-jc-tri button {
  min-height: 34px;
  padding: 6px 8px;
  border: none;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.adm-jc-tri button.is-on {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  color: var(--accent);
}

@media (max-width: 560px) {
  .adm-jc-tri {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* les chiffres du journal : une seule rangée serrée */
.adm-jc-resume {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.adm-jc-resume div {
  display: grid;
  gap: 2px;
  padding: 10px 8px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  text-align: center;
}

.adm-jc-resume b {
  font-size: 1.2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.adm-jc-resume .est-or b {
  color: var(--accent);
}

.adm-jc-resume small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.adm-note.adm-jc-dit {
  margin: 10px 0 0;
}

/* la feuille des filtres, serrée : tout tient sans descendre trop bas */
#adm-feuille .adm-puces.est-pli + .adm-inter,
#adm-feuille .adm-feuille-tete + .adm-inter {
  margin-top: 12px;
}

#adm-feuille .adm-puces.est-pli button {
  padding: 6px 10px;
}

/* depuis la fiche d'une carte : rouvrir le journal sur ce qui la touche */
.adm-jc-voir {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.adm-jc-voir button {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 10px 4px;
  border: none;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.adm-jc-voir .ico {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

/* la feuille des filtres en pages qu'on glisse */
.adm-jc-pages {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.adm-jc-pages::-webkit-scrollbar {
  display: none;
}

.adm-jc-page {
  min-width: 0;
  scroll-snap-align: start;
}

.adm-jc-page > .adm-inter:first-child {
  margin-top: 12px;
}

.adm-jc-points {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 14px;
}

.adm-jc-points button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.adm-jc-points button.is-on {
  width: 22px;
  border-radius: 4px;
  background: var(--accent);
}
