/* ==========================================
   ZENDURE FRONTEND - CSS DÉDIÉ
   ========================================== */

/* Reset et isolation CSS pour éviter les conflits */
#zendure-system {
    position: relative;
    max-width: 1000px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
    clear: both;
    z-index: 1;
    color: #333;
}

#zendure-system *,
#zendure-system *:before,
#zendure-system *:after {
    box-sizing: border-box;
}

/* ===== HEADER PRINCIPAL ===== */
#zendure-system .suggestions-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    text-align: center;
}

#zendure-system .suggestions-header h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    color: white;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

#zendure-system .suggestions-header p {
    margin: 0 0 15px 0;
    color: rgba(255,255,255,0.9);
    font-size: 16px;
}

#zendure-system .suggestions-header a {
    color: white;
    text-decoration: underline;
    transition: opacity 0.2s;
}

#zendure-system .suggestions-header a:hover {
    opacity: 0.8;
}

/* ===== FORMULAIRES D'AUTHENTIFICATION ===== */
#zendure-system .zendure-form {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    margin: 25px 0;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

#zendure-system .zendure-form h2 {
    text-align: center;
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
}

#zendure-system .zendure-form > p {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
}

#zendure-system .zendure-tabs {
    display: flex;
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

#zendure-system .zendure-tab {
    flex: 1;
    padding: 15px;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    font-size: 15px;
    color: #495057;
    text-align: center;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: 600;
    position: relative;
}

#zendure-system .zendure-tab:hover {
    background: #e9ecef;
}

#zendure-system .zendure-tab.active {
    background: #007cba;
    color: white;
    box-shadow: inset 0 -3px 0 rgba(255,255,255,0.3);
}

#zendure-system .auth-form {
    animation: fadeIn 0.3s ease;
}

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

/* ===== ÉLÉMENTS DE FORMULAIRE ===== */
#zendure-system .form-group {
    margin-bottom: 20px;
}

#zendure-system .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

#zendure-system .form-group input,
#zendure-system .form-group textarea,
#zendure-system .form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}

#zendure-system .form-group input:focus,
#zendure-system .form-group textarea:focus,
#zendure-system .form-group select:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

#zendure-system .form-group textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

#zendure-system .form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

/* ===== BOUTONS ===== */
#zendure-system .btn {
    display: inline-block;
    padding: 12px 24px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-right: 10px;
    font-family: inherit;
    line-height: 1;
    text-align: center;
    vertical-align: middle;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#zendure-system .btn:hover {
    background: #0056b3;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

#zendure-system .btn:active {
    transform: translateY(0);
}

#zendure-system .btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#zendure-system .btn-cancel {
    background: #6c757d;
}

#zendure-system .btn-cancel:hover {
    background: #545b62;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

#zendure-system .btn-small {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    margin: 0 4px;
}

#zendure-system .form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* ===== INTERFACE DES SUGGESTIONS ===== */
#zendure-system .suggestion-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

#zendure-system .suggestion-card:hover {
    border-color: #007cba;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

#zendure-system .suggestion-header-row {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

#zendure-system .suggestion-info {
    flex: 1;
    min-width: 0;
}

#zendure-system .suggestion-badges {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

#zendure-system .status-badge,
#zendure-system .category-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#zendure-system .status-nouveau { background: #fff3cd; color: #856404; }
#zendure-system .status-examine { background: #d1ecf1; color: #0c5460; }
#zendure-system .status-approuve { background: #d4edda; color: #155724; }
#zendure-system .status-rejete { background: #f8d7da; color: #721c24; }
#zendure-system .status-realise { background: #e2e3e5; color: #383d41; }

#zendure-system .category-badge {
    color: white;
}

#zendure-system .suggestion-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 700;
    color: #212529;
    line-height: 1.3;
    word-break: break-word;
}

#zendure-system .suggestion-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #6c757d;
    flex-wrap: wrap;
}

#zendure-system .suggestion-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ===== ACTIONS SUR LES SUGGESTIONS ===== */
#zendure-system .suggestion-actions {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    flex-shrink: 0;
    flex-wrap: wrap;
}

