/* CSS ultra-simple pour VoiceSpace */

* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden;
}

#app {
    height: 100vh;
}

.page {
    height: 100vh;
}

.hidden {
    display: none !important;
}



.btn {
    padding: 10px 20px;
    background: #007bff;
    color: white;
    border: none;
    cursor: pointer;
    margin: 5px;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn:active {
    transform: translateY(0);
}

.login-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    border: 1px solid #ccc;
    background: white;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
}

.app-header {
    background: white;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.app-header h1 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-content {
    display: flex;
    gap: 0;
    height: calc(100vh - 70px); /* Hauteur fixe basée sur l'header */
}

@media (max-width: 768px) {
    .app-content {
        flex-direction: column;
        height: calc(100vh - 70px);
    }
}

.sidebar {
    width: 300px;
    background: white;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.3s ease;
}

.sidebar.hidden {
    transform: translateX(-100%);
}

.sidebar-toggle-bar {
    width: 20px;
    background: #f8f9fa;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}



.sidebar-toggle {
    width: 30px;
    height: 30px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #666;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.sidebar-toggle:hover {
    background: #f0f0f0;
    color: #333;
    transform: scale(1.1);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

.rooms-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
}



.rooms-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
}

.chat-area {
    flex: 1;
    background: white;
    display: flex;
    flex-direction: column;
}

.no-room-selected {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #666;
    padding: 40px;
}

.no-room-selected h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%; /* Utiliser toute la hauteur disponible */
    overflow: hidden;
}

.chat-content {
    flex: 1;
    display: flex;
    gap: 0;
    min-height: 0; /* Important pour que flex fonctionne correctement */
}

.users-sidebar {
    width: 250px;
    background: #f8f9fa;
    border-left: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.users-header {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
}

.users-header h4 {
    margin: 0;
    color: #333;
    font-size: 1rem;
}

#users-count {
    background: #007bff;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
}

.users-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
}

