/* ============================================
   NEXUS ACTUALITÉS - WIDGET SIDEBAR
   ============================================ */

/* Container du widget */
.nexus-actualite-widget {
    position: fixed;
    left: calc(50% + 325px + 100px);
    top: 60px;
    width: 320px;
    background: rgba(26, 26, 27, 0.95);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-height: calc(100vh - 80px);
    z-index: 100;
}

/* MASQUER dès que la largeur d'écran est insuffisante pour éviter le chevauchement */
@media (max-width: 1350px) {
    .nexus-actualite-widget {
        display: none !important;
    }
}

/* Header */
.actualite-header {
    padding: 16px;
    background: rgba(102, 126, 234, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.actualite-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #d7dadc;
    display: flex;
    align-items: center;
    gap: 8px;
}

.actualite-icon {
    font-size: 20px;
}

/* Contenu */
.actualite-content {
    padding: 16px;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
}

/* Message vide */
.actualite-empty {
    text-align: center;
    padding: 40px 20px;
    color: #818384;
}

.actualite-empty p {
    margin: 0;
    font-size: 14px;
}

/* Loading */
.actualite-loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Items d'actualités */
.actualite-item {
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

.actualite-item:hover {
    background: rgba(102, 126, 234, 0.05);
}

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

.actualite-item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.actualite-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.actualite-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.actualite-user {
    font-weight: 600;
    color: #d7dadc;
    font-size: 13px;
}

.actualite-time {
    font-size: 11px;
    color: #818384;
    margin-left: auto;
}

.actualite-item-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 42px;
}

.actualite-icon-container {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 8px;
}

.actualite-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.actualite-icon-emoji {
    font-size: 24px;
}

/* Couleurs de fond selon le type */
.icon-trophee {
    background: rgba(255, 204, 0, 0.1);
}

.icon-post {
    background: rgba(102, 126, 234, 0.1);
}

.icon-community {
    background: rgba(52, 199, 89, 0.1);
}

.icon-forum {
    background: rgba(0, 122, 255, 0.1);
}

.icon-comment {
    background: rgba(175, 82, 222, 0.1);
}

.icon-default {
    background: rgba(255, 255, 255, 0.05);
}

.actualite-item-content p {
    margin: 0;
    font-size: 13px;
    color: #d7dadc;
    line-height: 1.4;
}

/* Scrollbar */
.actualite-content::-webkit-scrollbar {
    width: 6px;
}

.actualite-content::-webkit-scrollbar-track {
    background: transparent;
}

.actualite-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.actualite-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

