* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'eurostile';
}

body {
  background: #0a0a0a;
  color: white;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* LAYOUT */
.app {
  display: flex;
  flex: 1;
  margin-top: 120px;
}

/* SIDEBAR */
.sidebar {
  width: 260px;
  background: #111;
  padding: 20px;
  border-right: 1px solid #222;
}

/* USERS */
.user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.online .dot { background: #00ff88; }
.offline .dot { background: #555; }

/* CHAT */
.chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
}

/* ZONE MESSAGES */
#messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 30px;
  width: 100%;
}

/* MESSAGE */
.msg {
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* ALIGNEMENT */
.msg.me {
  align-items: flex-end;
  width: fit-content;
  margin-left: auto;
}

.msg:not(.me) {
  align-items: flex-start;
  margin-right: auto;
}

/* HEADER */
.msg-header {
  font-size: 12px;
  opacity: 0.6;
  margin-bottom: 5px;
  width: fit-content;
}

/* BULLE */
.msg-content {
  width: fit-content;
  max-width: 70%;
  padding: 14px 18px;
  border-radius: 18px;
  background: #1c1c1e;
}

/* MOI */
.msg.me .msg-content {
  background: linear-gradient(135deg, #0a84ff, #007aff);
  text-align: right;
}

/* AUTRES */
.msg:not(.me) .msg-content {
  text-align: left;
}

/* INPUT */
#form {
  display: flex;
  border-top: 1px solid #222;
}

#input {
  flex: 1;
  padding: 15px;
  background: #111;
  border: none;
  color: white;
}

#form button {
  background: #007aff;
  border: none;
  padding: 0 25px;
  color: white;
}

/* TYPING */
#typing {
  font-size: 12px;
  opacity: 0.6;
  padding: 5px 20px;
}

/* MOBILE */
@media (max-width: 768px) {
  body {
    padding-bottom: 0;
  }
  
  .app {
    flex-direction: column;
    min-height: calc(100vh - 145px);
    margin-top: 0;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    max-height: 60px;
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid #222;
  }
  
  .sidebar h2 {
    font-size: 0.8rem;
    margin-right: auto;
  }
  
  .chat {
    width: 100%;
    flex: 1;
    min-height: auto;
    padding-bottom: 80px;
  }
  
  #messages {
    padding: 15px;
    gap: 15px;
  }
  
  #form {
    flex-wrap: wrap;
  }
  
  #input {
    padding: 12px;
    font-size: 1rem;
  }
  
  .msg-content {
    max-width: 85%;
  }
}