.user-item {
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.user-item:hover {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-item.online {
    border-left: 3px solid #28a745;
}

.user-item.offline {
    opacity: 0.6;
}

.user-name {
    font-weight: bold;
    color: #333;
    font-size: 0.9rem;
}

.user-profile-bubble {
    position: fixed;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    padding: 8px 12px;
    font-size: 0.85rem;
    z-index: 1000;
    max-width: 180px;
    min-width: 150px;
    display: none;
}

.user-profile-bubble.show {
    display: block;
}



.profile-info {
    color: #666;
    line-height: 1.4;
}

.profile-info-item {
    margin-bottom: 5px;
}

.profile-info-label {
    font-weight: bold;
    color: #333;
    margin-right: 5px;
}



.emoji-picker {
    position: absolute;
    bottom: 100%;
    left: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    width: 400px;
    max-height: 400px;
    z-index: 9999;
    display: none;
    border: 2px solid #007bff;
    margin-bottom: 10px;
}

.emoji-picker.show {
    display: block !important;
}

.emoji-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #e0e0e0;
}

.emoji-picker-header h4 {
    margin: 0;
    color: #333;
    font-size: 1rem;
}

.emoji-picker-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-picker-close:hover {
    color: #333;
}

.emoji-categories {
    display: flex;
    padding: 10px 15px;
    border-bottom: 1px solid #e0e0e0;
    gap: 5px;
}

.emoji-category {
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.emoji-category:hover {
    background: #f8f9fa;
}

.emoji-category.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.emoji-grid {
    padding: 15px;
    max-height: 250px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
}

.emoji-item {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-item:hover {
    background: #f8f9fa;
    transform: scale(1.1);
}

/* Media queries pour mobile - CORRECTION DU PROBLÈME PRINCIPAL */
@media (max-width: 768px) {
    body {
        height: 100vh;
        overflow: hidden;
    }
    
    #app {
        height: 100vh;
    }
    
    .page {
        height: 100vh;
    }
    
    .app-content {
        flex-direction: column;
        height: calc(100vh - 70px);
    }
    
    .chat-content {
        flex-direction: column;
        flex: 1;
        min-height: 0;
    }
    
    .users-sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid #e0e0e0;
        max-height: 120px;
        flex-shrink: 0;
        min-height: 0;
    }
    
    .chat-container {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
    
    .messages-container {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
    }
    
    .message-input {
        flex-shrink: 0;
        min-height: 60px;
        padding: 10px;
    }
    
    .chat-header {
        flex-shrink: 0;
        min-height: 60px;
        padding: 10px;
    }
    
    .emoji-picker {
        width: 280px;
        max-height: 300px;
        left: 10px !important;
        right: 10px !important;
        bottom: 70px !important;
    }
}

@media (max-width: 480px) {
    .message-input {
        min-height: 50px;
        padding: 8px;
    }
    
    .chat-header {
        min-height: 50px;
        padding: 8px;
    }
    
    .users-sidebar {
        max-height: 100px;
    }
}

@media (max-width: 375px) {
    .message-input {
        min-height: 45px;
        padding: 6px;
    }
    
    .chat-header {
        min-height: 45px;
        padding: 6px;
    }
    
    .users-sidebar {
        max-height: 80px;
    }
}

/* Gestion du clavier virtuel sur mobile */
@media (max-width: 768px) {
    body.keyboard-open .app-content {
        height: calc(100vh - 70px - 200px); /* Réduire la hauteur quand le clavier est ouvert */
    }
    
    body.keyboard-open .chat-container {
        height: 100%;
    }
    
    body.keyboard-open .messages-container {
        flex: 1;
        min-height: 0;
    }
    
    body.keyboard-open .message-input {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #f8f9fa;
        border-top: 1px solid #e0e0e0;
        z-index: 100;
    }
}

.chat-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
    height: 80px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.chat-header h3 {
    margin: 0 0 5px 0;
    color: #333;
}

.chat-header p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    min-height: 0; /* Important pour que flex fonctionne correctement */
}

.message-input {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
    position: relative;
    flex-shrink: 0; /* Empêcher la compression */
    min-height: 80px; /* Hauteur minimale */
}

.message-input form {
    display: flex;
    gap: 10px;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    position: relative;
}

.emoji-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
    min-width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-btn:hover {
    background: #f8f9fa;
    border-color: #007bff;
}

.message-input input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

/* Styles pour la sidebar mobile */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
        transition: transform 0.3s ease;
    }
    
    .sidebar.hidden-mobile {
        transform: translateY(-100%);
        height: 0;
        overflow: hidden;
    }
    
    .chat-area {
        min-height: 400px;
    }
    
    .modal-content {
        margin: 20px;
        padding: 20px;
    }
}

/* Nouveaux styles pour le système de salons */
.room-item {
    padding: 15px;
    border: 1px solid #e0e0e0;
    margin-bottom: 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.room-item:hover {
    background: #f8f9fa;
    border-color: #007bff;
}

.room-item.selected {
    background: #e3f2fd;
    border-color: #007bff;
}

.room-item.favorite {
    background: #fff3cd;
    border-color: #ffc107;
}

.room-info {
    flex: 1;
}

.room-name {
    font-weight: bold;
    color: #333;
    font-size: 1rem;
    margin-bottom: 5px;
}

.room-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.leave-room-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-left: 10px;
    flex-shrink: 0;
}

.leave-room-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

.unread-count {
    background: #007bff;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.8rem;
    margin-left: 5px;
}

.new-message-indicator {
    background: #dc3545;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 5px;
    flex-shrink: 0;
}