#zendure-system .vote-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    min-width: 60px;
    transition: all 0.3s ease;
    font-family: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#zendure-system .vote-btn:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40,167,69,0.3);
}

#zendure-system .vote-btn:disabled,
#zendure-system .vote-btn.voted {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

#zendure-system .vote-count {
    font-size: 11px;
    margin-top: 2px;
    font-weight: 700;
}

#zendure-system .details-btn,
#zendure-system .edit-btn,
#zendure-system .delete-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    font-family: inherit;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#zendure-system .details-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

#zendure-system .edit-btn {
    background: #fd7e14;
}

#zendure-system .edit-btn:hover {
    background: #e86100;
    transform: translateY(-2px);
}

#zendure-system .delete-btn {
    background: #dc3545;
}

#zendure-system .delete-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
}

#zendure-system .details-btn.active {
    background: #dc3545;
}

/* ===== DÉTAILS DES SUGGESTIONS ===== */
#zendure-system .suggestion-details {
    border-top: 1px solid #f0f0f0;
    padding: 25px;
    background: #f8f9fa;
    display: none;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 1000px; }
}

#zendure-system .suggestion-description {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    line-height: 1.7;
    border-left: 4px solid #007cba;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

#zendure-system .description-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

#zendure-system .suggestion-description h4 {
    margin: 0;
    color: #212529;
    font-size: 18px;
    font-weight: 700;
}

#zendure-system .edit-description-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-top: 15px;
}

/* ===== COMMENTAIRES ===== */
#zendure-system .comments-section {
    margin-top: 20px;
}

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

#zendure-system .comments-header h4 {
    margin: 0;
    color: #212529;
    font-size: 18px;
    font-weight: 700;
}

#zendure-system .add-comment-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#zendure-system .add-comment-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40,167,69,0.3);
}

#zendure-system .comment-form {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    display: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    animation: fadeIn 0.3s ease;
}

#zendure-system .comment-form textarea {
    width: 100%;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    transition: border-color 0.3s;
}

#zendure-system .comment-form textarea:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

#zendure-system .comment-actions {
    display: flex;
    gap: 12px;
}

#zendure-system .comment-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

#zendure-system .comment-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

#zendure-system .comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f8f9fa;
}

#zendure-system .comment-author-info {
    display: flex;
    gap: 12px;
    align-items: center;
}

#zendure-system .comment-author {
    font-weight: 700;
    color: #007cba;
    font-size: 14px;
}

#zendure-system .comment-date {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
}

#zendure-system .comment-text {
    line-height: 1.6;
    color: #495057;
    font-size: 14px;
}

#zendure-system .delete-comment-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#zendure-system .delete-comment-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

#zendure-system .edit-description-btn {
    background: #fd7e14;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

#zendure-system .edit-description-btn:hover {
    background: #e86100;
    transform: translateY(-1px);
}

#zendure-system .save-edit-btn {
    background: #28a745;
}

#zendure-system .save-edit-btn:hover {
    background: #218838;
}

#zendure-system .cancel-edit-btn {
    background: #6c757d;
}

#zendure-system .cancel-edit-btn:hover {
    background: #545b62;
}

/* ===== MESSAGES ===== */
#zendure-system .message {
    padding: 15px 20px;
    margin: 15px 0;
    border-radius: 8px;
    font-weight: 600;
    border-left: 4px solid;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

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

#zendure-system .message.error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

#zendure-system .no-comments {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 30px;
    background: white;
    border-radius: 10px;
    border: 2px dashed #dee2e6;
    font-size: 14px;
}

#zendure-system .no-suggestions {
    text-align: center;
    padding: 50px;
    color: #6c757d;
    background: white;
    border-radius: 12px;
    border: 2px dashed #dee2e6;
    font-size: 18px;
}

#zendure-system .loading {
    text-align: center;
    color: #6c757d;
    padding: 30px;
    font-style: italic;
    font-size: 14px;
}

#zendure-system .forgot-password-link {
    color: #007cba;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

