/* La barre en haut à droite : bourse, missions, cloche et avatar. */
.barre { position: relative; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.barre-bourse, .barre-missions, .barre-cloche { height: 42px; border-radius: 99px; background: #16151d; border: 1px solid #ffffff1f; color: #fff; font-weight: 800; }
.barre-bourse { display: flex; align-items: center; padding: 0 14px 0 5px; }
.barre-rond { display: grid; place-items: center; min-width: 31px; height: 31px; margin-right: 12px; border-radius: 50%; border: 2px dashed #ffffff45; font: 800 14px ui-monospace, Consolas, monospace; }
#w-coins { padding-left: 12px; border-left: 1px solid #ffffff26; line-height: 26px; }
.barre-missions, .barre-cloche, .barre-avatar { position: relative; cursor: pointer; }
.barre-missions { display: flex; align-items: center; gap: 8px; padding: 0 17px; }
.barre-missions i { font-style: normal; font-size: 17px; }
.barre-missions b { font-size: 14px; }
.barre-cloche { display: grid; place-items: center; width: 42px; padding: 0; }
.barre-cloche svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.barre-missions:hover, .barre-cloche:hover, .barre button[aria-expanded="true"] { border-color: #ffffff66; }
.barre-avatar { flex: none; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 2px solid var(--rc, #ffffff40); background: #16151d; }
.barre-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: top; }
.barre-avatar .seal { display: grid; place-items: center; width: 100%; height: 100%; margin: 0; border-radius: 50%; }
.pastille { position: absolute; top: -4px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: #ff4d38; color: #fff; font: normal 800 11px/19px system-ui, sans-serif; text-align: center; }
.pastille[hidden] { display: none; }

/* Le panneau qui se déroule sous les boutons */
.barre-panneau { position: absolute; z-index: 20; top: calc(100% + 12px); right: 0; width: min(360px, calc(100vw - 20px)); max-height: min(70vh, 520px); overflow-y: auto; padding: 14px; border-radius: 16px; background: #14131c; border: 1px solid #ffffff22; box-shadow: 0 18px 50px #000c; text-align: left; white-space: normal; }
.barre-panneau[hidden] { display: none; }
.barre-panneau.avatar { width: 230px; }
.barre-panneau h3 { margin: 0 0 4px; font-size: 17px; }
.panneau-aide { margin: 0 0 10px; color: #9795ab; font-size: 13px; }
.panneau-choix { display: block; width: 100%; margin-top: 8px; padding: 10px 14px; border-radius: 10px; border: 1px solid #ffffff22; background: #1d1c27; color: #fff; font-weight: 700; text-align: left; cursor: pointer; }
.panneau-choix:hover { border-color: #ffffff66; }

.mission { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #ffffff14; }
.mission.prise-ok { opacity: .55; }
.mission-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.mission-texte b { font-size: 14px; }
.mission-texte small { color: #b9b6cc; }
.mission-jauge { height: 6px; border-radius: 99px; background: #ffffff18; overflow: hidden; }
.mission-jauge i { display: block; height: 100%; border-radius: 99px; background: var(--gold, #ffc83d); }
.mission-prendre, .mission-aller { flex: none; padding: 8px 13px; border-radius: 99px; font-size: 13px; font-weight: 900; text-decoration: none; cursor: pointer; }
.mission-prendre { border: 0; background: var(--gold, #ffc83d); color: #17120a; }
.mission-aller { border: 1px solid #ffffff30; color: #fff; }
.mission-fait { flex: none; color: #3ecf8e; font-size: 13px; font-weight: 800; }

.note { display: flex; gap: 10px; padding: 10px 6px; border-top: 1px solid #ffffff14; border-radius: 8px; color: #fff; font-size: 13px; text-decoration: none; }
.note.neuve { background: #7c5cff26; }
.note small { display: block; margin-top: 3px; color: #9795ab; }
.note-image { flex: none; width: 34px; height: 46px; overflow: hidden; border-radius: 6px; border: 2px solid var(--rc); background: #1d1c27; }
.note-image img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* Choix de l'avatar */
.avatar-recherche { width: 100%; max-width: 360px; margin: 0 auto 10px; }
.avatar-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; margin-bottom: 8px; }
.avatar-choix { aspect-ratio: 1; padding: 0; overflow: hidden; border-radius: 50%; border: 3px solid var(--rc); background: #1d1c27; cursor: pointer; }
.avatar-choix img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.avatar-choix.on { outline: 3px solid #fff; outline-offset: 2px; }

@media (max-width: 900px) {
  .barre { gap: 6px; }
  .barre-bourse, .barre-missions, .barre-cloche { height: 38px; }
  .barre-missions { padding: 0 12px; }
  .barre-missions b { display: none; }
  .barre-cloche { width: 38px; }
  .barre-avatar { width: 38px; height: 38px; }
  .barre-rond { min-width: 27px; height: 27px; margin-right: 8px; }
  .barre-bourse { padding-right: 10px; font-size: 13px; }
  #w-coins { padding-left: 8px; }
  /* sur petit écran, le panneau s'accroche au bord de la fenêtre */
  .barre-panneau, .barre-panneau.avatar { position: fixed; top: 62px; right: 10px; }
}
@media (max-width: 420px) {
  #top .logo { font-size: 0; }
  #top .logo .seal { font-size: 18px; }
}
