html, body {
  margin: 0;
  padding: 0;
  background: #111;
  height: 100%;
  font-family: sans-serif;
  color: #fff;
}

/* --- Auth --- */
.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.auth-box {
  width: 280px;
  text-align: center;
}

.auth-box input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  margin: 6px 0;
  border-radius: 8px;
  border: none;
}

.auth-box button {
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  border: none;
  border-radius: 8px;
  background: #25D366;
  color: white;
  font-weight: bold;
}

.switch { font-size: 13px; margin-top: 10px; }
.switch a { color: #25D366; }
.error { color: #e74c3c; font-size: 13px; }

/* --- Annuaire --- */
#directoryView { padding: 16px; }

#dirHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

#dirHeader button {
  background: transparent;
  border: 1px solid #555;
  color: #ccc;
  border-radius: 6px;
  padding: 6px 10px;
}

#searchBox {
  display: flex;
  gap: 8px;
}

#searchBox input {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: none;
  box-sizing: border-box;
}

#searchBox button {
  padding: 10px 14px;
  border: none;
  border-radius: 8px;
  background: #25D366;
  color: white;
  white-space: nowrap;
}

#searchResult {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  margin-top: 16px;
  background: #1c1c1c;
  border-radius: 10px;
}

.result-info { display: flex; align-items: center; gap: 8px; }

#searchResult .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

#searchResult .dot.online { background: #25D366; }
#searchResult .dot.offline { background: #555; }

#searchResult button {
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  background: #25D366;
}

#searchResult button:disabled {
  background: #444;
  opacity: 0.6;
}

/* --- Appel entrant --- */
#incomingView {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  gap: 20px;
}

#incomingView button {
  padding: 12px 24px;
  border: none;
  border-radius: 30px;
  font-size: 16px;
}

#acceptBtn { background: #25D366; color: white; }
#declineBtn { background: #e74c3c; color: white; }

/* --- Appel en cours (repris de la V1) --- */
#callView { height: 100vh; position: relative; overflow: hidden; }

#remoteVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

#localVideo {
  width: 110px;
  height: 150px;
  object-fit: cover;
  position: absolute;
  bottom: 100px;
  right: 16px;
  border-radius: 12px;
  border: 2px solid #fff;
  z-index: 2;
}

#status {
  position: absolute;
  top: 16px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 2;
  font-size: 14px;
}

#controls {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
  z-index: 2;
}

#controls button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  font-size: 22px;
  background: #25D366;
  color: white;
}

#hangupBtn { background: #e74c3c; }
