:root {
  --bg: #0b1220;
  --bg2: #0f172a;
  --carte: #111c33;
  --bord: #1e2a44;
  --txt: #e2e8f0;
  --doux: #94a3b8;
  --accent: #e11d48;
  --accent2: #fb7185;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

body { padding-bottom: 96px; }

a { color: var(--accent2); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 840px;
  margin: 0 auto;
  padding: 0 16px 24px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, var(--bg) 70%, rgba(11,18,32,0));
  z-index: 20;
  border-bottom: 1px solid var(--bord);
}

.brand {
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  letter-spacing: .2px;
}
.brand:hover { text-decoration: none; }

.nav a {
  color: var(--doux);
  margin-left: 14px;
  font-size: 14px;
}
.nav a:hover { color: #fff; }

.muted { color: var(--doux); }
.bandeau { font-size: 14px; margin: 14px 0 8px; }

.card {
  background: var(--carte);
  border: 1px solid var(--bord);
  border-radius: 14px;
  padding: 18px;
  margin: 16px 0;
}

.card.auth { max-width: 420px; margin: 48px auto; }

h1 { font-size: 22px; margin: 0 0 12px; }
h2 { font-size: 17px; margin: 26px 0 12px; color: #fff; }

.sujet { margin-top: 10px; }

.liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

.video {
  display: grid;
  grid-template-columns: 116px 1fr;
  gap: 12px;
  background: var(--carte);
  border: 1px solid var(--bord);
  border-radius: 12px;
  padding: 10px;
  align-items: start;
}

.vignette { width: 116px; height: 66px; border-radius: 8px; overflow: hidden; background: #0a1020; }
.vignette img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vplaceholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--doux);
  background: repeating-linear-gradient(45deg, #0e1730, #0e1730 8px, #101c38 8px, #101c38 16px);
}

.vcorps { min-width: 0; }
.vtitre { font-weight: 600; color: #fff; }

.vmeta { color: var(--doux); font-size: 13px; margin: 4px 0 8px; }
.vmeta .sep { opacity: .5; padding: 0 2px; }

.vactions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  border: 1px solid var(--bord);
  background: #16213a;
  color: var(--txt);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.ghost { background: transparent; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn.danger { color: #fecaca; border-color: #7f1d1d; }

label { display: block; margin-bottom: 12px; font-size: 14px; color: var(--doux); }
input[type=text], input[type=email], input[type=password], input[type=number], select {
  width: 100%;
  margin-top: 5px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--bord);
  background: #0a1428;
  color: var(--txt);
  font-size: 15px;
  font-family: inherit;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.grille { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grille .btn { grid-column: 1 / -1; justify-self: start; }

.err { color: #fca5a5; background: #3f1420; border: 1px solid #7f1d1d; padding: 8px 12px; border-radius: 10px; }
.flash { color: #bbf7d0; background: #052e1a; border: 1px solid #14532d; padding: 10px 14px; border-radius: 10px; margin: 14px 0; }

.ligne-titre { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.inline { display: inline; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; display: block; overflow-x: auto; }
.tbl th, .tbl td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--bord); white-space: nowrap; }
.tbl th { color: var(--doux); font-weight: 600; }
.tbl tr.off { opacity: .45; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.actions { display: flex; gap: 6px; }

.puce { color: var(--doux); }
.puce strong { color: #fff; }

.foot { color: #64748b; font-size: 12px; text-align: center; margin-top: 28px; line-height: 1.5; }

/* Barre de lecture fixe */
.playerbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: #0e1830;
  border-top: 1px solid var(--bord);
  box-shadow: 0 -8px 24px rgba(0,0,0,.35);
}
.playerbar[hidden] { display: none; }

.pbtn {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  min-width: 78px;
}

.pinfo { min-width: 0; }
.ptitre { font-size: 14px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pseek { width: 100%; margin: 6px 0 2px; accent-color: var(--accent); }
.ptime { font-size: 12px; color: var(--doux); }

.pclose {
  background: transparent;
  color: var(--doux);
  border: 1px solid var(--bord);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
}

@media (max-width: 520px) {
  .video { grid-template-columns: 96px 1fr; }
  .vignette { width: 96px; height: 54px; }
  .grille { grid-template-columns: 1fr; }
}
