/* ============================================================
   ASTRA GENESIS, 10-ADMIN-ERRORS.CSS
   v0.63.0, "Journal admin" : onglet Journal des erreurs de l'overlay
   d'administration (js/00e3-admin-errors.js). DA v0.14 dense, même
   grammaire que css/07-admin.css (tables compactes, JetBrains Mono),
   zéro contrôle natif : la case de sélection est un bouton restylé.
   ============================================================ */

/* ---------- en-tête et compteurs ---------- */
.aerr-head{ display:flex; justify-content:space-between; align-items:flex-start; gap:16px; flex-wrap:wrap; margin-bottom:14px; }
.aerr-title{ margin:0 0 4px; font-family:var(--font-head); font-size:1.05rem; color:var(--ink-1); }
.aerr-counters{ display:grid; grid-template-columns:repeat(5, minmax(104px, 1fr)); gap:8px; }
.aerr-counter{
  background:var(--panel-soft); border:1px solid var(--line); border-radius:var(--r-sm);
  padding:8px 12px; text-align:center;
}
.aerr-counter.error{ border-color:rgba(248,113,113,.35); }
.aerr-counter.warn{ border-color:rgba(245,158,11,.35); }
.aerr-counter-n{ display:block; font-family:var(--font-mono); font-size:1.15rem; }
.aerr-counter.error .aerr-counter-n{ color:var(--rose); }
.aerr-counter.warn .aerr-counter-n{ color:var(--amber); }
/* v0.64.0 : bruit hors jeu, volontairement éteint */
.aerr-counter.noise{ border-style:dashed; }
.aerr-counter.noise .aerr-counter-n{ color:var(--ink-3); }
.aerr-counter-label{ display:block; font-size:.64rem; text-transform:uppercase; letter-spacing:.04em; color:var(--ink-3); }
.aerr-counter-occ{ display:block; font-family:var(--font-mono); font-size:.7rem; color:var(--ink-2); }

/* ---------- filtres et barre d'actions ---------- */
.aerr-toolbar{ align-items:center; }
#aerr-f-search{ flex:1 1 240px; min-width:220px; }
.aerr-known{ display:flex; align-items:center; gap:8px; font-size:.78rem; color:var(--ink-2); }
.aerr-known .switch:hover{ box-shadow:0 0 0 2px rgba(45,212,191,.25); }
.aerr-known .switch:focus-visible{ outline:2px solid var(--cyan); outline-offset:2px; }

.aerr-actions{
  display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-bottom:10px;
  padding:8px 10px; background:var(--panel-soft); border:1px solid var(--line); border-radius:var(--r-sm);
}
.aerr-selection{ font-family:var(--font-mono); font-size:.74rem; color:var(--ink-2); }
.aerr-spacer{ flex:1; }
#aerr-reason{ min-width:220px; }
#admin-overlay input:disabled{ opacity:.5; cursor:not-allowed; }

