/* Métiers de l'Arche : fenêtre « Métiers » (ui/jobs-view.js) et objectif en haut de l'écran (ui/jobs.js → renderChip).
   --j : couleur du métier (data/jobs.js → JOBS) ; --r : couleur d'une rareté de poisson ; --s : couleur d'une collection. */

/* Objectif du métier en cours : en haut à gauche, sous la carte du joueur (le haut du milieu reçoit les messages, la droite
   le lieu et les boutons) ; les effets en cours (.hud-fx) passent dessous */
.hud-job {
  position: absolute; top: 84px; left: 16px;
  display: flex; align-items: center; gap: 10px; max-width: min(420px, calc(100vw - 32px));
  padding: 7px 14px 7px 10px; border-radius: 12px; pointer-events: none;
  background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(6px);
  box-shadow: 0 0 16px rgba(56, 232, 255, 0.12);
}
#hud:has(.hud-job:not(.hidden)) .hud-fx { top: 142px; }
.hj-ico { font-size: 20px; line-height: 1; }
.hj-txt { display: flex; flex-direction: column; min-width: 0; }
.hj-txt b { font-family: 'Orbitron'; font-size: 13px; letter-spacing: 0.04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hj-txt b kbd { margin-left: 6px; }
.hj-txt small { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hj-arrow { display: inline-block; margin-right: 6px; font-size: 18px; font-style: normal; color: var(--amber); transition: transform 0.12s linear; }

/* Repère de la course à l'écran (ui/jobs.js → renderMark) : au-dessus du lieu, à travers les murs ; ambre pour prendre le
   colis, cyan pour le livrer ; au bord de l'écran (.edge) avec une flèche quand le lieu est hors champ */
.jb-mark {
  --m: var(--amber);
  position: absolute; left: 0; top: 0; pointer-events: none; z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  margin: -26px 0 0 -30px; width: 60px;
}
.jb-mark.picked { --m: var(--cyan, #38e8ff); }
.jm-pin {
  width: 34px; height: 34px; display: grid; place-items: center; font-size: 18px; border-radius: 50%;
  background: rgba(8, 12, 28, 0.78); border: 2px solid var(--m); box-shadow: 0 0 12px color-mix(in srgb, var(--m) 55%, transparent);
}
.jb-mark b {
  font-family: 'Orbitron'; font-size: 12px; color: #fff; padding: 1px 6px; border-radius: 8px;
  background: rgba(8, 12, 28, 0.72); text-shadow: 0 1px 2px #000; white-space: nowrap;
}
/* flèche centrée sur le rond (30, 17), tournée vers le lieu puis poussée hors du rond (ui/jobs.js) */
.jm-arrow {
  display: none; position: absolute; left: 22px; top: 9px; width: 16px; height: 16px; line-height: 16px; text-align: center;
  font-style: normal; font-size: 16px; color: var(--m); text-shadow: 0 0 6px #000; transform-origin: 50% 50%;
}
.jb-mark.edge .jm-arrow { display: block; }
.hj-meter { display: flex; gap: 3px; align-items: flex-end; margin-left: 4px; }
.hj-meter i { width: 5px; border-radius: 2px; background: rgba(255, 255, 255, 0.14); }
.hj-meter i:nth-child(1) { height: 7px; } .hj-meter i:nth-child(2) { height: 11px; }
.hj-meter i:nth-child(3) { height: 15px; } .hj-meter i:nth-child(4) { height: 19px; }
.hj-meter i.on { background: var(--b); box-shadow: 0 0 6px var(--b); }

/* Fenêtre */
.jb { display: flex; flex-direction: column; gap: 12px; }
.jb-intro { margin: 0; line-height: 1.5; }
.jb-error { color: #ff8a96; }
.jb-ox { color: var(--amber); white-space: nowrap; font-family: 'Orbitron'; font-size: 14px; }
.jb-day { display: grid; grid-template-columns: auto auto 1fr; align-items: baseline; gap: 2px 10px; padding: 10px 14px; border-radius: 10px; background: rgba(56, 232, 255, 0.05); }
.jb-day > span { color: var(--muted); }
.jb-day small { color: var(--muted); justify-self: end; }
.jb-day .pg-bar { grid-column: 1 / -1; }
.jb-day .pg-bar span { background: var(--amber); box-shadow: 0 0 10px rgba(255, 176, 46, 0.5); }
.jb-card { padding: 12px 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--j) 40%, transparent); background: color-mix(in srgb, var(--j) 5%, transparent); }
.jb-card p { margin: 6px 0; line-height: 1.45; }
.jb-guide { padding: 6px 10px; border-radius: 8px; background: rgba(56, 232, 255, 0.07); }
.jb-card .pg-bar span { background: var(--j); box-shadow: 0 0 10px color-mix(in srgb, var(--j) 60%, transparent); }
.jb-head { display: flex; align-items: center; gap: 12px; }
.jb-ico { font-size: 28px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--j) 14%, transparent); border: 1px solid color-mix(in srgb, var(--j) 55%, transparent); }
.jb-title { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.jb-title b { font-family: 'Orbitron'; font-size: 16px; letter-spacing: 0.04em; color: var(--j); }
.jb-title span { font-size: 14px; letter-spacing: 0.06em; }
.jb-today { display: flex; flex-direction: column; align-items: flex-end; }
.jb-today small { color: var(--muted); }
.jb-xp { margin: 4px 0 0 !important; font-size: 13px; }
.jb-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.jb-course { padding: 8px 10px; border-left: 3px solid var(--j); background: rgba(255, 255, 255, 0.03); border-radius: 6px; }
.jb-sub { margin: 12px 0 6px; font-family: 'Orbitron'; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.jb-rules { margin: 0; font-size: 13px; }

/* Carnet de pêche */
.jb-fish { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.jb-fish li { display: flex; flex-direction: column; padding: 6px 9px; border-radius: 8px; border-left: 3px solid var(--r); background: rgba(255, 255, 255, 0.04); }
.jb-fish b { font-size: 15px; }
.jb-fish small { font-size: 12px; color: var(--muted); }
.jb-fish li.unknown { opacity: 0.55; }

/* Échos du jour, collections */
.jb-echoes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.jb-echoes li { display: grid; grid-template-columns: 18px 1fr; gap: 0 6px; padding: 6px 9px; border-radius: 8px; background: rgba(255, 255, 255, 0.04); }
.jb-echoes li span { grid-row: span 2; color: var(--muted); }
.jb-echoes li small { color: var(--muted); font-size: 13px; }
.jb-echoes li.found span { color: #d8ccff; }
.jb-echoes li.given { opacity: 0.6; }
.jb-echoes li.given span { color: #7dff9a; }
.jb-sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.jb-set { padding: 8px 10px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--s) 35%, transparent); }
.jb-set.done { background: color-mix(in srgb, var(--s) 10%, transparent); }
.jb-set-head { display: flex; flex-direction: column; margin-bottom: 4px; }
.jb-set-head b { color: var(--s); font-size: 15px; }
.jb-set-head small { color: var(--muted); }
.jb-set ul { margin: 0; padding-left: 16px; font-size: 14px; line-height: 1.45; }
.jb-set li.unknown { color: var(--muted); font-style: italic; list-style: circle; }

@media (max-width: 560px) {
  .jb-day { grid-template-columns: 1fr auto; }
  .jb-day small { grid-column: 1 / -1; justify-self: start; }
}

/* Annonce d'une récompense (ui/jobs.js → celebrate) : au centre, sans flash ni plein écran (même esprit que l'annonce d'un
   nouveau niveau) */
.jb-reward {
  position: fixed; left: 50%; top: 18%; transform: translateX(-50%); z-index: 29;
  min-width: 280px; max-width: min(520px, calc(100vw - 32px)); padding: 16px 26px 14px; text-align: center;
  background: var(--panel-solid); border: 1px solid color-mix(in srgb, var(--j) 70%, transparent); border-radius: 16px;
  box-shadow: 0 0 40px color-mix(in srgb, var(--j) 28%, transparent), inset 0 0 30px color-mix(in srgb, var(--j) 10%, transparent);
  pointer-events: none; opacity: 0;
}
.jb-reward.in { animation: jr-in 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) forwards; }
.jb-reward.out { opacity: 1; animation: jr-out 0.5s ease-in forwards; }
.jr-label { font-family: 'Orbitron'; font-size: 12px; letter-spacing: 0.4em; text-transform: uppercase; color: var(--j); }
.jr-title { margin-top: 6px; font-family: 'Orbitron'; font-size: 16px; letter-spacing: 0.04em; color: var(--text); }
.jr-title span { margin-right: 8px; }
.jr-ox { margin-top: 6px; font-family: 'Orbitron'; font-weight: 900; font-size: 40px; line-height: 1.1; color: var(--amber); text-shadow: 0 0 18px rgba(255, 176, 46, 0.55); }
.jr-ox .ox-coin { font-size: 0.6em; vertical-align: 0.25em; margin-right: 6px; }
.jr-ox small { font-size: 0.5em; }
.jr-ox.capped { font-size: 18px; font-weight: 700; color: var(--muted); text-shadow: none; }
.jb-reward.big .jr-ox { font-size: 52px; }
.jr-lines { list-style: none; margin: 10px 0 0; padding: 0; font-size: 15px; line-height: 1.55; color: var(--text); }
.jr-lines b { color: var(--amber); }
.jr-lines em { font-style: normal; color: var(--j); }
@keyframes jr-in { from { opacity: 0; transform: translateX(-50%) scale(0.7); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
@keyframes jr-out { to { opacity: 0; transform: translateX(-50%) translateY(-16px); } }
@media (prefers-reduced-motion: reduce) { .jb-reward.in { animation: none; opacity: 1; } }
@media (max-width: 560px) { .jb-reward { top: 24%; } .jr-ox { font-size: 32px; } .jb-reward.big .jr-ox { font-size: 40px; } }