.search-box {
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.available-rooms-list {
    max-height: 400px;
    overflow-y: auto;
}

.available-room-item {
    padding: 15px;
    border: 1px solid #e0e0e0;
    margin-bottom: 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    background: white;
}

.available-room-item:hover {
    background: #f8f9fa;
    border-color: #007bff;
}

.available-room-item.already-joined {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f8f9fa;
}

.available-room-item.already-joined:hover {
    background: #f8f9fa;
    border-color: #e0e0e0;
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.available-room-item .room-category {
    color: #007bff;
    font-size: 0.8rem;
    font-weight: bold;
}

.joined-badge {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
}

.system-message {
    padding: 8px 15px;
    margin: 5px 0;
    background: #f8f9fa;
    border-left: 3px solid #007bff;
    font-style: italic;
    color: #666;
    text-align: center;
}

.system-message.join {
    border-left-color: #28a745;
    background: #d4edda;
}

.system-message.leave {
    border-left-color: #dc3545;
    background: #f8d7da;
}

.system-text {
    font-size: 0.9rem;
}

/* =====================================================
   STYLES D'ADMINISTRATION
   ===================================================== */

/* Bouton d'administration */
#admin-btn {
    background-color: #dc3545;
    border-color: #dc3545;
    margin-right: 10px;
}

#admin-btn:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* Modal d'administration */
.admin-modal-content {
    max-height: 95vh;
    height: 95vh;
    overflow-y: auto;
    margin: 2.5vh auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.admin-header h3 {
    margin: 0;
    color: #333;
}

/* Onglets d'administration */
.admin-tabs {
    display: flex;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 25px;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
    padding: 0 10px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background-color: #f8f9fa;
}

.tab-btn.active {
    border-bottom-color: #007bff;
    color: #007bff;
    font-weight: bold;
}

/* Contenu des onglets */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Sections d'administration */
.admin-section {
    margin-bottom: 25px;
    padding: 25px;
    background-color: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
}

/* Filtres d'administration */
.admin-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.admin-filters select,
.admin-filters input {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

/* Tableau d'administration */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 14px;
}

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

.admin-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #495057;
}

.admin-table tr:hover {
    background-color: #f8f9fa;
}

/* Badges de rôle et statut */
.role-badge,
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.role-admin {
    background-color: #dc3545;
    color: white;
}

.role-moderator {
    background-color: #fd7e14;
    color: white;
}

.role-user {
    background-color: #28a745;
    color: white;
}

.role-guest {
    background-color: #6c757d;
    color: white;
}

.status-online {
    background-color: #28a745;
    color: white;
}

.status-offline {
    background-color: #6c757d;
    color: white;
}

.status-banned {
    background-color: #dc3545;
    color: white;
}

/* Boutons d'action */
.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

/* Signalements */
.report-item {
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 14px;
}

.report-date {
    color: #6c757d;
    font-size: 12px;
}

.report-content {
    margin-bottom: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.report-actions {
    display: flex;
    gap: 10px;
}

/* Utilisateurs bannis */
.banned-user-item {
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
}

.user-info {
    margin-bottom: 10px;
    font-weight: bold;
}

.ban-info {
    margin-bottom: 10px;
    font-size: 14px;
    color: #6c757d;
}

.ban-actions {
    display: flex;
    gap: 10px;
}

/* Permissions */
.permission-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.permission-category {
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
}

.permission-category h5 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #007bff;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 5px;
}

.permission-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.permission-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.permission-name {
    font-weight: bold;
    color: #495057;
}

.permission-description {
    font-size: 12px;
    color: #6c757d;
    max-width: 200px;
    text-align: right;
}

/* Statistiques */
.stats-section {
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.stats-section h5 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    text-align: center;
}

.stat-label {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 5px;
    text-transform: capitalize;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
}

/* Modal de modification d'utilisateur */
#edit-user-modal .modal-content {
    max-width: 800px;
    width: 90vw;
}

.permissions-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-modal-content {
        width: 98vw;
        height: 98vh;
        margin: 1vh auto;
    }
    
    .admin-tabs {
        flex-direction: column;
    }
    
    .tab-btn {
        text-align: left;
        border-bottom: 1px solid #dee2e6;
    }
    
    .admin-filters {
        flex-direction: column;
    }
    
    .admin-table {
        font-size: 12px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 8px 4px;
    }
    
    .permission-categories {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}



.room-item {
    padding: 15px;
    border: 1px solid #e0e0e0;
    margin-bottom: 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
    background: white;
}

.room-item:hover {
    background: #f8f9fa;
    border-color: #007bff;
}