#zendure-system .forgot-password-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* ===== CLASSES UTILITAIRES ===== */
#zendure-system .hidden {
    display: none !important;
}

#zendure-system .text-center {
    text-align: center;
}

#zendure-system .text-muted {
    color: #6c757d;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    #zendure-system {
        margin: 15px;
    }
    
    #zendure-system .suggestions-header {
        padding: 20px;
    }
    
    #zendure-system .suggestions-header h2 {
        font-size: 24px;
    }
    
    #zendure-system .suggestion-header-row {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    #zendure-system .suggestion-actions {
        justify-content: center;
        width: 100%;
    }
    
    #zendure-system .suggestion-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    #zendure-system .comments-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    #zendure-system .comment-actions {
        flex-direction: column;
    }
    
    #zendure-system .description-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    #zendure-system .form-actions {
        flex-direction: column;
    }
    
    #zendure-system .zendure-form {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    #zendure-system .zendure-tabs {
        flex-direction: column;
    }
    
    #zendure-system .zendure-tab {
        border-radius: 0;
    }
    
    #zendure-system .zendure-tab:first-child {
        border-radius: 8px 8px 0 0;
    }
    
    #zendure-system .zendure-tab:last-child {
        border-radius: 0 0 8px 8px;
    }
    
    #zendure-system .suggestion-actions {
        flex-wrap: wrap;
        gap: 6px;
    }
    
    #zendure-system .suggestion-badges {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== ANIMATIONS ET TRANSITIONS ===== */
#zendure-system .suggestion-card {
    animation: fadeInUp 0.4s ease;
}

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

#zendure-system .btn {
    position: relative;
    overflow: hidden;
}

#zendure-system .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

#zendure-system .btn:active::before {
    width: 300px;
    height: 300px;
}
/* ==========================================
   ZENDURE ROLES - CSS ADDITIONNEL
   Styles pour le nouveau système de rôles
   ========================================== */

/* ===== BADGES DE RÔLES ===== */
.zendure-role-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    margin-left: 8px;
}

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

.zendure-role-badge.moderateur {
    background: #fd7e14;
    color: white;
}

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

/* ===== INDICATEURS DE PERMISSIONS ===== */
.zendure-permission-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6c757d;
    margin-left: 10px;
}

.zendure-permission-indicator.allowed {
    color: #28a745;
}

.zendure-permission-indicator.denied {
    color: #dc3545;
}

.zendure-permission-indicator::before {
    content: '●';
    font-size: 8px;
}

/* ===== INTERFACE D'ADMINISTRATION - RÔLES ===== */
.zendure-access-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #007cba;
}

.zendure-access-info .permissions-list {
    margin-top: 15px;
}

.zendure-access-info .permissions-list h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
}

.zendure-access-info .permissions-list ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.zendure-access-info .permissions-list li {
    padding: 4px 0;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== PAGE DE GESTION DES RÔLES ===== */
.roles-health-status {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.status-healthy {
    color: #28a745;
    font-weight: bold;
}

.status-error {
    color: #dc3545;
    font-weight: bold;
}

.role-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #dee2e6;
    transition: all 0.3s ease;
}

.role-item:hover {
    background: #e9ecef;
    transform: translateX(2px);
}

.role-item.admin {
    border-left-color: #dc3545;
}

.role-item.moderateur {
    border-left-color: #fd7e14;
}

.role-item.user {
    border-left-color: #28a745;
}

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

.role-name {
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.role-name::before {
    content: '●';
    font-size: 12px;
}

.role-description {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.4;
}

.role-status {
    font-size: 18px;
}

.roles-issues {
    background: #f8d7da;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #dc3545;
}

.roles-issues h4 {
    margin: 0 0 10px 0;
    color: #721c24;
}

.roles-issues ul {
    margin: 10px 0;
    padding-left: 20px;
}

.roles-issues li {
    margin-bottom: 5px;
}

.role-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.role-actions .button {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== SÉLECTEUR DE RÔLES UTILISATEURS ===== */
.user-role-select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    background: white;
    min-width: 140px;
    transition: border-color 0.3s;
}

.user-role-select:focus {
    border-color: #007cba;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.user-role-select option {
    padding: 4px;
}

/* ===== INDICATEURS D'ÉTAT FRONTEND ===== */
#zendure-system .suggestions-header .role-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    margin-left: 8px;
}

#zendure-system .role-indicator .role-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

#zendure-system .role-indicator.admin .role-dot {
    background: #dc3545;
}

