/*
 * 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);
}

/* « 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;
  padding: 0 0 0 12px;
  border-left: 3px solid var(--rouge);
  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 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);
}
