/* Monstres : la liste (filtres, recherche, tri) et les fiches. */

/* ---------- Liste ---------- */
.bandeau-monstres { display: block; width: 100%; max-width: 600px; height: auto; margin: 0 0 14px; }
.outils-liste { display: grid; gap: 10px; margin: 0 0 14px; }
.outils-liste .recherche, .outils-liste .filtres { margin: 0; }
.outils-liste .filtres { gap: 5px; }
.outils-liste .filtres button { padding: 4px 8px; font-size: 13px; font-variant-numeric: tabular-nums; }
.groupe h2 { margin-top: 26px; }
.vide { color: var(--doux); margin: 8px 0; }

/* Colonnes de même largeur dans les trois tableaux ; sur mobile, le tableau défile dans son cadre. L'attaque tient
   « Poder de ataque » et la flèche du tri (pt-br). */
.liste-monstres { table-layout: fixed; min-width: 880px; }
.c-niveau { width: 72px; }
.c-pv { width: 88px; }
.c-xp { width: 104px; }
.c-attaque { width: 124px; }
.c-defense { width: 92px; }
.c-absorption { width: 116px; }
.c-type { width: 128px; }
.liste-monstres tbody tr, .liste-monstres tbody tr:nth-child(even) { background: var(--carte); }
.liste-monstres tbody tr.raye { background: #fbf6ec; }
.liste-monstres tbody tr:hover { background: #f3e7cf; }
.liste-monstres td { padding-top: 4px; padding-bottom: 4px; }
/* La colonne du nom reste visible quand le tableau défile en largeur. */
.liste-monstres td.nom, .liste-monstres th:first-child { position: sticky; left: 0; }
.liste-monstres td.nom { z-index: 1; background: inherit; white-space: normal; line-height: 1.25; }
.liste-monstres th:first-child { z-index: 2; }
.liste-monstres td.nom a { display: flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; min-width: 0; }
.liste-monstres td.nom a:hover span { text-decoration: underline; }
.sans-image { display: inline-block; flex: none; width: 44px; height: 44px; border-radius: 9px; background: #efe4d2; }
.liste-monstres th { padding: 0; }
.liste-monstres th button { all: unset; box-sizing: border-box; display: block; width: 100%; padding: 8px 10px; cursor: pointer; font-weight: 600; white-space: nowrap; }
.liste-monstres th.num button { text-align: right; }
.liste-monstres th button:focus-visible { outline: 2px solid #fff; outline-offset: -4px; border-radius: 6px; }
.liste-monstres th[aria-sort=ascending] button::after { content: ' \2191'; }
.liste-monstres th[aria-sort=descending] button::after { content: ' \2193'; }

.type { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.type img { width: 16px; height: 16px; border-radius: 3px; flex: none; }

details.autres { margin-top: 26px; }
details.autres summary { cursor: pointer; list-style: none; font-family: var(--titre); font-size: 17px; font-weight: 700; color: var(--brun); padding: 4px 0 10px; }
details.autres summary::-webkit-details-marker { display: none; }
/* Signe « + » en --brun, comme le titre qu'il ouvre (8,4:1 sur la page) : --or n'en faisait que 3,1:1. */
details.autres summary::before { content: '+ '; color: var(--brun); }
details.autres[open] summary::before { content: '\2212  '; }

/* ---------- Fiche ---------- */
.fil { margin: 0; font-size: 14px; }
.fil a { text-decoration: none; }
.fil a::before { content: '\2039  '; }
.fil a:hover { text-decoration: underline; }
.entete-monstre { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; }
.entete-monstre.sans-portrait { grid-template-columns: minmax(0, 1fr); }
.entete-monstre .medaillon-monstre { margin: 0; justify-self: start; }
.resume { display: grid; gap: 12px; min-width: 0; }
.etiquettes { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.etiquettes .type { font-weight: 600; }
.etiquette { font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--brun); color: #fff; }
.description { margin: 0; max-width: 680px; }
.infos { display: grid; gap: 4px; margin: 0; }
.infos div { display: flex; flex-wrap: wrap; gap: 0 6px; }
.infos dt { font-weight: 600; }
.infos dt::after { content: ':'; }
.infos dd { margin: 0; }

.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; margin: 0; }
.tuiles div { background: var(--carte); border: 1px solid var(--bord); border-radius: 8px; padding: 7px 10px; min-width: 0; }
/* Libellé et valeur sur deux pistes partagées par toute la rangée (sous-grille) : un libellé sur deux lignes (« Poder de
   ataque » en pt-br) abaisse toutes les valeurs de la rangée, qui restent alignées. */
.tuiles > div { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; }
.tuiles dt { font-size: 12px; color: var(--doux); }
.tuiles dd { margin: 0; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tuiles dd.long { font-size: 15px; }
.tuiles dd.texte { white-space: normal; font-size: 14px; line-height: 1.35; }
.resistances { max-width: 720px; }

.details { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 0 28px; margin: 0; }
.details div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0; border-bottom: 1px solid #efe4d2; }
.details dt { color: var(--doux); }
.details dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }

.drops { font-size: 14px; }
.drops td { white-space: normal; vertical-align: top; line-height: 1.6; }
.drops td.num { white-space: nowrap; width: 1%; font-weight: 600; }
.drops .objet { white-space: nowrap; }
.drops a, .note a { text-decoration: none; }
.drops a:hover, .note a:hover { text-decoration: underline; }
.drops code, .note code { font: 12px/1 ui-monospace, SFMono-Regular, Consolas, monospace; color: var(--doux); }
h2 + .note, h3 + .note { margin-top: -2px; }
.defile + .note { margin-top: 6px; font-size: 14px; }

.versions h2 { margin-bottom: 8px; }
.version { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); margin: 0 0 8px; }
.version summary { cursor: pointer; list-style: none; padding: 10px 14px; font-weight: 600; }
.version summary::-webkit-details-marker { display: none; }
.version summary::before { content: '+ '; color: var(--brun); }
.version[open] summary::before { content: '\2212  '; }
.version[open] { padding-bottom: 14px; }
.version > :not(summary) { margin-left: 14px; margin-right: 14px; }
.version h3 { font-family: var(--titre); font-size: 16px; color: var(--brun); margin: 18px 14px 8px; }

@media (max-width: 560px) {
  .entete-monstre { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .tuiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tuiles:has(dd.tres-long) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tuiles dd { font-size: 17px; }
}

/* ---------- Serveur ---------- */
.choix-serveur { display: none; align-items: center; gap: 8px; margin: 0 0 10px; }
.js .choix-serveur { display: flex; }
.choix-serveur label { font-size: 14px; color: var(--doux); }
.choix-serveur select { min-width: 0; max-width: 100%; font: inherit; font-size: 15px; padding: 6px 10px; border: 1px solid var(--bord-champ); border-radius: 8px;
  background: #fffdf8; color: var(--texte); }
/* Vue d'un serveur dont le fragment n'est pas encore lu : sa place est gardée, la page ne saute pas à l'arrivée du tableau. */
.vue-liste { min-width: 0; }
.vue-liste[data-src]:not([data-charge]):empty { min-height: 70vh; }
.vue-fiche { min-width: 0; }
.contenu-autres:empty { min-height: 4em; }
.horaires dd .ligne, .drops .ligne { display: block; }
.drops .ligne { font-size: 13px; }
.doux { color: var(--doux); }
.sans-serveur { margin: 0 0 10px; color: var(--doux); }

/* ---------- Onglets : liste des monstres, horaires des boss ---------- */
.onglets { margin: 0 0 12px; }
.onglets a { font-weight: 600; }
.onglets a:focus-visible { outline: 2px solid var(--bleu); outline-offset: 1px; }

/* ---------- Horaires des boss ---------- */
.horloges { margin: 0 0 10px; font-size: 14px; color: var(--doux); font-variant-numeric: tabular-nums; }
/* Largeur fixe : « --:-- » puis l'heure, sans pousser la suite de la ligne. */
.horloges b { display: inline-block; min-width: 4.6ch; color: var(--texte); font-weight: 700; }
.horloges .sep { margin: 0 4px; }
:root:not(.js) .horloges { display: none; }
/* Largeurs fixes : le texte du temps qui reste change chaque seconde sans bouger les colonnes. */
.minuteur { table-layout: fixed; width: 100%; min-width: 720px; }
.minuteur .c-niveau { width: 64px; }
.minuteur .c-carte { width: 24%; }
.minuteur .c-compte { width: 140px; }
.minuteur .c-local { width: 104px; }
.minuteur .c-serveur { width: 150px; }
.minuteur .c-cloche { width: 44px; }
.minuteur td { padding-top: 4px; padding-bottom: 4px; vertical-align: middle; }
.minuteur td.nom a { display: flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; min-width: 0; }
.minuteur td.nom a:hover span { text-decoration: underline; }
.minuteur td.carte { white-space: normal; line-height: 1.3; }
.minuteur td.carte a { text-decoration: none; }
.minuteur td.carte a:hover { text-decoration: underline; }
.minuteur td.compte, .minuteur td.local, .minuteur td.serveur { white-space: nowrap; font-variant-numeric: tabular-nums; }
.minuteur td.compte { font-weight: 700; color: var(--brun); }
.minuteur td.local { font-weight: 600; }
.minuteur td.serveur { color: var(--doux); }
.minuteur td.cloche { padding: 0; text-align: center; }
/* Jusqu'au premier tri, les lignes gardent leur place sans se montrer (aucun saut à l'arrivée de l'ordre). */
.js .minuteur:not(.pret) tbody { visibility: hidden; }
.js .minuteur .sans-script, :root:not(.js) .minuteur .calc { display: none; }
:root:not(.js) .minuteur td.serveur { white-space: normal; }
/* Cloche « me prévenir » : à sa place mais invisible tant que le navigateur ne connaît pas les notifications. */
.prevenir { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 50%; cursor: pointer; color: #a89a84; }
:root:not(.notif) .prevenir { visibility: hidden; }
.prevenir::before { content: ''; width: 18px; height: 18px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9'/%3E%3Cpath d='M10.3 21a1.94 1.94 0 0 0 3.4 0'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9'/%3E%3Cpath d='M10.3 21a1.94 1.94 0 0 0 3.4 0'/%3E%3C/svg%3E") center / contain no-repeat; }
.prevenir:hover { color: var(--brun); background: #f3e7cf; }
.prevenir[aria-pressed=true] { color: #fff; background: var(--brun); }
.prevenir:focus-visible { outline: 2px solid var(--bleu); outline-offset: -2px; }
.vue-minuteur { position: relative; min-width: 0; }
.vue-minuteur > .note { margin: 8px 0 0; font-size: 14px; color: var(--doux); }
.vue-minuteur > .note:first-child { margin: 0; }

/* Téléphone : une carte par boss sur deux lignes, nom et temps qui reste, puis niveau, carte et heures. */
@media (max-width: 640px) {
  .vue-minuteur .defile { overflow: visible; }
  .minuteur { display: block; min-width: 0; width: auto; }
  .minuteur colgroup, .minuteur thead { display: none; }
  .minuteur tbody { display: block; }
  .minuteur tbody tr { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; padding: 6px 4px 8px 8px; border-bottom: 1px solid #efe4d2; }
  .minuteur tbody tr:last-child { border-bottom: 0; }
  /* Fin de la première ligne (nom, temps qui reste, cloche). */
  .minuteur tbody tr::after { content: ''; order: 4; flex-basis: 100%; height: 0; }
  .minuteur tbody tr td { display: block; padding: 0; border: 0; }
  .minuteur td.nom { flex: 1 1 0; min-width: 0; order: 1; }
  .minuteur td.compte { order: 2; text-align: right; }
  .minuteur td.cloche { order: 3; width: 40px; flex: none; }
  .minuteur td.niveau { order: 5; padding-left: 54px; text-align: left; font-size: 14px; white-space: nowrap; }
  .minuteur td.niveau::before { content: attr(data-label) ' '; color: var(--doux); }
  .minuteur td.carte { order: 6; flex: 1 1 0; min-width: 0; font-size: 14px; }
  .minuteur td.local { order: 7; font-size: 14px; }
  .minuteur td.serveur { order: 8; font-size: 13px; }
  .minuteur td.serveur::before { content: attr(data-label) ' '; }
  .minuteur td.regle { order: 7; flex: 1 1 100%; padding-left: 54px; margin-top: 2px; font-size: 14px; text-align: left; }
  .minuteur td.regle ~ .cloche { display: none; }
  /* Manches de Hell's Gate : une carte par manche, nom et attente, puis monstres et parchemin. */
  .manches { display: block; min-width: 0; }
  .manches thead { display: none; }
  .manches tbody { display: block; }
  .manches tr { display: flex; flex-wrap: wrap; column-gap: 8px; padding: 8px 10px; border-bottom: 1px solid #efe4d2; }
  .manches tr:last-child { border-bottom: 0; }
  .manches tr > * { display: block; padding: 0; border: 0; background: none; }
  .manches th[scope=row] { flex: 1 1 0; order: 1; }
  .manches td.num { order: 2; color: var(--doux); }
  .manches td.manche-monstres { order: 3; }
  .manches td.manche-recompense { order: 4; }
  .manches td.num::before, .manches td.manche-recompense::before { content: attr(data-label) ' '; color: var(--doux); }
  .manches td.manche-monstres, .manches td.manche-recompense { flex-basis: 100%; font-size: 14px; margin-top: 2px; }
}
.minuteur td.regle { white-space: normal; font-weight: 600; }

/* Hell's Gate (Wartale) */
.hells-gate { margin-top: 28px; }
.hells-gate p { max-width: 760px; }
.manches th[scope=row] { font-weight: 600; white-space: nowrap; }
.manches td { white-space: normal; }
.manches a, .loot-lotto a { text-decoration: none; }
.manches a:hover { text-decoration: underline; }
.loot-lotto { max-width: 760px; }