/* ---------- table (grille, pas <table> : AG.patchList crée ses lignes dans un <div>) ---------- */
.aerr-table{ overflow-x:auto; }
.aerr-row{
  display:grid; min-width:980px;
  grid-template-columns:28px 112px minmax(240px, 1fr) 64px 72px 120px 76px 150px 96px;
  gap:8px; align-items:center; padding:7px 10px;
  border-bottom:1px dashed rgba(255,255,255,.06); font-size:.8rem; color:var(--ink-1);
}
.aerr-row-head{
  font-family:var(--font-mono); font-size:.64rem; text-transform:uppercase; letter-spacing:.05em;
  color:var(--ink-3); border-bottom:1px solid var(--line-strong);
}
.aerr-body .aerr-row{ cursor:pointer; transition:background .12s; }
.aerr-body .aerr-row:hover{ background:rgba(45,212,191,.06); }
.aerr-body .aerr-row:focus-visible{ outline:1px solid var(--cyan); outline-offset:-1px; }
.aerr-row.is-selected{ background:rgba(45,212,191,.1); }
.aerr-row.is-open{ box-shadow:inset 3px 0 0 var(--cyan); }
.aerr-row.is-resolved .aerr-msg{ color:var(--ink-3); }
.aerr-row.is-known{ opacity:.72; }
.aerr-sev{ justify-self:start; white-space:nowrap; }
.aerr-msg{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.aerr-num, .aerr-src, .aerr-screen, .aerr-ver, .aerr-last, .aerr-flags{
  font-family:var(--font-mono); font-size:.74rem; color:var(--ink-2);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.aerr-cls.is-game{ color:var(--cyan); }
.aerr-cls.is-noise{ color:var(--ink-3); font-style:italic; }
.aerr-status{ padding:10px; }
.aerr-error{ color:var(--rose); font-size:.82rem; }

/* case de sélection restylée (bouton à aria-pressed) */
.aerr-check{
  position:relative; width:16px; height:16px; padding:0; cursor:pointer;
  background:#121C2B; border:1px solid #1E2E40; border-radius:4px;
}
.aerr-check:hover{ border-color:var(--cyan); }
.aerr-check:focus-visible{ outline:2px solid var(--cyan); outline-offset:1px; }
.aerr-check[aria-pressed="true"], .aerr-check[aria-pressed="mixed"]{ background:var(--cyan); border-color:var(--cyan); }
.aerr-check[aria-pressed="true"]::after{
  content:""; position:absolute; left:4px; top:1px; width:5px; height:9px;
  border:solid #04211d; border-width:0 2px 2px 0; transform:rotate(45deg);
}
.aerr-check[aria-pressed="mixed"]::after{
  content:""; position:absolute; left:3px; right:3px; top:6px; height:2px; background:#04211d;
}

/* ---------- tiroir de détail ---------- */
.aerr-drawer{
  position:fixed; top:0; right:0; bottom:0; z-index:5; width:min(680px, 94vw);
  display:flex; flex-direction:column;
  background:var(--panel-solid); border-left:1px solid var(--line-strong);
  box-shadow:-18px 0 40px rgba(0,0,0,.45);
}
.aerr-drawer[hidden]{ display:none; }
.aerr-drawer-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px; border-bottom:1px solid var(--line-strong);
}
.aerr-drawer-head h3{ margin:0; font-family:var(--font-head); font-size:.95rem; color:var(--ink-1); }
.aerr-drawer-body{ flex:1; min-height:0; overflow-y:auto; padding:14px 18px 30px; }
.aerr-drawer-summary{ display:flex; gap:6px; margin-bottom:8px; }
.aerr-pre{
  margin:0 0 12px; max-height:340px; overflow:auto;
  font-family:var(--font-mono); font-size:.74rem; line-height:1.5; color:var(--ink-2);
  background:var(--void-2); border:1px solid var(--line); border-radius:var(--r-sm);
  padding:10px; white-space:pre-wrap; word-break:break-word;
}
.aerr-message{ color:var(--ink-1); font-size:.8rem; }
.aerr-meta{ display:grid; grid-template-columns:auto 1fr; gap:4px 14px; margin:0 0 14px; font-size:.78rem; }
.aerr-meta dt{
  align-self:center; font-family:var(--font-mono); font-size:.64rem;
  text-transform:uppercase; letter-spacing:.04em; color:var(--ink-3);
}
.aerr-meta dd{ margin:0; font-family:var(--font-mono); color:var(--ink-1); word-break:break-all; }
.aerr-drawer-actions{ display:flex; flex-wrap:wrap; gap:8px; margin-top:6px; }

/* ---------- entrée de l'écran Profil ---------- */
#profile-admin-panel[hidden]{ display:none; }

@media (max-width: 900px){
  .aerr-counters{ grid-template-columns:repeat(2, minmax(110px, 1fr)); }
}