.room-item.selected {
    background: #e3f2fd;
    border-color: #007bff;
}

.room-item h4 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1rem;
}

.room-item p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.message {
    padding: 8px 15px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 0;
    background: white;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.message:hover {
    background: #f8f9fa;
}

.message.unread {
    background: #fff3cd;
    border-left: 3px solid #ffc107;
}

.message.unread:hover {
    background: #ffeaa7;
}

.message-time {
    color: #999;
    font-size: 0.8rem;
    min-width: 80px;
}

.message-author {
    font-weight: bold;
    color: #007bff;
    min-width: 100px;
}

.message-content {
    color: #333;
    flex: 1;
    line-height: 1.4;
}

/* Bouton de signalement */
.report-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px 4px;
    margin-left: 5px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.report-btn:hover {
    opacity: 1;
    color: #c82333;
}

/* Modal de signalement */
.report-message-preview {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 10px;
    margin: 5px 0;
    font-style: italic;
    color: #6c757d;
}

/* Ajustement du header des messages */
.message-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

/* Styles pour les signalements */
.report-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-weight: bold;
}

.report-date {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: normal;
}

.report-content {
    margin-bottom: 10px;
}

.report-message {
    background: #e9ecef;
    border-left: 3px solid #007bff;
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    font-style: italic;
}

.report-message .message-author {
    color: #dc3545;
    font-weight: bold;
    font-style: normal;
}

/* Styles pour le modal de suppression */
.delete-message-preview {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 10px;
    margin: 5px 0;
    color: #856404;
}

/* Styles pour les messages supprimés */
.message.deleted-message {
    opacity: 0.7;
    background-color: #f8f9fa;
}

.message.deleted-message .message-content {
    color: #999;
    font-style: italic;
}

/* Styles pour les badges d'action dans les logs */
.action-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.action-badge.warn {
    background-color: #fff3cd;
    color: #856404;
}

.action-badge.ban {
    background-color: #f8d7da;
    color: #721c24;
}

.action-badge.delete_message {
    background-color: #d1ecf1;
    color: #0c5460;
}

.action-badge.ignore {
    background-color: #e2e3e5;
    color: #383d41;
}

/* Styles pour les notifications */
.notifications-container {
    position: relative;
    display: inline-block;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
    position: relative;
}

.btn-icon:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.notifications-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.notifications-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    max-height: 400px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    overflow: hidden;
}

.notifications-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
}

.notifications-header h4 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.notifications-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-item.unread {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.notification-item.warning {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
}

.notification-item.ban {
    background-color: #f8d7da;
    border-left: 4px solid #dc3545;
}

.notification-title {
    font-weight: bold;
    margin-bottom: 4px;
    color: #333;
}

.notification-message {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
    white-space: pre-line;
}

.notification-time {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.no-notifications {
    padding: 20px;
    text-align: center;
    color: #999;
    font-style: italic;
}

/* Styles pour le modal d'avertissement */
.user-name-display {
    font-weight: bold;
    color: #333;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: inline-block;
    margin-top: 4px;
}

.message-preview {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px;
    margin-top: 4px;
    font-style: italic;
    color: #666;
    max-height: 100px;
    overflow-y: auto;
}

#warn-message-section {
    border: 1px solid #ffc107;
    background-color: #fff3cd;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 16px;
}

#warn-message-section label {
    color: #856404;
    font-weight: bold;
}

.report-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.unread-divider {
    background: #ffc107;
    height: 2px;
    margin: 10px 0;
    border-radius: 1px;
}

.message-input {
    margin-top: 15px;
}

.message-input input {
    width: 80%;
    padding: 8px;
    border: 1px solid #ccc;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Override pour le modal d'administration */
#admin-modal .modal-content {
    max-width: 95vw !important;
    width: 95vw !important;
    max-height: 95vh !important;
    height: 95vh !important;
    padding: 0;
    border-radius: 12px;
}

.modal-content h3 {
    margin: 0 0 20px 0;
    color: #333;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.modal.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .modal-content {
        margin: 20px;
        padding: 20px;
    }
}
