/* Barre de navigation mobile - cachée sur desktop */
.mobile-nav-bar {
    display: none;
}

.unified-widget {
    position: fixed;
    top: 1px;
    right: 1px;
    z-index: 900;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95), rgba(42, 42, 62, 0.9));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 22px 0px 0px 21px;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    transition: all var(--transition-base);
}

.unified-widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
}

.widget-section {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 18px;
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
}

.widget-section.online {
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid transparent;
}

.widget-section.online:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.3);
  transform: scale(1.02);
}

.widget-section.admin {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid transparent;
  cursor: pointer; 
  position: relative; 
}

.widget-section.admin:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.3);
  transform: scale(1.02);
}

.widget-icon {
  font-size: 16px;
}

.widget-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.widget-value {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

.widget-divider {
  width: 1px;
  height: 24px;
  background: rgba(148, 163, 184, 0.2);
  margin: 0 4px;
}

.widgets-container,
.online-users-widget,
#adminUserWidget,
#ouWidget,
#onlineWidget {
  display: none !important;
}

/* Widget en mode visiteur */
.visitor-mode-widget .widget-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.visitor-mode-widget .widget-label i {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.visitor-mode-widget:hover .widget-label i {
  transform: translateX(-3px);
}

.visitor-mode-widget:hover {
  background: rgba(99, 102, 241, 0.2);
}

/* FORCER: Cacher le dropdown en mode visiteur */
html.visitor-mode #adminDropdown,
.visitor-mode-widget + #adminDropdown,
.visitor-mode-widget ~ #adminDropdown {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ================================================
   SYSTÈME DE CHAT - FENÊTRE DRAGGABLE
   ================================================ */

/* Fenêtre principale */
.chat-window {
    position: fixed;
    width: 360px;
    height: 480px;
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.98), rgba(15, 15, 26, 0.98));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(99, 102, 241, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 10000;
    overflow: hidden;
    backdrop-filter: blur(20px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.chat-window.chat-hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.95);
}

/* Forcer tous les enfants à ne pas intercepter les clics quand masqué */
.chat-window.chat-hidden * {
    pointer-events: none !important;
}

/* ========================================
   MODE BULLE (Minimisé) - Style WhatsApp
   ======================================== */
.chat-window.chat-minimized {
    width: 56px !important;
    height: 56px !important;
    min-height: 56px;
    border-radius: 50% !important;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.chat-window.chat-minimized:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
}

.chat-window.chat-minimized .chat-header {
    width: 56px;
    height: 56px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    cursor: pointer;
}

.chat-window.chat-minimized .chat-header-info {
    display: none;
}

.chat-window.chat-minimized .chat-header-actions {
    display: none;
}

.chat-window.chat-minimized .chat-header::after {
    content: '\f075';
    font-family: 'Font Awesome 5 Free', 'Font Awesome 6 Free', FontAwesome;
    font-weight: 900;
    font-size: 22px;
    color: white;
}

.chat-window.chat-minimized .chat-body,
.chat-window.chat-minimized .chat-footer {
    display: none;
}

/* Badge notification sur la bulle */
.chat-bubble-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
    animation: bubblePulse 2s infinite;
    z-index: 10;
}

.chat-bubble-badge.hidden {
    display: none;
}

@keyframes bubblePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Nom du partenaire sur la bulle (au survol) */
.chat-window.chat-minimized .chat-bubble-name {
    position: absolute;
    bottom: -28px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.chat-window.chat-minimized:hover .chat-bubble-name {
    opacity: 1;
}

.chat-window.chat-dragging {
    opacity: 0.9;
    cursor: grabbing;
}

/* Header */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.15));
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    cursor: grab;
    user-select: none;
    flex-shrink: 0;
}

.chat-header:active {
    cursor: grabbing;
}

.chat-header-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.chat-partner-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #fff);
}

.chat-status {
    font-size: 11px;
    color: #10b981;
}

.chat-header-actions {
    display: flex;
    gap: 8px;
}

.chat-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary, #94a3b8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary, #fff);
}

.chat-btn-close:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Body - Zone des messages */
.chat-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 3px;
}

