﻿/* ============================================================
   SocialCraft â€” interface faÃ§on rÃ©seau social (capture)
   ============================================================ */

:root {
  --bg: #e9ebed;
  --card: #ffffff;
  --border: #d3d8dc;
  --dark: #1c1c1c;
  --text: #2f2f2f;
  --muted: #8a8f94;
  --blue: #3b82f6;
  --blue-dark: #2f6fd0;
  --red: #e74c3c;
  --green: #7cb342;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 60px; }
/* Scroll fluide et ultra-rapide */
body { -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; }
body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.hidden { display: none !important; }

/* Popup ouverte : on masque la barre de dÃ©filement de la page */
body.logout-open, body.dialog-open { overflow: hidden; padding-right: var(--sbw, 0px); }

/* ===== Popup confirmation dÃ©connexion ===== */
.confirm-modal {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.confirm-modal.hidden { display: none; }
.confirm-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px; /* un peu moins arrondie */
  padding: 22px;
  width: min(360px, 100%);
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
  animation: confirmPop .22s cubic-bezier(.22,.61,.36,1);
  position: relative;
}
.confirm-close {
  position: absolute; top: 7px; right: 8px;
  width: 26px; height: 26px;
  background: none; border: none;
  border-radius: 4px;
  color: #888; font-size: 22px; line-height: 1;
  cursor: pointer;
}
.confirm-close:hover { color: #555; background: rgba(128,128,128,.16); }
@keyframes confirmPop { from { opacity: 0; transform: scale(.94) translateY(8px); } to { opacity: 1; transform: none; } }
.confirm-box h3 { font-size: 17px; margin-bottom: 8px; color: var(--text); }
.confirm-box p { font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 20px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* Anciennes icÃ´nes vintage (assets/icons/) pour quelques elements */
.ico {
  width: 16px;
  height: 16px;
  vertical-align: -3px;
  display: inline-block;
  flex: none;
}
.plus-btn .ico { width: 14px; height: 14px; vertical-align: -3px; }
.app-box {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #e8eaed;
  flex: none;
}
.app-box .ico { width: 18px; height: 18px; vertical-align: 0; object-fit: contain; }
.overlap-icons {
  position: relative;
  display: inline-block;
  width: 26px;
  height: 20px;
  flex: none;
  vertical-align: -5px;
}
.overlap-icons img {
  position: absolute;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  border: 2px solid #fff;
}
.overlap-icons img:first-child { left: 0; z-index: 1; }
.overlap-icons img:last-child { left: 10px; z-index: 2; }


/* ---------- Barre du haut ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 50px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  background: #2a2a2a;
  color: #e8e8e8;
  border-radius: 0 0 8px 8px;
}
/* Police Minecraft (mÃ©triques propres, ne dÃ©cale pas le texte) */
@font-face {
  font-family: 'MinecraftAlt';
  src: url('assets/fonts/Minecraft-Alt.ttf') format('truetype');
  font-display: block; /* Ã©vite le flash de police normale avant le chargement */
}
.site-name {
  font-family: 'MinecraftAlt', "Segoe UI", sans-serif;
  font-size: 28px;
  font-weight: 400;
  color: #ffffff;
  letter-spacing: .2px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  height: 30px; /* meme hauteur que la barre de recherche */
  line-height: 1;
}
.site-name:hover { color: #fff; text-decoration: none; }

.search-bar {
  position: relative;
  display: flex;
  height: 30px;
  width: min(560px, 42vw);
  background: #fff;
  border-radius: 5px;
  overflow: hidden;
}
.search-bar input {
  flex: 1;
  min-width: 0;
  border: none;
  padding: 0 10px;
  font-size: 12px;
  color: #333;
  outline: none;
}
.search-go, .search-menu {
  border: none;
  background: #fff;
  color: #444;
  cursor: pointer;
  font-size: 12px;
}
.search-go {
  border-left: 1px solid #e3e3e3;
  padding: 0 8px;
  font-size: 14px;
}
.search-menu {
  border-left: 1px solid #e3e3e3;
  padding: 0 10px;
  white-space: nowrap;
  border-radius: 0;
}
.search-go:hover, .search-menu:hover { background: #f2f2f2; }

.search-results {
  position: absolute;
  top: 34px;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
  z-index: 60;
  max-height: 320px;
  overflow: auto;
}
.search-result {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  color: #333;
}
.search-result:hover { background: #f4f8ff; text-decoration: none; }
.search-result .res-emoji {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  background: #eef2f7;
  border-radius: 4px;
}
.search-result small { color: var(--muted); margin-left: auto; }
.search-empty { padding: 10px; color: var(--muted); }

.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.top-btn {
  height: 30px;
  min-width: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 8px;
  border: 1px solid #3a3a3a;
  background: #2b2b2b;
  color: #e8e8e8;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
  text-decoration: none;
}
.top-btn:hover { background: #3a3a3a; }
.top-btn.primary {
  background: #2b2b2b;
  border-color: #3a3a3a;
  color: #e8e8e8;
}
.top-btn.primary:hover { background: #3a3a3a; }
.top-btn.profile-btn {
  background: #2b2b2b;
  border-color: #3a3a3a;
  color: #e8e8e8;
  height: 30px;
  font-size: 12px;
}
.btn-sep {
  display: inline-block;
  width: 1px;
  height: 16px;
  flex: none;
  align-self: center;
  background: rgba(255, 255, 255, .7);
  margin: 0 4px;
}

/* profil connectÃ© dans la barre */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 6px;
  background: #2b2b2b;
  border: 1px solid #3a3a3a;
  border-radius: 3px;
  color: #e8e8e8;
  font-size: 12px;
}
.user-chip img { width: 22px; height: 22px; border-radius: 4px; }

/* Pastille d'Ã©tat sur les avatars des autres utilisateurs */
.avatar-status-wrap { position: relative; display: inline-flex; flex: none; }
.avatar-status-dot {
  position: absolute; right: -4px; bottom: -4px;
  z-index: 3;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #bbb; /* gris tant que le vrai Ã©tat n'est pas connu */
  border: 2px solid #fff;
  box-sizing: content-box;
  pointer-events: none;
}
.avatar-status-dot.online { background: var(--green); }
.user-chip button {
  background: none; border: none; color: #aaa;
  cursor: pointer; font-size: 13px; padding: 0 2px;
}
.user-chip button:hover { color: #ff8080; }

/* ---------- Panneau de connexion ---------- */
.login-panel {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0,0,0,.55);
  display: grid;
  place-items: center;
  padding: 1rem;
}
.login-card {
  width: min(400px, 100%);
  background: #fff;
  border-radius: 6px;
  padding: 22px;
  box-shadow: 0 14px 40px rgba(0,0,0,.35);
}
.login-card h3 { font-size: 18px; margin-bottom: 8px; }
.login-card p { color: #666; font-size: 13px; }
.login-card input {
  width: 100%;
  margin-top: 12px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 13px;
}
.login-card input:focus { outline: 2px solid var(--blue); outline-offset: 1px; }
.login-actions { display: flex; gap: 8px; margin-top: 10px; }
.login-card small { display: block; margin-top: 12px; color: #999; font-size: 11px; }
.error { color: #d63031 !important; margin-top: 8px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--border);
  background: #f6f6f6;
  color: #333;
  padding: 5px 10px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: #ededed; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-blue { background: var(--blue); border-color: var(--blue-dark); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); }
.btn-ghost { background: transparent; }
.btn.mini { padding: 3px 9px; font-size: 11px; }

/* ---------- Mise en page ---------- */
.layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 248px;
  gap: 12px;
  max-width: 1200px;
  margin: 14px auto;
  padding: 0 12px;
  align-items: start;
}

/* ---------- Cartes ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 3px;
  margin-bottom: 12px;
}

/* ---------- Colonne gauche ---------- */
.side-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 3px;
  margin-bottom: 12px;
  overflow: hidden;
}
/* Cloche dÃ©sactivÃ©e quand il n'y a aucune notification */
.notif-btn.notif-disabled { opacity: .5; pointer-events: none; cursor: not-allowed; }

/* Style partagÃ© : bouton "Tchatter" de la banniÃ¨re = bouton "TÃ©lÃ©charger" de la lightbox */
.btn-profile-style {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--border);
  background: #f6f6f6;
  color: #333;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.28);
}
.btn-profile-style:hover { background: #ededed; text-decoration: none; }

/* Message de fin du flux */
.feed-end {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 24px 16px;
  margin-top: 8px;
  background: #f4f8f1;
  border: 1px solid #d8e8cd;
  border-radius: 4px;
  text-align: left;
}
.feed-end img { width: 56px; height: 56px; object-fit: contain; flex: none; }
.feed-end b { font-size: 13px; color: var(--green); }
.feed-end div { font-size: 12px; line-height: 1.5; color: #5a6b4f; }

/* Liste des serveurs dans la barre latÃ©rale */
.sidebar-server { gap: 8px; }
.sidebar-server-avatar { position: relative; display: inline-flex; flex: none; }
.sidebar-server-icon { width: 18px; height: 18px; flex: none; object-fit: contain; border-radius: 3px; }
.sidebar-server-avatar .status-dot {
  position: absolute; right: -4px; bottom: -4px;
  border: 2px solid #fff;
}
.status-dot {
  display: inline-block; width: 8px; height: 8px;
  flex: 0 0 8px; aspect-ratio: 1 / 1;
  box-sizing: border-box; border-radius: 50%;
  vertical-align: 1px;
}
.status-online { background: var(--green); }
.status-offline { background: #bbb; }
.status-check { background: #d9a441; }

/* Ã‰lÃ©ments rÃ©servÃ©s aux membres quand on n'est pas connectÃ© */
.side-item.locked { opacity: .45; pointer-events: none; cursor: not-allowed; filter: grayscale(1); }

/* Plus de fond blanc nulle part : juste les barres grises */
.leftbar .side-section {
  background: transparent;
  border: none;
}

.side-title {
  border-radius: 4px 4px 0 0;
  background: #f0f1f2;
  color: #8b9095;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .6px;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
}
.side-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  color: #4a4f54;
  font-size: 12px;
  border-left: 3px solid transparent;
}
.side-item:hover { background: #f6f8fa; text-decoration: none; }
.side-item.active {
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  border-left-color: var(--blue-dark);
}
.side-item.plain { color: var(--blue); font-weight: 600; }
.friends { padding: 4px 10px; font-size: 12px; color: #555; }
.friends-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  letter-spacing: 0;
}
.friends-head .muted { color: #9a9a9a; font-weight: normal; }
.friends-notice {
  background: #eef4ff;
  border: 1px solid #cfe0ff;
  border-radius: 4px;
  padding: 9px 10px;
  margin: 8px 10px 0;
  font-size: 11px;
  color: #2f6fd0;
}
.see-friends {
  display: inline-block;
  margin: 8px 10px 10px;
  font-size: 11px;
}
.online-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #3ac47d;
  margin-right: 5px;
}

/* ---------- Composeur ---------- */
.composer { padding: 8px; }
.composer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: none; /* pas de barre de sÃ©paration */
  flex-wrap: wrap;
}
.composer-link {
  border: none;
  background: none;
  color: #2f6fd0;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.composer-link .ico {
  filter: grayscale(1);
  opacity: .75;
}
.composer-link .bulb-ico,
.composer-link .color-ico {
  filter: none;
  opacity: 1;
}
.composer-link:hover { text-decoration: underline; }
.composer-link.right {
  margin-left: auto;
  color: #2f6fd0;
}
.composer-link.right .ico {
  filter: grayscale(1);
  opacity: .75;
}
.settings-wrap { position: relative; margin-left: auto; }
.settings-wrap .composer-link.right { margin-left: 0; }
.settings-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 8px;
  min-width: 230px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
  padding: 10px 12px;
  z-index: 40;
  /* Animation ouverture/fermeture */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(.97);
  transform-origin: top right;
  transition: opacity .2s ease, transform .2s cubic-bezier(.22,.61,.36,1), visibility .2s;
}
.settings-menu.menu-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.settings-arrow {
  position: absolute;
  top: -6px;
  right: 22px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  border-radius: 2px 0 0 0;
  transform: rotate(45deg);
}
.settings-title {
  font-weight: 700;
  font-size: 12px;
  color: #444;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
}
.settings-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #444;
  white-space: nowrap;
  cursor: pointer;
  padding: 4px 2px;
}
.settings-row:hover { background: #f4f7fb; }
/* Case à cocher : style par défaut du navigateur */
.settings-row input[type="checkbox"] {
  -webkit-appearance: checkbox;
  appearance: checkbox;
  width: auto;
  height: auto;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
}
.icon-only {
  border: none; background: none; cursor: pointer;
  font-size: 16px; line-height: 1;
}
.composer textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 3px;
  margin-top: 8px;
  padding: 8px;
  font-family: inherit;
  font-size: 12px;
  resize: vertical;
}
.composer textarea:focus { outline: 2px solid rgba(59,130,246,.35); outline-offset: 0; }

/* ---------- Post ---------- */
.post-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 10px 6px;
}
.avatar {
  width: 38px; height: 38px;
  border: none;
  border-radius: 4px;
  display: grid; place-items: center;
  font-size: 18px;
  flex: none;
  overflow: hidden;       /* l'image ne dÃ©borde pas */
  background: transparent;
}
.avatar img {
  display: block;
  border: none;
  border-radius: 4px;
  width: 100%; height: 100%;
  object-fit: cover;     /* image bien dimensionnÃ©e dans le carrÃ© */
  object-position: center;
  background: transparent;
  border-radius: 2px;
}
.avatar { position: relative; z-index: 1; overflow: hidden; } /* devant, pas derriÃ¨re */
/* Les avatars avec pastille ne doivent pas la couper */
.avatar:has(.avatar-status-wrap) { overflow: visible; }
.avatar-small { width: 30px; height: 30px; font-size: 14px; }
.avatar-brown { background: transparent; }
.avatar-orange { background: transparent; }
.avatar-green { background: transparent; }
.post-author { flex: 1; }
.author-name { font-size: 14px; font-weight: 600; color: var(--blue); }
.star { color: #f1c40f; }
.dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-left: 3px;
}
.dot.blue { background: #3498db; }
.dot.red { background: #e74c3c; }
.date { color: var(--muted); font-size: 11px; margin-top: 2px; }
.post-menu {
  border: none; background: none; cursor: pointer;
  color: #888; font-size: 14px; padding: 2px 6px;
}
.post-body { padding: 4px 10px 8px; }
.post-body p { margin-bottom: 6px; }
.cover {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border: 1px solid var(--border);
  display: block;
  background: #cfe3ee;
}
.hashtag { color: var(--blue); font-weight: 600; margin-top: 8px !important; }
.album {
  background: #2b2b2b;
  color: #fff;
  padding: 6px 9px;
  font-size: 12px;
  margin-top: 6px;
}
.album a { color: #6fb1ff; }

.post-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  border-top: none; /* pas de barre de sÃ©paration */
  color: #777;
  font-size: 11px;
}
.post-stats-right { display: flex; gap: 14px; }
.post-stats a { color: #666; }
.dislike { color: #999 !important; }

/* ---------- Commentaires ---------- */
.comments { padding: 0 10px 8px; }
.comment { display: flex; gap: 8px; }
.bubble {
  background: none;
  border: none;
  padding: 0;
  display: inline;
  max-width: 100%;
}
.bubble b { color: var(--blue); }
.bubble .comment-author { color: var(--blue); font-weight: 700; }
.comment-meta {
  display: flex;
  gap: 14px;
  padding: 5px 4px 0;
  color: var(--muted);
  font-size: 11px;
}
.like-comment {
  color: var(--blue);
  margin-left: 6px;
  white-space: nowrap;
}
.like-comment .ico { margin-left: 4px; }

.comment-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-top: none; /* pas de double bordure */
  flex-wrap: wrap;
}
.comment-box input,
.comment-input {
  flex: 1;
  min-width: 140px;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 5px !important;
  font-size: 12px;
  background: #fff;
  line-height: 18px;
  outline: none;
  overflow-y: auto;
}
.comment-input:empty::before {
  content: attr(data-placeholder);
  color: #999;
  pointer-events: none;
}
/* Coin de redimensionnement (petit triangle en bas Ã  droite) */
.comment-input {
  position: relative;
}
.comment-input::after {
  content: "";
  position: absolute;
  bottom: 2px; right: 2px;
  width: 12px; height: 12px;
  background: linear-gradient(135deg, transparent 50%, #b9bec4 50%, #b9bec4 60%, transparent 60%, transparent 72%, #b9bec4 72%, #b9bec4 82%, transparent 82%);
  pointer-events: none;
}
.comment-input.locked::after { display: none; }
.comment-input.locked {
  background: #f0f1f2;
  color: #999;
  cursor: not-allowed;
}
.comment-input .msn-emoji { width: 16px; height: 16px; vertical-align: -3px; }
#composer-text { min-height: 72px; }
.composer-emoji-row { justify-content: space-between; margin-top: 6px; flex-wrap: nowrap; align-items: center; gap: 8px; }
.composer-emoji-picks { display: flex; align-items: center; gap: 3px; flex: none; }
.emoji-row { display: flex; align-items: center; gap: 3px; font-size: 15px; }
.emoji-pick { cursor: pointer; }
.emoji-pick:hover { transform: scale(1.18); }
.emoji-static { cursor: default; }
.emoji-static:hover { transform: none; }
.composer-link.inactive {
  pointer-events: none;
  opacity: .6;
  text-decoration: none;
}
.composer-link.inactive:hover { text-decoration: none; }

/* Bouton + et menu d'emojis (composeur) */
.emoji-menu-wrap { position: relative; }
.emoji-plus {
  border: none;
  background: none;
  color: #2f6fd0;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}
.emoji-plus .ico { filter: grayscale(1); opacity: .75; }
.emoji-plus:hover { text-decoration: underline; }

.emoji-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 8px;
  min-width: 230px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
  padding: 10px 12px;
  z-index: 40;
  /* Animation ouverture/fermeture */
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(.97);
  transform-origin: top right;
  transition: opacity .2s ease, transform .2s cubic-bezier(.22,.61,.36,1), visibility .2s;
}
.emoji-menu.menu-open {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.emoji-menu .settings-arrow {
  right: 16px;
}
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}
.emoji-grid .emoji-pick {
  width: 24px;
  height: 24px;
  padding: 2px;
  border-radius: 4px;
}
.emoji-grid .emoji-pick:hover { background: #f0f2f4; }
.plus-btn {
  width: 20px; height: 20px;
  border: none; border-radius: 50%;
  background: var(--red); color: #fff;
  cursor: pointer; font-size: 11px;
}
.reply-btn { margin-left: auto; }
.reply-date {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  margin-left: 2px;
}
.reply-time {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}
/* Squelettes de chargement (cases grises) */
.post-skeleton {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px;
  margin-bottom: 12px;
}
.post-skeleton .sk-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.post-skeleton .sk-avatar {
  width: 38px; height: 38px; border-radius: 3px; flex: none;
  background: #e9ebed;
  animation: skPulse 1.3s ease-in-out infinite;
}
.post-skeleton .sk-lines { display: flex; flex-direction: column; gap: 6px; }
.post-skeleton .sk-line {
  display: block; height: 10px; border-radius: 3px;
  background: #e9ebed;
  animation: skPulse 1.3s ease-in-out infinite;
}
.post-skeleton .sk-name { width: 120px; }
.post-skeleton .sk-date { width: 70px; height: 8px; }
.post-skeleton .sk-text { width: 100%; margin-bottom: 8px; }
.post-skeleton .sk-text.short { width: 75%; }
.post-skeleton .sk-text.tiny { width: 40%; }
@keyframes skPulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* Sentinelle : juste un point d'ancrage invisible pour la pagination */
.feed-sentinel {
  height: 1px;
  margin: 0;
  padding: 0;
}

/* SystÃ¨me d'apparition fluide au scroll (ultra rapide) */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .32s cubic-bezier(.22,.61,.36,1), transform .32s cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Les nouveaux posts apparaissent immÃ©diatement (pas d'attente scroll) */
.new-post { animation: pop .22s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Cartes de la colonne droite : leger arrondi */
.rightbar .card {
  border-radius: 6px !important;
}

/* Carte Bienvenue (colonle droite) */
.quick-links { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.quick-links a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 3px 0;
  background: none;
  border: none;
  border-radius: 0;
  font-weight: 600;
  font-size: 12px;
  color: #3d4a55;
}
.quick-links a:hover { text-decoration: underline; }
.welcome .card-body p { margin-bottom: 8px; color: #555; }

/* ---------- Lightbox pour les images de publication ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,.85);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; cursor: zoom-out;
  opacity: 0; visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: 95vw; max-height: 92vh;
  object-fit: contain;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  cursor: default;
  transform: scale(.85);
  opacity: 0;
  transition: transform .32s cubic-bezier(.22,.61,.36,1), opacity .28s ease;
}
.lightbox.open img { transform: scale(1); opacity: 1; }
.lightbox .lightbox-close {
  position: absolute; top: 14px; right: 18px;
  color: #fff; font-size: 30px; font-weight: 700;
  cursor: pointer; line-height: 1;
  transition: transform .25s ease, opacity .25s ease;
}
.lightbox.open .lightbox-close { animation: lbFadeIn .35s ease .1s both; }
.lightbox-close:hover { transform: rotate(90deg); }
/* Masquer la barre de dÃ©filement quand le lightbox est ouvert */
body.lightbox-open { overflow: hidden; }
.lightbox-download {
  position: absolute; top: 16px; left: 18px;
  background: #f6f6f6 !important;
  color: #333 !important;
  border: 1px solid var(--border) !important;
  border-radius: 5px !important;
  padding: 5px 10px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.28) !important;
  opacity: 1 !important;
}
.lightbox.open .lightbox-download { animation: none !important; }
.lightbox-download:hover { text-decoration: none !important; background: #ededed !important; }
.lightbox-content {
  display: flex; flex-direction: column; align-items: center;
  max-width: 95vw; max-height: 92vh;
}
.lightbox-info {
  margin-top: 10px;
  text-align: center; color: #ddd; font-size: 12px;
  pointer-events: none;
}
.lightbox.open .lightbox-info { animation: lbFadeUp .35s ease .15s both; }
@keyframes lbFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes lbFadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.photo-link { display: inline-block; width: auto; vertical-align: top; margin-right: 6px; }
/* Images en haut (horizontales), texte en dessous */
.post-images {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  margin: 0 0 6px;
}
.post-images .photo-link { display: inline-block; margin-right: 0; flex: none; }
.post-body .post-text { margin: 6px 0 0; }
/* Force la petite taille et supprime le cadre sur TOUTES les images de publication (anciennes comprises) */
.post-body .post-photo,
.post-body .photo-link img {
  max-width: 140px !important;
  max-height: 100px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  border: none !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  display: block;
  margin: 4px 0;
  cursor: zoom-in;
}

/* Zone des images HORS de la case de texte (au-dessus) */
.photo-preview {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  min-height: 0;
  margin: 10px 0 8px; /* espace avec la barre du haut */
}
.photo-preview:empty { display: none; }

/* ===== Composeur : images fixes, bien rangÃ©es, qui ne bougent pas ===== */
.photo-preview .photo-stack {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  margin: 0;
}
.photo-preview .photo-stack .photo-link {
  position: relative;
  display: inline-block;
  flex: none;
  margin-left: 0;
  transition: none;
}
.photo-preview .photo-stack .photo-link:hover { transform: none; }
.photo-preview .photo-stack .photo-link img {
  width: 80px !important;
  height: 80px !important;
  min-width: 80px !important;
  min-height: 80px !important;
  max-width: 80px !important;
  max-height: 80px !important;
  object-fit: cover !important;
  border: none !important;
  border-radius: 4px !important; /* un peu arrondie */
  box-shadow: none !important;
  transform: none !important; /* aucun effet */
  margin: 0 !important;
  display: block !important;
}

/* ===== Publications : images propres, HORIZONTALES ===== */
.post-body .photo-stack {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 6px;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 6px 0;
}
.post-body .photo-stack .photo-link {
  position: relative;
  display: inline-block;
  flex: none;
  margin-left: 0;
  transition: none;
}
.post-body .photo-stack .photo-link:hover { transform: none; }
.post-body .photo-stack .photo-link img {
  width: 80px !important;
  height: 80px !important;
  min-width: 80px !important;
  min-height: 80px !important;
  max-width: 80px !important;
  max-height: 80px !important;
  object-fit: cover !important;
  border: none !important;
  border-radius: 4px !important; /* juste un leger arrondi */
  box-shadow: none !important;
  transform: none !important; /* aucune rotation */
  margin: 0 !important;
  display: block !important;
}
/* Croix au CENTRE de l'image : rouge, sans fond ni pastille */
.photo-remove {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 28px; height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 100;
  font-size: 28px !important;
  line-height: 28px;
  color: #c0272d;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
  opacity: 0; /* invisible au repos */
  transition: opacity .15s ease;
}
/* ApparaÃ®t au survol de l'image */
.photo-link:hover .photo-remove,
.photo-remove:hover { opacity: 1; }
.photo-remove:hover { color: #e0323a; }
/* LÃ©ger assombrissement de l'image au survol */
.photo-link:hover img {
  filter: brightness(.75);
  transition: filter .15s ease;
}

/* ---------- Texte bas a droite, sans element separe ---------- */
.bottom-foot {
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  padding: 10px 0 0;
}

/* ---------- Colonne droite ---------- */
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 9px;
  background: #f0f1f2;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 12px;
}
.card-head.blue { background: #f0f1f2; color: var(--text); border-bottom-color: var(--border); }
.mini-link {
  border: none; background: #5bc0de; color: #fff;
  padding: 2px 6px; border-radius: 3px;
  font-size: 10px; cursor: pointer;
}
.card-body { padding: 10px; font-size: 12px; }
/* Lien @SocialCraft en bleu (Ã©crase .quick-links a) */
.quick-links a.at-socialcraft { color: var(--blue); font-weight: 600; }
.quick-links a.at-socialcraft:hover { text-decoration: underline; }

/* Animation fermeture / ouverture annonce : fluide, sans rebond */
.annonce-close-anim {
  max-height: 600px;
  opacity: 1;
  overflow: hidden;
  transition: max-height .28s ease, opacity .22s ease, padding .28s ease;
}
.annonce-close-anim.annonce-collapsed {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}
/* Quand fermÃ©e : toute la carte est une simple barre grise, pas de rondeur qui dÃ©passe */
.annonce.is-closed {
  border-radius: 4px !important;
  background: #f0f1f2;
}
.annonce.is-closed .card-head { display: none; }
/* Barre grise "Ouvrir" */
.annonce-open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f0f1f2;
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 700;
  color: #8b9095;
}
.annonce-open.hidden { display: none; }
.annonce-open .btn { font-size: 11px; padding: 3px 9px; }

.annonce-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.annonce-head > div:nth-child(2) { flex: 1; }
.annonce-title { font-weight: 700; font-size: 13px; }
.annonce-text p { margin-bottom: 8px; color: #444; }
.rss-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-weight: 600;
  font-size: 12px;
  margin: 2px 4px;
}
.rss-link:hover { text-decoration: underline; }

/* ---------- Elements listes : arrondi discret ---------- */
.card,
.btn,
.top-btn,
.avatar,
.album,
.cover,
.bubble {
  border-radius: 4px !important;
}

/* ---------- Zones de saisie : arrondies ---------- */
input,
textarea {
  border-radius: 8px !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
}
.composer textarea {
  border-radius: 4px !important;
}

/* ---------- IcÃ´ne Ã  l'intÃ©rieur d'un champ ---------- */
.input-wrap {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}
.input-wrap .ico-in {
  position: absolute;
  left: 10px;
  width: 16px;
  height: 16px;
  opacity: .55;
  pointer-events: none;
}
.input-wrap input {
  padding-left: 34px !important;
}
.composer textarea:focus,
.comment-input:focus,
.comment-box input:focus {
  outline: none;
  border-color: var(--blue) !important;
  box-shadow: none; /* bordure bleue simple, sans effet */
}
.login-card input:focus,
#global-search:focus {
  outline: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .layout { grid-template-columns: 160px minmax(0, 1fr); }
  .rightbar { grid-column: 1 / -1; }
  .search-bar { width: 40vw; }
}
@media (max-width: 700px) {
  .layout { grid-template-columns: 1fr; }
  .leftbar { display: none; }
  .top-actions .top-btn span { display: none; }
  .site-name { font-size: 16px; }
  .search-bar { width: 45vw; }
  .search-menu { display: none; }
}
/* Plus de case blanche sous les barres grises des onglets (sauf le composeur) */
.tab-panel > .card:not(.composer) { background: transparent; border: none; box-shadow: none; }
.tab-panel > .card:not(.composer) .card-body { background: transparent; }

/* Cercle de progression des badges (colonne de droite) */
.badge-progress {
  margin: 8px 0 0;
  padding: 12px 10px;
  background: #eef4ff;
  border: 1px solid #cfe0ff;
  border-radius: 4px;
  text-align: center;
}
.badge-progress-ring {
  --progress: 0;
  width: 118px; height: 118px;
  margin: 4px auto 12px;
  border-radius: 50%;
  background: conic-gradient(var(--blue) calc(var(--progress) * 1%), #e4e7ea 0);
  display: grid; place-items: center;
  transition: background .6s ease;
}
.badge-progress-inner {
  width: 94px; height: 94px;
  border-radius: 50%;
  background: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
}
.badge-progress-inner b { font-size: 14px; color: var(--text); }
.badge-progress-inner span { font-size: 10px; color: var(--muted); }
.badge-progress p { font-size: 11px; line-height: 1.5; color: var(--muted); }

/* Textes de la section Badges */
.badges-intro {
  margin: 0; padding: 10px 10px 2px;
  font-size: 11px; line-height: 1.5; color: var(--muted);
}
.badges-top-hint {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 10px;
  background: #f5efe0;
  border: 1px solid #e0d3a8;
  border-radius: 4px;
  font-size: 12px; font-weight: 600; color: #2f6fd0;
}
.badges-top-hint img { width: 28px; height: 28px; object-fit: contain; flex: none; }
.badges-top-hint .hint-star,
.badges-top-hint .hint-party { width: 16px; height: 16px; vertical-align: -3px; }

/* Badges dÃ©bloquÃ©s par actions */
.badges-list { display: flex; flex-direction: column; gap: 12px; }
.badge-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  background: #f4f5f6;
  border: 1px solid var(--border);
  border-radius: 4px;
  opacity: .6;
}
.badge-item.unlocked { opacity: 1; background: #f4f8f1; border-color: #d8e8cd; }
.badge-item img { width: 38px; height: 38px; flex: none; object-fit: contain; }
.badge-item:not(.unlocked) img { filter: grayscale(1); }
.badge-item > div { flex: 1; min-width: 0; font-size: 11px; line-height: 1.5; color: var(--muted); }
.badge-item b { font-size: 13px; color: var(--text); }
.badge-item.unlocked b { color: var(--green); }
.badge-state {
  flex: none; padding: 2px 7px; border-radius: 3px;
  background: #e8eaec; color: #888; font-size: 10px; font-weight: 700;
}
.badge-item.unlocked .badge-state { background: #dff0d3; color: var(--green); }
.badge-todo {
  display: block;
  width: fit-content;
  margin-top: 3px;
  padding: 1px 6px;
  border-radius: 3px;
  background: #fff3dc;
  color: #b26a00;
  font-size: 10px;
  font-weight: 700;
}
/* Case verte remplie selon l'avancement (Achievements non débloqués) */
.badge-progress-box {
  flex: none;
  display: inline-block;
  width: 30px;
  height: 18px;
  background: #e8eaec;
  border: 1px solid var(--border);
  border-radius: 3px;
  overflow: hidden;
  box-sizing: border-box;
}
.badge-progress-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7cb342, #5a9e2f);
  transition: width .4s ease;
}

/* ============================================================
   Onglet MÃ©dias
   ============================================================ */
.medias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.media-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 0;
  background: #e8eaec;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
}
.media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-thumb:hover { border-color: var(--blue); }

/* ============================================================
   Onglet Biographie
   ============================================================ */
/* Aucune publication */
.no-posts {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 24px 20px;
  background: transparent;
  border: none;
}
.no-posts-icon {
  width: 36px; height: 36px; flex: none;
  object-fit: contain;
  image-rendering: pixelated;
}
.no-posts-title {
  font-size: 13px; font-weight: 700; color: #444;
  margin-bottom: 5px;
}
.no-posts-text {
  font-size: 12px; line-height: 1.65; color: #7a7f84;
  max-width: 560px;
}

.bio-section { margin-bottom: 12px; }
.bio-body {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 4px 4px;
  background: transparent;
}
.bio-icon {
  width: 34px; height: 34px; flex: none;
  object-fit: contain;
  image-rendering: pixelated;
}
.bio-body p {
  flex: 1; min-width: 0;
  margin: 0;
  font-size: 12px; line-height: 1.65; color: #555;
  white-space: pre-wrap;
}
.edit-textarea {
  resize: vertical;
  min-height: 84px;
  line-height: 1.5;
  font-family: inherit;
}

/* ============================================================
   Mods / Shaders
   ============================================================ */
.mods-section .side-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mods-search-wrap { display: flex; gap: 8px; margin-bottom: 12px; }
.mods-search-wrap .edit-input { flex: 1; min-width: 0; }
.mods-type-select {
  flex: none;
  padding: 9px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f6f7f8;
  color: #444;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.mods-api-credit { font-size: 10px; color: #a0a5aa; margin: 6px 0 14px; }
.mods-api-credit a { color: var(--blue); }
.mods-loading { padding: 10px; font-size: 11px; color: var(--muted); }
.mods-suggestion-icon { width: 28px; height: 28px; flex: none; object-fit: cover; border-radius: 4px; }
.mods-suggestions {
  border: 1px solid var(--border);
  border-radius: 4px;
  margin: -6px 0 12px;
  background: #fff;
  overflow: hidden;
}
.mods-suggestion {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 8px 10px;
  background: none; border: none;
  border-bottom: 1px solid #eef0f1;
  text-align: left; cursor: pointer;
  font-size: 12px; color: var(--text);
}
.mods-suggestion:last-child { border-bottom: none; }
.mods-suggestion:hover { background: #f2f6ff; }
.mods-suggestion > span { flex: 1; min-width: 0; }
.mods-suggestion small { color: var(--muted); font-size: 11px; }
.mods-empty {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 16px 4px 4px;
}
.mods-icon {
  width: 38px; height: 38px; flex: none;
  object-fit: contain; image-rendering: pixelated;
}
.mods-empty-title { font-size: 13px; font-weight: 700; color: #444; margin-bottom: 5px; }
.mods-empty-text { font-size: 12px; line-height: 1.65; color: #7a7f84; max-width: 620px; }
.mods-list { display: flex; flex-direction: column; gap: 8px; }
.mods-item {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px;
  background: #f4f5f6;
  border-radius: 4px;
}
.mods-item-top { display: flex; align-items: flex-start; gap: 16px; }
.mods-actions { display: flex; gap: 8px; justify-content: flex-end; }
.mods-actions .btn.mini { padding: 9px 18px; font-size: 12px; }
.mods-item-icon {
  width: 48px; height: 48px; flex: none;
  background: #fff; border: 1px solid var(--border);
  border-radius: 4px;
  display: grid; place-items: center;
  overflow: hidden;
}
.mods-item-icon img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.mods-item-letter { font-size: 15px; font-weight: 700; color: var(--blue); }
.mods-item-info { flex: 1; min-width: 0; }
.mods-item-name { display: block; font-size: 13px; font-weight: 700; color: var(--blue); text-decoration: none; }
.mods-item-name:hover { text-decoration: underline; }
.mods-item-desc { font-size: 11px; color: var(--muted); line-height: 1.5; }
.mods-translated-badge {
  margin-left: 6px; padding: 1px 5px;
  background: #eef4ff; border: 1px solid #cfe0ff; border-radius: 3px;
  color: #2f6fd0; font-size: 10px; font-weight: 600;
}
.mods-original { margin-top: 3px; font-size: 11px; font-style: italic; color: #9aa0a6; }
.mods-translate-link {
  background: none; border: none; padding: 0;
  color: var(--blue); font-size: 11px; font-weight: 600; cursor: pointer;
}
.mods-translate-link:hover { text-decoration: underline; }

/* ============================================================
   Serveurs Minecraft (Java) â€” Falix / Aternos
   ============================================================ */
/* Section serveurs : on garde la barre grise, mais pas de fond blanc ni de cadre */
.server-section { background: transparent; border: none; box-shadow: none; padding: 0; }
.server-section .card-body { background: transparent; padding: 8px 0 0; }
.server-section .side-title {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border-radius: 4px 4px 0 0;
}
.btn.mini { padding: 3px 8px; font-size: 11px; line-height: 1.4; }
.servers-list { display: flex; flex-direction: column; gap: 8px; }
.server-card {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}
.server-card:last-child { border-bottom: none; }

/* Publications chargÃ©es directement dans .profile-feed : masquÃ©es hors de l'onglet Posts */
.profile-feed.hides-posts > .post,
.profile-feed.hides-posts > .post-skeleton,
.profile-feed.hides-posts > .feed-sentinel,
.profile-feed.hides-posts > #no-posts,
.profile-feed.hides-posts > #feed-end { display: none; }
.server-icon {
  width: 54px; height: 54px; flex: none;
  background: #dfe2e5; border-radius: 4px;
  overflow: hidden;
}
.server-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.server-info { flex: 1; min-width: 0; }
.server-name-row { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.server-name { font-size: 14px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server-translate-link {
  background: none; border: none; padding: 0;
  color: var(--blue); font-size: 11px; font-weight: 600;
  cursor: pointer; white-space: nowrap; flex: none;
}
.server-translate-link:hover { text-decoration: underline; }
.server-translate-link:disabled { opacity: .6; cursor: wait; }
.server-translated-badge {
  flex: none; white-space: nowrap;
  padding: 1px 5px;
  background: #eef4ff; border: 1px solid #cfe0ff; border-radius: 3px;
  color: #2f6fd0; font-size: 10px; font-weight: 600;
}
.server-original {
  margin-top: 2px;
  font-size: 11px; font-style: italic; color: #999;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn-close-server { color: #c0392b; }
.btn-close-server:hover { background: #fdecea; }
.server-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.server-provider-tag {
  display: inline-block; padding: 1px 5px;
  border-radius: 3px; font-size: 10px; font-weight: 700;
}
.server-provider-tag.aternos { background: #1a7f37; color: #fff; }
.server-provider-tag.falix { background: #7a4fd0; color: #fff; }
.server-status { margin-top: 4px; font-size: 12px; color: var(--muted); }
.server-actions .btn { padding: 6px 11px; font-size: 12px; }
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  flex: 0 0 8px;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: 1px;
}
.status-online { background: var(--green); }
.status-offline { background: #bbb; }
.status-check { background: #d9a441; }
.server-actions { display: flex; gap: 5px; flex: none; }
.server-hint { font-size: 11px; color: var(--muted); line-height: 1.45; margin: 8px 0 2px; }

/* Popup ajout de serveur */
.server-box { width: min(460px, 100%); }
.server-provider-row { display: flex; gap: 8px; }
.server-provider {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #f6f7f8;
  font-size: 12px; font-weight: 600;
  cursor: pointer;
}
.server-provider img { width: 16px; height: 16px; object-fit: contain; }
.server-provider:has(input:checked) { border-color: var(--blue); background: #eaf2ff; }
.server-image-preview {
  width: 40px; height: 40px; flex: none;
  object-fit: cover; border-radius: 4px;
  border: 1px solid var(--border);
  background: #dfe2e5;
}

/* Message Ã©phÃ©mÃ¨re (copie d'adresse / Minecraft indisponible) */
.server-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(15px);
  z-index: 1200;
  max-width: min(520px, calc(100vw - 30px));
  padding: 11px 16px;
  background: #2a2a2a; color: #fff;
  border: 1px solid #444; border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 12px; line-height: 1.45; text-align: center;
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.server-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.server-toast .toast-icon { width: 18px; height: 18px; object-fit: contain; flex: none; }

/* Popup dÃ©tails serveur */
#server-info-modal .confirm-box { width: min(480px, 100%); }
.server-info-body p { margin: 0 0 9px; font-size: 12px; line-height: 1.5; color: #444; }
.server-info-body p b { color: var(--text); }
.server-info-explain {
  margin-top: 14px !important;
  padding: 10px;
  background: #eef4ff;
  border: 1px solid #cfe0ff;
  border-radius: 4px;
  color: #2f6fd0 !important;
}

@media (max-width: 560px) {
  .server-card { flex-wrap: wrap; }
  .server-actions { width: 100%; }
  .server-actions .btn { flex: 1; }
}
/* ============================================================
   profil.html â€” page profil faÃ§on rÃ©seau social (capture)
   ============================================================ */

.profile-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 235px;
  gap: 12px;
  max-width: 1300px;
  margin: 14px auto;
  padding: 0 12px;
  align-items: start;
}
.profile-main { min-width: 0; }

/* ---------- Couverture ---------- */
.profile-cover {
  background: #2a2a2a;
  border: 1px solid var(--border);
  border-radius: 0;
  margin-bottom: 24px;
  padding-bottom: 40px; /* place pour la barre d'onglets en absolute */
}
.cover-notice {
  background: #e3edff;
  border-bottom: 1px solid #e8d98a;
  padding: 7px 12px;
  font-size: 12px;
  color: #2f6fd0;
}
.cover-photo {
  display: block;
  width: 100%;
  height: 320px;
  object-fit: cover;
  object-position: 60% center;
}
.profile-identity {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 0 14px 12px 18px;
  margin-top: -105px;
  position: relative;
  min-height: 96px;
}
.profile-avatar {
  width: 80px;
  height: 80px;
  background: transparent; /* pas de fond blanc sous les PNG */
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  flex: none;
  margin-bottom: -28px;
  position: relative;
  z-index: 10; /* devant la barre d'onglets */
}
.profile-avatar img { width: 100%; height: 100%; object-fit: contain; background: transparent; display: block; }
.profile-avatar:has(.avatar-status-wrap) { overflow: visible; }
/* Le wrapper ne doit pas Ã©craser la taille de l'avatar par dÃ©faut */
.profile-avatar .avatar-status-wrap { display: block; width: 100%; height: 100%; }
.profile-name {
  flex: 1;
  align-self: center; /* centré en hauteur par rapport aux boutons */
  font-size: 26px;
  font-weight: 400;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
}
.profile-name-badge {
  height: 22px;
  width: auto;
  max-width: 130px;
  margin-left: 8px;
  vertical-align: middle;
  object-fit: contain;
}
/* Bouton Modifier en haut Ã  gauche de la banniÃ¨re */
.profile-cover { position: relative; }
.profile-edit-top {
  position: absolute;
  top: 10px; left: 10px;
  z-index: 10;
}
.profile-edit-top .btn { opacity: .6; cursor: not-allowed; }
/* Boutons Voir banniÃ¨re / Voir photo en haut Ã  droite */
.profile-view-top {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 10;
  display: flex;
  gap: 5px;
}
.profile-view-top .btn { cursor: pointer; }

/* ===== Popup Modifier le profil ===== */
/* EmpÃªche le scroll pendant la popup SANS dÃ©caler l'interface */
body.modal-open,
body.logout-open,
body.dialog-open {
  overflow: hidden;
  padding-right: var(--sbw, 0px); /* compense la largeur de la scrollbar */
}
.edit-modal {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,.65);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.edit-modal.hidden { display: none; }
.edit-modal:not(.hidden) { animation: modalFadeIn .2s ease; }
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
/* Animation de fermeture */
.edit-modal.closing { animation: modalFadeOut .2s ease forwards; }
.edit-modal.closing .edit-box { animation: boxPopOut .2s ease forwards; }
@keyframes modalFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes boxPopOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: scale(.96) translateY(8px); } }
.edit-box {
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px; /* moins arrondie */
  padding: 24px;
  width: min(620px, 100%); /* popup plus grosse */
  max-height: 94vh; overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0,0,0,.3);
  transform-origin: center;
  animation: boxPopIn .22s cubic-bezier(.22,.61,.36,1);
}
@keyframes boxPopIn {
  from { opacity: 0; transform: scale(.94) translateY(10px); }
  to { opacity: 1; transform: none; }
}
.edit-close {
  position: absolute; top: 10px; right: 10px;
  width: 28px; height: 28px;
  background: none; border: none;
  border-radius: 5px; /* carrÃ© un peu arrondi */
  cursor: pointer; color: #888;
  font-size: 22px; line-height: 28px;
  text-align: center;
}
.edit-close:hover { color: #555; background: rgba(128,128,128,.18); } /* gris doux transparent au survol */

/* AperÃ§u du profil : COPIE EXACTE de la vraie page profil */
.edit-profile-preview {
  position: relative;
  background: #fff;
  border: none;                 /* pas de bordure */
  border-radius: 6px;           /* arrondi en haut et en bas */
  margin-bottom: 18px;
  overflow: hidden;
}
.edit-banner-img {
  display: block; width: 100%; height: 220px;
  object-fit: cover;
  object-position: 60% center;
  border-radius: 6px 6px 0 0; /* banniÃ¨re un peu arrondie en haut */
}
.edit-profile-identity {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 0 14px 12px 55px;
  margin-top: -110px;   /* comme la vraie page */
  position: relative;
  z-index: 8;
  min-height: 96px;
}
.edit-profile-avatar {
  width: 96px; height: 96px;         /* comme .profile-avatar */
  background: transparent;           /* pas de fond blanc sous les PNG */
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  flex: none;
  margin-bottom: -30px;
  position: relative; z-index: 8;
  border-radius: 6px;
  overflow: hidden;
}
.edit-profile-avatar img {
  width: 100%; height: 100%;
  object-fit: contain;               /* PNG transparent conservÃ© */
  background: transparent;           /* pas de fond blanc */
  display: block;
}
.edit-pseudo-preview {
  flex: 1;
  padding-bottom: 8px;
  color: #fff;                       /* pseudo blanc comme la page */
  font-size: 26px; font-weight: 400;
  text-shadow: 0 1px 3px rgba(0,0,0,.55);
}
.edit-profile-tabs {
  background: linear-gradient(rgba(18,18,18,.78), rgba(18,18,18,.78)),
              url('assets/profile-cover.jpg') 60% bottom / cover no-repeat;
  border-top: 1px solid rgba(255,255,255,.05);
  height: 38px;
  position: relative; z-index: 6;
}
.edit-box h2 { font-size: 18px; margin-bottom: 18px; color: var(--text); }
.edit-label {
  display: block; font-size: 12px; font-weight: 600;
  color: #444; margin: 14px 0 5px;
}
.edit-input {
  width: 100%; padding: 9px;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; box-sizing: border-box;
}
.edit-change-row { display: flex; gap: 8px; margin-top: 12px; }
.edit-change {
  border: 1px solid var(--border); background: #f2f3f4;
  color: #2f6fd0; font-size: 11px; font-weight: 600;
  padding: 5px 9px; border-radius: 4px; cursor: pointer;
}
.edit-change:hover { background: #e6e8ea; }
.edit-actions {
  display: flex; justify-content: flex-end; gap: 8px;
  margin-top: 22px; padding-top: 16px;
  border-top: 1px solid var(--border);
}
.edit-cancel { background: #f0f1f2; color: #555; }
.edit-cancel:hover { background: #e2e4e6; }
.edit-save { min-width: 100px; }
/* Bouton Voir aperÃ§u : grisÃ© par dÃ©faut, actif aprÃ¨s modification */
.edit-preview-btn { background: #f0f1f2; color: #888; }
.edit-preview-btn:disabled { opacity: .6; cursor: not-allowed; }
.edit-preview-btn:not(:disabled) { background: #2f6fd0; color: #fff; cursor: pointer; }
.edit-preview-btn:not(:disabled):hover { background: #2a63bd; }
.preview-box { width: min(620px, 100%); }
.profile-actions { display: flex; gap: 5px; padding-bottom: 10px; }
.profile-actions .btn:hover { background: #e6e9ec; }

.profile-tabs {
  display: flex;
  justify-content: flex-end;
  background: #2a2a2a;
  border-top: none;
  position: absolute;
  left: 0; right: 0; bottom: 0; /* pleine largeur, en bas de la cover */
  z-index: 6;
}
.profile-tabs a {
  padding: 10px 20px;
  color: #d8d8d8;
  font-size: 12px;
  font-weight: 600;
  transition: background .18s ease, color .18s ease, transform .1s ease;
}
.profile-tabs a.active {
  background: var(--blue);
  color: #fff;
  border-radius: 0;
  box-shadow: inset 0 -3px 0 rgba(255,255,255,.35);
}
/* Survol : bleu doux et discret */
.profile-tabs a:hover { text-decoration: none; background: rgba(59,130,246,.28); color: #fff; }
.profile-tabs a.active:hover { background: var(--blue); }
/* Effet au clic : léger enfoncement */
.profile-tabs a:active { transform: translateY(1px); background: rgba(59,130,246,.45); }
.profile-tabs a.active:active { background: var(--blue-dark); }
.profile-tabs b { color: #fff; margin-left: 3px; }

/* ---------- Colonnes du profil ---------- */
.profile-columns {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.profile-left .card { margin-bottom: 12px; }

.profile-feed .composer textarea { border-radius: 4px !important; }
.profile-feed .post-body p { margin-bottom: 8px; }

/* ---------- Colonne droite ---------- */
.profile-right .card { margin-bottom: 12px; }
.activity { font-size: 11px; margin-bottom: 12px; }
.activity-row {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  padding: 2px 0;
  border-bottom: 1px solid #e3e6e9;
}
.activity-row span { color: #999; white-space: nowrap; }
.contact-row, .conv-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 9px !important;
  border-bottom: 1px solid #eee;
}
.conv-row { flex-wrap: wrap; }
.conv-row span { color: #888; font-size: 10px; width: 100%; padding-left: 38px; }
.profile-search { display: flex; gap: 6px; padding: 8px; }
.profile-search input { flex: 1; min-width: 0; padding: 5px 7px; border: 1px solid var(--border); }
.profile-search .btn { padding: 3px 8px; }

/* ---------- Colonnes simplifiees : titres gris + cases de message ---------- */
.plain-section { margin-bottom: 12px; }
.profile-left .friends-notice,
.profile-right .friends-notice { margin: 8px 0 0; }
.rank-obtained {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 0 0;
  padding: 9px 10px;
  background: #e3edff;
  border: 1px solid #bcd4ff;
  border-radius: 4px;
  color: #2f6fd0;
  font-size: 12px;
}
.rank-obtained-list { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 7px; }
.emerald-bar {
  display: flex;
  align-items: center;
  margin-top: 8px;
  gap: 8px;
  padding: 9px 10px;
  background: #eef4ff;
  border: 1px solid #cfe0ff;
  border-radius: 4px;
  font-size: 12px;
  color: #2f6fd0;
}
.emerald-bar img { width: 22px; height: 22px; object-fit: contain; flex: none; }
.emerald-bar b { margin-left: auto; font-size: 13px; color: #2f7d3a; }
.emerald-info-btn { margin-left: 2px; }
.emerald-info-btn img { width: 14px; height: 14px; }

/* Bouton MarchÃ© */
.shop-tools { margin-top: 8px; }
.shop-open-btn { display: flex; width: 100%; margin: 0 0 8px; }

/* popup MarchÃ© du villageois */
.shop-box { width: min(420px, 100%); }
.shop-title-icon {
  height: 30px;
  width: auto;
  max-width: 45px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 8px;
}
.shop-subtitle { font-size: 12px !important; color: var(--muted) !important; margin-bottom: 12px !important; }
.shop-item {
  padding: 12px;
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 4px;
}
.shop-item.owned { background: #f4f8f1; border-color: #d8e8cd; }
.shop-item-head { display: flex; align-items: center; gap: 10px; }
.shop-item-icon {
  display: grid; place-items: center;
  width: 38px; height: 38px; flex: none;
  background: #eef4ff; border: 1px solid #cfe0ff; border-radius: 4px;
  font-size: 20px;
}
.shop-item-icon img { width: 24px; height: 24px; object-fit: contain; }
.shop-item-title { display: flex; flex-direction: column; gap: 2px; }
.shop-item-title b { font-size: 13px; color: var(--text); }
.shop-item-title span { font-size: 11px; color: var(--muted); }
.shop-item-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 12px;
}
.shop-price { display: flex; align-items: center; gap: 5px; }
.shop-price img { width: 18px; height: 18px; object-fit: contain; }
.shop-price b { font-size: 14px; color: #2f7d3a; }
.shop-price s { font-size: 11px; color: #999; }
.shop-discount {
  padding: 1px 5px; border-radius: 3px;
  background: #dff0d3; color: var(--green);
  font-size: 10px; font-weight: 700;
}
.shop-reason { margin-top: 8px; font-size: 11px; color: #b26a00; font-weight: 600; }
.shop-note { margin: 12px 0 0 !important; font-size: 10px !important; color: #999 !important; }

/* Outil achetÃ© : sous la barre grise, dans la colonne droite */
.shop-owned-title { border-radius: 4px; margin-top: 0; }
.shop-owned-side {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  width: 100%; margin-top: 8px; padding: 9px 10px;
  background: #f4f5f6; border: 1px solid var(--border); border-radius: 4px;
  color: #2f6fd0; text-align: left; cursor: pointer;
}
.shop-owned-side img { width: 26px; height: 26px; object-fit: contain; flex: none; }
.shop-owned-side span { display: flex; flex-direction: column; gap: 2px; }
.shop-owned-side b { font-size: 12px; }
.shop-owned-side small { font-size: 10px; color: #8b9095; }
.shop-owned-side::after {
  content: attr(data-tip);
  position: absolute; top: calc(100% + 5px); right: 0;
  z-index: 10; width: max-content; max-width: 200px;
  padding: 6px 8px; border-radius: 4px;
  background: #5a6066; color: #fff;
  font-size: 10px; font-weight: 400; line-height: 1.4;
  opacity: 0; pointer-events: none; transition: opacity .12s;
}
.shop-owned-side:hover::after { opacity: 1; }

/* Pastilles de couleur */
.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.color-swatch {
  width: 26px; height: 26px; border-radius: 50%; cursor: pointer;
  border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border);
  padding: 0;
}
.color-swatch:hover { transform: scale(1.08); }
.color-swatch.active { box-shadow: 0 0 0 2px #3b82f6; }
.sw-rouge { background: #ff6b6b; }
.sw-bleu { background: #6bb8ff; }
.sw-vert { background: #5ddb8a; }
.sw-blanc { background: #fff; }
.shop-reset-line { margin: 4px 0 0 !important; }
.btn.owned {
  background: #e8eaec !important;
  color: #888 !important;
  border: 1px solid #d0d4d8 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
}

/* Couleurs du pseudo (marchÃ©) */
.pseudo-rouge { color: #ff6b6b !important; text-shadow: 0 0 8px rgba(255, 107, 107, .5) !important; }
.pseudo-bleu  { color: #6bb8ff !important; text-shadow: 0 0 8px rgba(107, 184, 255, .5) !important; }
.pseudo-vert  { color: #5ddb8a !important; text-shadow: 0 0 8px rgba(93, 219, 138, .55) !important; }
.pseudo-blanc { color: #fff !important; text-shadow: 0 1px 3px rgba(0, 0, 0, .55) !important; }
.rank-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(47, 111, 208, .25);
}
.rank-item:last-child { padding-bottom: 0; border-bottom: none; }
.rank-item img {
  height: 26px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
  flex: none;
}
.rank-item b { font-size: 12px; font-weight: 700; color: #2f6fd0; }
.rank-item.rank-current b { color: #2f6fd0; }
#rank-info-title { color: #2f6fd0; }
.rank-next-line b { color: #8b9095; }
.rank-info-title-icon {
  height: 28px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 6px;
}
.rank-next-line img {
  height: 22px;
  width: auto;
  max-width: 100px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 6px;
}
.rank-info-btn {
  position: relative;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}
.rank-info-btn img { width: 14px; height: 14px; }
.rank-info-btn:hover { background: #d9dde0; }
.rank-info-btn::after {
  content: attr(data-tip);
  position: absolute;
  top: 24px;
  right: 0;
  z-index: 10;
  width: max-content;
  max-width: 190px;
  padding: 6px 8px;
  border-radius: 4px;
  background: #5a6066;
  color: #fff;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s;
}
.rank-info-btn:hover::after { opacity: 1; }
.info-blue {
  background: #eef4ff;
  border-color: #cfe0ff;
  color: #2f6fd0;
  font-weight: 600;
}

/* ---------- Leger arrondi general ---------- */
.profile-cover,
.cover-photo,
.profile-tabs {
  border-radius: 4px;
}
/* PDP carrée arrondie (sans bordure) */
.profile-avatar,
.profile-avatar img {
  border-radius: 4px !important;
}
.profile-avatar { border: none; }
.profile-avatar img { border: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .profile-wrap { grid-template-columns: 1fr; }
  .profile-right { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
  .profile-right .card { margin-bottom: 0; }
}
@media (max-width: 760px) {
  .profile-columns { grid-template-columns: 1fr; }
  .profile-name { font-size: 18px; }
  .profile-avatar { width: 84px; height: 84px; }
  .profile-tabs a { padding: 9px 14px; }
}
/* ============================================================
   messagerie.css â€” page Messagerie SocialCraft
   ============================================================ */
/* Mise en page 3 colonnes : barre gauche / messagerie / barre droite */
.msg-layout {
  position: fixed;
  top: 50px; left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: min(1200px, 100%);
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 12px;
  align-items: stretch;
  overflow: hidden;
  background: var(--bg);
}
/* Barre latÃ©rale de la messagerie : dÃ©filement natif, sans style personnalisÃ© */
.msg-layout > .leftbar {
  max-height: 100%;
  overflow-y: auto;
}

.msg-wrap {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  height: 100%;
  min-height: 0;
  align-items: stretch;
}
@media (max-width: 760px) {
  .msg-layout { grid-template-columns: 1fr; }
  .msg-layout > .leftbar { display: none; }
  .msg-wrap { grid-template-columns: 1fr; }
  .msg-sidebar { max-height: 260px; }
}

/* ---------- Colonne gauche ---------- */
.msg-sidebar {
  background: transparent;
  border: none;
  overflow: hidden;
}
.msg-sidebar .side-title .ico { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.msg-search-wrap { padding: 10px; }
.msg-search {
  width: 100%; padding: 8px 9px;
  border: 1px solid var(--border); border-radius: 4px;
  font-size: 12px; box-sizing: border-box;
}
.msg-search-results {
  border-top: 1px solid var(--border);
  max-height: 250px; overflow-y: auto;
}
.msg-result {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 8px 10px;
  background: none; border: none; border-bottom: 1px solid #eef0f1;
  text-align: left; cursor: pointer; font-size: 12px; color: var(--text);
}
.msg-result:hover { background: #f2f6ff; }
.msg-result img { width: 28px; height: 28px; object-fit: cover; border-radius: 3px; flex: none; }
.msg-result span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-noresult { padding: 10px; font-size: 11px; color: var(--muted); }

.msg-contacts { max-height: 520px; overflow-y: auto; }
.msg-contact {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 9px 10px;
  background: none; border: none; border-bottom: 1px solid #eef0f1;
  text-align: left; cursor: pointer; color: var(--text);
}
.msg-contact:hover { background: #f4f5f6; }
.msg-contact.active { background: #e9f2ff; }
.msg-contact img { width: 34px; height: 34px; object-fit: cover; border-radius: 4px; flex: none; }
.msg-contact-info { flex: 1; min-width: 0; }
.msg-contact-name { display: block; font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-contact-last { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Zone de conversation ---------- */
.msg-main {
  background: transparent;
  border: none;
  min-height: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.msg-empty {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 30px; text-align: left;
}
.msg-empty img { width: 48px; height: 48px; object-fit: contain; opacity: .6; }
.msg-empty-title { font-size: 14px; font-weight: 700; color: #555; margin-bottom: 5px; }
.msg-empty p { font-size: 12px; line-height: 1.5; color: var(--muted); max-width: 320px; }

.msg-chat { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.msg-chat-head {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  background: transparent;
}
.msg-chat-head img { width: 32px; height: 32px; object-fit: cover; border-radius: 4px; }
.msg-contact-name { font-weight: 700; font-size: 13px; color: var(--blue); text-decoration: none; }
.msg-contact-name:hover { text-decoration: underline; }

.msg-messages {
  flex: 1; overflow-y: auto;
  padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  background: #fff;
}
/* Le premier message pousse toute la conversation vers le bas */
.msg-bubble-wrap:first-child { margin-top: auto; }
.msg-bubble-wrap { display: flex; }
.msg-bubble-wrap.mine { justify-content: flex-end; }
.msg-bubble {
  max-width: 72%;
  padding: 9px 13px;
  border-radius: 16px 16px 16px 5px; /* petite queue en bas Ã  gauche */
  background: #e9eaed;
  color: #2f2f2f;
  border: none;
  font-size: 12px; line-height: 1.5;
  word-break: break-word;
}
.msg-bubble.mine {
  background: #1e9bf0;
  color: #fff;
  border-radius: 16px 16px 5px 16px; /* queue en bas Ã  droite */
}
.msg-bubble img { display: block; max-width: 100%; max-height: 220px; border-radius: 6px; margin-top: 5px; cursor: zoom-in; }
.msg-time { display: block; margin-top: 4px; font-size: 10px; color: var(--muted); text-align: right; }
.msg-bubble.mine .msg-time { color: rgba(255,255,255,.82); }

/* Indicateur "en train d'Ã©crire" â€” espace rÃ©servÃ© en bas */
.msg-typing {
  display: flex; align-items: center; gap: 8px;
  min-height: 32px;
  padding: 2px 14px;
  background: #fff;
  font-size: 11px; color: var(--muted);
}
.msg-typing img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; flex: none; }
.msg-typing-dots { display: inline-flex; gap: 3px; align-items: center; }
.msg-typing-dots i {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--muted);
  animation: typingBlink 1.2s infinite;
}
.msg-typing-dots i:nth-child(2) { animation-delay: .2s; }
.msg-typing-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes typingBlink {
  0%, 60%, 100% { opacity: .35; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

#msg-image-btn { padding: 6px 9px; }
#msg-image-btn .ico { width: 18px; height: 18px; vertical-align: -4px; }

.msg-compose {
  display: flex; align-items: center; gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--border);
  background: transparent;
}
.msg-input {
  flex: 1; min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 4px;
  font-size: 12px;
}
.msg-image-preview { flex: none; }
.msg-image-preview img { width: 38px; height: 38px; object-fit: cover; border-radius: 4px; border: 1px solid var(--border); }
/* ============================================================
   notifications.css â€” page Notifications
   ============================================================ */
/* Pas de dÃ©filement sur la page : seules les colonnes dÃ©filent */
html, body { height: 100%; overflow: hidden; }
.layout > .leftbar,
.layout > .feed,
.layout > .rightbar {
  max-height: calc(100vh - 78px); /* 50px topbar + 14px de marge en haut et en bas */
  overflow-y: auto;
  overflow-x: hidden;
}

.notif-list { display: flex; flex-direction: column; margin-top: 8px; }
.notif-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  background: transparent;
  border-radius: 3px;
}
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: #eef4ff; }
.notif-item img { width: 34px; height: 34px; object-fit: contain; border-radius: 4px; flex: none; }
.notif-content { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 700; color: var(--text); }
.notif-message { font-size: 12px; line-height: 1.5; color: #555; margin-top: 3px; }
.notif-date { font-size: 11px; color: var(--muted); margin-top: 5px; }
.notif-mark {
  flex: none;
  border: 1px solid var(--border); background: #f6f6f6;
  color: #555; font-size: 11px; font-weight: 600;
  padding: 4px 9px; border-radius: 4px; cursor: pointer;
}
.notif-mark:hover { background: #ededed; }

/* ===== Vidéos dans les publications ===== */
.video-attach {
  position: relative;
  display: inline-block;
  margin: 6px;
  vertical-align: top;
}
.post-video {
  display: block;
  max-width: 260px;
  max-height: 200px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #000;
}
.video-remove {
  position: absolute;
  top: -8px; right: -8px;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: none;
  background: #c0392b;
  color: #fff;
  font-size: 18px;
  line-height: 22px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.video-remove:hover { background: #e74c3c; }
.post-images .video-attach { margin: 4px; }

/* Icône Vidéo en couleur (bleu) */
.composer-link .video-ico {
  filter: invert(36%) sepia(97%) saturate(1352%) hue-rotate(207deg) brightness(99%) contrast(95%);
  opacity: 1;
}

/* ===== Tendances (barre latérale) ===== */
.trends-list { margin: 8px 10px 0; }
.trend-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #eef0f1;
  font-size: 12px;
}
.trend-item:last-child { border-bottom: none; }
.trend-item .trend-tag { color: var(--blue); font-weight: 700; }
.trend-item .trend-count { color: var(--muted); font-size: 11px; white-space: nowrap; }
.trend-empty { padding: 8px 0; font-size: 11px; color: var(--muted); }

/* ===== Astuce hashtags : fond bleu clair sur le texte uniquement ===== */
.composer-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #2f6fd0;
  font-size: 11px;
  line-height: 1.45;
  white-space: nowrap;
  background: #f4f8ff;
  border: 1px solid #dbe9ff;
  border-radius: 8px;
  padding: 4px 9px;
}
.composer-hint b { color: #2f6fd0; font-weight: 700; }
.hint-bulb { width: 16px; height: 16px; vertical-align: -3px; }
.composer-emoji-row.composer-emoji-row {
  margin-top: 8px;
  align-items: center;
}

/* ===== Crédit sous Flux RSS (colonne droite) ===== */
.feed-credit {
  position: relative;
  margin-top: 2px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 2px;
}
.credit-image {
  display: block;
  width: 100%;
  height: 96px;
  object-fit: cover;
}
/* Texte "vieux web" directement sur l'image */
.credit-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  width: 100%;
  color: #fff;
  font-family: 'MinecraftAlt', "Segoe UI", sans-serif;
  font-size: 12px;
  text-align: center;
  line-height: 1.3;
  text-shadow: 2px 2px 0 #000, -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000;
  pointer-events: none;
}

/* ===== Icônes pixelarticons (SVG pixel art) ===== */
img.ico[src*="pixelart"],
img[src*="pixelart"] {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}
/* Couleurs : blanc dans la barre du haut, normal ailleurs */
.topbar img[src*="pixelart"] { filter: invert(1); }
.side-item.active img[src*="pixelart"] { filter: invert(1); }

/* Icônes Photo/Image et Vidéo en bleu */
.composer-link .color-ico,
.composer-link .video-ico {
  filter: invert(36%) sepia(97%) saturate(1352%) hue-rotate(207deg) brightness(99%) contrast(95%) !important;
  opacity: 1 !important;
}

/* Lien Signalez : cliquable (aucune action pour l'instant) */
.report-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--blue) !important;
  cursor: pointer !important;
  opacity: 1;
  font-size: 11px;
}
.report-link .ico { filter: none; }
.report-link:hover { text-decoration: underline !important; color: var(--blue) !important; }

/* Icône de recherche visible (pas blanche sur fond clair) */
.search-go img.ico {
  filter: none !important;
  opacity: 1 !important;
}

/* Décompteur Noël dans l'annonce */
.annonce-countdown {
  margin-top: 10px;
  padding: 6px 10px;
  background: #f0f7ff;
  border: 1px solid #cfe0ff;
  border-radius: 4px;
  color: #2f6fd0;
  font-weight: 600;
}
.annonce-countdown b { color: #2f6fd0; }

/* Carrousel des annonces : dots rectangles arrondis qui se remplissent */
.annonce-dots {
  display: flex;
  gap: 5px;
  justify-content: center;
  padding: 8px 10px 10px;
}
.annonce-dot {
  position: relative;
  width: 40px;
  height: 5px;
  padding: 0;
  background: #d3d8dc;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
}
.annonce-dot-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--blue);
  border-radius: 3px;
}
.annonce-dot-fill.running {
  animation: annonceFill 8s linear forwards;
}
@keyframes annonceFill {
  from { width: 0; }
  to { width: 100%; }
}

/* Titre principal de l'annonce (depuis le JSON) */
.annonce-title-main {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
/* Titre en bas : bleu, souligné, non cliquable */
.annonce-bottom-title {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--blue);
  text-decoration: underline;
  font-size: 12px;
  font-weight: 600;
  cursor: default;
}
/* Carrousel fluide */
.annonce-dot-fill.running {
  animation: annonceFill 8s linear forwards;
}
@keyframes annonceFill {
  from { width: 0; }
  to { width: 100%; }
}

/* Titres de section : sans fond gris */
.side-title {
  background: transparent !important;
  border-bottom: 1px solid var(--border) !important;
}
.friends-head {
  background: transparent !important;
}
/* Style barre de défilement fine et transparente (garde les flèches natives) */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,.18) transparent;
}
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.18);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,.3);
}
