/* OmniDesk — viewer web. Mêmes variables que l'agent GTK (charte iptv-studio-pro). */

:root {
  --fond: #eef0f4;
  --surface: #ffffff;
  --surface-survol: #f5f7fa;
  --bordure: #e3e6ec;
  --texte: #1d2129;
  --texte-doux: #6b7280;
  --texte-pale: #9aa1ad;
  --accent: #2f6fde;
  --accent-doux: #e5edfc;
  --rouge: #e5484d;
  --vert: #2e9d5b;
  --ombre: rgba(16, 24, 40, 0.06);
  --rayon: 12px;
  --video-fond: #000000;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--fond);
  color: var(--texte);
  font-family: system-ui, -apple-system, "Segoe UI", Ubuntu, Cantarell, "Noto Sans", sans-serif;
  font-size: 14px;
}

[hidden] { display: none !important; }

.mono { font-family: ui-monospace, "DejaVu Sans Mono", "Ubuntu Mono", monospace; }

.vue { height: 100%; }

.centree {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.carte {
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  box-shadow: 0 1px 2px var(--ombre);
}

.formulaire {
  width: 100%;
  max-width: 440px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.entete-carte {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.marque {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.aide {
  margin: 0;
  color: var(--texte-doux);
  font-size: 13px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--texte-doux);
}

input {
  font: inherit;
  font-size: 14px;
  color: var(--texte);
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: 8px;
  padding: 9px 12px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-doux);
}

input.mono { font-size: 18px; letter-spacing: 1px; }

button {
  font: inherit;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

button.principal { background: var(--accent); color: #fff; }
button.principal:hover { background: #2861c4; }
button.principal:disabled { opacity: 0.6; cursor: default; }
button.secondaire { background: var(--surface-survol); color: var(--texte); border: 1px solid var(--bordure); }
button.secondaire:hover { background: var(--accent-doux); color: var(--accent); }
button.danger { background: var(--rouge); color: #fff; }
button.danger:hover { background: #cf3f44; }
button.lien { background: none; padding: 0; color: var(--texte-doux); font-weight: 500; font-size: 12px; }
button.lien:hover { color: var(--accent); }

.erreur {
  margin: 0;
  background: rgba(229, 72, 77, 0.08);
  color: #b4282d;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
}

.pastille {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--texte-pale);
  flex: none;
}
.pastille.active { background: var(--vert); }

/* — annuaire — */

.annuaire {
  width: 100%;
  max-width: 620px;
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#annuaire {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#annuaire li {
  border-radius: 8px;
  cursor: pointer;
  transition: background 150ms ease;
}

#annuaire li:hover { background: var(--surface-survol); }
#annuaire li.hors-ligne { cursor: default; opacity: 0.55; }
#annuaire li.hors-ligne:hover { background: none; }

.poste-ligne {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
}

.poste-nom { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.poste-etat { font-size: 12px; color: var(--texte-doux); white-space: nowrap; }
.poste-id { font-size: 12px; color: var(--texte-pale); white-space: nowrap; }

.pastille.connexion { background: #e8930c; }
.pastille.occupe { background: var(--rouge); }

.poste-connexion,
.formulaire-ligne {
  display: flex;
  gap: 8px;
  padding: 0 12px 12px 32px;
}

.poste-connexion input,
.formulaire-ligne input { flex: 1; min-width: 0; }
.poste-connexion button,
.formulaire-ligne button { white-space: nowrap; }

.autre-poste {
  border-top: 1px solid var(--bordure);
  padding-top: 12px;
}

.autre-poste summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--texte-doux);
}

.autre-poste summary:hover { color: var(--accent); }
.autre-poste .formulaire-ligne { padding: 12px 0 0; }

@media (max-width: 520px) {
  .poste-id { display: none; }
  .poste-connexion, .formulaire-ligne { flex-wrap: wrap; padding-left: 12px; }
}

/* — session — */

#vue-session {
  display: flex;
  flex-direction: column;
}

.barre {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--fond);
  border-bottom: 1px solid var(--bordure);
  flex-wrap: wrap;
}

.barre .espace { flex: 1; }
.barre button { padding: 6px 12px; font-size: 13px; }

.ecran {
  flex: 1;
  min-height: 0;
  background: var(--video-fond);
  display: flex;
  outline: none;
}

.ecran video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