.chat-empty {
    text-align: center;
    color: var(--text-muted, #64748b);
    font-size: 13px;
    padding: 40px 20px;
}

/* Messages */
.chat-message {
    max-width: 85%;
    animation: chatMessageIn 0.2s ease-out;
}

@keyframes chatMessageIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message-mine {
    align-self: flex-end;
}

.chat-message-other {
    align-self: flex-start;
}

.chat-message-content {
    padding: 10px 14px;
    border-radius: 16px;
    position: relative;
}

.chat-message-mine .chat-message-content {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message-other .chat-message-content {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary, #fff);
    border-bottom-left-radius: 4px;
}

.chat-message-sender {
    font-size: 11px;
    font-weight: 600;
    color: #a78bfa;
    margin-bottom: 4px;
}

.chat-message-text {
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}

.chat-message-time {
    font-size: 10px;
    opacity: 0.7;
    margin-top: 4px;
    text-align: right;
}

.chat-error {
    text-align: center;
    color: #ef4444;
    font-size: 12px;
    padding: 8px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
    animation: chatMessageIn 0.2s ease-out;
}

/* Footer - Zone d'input */
.chat-footer {
    border-top: 1px solid rgba(99, 102, 241, 0.15);
    background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}

.chat-input-container {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary, #fff);
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.chat-input::placeholder {
    color: var(--text-muted, #64748b);
}

.chat-input:focus {
    border-color: rgba(99, 102, 241, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.chat-send-btn:active {
    transform: scale(0.95);
}

/* Icône Chat dans le tooltip online users */
.chat-icon-btn {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 6px;
    background: rgba(99, 102, 241, 0.2);
    color: #a78bfa;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-icon-btn:hover {
    background: rgba(99, 102, 241, 0.4);
    color: #fff;
    transform: scale(1.1);
}

.chat-icon-btn i {
    font-size: 11px;
}

/* Notification de nouveau message */
.chat-notification {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.98), rgba(15, 15, 26, 0.98));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    z-index: 10001;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    max-width: 320px;
}

.chat-notification.chat-notif-show {
    opacity: 1;
    transform: translateX(0);
}

.chat-notif-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.chat-notif-content > i {
    font-size: 20px;
    color: #a78bfa;
}

.chat-notif-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chat-notif-text strong {
    font-size: 13px;
    color: var(--text-primary, #fff);
}

.chat-notif-text span {
    font-size: 12px;
    color: var(--text-muted, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.chat-notif-open {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.chat-notif-open:hover {
    transform: scale(1.05);
}

/* Badge messages non lus global */
.chat-unread-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.chat-unread-badge.chat-badge-hidden {
    display: none;
}

/* Responsive Mobile */
@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 20px);
        height: 70vh;
        max-height: 500px;
        right: 10px;
        bottom: 60px;
        border-radius: 12px;
    }
    
    .chat-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* ========================================
   CHAT - Support Images
   ======================================== */

/* Bouton upload image */
.chat-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(139, 92, 246, 0.2);
    border: none;
    border-radius: 8px;
    color: #a78bfa;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-upload-btn:hover {
    background: rgba(139, 92, 246, 0.4);
    color: #c4b5fd;
}

.chat-upload-btn i {
    font-size: 14px;
}

/* Image dans un message */
.chat-message-image {
    margin: 4px 0;
    max-width: 200px;
    overflow: hidden;
    border-radius: 8px;
}

.chat-message-image img {
    width: 100%;
    max-width: 200px;
    max-height: 200px;
    object-fit: contain;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.2s ease;
    display: block;
    background: rgba(0, 0, 0, 0.2);
}

.chat-message-image img:hover {
    opacity: 0.85;
}

/* Ajuster le padding pour les messages avec images */
.chat-message-content:has(.chat-message-image) {
    padding: 6px;
}

.chat-message-content:has(.chat-message-image) .chat-message-time {
    margin-top: 4px;
}

/* Loading spinner dans le bouton envoi */
.chat-send-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.chat-send-btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}


/* ========================================
   BULLES MULTIPLES - Positionnement
   ======================================== */

/* Transition pour les bulles */
.chat-window.chat-minimized {
    transition: right 0.3s ease, bottom 0.3s ease, transform 0.2s ease;
}

/* Avatar/Initiale dans la bulle (optionnel) */
.chat-window.chat-minimized .chat-header::before {
    content: '';
}

/* Effet d'entrée bulle */
@keyframes bubbleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.chat-window.chat-minimized {
    animation: bubbleIn 0.3s ease-out;
}

/* Z-index pour les bulles actives */
.chat-window:not(.chat-minimized) {
    z-index: 10002;
}

.chat-window.chat-minimized {
    z-index: 10000;
}

/* Mobile - Bulles plus petites */
@media (max-width: 480px) {
    .chat-window.chat-minimized {
        width: 48px !important;
        height: 48px !important;
    }
    
    .chat-window.chat-minimized .chat-header {
        width: 48px;
        height: 48px;
    }
    
    .chat-window.chat-minimized .chat-header::after {
        font-size: 18px;
    }
    
    .chat-bubble-badge {
        min-width: 16px;
        height: 16px;
        font-size: 10px;
    }
}


/* ========================================
   BULLE DE NOTIFICATION GLOBALE
   Style WhatsApp Windows
   ======================================== */

.chat-notif-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5);
    z-index: 9999;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.chat-notif-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(99, 102, 241, 0.6);
}

.chat-notif-bubble i {
    font-size: 24px;
    color: white;
}

.chat-notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    background: #ef4444;
    color: white;
    font-size: 12px;
    font-weight: 700;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ========================================
   LISTE DES CONVERSATIONS NON LUES
   ======================================== */

.chat-conv-list {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 300px;
    max-height: 400px;
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.98), rgba(15, 15, 26, 0.98));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 10000;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.2s ease;
}

