/* Reset de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* Corps */
body {
    background: #1a1a1a;
    color: #eee;
    padding: 20px;
}

/* En-tête */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

header h1 {
    color: #00ffc3;
    font-size: 2em;
}

.btn-logout {
    background: #ff4d4f;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    text-decoration: none;
}

.btn-logout:hover {
    background: #d9363e;
}

/* Sections */
.users-section,
.user-msgs,
.all-msgs {
    margin-bottom: 40px;
}

.users-section h2,
.user-msgs h2,
.all-msgs h2 {
    margin-bottom: 12px;
    color: #00ffc3;
}

/* Tableaux */
table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 12px;
    border-bottom: 1px solid #333;
    text-align: left;
}

/* Boutons génériques */
.btn {
    display: inline-block;
    width: 120px;
    padding: 6px 12px;
    text-align: center;
    border-radius: 4px;
    text-decoration: none;
    box-sizing: border-box;
    transition: background .3s, color .3s;
    font-size: 0.9em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Bouton “Voir user” */
.btn-view {
    background: #00ffc3;
    color: #121212;
}

.btn-view:hover {
    background: #00cfa1;
    color: #fff;
}

/* Bouton “Supprimer” */
.btn-del {
    background: #ff4d4f;
    color: #fff;
}

.btn-del:hover {
    background: #d9363e;
}

/* Cartes de message */
.msg-card {
    background: #2a2a2a;
    border: 1px solid #444;
    padding: 16px;
    margin: 12px 0;
    position: relative;
    border-radius: 4px;
}

/* Boutons dans les messages */
.msg-card .btn {
    margin-top: 12px;
}

.msg-card .btn-del {
    display: block;
    margin-top: 12px;
    margin-left: auto;
    margin-right: 0;
    width: fit-content;
}

/* Date du message */
.msg-date {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.8em;
    color: #888;
}

/* Container de login admin */
.login-container {
  max-width: 320px;
  margin: 60px auto;
  padding: 20px;
  background: #222;
  border: 1px solid #444;
  border-radius: 6px;
  text-align: center;
}

.login-container h1 {
  margin-bottom: 20px;
  color: #00ffc3;
}

.login-container input {
  width: 100%;
  background: #333;
  color: #eee;
  margin: 10px 0;
  padding: 10px;
  border: none;
  border-radius: 4px;
}

.login-container button {
  width: 100%;
  background: #00ffc3;
  color: #121212;
  padding: 10px;
  border: none;
  border-radius: 4px;
  font-weight: bold;
  cursor: pointer;
  transition: background .3s;
}

.login-container button:hover {
  background: #00cfa1;
}

.error {
  color: #ff4d4f;
  margin-bottom: 12px;
}

.back-link {
  display: inline-block;
  margin-top: 16px;
  color: #00ffc3;
  text-decoration: none;
}
