/**
 * KOAEE Perplexity TopBar - EXACT REPLICA
 * Header fixe avec titre centré et actions à droite
 */

/* ============================================
   TOP BAR (60px height)
   ============================================ */

.koaee-topbar {
    position: fixed;
    top: 0;
    left: 52px;
    right: 0;
    height: 60px;
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    z-index: 90;
}

/* Titre centré */
.topbar-title {
    font-size: 16px;
    font-weight: 500;
    color: white;
    margin: 0;
    flex: 1;
    text-align: center;
    padding: 0 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Actions à droite */
.topbar-actions {
    position: absolute;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Boutons icône */
.topbar-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.topbar-icon-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

/* Bouton Share CYAN */
.topbar-share-btn {
    padding: 8px 16px;
    background: #00d4ff;
    border: none;
    border-radius: 8px;
    color: #000;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.topbar-share-btn:hover {
    background: #00bfea;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

/* ============================================
   DROPDOWN MENU
   ============================================ */

.dropdown-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 98;
}

.dropdown-menu {
    position: fixed;
    top: 60px;
    right: 20px;
    width: 260px;
    background: #1f1f1f;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 99;
    animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-header {
    padding: 12px 12px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 4px;
}

.dropdown-title {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.dropdown-item.danger {
    color: #ff4444;
}

.dropdown-item.danger:hover {
    background: rgba(255, 68, 68, 0.1);
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 0;
}

.dropdown-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Mobile */
@media (max-width: 768px) {
    .koaee-topbar {
        left: 0;
        padding: 0 16px;
    }

    .topbar-title {
        padding: 0 60px;
        font-size: 14px;
    }

    .topbar-actions {
        right: 16px;
    }
}
