/* styles.css — Testeur SoundFont + MIDI
   Objectif : lisible, sans fioritures, et utilisable sur PC + tablette.
*/

:root{
  --bg: #0b1020;
  --panel: rgba(255,255,255,.07);
  --bd: rgba(255,255,255,.14);
  --fg: #f2f6ff;
  --muted: rgba(242,246,255,.72);

  --accent: #ffd56a;
  --ok: #6ee7b7;
  --bad: #fb7185;

  --r: 18px;
  --shadow: 0 12px 30px rgba(0,0,0,.40);
}

*{ box-sizing:border-box; }
html,body{ height:100%; margin:0; }
body{
  background: radial-gradient(1200px 600px at 20% 10%, #1b0f3a 0%, var(--bg) 60%),
              radial-gradient(900px 700px at 80% 70%, #0a2a2d 0%, var(--bg) 60%);
  color: var(--fg);
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  border-bottom: 1px solid var(--bd);
  backdrop-filter: blur(8px);
  background: rgba(0,0,0,.14);
  position: sticky;
  top: 0;
  z-index: 10;
}

.title__main{ font-size: 18px; font-weight: 800; letter-spacing:.2px; }
.title__sub{ font-size: 13px; color: var(--muted); margin-top: 2px; }

.layout{
  display:grid;
  grid-template-columns: 420px 1fr;
  gap: 12px;
  padding: 12px;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 980px){
  .layout{ grid-template-columns: 1fr; }
}

.panel{
  background: var(--panel);
  border: 1px solid var(--bd);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 12px;
  min-height: 260px;
}

h2{
  margin: 10px 0 8px;
  font-size: 15px;
  letter-spacing: .2px;
}

hr{
  border: none;
  border-top: 1px solid var(--bd);
  margin: 12px 0;
  opacity: .8;
}

.row{
  display:flex;
  gap:10px;
  flex-wrap: wrap;
  align-items:center;
}

.row.small{ gap: 14px; }

.btn{
  border: 1px solid var(--bd);
  background: rgba(255,255,255,.06);
  color: var(--fg);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 700;
  transition: transform .08s ease, filter .08s ease;
  user-select:none;
}
.btn:hover{ filter: brightness(1.1); }
.btn:active{ transform: translateY(1px); }
.btn[disabled]{ opacity: .45; cursor: not-allowed; }

.btn.primary{
  border-color: rgba(255,213,106,.55);
  background: rgba(255,213,106,.12);
}
.btn.danger{
  border-color: rgba(251,113,133,.55);
  background: rgba(251,113,133,.12);
}

.btn.file{ position: relative; overflow:hidden; }
.btn.file input{
  position:absolute; inset:0;
  opacity:0; cursor:pointer;
}

.select, .search{
  border: 1px solid var(--bd);
  background: rgba(0,0,0,.20);
  color: var(--fg);
  border-radius: 12px;
  padding: 10px 10px;
  min-width: 220px;
  outline: none;
}

.search{ min-width: 320px; }

.field{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width: 140px;
}
.field > span{
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}
.field input[type="range"]{ width: 240px; }

.check{
  display:flex;
  gap:10px;
  align-items:center;
  color: var(--muted);
  font-size: 13px;
  user-select:none;
}

.info{
  margin-top: 8px;
  display:grid;
  gap:6px;
  font-size: 13px;
}
.info .k{ color: var(--muted); font-weight: 700; }
.info .v{ font-weight: 700; }

.pill{
  border: 1px solid var(--bd);
  background: rgba(0,0,0,.20);
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--muted);
}

.pill.ok{ border-color: rgba(110,231,183,.55); color: var(--ok); }
.pill.bad{ border-color: rgba(251,113,133,.55); color: var(--bad); }

.listeHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap: wrap;
}

.liste{
  margin-top: 10px;
  border: 1px solid var(--bd);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(0,0,0,.12);
  height: 72vh;
  min-height: 420px;
}

.item{
  display:flex;
  gap:10px;
  align-items:center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  cursor: pointer;
}
.item:last-child{ border-bottom:none; }
.item:hover{ background: rgba(255,255,255,.05); }

.item__num{
  width: 70px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  color: var(--muted);
}
.item__name{
  font-weight: 800;
  letter-spacing:.1px;
}
.item__meta{
  margin-left:auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  color: var(--muted);
}

.item.active{
  background: rgba(255,213,106,.10);
  outline: 1px solid rgba(255,213,106,.35);
}

.log{
  margin-top: 12px;
  border: 1px solid var(--bd);
  border-radius: 14px;
  background: rgba(0,0,0,.18);
  overflow: hidden;
}
.log__title{
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
}
.log pre{
  margin:0;
  padding: 10px;
  font-size: 12px;
  color: var(--fg);
  overflow:auto;
}

.footer{
  padding: 10px 14px;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--bd);
  background: rgba(0,0,0,.12);
}
