/* === Chat global intégré dans la page === */

.wos-chat-section {
    width: 100%;
    /*margin-top: 60px;
    margin-bottom: 40px; */
    display: flex;
    justify-content: center;
}

.wos-chat-container {
    width: 100%;
    max-width: 1100px;
    /* padding: 20px; */
}

.wos-chat-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.wos-chat-subtitle {
    margin-top: 0;
    margin-bottom: 18px;
    color: #6b7280;
}

.wos-chat-box {
    background: white;
    border-radius: 14px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

/* messages */
.wos-chat-messages {
    max-height: 330px;
    overflow-y: auto;
    padding-right: 6px;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* un message */
.wo-chat-message {
    display: flex;
    flex-direction: column;
    padding-bottom: 4px;
    border-bottom: 1px solid #e5e7eb;
}

.wo-chat-author-line {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

/* .wo-chat-author {
    font-weight: 600;
    color: #111827;
} */

.wo-chat-time {
    font-size: 0.75rem;
    color: #6b7280;
}

.wo-chat-body {
    margin-top: 3px;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.9rem;
}

/* zone d'écriture */
.wos-chat-input-zone {
    border-top: 1px solid #e5e7eb;
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wos-chat-input-wrapper {
    display: flex;
    gap: 10px;
}

#wos-chat-input, #wo-chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    outline: none;
    font-size: 0.95rem;
}

.wos-chat-send-btn {
    padding: 10px 18px;
    border: none;
    background: #2563eb;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
}

.wos-chat-hint {
    font-size: 0.8rem;
    color: #6b7280;
}

/* Responsive */
@media (max-width: 640px) {
    .wos-chat-container {
        padding: 12px;
    }
    .wos-chat-messages {
        max-height: 260px;
    }
}

/* avatars ronds mini */
.chat-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    margin-right: 10px;
    box-shadow: 0 0 3px rgba(0,0,0,0.15);
}

/* ligne auteur + avatar + heure + actions */
.wo-chat-headerline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.wo-chat-headerleft {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* .wo-chat-author {
    font-weight: 600;
    color: #111827;
    cursor: pointer;
	font-size:12px;
} */

.wo-chat-report {
    border: none;
    background: transparent;
    color: #ef4444;
    font-size: 0.75rem;
    cursor: pointer;
}

/* mention box pour @Pseudo */
.wos-chat-box {
    position: relative;
}

.wos-chat-mention-box {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 72px;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.85rem;
    display: none;
    z-index: 20;
}

.wos-chat-mention-box.visible {
    display: block;
}

.wos-chat-mention-item {
    padding: 6px 10px;
    cursor: pointer;
}

.wos-chat-mention-item:hover {
    background: #eff6ff;
}

/* ============================================= */
/* HIGHLIGHT @MENTIONS — CHAT GLOBAL (2025)      */
/* ============================================= */

.chat-mention {
    font-weight: 600;
    color: #4da3ff;
    cursor: pointer;
    transition: 0.2s ease;
    animation: mentionPulse 1.2s ease-in-out;
}

@keyframes mentionPulse {
    0% { color: #4da3ff; }
    50% { color: #82c3ff; }
    100% { color: #4da3ff; }
}

/* Mention du joueur courant */
.chat-mention-me {
    color: #ffffff;
    background: rgba(78, 156, 255, 0.35);
    padding: 2px 6px;
    border-radius: 6px;
    font-weight: 700;
    border: 1px solid rgba(120, 180, 255, 0.6);
    animation: myMentionPulse 1.6s ease-in-out;
}

@keyframes myMentionPulse {
    0% { background: rgba(78,156,255,0.25); }
    50% { background: rgba(78,156,255,0.55); }
    100% { background: rgba(78,156,255,0.25); }
}

/* Highlight du message entier si mentionné */
.chat-message-mention-me {
    background: rgba(60, 120, 255, 0.15) !important;
    border-left: 4px solid #4da3ff;
    animation: messagePing 1.5s ease-in-out;
}

@keyframes messagePing {
    0% { background: rgba(60,120,255,0.10); }
    50% { background: rgba(60,120,255,0.30); }
    100% { background: rgba(60,120,255,0.10); }
}

/* ============================================= */
/* COMMANDES SLASH — STYLES SUPPLÉMENTAIRES      */
/* ============================================= */

/* /spoiler */
.chat-spoiler {
    margin-top: 4px;
    padding: 6px 8px;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 0.85rem;
}

.chat-spoiler-btn {
    display: inline-block;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    color: #374151;
    padding: 4px 0;
}

.chat-spoiler-content {
    margin-top: 6px;
    display: none;
    color: #111827;
}

.chat-spoiler-content.visible {
    display: block;
}

/* /poll */
.chat-poll {
    margin-top: 4px;
    padding: 6px 8px;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    font-size: 0.85rem;
}

.chat-poll-question {
    font-weight: 600;
    margin-bottom: 6px;
    color: #111827;
}

.chat-poll-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.poll-option {
    border: none;
    background: #e5e7eb;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

.poll-option:hover {
    background: #d1d5db;
    transform: translateY(-1px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.poll-option.voted {
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 1px 5px rgba(37,99,235,0.5);
}

.poll-option.disabled {
    opacity: 0.7;
    cursor: default;
}

.poll-label {
    font-weight: 500;
}

.poll-votes {
    font-size: 0.75rem;
    margin-left: 8px;
}

/* /giphy */
.chat-gif img {
    margin-top: 4px;
    max-width: 180px;
    border-radius: 8px;
    display: block;
}

/* /color */
.chat-color-text {
    font-weight: 600;
}

/* /lvl */
.chat-lvl {
    margin-top: 3px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Poll loading (optionnel) */
.chat-poll.poll-loading {
    opacity: 0.7;
}

/* --------------------------------------------------------------
   SLASH COMMAND MENU — MODERNE & RESPONSIVE
-------------------------------------------------------------- */
.slash-menu {
  position: absolute;
  background: var(--card-bg, #1c1c1f);
  border-radius: 12px;
  padding: 6px 0;
  box-shadow: 0 6px 24px rgba(0,0,0,0.25);
  z-index: 9999;
  max-height: 260px;
  overflow-y: auto;
  animation: slashFade 0.12s ease-out;
}

@keyframes slashFade {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.slash-item {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  cursor: pointer;
  gap: 10px;
  transition: 0.15s;
}
.slash-item:hover,
.slash-item.active {
  background: rgba(255,255,255,0.08);
}

.slash-icon {
  font-size: 20px;
}

.slash-cmd {
  font-weight: 600;
  color: #fff;
}

.slash-desc {
  color: #bbb;
  font-size: 13px;
  margin-left: auto;
}

/* Mobile adaptation */
@media (max-width: 600px) {
  .slash-menu {
    top: auto !important;
    bottom: 70px !important;
    border-radius: 10px;
  }
}

.loot-win {
  padding: 8px 12px;
  background: rgba(0,255,140,0.1);
  border-left: 3px solid #00ff8c;
  border-radius: 6px;
  color: #00ff8c;
}

.loot-fail {
  padding: 8px 12px;
  background: rgba(255,80,80,0.1);
  border-left: 3px solid #ff5050;
  border-radius: 6px;
  color: #ff5050;
}
/* --- STYLE PAR DÉFAUT (MODE JOUR) --- */
.wo-open-chat-full {
    padding: 6px 12px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
    color: #020617; /* bleu foncé lisible sur fond clair */
}

.wo-open-chat-full:hover {
    opacity: 0.7;
}

/* --- MODE NUIT AUTOMATIQUE --- */
@media (prefers-color-scheme: dark) {
    .wo-open-chat-full {
        color: #60a5fa; /* bleu clair lisible sur fond sombre */
    }

    .wo-open-chat-full:hover {
        color: #93c5fd;
    }
}
