/* Back-office des signalements de bug (pages /admin) : complète assets/css/style.css du site. */

.bo-header .wrap { min-height: 60px; }
.bo-title { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-weight: 700; }
.bo-title .pill { font-size: .72rem; }
.bo-user { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--ink-soft); }
.bo-main { padding: 28px 0 64px; min-height: 70vh; }
.bo-main h1 { font-size: clamp(1.6rem, 5vw, 2.3rem); margin-bottom: .2em; }
.bo-sub { color: var(--ink-soft); margin-bottom: 20px; }

.btn--small { font-size: .92rem; padding: .45em .9em; border-radius: 14px; box-shadow: 0 4px 0 var(--ink); }
.btn--small:hover { box-shadow: 0 5px 0 var(--ink); }
.btn--red { --bg: var(--red); color: var(--white); }
.btn--red:hover { color: var(--white); }
.btn--blue { --bg: var(--sky); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.panel { background: var(--white); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 var(--ink); padding: 16px 18px; margin-bottom: 20px; }
.panel h2 { font-size: 1.15rem; margin: 0 0 12px; }
.panel--login { max-width: 520px; margin: 40px auto; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-weight: 600; font-size: .95rem; }
.field small { color: var(--ink-soft); }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="url"], select, textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper);
  border: 2px solid var(--ink); border-radius: 12px; padding: .5em .7em; min-width: 0;
}
textarea { min-height: 90px; resize: vertical; width: 100%; }
.error { color: var(--red-text); font-weight: 600; }
.ok { color: var(--green-dark); font-weight: 600; }

/* Filtres et compteurs */
.filters { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); align-items: end; }
.filters .field { margin: 0; }
.filters select, .filters input { height: 44px; }
.counts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.count { font: inherit; font-size: .9rem; cursor: pointer; border: 2px solid var(--ink); border-radius: 999px; padding: .25em .8em; background: var(--white); color: var(--ink); }
.count[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.count b { margin-left: .35em; }

/* Tableau des tickets */
.tickets-scroll { overflow-x: auto; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 var(--ink); background: var(--white); }
.tickets { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tickets th, .tickets td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 2px solid #e8e2d2; }
.tickets thead th { background: var(--asphalt); color: var(--white); position: sticky; top: 0; white-space: nowrap; }
.tickets th button { all: unset; cursor: pointer; }
.tickets th button:focus-visible { outline: 3px solid var(--orange); }
.tickets th[aria-sort="ascending"] button::after { content: " ▲"; }
.tickets th[aria-sort="descending"] button::after { content: " ▼"; }
.tickets tbody tr { cursor: pointer; }
.tickets tbody tr:hover { background: var(--sky-light); }
.tickets td.desc { min-width: 220px; max-width: 380px; }
.tickets td.device { max-width: 140px; font-size: .88rem; }
.tickets th, .tickets td { padding: 10px 10px; }
.tickets td.nowrap, .tickets .ref { white-space: nowrap; }
.tickets a { color: inherit; font-weight: 700; text-decoration: none; }
.muted { color: var(--ink-soft); font-size: .88rem; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; }
.tag { font-size: .75rem; border: 2px solid var(--ink); border-radius: 8px; padding: 0 .4em; background: var(--paper); white-space: nowrap; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-top: 14px; }
.empty { padding: 28px; text-align: center; color: var(--ink-soft); }

/* Statuts */
.status { display: inline-block; font-family: var(--hud); text-transform: uppercase; letter-spacing: .05em; font-size: .72rem; border: 2px solid var(--ink); border-radius: 999px; padding: .2em .7em .15em; white-space: nowrap; }
.st-nouveau { background: var(--yellow); }
.st-en_analyse { background: var(--sky); }
.st-reproduit { background: var(--orange); }
.st-corrige { background: var(--green); }
.st-non_reproductible { background: #d6dcef; }
.st-doublon { background: #ececec; }

/* Fiche */
.ticket-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 6px; }
.ticket-head h1 { margin: 0; }
.ticket-grid { display: grid; gap: 20px; }
.ticket-grid > div { min-width: 0; }
@media (min-width: 980px) { .ticket-grid { grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); } }
.description { white-space: pre-wrap; font-size: 1.05rem; margin: 0; }
.crash { white-space: pre-wrap; background: #ffe3e3; border: 2px solid var(--red-text); border-radius: 12px; padding: 10px; font-size: .85rem; overflow-x: auto; }
.shot { display: block; max-height: 520px; width: auto; border: 3px solid var(--ink); border-radius: 12px; cursor: zoom-in; background: var(--asphalt); }
.shot--full { max-height: none; cursor: zoom-out; }
.kv { width: 100%; border-collapse: collapse; font-size: .93rem; }
.kv th { text-align: left; color: var(--ink-soft); font-weight: 600; padding: 4px 10px 4px 0; vertical-align: top; white-space: nowrap; }
.kv td { padding: 4px 0; word-break: break-word; }
.logs { background: var(--asphalt); color: #e8ecf8; border-radius: 12px; padding: 12px; max-height: 520px; overflow: auto; font: .8rem/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre; margin: 0; }
.logs .l-exc { color: #ff8f98; font-weight: 700; }
.logs .l-err { color: #ffb36b; }
.logs .l-warn { color: var(--yellow); }
.logs .l-stack { color: #9aa6c6; }
.logs-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.downloads { display: flex; flex-wrap: wrap; gap: 10px; }
.history { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; }
.history li { border-left: 4px solid var(--sky); padding: 2px 0 2px 10px; }
.history li.h-status { border-left-color: var(--orange); }
.history .who { font-weight: 700; }
.history .body { white-space: pre-wrap; margin: 2px 0 0; }
.cmd { font: .85rem ui-monospace, Consolas, monospace; background: var(--paper); border: 2px dashed var(--ink); border-radius: 10px; padding: 6px 10px; display: block; overflow-x: auto; white-space: nowrap; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.row .field { margin: 0; flex: 1 1 160px; }

/* Connexion, activation, compte */
.linkish { all: unset; cursor: pointer; color: var(--ink); text-decoration: underline; font-size: .92rem; }
.linkish:focus-visible { outline: 3px solid var(--orange); }
.panel--login .row { justify-content: space-between; }
a.btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.activation { max-width: 720px; margin: 24px auto; }
.steps { padding-left: 1.4em; display: grid; gap: 18px; margin: 0 0 16px; }
.steps h2 { margin: 0 0 6px; }
.qr-wrap { display: flex; justify-content: center; margin: 8px 0 12px; }
.qr { width: min(240px, 70vw); height: auto; border: 3px solid var(--ink); border-radius: 12px; background: #fff; }
.secret { white-space: normal; word-break: break-all; letter-spacing: .08em; }
details summary { cursor: pointer; font-size: .92rem; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; padding-left: 1.6em; margin: 0 0 14px; }
.codes code { font: 1.05rem ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .06em; }
@media (max-width: 420px) { .codes { grid-template-columns: 1fr; } }

/* Impression : seulement les codes de secours */
@media print {
  body * { visibility: hidden; }
  .backup-codes, .backup-codes * { visibility: visible; }
  .backup-codes { position: absolute; left: 0; top: 0; }
  .no-print { display: none !important; }
}

/* Téléphone : en-tête allégé */
@media (max-width: 600px) { .bo-user .muted, .bo-title .pill { display: none; } .bo-header .wrap { gap: 8px; } }