.chat-conv-list.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.chat-conv-list-title {
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #fff);
    background: rgba(99, 102, 241, 0.1);
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.chat-conv-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-conv-item:hover {
    background: rgba(99, 102, 241, 0.15);
}

.chat-conv-item:last-child {
    border-bottom: none;
}

.chat-conv-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-conv-avatar i {
    font-size: 16px;
    color: white;
}

.chat-conv-info {
    flex: 1;
    min-width: 0;
}

.chat-conv-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #fff);
    margin-bottom: 2px;
}

.chat-conv-preview {
    font-size: 12px;
    color: var(--text-muted, #64748b);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-conv-badge {
    min-width: 24px;
    height: 24px;
    background: #ef4444;
    color: white;
    font-size: 12px;
    font-weight: 700;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    flex-shrink: 0;
}

/* Mobile */
@media (max-width: 480px) {
    .chat-notif-bubble {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
    
    .chat-notif-bubble i {
        font-size: 20px;
    }
    
    .chat-conv-list {
        right: 10px;
        left: 10px;
        width: auto;
        bottom: 80px;
    }
}


/* ========================================
   LIGHTBOX POUR IMAGES
   ======================================== */

.chat-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.chat-lightbox.show {
    opacity: 1;
    visibility: visible;
}

.chat-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.chat-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 1;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.chat-lightbox.show .chat-lightbox-content {
    transform: scale(1);
}

.chat-lightbox-content img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.chat-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* ========================================
   INDICATEURS DE LECTURE (VU)
   Style WhatsApp
   ======================================== */

.chat-message-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 4px;
}

.chat-message-time {
    font-size: 10px;
    opacity: 0.7;
}

.chat-read-status {
    font-size: 12px;
    display: inline-flex;
    align-items: center;
}

/* Envoyé - une coche grise */
.chat-read-status.sent {
    color: rgba(255, 255, 255, 0.5);
}

/* Lu - double coche bleue */
.chat-read-status.read {
    color: #34b7f1;
}

.chat-read-status i {
    font-size: 11px;
}

/* Animation quand ça passe à "lu" */
.chat-read-status.read i {
    animation: readCheck 0.3s ease;
}

@keyframes readCheck {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Ajuster pour les messages autres (pas d'indicateur) */
.chat-message-other .chat-message-footer {
    justify-content: flex-start;
}

.chat-message-other .chat-read-status {
    display: none;
}


/* ========================================
   SÉLECTEUR D'EMOJIS
   ======================================== */

.chat-emoji-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(139, 92, 246, 0.2);
    border: none;
    border-radius: 8px;
    color: #a78bfa;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-emoji-btn:hover {
    background: rgba(139, 92, 246, 0.4);
    color: #c4b5fd;
}

.chat-emoji-btn i {
    font-size: 16px;
}

/* Picker popup */
.chat-emoji-picker {
    position: fixed;
    width: 320px;
    max-height: 280px;
    background: linear-gradient(145deg, rgba(26, 26, 46, 0.98), rgba(15, 15, 26, 0.98));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 10003;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    overflow: hidden;
}

.chat-emoji-picker.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chat-emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    padding: 10px;
    max-height: 260px;
    overflow-y: auto;
}

.chat-emoji-grid::-webkit-scrollbar {
    width: 6px;
}

.chat-emoji-grid::-webkit-scrollbar-track {
    background: transparent;
}

.chat-emoji-grid::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 3px;
}

.chat-emoji-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    font-size: 22px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
    user-select: none;
}

.chat-emoji-item:hover {
    background: rgba(99, 102, 241, 0.3);
    transform: scale(1.15);
}

.chat-emoji-item:active {
    transform: scale(0.95);
}

/* Mobile */
@media (max-width: 480px) {
    .chat-emoji-picker {
        width: 280px;
        max-height: 240px;
    }
    
    .chat-emoji-grid {
        grid-template-columns: repeat(7, 1fr);
    }
    
    .chat-emoji-item {
        width: 34px;
        height: 34px;
        font-size: 20px;
    }
}


/* ============================================
   MESSAGE AVERTISSEMENT VISITEUR
   ============================================ */

.stats-warning-message {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    margin-top: -8px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.stats-warning-message i {
    color: rgba(255, 255, 255, 0.5);
}

/* Mobile */
@media (max-width: 768px) {
    .stats-warning-message {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
}
