/* ── PP Mori (charte Le PIC 2026) — auto-hébergée ─────────────── */
@font-face { font-family:"PP Mori"; src:url("/fonts/PPMori-Book.woff2") format("woff2");      font-weight:300; font-style:normal; font-display:swap; }
@font-face { font-family:"PP Mori"; src:url("/fonts/PPMori-Regular.woff2") format("woff2");   font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:"PP Mori"; src:url("/fonts/PPMori-Medium.woff2") format("woff2");    font-weight:500; font-style:normal; font-display:swap; }
@font-face { font-family:"PP Mori"; src:url("/fonts/PPMori-SemiBold.woff2") format("woff2");  font-weight:600; font-style:normal; font-display:swap; }
@font-face { font-family:"PP Mori"; src:url("/fonts/PPMori-Bold.woff2") format("woff2");      font-weight:700; font-style:normal; font-display:swap; }
@font-face { font-family:"PP Mori"; src:url("/fonts/PPMori-ExtraBold.woff2") format("woff2"); font-weight:800; font-style:normal; font-display:swap; }

/* Bâtiment PIC — thème sombre (échelle de surfaces CrowdMix, accent Le PIC).
   Volontairement SOMBRE EN PERMANENCE : pas de variante claire, comme CrowdMix. */
:root {
  --bg:        #0E0E10;
  --surface:   #161618;
  --surface-2: #1D1D20;
  --surface-3: #26262A;
  --line:      #2E2E33;
  --line-soft: #232327;

  --orange:      #F18819;
  --orange-hi:   #FFA347;
  --orange-wash: rgba(241,136,25,.13);

  --violet: #A59CC7;
  --bleu:   #6FA0DC;
  --rose:   #E4707F;
  --vert:   #7DC8C2;
  --corail: #EE7158;

  --text:   #F4F1EA;
  --text-2: #B5B2AC;
  --text-3: #807D78;
  --text-4: #545250;

  --radius: 14px;
  --font: "PP Mori", Arial, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--orange); }
