/* Wallam web — mobile d'abord.
   Auth : style clair TikTok (cercle en verre, bouton noir) avec un
   contraste FORT et lisible (leçon v8 : gris clair sur gris clair
   = invisible). Appli : bleu nuit « Glassy Sidebar V10 ». */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #0A1F3C 0%, #050914 100%);
  color: #F2F5F9;
  min-height: 100vh;
}
a { color: #7AAFE6; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

/* ---------- barre du haut + navigation ---------- */
.topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(11, 21, 38, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: sticky; top: 0; z-index: 20;
}
.brand { font-size: 24px; font-weight: 800; color: #fff; text-decoration: none; }
.brand-sub { color: #8AA0B8; font-size: 12px; display: none; }
.topbar-user { margin-left: auto; font-size: 13px; color: #C7D3E0; }
.topbar-logout { color: #F5B81F; font-size: 13px; }
.sidebar { display: none; }
.bottomnav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; justify-content: space-around;
  background: rgba(16, 30, 51, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 6px 2px calc(6px + env(safe-area-inset-bottom));
  backdrop-filter: blur(10px);
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: #8AA0B8; text-decoration: none; font-size: 11px;
  padding: 4px 8px; border-radius: 14px; min-width: 56px;
}
.nav-item.active { background: #FFFFFF; color: #0A1F3C; font-weight: 700; }
.nav-icon { font-size: 20px; line-height: 1; }

/* ---------- contenu ---------- */
.content { padding: 14px 14px 86px; max-width: 720px; margin: 0 auto; }
.page-title { margin: 6px 0 4px; font-size: 24px; color: #fff; }
.page-sub { color: #8AA0B8; margin: 0 0 14px; font-size: 14px; }
.section-title { font-size: 18px; margin: 20px 0 8px; color: #fff; }
.card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 12px;
}
.card h1, .card h2 { margin-top: 0; color: #fff; }
.hint { color: #8AA0B8; font-size: 13px; }
.form-error { color: #FF9B9B; background: rgba(255, 60, 60, 0.12);
  border: 1px solid rgba(255, 90, 90, 0.4); border-radius: 10px;
  padding: 10px; font-weight: 600; }
.form-ok { color: #7BE3A8; font-weight: 700; }

/* ---------- champs (visibles : bordure sombre, texte sombre sur clair
   pour l'auth, texte clair sur sombre pour l'appli) ---------- */
.field { display: block; margin-bottom: 12px; }
.field-label { display: block; font-weight: 700; color: #1A1A1A;
  margin-bottom: 5px; font-size: 14px; }
.field-dark .field-label { color: #EAF0F7; }
.field-input, .field select, .field textarea,
.field-dark input, .field-dark select, .field-dark textarea,
.comment-form input, #chat-form input {
  width: 100%; padding: 12px; border-radius: 10px;
  border: 2px solid #5A5A5A; background: #EDEEF0; color: #111;
  font-size: 16px;
}
.field-input::placeholder, .field textarea::placeholder,
.comment-form input::placeholder, #chat-form input::placeholder {
  color: #6B6B6B;
}
.field-input:focus, .field textarea:focus,
.comment-form input:focus, #chat-form input:focus {
  outline: 3px solid #1E90FF; border-color: #1E90FF;
}
.field-dark input, .field-dark select, .field-dark textarea {
  background: rgba(255, 255, 255, 0.10); color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.45);
}
.field-dark input::placeholder, .field-dark textarea::placeholder {
  color: #9FB2C8;
}
.field-dark select option { color: #111; }
.check-row { display: flex; gap: 8px; align-items: flex-start;
  margin: 10px 0; font-size: 14px; }
.check-row input { width: 20px; height: 20px; accent-color: #111; }

/* ---------- boutons ---------- */
.btn, .btn-black {
  display: inline-block; border: none; border-radius: 10px;
  padding: 12px 18px; font-weight: 800; font-size: 15px;
  text-decoration: none; text-align: center;
}
.btn { background: #F97316; color: #fff; }
.btn:hover { background: #EA6A0A; }
.btn-black { background: #111111; color: #fff; width: 100%;
  letter-spacing: 0.5px; }
.btn-black:hover, .btn-black:active {
  background: linear-gradient(90deg, #1E90FF, #00D4FF); }
.btn-help { background: #F5B81F; color: #111; }

/* ---------- authentification (cercle en verre, contraste fort) ---------- */
.auth-page {
  min-height: 100vh; background: #E8E9EB; color: #1A1A1A;
  padding: 18px 14px 30px;
  display: flex; flex-direction: column; align-items: center;
}
.auth-circle {
  width: 100%; max-width: 480px;
  background: linear-gradient(160deg, #F4F5F6, #E2E3E6);
  border: 2px solid #B9BBC0; border-radius: 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  padding: 26px 22px 20px; position: relative;
}
.auth-title {
  font-family: Georgia, "Times New Roman", serif; font-style: italic;
  font-size: 40px; text-align: center; color: #1A1A1A; margin: 0;
}
.auth-orn { text-align: center; color: #1A1A1A; font-size: 18px;
  margin: 2px 0 10px; }
.auth-form-title { text-align: center; color: #111; margin: 0 0 14px;
  font-size: 22px; }
.auth-form .field-label { color: #1A1A1A; }
.auth-form .field-input { background: #EDEEF0; border: 2px solid #555; }
.remember-row { display: flex; justify-content: space-between;
  align-items: center; margin: 4px 0 14px; font-size: 14px; color: #222; }
.remember-row input { width: 18px; height: 18px; accent-color: #111; }
.toggle { font-size: 20px; cursor: pointer; user-select: none; }
.auth-switch { text-align: center; margin: 16px 0 4px; font-size: 15px;
  color: #222; }
.auth-switch a { color: #0B5FFF; font-weight: 800; }
.social-dots { display: flex; gap: 10px; justify-content: center;
  margin-top: 14px; }
.social-dots span {
  width: 40px; height: 40px; border-radius: 50%; background: #111;
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.auth-note { text-align: center; color: #555; font-size: 13px; }

/* ---------- fil ---------- */
.composer textarea { width: 100%; border-radius: 10px; padding: 12px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.10); color: #fff; font-size: 16px; }
.composer-row { display: flex; gap: 10px; align-items: center;
  margin-top: 10px; flex-wrap: wrap; }
.file-label { color: #F5B81F; font-weight: 700; cursor: pointer; }
.file-name { font-size: 13px; color: #8AA0B8; }
.post-head { display: flex; gap: 10px; align-items: center; }
.post-author { color: #fff; font-weight: 800; text-decoration: none; }
.post-time { color: #8AA0B8; font-size: 12px; }
.post-text { white-space: pre-wrap; word-wrap: break-word; }
.post-photo { border-radius: 12px; margin-top: 6px; }
.post-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.post-actions button, .post-actions a {
  background: rgba(255, 255, 255, 0.10); color: #fff; border: 1px solid
  rgba(255, 255, 255, 0.25); border-radius: 20px; padding: 7px 12px;
  font-size: 13px; text-decoration: none;
}
.post-actions .btn-help { background: #F5B81F; color: #111;
  border-color: #F5B81F; font-weight: 700; }
.comments { margin-top: 10px; border-top: 1px solid
  rgba(255, 255, 255, 0.15); padding-top: 8px; }
.comment { margin: 6px 0; font-size: 14px; }
.comment b { color: #fff; }
.comment-form { display: flex; gap: 8px; margin-top: 10px; }
.comment-form input { flex: 1; }
.comment-form button { background: #F97316; color: #fff; border: none;
  border-radius: 10px; padding: 10px 14px; font-weight: 700; }

/* ---------- avatars / personnes / contacts ---------- */
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #F97316, #F5B81F); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
}
.avatar-big { width: 72px; height: 72px; font-size: 26px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.chip { background: rgba(245, 184, 31, 0.18); color: #F5B81F;
  border: 1px solid rgba(245, 184, 31, 0.5); border-radius: 20px;
  padding: 3px 10px; font-size: 13px; }
.person { display: flex; gap: 12px; }
.person-body { flex: 1; min-width: 0; }
.person-name { color: #fff; font-weight: 800; font-size: 17px;
  text-decoration: none; }
.person-country { color: #8AA0B8; font-size: 13px; }
.person-bio { margin: 6px 0; }
.person-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.contact-row { display: flex; gap: 12px; align-items: center;
  text-decoration: none; color: inherit; }
.contact-body { display: flex; flex-direction: column; min-width: 0; }
.contact-name { color: #fff; font-weight: 700; }
.contact-last { color: #B9C6D6; font-size: 13px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 60vw; }
.contact-meta { color: #8AA0B8; font-size: 12px; }
.unread-badge { background: #F97316; color: #fff; border-radius: 12px;
  font-size: 12px; padding: 1px 7px; font-weight: 800; }
.profile-head { display: flex; gap: 14px; align-items: center;
  margin-bottom: 12px; }
.profile-name { font-size: 20px; font-weight: 800; color: #fff; }
.profile-meta { color: #8AA0B8; font-size: 13px; }

/* ---------- discussion ---------- */
.chat-box { display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 12px; }
.bubble { max-width: 82%; padding: 10px 12px; border-radius: 16px;
  word-wrap: break-word; }
.bubble.mine { align-self: flex-end; background: #F97316; color: #fff;
  border-bottom-right-radius: 4px; }
.bubble.theirs { align-self: flex-start;
  background: rgba(255, 255, 255, 0.12); border-bottom-left-radius: 4px; }
.bubble-time { font-size: 11px; opacity: 0.75; margin-top: 3px; }
#chat-form { display: flex; gap: 8px; position: sticky; bottom: 66px; }

/* ---------- aide ---------- */
.help-info p { margin: 6px 0; }
.help-row p { margin: 4px 0; }
.help-status { color: #F5B81F; font-size: 13px; font-weight: 700; }

/* ---------- bureau (≥ 900 px) : barre latérale en verre ---------- */
@media (min-width: 900px) {
  .topbar { display: none; }
  .bottomnav { display: none; }
  .sidebar {
    display: flex; flex-direction: column; gap: 6px;
    position: fixed; left: 14px; top: 14px; bottom: 14px; width: 240px;
    background: linear-gradient(160deg, rgba(91, 140, 192, 0.35),
      rgba(11, 21, 38, 0.85));
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 24px; padding: 20px 14px;
    backdrop-filter: blur(12px); z-index: 20;
  }
  .side-brand { font-size: 28px; font-weight: 800; color: #fff; }
  .side-sub { color: #8AA0B8; font-size: 13px; margin-bottom: 18px; }
  .sidebar .nav-item {
    flex-direction: row; gap: 10px; font-size: 15px; padding: 11px 14px;
    border-radius: 24px; min-width: 0;
  }
  .sidebar .nav-item.active { background: #fff; color: #0A1F3C; }
  .side-foot { margin-top: auto; border-top: 1px solid
    rgba(255, 255, 255, 0.15); padding-top: 12px; }
  .side-user { color: #fff; font-weight: 700; }
  .content { margin-left: 280px; padding-bottom: 30px; max-width: 760px; }
  .auth-circle { border-radius: 50%; width: 560px; min-height: 560px;
    max-width: 92vw; padding: 58px 105px 46px; }
  .auth-title { font-size: 46px; }
  .contact-last { max-width: 420px; }
  #chat-form { bottom: 12px; }
}