#zendure-system .role-indicator.moderateur .role-dot {
    background: #fd7e14;
}

#zendure-system .role-indicator.user .role-dot {
    background: #28a745;
}

/* ===== BOUTONS AVEC PERMISSIONS ===== */
.permission-denied {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
}

.permission-granted {
    opacity: 1;
}

/* ===== COMMENTAIRES MASQUÉS ===== */
#zendure-system .comment-item.hidden {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    opacity: 0.7;
}

#zendure-system .comment-item.hidden .comment-text {
    font-style: italic;
    color: #721c24;
}

#zendure-system .comment-item.hidden::before {
    content: '🚫 Commentaire masqué par la modération';
    display: block;
    font-size: 11px;
    color: #721c24;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.moderation-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 8px;
    font-size: 11px;
    color: #856404;
}

/* ===== NOTIFICATIONS DE RÔLES ===== */
.zendure-role-notification {
    position: fixed;
    top: 32px;
    right: 20px;
    background: #007cba;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 999999;
    font-size: 14px;
    font-weight: 600;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.zendure-role-notification.success {
    background: #28a745;
}

.zendure-role-notification.warning {
    background: #fd7e14;
}

.zendure-role-notification.error {
    background: #dc3545;
}

/* ===== TABLEAU DES UTILISATEURS AVEC RÔLES ===== */
.zendure-users-table .role-cell {
    position: relative;
}

.zendure-users-table .role-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.zendure-users-table .role-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.zendure-users-table .role-change-btn {
    background: none;
    border: none;
    color: #007cba;
    cursor: pointer;
    font-size: 11px;
    text-decoration: underline;
    padding: 0;
    margin-left: 8px;
}

.zendure-users-table .role-change-btn:hover {
    color: #0056b3;
}

/* ===== BADGES D'ACTIVITÉ ===== */
.activity-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.activity-badge.high {
    background: #28a745;
    color: white;
}

.activity-badge.medium {
    background: #fd7e14;
    color: white;
}

.activity-badge.low {
    background: #6c757d;
    color: white;
}

.activity-badge.new {
    background: #007cba;
    color: white;
}

/* ===== INDICATEURS DE MODÉRATION ===== */
.moderation-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.moderation-badge.needs-review {
    background: #fff3cd;
    color: #856404;
}

.moderation-badge.reviewed {
    background: #d4edda;
    color: #155724;
}

.moderation-badge.hidden {
    background: #f8d7da;
    color: #721c24;
}

/* ===== RESPONSIVE POUR RÔLES ===== */
@media (max-width: 768px) {
    .zendure-role-badge {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .role-item {
        padding: 12px;
    }
    
    .role-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .role-actions {
        flex-direction: column;
    }
    
    .user-role-select {
        min-width: auto;
        width: 100%;
    }
    
    .zendure-role-notification {
        right: 10px;
        left: 10px;
        font-size: 13px;
    }
}

/* ===== ANIMATIONS SPÉCIALES ===== */
.role-change-animation {
    animation: roleChangeGlow 0.8s ease-in-out;
}

@keyframes roleChangeGlow {
    0% { background: transparent; }
    50% { background: rgba(0, 124, 186, 0.1); }
    100% { background: transparent; }
}

.permission-check-animation {
    animation: permissionPulse 0.6s ease-in-out;
}

@keyframes permissionPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); }
}

/* ===== TOOLTIPS POUR RÔLES ===== */
.role-tooltip {
    position: relative;
    cursor: help;
}

.role-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.role-tooltip::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.role-tooltip:hover::after,
.role-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

/* ===== ÉTATS DE CHARGEMENT POUR RÔLES ===== */
.role-loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.role-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}