button, input, select, textarea { font: inherit; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ── Connexion ───────────────────────────────────────────────── */
.login {
  min-height: 100dvh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(120% 80% at 50% 0%, rgba(241,136,25,.16), transparent 62%);
}
.login-card {
  width: min(430px, 100%); background: var(--surface); border: 1px solid var(--line);
  border-radius: 22px; padding: 38px 34px; text-align: center;
}
.login-card h1 { margin: 0 0 8px; font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.login-card p { margin: 0 0 26px; color: var(--text-2); font-size: 15px; line-height: 1.55; }
.login-card .logo { width: 128px; margin: 0 auto 24px; }

.btn {
  border: 1px solid var(--line); background: var(--surface-2); color: var(--text);
  padding: 10px 16px; border-radius: 10px; cursor: pointer; font-size: 15px;
  display: inline-flex; align-items: center; gap: 8px; transition: .15s;
}
.btn:hover { border-color: var(--orange); color: var(--orange-hi); }
.btn-primary { background: var(--orange); border-color: var(--orange); color: #17150F; font-weight: 600; }
.btn-primary:hover { filter: brightness(1.08); color: #17150F; }
.btn-danger:hover { border-color: var(--rose); color: var(--rose); }
.btn-sm { padding: 6px 11px; font-size: 15px; border-radius: 8px; }

/* ── Ossature ────────────────────────────────────────────────── */
.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100dvh; }
.side {
  background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 20px 14px;
}

/* En-tête de marque : logo Le PIC + filet + nom, à la manière de CrowdMix */
.brand { display: flex; align-items: center; padding: 2px 8px 22px; }
.brand .logo { height: 34px; width: auto; display: block; }
.brand .brand-txt { padding-left: 12px; border-left: 2px solid var(--line); margin-left: 12px; }
.brand-name { font-size: 19px; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; }
.brand-name span { color: var(--orange); }
.brand-kick { font-size: 15px; color: var(--text-3); text-transform: uppercase; letter-spacing: .16em; margin-top: 2px; }
.brand-ver { font-size: 15px; color: var(--text-4); font-family: var(--mono); margin-top: 3px; }

.nav-group { margin-top: 14px; }
.nav-group > h4 {
  margin: 0 0 6px; padding: 0 10px; font-size: 15px; font-weight: 600;
  color: var(--text-3); text-transform: uppercase; letter-spacing: .13em;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 9px 10px; border-radius: 9px; border: 0; background: transparent;
  color: var(--text-2); cursor: pointer; font-size: 15px; transition: .12s;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--orange-wash); color: var(--orange-hi); font-weight: 600; box-shadow: inset 0 0 0 1px rgba(241,136,25,.28); }
.nav-item .lvl { margin-left: auto; font-size: 15px; color: var(--text-4); }
.side-foot { margin-top: auto; padding: 14px 10px 4px; border-top: 1px solid var(--line); }
.side-foot .who { font-size: 15px; font-weight: 600; }
.side-foot .mail { font-size: 15px; color: var(--text-3); word-break: break-all; margin-bottom: 10px; }

.main { padding: 26px 30px 48px; overflow: auto; }
.head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.head h1 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.head .sub { color: var(--text-3); font-size: 15px; }
.head .spacer { flex: 1; }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; margin-bottom: 18px;
}
.card h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.card .hint { margin: 0 0 14px; color: var(--text-3); font-size: 15px; line-height: 1.55; }

.url-row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.url-box {
  flex: 1; min-width: 260px; font-family: var(--mono); font-size: 15px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 13px; color: var(--orange-hi); user-select: all;
}

.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
select, input[type=text] {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 9px; padding: 7px 10px; font-size: 15px;
}
select:focus, input[type=text]:focus { outline: none; border-color: var(--orange); }
.switch { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; color: var(--text-3); }

.split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; align-items: start; }
@media (max-width: 1080px) { .split { grid-template-columns: 1fr; } }
@media (max-width: 780px) {
  .shell { grid-template-columns: 1fr; }
  .side { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .brand { padding-bottom: 12px; }
  .side-foot { margin: 0; border: 0; }
  .main { padding: 18px; }
}

.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th {
  text-align: left; font-size: 15px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--text-3); font-weight: 600; padding: 11px 13px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
td { padding: 10px 13px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: var(--surface-2); }
tbody tr.sel { background: var(--orange-wash); }
.mono { font-family: var(--mono); font-size: 15px; }
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 15px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-3);
}
.tag.post { color: var(--vert); border-color: rgba(125,200,194,.35); }
.tag.get  { color: var(--bleu); border-color: rgba(111,160,220,.35); }
.empty { padding: 36px; text-align: center; color: var(--text-3); font-size: 15px; line-height: 1.6; }

pre.payload {
  margin: 0; padding: 13px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; font-family: var(--mono); font-size: 15px; line-height: 1.55;
  max-height: 46vh; overflow: auto; white-space: pre-wrap; word-break: break-word;
  color: var(--text-2);
}
.kv { display: grid; grid-template-columns: 132px 1fr; gap: 6px 12px; font-size: 15px; margin-bottom: 14px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; word-break: break-word; }
.sec-title { font-size: 15px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); margin: 15px 0 7px; }
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: var(--orange); color: #17150F; padding: 10px 18px; border-radius: 10px;
  font-size: 15px; font-weight: 600; opacity: 0; pointer-events: none; transition: .2s;
  z-index: 90;
}
.toast.show { opacity: 1; }
.err { color: var(--rose); font-size: 15px; }
.logo { display: block; height: auto; }

/* États de décision du journal LPR */
.tag.ok   { color: var(--vert);   border-color: rgba(125,200,194,.4); }
.tag.warn { color: var(--orange-hi); border-color: rgba(241,136,25,.4); }
.tag.info { color: var(--bleu);   border-color: rgba(111,160,220,.4); }
.tag.bad  { color: var(--rose);   border-color: rgba(228,112,127,.45); }

/* Caractère incohérent dans une plaque lue (probable erreur d'OCR) */
.bad-char { color: var(--rose); border-bottom: 1px dotted var(--rose); cursor: help; }
